:root {
  color-scheme: light;
  --bg: #f4f6f8;
  --panel: #ffffff;
  --panel-soft: #eef4f8;
  --text: #17202a;
  --muted: #5d6b78;
  --line: #d8e0e7;
  --blue: #1d4f91;
  --teal: #147d7e;
  --green: #237a4b;
  --red: #b94141;
  --amber: #a46616;
  --shadow: 0 12px 32px rgba(24, 39, 58, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow: hidden;
  font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

button:hover,
.course-nav a:hover {
  border-color: var(--teal);
  filter: brightness(0.98);
}

.app-shell {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  height: 100vh;
  overflow: hidden;
}

body[data-stage="basic"] {
  background: #f4f8fb;
}

body[data-stage="basic"] .app-shell,
body[data-stage="upgrade"] .app-shell {
  grid-template-columns: minmax(0, 1fr);
}

body[data-stage="basic"] .sidebar,
body[data-stage="upgrade"] .sidebar {
  display: none;
}

body[data-stage="basic"] .workbench {
  grid-template-columns: minmax(0, 1fr) minmax(300px, 360px);
  gap: 14px;
}

body[data-stage="upgrade"] .workbench {
  grid-template-columns: minmax(0, 1fr) minmax(320px, 390px);
  gap: 14px;
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px;
  overflow: hidden;
  background: #e8edf1;
  border-right: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: flex-start;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 8px;
  background: var(--blue);
  color: white;
  font-size: 28px;
  font-weight: 800;
}

.brand h1 {
  margin: 0;
  font-size: 20px;
  line-height: 1.2;
}

.brand p,
.eyebrow,
.progress-text {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.slogan-box {
  margin: -4px 0 0;
  padding: 10px 12px;
  border-left: 4px solid var(--green);
  border-radius: 6px;
  background: #f2f8f5;
  color: #214535;
  line-height: 1.55;
}

.practice-mode-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 12px;
  margin: 8px 0 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: linear-gradient(180deg, #f8fbff 0%, #eef6ff 100%);
}

.practice-mode-bar label,
.practice-mode-label {
  font-weight: 800;
  color: var(--blue);
}

.mode-switch {
  min-height: 38px;
  border: 1px solid #bfd8f7;
  border-radius: 999px;
  background: #fff;
  color: var(--blue);
  padding: 0 16px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 5px 14px rgba(26, 84, 153, 0.08);
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}

.mode-switch.active {
  background: linear-gradient(135deg, #164f93, #2275c7);
  border-color: var(--blue);
  color: #fff;
  box-shadow: 0 10px 20px rgba(26, 84, 153, 0.22);
}

.mode-switch:hover {
  border-color: var(--blue);
  transform: translateY(-1px);
}

.practice-mode-bar select {
  min-width: 170px;
  height: 34px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: #fff;
  color: var(--text);
  padding: 0 10px;
  font-weight: 700;
}

.practice-mode-bar span {
  color: var(--muted);
  font-size: 13px;
}

.practice-mode-panel {
  border: 1px solid #b9d8ff;
  background: #f7fbff;
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 12px;
}

.mode-panel-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 10px;
}

.mode-panel-head strong {
  color: var(--blue);
  font-size: 16px;
}

.mode-panel-head span,
.mode-empty {
  color: var(--muted);
  font-size: 13px;
}

.bug-hints {
  display: grid;
  gap: 8px;
  margin-bottom: 10px;
}

.bug-hints span {
  display: block;
  border: 1px solid #d7e6f7;
  background: #fff;
  border-radius: 8px;
  padding: 8px 10px;
  color: var(--text);
  line-height: 1.45;
}

.bug-hints b {
  display: inline-block;
  margin-right: 8px;
  color: var(--blue);
}

.practice-debug-mode #answerBox {
  display: none !important;
}

.practice-alt-mode #stemText,
.practice-alt-mode #optionList,
.practice-alt-mode #freeAnswerBox {
  display: none !important;
}

body[data-stage="sprint"].practice-alt-mode #stemText {
  display: block !important;
}

body[data-stage="sprint"].practice-alt-mode #optionList {
  display: grid !important;
}

body[data-stage="sprint"].practice-alt-mode #freeAnswerBox:not(.hidden) {
  display: block !important;
}

.practice-alt-mode #submitBtn,
.practice-alt-mode #showAnswerBtn,
.practice-alt-mode #markWrongBtn,
.practice-alt-mode #saveNoteBtn,
.practice-alt-mode #submitExamBtn,
.practice-alt-mode #openAnimInlineBtn,
.practice-alt-mode #openVideoInlineBtn {
  display: none !important;
}

body[data-stage="sprint"].practice-alt-mode #submitBtn,
body[data-stage="sprint"].practice-alt-mode #showAnswerBtn,
body[data-stage="sprint"].practice-alt-mode #markWrongBtn,
body[data-stage="sprint"].practice-alt-mode #saveNoteBtn,
body[data-stage="sprint"].practice-alt-mode #openAnimInlineBtn,
body[data-stage="sprint"].practice-alt-mode #openVideoInlineBtn {
  display: inline-flex !important;
  align-items: center;
}

.practice-alt-mode .practice-mode-panel {
  margin-top: 6px;
}

