:root {
  --ink: #19324d;
  --muted: #6d8293;
  --soft-muted: #91a4b2;
  --sky: #eef8fc;
  --sky-deep: #d9f1fb;
  --white: #fffdf9;
  --line: #dcebf2;
  --blue: #2f80ed;
  --blue-dark: #2467c0;
  --yellow: #ffd166;
  --yellow-soft: #fff4c9;
  --coral: #ff6b6b;
  --coral-soft: #fff0ed;
  --green: #42b883;
  --green-soft: #e4f7ed;
  --shadow: 0 18px 42px rgba(55, 100, 125, 0.12);
  --shadow-light: 0 8px 20px rgba(55, 100, 125, 0.1);
}

* { box-sizing: border-box; }

html { min-width: 320px; background: var(--sky); }

body {
  margin: 0;
  color: var(--ink);
  background: var(--sky);
  font-family: "Nunito", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

button { font: inherit; }
button:focus-visible { outline: 3px solid rgba(47, 128, 237, 0.36); outline-offset: 3px; }

.app-shell { min-height: 100vh; overflow: hidden; }

.topbar {
  width: min(1180px, calc(100% - 48px));
  min-height: 82px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand { display: inline-flex; align-items: center; gap: 11px; min-width: 0; }
.brand-mark { width: 45px; height: 45px; flex: 0 0 auto; }
.brand-mark svg { display: block; width: 100%; height: 100%; }
.brand-copy { display: grid; gap: 2px; }
.brand-copy strong { font-size: 18px; line-height: 1.15; letter-spacing: 0; }
.brand-copy span { color: var(--muted); font-size: 11px; line-height: 1.2; }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.streak-pill { height: 39px; padding: 0 13px; display: inline-flex; align-items: center; gap: 7px; border: 1px solid #f2df9c; background: var(--yellow-soft); color: #8a6919; border-radius: 20px; font-size: 13px; font-weight: 700; }
.streak-flame { color: #e7a800; font-size: 17px; line-height: 1; }
.streak-pill b { color: #b87900; font-size: 15px; }
.icon-button { width: 40px; height: 40px; display: inline-grid; place-items: center; border: 1px solid var(--line); background: rgba(255, 253, 249, 0.72); border-radius: 10px; color: var(--muted); cursor: pointer; transition: border-color .18s ease, color .18s ease, background .18s ease, transform .18s ease; }
.icon-button:hover { border-color: #b4d9e8; color: var(--blue); background: var(--white); transform: translateY(-1px); }
.icon-button svg { width: 21px; height: 21px; }
.sound-off-icon { display: none; }
.sound-is-off .sound-on-icon { display: none; }
.sound-is-off .sound-off-icon { display: block; }
.icon-button.subtle { font-size: 19px; color: var(--soft-muted); }

.welcome-band {
  width: min(1180px, calc(100% - 48px));
  min-height: 264px;
  margin: 0 auto 26px;
  padding: 27px 42px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  border: 1px solid #d7edf6;
  background: #e5f6fc;
  border-radius: 8px;
  position: relative;
  overflow: hidden;
}
.welcome-band::after { content: ""; position: absolute; width: 170px; height: 170px; right: 255px; top: -86px; border: 2px solid rgba(255,255,255,.54); border-radius: 50%; pointer-events: none; }
.welcome-copy { position: relative; z-index: 1; max-width: 610px; }
.eyebrow { margin: 0 0 10px; display: flex; align-items: center; gap: 8px; color: var(--blue-dark); font-size: 12px; font-weight: 800; letter-spacing: .04em; }
.eyebrow span { width: 8px; height: 8px; border-radius: 50%; background: var(--coral); box-shadow: 0 0 0 4px rgba(255,107,107,.14); }
h1 { margin: 0; font-size: clamp(30px, 4vw, 47px); line-height: 1.1; letter-spacing: 0; font-weight: 900; }
h1 em { color: var(--coral); font-style: normal; }
.welcome-note { margin: 13px 0 21px; color: #587486; font-size: 15px; line-height: 1.55; }
.mode-tabs { display: flex; align-items: center; gap: 8px; }
.mode-tab { min-height: 43px; padding: 0 14px; display: inline-flex; align-items: center; gap: 7px; border: 1px solid transparent; border-radius: 10px; background: rgba(255,255,255,.52); color: #678193; font-size: 13px; font-weight: 800; cursor: pointer; transition: all .18s ease; }
.mode-tab:hover { border-color: #b4dceb; color: var(--blue-dark); background: rgba(255,255,255,.85); }
.mode-tab.is-active { border-color: var(--blue); background: var(--blue); color: #fff; box-shadow: 0 7px 15px rgba(47,128,237,.2); }
.tab-icon { width: 20px; height: 20px; display: inline-grid; place-items: center; }
.tab-icon svg { width: 19px; height: 19px; }

.mascot-stage { width: 310px; min-height: 222px; margin-right: 6px; position: relative; display: grid; place-items: center; flex: 0 0 auto; }
.mascot { width: min(100%, 270px); height: auto; position: relative; z-index: 1; filter: drop-shadow(0 13px 8px rgba(42, 103, 133, .13)); animation: floaty 4s ease-in-out infinite; }
.orbit { position: absolute; border: 2px dashed rgba(47,128,237,.26); border-radius: 50%; transform: rotate(-14deg); }
.orbit-one { width: 225px; height: 78px; top: 84px; left: 41px; }
.orbit-two { width: 183px; height: 64px; top: 94px; left: 63px; border-color: rgba(255,107,107,.24); transform: rotate(23deg); }
.mascot-caption { position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); width: max-content; max-width: 100%; padding: 6px 11px; border: 1px solid #cfe8f2; background: rgba(255,253,249,.82); border-radius: 15px; color: #587486; font-size: 11px; font-weight: 800; z-index: 2; }
.mascot-caption span { color: #e7a800; }
@keyframes floaty { 0%,100% { transform: translateY(0) rotate(-1deg); } 50% { transform: translateY(-7px) rotate(1deg); } }

.view { width: min(1180px, calc(100% - 48px)); margin: 0 auto; }
.view[hidden] { display: none; }
.practice-layout { display: grid; grid-template-columns: minmax(0, 1.52fr) minmax(280px, .78fr); gap: 23px; align-items: start; }
.quiz-column { min-width: 0; }
.quiz-meta { margin: 0 3px 10px; display: grid; grid-template-columns: auto minmax(100px, 1fr) auto; align-items: center; gap: 13px; color: var(--muted); font-size: 12px; font-weight: 800; }
.progress-track { height: 8px; overflow: hidden; border-radius: 9px; background: #d9eaf1; }
.progress-track span { display: block; width: 10%; height: 100%; border-radius: inherit; background: var(--blue); transition: width .28s ease; }
.score-label { display: inline-flex; align-items: center; gap: 4px; color: #92701f; white-space: nowrap; }
.score-label b { color: #b87900; font-size: 15px; }
.star-mini { color: var(--yellow); font-size: 16px; text-shadow: 0 1px 0 #ce9d24; }

.question-card, .complete-card, .goal-panel, .table-column, .focus-card, .focus-challenge, .memory-card { border: 1px solid var(--line); background: var(--white); border-radius: 8px; box-shadow: var(--shadow-light); }
.question-card { min-height: 465px; padding: 29px 34px 25px; display: flex; flex-direction: column; align-items: center; }
.question-topline { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.question-left { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.question-chip { padding: 6px 10px; border-radius: 7px; background: var(--coral-soft); color: #d75b53; font-size: 11px; font-weight: 900; }
.question-whisper { color: var(--soft-muted); font-size: 12px; }
.hint-button { min-height: 31px; padding: 0 8px; display: inline-flex; align-items: center; gap: 4px; border: 1px solid #f0d98d; border-radius: 8px; background: #fff9df; color: #a47713; font-size: 11px; font-weight: 900; cursor: pointer; transition: border-color .18s ease, background .18s ease, color .18s ease, transform .18s ease; }
.hint-button:hover { border-color: #e7bd45; background: #fff4c4; color: #8e6712; transform: translateY(-1px); }
.hint-button[aria-expanded="true"] { border-color: #e6bd47; background: #ffedaa; color: #8e6712; }
.hint-button svg { width: 16px; height: 16px; }
.equation { margin: 39px 0 33px; display: flex; align-items: baseline; justify-content: center; gap: clamp(11px, 2.6vw, 23px); color: var(--ink); font-size: clamp(50px, 7.1vw, 76px); line-height: 1; font-weight: 900; letter-spacing: 0; }
.question-card.has-hint .equation { margin-bottom: 17px; }
.equation .operator { color: var(--blue); font-size: .69em; }
.equation .unknown { min-width: 70px; color: var(--coral); }
.hint-panel { width: min(100%, 560px); margin: -2px 0 21px; padding: 13px 14px 12px; border: 1px solid #f0dfad; border-radius: 8px; background: #fffaf0; box-shadow: 0 5px 12px rgba(162, 122, 30, .07); }
.hint-panel[hidden] { display: none; }
.hint-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.hint-label { color: #b17b11; font-size: 11px; font-weight: 900; }
.hint-heading strong { color: #795f25; font-size: 12px; }
.block-groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(105px, 1fr)); gap: 7px; margin-top: 10px; }
.block-group { min-width: 0; padding: 8px 7px 7px; border: 1px solid #f0e3bd; border-radius: 7px; background: rgba(255, 253, 246, .92); }
.block-group-label { display: block; margin-bottom: 6px; color: #9d8241; font-size: 10px; font-weight: 900; }
.block-row { display: flex; flex-wrap: wrap; gap: 3px; align-items: center; }
.math-block { width: 15px; height: 15px; flex: 0 0 auto; border: 1px solid #e1af2e; border-radius: 3px; background: #ffd166; box-shadow: 0 2px 0 #e9be54; }
.block-group:nth-child(4n + 2) .math-block { border-color: #e98a63; background: #ff9f68; box-shadow: 0 2px 0 #ed9a70; }
.block-group:nth-child(4n + 3) .math-block { border-color: #5aaeda; background: #6fc7ec; box-shadow: 0 2px 0 #71b5d6; }
.block-group:nth-child(4n + 4) .math-block { border-color: #55a878; background: #72c99a; box-shadow: 0 2px 0 #6db78d; }
.hint-bottom { margin-top: 11px; padding-top: 9px; display: flex; align-items: baseline; justify-content: space-between; gap: 9px; border-top: 1px dashed #ead7a1; }
.hint-bottom span { color: #8d7845; font-size: 11px; line-height: 1.45; }
.hint-bottom strong { color: #b17b11; font-size: 12px; white-space: nowrap; }
.answer-grid { width: min(100%, 530px); display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.answer-button { min-height: 73px; border: 2px solid #d8e8ef; border-radius: 11px; background: #fafdff; color: var(--ink); font-size: 28px; font-weight: 900; cursor: pointer; transition: transform .16s ease, border-color .16s ease, background .16s ease, color .16s ease, box-shadow .16s ease; }
.answer-button:hover:not(:disabled) { border-color: #8fcbea; background: #f0faff; transform: translateY(-3px); box-shadow: 0 8px 15px rgba(47,128,237,.13); }
.answer-button:active:not(:disabled) { transform: translateY(0); }
.answer-button:disabled { cursor: default; }
.answer-button.is-correct { border-color: var(--green); background: var(--green-soft); color: #24835b; box-shadow: 0 7px 13px rgba(66,184,131,.14); }
.answer-button.is-wrong { border-color: var(--coral); background: var(--coral-soft); color: #d2554d; animation: wobble .3s ease; }
.answer-button.is-reveal { border-color: #9ddbbd; background: #f3fcf7; color: #2b9a6a; }
@keyframes wobble { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
.feedback { min-height: 38px; margin-top: 19px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; color: var(--muted); font-size: 13px; font-weight: 800; }
.feedback-mark { color: var(--soft-muted); font-size: 10px; }
.feedback.is-good { color: #258a60; }
.feedback.is-good .feedback-mark { color: var(--green); font-size: 16px; }
.feedback.is-bad { color: #d2554d; }
.feedback.is-bad .feedback-mark { color: var(--coral); font-size: 16px; }
.next-button { min-width: 142px; min-height: 47px; margin-top: 3px; padding: 0 17px; display: inline-flex; justify-content: center; align-items: center; gap: 10px; border: 0; border-radius: 10px; background: var(--blue); color: #fff; font-size: 14px; font-weight: 900; cursor: pointer; box-shadow: 0 8px 15px rgba(47,128,237,.2); transition: background .18s ease, transform .18s ease; }
.next-button[hidden], .question-card[hidden] { display: none; }
.next-button:hover { background: var(--blue-dark); transform: translateY(-2px); }
.next-button svg { width: 17px; height: 17px; }

.complete-card { min-height: 465px; padding: 35px 24px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; position: relative; overflow: hidden; }
.complete-card[hidden] { display: none; }
.complete-star { width: 78px; height: 78px; display: grid; place-items: center; border: 6px solid #fff5c9; border-radius: 50%; background: var(--yellow); color: #fffdf5; font-size: 45px; line-height: 1; text-shadow: 0 2px 0 #e2ac29; box-shadow: 0 8px 0 #f1d980; }
.complete-kicker { margin: 25px 0 5px; color: var(--blue-dark); font-size: 13px; font-weight: 900; }
.complete-card h2 { margin: 0; font-size: 35px; line-height: 1.25; }
.complete-card h2 span { color: var(--coral); }
.complete-note { margin: 12px 0 25px; color: var(--muted); font-size: 14px; }
.complete-note strong { color: #b87900; }
.complete-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.primary-button, .secondary-button { min-height: 46px; padding: 0 15px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; border-radius: 10px; font-size: 13px; font-weight: 900; cursor: pointer; transition: transform .18s ease, background .18s ease, border-color .18s ease; }
.primary-button { border: 1px solid var(--blue); background: var(--blue); color: #fff; box-shadow: 0 7px 14px rgba(47,128,237,.19); }
.secondary-button { border: 1px solid #cfe4ec; background: #fff; color: var(--blue-dark); }
.primary-button:hover, .secondary-button:hover { transform: translateY(-2px); }
.primary-button:hover { background: var(--blue-dark); }
.secondary-button:hover { border-color: #8fcbea; background: #f4fbfe; }
.confetti { position: absolute; inset: 24px 30px auto; display: flex; justify-content: space-between; color: var(--coral); font-size: 18px; pointer-events: none; }
.confetti i { font-style: normal; }
.confetti i:nth-child(2), .confetti i:nth-child(4) { color: var(--blue); font-size: 22px; }
.confetti i:nth-child(3) { color: var(--yellow); }

.streak-banner { min-height: 48px; margin-top: 13px; padding: 0 17px; display: flex; align-items: center; gap: 9px; border: 1px solid #e5edf0; border-radius: 8px; background: rgba(255,253,249,.72); color: var(--muted); font-size: 12px; font-weight: 800; transition: background .2s ease, border-color .2s ease, color .2s ease; }
.streak-banner.is-hot { border-color: #f5dda0; background: #fff9e4; color: #956e13; }
.banner-icon { color: var(--yellow); font-size: 17px; }
.banner-stars { margin-left: auto; display: inline-flex; gap: 5px; color: #e1bd50; letter-spacing: 3px; }
.banner-stars i { font-style: normal; }

.goal-panel { padding: 23px 21px 18px; }
.panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.panel-kicker { margin: 0 0 5px; color: var(--soft-muted); font-size: 11px; font-weight: 900; letter-spacing: .05em; }
.panel-heading h2, .table-heading h2 { margin: 0; font-size: 21px; line-height: 1.25; }
.goal-count { min-width: 52px; padding: 7px 8px; border-radius: 7px; background: var(--yellow-soft); color: #a47713; font-size: 12px; font-weight: 900; text-align: center; }
.goal-progress { height: 8px; margin: 18px 0 15px; border-radius: 8px; background: #edf0ed; overflow: hidden; }
.goal-progress span { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--yellow); transition: width .28s ease; }
.goal-list { display: grid; gap: 2px; }
.goal-item { min-height: 43px; padding: 0 4px; display: grid; grid-template-columns: 24px 1fr auto; align-items: center; gap: 9px; color: var(--muted); border-bottom: 1px solid #edf3f5; font-size: 12px; font-weight: 800; }
.goal-item:last-child { border-bottom: 0; }
.goal-dot { width: 22px; height: 22px; display: grid; place-items: center; border: 1px solid #dbe8ed; border-radius: 50%; color: var(--soft-muted); font-size: 11px; }
.goal-item b { color: #c39a2e; font-size: 12px; }
.goal-item.is-done { color: #258a60; }
.goal-item.is-done .goal-dot { border-color: var(--green); background: var(--green); color: #fff; }
.goal-item.is-done b { color: var(--green); }
.table-link { width: 100%; min-height: 65px; margin-top: 17px; padding: 10px 10px; display: grid; grid-template-columns: 31px 1fr 17px; align-items: center; gap: 9px; border: 1px solid #cfe6ef; border-radius: 8px; background: #f3fbfe; color: var(--blue-dark); text-align: left; cursor: pointer; transition: border-color .18s ease, background .18s ease, transform .18s ease; }
.table-link:hover { border-color: #8fcbea; background: #eaf8fd; transform: translateY(-2px); }
.table-link-icon { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 8px; background: #d8f0fa; color: var(--blue); font-size: 19px; }
.table-link strong, .table-link small { display: block; }
.table-link strong { font-size: 12px; }
.table-link small { margin-top: 3px; color: #73909f; font-size: 10px; }
.table-link svg { width: 16px; height: 16px; }
.tip-note { margin-top: 18px; padding: 11px 12px; display: flex; align-items: flex-start; gap: 8px; border-left: 3px solid var(--yellow); background: #fffaf0; color: #8c763a; }
.tip-note > span { color: #e7ae25; font-size: 14px; line-height: 1.4; }
.tip-note p { margin: 0; font-size: 11px; line-height: 1.55; }

.table-layout { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(280px, .72fr); gap: 23px; align-items: start; }
.table-column { padding: 23px 23px 18px; min-width: 0; }
.table-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 18px; }
.table-actions { display: inline-flex; align-items: center; gap: 7px; }
.small-button { min-height: 38px; padding: 0 11px; display: inline-flex; align-items: center; gap: 6px; border: 1px solid #cfe4ec; border-radius: 9px; background: #fff; color: var(--blue-dark); font-size: 11px; font-weight: 900; cursor: pointer; transition: all .18s ease; }
.small-button:hover { border-color: #8fcbea; background: #f2fbfe; transform: translateY(-1px); }
.small-button span { color: var(--yellow); font-size: 15px; }
.table-wrap { width: 100%; overflow-x: auto; padding-bottom: 3px; }
.multiplication-table { width: 100%; min-width: 640px; table-layout: fixed; border-collapse: separate; border-spacing: 4px; }
.multiplication-table th, .multiplication-table td { height: 55px; padding: 0; text-align: center; }
.multiplication-table thead th { color: #688695; font-size: 12px; font-weight: 900; }
.multiplication-table thead th:first-child { width: 44px; }
.multiplication-table tbody th { color: var(--blue-dark); font-size: 15px; font-weight: 900; }
.table-cell { width: 100%; height: 55px; padding: 0; border: 1px solid #dcebf1; border-radius: 6px; background: #fbfeff; color: var(--ink); font-size: 17px; font-weight: 900; cursor: pointer; transition: border-color .14s ease, background .14s ease, color .14s ease, transform .14s ease; }
.table-cell:hover, .table-cell:focus-visible { border-color: #8fcbea; background: #effaff; color: var(--blue-dark); transform: translateY(-1px); position: relative; z-index: 1; }
.table-cell.is-row, .table-cell.is-col { background: #f5fbfd; border-color: #c4e5f1; }
.table-cell.is-selected { border: 2px solid var(--coral); background: var(--coral-soft); color: #d2554d; box-shadow: 0 5px 10px rgba(255,107,107,.15); }
.multiplication-table th.is-axis { color: var(--coral); }
.table-footnote { margin: 13px 2px 0; color: var(--soft-muted); font-size: 11px; font-weight: 800; }
.table-footnote span { color: var(--coral); font-size: 14px; }
.focus-panel { display: grid; gap: 12px; }
.focus-card { min-height: 214px; padding: 21px 18px; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; background: #fffdf9; position: relative; overflow: hidden; }
.focus-card::before { content: ""; position: absolute; width: 170px; height: 170px; top: -105px; right: -70px; border: 2px solid #f5e7b1; border-radius: 50%; }
.focus-sparkles { margin-bottom: 19px; color: var(--yellow); font-size: 16px; letter-spacing: 5px; }
.focus-equation { display: flex; align-items: baseline; gap: 8px; color: var(--ink); font-size: 37px; font-weight: 900; line-height: 1; }
.focus-equation b { color: var(--blue); font-size: 27px; }
.focus-equation strong { color: var(--coral); }
.focus-read { min-height: 21px; margin: 17px 0 0; color: var(--muted); font-size: 12px; font-weight: 800; }
.focus-challenge { min-height: 70px; padding: 10px 12px; display: grid; grid-template-columns: 33px 1fr 17px; align-items: center; gap: 9px; border-color: #cfe6ef; background: #f3fbfe; color: var(--blue-dark); text-align: left; cursor: pointer; transition: all .18s ease; }
.focus-challenge:not(:disabled):hover { border-color: #8fcbea; background: #eaf8fd; transform: translateY(-2px); }
.focus-challenge:disabled { opacity: .56; cursor: not-allowed; }
.focus-challenge-icon { width: 31px; height: 31px; display: grid; place-items: center; border-radius: 8px; background: #d8f0fa; color: var(--blue); font-size: 19px; font-weight: 900; }
.focus-challenge strong, .focus-challenge small { display: block; }
.focus-challenge strong { font-size: 12px; }
.focus-challenge small { margin-top: 3px; color: #73909f; font-size: 10px; }
.focus-challenge svg { width: 16px; height: 16px; }
.memory-card { min-height: 82px; padding: 13px; display: flex; align-items: flex-start; gap: 10px; background: #fffaf0; border-color: #f3e4b8; box-shadow: none; }
.memory-icon { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 8px; background: #ffe8a1; color: #c18b16; font-size: 15px; }
.memory-card strong { display: block; color: #92701f; font-size: 12px; }
.memory-card p { margin: 4px 0 0; color: #9b8753; font-size: 11px; line-height: 1.45; }

.footer-note { width: min(1180px, calc(100% - 48px)); margin: 26px auto 24px; color: #94a9b4; text-align: center; font-size: 11px; font-weight: 800; }
.footer-note span { color: #e9bd45; margin: 0 5px; }

.celebrate .question-card, .celebrate .complete-card { animation: pop-in .36s ease; }
@keyframes pop-in { 0% { transform: scale(.985); } 65% { transform: scale(1.012); } 100% { transform: scale(1); } }

@media (max-width: 960px) {
  .welcome-band { padding-left: 30px; padding-right: 24px; }
  .mascot-stage { width: 255px; transform: scale(.9); transform-origin: right center; margin-right: -12px; }
  .practice-layout, .table-layout { grid-template-columns: 1fr; }
  .goal-panel, .focus-panel { max-width: none; }
  .goal-panel { display: grid; grid-template-columns: 1fr 1fr; column-gap: 24px; align-items: start; }
  .goal-panel .panel-heading, .goal-panel .goal-progress, .goal-panel .goal-list { grid-column: 1; }
  .goal-panel .table-link, .goal-panel .tip-note { grid-column: 2; }
  .goal-panel .table-link { margin-top: 0; }
  .goal-panel .tip-note { margin-top: 10px; }
}

@media (max-width: 650px) {
  .topbar, .welcome-band, .view, .footer-note { width: min(100% - 28px, 560px); }
  .topbar { min-height: 72px; }
  .brand-copy span { display: none; }
  .brand-copy strong { font-size: 16px; }
  .streak-pill { height: 35px; padding: 0 10px; font-size: 11px; }
  .streak-pill b { font-size: 13px; }
  .icon-button { width: 36px; height: 36px; }
  .welcome-band { min-height: 0; margin-bottom: 19px; padding: 23px 20px 18px; display: block; }
  .welcome-band::after { right: -45px; top: -104px; }
  .welcome-note { max-width: 290px; margin-bottom: 17px; font-size: 13px; }
  h1 { font-size: 31px; }
  .mode-tab { min-height: 40px; padding: 0 11px; font-size: 12px; }
  .mascot-stage { width: 235px; min-height: 160px; margin: -5px auto -9px; transform: scale(.8); transform-origin: center; }
  .question-card { min-height: 430px; padding: 22px 15px 19px; }
  .question-whisper { font-size: 11px; }
  .question-whisper { display: none; }
  .equation { margin: 34px 0 29px; font-size: 58px; gap: 12px; }
  .equation .unknown { min-width: 54px; }
  .hint-panel { padding: 12px 11px 11px; }
  .block-groups { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
  .math-block { width: 14px; height: 14px; }
  .hint-bottom { align-items: flex-start; flex-direction: column; gap: 2px; }
  .answer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .answer-button { min-height: 66px; font-size: 26px; }
  .feedback { margin-top: 14px; }
  .next-button { min-height: 45px; }
  .quiz-meta { gap: 8px; font-size: 11px; }
  .goal-panel { display: block; padding: 19px 16px 15px; }
  .goal-panel .table-link { margin-top: 15px; }
  .goal-panel .tip-note { margin-top: 14px; }
  .table-column { padding: 18px 12px 15px; }
  .table-heading { align-items: flex-start; }
  .table-heading h2 { font-size: 19px; }
  .small-button { font-size: 10px; padding: 0 8px; }
  .multiplication-table { min-width: 575px; border-spacing: 3px; }
  .multiplication-table th, .multiplication-table td, .table-cell { height: 49px; }
  .table-cell { font-size: 15px; }
  .focus-card { min-height: 196px; }
  .focus-equation { font-size: 34px; }
  .complete-card { min-height: 430px; }
  .complete-card h2 { font-size: 31px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
