:root {
  color-scheme: light;
  --ink: #172435;
  --muted: #718096;
  --muted-2: #8a97a8;
  --bg: #edf2f8;
  --paper: #ffffff;
  --line: #e3eaf3;
  --blue: #2289f3;
  --blue-soft: #e7f2ff;
  --teal: #1b9d91;
  --teal-soft: #e3f5f0;
  --purple: #8c65f7;
  --purple-soft: #f1ebff;
  --red: #ed5f68;
  --red-soft: #fff0f1;
  --amber: #ed9a36;
  --amber-soft: #fff5e8;
  --shadow: 0 18px 42px rgba(52, 73, 102, 0.1);
  --answer-font: 15px;
}
* {
  box-sizing: border-box;
}
html {
  min-height: 100%;
  background: var(--bg);
  overscroll-behavior-y: contain;
}
body {
  margin: 0;
  min-height: 100%;
  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    "Noto Sans KR",
    Roboto,
    Arial,
    sans-serif;
  color: var(--ink);
  background:
    radial-gradient(
      ellipse at 10% 8%,
      rgba(208, 226, 250, 0.45),
      transparent 32%
    ),
    radial-gradient(
      ellipse at 95% 75%,
      rgba(223, 232, 250, 0.5),
      transparent 30%
    ),
    linear-gradient(135deg, #eef2f8 0%, #e9eff7 50%, #f4f7fb 100%);
  -webkit-font-smoothing: antialiased;
}
button,
input {
  font: inherit;
}
button {
  touch-action: manipulation;
}
button:focus-visible,
input:focus-visible {
  outline: 3px solid rgba(34, 137, 243, 0.3);
  outline-offset: 2px;
}
.app-shell {
  width: min(100%, 492px);
  min-height: min(920px, 100dvh);
  margin: 24px auto;
  padding: 0 0 max(18px, env(safe-area-inset-bottom));
  border: 1px solid rgba(255, 255, 255, 0.84);
  border-radius: 30px;
  background: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.9),
    rgba(247, 250, 253, 0.82)
  );
  box-shadow: 0 28px 70px rgba(40, 58, 84, 0.13);
  overflow: clip;
  position: relative;
}
.app-content {
  padding: max(16px, env(safe-area-inset-top)) 22px 28px;
  min-width: 0;
}
button {
  border: 0;
  cursor: pointer;
}
.icon-btn {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  border-radius: 13px;
  background: transparent;
  color: #354255;
  font-size: 23px;
  line-height: 1;
  flex: 0 0 auto;
}
.icon-btn:hover {
  background: #eff4fa;
}
.topbar {
  height: 44px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 42px;
  align-items: center;
  margin-bottom: 18px;
}
.topbar h2 {
  margin: 0;
  text-align: center;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.035em;
}
.topbar .subhead {
  font-size: 11px;
  line-height: 1.4;
  color: var(--muted);
  font-weight: 500;
  text-align: center;
  margin-top: 3px;
}
.back-btn {
  font-size: 0;
}
.back-btn:before {
  content: "";
  width: 9px;
  height: 9px;
  border-left: 1.8px solid currentColor;
  border-bottom: 1.8px solid currentColor;
  transform: rotate(45deg);
  display: block;
  margin-left: 7px;
}
.hero {
  padding: 34px 0 28px;
  text-align: center;
}
.hero-mark {
  width: 72px;
  height: 72px;
  margin: 0 auto 20px;
  border-radius: 25px;
  display: grid;
  place-items: center;
  background: linear-gradient(140deg, #e2edff, #f7fbff);
  box-shadow:
    inset 0 1px 0 #fff,
    0 9px 22px rgba(76, 124, 196, 0.08);
  color: var(--blue);
}
.hero-mark svg {
  width: 31px;
  height: 31px;
}
.hero h1 {
  font-size: 25px;
  line-height: 1.25;
  letter-spacing: -0.065em;
  margin: 0;
  font-weight: 850;
}
.hero p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
  letter-spacing: -0.02em;
}
.mode-list {
  display: grid;
  gap: 11px;
  margin-top: 7px;
}
.mode-card {
  display: flex;
  align-items: center;
  gap: 13px;
  width: 100%;
  min-height: 83px;
  text-align: left;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: 19px;
  background: rgba(255, 255, 255, 0.74);
  box-shadow: 0 6px 18px rgba(58, 80, 110, 0.035);
  transition:
    transform 0.16s ease,
    box-shadow 0.16s ease,
    border-color 0.16s ease;
}
.mode-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(58, 80, 110, 0.08);
}
.mode-card:active {
  transform: scale(0.99);
}
.mode-card.old {
  background: linear-gradient(
    110deg,
    rgba(231, 244, 255, 0.86),
    rgba(255, 255, 255, 0.95)
  );
  border-color: #d6eaff;
}
.mode-card.new {
  background: linear-gradient(
    110deg,
    rgba(228, 247, 241, 0.82),
    rgba(255, 255, 255, 0.95)
  );
  border-color: #d5f0e7;
}
.mode-card.all {
  background: linear-gradient(
    110deg,
    rgba(243, 237, 255, 0.82),
    rgba(255, 255, 255, 0.95)
  );
  border-color: #e8ddff;
}
.mode-icon {
  width: 45px;
  height: 45px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}