.reverse-levels {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.reverse-row {
  grid-template-columns: 34px minmax(220px, 1fr) minmax(220px, 320px) auto 80px;
}

.reverse-row .debug-code-input {
  min-height: 120px;
  font-size: 13px;
}

.block-builder {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(260px, 1fr);
  gap: 12px;
  align-items: start;
}

.block-workspace,
.block-bank {
  min-height: 180px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  padding: 10px;
  display: grid;
  gap: 8px;
  align-content: start;
}

.block-result-card {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  border: 1px solid #ffe0a3;
  background: #fff7e6;
  color: #7a4b00;
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 12px;
}

.block-workspace p {
  color: var(--muted);
  margin: 0;
}

.code-block,
.assembled-block {
  display: block;
  width: 100%;
  border: 1px solid #bdd7f5;
  border-radius: 8px;
  background: #f8fbff;
  color: var(--text);
  text-align: left;
  padding: 8px 10px;
  font-family: Consolas, "Courier New", monospace;
  line-height: 1.35;
  cursor: pointer;
}

.block-declare { background: #e8f7ff; border-color: #8bd3f7; }
.block-loop { background: #ecfdf3; border-color: #8ad9a6; }
.block-branch { background: #fff4e6; border-color: #ffc56d; }
.block-print { background: #f0eaff; border-color: #bca7ff; }
.block-assign { background: #fff0f6; border-color: #ffadd1; }
.block-return { background: #eef2ff; border-color: #9fb3ff; }
.block-brace { background: #fffbe6; border-color: #f3d36b; }
.block-stmt { background: #f4f7fb; border-color: #c9d6e5; }

.code-block span {
  display: inline-block;
  min-width: 72px;
  margin-right: 8px;
  color: var(--blue);
  font-family: "Microsoft YaHei", Arial, sans-serif;
  font-weight: 800;
}

.assembled-block {
  border-color: var(--blue);
  background: #eef6ff;
}

.block-output {
  margin-top: 10px;
}

.sandbox-table {
  display: grid;
  gap: 8px;
}

.sandbox-line-table {
  display: grid;
  gap: 9px;
}

.sandbox-code-row {
  display: grid;
  grid-template-columns: 34px minmax(260px, 1fr) minmax(240px, 340px) auto 90px;
  align-items: center;
  gap: 8px;
  padding: 9px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
}

.sandbox-code-left pre {
  margin: 5px 0;
  padding: 8px;
  border-radius: 7px;
  background: #f4f7fb;
  border: 1px dashed #c8d7ea;
  white-space: pre-wrap;
  font-family: Consolas, "Courier New", monospace;
}

.sandbox-code-left p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.sandbox-line-input {
  min-width: 0;
}

.sandbox-row {
  display: grid;
  grid-template-columns: 34px minmax(220px, 1fr) minmax(190px, 260px) auto 80px;
  align-items: center;
  gap: 8px;
  padding: 8px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
}

.sandbox-step {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--blue);
  color: #fff;
  font-weight: 800;
}

.sandbox-row p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.sandbox-input {
  height: 34px;
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 0 9px;
  font-family: Consolas, "Courier New", monospace;
}

.sandbox-result,
.mode-result {
  font-weight: 800;
  font-size: 13px;
}

.sandbox-result.ok,
.mode-result.ok {
  color: #067647;
}

.sandbox-result.bad,
.mode-result.bad {
  color: #b42318;
}

.debug-code-input {
  width: 100%;
  min-height: 220px;
  resize: vertical;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px;
  font-family: Consolas, "Courier New", monospace;
  font-size: 14px;
  line-height: 1.55;
  background: #fff;
  color: var(--text);
}

.debug-run-result {
  display: grid;
  gap: 5px;
  margin-bottom: 10px;
  padding: 9px 11px;
  border: 1px solid #9ec5f0;
  border-radius: 7px;
  background: #eef6ff;
}

.debug-run-result strong {
  color: var(--blue);
  font-size: 13px;
}

.debug-run-result pre {
  margin: 0;
  white-space: pre-wrap;
  color: #132f4d;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.35;
}

.debug-run-result span {
  color: #4d6278;
  font-size: 12px;
}

.mode-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 10px;
}

.mode-result {
  margin-top: 8px;
}

.slogan-box strong,
.slogan-box span {
  display: block;
}

.slogan-box strong {
  margin-bottom: 4px;
  color: #14613f;
  font-size: 14px;
}

.slogan-box span {
  font-size: 12px;
}

.panel,
.question-card,
.study-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.panel {
  padding: 12px;
}

.panel.compact {
  padding: 10px;
}

.panel-title {
  margin-bottom: 10px;
  color: #233241;
  font-size: 14px;
  font-weight: 700;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.stat-grid div {
  min-width: 0;
  padding: 7px 6px;
  border-radius: 6px;
  background: var(--panel-soft);
  text-align: center;
}

.stat-grid strong {
  display: block;
  font-size: 18px;
  color: var(--blue);
}

.stat-grid span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.encourage-box {
  margin-top: 8px;
  padding: 8px;
  border-radius: 6px;
  background: #fff7dc;
  color: #684f00;
  font-size: 13px;
  line-height: 1.5;
}

.leaderboard-list {
  display: grid;
  gap: 8px;
}

.leaderboard-item {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  gap: 8px;
  align-items: center;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel-soft);
}

.leaderboard-rank {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 12px;
}

.leaderboard-name {
  min-width: 0;
}

.leaderboard-name strong,
.leaderboard-name span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.leaderboard-name span {
  color: var(--muted);
  font-size: 12px;
}

.leaderboard-points {
  color: var(--green);
  font-weight: 800;
}

.reward-popup {
  position: fixed;
  left: 50%;
  top: 18%;
  transform: translateX(-50%);
  z-index: 20;
  max-width: min(420px, calc(100vw - 32px));
  padding: 14px 18px;
  border-radius: 8px;
  background: #fff7dc;
  border: 1px solid #f1cf63;
  color: #684f00;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.18);
  font-weight: 800;
  text-align: center;
}

.reward-popup.show {
  animation: reward-pop 2.8s ease both;
}

@keyframes reward-pop {
  0% { opacity: 0; transform: translate(-50%, -12px) scale(0.96); }
  12% { opacity: 1; transform: translate(-50%, 0) scale(1); }
  78% { opacity: 1; transform: translate(-50%, 0) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -12px) scale(0.98); }
}

.field {
  display: grid;
  gap: 6px;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 13px;
}

.field select,
.field input,
textarea,
.blank-answer-input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--text);
  padding: 10px;
  outline: none;
}

.field select:focus,
.field input:focus,
textarea:focus,
.blank-answer-input:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(20, 125, 126, 0.14);
}

.basic-only {
  display: none;
}

body[data-stage="basic"] .basic-only {
  display: grid;
}

body[data-stage="basic"] .sprint-only {
  display: none !important;
}

body[data-stage="basic"]:not(.programming-mode) .practice-mode-bar,
body:not(.reading-program-mode):not(.programming-mode) .practice-mode-bar,
body.sprint-mock-mode .practice-mode-bar,
body[data-stage="basic"] .recommend-box,
body[data-stage="basic"] #markWrongBtn,
body[data-stage="basic"] #saveNoteBtn,
body[data-stage="basic"] #openAnimInlineBtn,
body[data-stage="basic"] #detailExplainBtn,
body[data-stage="basic"] .site-footer a[href="#wrongList"] {
  display: none !important;
}

body[data-stage="upgrade"] .quick-filter-row,
body[data-stage="upgrade"] .sprint-only {
  display: none !important;
}

body[data-stage="sprint"] .quick-filter-row {
  display: none !important;
}

body.sprint-mock-mode #openAnimInlineBtn,
body.sprint-mock-mode #openVideoInlineBtn {
  display: none !important;
}

.basic-flow-tip {
  gap: 4px;
  margin: 2px 0 10px;
  padding: 9px 10px;
  border: 1px solid #cde5dd;
  border-radius: 8px;
  background: #eef8f5;
  color: #245a49;
  font-size: 12px;
  line-height: 1.45;
}

.basic-flow-tip strong,
.basic-flow-tip span {
  display: block;
}

.account-status {
  margin-top: 8px;
  padding: 8px 10px;
  border-radius: 6px;
  background: var(--panel-soft);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.account-status.online {
  color: var(--green);
  background: rgba(39, 127, 92, 0.12);
}

.button-row,
.answer-actions,
.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.answer-actions {
  position: sticky;
  bottom: 0;
  z-index: 5;
  margin: 10px -12px -12px;
  padding: 10px 12px;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
}

.icon-button,
.text-button,
.primary-button {
  min-height: 38px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
}

.icon-button {
  width: 42px;
  font-size: 24px;
  line-height: 1;
}

.text-button,
.primary-button {
  padding: 0 16px;
}

.primary-button {
  border-color: var(--blue);
  background: var(--blue);
  color: #fff;
  font-weight: 700;
}

.primary-button:hover {
  background: #163f76;
}

.text-button.subtle {
  width: 100%;
  margin-top: 10px;
  color: var(--muted);
}

.main {
  min-width: 0;
  height: 100vh;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 12px 16px;
}

body[data-stage="basic"] .main,
body[data-stage="upgrade"] .main,
body[data-stage="sprint"] .main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  grid-template-rows: minmax(0, 1fr) auto auto;
  gap: 8px 12px;
  overflow: hidden;
}

.topbar {
  margin-bottom: 10px;
}

.workbench {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 12px;
  align-items: start;
}

body[data-stage="basic"] .workbench,
body[data-stage="upgrade"] .workbench,
body[data-stage="sprint"] .workbench {
  display: contents;
}

body[data-stage="basic"] .center-column,
body[data-stage="upgrade"] .center-column,
body[data-stage="sprint"] .center-column {
  grid-column: 1;
  grid-row: 1;
}

body[data-stage="basic"] .study-card,
body[data-stage="upgrade"] .study-card,
body[data-stage="sprint"] .study-card {
  grid-column: 2;
  grid-row: 1 / 4;
}

body[data-stage="basic"] .leaderboard-panel,
body[data-stage="upgrade"] .leaderboard-panel,
body[data-stage="sprint"] .leaderboard-panel {
  grid-column: 1;
  grid-row: 2;
}

body[data-stage="basic"] .site-footer,
body[data-stage="upgrade"] .site-footer,
body[data-stage="sprint"] .site-footer {
  grid-column: 1;
  grid-row: 3;
}

body[data-stage="basic"] .workbench,
body[data-stage="upgrade"] .workbench,
body[data-stage="sprint"] .workbench {
  align-items: stretch;
  min-height: 0;
}

body[data-stage="basic"] .study-card,
body[data-stage="upgrade"] .study-card,
body[data-stage="sprint"] .study-card {
  height: 100%;
  max-height: none;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-gutter: stable;
}

body[data-stage="upgrade"] .study-card,
body[data-stage="sprint"] .study-card {
  overflow-y: scroll;
}

body[data-stage="basic"] .center-column,
body[data-stage="upgrade"] .center-column,
body[data-stage="sprint"] .center-column {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  min-height: 0;
}

body[data-stage="basic"] .question-area,
body[data-stage="upgrade"] .question-area,
body[data-stage="sprint"] .question-area {
  min-height: 0;
}

body[data-stage="basic"] .question-card,
body[data-stage="upgrade"] .question-card,
body[data-stage="sprint"] .question-card {
  height: 100%;
  max-height: none;
  overflow-y: auto;
}

body[data-stage="basic"] .recommend-box,
body[data-stage="upgrade"] .recommend-box,
body[data-stage="sprint"] .recommend-box {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

body[data-stage="basic"] .similar-list,
body[data-stage="upgrade"] .similar-list,
body[data-stage="sprint"] .similar-list {
  max-height: none;
  min-height: 0;
}

body[data-stage="basic"] .video-box,
body[data-stage="basic"] .ai-box,
body[data-stage="upgrade"] .video-box,
body[data-stage="upgrade"] .ai-box,
body[data-stage="sprint"] .video-box,
body[data-stage="sprint"] .ai-box {
  flex: 0 0 auto;
}

body[data-stage="upgrade"] .ai-explain-text,
body[data-stage="sprint"] .ai-explain-text {
  max-height: min(30vh, 260px);
  overflow-y: auto;
  padding-right: 4px;
  scrollbar-gutter: stable;
}

body[data-stage="basic"] .leaderboard-panel,
body[data-stage="basic"] .site-footer,
body[data-stage="upgrade"] .leaderboard-panel,
body[data-stage="upgrade"] .site-footer,
body[data-stage="sprint"] .leaderboard-panel,
body[data-stage="sprint"] .site-footer {
  margin: 0;
}

body[data-stage="basic"] .leaderboard-panel,
body[data-stage="upgrade"] .leaderboard-panel {
  display: none;
}

body[data-stage="sprint"] .sidebar {
  display: grid;
  grid-template-rows: minmax(0, 1fr) minmax(0, 1fr) auto;
  min-height: 0;
}

body[data-stage="sprint"] #sprintSimilarSlot {
  min-height: 0;
}

body[data-stage="sprint"] #sprintSimilarSlot .recommend-box {
  height: 100%;
  margin-top: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

body[data-stage="sprint"] #sprintSimilarSlot .similar-list {
  overflow-y: auto;
  scrollbar-gutter: stable;
}

body[data-stage="sprint"] #sprintFilterSlot {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
}

