:root {
  --ink: #203329;
  --muted: #59685f;
  --paper: #e9f6ff;
  --card: #fffdf0;
  --line: #26392f;
  --sun: #ffd85a;
  --mint: #bce784;
  --mint-dark: #397b34;
  --coral: #ff8b68;
  --lavender: #d8d2ff;
  --sky: #8dd1f1;
  --dirt: #704735;
  --stone: #d9dedb;
  --shadow: 8px 8px 0 rgba(31, 51, 40, .20);
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background-color: var(--paper); background-image: linear-gradient(rgba(255,255,255,.42) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.42) 1px, transparent 1px), linear-gradient(var(--sky) 0 185px, transparent 185px); background-size: 24px 24px, 24px 24px, 100% 100%; font: 16px/1.5 ui-rounded, "Trebuchet MS", system-ui, sans-serif; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
.topbar { min-height: 82px; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 0 max(24px, calc((100vw - 1120px)/2)); background: #31582d; color: white; border-bottom: 10px solid var(--dirt); box-shadow: 0 5px 0 #4f3226; }
.brand { border: 0; background: none; color: white; font-family: ui-monospace, "Cascadia Mono", monospace; font-size: 1.25rem; font-weight: 900; display: flex; gap: 10px; align-items: center; text-shadow: 2px 2px 0 #1b3218; }
.brand span { display: grid; place-items: center; width: 40px; height: 40px; border: 3px solid #213d1e; border-radius: 3px; background: #69a944; color: white; box-shadow: inset -6px -6px 0 #4b8635, 4px 4px 0 #1f381c; }
nav { display: flex; gap: 6px; }
.nav-link { color: white; border: 2px solid transparent; background: transparent; padding: 9px 12px; border-radius: 3px; font-weight: 850; }
.nav-link.active, .nav-link:hover { background: #487943; border-color: #8fc867; color: white; box-shadow: 3px 3px 0 #1f381c; }
main { width: min(1120px, calc(100% - 32px)); margin: 0 auto; padding: 42px 0 72px; }
.home-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(280px, .75fr); gap: 24px; align-items: stretch; }
.card { background: var(--card); border: 3px solid var(--line); border-radius: 5px; box-shadow: var(--shadow); }
.hero-card { min-height: 420px; padding: clamp(28px, 5vw, 54px); display: flex; flex-direction: column; justify-content: center; position: relative; overflow: hidden; }
.hero-card::after { content: "A_"; position: absolute; right: 16px; bottom: -24px; font: 900 9rem/1 ui-monospace, monospace; color: #e8f3d2; z-index: 0; }
.hero-card > * { position: relative; z-index: 1; }
.eyebrow { margin: 0 0 12px; text-transform: uppercase; letter-spacing: .09em; font: 900 .82rem/1.4 ui-monospace, "Cascadia Mono", monospace; color: var(--mint-dark); }
h1, h2, h3, p { margin-top: 0; }
h1 { max-width: 700px; margin-bottom: 12px; font: 900 clamp(2.2rem, 6vw, 4.2rem)/1.02 ui-monospace, "Cascadia Mono", monospace; letter-spacing: -.045em; }
.lead { color: var(--muted); font-size: 1.08rem; max-width: 580px; }
.primary, .secondary, .quiet { border-radius: 3px; min-height: 50px; padding: 11px 18px; font-weight: 900; border: 3px solid transparent; }
.primary { background: #3f7f39; border-color: #244b21; color: white; box-shadow: 5px 5px 0 #1e3d1b; }
.primary:hover { transform: translate(-1px, -1px); box-shadow: 6px 6px 0 #1e3d1b; }
.secondary { background: #fffdf0; color: var(--ink); border-color: var(--line); box-shadow: 3px 3px 0 rgba(31,51,40,.22); }
.quiet { background: transparent; color: var(--ink); border-color: transparent; }
button:disabled { opacity: .48; cursor: not-allowed; transform: none !important; box-shadow: none !important; }
.action-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 22px; }
.side-stack { display: grid; gap: 18px; }
.mini-card { padding: 24px; box-shadow: none; }
.pet-home-card { width: 100%; display: grid; grid-template-columns: 104px 1fr; gap: 14px; align-items: center; padding: 12px 16px; text-align: left; color: var(--ink); background: #e4d9ff; border-color: #5d4fa2; box-shadow: 4px 4px 0 #5d4fa2; }
.pet-home-card span { display: grid; min-width: 0; }
.pet-home-card small { color: #57458d; font: 900 .72rem/1.3 ui-monospace, monospace; text-transform: uppercase; letter-spacing: .06em; }
.pet-home-card strong { font-size: 1rem; }
.pet-home-card em { margin-top: 4px; color: var(--muted); font-size: .78rem; font-style: normal; font-weight: 750; line-height: 1.25; }
.pet-sprite { --pet-row: 0; --gear-column: 0; flex: 0 0 auto; background: url("pet-atlas.png") no-repeat; background-size: 700% 300%; background-position: calc(var(--gear-column) * 16.6667%) calc(var(--pet-row) * 50%); image-rendering: pixelated; }
.pet-home { width: 96px; height: 96px; }
.pet-stage { width: min(310px, 76vw); height: min(310px, 76vw); }
.pet-picker { width: 116px; height: 116px; }
.pet-gear { width: 94px; height: 94px; }
.pet-choice { width: 112px; height: 112px; }
.pet-practice { width: 68px; height: 68px; }
.pet-feedback { width: 100px; height: 100px; margin: -22px auto 2px; }
.pet-reward { width: 142px; height: 142px; }
.pet-idle { animation: pet-idle 2.8s steps(2, end) infinite; }
.pet-happy { animation: pet-happy .55s steps(3, end) 2; }
.pet-celebration { animation: pet-celebration .72s steps(4, end) 2; }
@keyframes pet-idle { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
@keyframes pet-happy { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes pet-celebration { 0%, 100% { transform: translateY(0) rotate(0); } 35% { transform: translateY(-14px) rotate(-3deg); } 70% { transform: translateY(-5px) rotate(3deg); } }
.mini-card.sun { background: var(--sun); border-color: #7a5c18; }
.mini-card h2 { margin-bottom: 6px; font-size: 1.2rem; }
.day-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; margin-top: 16px; }
.day { text-align: center; padding: 9px 5px; border: 2px solid rgba(38,57,47,.45); border-radius: 2px; background: rgba(255,255,255,.55); font-weight: 900; font-size: .82rem; }
.day.current { background: #3f7f39; border-color: #244b21; color: white; box-shadow: 3px 3px 0 #244b21; }
.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 16px; }
.stat { border-radius: 14px; padding: 12px 8px; text-align: center; background: #f3f6f4; }
.stat strong { display: block; font-size: 1.55rem; }
.stat span { color: var(--muted); font-size: .75rem; font-weight: 750; }
.empty-note { color: var(--muted); }
.privacy-note { margin: 26px 0 0; color: var(--muted); font-size: .86rem; font-weight: 700; }
.muted { color: var(--muted); }
.microcopy { color: var(--muted); font-size: .82rem; margin: 12px 0 0; }
.week-switcher { width: 100%; display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 18px 20px; text-align: left; color: var(--ink); border: 1px solid var(--line); background: white; border-radius: 18px; }
.week-switcher span { color: var(--muted); font-size: .78rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.week-switcher strong { grid-column: 1; }
.week-switcher b { grid-column: 2; grid-row: 1 / 3; align-self: center; color: var(--mint-dark); }
.page-heading { margin: 6px 0 28px; }
.pet-studio-heading { display: flex; justify-content: space-between; gap: 28px; align-items: end; margin: 4px 0 28px; }
.pet-studio-heading h1 { margin-bottom: 8px; }
.next-reward { width: min(330px, 100%); display: grid; gap: 4px; padding: 16px 18px; border: 3px solid #5d4fa2; background: #e4d9ff; box-shadow: 4px 4px 0 #5d4fa2; }
.next-reward b { color: #57458d; font: 900 .78rem/1.2 ui-monospace, monospace; text-transform: uppercase; letter-spacing: .08em; }
.next-reward span { font-weight: 800; }
.pet-studio-layout { display: grid; grid-template-columns: minmax(300px, .7fr) minmax(0, 1.3fr); gap: 24px; align-items: start; }
.pet-stage { position: sticky; top: 20px; width: 100%; min-height: 560px; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 30px; overflow: hidden; text-align: center; background: linear-gradient(#8dd1f1 0 65%, #9bc56c 65% 76%, #704735 76%); }
.pet-stage .pet-stage { position: relative; top: auto; width: min(310px, 76vw); min-height: 0; padding: 0; overflow: visible; background-color: transparent; background-image: url("pet-atlas.png"); background-repeat: no-repeat; background-size: 700% 300%; }
.pet-stage .eyebrow, .pet-stage h2, .pet-stage p, .pet-stage button { position: relative; z-index: 2; }
.pet-stage h2 { margin: 2px 0; font: 900 2rem/1.1 ui-monospace, monospace; }
.pet-stage p { margin-bottom: 10px; font-weight: 800; }
.pixel-platform { position: absolute; left: 12%; right: 12%; bottom: 126px; height: 18px; background: #58783f; border: 3px solid #2d4828; box-shadow: 0 10px 0 #704735; }
.pet-collection { display: grid; gap: 24px; }
.collection-card { padding: 24px; box-shadow: none; }
.collection-card .section-title > span { color: var(--muted); font-weight: 800; }
.pet-picker { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; width: auto; height: auto; margin-top: 18px; }
.pet-pick { min-width: 0; display: grid; place-items: center; padding: 10px 6px 12px; color: var(--ink); border: 3px solid var(--line); background: #f7f7ed; box-shadow: 3px 3px 0 rgba(31,51,40,.22); }
.pet-pick.selected, .gear-card.selected { border-color: #5d4fa2; background: #e4d9ff; box-shadow: 4px 4px 0 #5d4fa2; }
.pet-pick strong, .pet-pick small { display: block; }
.pet-pick small { min-height: 32px; color: var(--muted); font-size: .72rem; line-height: 1.2; }
.pet-pick.locked, .gear-card.locked { filter: grayscale(.7); background: #eef0eb; }
.gear-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 18px; }
.gear-card { min-width: 0; display: grid; grid-template-columns: 92px 1fr; align-items: center; gap: 8px; padding: 8px; text-align: left; color: var(--ink); border: 3px solid var(--line); background: #fffdf0; }
.gear-card span { min-width: 0; display: grid; gap: 4px; }
.gear-card small { color: var(--muted); font-size: .72rem; line-height: 1.2; }
.reward-choice-card { margin-bottom: 24px; padding: 24px; border-color: #735b20; background: #fff1a8; box-shadow: 6px 6px 0 #735b20; }
.reward-choice-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 18px; }
.reward-option { display: grid; place-items: center; padding: 8px 8px 14px; color: var(--ink); border: 3px solid var(--line); background: white; box-shadow: 3px 3px 0 rgba(31,51,40,.25); }
.reward-option:hover { transform: translateY(-2px); }
.practice-buddy { position: absolute; right: 14px; top: 10px; opacity: .9; }
.reward-moment { display: grid; grid-template-columns: 150px 1fr; gap: 14px; align-items: center; margin: 24px 0; padding: 16px 20px; border: 3px solid #5d4fa2; background: #e4d9ff; box-shadow: 5px 5px 0 #5d4fa2; }
.reward-moment h2 { margin: 2px 0 4px; font-family: ui-monospace, monospace; }
.reward-moment p { margin-bottom: 8px; }
.compact-choices { margin-top: 10px; }
.page-heading h1 { font-size: clamp(2.25rem, 5vw, 4rem); margin-bottom: 10px; }
.setup-layout { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(280px, .72fr); gap: 24px; align-items: start; }
.form-card { padding: clamp(22px, 4vw, 36px); box-shadow: none; }
.form-card > label:not(.check-row), .config-grid label { display: flex; justify-content: space-between; gap: 12px; margin: 20px 0 8px; font-weight: 850; }
.form-card > label:first-child { margin-top: 0; }
input, textarea, select { width: 100%; color: var(--ink); background: #fbfcfb; border: 2px solid var(--line); border-radius: 13px; padding: 13px 14px; outline: none; }
input:focus, textarea:focus, select:focus { border-color: var(--mint-dark); box-shadow: 0 0 0 4px rgba(20,114,95,.12); }
textarea { resize: vertical; }
.form-card .primary { margin-top: 22px; }
.form-error { min-height: 24px; color: #aa3425; font-weight: 800; margin: 10px 0 0; }
.example-list, .mode-buttons, .backup-buttons { display: grid; gap: 10px; margin-top: 16px; }
.voice-card label { display: block; margin: 14px 0 7px; font-weight: 850; }
.voice-card select { margin-bottom: 10px; }
.safety-card { background: var(--lavender); border-color: transparent; }
.verify-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; }
.section-title { display: flex; justify-content: space-between; gap: 18px; align-items: center; }
.section-title h2 { margin: 0; }
.compact { min-height: 40px; padding: 7px 12px; }
.verify-words { columns: 2; column-gap: 24px; padding-left: 26px; }
.verify-words li { break-inside: avoid; padding: 7px 0; border-bottom: 1px solid var(--line); font-weight: 800; }
.verify-words li span { display: inline-block; min-width: 75%; }
.speak-mini { float: right; border: 0; background: transparent; padding: 1px 4px; }
.check-row { display: flex; align-items: flex-start; gap: 10px; margin-top: 24px; padding: 16px; background: #f2f6f3; border-radius: 14px; font-weight: 800; }
.check-row input { width: 22px; height: 22px; flex: 0 0 auto; }
.sentence-check { padding: 20px 0; border-bottom: 1px solid var(--line); }
.sentence-check p { font-size: 1.1rem; margin: 8px 0 12px; }
.full { width: 100%; }
.verify-sentences .quiet { margin-top: 6px; }
.practice-shell { min-height: calc(100vh - 185px); display: grid; align-content: center; width: min(780px, 100%); margin: 0 auto; }
.practice-top { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 16px; margin-bottom: 18px; }
.back-button { padding-left: 0; }
.progress-track { height: 10px; background: #dfe7e2; border-radius: 999px; overflow: hidden; }
.progress-track span { display: block; height: 100%; background: var(--mint-dark); border-radius: inherit; transition: width .3s ease; }
.question-card { min-height: 440px; padding: clamp(28px, 6vw, 58px); text-align: center; }
.review-shell { align-content: start; padding-top: 30px; }
.review-choice-card, .review-word-card { padding: clamp(28px, 6vw, 56px); }
.review-choice-card h1 { font-size: clamp(2.1rem, 5vw, 3.6rem); }
.review-choice-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 28px; }
.review-choice-grid button { min-height: 132px; display: grid; align-content: center; gap: 7px; text-align: left; }
.review-choice-grid strong { font-size: 1.12rem; }
.review-choice-grid span { color: var(--muted); font-weight: 700; }
.review-word-card { min-height: 500px; text-align: center; }
.review-word-card h1 { margin: 28px 0 10px; font-size: clamp(3.4rem, 10vw, 6.8rem); overflow-wrap: anywhere; }
.word-chunks { margin: 0 0 24px; color: var(--muted); font: 900 clamp(1.3rem, 3vw, 2rem)/1.4 ui-monospace, "Cascadia Mono", monospace; letter-spacing: .02em; }
.word-chunks span { color: #aa6a24; padding-inline: 3px; }
.notice-box { width: min(570px, 100%); margin: 26px auto 20px; padding: 18px 20px; border: 3px solid #745b1d; background: #fff3ad; text-align: left; }
.notice-box > b { display: block; margin-bottom: 5px; color: #725719; font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; }
.notice-box p { margin: 0; font-size: 1.08rem; }
.quiet-notice { border-color: #77847d; background: #f2f6f3; }
.review-listen { padding: 13px 18px; margin-top: 18px; }
.review-controls { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 30px; }
.review-finish-actions { justify-content: center; }
.listen-button { width: min(330px, 100%); margin: 12px auto; padding: 20px; display: flex; justify-content: center; align-items: center; gap: 12px; border: 0; border-radius: 20px; color: var(--ink); background: var(--sun); box-shadow: 0 7px 0 #d8aa39; font-size: 1.12rem; }
.listen-button span { font-size: 1.55rem; }
.slower-button { border: 0; background: transparent; color: var(--muted); font-weight: 800; padding: 8px 14px; }
.answer-form { margin: 30px auto 0; width: min(560px, 100%); display: grid; gap: 14px; }
.answer-form input { padding: 18px; text-align: center; font-size: 1.6rem; font-weight: 750; }
.answer-form textarea { padding: 16px; font-size: 1.15rem; }
.keyboard-hint { color: var(--muted); font-size: .8rem; margin: 12px 0 0; }
.feedback-card { padding: clamp(32px, 7vw, 62px); text-align: center; }
.feedback-card h1 { margin-inline: auto; max-width: 660px; font-size: clamp(2.1rem, 5vw, 3.8rem); }
.success-mark { width: 74px; height: 74px; margin: 0 auto 20px; display: grid; place-items: center; border-radius: 50%; background: var(--mint); color: var(--mint-dark); font-size: 2.2rem; font-weight: 900; }
.neutral-card { background: var(--lavender); }
.compare-box { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; text-align: left; margin: 28px 0 20px; }
.compare-box > div { background: #f2f5f3; border-radius: 15px; padding: 16px; overflow-wrap: anywhere; }
.compare-box span, .sentence-compare > span { display: block; color: var(--muted); font-size: .76rem; text-transform: uppercase; letter-spacing: .08em; font-weight: 850; }
.compare-box strong { display: block; font-size: 1.5rem; margin-top: 4px; }
mark { background: var(--sun); color: inherit; border-radius: 4px; padding: 0 2px; }
.wrong-mark { background: #ffb3a8; color: #7d1f15; box-shadow: inset 0 -3px 0 #df4c3b; }
.missing-mark { font-size: .75em; padding-inline: 4px; }
.hint { padding: 14px 16px; background: #fff7dc; border-radius: 12px; text-align: left; font-weight: 750; }
.supported-form { text-align: left; margin-top: 24px; }
.supported-form label { display: block; font-weight: 850; margin-bottom: 8px; }
.supported-form > div { display: grid; grid-template-columns: 1fr auto; gap: 10px; }
.sentence-compare { display: grid; gap: 6px; text-align: left; padding: 18px; background: #f2f5f3; border-radius: 16px; }
.sentence-compare p { margin: 0 0 10px; }
.target-sentence { font-weight: 850; }
.issue-list { list-style: none; padding: 0; display: grid; gap: 9px; text-align: left; margin: 18px 0 24px; }
.issue-list li { display: grid; grid-template-columns: 130px 1fr; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; }
.issue-list b { text-transform: capitalize; }
.finish-wrap { width: min(760px, 100%); margin: 40px auto; }
.finish-card { padding: clamp(32px, 7vw, 62px); }
.finish-burst { width: 80px; height: 80px; display: grid; place-items: center; border-radius: 22px; background: var(--sun); font-size: 2rem; font-weight: 900; transform: rotate(-4deg); margin-bottom: 25px; }
.finish-card h1 { font-size: clamp(2.3rem, 5vw, 4rem); }
.finish-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 26px 0; }
.finish-stats.assessment-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.finish-stats > div { padding: 16px; border: 1px solid var(--line); border-radius: 14px; }
.finish-stats strong { display: block; font-size: 1.7rem; }
.finish-stats span { color: var(--muted); font-size: .82rem; font-weight: 800; }
.review-list { background: #fff0ec; border-radius: 15px; padding: 16px; }
.review-list p { margin: 6px 0 0; }
.parent-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; }
.testbed-card { margin-bottom: 24px; padding: clamp(22px, 4vw, 34px); box-shadow: none; }
.testbed-card h2 { margin-bottom: 6px; font-family: ui-monospace, "Cascadia Mono", monospace; }
.testbed-card form { margin-top: 20px; }
.testbed-fields { display: grid; grid-template-columns: minmax(220px, .7fr) minmax(320px, 1.3fr); gap: 18px; align-items: start; }
.testbed-fields label { display: grid; gap: 7px; font-weight: 850; }
.testbed-card .primary { margin-top: 18px; }
.daily-testbed-card { border-color: #8d7be5; background: linear-gradient(135deg, #fff 0%, #f6f2ff 100%); }
.daily-testbed-fields { display: grid; grid-template-columns: minmax(250px, .85fr) minmax(320px, 1.15fr); gap: 18px; align-items: start; }
.daily-testbed-fields label, .daily-sentence-fields { display: grid; gap: 8px; font-weight: 850; }
.daily-sentence-fields { gap: 16px; }
.daily-testbed-actions { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 18px; }
.daily-testbed-actions .primary { margin-top: 0; }
.parent-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(280px, .6fr); gap: 24px; align-items: start; }
.status-board { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; overflow: hidden; box-shadow: none; }
.status-column { padding: 22px; background: white; }
.status-column.learning { background: #fffaf0; }
.status-column.stubborn { background: #fff0ec; }
.status-column.solid { background: #edf8f3; }
.status-head { display: flex; justify-content: space-between; align-items: center; }
.status-head h2 { font-size: 1.1rem; }
.status-head span { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; background: rgba(255,255,255,.8); font-weight: 900; }
.pill-list { display: grid; gap: 7px; }
.pill-list button { display: flex; justify-content: space-between; gap: 8px; width: 100%; padding: 9px 10px; text-align: left; border: 1px solid rgba(23,60,58,.1); background: rgba(255,255,255,.7); color: var(--ink); border-radius: 10px; font-weight: 750; }
.pill-list small { color: var(--muted); }
.dictation-board { margin-top: 24px; padding: clamp(22px, 4vw, 34px); box-shadow: none; }
.dictation-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 22px; }
.dictation-columns > div { min-width: 0; padding: 20px; border: 2px solid var(--line); background: white; }
.dictation-columns h3 { font: 900 1.05rem/1.3 ui-monospace, "Cascadia Mono", monospace; }
.dictation-spelling-list { display: flex; flex-wrap: wrap; gap: 8px; }
.dictation-spelling-list span { display: grid; gap: 1px; padding: 8px 11px; border: 2px solid #9c5d25; background: #fff5bd; }
.dictation-spelling-list small, .dictation-grammar-list small { color: var(--muted); font-weight: 750; }
.dictation-grammar-list { list-style: none; display: grid; gap: 8px; padding: 0; }
.dictation-grammar-list li { display: grid; grid-template-columns: 125px 1fr auto; gap: 10px; padding: 9px 11px; border: 1px solid rgba(23,60,58,.22); }
.dictation-grammar-list b { text-transform: capitalize; }
.dictation-next { padding: 12px 14px; background: #fff5bd; border: 2px solid #9c5d25; font-weight: 800; text-align: left; }
.upload-label { display: block; text-align: center; }
.upload-label input { display: none; }
.history-card, .config-card { margin-top: 24px; padding: clamp(22px, 4vw, 34px); box-shadow: none; }
.revision-card { margin-top: 24px; padding: clamp(22px, 4vw, 30px); border-color: #4d4779; background: #f2efff; box-shadow: none; }
.revision-current { display: flex; justify-content: space-between; gap: 24px; align-items: center; }
.revision-current h2 { margin-bottom: 4px; font: 900 1.45rem/1.2 ui-monospace, "Cascadia Mono", monospace; }
.revision-current p { margin: 0; color: var(--muted); font-weight: 750; }
.revision-badge { flex: 0 0 auto; padding: 8px 12px; border: 3px solid #4d4779; background: white; color: #4d4779; box-shadow: 3px 3px 0 #4d4779; font: 900 .9rem/1 ui-monospace, monospace; }
.revision-card details { margin-top: 20px; padding-top: 16px; border-top: 2px solid rgba(77,71,121,.24); }
.revision-card summary { cursor: pointer; font-weight: 900; }
.revision-scheme { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 16px 0; }
.revision-scheme p { margin: 0; padding: 12px; border: 2px solid rgba(77,71,121,.35); background: white; font-size: .84rem; }
.revision-scheme b { display: block; color: #4d4779; font-family: ui-monospace, monospace; text-transform: uppercase; }
.revision-history { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.revision-history li { padding: 14px 2px; border-top: 1px solid rgba(77,71,121,.24); }
.revision-history li > div { display: flex; gap: 9px; align-items: center; }
.revision-history time { margin-left: auto; color: var(--muted); font-size: .78rem; font-weight: 750; }
.revision-history strong { display: block; margin-top: 5px; }
.revision-history p { margin: 2px 0 0; color: var(--muted); font-size: .88rem; }
.current-revision { padding: 3px 6px; background: #4d4779; color: white; font-size: .68rem; font-weight: 900; text-transform: uppercase; }
.attempt-list { display: grid; gap: 12px; margin-top: 20px; }
.attempt-card { border: 1px solid var(--line); border-left: 5px solid #bd744d; border-radius: 4px; padding: 14px; background: #fff; }
.attempt-card.pass { border-left-color: var(--green); }
.attempt-head, .attempt-answers { display: flex; justify-content: space-between; gap: 16px; align-items: start; }
.attempt-head { margin-bottom: 10px; }
.attempt-answers > div { flex: 1; min-width: 0; }
.attempt-answers small { display: block; color: var(--muted); margin-bottom: 3px; }
.attempt-answers strong, .attempt-answers code { display: block; font: inherit; font-weight: 750; white-space: pre-wrap; overflow-wrap: anywhere; }
.attempt-meta, .attempt-reason { margin: 8px 0 0; font-size: .88rem; color: var(--muted); }
.attempt-reason { color: var(--ink); }
.history-table { display: grid; margin-top: 20px; }
.history-row { display: grid; grid-template-columns: 125px minmax(130px, 1fr) minmax(140px, 1fr) 110px; gap: 12px; align-items: center; padding: 11px 8px; border-top: 1px solid var(--line); }
.history-header { color: var(--muted); font-size: .78rem; text-transform: uppercase; letter-spacing: .07em; font-weight: 850; }
.answer-cell { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.result { font-size: .78rem; font-weight: 850; padding: 5px 8px; border-radius: 999px; text-align: center; }
.result.pass { background: var(--mint); color: #075847; }
.result.miss { background: #ffe0d9; color: #9c2e20; }
.empty-history { padding: 20px 0; }
.config-card summary { font-size: 1.12rem; font-weight: 850; cursor: pointer; }
.config-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 4px 18px; margin: 14px 0 20px; }
.config-grid label { display: grid; margin: 0; }
.config-grid input { margin-top: 6px; }
.history-dialog { width: min(820px, calc(100% - 30px)); max-height: 85vh; border: 0; border-radius: 24px; padding: 28px; color: var(--ink); box-shadow: 0 28px 90px rgba(0,0,0,.28); }
.history-dialog::backdrop { background: rgba(13,41,40,.55); }
.dialog-head { display: flex; justify-content: space-between; gap: 18px; }
.status-badge { display: inline-block; text-transform: capitalize; padding: 5px 10px; border-radius: 999px; font-weight: 850; }
.status-badge.solid { background: var(--mint); }
.status-badge.learning { background: var(--sun); }
.status-badge.stubborn { background: #ffe0d9; }
#toast { position: fixed; z-index: 20; left: 50%; bottom: 22px; transform: translate(-50%, 30px); opacity: 0; pointer-events: none; background: var(--ink); color: white; border-radius: 999px; padding: 11px 18px; font-weight: 800; transition: .2s ease; }
#toast.show { opacity: 1; transform: translate(-50%, 0); }
.hero-card, .mini-card, .week-switcher, .form-card, .question-card, .feedback-card, .finish-card, .dictation-board, .history-card, .config-card, .history-dialog { border-radius: 5px; }
.hero-card { border-top: 12px solid #69a944; }
.mini-card, .form-card, .question-card, .feedback-card, .finish-card, .dictation-board, .history-card, .config-card { position: relative; }
.mini-card::before, .form-card::before, .question-card::before, .feedback-card::before, .finish-card::before, .dictation-board::before, .history-card::before, .config-card::before { content: ""; position: absolute; inset: 5px; border: 1px solid rgba(38,57,47,.10); pointer-events: none; }
.block-progress .stat { border: 2px solid var(--line); border-radius: 3px; box-shadow: inset -4px -4px 0 rgba(38,57,47,.13); }
.block-progress .stat.solid { background: #bce784; }
.block-progress .stat.stubborn { background: #ffb398; }
.week-switcher { border-width: 3px; border-radius: 3px; box-shadow: 4px 4px 0 rgba(31,51,40,.22); }
input, textarea, select { border: 3px solid var(--line); border-radius: 3px; box-shadow: inset 3px 3px 0 rgba(38,57,47,.08); }
.safety-card { background: #fff1a8; border-color: #735b20; }
.check-row, .sentence-check, .compare-box > div, .hint, .sentence-compare, .issue-list li, .dictation-columns > div, .dictation-spelling-list span, .dictation-grammar-list li, .dictation-next, .finish-stats > div, .review-list, .status-head span, .pill-list button, .result, .status-badge { border-radius: 3px; }
.listen-button { border: 3px solid #765a18; border-radius: 4px; box-shadow: 6px 6px 0 #765a18; }
.listen-button:hover { transform: translate(-1px, -1px); box-shadow: 7px 7px 0 #765a18; }
.progress-track { height: 16px; border: 3px solid var(--line); border-radius: 2px; background: #d7e7ee; }
.progress-track span { border-radius: 0; background: repeating-linear-gradient(90deg, #65a946 0 23px, #55933b 23px 46px); }
.success-mark, .finish-burst { border: 3px solid var(--line); border-radius: 4px; box-shadow: 5px 5px 0 rgba(31,51,40,.25); }
.status-board { border-radius: 5px; }
.status-column.stubborn { background: #ffe0d2; }
.status-column.learning { background: #fff5bd; }
.status-column.solid { background: #d9f2b6; }
.page-heading h1, .mini-card h2, .section-title h2, .status-head h2, .history-card h2, .config-card summary, .history-dialog h2 { font-family: ui-monospace, "Cascadia Mono", monospace; }
.grown-up-link { opacity: .88; }
button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, summary:focus-visible { outline: 4px solid #ffd85a; outline-offset: 3px; }
@media (max-width: 760px) {
  .topbar { height: auto; min-height: 68px; padding: 12px 16px; align-items: flex-start; }
  .brand { padding-top: 5px; }
  nav { overflow-x: auto; max-width: 70%; }
  .nav-link { white-space: nowrap; padding: 9px 10px; font-size: .9rem; }
  main { width: min(100% - 22px, 620px); padding-top: 22px; }
  .home-grid { grid-template-columns: 1fr; }
  .hero-card { min-height: 390px; border-radius: 5px; }
  .setup-layout, .verify-grid, .parent-grid, .dictation-columns, .testbed-fields, .daily-testbed-fields, .review-choice-grid, .pet-studio-layout { grid-template-columns: 1fr; }
  .pet-studio-heading { align-items: start; flex-direction: column; }
  .pet-stage { position: relative; top: auto; min-height: 500px; }
  .gear-grid { grid-template-columns: 1fr; }
  .reward-moment { grid-template-columns: 1fr; text-align: center; }
  .reward-pet { display: grid; place-items: center; }
  .reward-choice-grid { grid-template-columns: repeat(3, 1fr); }
  .pet-choice { width: 82px; height: 82px; }
  .daily-testbed-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .parent-heading { align-items: start; flex-direction: column; }
  .status-board { grid-template-columns: 1fr; }
  .practice-top { grid-template-columns: auto 1fr; }
  .practice-top .progress-track { grid-column: 1 / -1; grid-row: 2; }
  .compare-box { grid-template-columns: 1fr; }
  .supported-form > div { grid-template-columns: 1fr; }
  .attempt-answers { display: grid; }
  .issue-list li { grid-template-columns: 1fr; gap: 3px; }
  .dictation-grammar-list li { grid-template-columns: 1fr auto; }
  .dictation-grammar-list li span { grid-column: 1 / -1; }
  .history-card { overflow-x: auto; }
  .history-table { min-width: 650px; }
  .config-grid { grid-template-columns: 1fr; }
  .revision-current { align-items: flex-start; }
  .revision-scheme { grid-template-columns: 1fr; }
  .verify-words { columns: 1; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; } }