.old .mode-icon {
  color: var(--blue);
  background: #dff0ff;
}
.new .mode-icon {
  color: var(--teal);
  background: #d9f1ea;
}
.all .mode-icon {
  color: var(--purple);
  background: #ece3ff;
}
.mode-icon svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.mode-copy {
  min-width: 0;
  flex: 1;
}
.mode-copy b {
  display: block;
  font-size: 15px;
  margin: 0 0 4px;
  font-weight: 800;
  letter-spacing: -0.035em;
}
.mode-copy small {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: -0.01em;
}
.card-chevron {
  font-size: 25px;
  color: #428fe8;
  font-weight: 300;
  padding: 0 1px;
}
.new .card-chevron {
  color: var(--teal);
}
.all .card-chevron {
  color: var(--purple);
}
.home-footer {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 22px;
  padding: 13px 8px;
  border: 1px solid rgba(223, 231, 241, 0.82);
  border-radius: 17px;
  background: rgba(255, 255, 255, 0.45);
}
.feature {
  text-align: center;
  min-width: 0;
}
.feature strong {
  display: block;
  font-size: 13px;
  font-weight: 800;
  margin-bottom: 4px;
}
.feature span {
  color: var(--muted);
  font-size: 10px;
}
.small-note {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.55;
  text-align: center;
  margin: 18px 4px 0;
}
.panel {
  padding: 17px 16px;
  border-radius: 20px;
  border: 1px solid rgba(224, 232, 242, 0.9);
  background: rgba(255, 255, 255, 0.75);
  box-shadow: 0 8px 24px rgba(49, 72, 104, 0.045);
}
.mode-summary {
  text-align: center;
  padding: 8px 0 22px;
}
.mode-summary h1 {
  font-size: 23px;
  letter-spacing: -0.06em;
  margin: 0 0 9px;
}
.mode-summary p {
  font-size: 12px;
  line-height: 1.6;
  color: var(--muted);
  margin: 0;
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: 999px;
  padding: 7px 11px;
  background: #eef4fa;
  color: #53657d;
  font-size: 11px;
  font-weight: 750;
}
.setup-panel {
  margin-top: 3px;
}
.section-label {
  font-size: 12px;
  font-weight: 800;
  margin: 0 0 12px;
  letter-spacing: -0.02em;
}
.setting-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
}
.setting-line:first-of-type {
  margin-top: 0;
}
.setting-line b {
  display: block;
  font-size: 12px;
  margin-bottom: 5px;
}
.setting-line p {
  margin: 0;
  font-size: 11px;
  color: var(--muted);
  line-height: 1.5;
}
.choice-chip {
  border-radius: 999px;
  padding: 9px 15px;
  background: #f0f4f9;
  color: #8390a1;
  font-size: 11px;
  font-weight: 750;
  white-space: nowrap;
}
.choice-chip.active {
  color: var(--blue);
  background: #e7f0ff;
  border: 1px solid #cbdfff;
  box-shadow: 0 2px 3px rgba(62, 122, 211, 0.04);
}
.setup-info {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  margin: 16px 0 0;
}
.primary-btn {
  width: 100%;
  min-height: 49px;
  border-radius: 17px;
  padding: 13px 18px;
  color: #fff;
  background: linear-gradient(180deg, #2c3949, #1d2835);
  box-shadow: 0 8px 16px rgba(23, 37, 54, 0.13);
  font-weight: 800;
  font-size: 13px;
  letter-spacing: -0.025em;
  transition:
    transform 0.15s ease,
    opacity 0.15s ease;
}
.primary-btn:hover {
  background: linear-gradient(180deg, #37495d, #202c3b);
}
.primary-btn:active {
  transform: scale(0.99);
}
.primary-btn:disabled {
  cursor: not-allowed;
  opacity: 0.38;
  box-shadow: none;
}
.secondary-btn {
  width: 100%;
  min-height: 45px;
  border-radius: 15px;
  padding: 11px 16px;
  color: #42526a;
  background: #eef3f9;
  font-weight: 750;
  font-size: 12px;
}
.action-area {
  margin-top: 23px;
}
.quiz-top {
  display: grid;
  grid-template-columns: 39px 1fr 39px;
  align-items: center;
  gap: 5px;
  margin: 0 0 15px;
}
.quiz-count {
  text-align: center;
  font-weight: 800;
  font-size: 12px;
  letter-spacing: 0.02em;
}
.quiz-progress {
  height: 6px;
  border-radius: 99px;
  background: #e6ebf3;
  overflow: hidden;
  margin: 0 0 22px;
}
.quiz-progress-fill {
  height: 100%;
  width: 0;
  border-radius: 99px;
  background: linear-gradient(90deg, #32b49a, #248c89);
  transition: width 0.25s ease;
}
.timer-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 17px;
  margin-bottom: 22px;
}
.timer-ring {
  width: 65px;
  height: 65px;
  position: relative;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}
.timer-ring svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}
.timer-ring circle {
  fill: none;
  stroke-width: 4.5;
}
.timer-track {
  stroke: #e3e8ef;
}
.timer-progress {
  stroke: #31ad8b;
  stroke-linecap: round;
  stroke-dasharray: 176;
  stroke-dashoffset: 0;
  transition:
    stroke-dashoffset 0.4s linear,
    stroke 0.2s ease;
}
.timer-ring.urgent .timer-progress {
  stroke: var(--red);
}
.timer-number {
  position: relative;
  font-size: 19px;
  font-weight: 850;
  font-variant-numeric: tabular-nums;
  color: #269c84;
}
.timer-ring.urgent .timer-number {
  color: var(--red);
}
.hint-btn {
  border: 1px solid #e1e9f5;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.75);
  padding: 10px 13px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 750;
  color: #5d6c82;
  box-shadow: 0 4px 10px rgba(54, 78, 110, 0.045);
}
.hint-btn svg {
  width: 15px;
  height: 15px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
}
.hint-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.prompt-wrap {
  text-align: center;
  padding: 2px 0 20px;
}
.question-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 9px;
  border-radius: 8px;
  background: #eef4fb;
  color: #74849a;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.02em;
  margin-bottom: 12px;
}
.prompt-wrap h1 {
  font-size: 21px;
  line-height: 1.53;
  letter-spacing: -0.055em;
  font-weight: 850;
  margin: 0;
  overflow-wrap: anywhere;
  word-break: keep-all;
}
.prompt-helper {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.6;
  margin: 12px 0 0;
}
.hint-panel {
  padding: 12px 13px;
  border-radius: 15px;
  border: 1px solid #d4e7fc;
  background: linear-gradient(110deg, #f0f7ff, #fff);
  margin: 0 0 13px;
  display: flex;
  align-items: flex-start;
  gap: 9px;
}
.hint-lightbulb {
  width: 29px;
  height: 29px;
  border-radius: 10px;
  background: #dfedff;
  color: #4b94ed;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  font-size: 15px;
}
.hint-content {
  min-width: 0;
  flex: 1;
}
.hint-content b {
  font-size: 11px;
  display: block;
  margin: 1px 0 6px;
}
.hint-content p {
  margin: 0;
  font-size: 14px;
  font-weight: 850;
  letter-spacing: 0.08em;
  color: #2e6fae;
  overflow-wrap: anywhere;
}
.hint-close {
  background: transparent;
  color: #8a9bb2;
  font-size: 18px;
  padding: 1px 3px;
}
.answer-panel {
  margin: 0 0 14px;
  padding: 15px 14px;
  border-radius: 17px;
  border: 1px solid #dfe8f2;
  background: linear-gradient(
    135deg,
    rgba(247, 250, 254, 0.98),
    rgba(255, 255, 255, 0.98)
  );
  box-shadow: inset 0 1px 0 #fff;
  animation: rise 0.22s ease;
}
.answer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}
.answer-head strong {
  font-size: 12px;
  font-weight: 850;
}
.answer-badge {
  font-size: 10px;
  color: #278b7c;
  background: #e2f5ef;
  padding: 5px 8px;
  border-radius: 8px;
  font-weight: 800;
}
.answer-text {
  font-size: var(--answer-font);
  line-height: 1.75;
  color: #2a3747;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: normal;
  letter-spacing: -0.02em;
  user-select: text;
  max-width: 100%;
}
.self-grade {
  margin: 0 0 14px;
}
.self-grade .section-label {
  margin-bottom: 10px;
}
.grade-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.grade-btn {
  min-width: 0;
  padding: 12px 4px 10px;
  border: 1px solid #e4ebf3;
  border-radius: 15px;
  background: #fff;
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 5px;
  transition:
    border-color 0.15s,
    background 0.15s;
}
.grade-symbol {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 20px;
  font-weight: 900;
}
.grade-btn b {
  font-size: 10px;
  line-height: 1.3;
}
.grade-btn small {
  font-size: 9px;
  color: var(--muted);
  line-height: 1.35;
}
.grade-btn[data-grade="O"] .grade-symbol {
  background: #e3f6ef;
  color: #19a878;
}
.grade-btn[data-grade="△"] .grade-symbol {
  background: #fff2df;
  color: #ed9a36;
}
.grade-btn[data-grade="X"] .grade-symbol {
  background: #fff0f1;
  color: #e85a63;
}
.grade-btn.selected[data-grade="O"] {
  background: #f0fbf6;
  border-color: #63d6ab;
}
.grade-btn.selected[data-grade="△"] {
  background: #fff9ef;
  border-color: #facb86;
}
.grade-btn.selected[data-grade="X"] {
  background: #fff5f5;
  border-color: #f59aa0;
}
.timeout-note {
  margin: 0 auto 12px;
  color: #ca565e;
  text-align: center;
  font-size: 11px;
  font-weight: 750;
}
.explain-note {
  font-size: 10px;
  color: var(--muted);
  text-align: center;
  line-height: 1.6;
  margin: 12px 0 0;
}
.result-hero {
  text-align: center;
  padding: 12px 0 18px;
}
.result-hero .success-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  margin: 0 auto 14px;
  color: #21a77b;
  background: #e2f7ee;
  border: 1px solid #c4efdc;
  font-size: 28px;
  font-weight: 900;
}
.result-hero h1 {
  margin: 0 0 7px;
  font-size: 22px;
  letter-spacing: -0.05em;
}
.result-hero p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
}
.summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  border: 1px solid #e4eaf2;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.78);
  padding: 14px 6px;
  margin: 0 0 17px;
}
.summary-stat {
  text-align: center;
  padding: 0 5px;
  min-width: 0;
}
.summary-stat + .summary-stat {
  border-left: 1px solid #e6ecf3;
}
.summary-stat .num {
  font-size: 21px;
  font-weight: 850;
  display: block;
  margin-bottom: 5px;
}
.summary-stat b {
  display: block;
  font-size: 10px;
  margin-bottom: 4px;
}
.summary-stat small {
  font-size: 9px;
  color: var(--muted);
}
.summary-stat.good .num {
  color: #18aa79;
}
.summary-stat.partial .num {
  color: #ef9c38;
}
.summary-stat.retry .num {
  color: #e75a63;
}
.list-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 0 0 10px;
}
.list-heading b {
  font-size: 12px;
}
.list-heading span {
  font-size: 10px;
  color: var(--muted);
}
.result-list {
  border: 1px solid #e1e8f1;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.8);
  overflow: hidden;
}
.result-row {
  width: 100%;
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) 24px 12px;
  align-items: center;
  gap: 8px;
  text-align: left;
  background: transparent;
  padding: 12px 11px;
  border-bottom: 1px solid #edf1f6;
  min-height: 52px;
}
.result-row:last-child {
  border-bottom: 0;
}
.result-row:hover {
  background: #f6f9fd;
}
.result-index {
  color: #7d8ca1;
  font-size: 10px;
  font-weight: 750;
  text-align: center;
}
.row-question {
  min-width: 0;
}
.row-question b {
  display: block;
  font-size: 11px;
  font-weight: 750;
  line-height: 1.5;
  white-space: normal;
  overflow-wrap: anywhere;
}
.row-question small {
  display: block;
  color: var(--muted);
  font-size: 9px;
  margin-top: 3px;
}
.grade-mini {
  font-size: 18px;
  font-weight: 900;
  text-align: center;
}
.grade-mini.O {
  color: #17ab78;
}
.grade-mini.△ {
  color: #e89930;
}
.grade-mini.X {
  color: #e65b63;
}
.row-chevron {
  color: #97a5b6;
  font-size: 20px;
}
.result-actions {
  display: grid;
  gap: 9px;
  margin-top: 17px;
}
.detail-title {
  text-align: center;
  margin: 7px 0 17px;
}
.detail-title h1 {
  font-size: 19px;
  line-height: 1.55;
  letter-spacing: -0.05em;
  margin: 0 0 9px;
  overflow-wrap: anywhere;
}
.detail-title p {
  font-size: 11px;
  color: var(--muted);
  margin: 0;
}
.settings-section {
  margin-bottom: 13px;
}
.settings-section h3 {
  font-size: 12px;
  margin: 0 0 10px;
  font-weight: 850;
}
.preference {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid #edf1f6;
}
.preference:first-of-type {
  border-top: 0;
  padding-top: 1px;
}
.preference .pref-copy {
  min-width: 0;
}
.preference b {
  display: block;
  font-size: 12px;
  margin: 0 0 4px;
}
.preference p {
  font-size: 10px;
  line-height: 1.5;
  color: var(--muted);
  margin: 0;
}
.toggle {
  appearance: none;
  position: relative;
  width: 42px;
  height: 25px;
  border-radius: 99px;
  background: #dce4ee;
  transition: background 0.2s;
  flex: 0 0 auto;
  cursor: pointer;
}
.toggle:before {
  content: "";
  position: absolute;
  width: 19px;
  height: 19px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 5px #7890aa50;
  left: 3px;
  top: 3px;
  transition: transform 0.2s;
}
.toggle:checked {
  background: #2e8df3;
}
.toggle:checked:before {
  transform: translateX(17px);
}
.font-choices {
  display: flex;
  gap: 6px;
}
.font-choices button {
  padding: 8px 10px;
  border-radius: 10px;
  background: #eef3f9;
  color: #718096;
  font-size: 10px;
  font-weight: 750;
}
.font-choices button.active {
  color: #2d7dc8;
  background: #e6f2ff;
  border: 1px solid #cce4ff;
}
.dial-anchor {
  position: relative;
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
}
.dial-trigger {
  cursor: pointer;
  user-select: none;
}
.dial-popover {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 114px;
  height: 116px;
  border-radius: 16px;
  border: 1px solid #cbdfff;
  background: rgba(248, 251, 255, 0.98);
  backdrop-filter: blur(8px);
  box-shadow:
    0 14px 32px rgba(34, 58, 94, 0.16),
    inset 0 1px 0 #fff;
  overflow: hidden;
  z-index: 30;
  user-select: none;
  animation: dialPop 0.14s ease;
}
@keyframes dialPop {
  from {
    opacity: 0;
    transform: translateY(-50%) scale(0.94);
  }
  to {
    opacity: 1;
    transform: translateY(-50%) scale(1);
  }
}
.dial-popover::before,
.dial-popover::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 38px;
  pointer-events: none;
  z-index: 2;
}
.dial-popover::before {
  top: 0;
  background: linear-gradient(
    180deg,
    rgba(248, 251, 255, 0.96) 0%,
    rgba(248, 251, 255, 0) 100%
  );
}
.dial-popover::after {
  bottom: 0;
  background: linear-gradient(
    0deg,
    rgba(248, 251, 255, 0.96) 0%,
    rgba(248, 251, 255, 0) 100%
  );
}
.dial-highlight {
  position: absolute;
  left: 6px;
  right: 6px;
  top: 50%;
  height: 36px;
  transform: translateY(-50%);
  border-radius: 11px;
  background: #e7f0ff;
  border: 1px solid #cbdfff;
  box-shadow: 0 2px 4px rgba(62, 122, 211, 0.05);
  pointer-events: none;
  z-index: 1;
}
.dial-track {
  position: relative;
  z-index: 3;
  height: 100%;
  overflow-y: auto;
  scroll-snap-type: y mandatory;
  scrollbar-width: none;
  -ms-overflow-style: none;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  cursor: grab;
}
.dial-track:active {
  cursor: grabbing;
}
.dial-track::-webkit-scrollbar {
  display: none;
}
.dial-spacer {
  height: 40px;
}
.dial-item {
  width: 100%;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  scroll-snap-align: center;
  background: transparent;
  color: #8c9bae;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: -0.02em;
  padding: 0 8px;
  white-space: nowrap;
  transition:
    color 0.14s ease,
    transform 0.14s ease,
    font-size 0.14s ease;
}
.dial-item.active {
  color: var(--blue);
  font-size: 13px;
  font-weight: 850;
  transform: scale(1.04);
}
.inline-info {
  font-size: 10px;
  color: var(--muted);
  line-height: 1.7;
  margin: 13px 1px 0;
}
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(22px + env(safe-area-inset-bottom));
  transform: translate(-50%, 18px);
  opacity: 0;
  pointer-events: none;
  background: #202c3b;
  color: #fff;
  padding: 11px 15px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  box-shadow: 0 10px 30px #1f2f4450;
  transition:
    opacity 0.2s,
    transform 0.2s;
  z-index: 20;
  max-width: calc(100vw - 28px);
  text-align: center;
}
.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@media (min-width: 650px) {
  .app-shell {
    margin: 26px auto;
    min-height: min(900px, calc(100dvh - 52px));
  }
  .app-content {
    padding-left: 27px;
    padding-right: 27px;
  }
}
@media (max-width: 520px) {
  body {
    background: #edf2f8;
  }
  .app-shell {
    width: 100%;
    min-height: 100dvh;
    margin: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    padding-bottom: max(15px, env(safe-area-inset-bottom));
  }
  .app-content {
    padding: max(16px, env(safe-area-inset-top)) 19px 25px;
  }
  .hero {
    padding-top: 31px;
  }
  .hero h1 {
    font-size: 24px;
  }
  .mode-card {
    min-height: 80px;
  }
  .prompt-wrap h1 {
    font-size: 20px;
  }
  .answer-text {
    font-size: var(--answer-font);
  }
  .topbar {
    margin-bottom: 14px;
  }
  .quiz-progress {
    margin-bottom: 18px;
  }
}
@media (max-width: 360px) {
  .app-content {
    padding-left: 15px;
    padding-right: 15px;
  }
  .hero {
    padding-top: 23px;
  }
  .hero h1 {
    font-size: 22px;
  }
  .mode-card {
    padding: 12px;
    gap: 10px;
  }
  .mode-icon {
    width: 41px;
    height: 41px;
  }
  .mode-copy b {
    font-size: 14px;
  }
  .prompt-wrap h1 {
    font-size: 18px;
  }
  .grade-grid {
    gap: 5px;
  }
  .grade-btn {
    padding-left: 2px;
    padding-right: 2px;
  }
  .grade-btn b {
    font-size: 9px;
  }
  .summary-stat b {
    font-size: 9px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
  }
}