body[data-stage="sprint"] #sprintFilterSlot .filter-panel {
  margin-bottom: 10px;
  padding: 0 0 10px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

body[data-stage="sprint"] #sprintFilterSlot .stage-type-panel {
  order: 0;
  margin-bottom: 10px;
  box-shadow: none;
}

body[data-stage="sprint"] #sprintFilterSlot .filter-panel {
  order: 1;
}

body[data-stage="sprint"] .brand {
  display: none;
}

body[data-stage="sprint"] .wrong-panel {
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
}

body[data-stage="sprint"] .filter-panel {
  overflow: visible;
}

body[data-stage="sprint"] .filter-panel .field {
  gap: 4px;
  margin-bottom: 5px;
  font-size: 12px;
}

body[data-stage="sprint"] .filter-panel .field select,
body[data-stage="sprint"] .filter-panel .field input {
  padding: 7px 9px;
}

body[data-stage="sprint"] .filter-panel .panel-title {
  margin-bottom: 8px;
}

body[data-stage="sprint"] .filter-panel .button-row {
  gap: 8px;
}

body[data-stage="sprint"] .wrong-list {
  max-height: none;
  min-height: 0;
}

body[data-stage="sprint"] .stats-panel {
  padding: 6px;
}

body[data-stage="sprint"] .stats-panel .stat-grid {
  gap: 6px;
}

body[data-stage="sprint"] .stats-panel .stat-grid div {
  padding: 4px;
}

body[data-stage="sprint"] .stats-panel .stat-grid strong {
  font-size: 16px;
}

body[data-stage="sprint"] .stats-panel .stat-grid span {
  font-size: 11px;
}

body[data-stage="sprint"] .stats-panel .encourage-box {
  margin-top: 6px;
  padding: 5px 6px;
  font-size: 12px;
  line-height: 1.35;
}

body[data-stage="sprint"] .hero-title-block strong {
  display: block;
  white-space: nowrap;
  font-size: clamp(22px, 2.15vw, 30px);
  line-height: 1.15;
}

body[data-stage="sprint"] .hero-copy {
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

body[data-stage="sprint"] .hero-title-block span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: clip;
  font-size: clamp(8px, 0.68vw, 10px);
  line-height: 1.2;
  font-weight: 600;
}

body[data-stage="sprint"] .stage-tabs {
  grid-template-columns: repeat(3, 205px);
  gap: 6px;
  justify-content: end;
  justify-self: end;
  margin-left: auto;
  margin-right: 0;
  width: auto;
}

body[data-stage="sprint"] .stage-tab {
  min-height: 68px;
  padding: 10px;
}

body[data-stage="sprint"] .stage-tab span {
  white-space: nowrap;
  overflow: visible;
  font-size: 11px;
  line-height: 1.2;
}

body[data-stage="sprint"] .panel-title,
body[data-stage="sprint"] .eyebrow,
body[data-stage="sprint"] .hero-title-block strong,
body[data-stage="sprint"] .stage-panel h3,
body[data-stage="sprint"] .stage-tab.active strong,
body[data-stage="sprint"] .stage-type-button strong,
body[data-stage="sprint"] .stage-type-button span,
body[data-stage="sprint"] .question-meta,
body[data-stage="sprint"] .question-heading h2,
body[data-stage="sprint"] .filter-panel .field span,
body[data-stage="sprint"] .stat-grid strong,
body[data-stage="sprint"] .leaderboard-panel h3,
body[data-stage="sprint"] .mini-item strong,
body[data-stage="sprint"] .video-item strong,
body[data-stage="sprint"] .exam-bar strong {
  color: var(--red);
}

body[data-stage="upgrade"] .panel-title,
body[data-stage="upgrade"] .eyebrow,
body[data-stage="upgrade"] .hero-title-block strong,
body[data-stage="upgrade"] .stage-panel h3,
body[data-stage="upgrade"] .stage-tab strong,
body[data-stage="upgrade"] .stage-method-strip strong,
body[data-stage="upgrade"] .stage-type-button strong,
body[data-stage="upgrade"] .stage-type-button span,
body[data-stage="upgrade"] .question-meta,
body[data-stage="upgrade"] .question-heading h2,
body[data-stage="upgrade"] .filter-panel .field span,
body[data-stage="upgrade"] .stat-grid strong,
body[data-stage="upgrade"] .leaderboard-panel h3,
body[data-stage="upgrade"] .mini-item strong,
body[data-stage="upgrade"] .video-item strong,
body[data-stage="upgrade"] .exam-bar strong,
body[data-stage="upgrade"] .upgrade-lab-panel h3,
body[data-stage="upgrade"] .upgrade-lab-card strong,
body[data-stage="upgrade"] .basic-guide-title strong,
body[data-stage="upgrade"] .side-example-button strong {
  color: var(--green);
}

