:root {
  color-scheme: light;
  --ink: #243b42;
  --muted: #607579;
  --teal: #2f8583;
  --teal-dark: #226763;
  --teal-soft: #e9f7f3;
  --wood: #f3cb82;
  --line: #795735;
  --yellow: #ffd95f;
  --yellow-soft: #fff5c7;
  --red: #b94e55;
  --green: #4f8b63;
  --card: rgba(255,255,255,.96);
  --shadow: 0 18px 50px rgba(45,78,75,.18);
}

* { box-sizing: border-box; }
html { min-width: 320px; }
body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  font-family: "Hiragino Sans", "Yu Gothic", "Meiryo", system-ui, sans-serif;
  background: #e8f5e8;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background: url("./assets/pastel-go-spring.png") center / cover no-repeat;
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background: rgba(245,251,248,.46);
}
body.result-screen::after { background: rgba(247,252,246,.2); }
button { font: inherit; }
button:focus-visible, .intersection:focus-visible { outline: 4px solid #176cb1; outline-offset: 3px; }
[hidden] { display: none !important; }

.app-shell { width: min(100% - 24px, 1020px); margin: 0 auto; padding: 20px 0 34px; }
.screen-card, .learning-card, .loading-card {
  border: 1px solid rgba(255,255,255,.88);
  border-radius: 28px;
  background: var(--card);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}
.screen-card { max-width: 820px; margin: 4vh auto 0; padding: clamp(24px,5vw,52px); }
.loading-card { max-width: 560px; margin: 25vh auto 0; padding: 36px; text-align: center; }
.eyebrow, .stage-label { margin: 0 0 5px; color: var(--teal); font-size: .78rem; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
h1,h2,h3,p { overflow-wrap: anywhere; }
h1 { margin: 0; font-size: clamp(1.7rem,6vw,3rem); line-height: 1.35; }
h2 { margin: 0; font-size: clamp(1.35rem,4vw,2rem); line-height: 1.45; }
.lead { margin: 18px 0 0; font-size: clamp(1.05rem,3vw,1.35rem); font-weight: 700; line-height: 1.9; }
.subtle { color: var(--muted); line-height: 1.7; }
.hero-friends { margin-bottom: 18px; font-size: clamp(2.6rem,10vw,4.8rem); text-align: center; }
.pill-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 24px 0; }
.pill { padding: 7px 12px; border-radius: 999px; color: var(--teal-dark); background: var(--teal-soft); font-size: .85rem; font-weight: 800; }
.button-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.button-row > * { flex: 1 1 180px; }
.primary-button,.secondary-button,.text-button,.choice-button {
  min-height: 50px;
  padding: 12px 18px;
  border-radius: 15px;
  font-weight: 850;
  cursor: pointer;
}
.primary-button { border: 0; color: white; background: var(--teal); box-shadow: 0 7px 16px rgba(47,133,131,.22); }
.primary-button:hover { background: var(--teal-dark); }
.secondary-button,.choice-button { border: 2px solid var(--teal); color: var(--teal-dark); background: white; }
.text-button { border: 0; color: var(--teal-dark); background: transparent; text-decoration: underline; }
.danger-button { border-color: #bd6870; color: #8f3941; }
.top-nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 auto 14px; padding: 0 6px; }
.brand-button { border: 0; padding: 5px; color: var(--ink); background: transparent; font-weight: 900; cursor: pointer; }
.nav-actions { display: flex; gap: 6px; }
.nav-actions button { min-height: 42px; padding: 8px 11px; border: 1px solid rgba(47,133,131,.25); border-radius: 12px; color: var(--teal-dark); background: rgba(255,255,255,.78); font-weight: 750; cursor: pointer; }
.language-switch { display: inline-flex; align-items: center; gap: 2px; padding: 2px; border: 1px solid rgba(47,133,131,.25); border-radius: 12px; background: rgba(255,255,255,.78); }
.language-switch button { min-height: 34px; padding: 5px 7px; border: 0; background: transparent; color: var(--muted); font-size: .78rem; }
.language-switch button.is-active { color: var(--teal-dark); background: var(--teal-soft); box-shadow: inset 0 0 0 1px rgba(47,133,131,.18); }
.language-switch span { color: #b4c2c1; font-size: .75rem; }
.nav-actions .reset-nav-button { border-color: transparent; color: #607579; background: rgba(255,255,255,.55); font-weight: 650; }
.reset-dialog { width: min(100% - 32px, 480px); padding: 24px; border: 0; border-radius: 20px; color: var(--ink); background: #fff; box-shadow: 0 24px 70px rgba(30,55,54,.3); }
.reset-dialog::backdrop { background: rgba(28,49,48,.48); backdrop-filter: blur(3px); }
.reset-dialog h2 { margin-bottom: 10px; font-size: 1.3rem; }
.reset-dialog p { margin: 0; color: var(--muted); line-height: 1.7; }
.reset-dialog .button-row { margin-bottom: 0; }
.danger-confirm { background: #a5464d; box-shadow: 0 7px 16px rgba(165,70,77,.2); }
.danger-confirm:hover { background: #87363d; }

.lesson-list { display: grid; gap: 12px; margin-top: 24px; }
.lesson-item { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px; width: 100%; padding: 16px; border: 1px solid #dce8e5; border-radius: 18px; color: var(--ink); background: rgba(255,255,255,.88); text-align: left; cursor: pointer; }
.lesson-item:hover { border-color: var(--teal); transform: translateY(-1px); }
.lesson-number { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; color: white; background: var(--teal); font-size: 1.1rem; font-weight: 900; }
.lesson-item h3 { margin: 0; font-size: 1.05rem; }
.lesson-item p { margin: 4px 0 0; color: var(--muted); font-size: .85rem; }
.status-badge { padding: 6px 9px; border-radius: 999px; color: #596c6f; background: #edf2f1; font-size: .74rem; font-weight: 850; white-space: nowrap; }
.status-badge--done { color: #2f6e48; background: #e5f4e9; }
.status-badge--current { color: #87630c; background: #fff2c8; }
.local-note { margin: 20px 0 0; padding: 12px 14px; border-radius: 13px; color: var(--muted); background: rgba(238,247,244,.8); font-size: .84rem; line-height: 1.6; }

.learning-card { padding: clamp(17px,4vw,34px); }
.learn-header { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.lesson-progress { min-width: 130px; color: var(--teal-dark); font-size: .78rem; font-weight: 850; text-align: right; }
.progress-track { height: 7px; margin-top: 6px; overflow: hidden; border-radius: 999px; background: #e2eeee; }
.progress-track span { display: block; height: 100%; border-radius: inherit; background: var(--teal); transition: width .25s ease; }
.review-note { margin: 0 0 14px; padding: 12px 14px; border-left: 5px solid var(--yellow); border-radius: 10px; background: var(--yellow-soft); font-weight: 750; line-height: 1.6; }
.concept-bridge { margin: 0 0 17px; padding: 15px 16px; border: 1px solid #d8e9e4; border-radius: 16px; background: rgba(239,249,245,.95); }
.concept-bridge p { margin: 4px 0; line-height: 1.58; }
.concept-flow { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; margin-top: 10px; color: var(--teal-dark); font-size: .82rem; font-weight: 850; }
.concept-flow span { padding: 5px 9px; border-radius: 999px; background: white; }
.rule-card { margin: 0 0 17px; padding: 14px 16px; border: 1px solid #cfe5df; border-left: 6px solid var(--teal); border-radius: 15px; background: rgba(242,250,247,.96); }
.rule-card p { margin: 0; color: #38575a; font-weight: 700; line-height: 1.68; }
.rule-card .eyebrow { margin-bottom: 5px; color: var(--teal-dark); }
.question-heading { display: flex; align-items: start; justify-content: space-between; gap: 14px; margin-bottom: 18px; }
.question-copy { max-width: 46rem; margin: 7px 0 0; font-size: 1rem; font-weight: 650; line-height: 1.75; }
.turn-badge { flex: 0 0 auto; padding: 8px 11px; border: 1px solid #d7e2e2; border-radius: 999px; color: #496267; background: #f7fbfb; font-size: .8rem; font-weight: 850; }
.learning-layout { display: grid; grid-template-columns: minmax(280px,420px) minmax(250px,1fr); gap: clamp(22px,5vw,46px); align-items: center; }
.board-column { width: 100%; max-width: 420px; margin: 0 auto; }
.board-wrap { width: 100%; overflow: hidden; border: 7px solid #fff9ea; border-radius: 20px; background: var(--wood); box-shadow: 0 11px 26px rgba(95,72,39,.2), inset 0 0 0 2px rgba(144,95,39,.18); }
.go-board { display: block; width: 100%; height: auto; touch-action: manipulation; }
.board-line { stroke: var(--line); stroke-width: 2.2; stroke-linecap: round; opacity: .86; }
.board-star { fill: var(--line); }
.stone { filter: drop-shadow(0 3px 2px rgba(44,45,43,.28)); }
.stone--black { fill: #283036; stroke: #151a1d; stroke-width: 1.5; }
.stone--white { fill: #fff; stroke: #9da8aa; stroke-width: 1.5; }
.stone--new { animation: stoneIn .24s ease-out; }
.stone--trial { opacity: .58; stroke-dasharray: 4 3; }
.last-move { fill: none; stroke: #15737a; stroke-width: 3.5; }
.intersection { fill: transparent; cursor: pointer; }
.intersection[aria-disabled="true"] { cursor: default; }
.point-halo { fill: rgba(255,217,75,.62); stroke: #a97900; stroke-width: 3; animation: haloPulse 1.25s ease-in-out infinite; }
.point-halo--selected { fill: rgba(83,184,139,.56); stroke: #297a57; animation: none; }
.point-halo--outside { fill: rgba(94,180,221,.48); stroke: #297ca5; animation: none; }
.point-halo--eye { fill: rgba(255,217,75,.62); stroke: #a97900; animation: none; }
.capture-ring { fill: none; stroke: #ffb633; stroke-width: 7; animation: ringPulse .55s ease-in-out 2; }
.connection-link { stroke: #f2b932; stroke-width: 12; stroke-linecap: round; opacity: .78; animation: linkPulse 1.1s ease 2; }
.board-label { font-size: 11px; font-weight: 900; text-anchor: middle; paint-order: stroke; stroke: rgba(255,255,255,.95); stroke-width: 4px; stroke-linejoin: round; }
.board-label--outside { fill: #1e688c; }
.board-label--eye { fill: #785700; }
.board-label--new { fill: #156d65; font-size: 12px; }
.wrong-marker { fill: #b33e47; stroke: white; stroke-width: 3px; paint-order: stroke; font-size: 32px; font-weight: 900; text-anchor: middle; dominant-baseline: central; }
.board-instruction { display: grid; gap: 3px; min-height: 1.5em; margin: 11px 0 0; color: var(--muted); font-size: .88rem; font-weight: 650; text-align: center; }
.outcome-label { font-size: .98rem; font-weight: 900; }
.outcome-label--wrong { color: #a43d46; }
.outcome-label--right { color: #286e53; }
.feedback-column { min-height: 240px; }
.guide-card { display: flex; align-items: center; gap: 12px; padding: 13px 15px; border: 1px solid #d9e8e4; border-radius: 17px; background: #f0faf6; }
.guide-card--cat { border-color: #efdfbd; background: #fff8e9; }
.guide-card--chick { border-color: #efdf90; background: #fff9dc; }
.guide-face { flex: 0 0 auto; font-size: 2rem; line-height: 1; }
.guide-card p { margin: 0; line-height: 1.6; }
.guide-name { color: var(--muted); font-size: .72rem; font-weight: 900; letter-spacing: .08em; }
.feedback-panel,.why-panel { margin-top: 13px; }
.feedback-title { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; font-size: 1.08rem; }
.feedback-title::before { content: ""; width: 8px; height: 8px; border: 3px solid currentColor; border-radius: 50%; }
.feedback-title--right { color: var(--teal-dark); }
.feedback-title--wrong { color: var(--red); }
.formal-explanation { margin: 0; color: #3f565b; font-size: .96rem; font-weight: 650; line-height: 1.75; }
.success-why { margin-top: 13px; padding: 14px 15px; border: 1px solid #cce4da; border-radius: 15px; background: #f0faf6; }
.success-why p { margin: 0; color: #34585a; font-weight: 700; line-height: 1.68; }
.success-why .eyebrow { margin-bottom: 4px; color: var(--teal-dark); }
.misconception-note { display: grid; gap: 3px; margin-top: 13px; padding: 12px 14px; border-radius: 13px; color: #70571c; background: #fff7e4; line-height: 1.55; }
.misconception-note strong { font-size: .78rem; letter-spacing: .04em; }
.feedback-column .primary-button,.feedback-column .secondary-button { width: 100%; margin-top: 16px; }
.why-panel { padding: 16px; border: 1px solid #efdfb8; border-radius: 17px; background: #fffaf0; }
.why-panel h3 { margin: 0 0 8px; font-size: 1.06rem; }
.why-panel p { margin: 0; line-height: 1.72; }
.step-count { margin: 0 0 5px !important; color: #966d12; font-size: .75rem; font-weight: 900; letter-spacing: .08em; }
.liberty-meter { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 14px 0; padding: 13px; border-radius: 15px; background: var(--teal-soft); }
.liberty-meter strong { font-size: 1.25rem; }
.atari-label { color: var(--red); font-weight: 900; }
.choice-stack { display: grid; gap: 9px; margin-top: 14px; }
.selected-points { margin: 10px 0 0; color: var(--teal-dark); font-weight: 800; text-align: center; }
.debug-strip { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; margin-top: 9px; color: #627477; font-size: .68rem; }
.debug-strip code { padding: 4px 6px; border-radius: 6px; background: rgba(255,255,255,.72); }
.analytics-debug { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; margin: -4px 6px 12px; padding: 8px 10px; border: 1px dashed rgba(47,133,131,.4); border-radius: 10px; color: #536d70; background: rgba(255,255,255,.82); font-size: .7rem; }
.analytics-debug code { padding: 3px 5px; border-radius: 5px; background: #edf6f4; overflow-wrap: anywhere; }

.result-card { text-align: center; }
.result-friends { margin-bottom: 12px; font-size: clamp(2.6rem,9vw,4.5rem); }
.summary-list { max-width: 580px; margin: 22px auto; padding: 0; list-style: none; text-align: left; }
.summary-list li { margin: 8px 0; padding: 11px 13px; border-radius: 12px; background: rgba(237,248,242,.9); line-height: 1.55; }
.result-card .button-row { justify-content: center; }
.result-card .button-row > * { max-width: 330px; }
.concept-status { display: flex; align-items: center; justify-content: center; gap: 10px; max-width: 580px; margin: 20px auto 0; padding: 13px 15px; border: 1px solid #d7e7e2; border-radius: 15px; background: rgba(244,250,247,.95); text-align: left; }
.concept-status > span:last-child { display: grid; gap: 2px; }
.concept-status strong { color: var(--muted); font-size: .76rem; letter-spacing: .04em; }
.concept-status-symbol { flex: 0 0 auto; font-size: 1.05rem; }
.concept-status--applied { border-color: #b9dec9; background: #eef9f1; }
.concept-status--retry { border-color: #ead9a9; background: #fff9e9; }
.concept-status--recovered { border-color: #c8dfd2; background: #f0f8f2; }
.concept-status--needs-practice { border-color: #ead9a9; background: #fff9e9; }
.concept-status--unchecked { color: var(--muted); }
.concept-status--compact { justify-content: flex-start; gap: 6px; margin: 8px 0 0; padding: 0; border: 0; background: transparent; color: #526b6e; font-size: .78rem; }
.concept-review { max-width: 680px; margin: 24px auto 0; padding: 20px; border: 1px solid #d5e7e1; border-radius: 18px; background: rgba(246,252,249,.96); text-align: left; }
.concept-review--top { margin-top: 22px; }
.concept-review--complete { margin-bottom: 22px; }
.concept-review--empty { padding: 14px 16px; color: #3d6660; background: rgba(238,248,242,.94); text-align: center; }
.concept-review--empty p { margin: 0; line-height: 1.65; }
.concept-review h2 { margin: 3px 0 6px; font-size: 1.25rem; }
.concept-review-count { margin: 0; color: var(--muted); line-height: 1.6; }
.concept-review-list { display: grid; gap: 10px; margin-top: 15px; }
.concept-review-item { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 14px; padding: 14px; border: 1px solid #dce9e5; border-radius: 14px; background: white; }
.concept-review-item h3 { margin: 2px 0 5px; font-size: .98rem; line-height: 1.5; }
.concept-review-item p { margin: 0; color: var(--muted); font-size: .84rem; line-height: 1.55; }
.concept-review-item .concept-review-lesson { color: var(--teal-dark); font-size: .72rem; font-weight: 900; letter-spacing: .04em; }
.concept-review-item .secondary-button { min-width: 150px; }
.result-reflection { display: grid; gap: 4px; max-width: 580px; margin: 12px auto 0; padding: 13px; border-radius: 13px; background: #fff7e4; color: #725716; text-align: left; line-height: 1.55; }
.result-reflection strong { font-size: .8rem; }
.wrong-review { margin-top: 16px; padding: 13px; border-radius: 13px; background: #fff7e4; color: #725716; line-height: 1.65; }
.recovery-offer { max-width: 680px; }
.recovery-offer .lead { max-width: 34rem; }
.feedback-section { margin: 28px auto 0; padding: clamp(18px,4vw,26px); border: 1px solid #d8e8e4; border-radius: 20px; background: rgba(244,251,248,.95); text-align: left; }
.feedback-section h2 { font-size: 1.25rem; }
.feedback-optional { margin: 5px 0 0; color: var(--muted); font-size: .85rem; }
.feedback-questions { display: grid; gap: 10px; margin-top: 16px; }
.feedback-question { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 8px 14px; padding: 13px 14px; border-radius: 14px; background: white; }
.feedback-question p { margin: 0; line-height: 1.5; }
.feedback-question small { display: block; margin-top: 2px; color: var(--muted); font-size: .78rem; font-weight: 600; }
.feedback-actions { display: flex; flex-wrap: wrap; gap: 7px; }
.feedback-choice { min-height: 40px; padding: 8px 11px; border: 1px solid #b9d8d2; border-radius: 11px; color: var(--teal-dark); background: #fff; font-weight: 800; cursor: pointer; }
.feedback-choice:hover:not(:disabled) { border-color: var(--teal); background: var(--teal-soft); }
.feedback-choice.is-selected { border-color: var(--teal); background: var(--teal-soft); box-shadow: inset 0 0 0 1px var(--teal); }
.feedback-choice:disabled { cursor: default; opacity: .64; }
.feedback-choice.is-selected:disabled { opacity: 1; }
.feedback-thanks { grid-column: 1 / -1; color: var(--teal-dark); font-size: .82rem; font-weight: 850; }
.toast { position: fixed; right: 16px; bottom: 16px; z-index: 10; max-width: min(360px,calc(100% - 32px)); padding: 12px 16px; border-radius: 13px; color: white; background: #315f5d; box-shadow: var(--shadow); font-weight: 750; }

.site-footer { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 18px; margin: 18px auto 0; padding: 15px 12px 6px; color: #486568; }
.site-footer button,.site-footer a { min-height: 40px; padding: 7px 5px; border: 0; color: var(--teal-dark); background: transparent; font-size: .88rem; font-weight: 750; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.site-footer button:hover,.site-footer a:hover { color: var(--ink); }
.site-footer a { display: inline-flex; align-items: center; overflow-wrap: anywhere; }
.footer-brand { display: inline-flex; align-items: center; min-height: 40px; font-size: .88rem; font-weight: 800; }
.consent-panel { position: fixed; z-index: 30; right: max(12px,env(safe-area-inset-right)); bottom: max(12px,env(safe-area-inset-bottom)); left: max(12px,env(safe-area-inset-left)); display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 18px; width: min(960px,calc(100% - 24px)); margin: auto; padding: 18px; border: 1px solid rgba(47,133,131,.3); border-radius: 19px; color: var(--ink); background: rgba(255,255,255,.98); box-shadow: 0 18px 55px rgba(30,55,54,.28); }
.consent-copy h2 { margin: 2px 0 7px; font-size: 1.18rem; }
.consent-copy > p:not(.eyebrow):not(.consent-status) { margin: 0; color: #425d61; font-size: .92rem; line-height: 1.65; }
.consent-status { margin: 7px 0 0; color: var(--muted); font-size: .82rem; }
.consent-actions { display: grid; grid-template-columns: repeat(2,minmax(150px,1fr)); align-content: center; gap: 8px; min-width: 330px; }
.consent-choice,.consent-details { min-height: 46px; padding: 10px 13px; border-radius: 12px; font-weight: 850; cursor: pointer; }
.consent-choice { border: 2px solid var(--teal); color: var(--teal-dark); background: white; }
.consent-choice:hover,.consent-choice.is-selected { background: var(--teal-soft); box-shadow: inset 0 0 0 1px rgba(47,133,131,.22); }
.consent-details { grid-column: 1 / -1; border: 1px solid transparent; color: var(--teal-dark); background: transparent; text-decoration: underline; text-underline-offset: 3px; }
.consent-panel:focus { outline: 3px solid rgba(47,133,131,.45); outline-offset: 3px; }
.consent-panel button:focus-visible,.site-footer button:focus-visible,.privacy-card a:focus-visible { outline: 3px solid #1d7473; outline-offset: 3px; }
.privacy-card { max-width: 820px; }
.privacy-card h1 { margin-bottom: 8px; }
.privacy-card h2 { margin: 30px 0 10px; padding-top: 4px; font-size: 1.28rem; }
.privacy-card h3 { margin: 22px 0 8px; font-size: 1.08rem; }
.privacy-card p,.privacy-card li { color: #394f54; line-height: 1.82; }
.privacy-card ul { padding-left: 1.35rem; }
.privacy-card code { padding: 2px 5px; border-radius: 5px; color: #67451b; background: #fff1cf; overflow-wrap: anywhere; }
.privacy-card a { color: #126d72; overflow-wrap: anywhere; }
.privacy-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 32px; padding-top: 20px; border-top: 1px solid #d9e6e3; }

@keyframes stoneIn { from { opacity: 0; transform: scale(.55); transform-origin: center; } }
@keyframes haloPulse { 50% { opacity: .42; transform: scale(1.08); transform-origin: center; } }
@keyframes ringPulse { 50% { stroke-width: 12; opacity: .45; } }
@keyframes linkPulse { 50% { opacity: .28; } }

@media (max-width: 720px) {
  body::before { background-position: center top; }
  body::after { background: rgba(246,252,249,.53); }
  body.result-screen::after { background: rgba(247,252,246,.27); }
  .app-shell { width: min(100% - 16px,520px); padding-top: 12px; }
  .screen-card,.learning-card { border-radius: 22px; }
  .screen-card { padding: 24px 18px; }
  .learning-card { padding: 17px 14px 20px; }
  .learning-layout { grid-template-columns: 1fr; gap: 17px; }
  .feedback-column { min-height: 0; }
  .lesson-progress { min-width: 84px; }
  .question-heading { display: block; }
  .turn-badge { display: inline-block; margin-top: 9px; }
  .lesson-item { grid-template-columns: auto 1fr; }
  .status-badge { grid-column: 2; justify-self: start; }
  .top-nav { align-items: flex-start; }
  .nav-actions { flex-wrap: wrap; justify-content: flex-end; }
  .nav-actions button { min-height: 38px; font-size: .78rem; }
  .language-switch { order: -1; }
  .language-switch button { min-height: 32px; font-size: .74rem; }
  .feedback-question { grid-template-columns: 1fr; }
  .concept-review { padding: 17px 14px; }
  .concept-review-item { grid-template-columns: 1fr; }
  .concept-review-item .secondary-button { width: 100%; min-width: 0; }
  .feedback-actions { width: 100%; }
  .feedback-choice { flex: 1 1 120px; }
  .consent-panel { grid-template-columns: 1fr; max-height: calc(100dvh - 24px); overflow-y: auto; padding: 16px; }
  .consent-actions { min-width: 0; }
  .privacy-card { padding-inline: 20px; }
}

@media (max-width: 370px) {
  .app-shell { width: min(100% - 10px,520px); }
  .learning-card { padding-inline: 10px; }
  .learn-header { gap: 8px; }
  .lesson-progress { min-width: 72px; }
  .question-copy { font-size: .96rem; }
  .consent-actions { grid-template-columns: 1fr; }
  .consent-details { grid-column: auto; }
}

@media (prefers-reduced-motion: reduce) {
  *,*::before,*::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