body[data-stage="sprint"] .stage-tab strong,
body[data-stage="sprint"] .stage-method-strip strong,
body[data-stage="sprint"] .sprint-paper-panel h3,
body[data-stage="sprint"] .sprint-paper-panel .eyebrow,
body[data-stage="sprint"] .basic-guide-title strong,
body[data-stage="sprint"] .side-example-button strong {
  color: var(--red);
}

body[data-stage="upgrade"] button {
  border-color: rgba(35, 122, 75, 0.42);
  color: var(--green);
}

body[data-stage="upgrade"] .primary-button,
body[data-stage="upgrade"] .mode-switch.active,
body[data-stage="upgrade"] .stage-tab.active,
body[data-stage="upgrade"] .stage-type-button.active,
body[data-stage="upgrade"] .option-button.active,
body[data-stage="upgrade"] .teacher-button.active,
body[data-stage="upgrade"] .sprint-start-button {
  border-color: var(--green);
  background: var(--green);
  color: #fff;
}

body[data-stage="upgrade"] .primary-button:hover {
  background: #1b623c;
}

body[data-stage="upgrade"] .stage-tab.active strong,
body[data-stage="upgrade"] .stage-tab.active span,
body[data-stage="upgrade"] .mode-switch.active,
body[data-stage="upgrade"] .stage-type-button.active strong,
body[data-stage="upgrade"] .stage-type-button.active span,
body[data-stage="upgrade"] .option-button.active {
  color: #fff;
}

body[data-stage="sprint"] button {
  border-color: rgba(185, 65, 65, 0.46);
  color: var(--red);
}

body[data-stage="sprint"] .primary-button,
body[data-stage="sprint"] .mode-switch.active,
body[data-stage="sprint"] .stage-tab.active,
body[data-stage="sprint"] .stage-type-button.active,
body[data-stage="sprint"] .option-button.active,
body[data-stage="sprint"] .teacher-button.active,
body[data-stage="sprint"] .sprint-start-button {
  border-color: var(--red);
  background: var(--red);
  color: #fff;
}

body[data-stage="sprint"] .primary-button:hover {
  background: #963232;
}

body[data-stage="sprint"] .stage-tab.active strong,
body[data-stage="sprint"] .stage-tab.active span,
body[data-stage="sprint"] .mode-switch.active,
body[data-stage="sprint"] .stage-type-button.active strong,
body[data-stage="sprint"] .stage-type-button.active span,
body[data-stage="sprint"] .option-button.active {
  color: #fff;
}

body[data-stage="upgrade"] .stage-tab.active {
  background: #edf8f1;
}

body[data-stage="upgrade"] .stage-tab.active strong,
body[data-stage="upgrade"] .stage-tab.active span {
  color: var(--green);
}

body[data-stage="sprint"] .stage-tab.active {
  background: #fff0f0;
}

body[data-stage="sprint"] .stage-tab.active strong,
body[data-stage="sprint"] .stage-tab.active span {
  color: var(--red);
}

body[data-stage="upgrade"] .basic-example-button,
body[data-stage="upgrade"] .side-example-button {
  border-color: rgba(35, 122, 75, 0.42);
  color: var(--green);
}

body[data-stage="upgrade"] .basic-example-button strong,
body[data-stage="upgrade"] .basic-example-button span,
body[data-stage="upgrade"] .side-example-button strong,
body[data-stage="upgrade"] .side-example-button span {
  color: var(--green);
}

body[data-stage="upgrade"] .basic-example-button strong,
body[data-stage="upgrade"] .side-example-button strong {
  background: #e7f5ed;
}

body[data-stage="upgrade"] .basic-example-button.active,
body[data-stage="upgrade"] .side-example-button.active {
  border-color: var(--green);
  background: #eef8f1;
}

body[data-stage="sprint"] .leaderboard-rank {
  background: var(--red);
  color: #fff;
}

body[data-stage="sprint"] .site-footer a,
body[data-stage="sprint"] .site-footer .icp-link,
body[data-stage="sprint"] .police-record-link {
  color: var(--red) !important;
}

.center-column {
  min-width: 0;
}

.app-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff 0%, #edf6f2 100%);
  box-shadow: var(--shadow);
}

.hero-copy {
  display: grid;
  grid-template-columns: minmax(280px, 0.8fr) minmax(360px, 1fr);
  gap: 14px;
  align-items: center;
  justify-self: stretch;
  text-align: left;
}

.hero-title-block {
  min-width: 0;
  text-align: left;
}

.hero-account-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(72px, auto));
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  white-space: nowrap;
}

.hero-account-actions .text-button,
.hero-account-actions .primary-button {
  min-width: 72px;
  min-height: 36px;
  padding: 0 16px;
  border-radius: 6px;
  font-weight: 900;
}

.hero-account-actions .text-button {
  background: #fff;
}

.hero-account-actions .hero-wrong-button {
  color: var(--muted);
}

.course-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}

.course-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--blue);
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}

.nav-toggle {
  display: none;
  min-height: 34px;
  margin-bottom: 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--blue);
  font-weight: 800;
}

.hero-copy strong {
  display: block;
  color: var(--blue);
  font-size: clamp(24px, 2.25vw, 34px);
  line-height: 1.08;
  font-weight: 900;
}

.hero-copy span {
  display: block;
  margin-top: 6px;
  color: #214535;
  font-size: 13px;
  line-height: 1.45;
  font-weight: 700;
}

.hero-tags {
  display: none !important;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
  margin-top: 0;
  max-width: 520px;
}

.hero-tags span,
.hero-tag-button {
  margin: 0;
  padding: 9px 13px;
  border-radius: 999px;
  background: #fff;
  color: var(--blue);
  border: 1px solid rgba(29, 79, 145, 0.24);
  box-shadow: 0 8px 20px rgba(24, 39, 58, 0.08);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.2;
}

.hero-tags span:nth-child(1) {
  background: #eaf6f3;
  color: var(--teal);
  border-color: rgba(20, 125, 126, 0.28);
}

.hero-tag-button {
  background: #eaf6f3;
  color: var(--teal);
  border-color: rgba(20, 125, 126, 0.28);
}

.hero-tags span:nth-child(3) {
  background: #eef4ff;
  color: var(--blue);
  border-color: rgba(29, 79, 145, 0.28);
}

.hero-tags span:nth-child(4) {
  background: #fff7dc;
  color: #725102;
  border-color: rgba(164, 102, 22, 0.28);
}

.stage-switcher {
  display: grid;
  gap: 8px;
  margin: 0 0 10px;
}

.stage-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  min-width: 0;
}

.stage-tab {
  min-height: 58px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  text-align: left;
  box-shadow: 0 6px 16px rgba(24, 39, 58, 0.06);
}

.stage-tab strong,
.stage-tab span {
  display: block;
}

.stage-tab strong {
  color: var(--blue);
  font-size: 14px;
  line-height: 1.25;
}

.stage-tab span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.3;
}

.stage-method-strip {
  display: none;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.stage-method-strip div {
  min-height: 66px;
  padding: 10px 12px;
  border: 1px solid #d5e2ed;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 6px 16px rgba(24, 39, 58, 0.05);
}

.stage-method-strip strong {
  display: block;
  color: var(--blue);
  font-size: 14px;
  line-height: 1.2;
}

.stage-method-strip span {
  display: block;
  margin-top: 5px;
  color: #405264;
  font-size: 12px;
  line-height: 1.45;
}

.stage-method-strip div:nth-child(2) strong {
  color: var(--green);
}

.stage-method-strip div:nth-child(3) strong {
  color: var(--amber);
}

body[data-stage="sprint"] .stage-method-strip div:nth-child(3) strong,
body[data-stage="sprint"] .hero-tags span:nth-child(4) {
  color: var(--red);
}

body[data-stage="sprint"] .hero-tags span:nth-child(4) {
  border-color: rgba(185, 65, 65, 0.28);
  background: #fff0f0;
}

.stage-tab.active {
  border-color: var(--blue);
  background: #edf5ff;
  box-shadow: 0 10px 22px rgba(29, 79, 145, 0.16);
}

.stage-tab.active strong {
  color: #123d72;
}

.stage-panel {
  display: none;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid #cbdce9;
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.stage-panel h3 {
  margin: 2px 0 4px;
  color: var(--blue);
  font-size: 18px;
  line-height: 1.2;
}

.stage-panel p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.stage-tools {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
  max-width: 380px;
}

.stage-tools span {
  padding: 7px 10px;
  border: 1px solid rgba(20, 125, 126, 0.24);
  border-radius: 999px;
  background: #eff8f5;
  color: var(--teal);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
}

body[data-stage="upgrade"] .stage-tab.active {
  border-color: var(--green);
  background: #edf8f1;
}

body[data-stage="upgrade"] .stage-panel h3,
body[data-stage="upgrade"] .stage-tab.active strong {
  color: var(--green);
}

body[data-stage="upgrade"] .stage-tools span {
  border-color: rgba(35, 122, 75, 0.24);
  background: #eef8f1;
  color: var(--green);
}

body[data-stage="sprint"] .stage-tab.active {
  border-color: var(--red);
  background: #fff0f0;
}

body[data-stage="sprint"] .stage-panel h3,
body[data-stage="sprint"] .stage-tab.active strong {
  color: var(--red);
}

body[data-stage="sprint"] .stage-tools span {
  border-color: rgba(185, 65, 65, 0.24);
  background: #fff0f0;
  color: var(--red);
}

.basic-theme-panel {
  position: relative;
  display: grid;
  gap: 8px;
  padding: 18px 12px 10px;
  border: 3px solid #15966c;
  border-radius: 8px;
  background: #dff7ec;
  box-shadow: 0 0 0 5px rgba(21, 150, 108, 0.18), 0 14px 30px rgba(21, 150, 108, 0.18);
}

.basic-theme-panel::before {
  content: attr(data-label);
  position: absolute;
  top: -12px;
  left: 14px;
  max-width: calc(100% - 28px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 3px 10px;
  border: 1px solid #15966c;
  border-radius: 999px;
  background: #15966c;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.2;
}

.basic-theme-head {
  display: none !important;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.basic-theme-head h3 {
  margin: 2px 0 0;
  color: var(--blue);
  font-size: 17px;
  line-height: 1.25;
}

#basicThemeAnimBtn {
  border-color: #0f8f83;
  background: linear-gradient(135deg, #0f7f7d, #1d9d72);
  box-shadow: 0 12px 24px rgba(20, 125, 126, 0.2);
}

#stageBasicBtn span {
  color: #0f6f6f;
  font-weight: 900;
}

.basic-theme-tabs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
  gap: 5px;
}

.basic-theme-tab {
  min-height: 38px;
  padding: 5px 8px;
  border: 1px solid #96d9c2;
  border-radius: 8px;
  background: #f8fffc;
  color: #0f6f4f;
  font-size: 16px;
  font-weight: 900;
  line-height: 1.2;
}

.basic-theme-tab span {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  margin-right: 5px;
  border-radius: 999px;
  background: #cef4e5;
  color: #0f6f4f;
  font-size: 13px;
  font-weight: 900;
}

.basic-theme-tab.active {
  border-color: #0b8f69;
  background: #cbf3e2;
  box-shadow: 0 8px 18px rgba(21, 150, 108, 0.18);
}

.basic-theme-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 6px;
  align-items: start;
  padding: 7px;
  border: 1px solid #8ad5bd;
  border-radius: 8px;
  background: #f6fffb;
}

.basic-theme-card strong {
  display: block;
  color: var(--blue);
  font-size: 16px;
  line-height: 1.25;
}

.basic-theme-card p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.basic-theme-card ul {
  margin: 0;
  padding-left: 18px;
  color: #33485c;
  font-size: 13px;
  line-height: 1.55;
}

.basic-theme-count {
  min-width: 150px;
  padding: 10px 12px;
  border: 1px solid #f1cf63;
  border-radius: 8px;
  background: #fff7dc;
  color: #0d5f52;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.45;
  box-shadow: inset 4px 0 0 #1d9d72, 0 8px 18px rgba(35, 122, 75, 0.12);
}

.basic-example-grid {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
}

.basic-example-button {
  min-height: 38px;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 6px;
  align-items: center;
  padding: 5px 7px;
  border: 1px solid #d5e2ed;
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  text-align: left;
}

.basic-example-button strong {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: #e7f1ff;
  color: var(--blue);
  font-size: 11px;
}

.basic-example-button span {
  min-width: 0;
  color: #33485c;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
}

.basic-example-button.active {
  border-color: var(--blue);
  background: #eaf3ff;
  box-shadow: 0 8px 18px rgba(29, 79, 145, 0.14);
}

.upgrade-knowledge-panel {
  border-color: var(--green);
  background: #e7f5ed;
  box-shadow: 0 0 0 5px rgba(35, 122, 75, 0.16), 0 14px 30px rgba(35, 122, 75, 0.14);
}

.upgrade-knowledge-panel .basic-theme-tabs {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.upgrade-knowledge-panel .basic-example-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.upgrade-lab-panel,
.sprint-paper-panel {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid #cfe2d7;
  border-radius: 8px;
  background: #f4fbf6;
  box-shadow: var(--shadow);
}

.upgrade-lab-panel h3,
.sprint-paper-panel h3 {
  margin: 2px 0 6px;
  color: var(--green);
  font-size: 18px;
  line-height: 1.25;
}

.upgrade-lab-panel span,
.sprint-paper-panel span {
  color: #405264;
  font-size: 13px;
  line-height: 1.55;
}

.upgrade-lab-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.upgrade-lab-card {
  min-height: 76px;
  padding: 10px;
  border: 1px solid #bfdbc9;
  border-radius: 8px;
  background: #fff;
  text-align: left;
}

.upgrade-lab-card.active {
  border-color: var(--green);
  background: #eefaf2;
  box-shadow: 0 8px 18px rgba(43, 122, 75, 0.16);
}

.upgrade-lab-card strong,
.upgrade-lab-card span,
.upgrade-lab-count {
  display: block;
}

.upgrade-lab-card strong {
  color: var(--green);
  font-size: 15px;
  line-height: 1.2;
}

.upgrade-lab-card span {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
}

.upgrade-lab-count {
  margin-top: 6px;
  color: var(--green);
  font-size: 18px;
  font-style: normal;
  font-weight: 900;
  line-height: 1;
}

.upgrade-lab-card[data-upgrade-type="T-TR"] {
  border-color: #0f8f83;
  background: linear-gradient(180deg, #f2fffb 0%, #e7f8f1 100%);
  box-shadow: 0 12px 24px rgba(20, 125, 126, 0.16);
}

.upgrade-lab-card[data-upgrade-type="T-TR"] strong {
  color: #0f6f6f;
}

.sprint-paper-panel {
  display: none !important;
  border-color: #f0d49b;
  background: #fff8ea;
}

.sprint-paper-panel h3 {
  color: var(--red);
}

.sprint-start-button {
  justify-self: start;
  min-width: 150px;
  background: var(--red);
  border-color: var(--red);
}

body[data-stage="basic"] .app-hero {
  background: #ffffff;
  border-color: #cbdce9;
}

body[data-stage="basic"] .question-card,
body[data-stage="basic"] .study-card {
  border-color: #cbdce9;
  background: #ffffff;
}

body[data-stage="basic"] .basic-theme-panel {
  border-color: #1d4f91;
  background: #eaf4ff;
  box-shadow: 0 0 0 5px rgba(29, 79, 145, 0.16), 0 14px 30px rgba(29, 79, 145, 0.16);
}

body[data-stage="basic"] .basic-theme-panel::before {
  background: #1d4f91;
}

body[data-stage="basic"] .basic-theme-tab {
  border-color: #9ec5f0;
  background: #f7fbff;
  color: #15477f;
}

body[data-stage="basic"] .basic-theme-tab span {
  background: #dcecff;
  color: #1d4f91;
}

body[data-stage="basic"] .basic-theme-tab.active {
  border-color: #1d4f91;
  background: #dcecff;
  box-shadow: 0 8px 18px rgba(29, 79, 145, 0.18);
}

body[data-stage="basic"] .question-card,
body[data-stage="upgrade"] .question-card {
  max-height: none;
}

body.reading-program-mode[data-stage="basic"] .question-card,
body.reading-program-mode[data-stage="upgrade"] .question-card {
  max-height: calc(100vh - 260px);
}

body[data-stage="upgrade"] .question-card,
body[data-stage="upgrade"] .study-card {
  border-color: #cfe2d7;
}

.stage-type-panel {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid #cbdce9;
  border-radius: 8px;
  background: #f8fbff;
  box-shadow: var(--shadow);
}

.stage-type-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 6px;
}

.study-account-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.study-account-actions .text-button,
.study-account-actions .primary-button {
  min-width: 0;
  min-height: 30px;
  padding: 0 7px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 900;
}

.study-account-actions .text-button {
  background: #fff;
}

.stage-type-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.stage-chapter-select {
  display: grid;
  gap: 6px;
  color: #4c637c;
  font-size: 13px;
  font-weight: 800;
}

.stage-chapter-select select {
  width: 100%;
  min-height: 38px;
  border: 1px solid #c9d8e8;
  border-radius: 8px;
  background: #fff;
  color: #1b2f46;
  font-size: 14px;
  font-weight: 700;
  padding: 0 10px;
}

.stage-type-button {
  min-height: 58px;
  display: grid;
  gap: 4px;
  place-items: center;
  padding: 7px;
  border: 1px solid #c9d8e8;
  border-radius: 8px;
  background: #fff;
  color: var(--blue);
  text-align: center;
}

.stage-type-button strong {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: #e7f1ff;
  color: var(--blue);
  font-size: 13px;
}

.stage-type-button span {
  color: #123d72;
  font-size: 14px;
  font-weight: 900;
  line-height: 1.2;
}

.stage-type-button.active {
  border-color: var(--blue);
  background: #eaf3ff;
  box-shadow: 0 8px 18px rgba(29, 79, 145, 0.14);
}

body[data-stage="upgrade"] .stage-type-panel {
  border-color: #cfe2d7;
  background: #f4fbf6;
}

body[data-stage="sprint"] .stage-type-panel {
  border-color: #cfe2d7;
  background: #f4fbf6;
}

body[data-stage="sprint"] .video-box {
  display: none !important;
}

body[data-stage="upgrade"] .stage-type-button {
  border-color: #bfdbc9;
}

body[data-stage="upgrade"] .stage-type-button span {
  color: var(--green);
}

body[data-stage="upgrade"] .stage-type-button[data-stage-type="T-TR"] {
  border-color: #0f8f83;
  background: linear-gradient(180deg, #f2fffb 0%, #e7f8f1 100%);
  box-shadow: 0 12px 24px rgba(20, 125, 126, 0.16);
}

.side-example-block {
  display: grid;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid #d6e3f0;
}

.side-example-title {
  color: #123d72;
  font-size: 14px;
  font-weight: 900;
}

.side-example-grid {
  display: grid;
  gap: 7px;
}

.side-example-button {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 7px 9px;
  border: 1px solid #c9d8e8;
  border-radius: 8px;
  background: #fff;
  color: #123d72;
  text-align: left;
}

.side-example-button strong {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: #e7f1ff;
  color: var(--blue);
  font-size: 12px;
}

.side-example-button span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 800;
}

.side-example-button.active {
  border-color: var(--blue);
  background: #eaf3ff;
}

.basic-study-guide {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid #cbdce9;
  border-radius: 8px;
  background: #f8fbff;
  box-shadow: var(--shadow);
}

.basic-guide-title {
  display: grid;
  gap: 4px;
}

.basic-guide-title strong {
  color: var(--blue);
  font-size: 16px;
  line-height: 1.25;
}

.basic-guide-title span,
.basic-study-guide p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.basic-guide-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.basic-guide-steps span {
  min-height: 42px;
  display: grid;
  place-items: center;
  padding: 7px;
  border: 1px solid #cde5dd;
  border-radius: 8px;
  background: #eef8f5;
  color: var(--teal);
  text-align: center;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.25;
}

.basic-guide-counts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.basic-guide-counts button {
  min-height: 54px;
  border: 1px solid #dbe6f0;
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  text-align: center;
}

.basic-guide-counts strong,
.basic-guide-counts span {
  display: block;
}

.basic-guide-counts strong {
  color: var(--blue);
  font-size: 18px;
  line-height: 1.1;
}

.basic-guide-counts span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.full-width {
  width: 100%;
}

.quick-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 10px;
}

.quick-filter {
  min-height: 30px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
}

.teacher-button.active {
  border-color: var(--green);
  background: #e7f5ed;
  color: var(--green);
  font-weight: 800;
}

.question-heading {
  margin-bottom: 8px;
  padding: 0 2px;
}

.question-heading h2 {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
  font-weight: 700;
}

.question-meta {
  margin: 0;
  color: #223241;
  font-size: 18px;
  line-height: 1.35;
  font-weight: 800;
}

.question-area {
  display: block;
}

.leaderboard-panel {
  display: grid;
  grid-template-columns: 108px minmax(0, 1fr);
  gap: 6px;
  align-items: start;
  margin-top: 10px;
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.leaderboard-panel h3 {
  margin: 1px 0 0;
  font-size: 14px;
  color: var(--blue);
}

.leaderboard-panel .eyebrow {
  margin-top: 0;
  font-size: 11px;
}

.hero-list {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  max-height: 58px;
  overflow: hidden;
}

.hero-list .leaderboard-item {
  min-height: 24px;
  padding: 3px 6px;
}

.hero-list .leaderboard-name span {
  display: none;
}

.hero-list .leaderboard-rank {
  width: 20px;
  height: 20px;
  font-size: 11px;
}

.hero-list .leaderboard-item:nth-child(1) {
  border-color: #f1cf63;
  background: #fff7dc;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(18, 29, 43, 0.36);
}

.modal.hidden {
  display: none;
}

.modal-card {
  position: relative;
  width: min(440px, 100%);
  padding: 22px;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.24);
}

.modal-card h2 {
  margin: 0 0 16px;
  color: var(--blue);
  font-size: 22px;
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fff;
  color: var(--muted);
  font-size: 24px;
  line-height: 1;
}

.modal-actions .text-button.subtle {
  width: auto;
  margin-top: 0;
}

.modal-message {
  margin: 4px 0 12px;
  padding: 9px 10px;
  border: 1px solid rgba(29, 79, 145, 0.18);
  border-radius: 6px;
  background: #eef4ff;
  color: var(--blue);
  font-size: 13px;
  line-height: 1.45;
}

.modal-message.error {
  border-color: rgba(185, 65, 65, 0.28);
  background: #faebeb;
  color: var(--red);
}

.modal-message.success {
  border-color: rgba(35, 122, 75, 0.28);
  background: #e7f5ed;
  color: var(--green);
}

.question-card,
.study-card {
  max-height: calc(100vh - 260px);
  overflow: auto;
  padding: 12px;
}

.stem,
#answerText {
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: Consolas, "Microsoft YaHei", monospace;
  font-size: 15px;
  line-height: 1.75;
}

.stem {
  min-height: 170px;
  margin: 8px 0 10px;
  padding: 12px;
  border: 1px solid #dce6ef;
  border-radius: 8px;
  background: #fbfdff;
}

.reading-program-mode .stem {
  max-height: clamp(300px, calc(100vh - 520px), 620px);
  overflow-y: auto;
  padding-bottom: 22px;
}

.question-images {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.question-image {
  display: block;
  width: min(100%, 760px);
  max-width: 100%;
  height: auto;
  border: 1px solid #dce6ef;
  border-radius: 6px;
  background: #fff;
}

.code-keyword {
  color: #0f5f9f;
  font-weight: 800;
}

.code-func {
  color: #137a68;
  font-weight: 800;
}

.code-pre {
  color: #7b4aa0;
  font-weight: 800;
}

.code-string {
  color: #9a5a12;
}

.option-list {
  display: grid;
  gap: 8px;
  margin-bottom: 10px;
}

.option-button {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  width: 100%;
  min-height: 42px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--text);
  text-align: left;
}

.option-button.active {
  border-color: var(--teal);
  background: #e8f7f5;
}

.option-key {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background: var(--panel-soft);
  color: var(--blue);
  font-weight: 800;
}

.option-text {
  white-space: pre-wrap;
  line-height: 1.55;
}

.option-button-with-image {
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
}

.option-button-with-image .option-text {
  display: none;
}

.option-image {
  display: block;
  max-width: min(100%, 360px);
  height: auto;
}

.piecewise-option-list {
  grid-template-columns: repeat(2, minmax(260px, 1fr));
  gap: 12px 28px;
}

.piecewise-option-list .option-button {
  align-items: start;
  min-height: 78px;
  border: 0;
  background: transparent;
  padding: 6px 8px;
}

.piecewise-option-list .option-button.active {
  background: #e8f7f5;
  border: 1px solid var(--teal);
}

.piecewise-option-list .option-key {
  background: transparent;
  color: var(--text);
  font-size: 18px;
}

.piecewise-option-list .option-text,
.piecewise-formula {
  font-family: "Times New Roman", "SimSun", serif;
  font-size: 17px;
  line-height: 1.35;
}

.piecewise-formula {
  display: grid;
  grid-template-columns: auto 20px minmax(0, 1fr);
  align-items: center;
  column-gap: 4px;
  color: #111827;
}

.piecewise-x {
  white-space: nowrap;
}

.piecewise-brace {
  font-family: "Times New Roman", serif;
  font-size: 54px;
  line-height: 0.9;
  font-weight: 400;
  transform: scaleX(0.65);
  transform-origin: center;
}

.piecewise-cases {
  display: grid;
  gap: 2px;
}

.piecewise-cases span {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: baseline;
  gap: 8px;
  min-height: 22px;
}

.piecewise-cases b {
  font-weight: 400;
}

.piecewise-cases em {
  font-style: italic;
  white-space: nowrap;
}

.free-answer-box {
  margin-bottom: 14px;
}

.blank-input-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}

.blank-input-item {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
}

.result-box {
  min-height: 44px;
  padding: 10px;
  border-radius: 6px;
  background: var(--panel-soft);
  color: var(--muted);
  line-height: 1.5;
}

.result-box.correct {
  background: #e7f5ed;
  color: var(--green);
}

.result-box.wrong {
  background: #faebeb;
  color: var(--red);
}

.answer-box,
.recommend-box,
.video-box,
.ai-box {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.analysis-text,
.video-hint,
.ai-explain-hint,
.ai-explain-text {
  color: var(--muted);
  line-height: 1.6;
  font-size: 14px;
}

.ai-explain-hint {
  margin-bottom: 8px;
}

.ai-explain-text {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

.ai-explain-text p {
  margin: 0;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.ai-explain-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.ai-explain-button,
.ai-voice-button,
.ai-voice-stop {
  min-height: 34px;
}

.ai-voice-status {
  margin-top: 7px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.video-item {
  display: grid;
  gap: 6px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.video-item strong {
  color: var(--blue);
}

.video-item span {
  color: var(--muted);
}

.video-link,
.video-pending {
  border: 0;
  background: transparent;
  color: var(--teal);
  font-weight: 700;
  text-decoration: none;
  text-align: left;
  padding: 0;
}

.similar-list,
.wrong-list {
  display: grid;
  gap: 8px;
  max-height: 210px;
  overflow: auto;
}

.mini-item {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  padding: 9px 10px;
  color: var(--text);
  text-align: left;
}

.mini-item strong {
  display: block;
  margin-bottom: 4px;
  color: var(--blue);
  font-size: 13px;
}

.mini-item span {
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.empty {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.hidden {
  display: none;
}

.exam-bar {
  position: fixed;
  left: 340px;
  right: 20px;
  bottom: 18px;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.exam-bar.hidden {
  display: none;
}

.exam-bar strong {
  color: var(--blue);
}

#examTimer {
  padding: 4px 9px;
  border-radius: 6px;
  background: #fff0e0;
  color: var(--amber);
  font-weight: 800;
}

.exam-result-card {
  width: min(900px, calc(100vw - 36px));
  max-height: 86vh;
  overflow: auto;
}

.exam-result-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 8px;
}

.exam-result-summary div,
.exam-weak-list div,
.exam-plan {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.exam-result-summary strong {
  display: block;
  color: var(--blue);
  font-size: 22px;
}

.exam-result-summary span,
.exam-weak-list span {
  color: var(--muted);
  font-size: 13px;
}

.exam-weak-list,
.exam-wrong-review {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.exam-plan {
  margin-top: 12px;
  color: var(--text);
  line-height: 1.6;
}

.exam-plan h3 {
  margin: 0 0 8px;
  color: var(--blue);
  font-size: 16px;
}

.exam-plan p {
  margin: 6px 0;
}

.video-modal-card {
  width: min(900px, calc(100vw - 40px));
}

.lesson-video {
  display: block;
  width: 100%;
  max-height: 62vh;
  border-radius: 8px;
  background: #000;
}

.video-modal-note {
  margin-top: 10px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.video-countdown {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 6px;
  background: #fff7dc;
  color: #684f00;
  font-weight: 800;
}

.anim-modal-card {
  box-sizing: border-box;
  position: fixed;
  top: 50%;
  left: 50%;
  width: min(960px, calc(100vw - 36px));
  height: min(88vh, 760px);
  min-width: 520px;
  min-height: 420px;
  max-width: calc(100vw - 24px);
  max-height: calc(100vh - 24px);
  display: block;
  overflow: auto;
  resize: both;
  transform: translate(-50%, -50%);
}

.anim-modal-card > * {
  min-height: 0;
}

.anim-modal-card h2 {
  margin: -4px 44px 8px 0;
  cursor: move;
  user-select: none;
}

.anim-modal-card.dragging {
  user-select: none;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.32);
}

.anim-summary {
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.anim-code {
  display: grid;
  gap: 3px;
  min-height: 0;
  min-block-size: 0;
  max-height: none;
  overflow: visible;
  margin: 0;
  padding: 12px;
  border-radius: 8px;
  background: #17212b;
  color: #d8e3ea;
  font-family: Consolas, "Microsoft YaHei", monospace;
  font-size: 14px;
  line-height: 1.55;
}

.anim-line {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 8px;
  padding: 4px 6px;
  border-radius: 5px;
}

.anim-line span {
  color: #7f95a8;
  text-align: right;
}

.anim-line code {
  white-space: pre-wrap;
}

.anim-line.active {
  background: #fff3bf;
  color: #17212b;
}

.anim-line.active span {
  color: #8a5a00;
}

.anim-explain {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 6px;
  background: var(--panel-soft);
  color: var(--text);
  line-height: 1.6;
  max-height: none;
  overflow: visible;
}

.anim-vars {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  align-content: start;
  gap: 8px;
  margin-top: 10px;
  min-block-size: 0;
  max-height: 100%;
  overflow: visible;
  padding-right: 4px;
}

.anim-vars div {
  display: grid;
  gap: 4px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.anim-vars strong {
  color: var(--blue);
  font-size: 13px;
}

.anim-vars span {
  color: var(--muted);
  font-size: 13px;
  white-space: pre-wrap;
}

.anim-storage-panel {
  grid-column: 1 / -1;
  display: grid !important;
  gap: 8px;
  padding: 10px 12px;
  border: 2px solid #0f8f83;
  border-radius: 8px;
  background: #ecfffa;
  box-shadow: inset 0 0 0 1px rgba(15, 143, 131, 0.08);
}

.anim-storage-panel > strong {
  color: #075f58;
  font-size: 14px;
}

.anim-storage-panel > div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.anim-storage-panel span {
  display: grid;
  min-width: 120px;
  gap: 3px;
  padding: 8px 10px;
  border: 1px solid #8fd5c9;
  border-radius: 7px;
  background: #fff;
}

.anim-storage-panel b {
  color: #0b4f8f;
  font-size: 12px;
}

.anim-storage-panel em {
  color: #083b36;
  font-size: 18px;
  font-style: normal;
  font-weight: 800;
}

.anim-call-flow {
  grid-column: 1 / -1;
  box-sizing: border-box;
  width: 100%;
  display: flex !important;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 8px;
  max-height: none;
  overflow: visible;
  padding: 10px;
  border: 1px solid #c9d8e8;
  border-radius: 8px;
  background: #f8fbff;
}

.anim-call-frame {
  min-width: 170px;
  display: grid;
  gap: 6px;
  padding: 10px;
  border: 1px solid #cbdce9;
  border-radius: 8px;
  background: #fff;
}

.anim-call-frame.active {
  border-color: var(--blue);
  background: #eaf3ff;
  box-shadow: 0 8px 18px rgba(29, 79, 145, 0.14);
}

.anim-call-frame.returning {
  border-color: #0f8f83;
  background: #f2fffb;
}

.anim-call-arrow {
  display: grid;
  place-items: center;
  min-width: 28px;
  color: var(--blue);
  font-size: 24px;
  font-weight: 900;
}

.anim-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
  z-index: 2;
  padding-top: 10px;
  background: #fff;
  border-top: 1px solid var(--line);
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  align-items: center;
  justify-content: center;
  margin: 6px 0;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  font-size: 11px;
}

.site-footer a {
  color: var(--blue);
  font-weight: 800;
  text-decoration: none;
}

.footer-links {
  display: contents;
}

.site-footer .icp-link {
  color: var(--muted);
  font-weight: 700;
  text-align: center;
}

.police-record-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  color: var(--muted) !important;
  font-weight: 700 !important;
  text-align: center;
}

.police-record-link img {
  width: 16px;
  height: 16px;
  object-fit: contain;
}

.note-modal-card {
  width: min(640px, calc(100vw - 36px));
}

.note-input {
  resize: vertical;
}

@media (max-width: 980px) {
  body,
  .app-shell,
  .main {
    height: auto;
    overflow: auto;
  }

  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    overflow: visible;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .question-card,
  .study-card {
    max-height: none;
  }

  .workbench {
    display: grid;
    grid-template-columns: 1fr;
  }

  body[data-stage="basic"] .main,
  body[data-stage="upgrade"] .main,
  body[data-stage="sprint"] .main {
    display: block;
    height: auto;
    overflow: auto;
  }

  body[data-stage="basic"] .center-column,
  body[data-stage="basic"] .study-card,
  body[data-stage="basic"] .recommend-box,
  body[data-stage="upgrade"] .center-column,
  body[data-stage="upgrade"] .study-card,
  body[data-stage="upgrade"] .recommend-box,
  body[data-stage="sprint"] .center-column,
  body[data-stage="sprint"] .study-card,
  body[data-stage="sprint"] .recommend-box {
    display: block;
    height: auto;
  }

  body[data-stage="sprint"] .sidebar {
    display: flex;
  }

  body[data-stage="sprint"] .wrong-panel {
    display: block;
  }

  body[data-stage="sprint"] .wrong-list {
    max-height: 210px;
  }

  body[data-stage="basic"] .question-card,
  body[data-stage="basic"] .study-card,
  body[data-stage="upgrade"] .question-card,
  body[data-stage="upgrade"] .study-card,
  body[data-stage="sprint"] .question-card,
  body[data-stage="sprint"] .study-card {
    height: auto;
    max-height: none;
  }

  .question-area {
    display: block;
  }

  .exam-bar {
    left: 12px;
    right: 12px;
    bottom: 12px;
    flex-wrap: wrap;
  }

  .app-hero,
  .leaderboard-panel {
    grid-template-columns: 1fr;
  }

  .hero-copy {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-title-block {
    text-align: center;
  }

  .hero-account-actions {
    justify-content: center;
  }

  .hero-tags {
    justify-content: center;
    max-width: none;
  }

  .stage-panel {
    grid-template-columns: 1fr;
  }

  .stage-method-strip {
    grid-template-columns: 1fr;
  }

  .stage-tools {
    justify-content: flex-start;
    max-width: none;
  }

  .basic-theme-head,
  .basic-theme-card {
    grid-template-columns: 1fr;
  }

  .basic-theme-head {
    display: grid;
  }

  .basic-theme-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .basic-example-grid,
  .upgrade-lab-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .basic-theme-count {
    min-width: 0;
  }

  .app-hero {
    min-height: 0;
    padding: 16px;
  }

  .hero-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .anim-modal-card {
    min-width: calc(100vw - 24px);
    min-height: 360px;
  }

  .sidebar,
  .main {
    padding: 14px;
  }

  .hero-copy strong {
    font-size: 24px;
  }

  .hero-copy span {
    font-size: 13px;
  }

  .hero-account-actions {
    width: 100%;
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .hero-account-actions .text-button,
  .hero-account-actions .primary-button {
    min-width: 0;
    padding: 0 6px;
    font-size: 13px;
  }

  .stage-tabs {
    grid-template-columns: 1fr;
  }

  .stage-tab {
    min-height: 56px;
  }

  .basic-theme-tabs {
    grid-template-columns: 1fr;
  }

  .basic-example-grid,
  .upgrade-lab-grid,
  body[data-stage="basic"] .workbench,
  body[data-stage="upgrade"] .workbench {
    grid-template-columns: 1fr;
  }

  .question-meta {
    font-size: 18px;
  }

  .answer-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .icon-button {
    width: 38px;
  }
}
