/* GEO Quest v3 · Sundayable brand system 2.0: Paper surfaces, Ink structure, hard offsets, calm motion. */
@font-face { font-family: "Gabarito"; src: url("/geo-quest-assets/fonts/gabarito-700.woff2") format("woff2"); font-weight: 600 800; font-display: swap; }
/* Both supplied Figtree files are the same variable font. One face avoids a duplicate download. */
@font-face { font-family: "Figtree"; src: url("/geo-quest-assets/fonts/figtree-400.woff2") format("woff2"); font-weight: 400 700; font-display: swap; }
@font-face { font-family: "Plex Mono"; src: url("/geo-quest-assets/fonts/ibm-plex-mono-500.woff2") format("woff2"); font-weight: 400 700; font-display: swap; }
@font-face { font-family: "Pretendard"; src: url("/geo-quest-assets/fonts/pretendard-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Pretendard"; src: url("/geo-quest-assets/fonts/pretendard-600.woff2") format("woff2"); font-weight: 500 600; font-display: swap; }
@font-face { font-family: "Pretendard"; src: url("/geo-quest-assets/fonts/pretendard-700.woff2") format("woff2"); font-weight: 700 800; font-display: swap; }

:root {
  --paper: #F5F3EE; --card: #FCFBF8; --surface: #ECE9E2; --line: #DDD9D0;
  --ink: #1B2233; --muted: #4F5768; --night: #0A0F1E; --slate: #6A7389; --dust: #CCBFBC;
  --horizon: #82BCE2; --approval: #3E7C4F; --dawn: #F3E2B7;
  --miss: #A4473A; --miss-tint: #F6E6E2; --ok-tint: #E3EFE6; --mixed: #7A5B12; --mixed-tint: #F6ECCF; --sky-tint: #E8F2F9;
  --display: "Gabarito", "Pretendard", system-ui, sans-serif;
  --text: "Figtree", "Pretendard", system-ui, -apple-system, sans-serif;
  --mono: "Plex Mono", ui-monospace, Menlo, monospace;
  --safe-b: env(safe-area-inset-bottom, 0px); --safe-t: env(safe-area-inset-top, 0px);
  --ease: cubic-bezier(.2, .8, .2, 1);
  --bar-h: 84px;
}
html[lang="ko"] { --display: "Pretendard", system-ui, sans-serif; --text: "Pretendard", system-ui, sans-serif; --mono: "Plex Mono", "Pretendard", system-ui, sans-serif; }
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; background: var(--paper); }
html, body { margin: 0; padding: 0; overflow-x: hidden; }
body { font-family: var(--text); font-size: 18px; line-height: 1.6; color: var(--ink); background: var(--paper); overflow-wrap: break-word; -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; }
html[lang="ko"] body { word-break: keep-all; font-size: 17.5px; line-height: 1.7; }
button, input { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; touch-action: manipulation; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--display); font-weight: 700; line-height: 1.22; margin: 0; text-wrap: balance; letter-spacing: -.01em; }
html[lang="ko"] h1, html[lang="ko"] h2, html[lang="ko"] h3 { letter-spacing: -.02em; }
p { margin: 0; text-wrap: pretty; }
img { display: block; max-width: 100%; height: auto; }
:focus-visible { outline: 3px solid var(--horizon); outline-offset: 2px; border-radius: 8px; }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); }
.mono { font-family: var(--mono); font-weight: 500; letter-spacing: .03em; }
#app { max-width: 560px; margin: 0 auto; min-height: 100dvh; position: relative; display: flex; flex-direction: column; }

/* top bar */
.top { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 8px; min-height: 58px; padding: calc(8px + var(--safe-t)) 14px 8px; background: rgba(245,243,238,.94); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.top .grow { flex: 1; min-width: 0; }
.brand { display: flex; align-items: center; gap: 8px; font-family: var(--display); font-weight: 800; font-size: 19px; white-space: nowrap; }
.brand .cup { width: 28px; height: 28px; }
.chip { display: inline-flex; align-items: center; gap: 5px; height: 34px; padding: 0 11px; border-radius: 999px; background: var(--card); border: 2px solid var(--ink); font-family: var(--mono); font-size: 13px; white-space: nowrap; }
.chip svg { width: 16px; height: 16px; flex: none; }
.lang { display: inline-flex; height: 34px; border: 2px solid var(--ink); border-radius: 999px; overflow: hidden; background: var(--card); flex: none; }
.lang button { padding: 0 10px; font-family: var(--mono); font-size: 13px; font-weight: 500; min-width: 40px; }
.lang button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.icon-btn { width: 40px; height: 40px; border-radius: 999px; display: inline-grid; place-items: center; flex: none; }
.icon-btn svg { width: 22px; height: 22px; }
.icon-btn:active { background: var(--surface); }

/* bottom nav */
.nav { position: sticky; bottom: 0; z-index: 30; display: grid; grid-template-columns: repeat(4, 1fr); background: var(--card); border-top: 2px solid var(--ink); padding-bottom: var(--safe-b); }
.nav button { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 9px 2px 8px; font-size: 12.5px; font-weight: 600; color: var(--muted); position: relative; min-height: 58px; }
.nav button svg { width: 22px; height: 22px; }
.nav button[aria-current="page"] { color: var(--ink); }
.nav button[aria-current="page"]::before { content: ""; position: absolute; top: -2px; left: 30%; right: 30%; height: 4px; background: var(--ink); border-radius: 0 0 4px 4px; }
.nav .dot { position: absolute; top: 5px; left: calc(50% + 7px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--miss); color: #fff; font-family: var(--mono); font-size: 11px; line-height: 18px; }
main { flex: 1; min-width: 0; }

/* home */
.hero { position: relative; }
.hero-img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: var(--dawn); }
.hero-body { padding: 18px 20px 6px; }
.eyebrow { font-family: var(--mono); font-size: 12px; letter-spacing: .08em; color: var(--muted); text-transform: uppercase; }
html[lang="ko"] .eyebrow { letter-spacing: .02em; }
.hero h1 { font-size: 36px; margin-top: 6px; }
.hero .tag { font-family: var(--display); font-weight: 700; font-size: 21px; margin-top: 4px; line-height: 1.3; }
.hero p.sub { margin-top: 10px; color: var(--muted); font-size: 16.5px; }
.cta-row { padding: 16px 20px 6px; display: grid; gap: 10px; }
.progress-strip { display: flex; align-items: center; gap: 10px; padding: 8px 20px 0; font-size: 13px; color: var(--muted); }
.progress-strip .track { flex: 1; height: 8px; background: var(--surface); border-radius: 99px; overflow: hidden; }
.progress-strip .fill { height: 100%; background: var(--ink); border-radius: 99px; transition: width .6s var(--ease); }
.levels { list-style: none; margin: 18px 0 0; padding: 0 16px 28px; display: grid; gap: 12px; }
.lv { display: grid; grid-template-columns: 96px 1fr; gap: 12px; align-items: center; width: 100%; text-align: left; padding: 10px; border-radius: 18px; background: var(--card); border: 2px solid var(--ink); box-shadow: 4px 4px 0 var(--ink); transition: transform .12s var(--ease), box-shadow .12s var(--ease); }
.lv:active { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--ink); }
.lv .thumb { width: 96px; height: 72px; border-radius: 12px; object-fit: cover; background: var(--surface); }
.lv .meta { font-family: var(--mono); font-size: 11.5px; color: var(--muted); display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
html[lang="ko"] .lv .meta { font-family: var(--text); font-size: 12.5px; }
.lv b { display: block; font-family: var(--display); font-size: 17.5px; line-height: 1.3; margin-top: 2px; }
.lv .stars { display: inline-flex; gap: 1px; }
.lv .stars svg { width: 14px; height: 14px; }
.lv.locked { opacity: .6; box-shadow: 4px 4px 0 var(--line); border-color: var(--slate); }
.lv.current { border-color: var(--ink); box-shadow: 4px 4px 0 var(--ink), 0 0 0 4px var(--dawn); }
.lv.boss { background: var(--night); color: var(--paper); }
.lv.boss .meta { color: var(--dust); }
.pill { display: inline-flex; align-items: center; gap: 4px; height: 20px; padding: 0 8px; border-radius: 999px; font-family: var(--mono); font-size: 11px; background: var(--surface); color: var(--ink); }
.pill.free { background: var(--ok-tint); color: var(--approval); }
.pill.save { background: var(--sky-tint); }
.home-foot { padding: 4px 20px 30px; font-size: 13px; color: var(--muted); }
.home-foot a { text-underline-offset: 3px; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 54px; padding: 0 22px; border-radius: 999px; border: 2px solid var(--ink); font-family: var(--display); font-weight: 700; font-size: 17.5px; background: var(--ink); color: var(--paper); box-shadow: 3px 3px 0 rgba(27,34,51,.22); width: 100%; transition: transform .12s var(--ease), box-shadow .12s var(--ease), background .2s; }
.btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 rgba(27,34,51,.22); }
.btn[disabled] { background: var(--surface); color: var(--slate); border-color: var(--line); box-shadow: none; cursor: default; }
.btn.ghost { background: var(--card); color: var(--ink); box-shadow: none; }
.btn.ok { background: var(--approval); border-color: var(--approval); }
.btn.google { background: #fff; color: #1f1f1f; border-color: #747775; font-family: "Figtree", system-ui, sans-serif; font-weight: 600; box-shadow: none; }
.btn.google svg { width: 20px; height: 20px; }
.btn.small { min-height: 44px; font-size: 15px; width: auto; padding: 0 16px; }
.link { font-size: 15px; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; color: var(--muted); padding: 8px 4px; }

/* play */
.play { display: flex; flex-direction: column; min-height: 100dvh; background: var(--paper); }
.play-top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 10px; padding: calc(8px + var(--safe-t)) 12px 8px; background: var(--paper); }
.bar { flex: 1; height: 12px; border-radius: 99px; background: var(--surface); overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--ink); border-radius: 99px; transition: width .45s var(--ease); }
.streak { display: inline-flex; align-items: center; gap: 3px; height: 28px; padding: 0 9px 0 6px; border-radius: 999px; background: var(--ink); color: var(--paper); font-family: var(--mono); font-size: 13px; }
.streak svg { width: 16px; height: 16px; }
.stage { flex: 1; padding: 6px 20px calc(var(--bar-h) + 28px + var(--safe-b)); min-width: 0; }
.actions { position: fixed; left: 0; right: 0; bottom: 0; z-index: 25; display: flex; justify-content: center; pointer-events: none; }
.actions-in { pointer-events: auto; width: 100%; max-width: 520px; padding: 12px 20px calc(14px + var(--safe-b)); background: linear-gradient(180deg, rgba(245,243,238,0) 0%, var(--paper) 26%); }
.kicker { font-family: var(--mono); font-size: 12px; letter-spacing: .07em; color: var(--muted); text-transform: uppercase; }
html[lang="ko"] .kicker { font-family: var(--text); letter-spacing: 0; font-weight: 600; font-size: 13px; }
.q-title { font-size: 25px; line-height: 1.32; margin-top: 8px; }
html[lang="ko"] .q-title { font-size: 24px; line-height: 1.4; }
.fade-in { animation: enter .38s var(--ease) both; }

/* Haru */
.haru { display: flex; align-items: flex-start; gap: 12px; margin-top: 16px; }
.haru .face { width: 44px; height: 44px; flex: none; }
.haru .bubble { position: relative; flex: 1; min-width: 0; padding: 14px 18px; border-radius: 12px; background: var(--card); border: 2px solid var(--ink); font-size: 16.5px; line-height: 1.5; }
.haru .name { font-family: var(--mono); font-size: 12px; color: var(--muted); display: block; margin-bottom: 4px; text-transform: uppercase; }
html[lang="ko"] .haru .name { font-family: var(--text); font-size: 12px; font-weight: 600; }
.haru.small .face { width: 44px; height: 44px; }
.haru.small .bubble { font-size: 16.5px; padding: 14px 18px; }

/* cards */
.card { margin-top: 14px; background: var(--card); border: 2px solid var(--ink); border-radius: 22px; box-shadow: 4px 4px 0 var(--ink); overflow: hidden; }
.card .pic { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: var(--surface); }
.card .in { padding: 18px 18px 18px; }
.card h2 { font-size: 24px; }
html[lang="ko"] .card h2 { font-size: 23px; }
.card .body { margin-top: 10px; font-size: 18.5px; line-height: 1.6; }
html[lang="ko"] .card .body { font-size: 18px; line-height: 1.72; }
.card .row { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.term { display: inline; padding: 0 2px; border: 0; border-bottom: 2px dotted var(--ink); background: var(--dawn); border-radius: 4px; font-weight: 600; cursor: pointer; line-height: inherit; }
.term::after { content: "?"; display: inline-grid; place-items: center; width: 16px; height: 16px; margin-left: 4px; border-radius: 99px; background: var(--ink); color: var(--paper); font-family: var(--mono); font-size: 10.5px; vertical-align: 2px; }
.src-btn { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 999px; border: 1.5px solid var(--ink); background: var(--card); font-size: 13.5px; font-weight: 600; }
.src-btn svg { width: 14px; height: 14px; }
.badge { display: inline-flex; align-items: center; gap: 5px; height: 28px; padding: 0 10px; border-radius: 999px; font-family: var(--mono); font-size: 12px; border: 1.5px solid currentColor; white-space: nowrap; }
html[lang="ko"] .badge { font-family: var(--text); font-weight: 600; }
.badge svg { width: 14px; height: 14px; }
.badge.docs { color: var(--approval); background: var(--ok-tint); }
.badge.study, .badge.reason { color: var(--mixed); background: var(--mixed-tint); }
.badge.measure { color: #2F5F80; background: var(--sky-tint); }
.badge.scope { color: var(--muted); background: var(--surface); }
.badge.myth { color: var(--miss); background: var(--miss-tint); }

/* diagrams */
.diagram { padding: 18px 16px 6px; background: var(--sky-tint); border-bottom: 2px solid var(--ink); }
.pipe { display: grid; gap: 8px; }
.pipe .st { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; background: var(--card); border: 2px solid var(--ink); font-weight: 600; font-size: 15.5px; opacity: .25; transform: translateY(6px); animation: stepin .5s var(--ease) forwards; }
.pipe .st:nth-child(2) { animation-delay: .5s; } .pipe .st:nth-child(3) { animation-delay: 1s; } .pipe .st:nth-child(4) { animation-delay: 1.5s; }
.pipe .st .ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--dawn); flex: none; }
.pipe .st .ic svg { width: 20px; height: 20px; }
.pipe .arrow { text-align: center; color: var(--slate); font-size: 14px; line-height: 1; }
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.tile { padding: 12px 6px 10px; border-radius: 14px; background: var(--card); border: 2px solid var(--ink); text-align: center; font-size: 13.5px; font-weight: 700; line-height: 1.3; animation: pop .45s var(--ease) both; }
.tile:nth-child(2) { animation-delay: .15s; } .tile:nth-child(3) { animation-delay: .3s; }
.tile .ic { width: 40px; height: 40px; margin: 0 auto 6px; border-radius: 12px; display: grid; place-items: center; background: var(--dawn); }
.tile .ic svg { width: 24px; height: 24px; }
.tile small { display: block; font-weight: 500; color: var(--muted); font-size: 12px; margin-top: 3px; }
.fan { position: relative; display: grid; grid-template-columns: 1fr; justify-items: center; gap: 10px; }
.fan .q { padding: 9px 14px; border-radius: 16px; background: var(--ink); color: var(--paper); font-weight: 600; font-size: 15px; text-align: center; }
.fan .lines { width: 100%; height: 30px; }
.fan .kids { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; width: 100%; }
.fan .kids span { padding: 7px 6px; border-radius: 10px; border: 1.5px dashed var(--ink); background: var(--card); font-size: 12.5px; text-align: center; animation: pop .45s var(--ease) both; overflow-wrap: anywhere; }
.fan .kids span:nth-child(2) { animation-delay: .2s; } .fan .kids span:nth-child(3) { animation-delay: .4s; }
.denom { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.denom div { padding: 12px 10px; border-radius: 14px; background: var(--card); border: 2px solid var(--ink); text-align: center; }
.denom b { display: block; font-family: var(--display); font-size: 15px; }
.denom .frac { display: inline-grid; margin-top: 6px; font-size: 13px; line-height: 1.35; }
.denom .frac span:first-child { border-bottom: 2px solid var(--ink); padding-bottom: 2px; }
.denom .frac span:last-child { padding-top: 2px; }

/* options */
.options { display: grid; gap: 10px; margin-top: 18px; }
.opt { display: flex; align-items: center; gap: 12px; text-align: left; width: 100%; padding: 14px 14px 14px 12px; min-height: 60px; border-radius: 16px; background: var(--card); border: 2px solid var(--ink); box-shadow: 3px 3px 0 var(--line); font-size: 17px; line-height: 1.45; transition: transform .12s var(--ease), box-shadow .12s, background .15s, border-color .15s; }
.opt .k { flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; border: 2px solid var(--line); font-family: var(--mono); font-size: 13px; color: var(--muted); }
.opt:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--line); }
.opt.right { background: var(--ok-tint); border-color: var(--approval); box-shadow: 3px 3px 0 var(--approval); }
.opt.right .k { background: var(--approval); border-color: var(--approval); color: #fff; }
.opt.wrong { background: var(--miss-tint); border-color: var(--miss); box-shadow: 3px 3px 0 var(--miss); }
.opt.wrong .k { background: var(--miss); border-color: var(--miss); color: #fff; }
.opt.dim { opacity: .55; }
.opt[disabled] { cursor: default; }

/* inline feedback */
.fb { margin-top: 16px; padding: 16px 16px 14px; border-radius: 18px; border: 2px solid var(--approval); background: var(--ok-tint); animation: enter .35s var(--ease) both; }
.fb.bad { border-color: var(--miss); background: var(--miss-tint); }
.fb-h { display: flex; align-items: center; gap: 10px; }
.fb-h .ic { width: 34px; height: 34px; border-radius: 99px; display: grid; place-items: center; background: var(--approval); color: #fff; flex: none; }
.fb.bad .fb-h .ic { background: var(--miss); }
.fb-h .ic svg { width: 20px; height: 20px; }
.fb-h h3 { font-size: 20px; flex: 1; }
.fb .xp { font-family: var(--mono); font-size: 14px; color: var(--approval); }
.fb .ans { margin-top: 8px; font-weight: 700; font-size: 15.5px; }
.fb .why { margin-top: 6px; font-size: 17px; line-height: 1.6; }
.fb .row { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

/* swipe */
.deck { position: relative; margin-top: 16px; height: 300px; }
.dcard { position: absolute; inset: 0; display: flex; flex-direction: column; padding: 20px 18px; background: var(--card); border: 2px solid var(--ink); border-radius: 22px; box-shadow: 4px 4px 0 var(--ink); touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.dcard.back { transform: translateY(10px) scale(.95); box-shadow: none; border-color: var(--slate); }
.dcard .s { flex: 1; display: flex; align-items: center; font-family: var(--display); font-weight: 700; font-size: 22px; line-height: 1.4; }
html[lang="ko"] .dcard .s { font-size: 21px; line-height: 1.5; }
.dcard .hint { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--muted); font-weight: 600; }
.stamp { position: absolute; top: 16px; padding: 3px 12px; border: 3px solid currentColor; border-radius: 10px; font-family: var(--display); font-size: 21px; font-weight: 800; opacity: 0; pointer-events: none; background: var(--card); }
.stamp.l { left: 14px; color: var(--miss); transform: rotate(-8deg); }
.stamp.r { right: 14px; color: var(--approval); transform: rotate(8deg); }
.yesno { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 22px; }
.yesno button { min-height: 58px; border-radius: 16px; border: 2px solid currentColor; background: var(--card); font-weight: 800; font-size: 17px; display: flex; align-items: center; justify-content: center; gap: 6px; }
.yesno .no { color: var(--miss); } .yesno .yes { color: var(--approval); }
.yesno button:active { transform: translate(1px, 1px); }
.count { margin-top: 10px; text-align: center; font-family: var(--mono); font-size: 12.5px; color: var(--muted); }

/* order / match */
.tapgrid { display: grid; gap: 10px; margin-top: 18px; }
.tapitem { display: flex; align-items: center; gap: 12px; min-height: 58px; padding: 10px 14px; border-radius: 16px; background: var(--card); border: 2px solid var(--ink); box-shadow: 3px 3px 0 var(--line); text-align: left; font-size: 16.5px; font-weight: 600; transition: background .15s, transform .12s; }
.tapitem .n { flex: none; width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; border: 2px dashed var(--slate); font-family: var(--mono); font-size: 13px; color: var(--muted); }
.tapitem.done { background: var(--ok-tint); border-color: var(--approval); box-shadow: none; }
.tapitem.done .n { background: var(--approval); border: 2px solid var(--approval); color: #fff; }
.tapitem.miss { animation: shake .4s; border-color: var(--miss); }
.match { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 18px; }
.match .col { display: grid; gap: 8px; align-content: start; }
.m { min-height: 72px; padding: 8px 10px; border-radius: 14px; border: 2px solid var(--ink); background: var(--card); font-size: 14.5px; font-weight: 700; line-height: 1.3; box-shadow: 3px 3px 0 var(--line); }
.m.code { font-family: var(--mono); font-size: 13px; font-weight: 500; word-break: normal; }
.m[aria-pressed="true"] { background: var(--sky-tint); box-shadow: 3px 3px 0 var(--ink); }
.m.locked { border-color: var(--approval); background: var(--ok-tint); color: var(--approval); box-shadow: none; }
.m.miss { animation: shake .4s; border-color: var(--miss); }

/* labs */
.lab { margin-top: 14px; background: var(--card); border: 2px solid var(--ink); border-radius: 22px; padding: 16px; box-shadow: 4px 4px 0 var(--ink); }
.answers { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin-top: 10px; }
.abox { border: 1.5px solid var(--line); border-radius: 10px; padding: 5px 2px; min-height: 70px; display: flex; flex-direction: column; gap: 3px; align-items: center; background: var(--paper); }
.abox small { font-family: var(--mono); font-size: 9.5px; color: var(--muted); }
.abox .b { display: inline-grid; place-items: center; width: 22px; height: 20px; border-radius: 6px; font-family: var(--mono); font-size: 11px; background: var(--surface); }
.abox .b.us { background: var(--ink); color: var(--paper); }
.abox.has { border-color: var(--ink); }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 14px; }
.seg button { min-height: 48px; border-radius: 12px; border: 2px solid var(--ink); background: var(--paper); font-weight: 700; font-size: 15px; padding: 4px 6px; line-height: 1.25; }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.formula { margin-top: 12px; padding: 12px 14px; border-radius: 14px; background: var(--surface); font-size: 15.5px; animation: enter .3s var(--ease) both; }
.formula b.n { display: block; font-family: var(--display); font-size: 30px; line-height: 1.1; margin-top: 4px; }
.dots { display: grid; grid-template-columns: repeat(10, 1fr); gap: 6px; margin-top: 12px; }
.dots i { aspect-ratio: 1; border-radius: 99px; border: 2px solid var(--ink); background: var(--card); }
.dots i.hit { background: var(--ink); animation: pop .3s var(--ease) both; }
.dots i.miss { animation: pop .3s var(--ease) both; }
.runs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.runs span { font-family: var(--mono); font-size: 13px; padding: 4px 10px; border-radius: 99px; background: var(--surface); animation: pop .3s var(--ease) both; }
.readout { margin-top: 12px; font-size: 16px; }
.readout b { font-family: var(--display); font-size: 30px; }

/* boss */
.arena { margin: 0 -20px; position: relative; color: var(--paper); background: var(--night); }
.arena img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; opacity: .95; }
.arena .ov { position: absolute; left: 0; right: 0; bottom: 0; padding: 40px 18px 14px; background: linear-gradient(180deg, rgba(10,15,30,0) 0%, rgba(10,15,30,.92) 55%); }
.arena h2 { color: var(--paper); font-size: 22px; }
.arena p { color: var(--dust); font-size: 14px; }
.hp { margin-top: 10px; height: 16px; border-radius: 99px; background: #2a3247; border: 2px solid var(--paper); overflow: hidden; }
.hp i { display: block; height: 100%; background: linear-gradient(90deg, var(--dawn), #fff4cf); transition: width .6s var(--ease); }
.hp-l { display: flex; justify-content: space-between; margin-top: 6px; font-family: var(--mono); font-size: 12px; color: var(--dust); }
.arena.hit img { animation: shake .45s; }
.arena.block::after { content: ""; position: absolute; inset: 0; background: rgba(130,188,226,.25); animation: flash .6s ease-out forwards; pointer-events: none; }

/* complete */
.done-wrap { text-align: center; padding-top: 10px; }
.done-wrap .pic { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 22px; border: 2px solid var(--ink); }
.done-wrap h1 { font-size: 30px; margin-top: 18px; }
.bigstars { display: flex; justify-content: center; gap: 10px; margin-top: 12px; }
.bigstars svg { width: 44px; height: 44px; animation: pop .45s var(--ease) both; }
.bigstars svg:nth-child(2) { animation-delay: .15s; } .bigstars svg:nth-child(3) { animation-delay: .3s; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 18px; }
.stat { background: var(--card); border: 2px solid var(--ink); border-radius: 12px; padding: 10px 10px 8px; text-align: left; min-width: 0; }
.stat b { display: block; font-family: var(--display); font-size: 22px; line-height: 1.1; }
.stat span { font-size: 12.5px; color: var(--muted); }
.take { margin-top: 16px; text-align: left; padding: 16px; border-radius: 18px; background: var(--card); border: 2px solid var(--ink); }
.take .kicker { margin-bottom: 6px; display: block; }

/* gate */
.gate .card .in { padding: 20px 18px; }
.gate h1 { font-size: 27px; line-height: 1.25; }
.gate ul { margin: 14px 0 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.gate li { display: flex; gap: 10px; align-items: flex-start; font-size: 16.5px; }
.gate li svg { width: 22px; height: 22px; flex: none; color: var(--approval); margin-top: 2px; }
.consent { margin-top: 12px; font-size: 13.5px; color: var(--muted); line-height: 1.5; }
.consent a { text-underline-offset: 2px; }
.preview-note { margin-top: 12px; padding: 10px 12px; border-radius: 12px; background: var(--mixed-tint); color: var(--mixed); font-size: 13.5px; }

/* sheets */
.scrim { position: fixed; inset: 0; z-index: 60; background: rgba(10,15,30,.45); display: flex; align-items: flex-end; justify-content: center; animation: fade .2s ease-out; }
.sheet { width: 100%; max-width: 520px; max-height: 88dvh; overflow-y: auto; overscroll-behavior: contain; background: var(--card); border-top: 2px solid var(--ink); border-radius: 22px 22px 0 0; padding: 10px 20px calc(20px + var(--safe-b)); animation: rise .3s var(--ease); }
.sheet .grab { width: 44px; height: 5px; border-radius: 99px; background: var(--line); margin: 0 auto 14px; }
.sheet h2 { font-size: 23px; }
.sheet .lead { margin-top: 8px; color: var(--muted); font-size: 15.5px; }
.sheet .acts { display: grid; gap: 10px; margin-top: 18px; }
.sheet #sm > svg { width: 20px; height: 20px; flex: none; }
.sheet input[type="email"], .sheet input[type="text"] { width: 100%; height: 50px; padding: 0 14px; border-radius: 12px; border: 2px solid var(--ink); background: #fff; font-size: 16px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; margin-top: 12px; }
.check input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--ink); flex: none; }
.or { display: flex; align-items: center; gap: 10px; margin: 14px 0 10px; font-size: 13px; color: var(--muted); }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.srcs { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 10px; }
.src { border: 2px solid var(--ink); border-radius: 12px; padding: 12px 14px; background: var(--paper); }
.src a { display: block; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; line-height: 1.4; font-size: 15.5px; }
.src .meta { margin-top: 6px; display: flex; flex-wrap: wrap; gap: 6px 10px; font-size: 12.5px; color: var(--muted); align-items: center; }
.vendor { display: inline-flex; align-items: center; height: 20px; padding: 0 7px; border-radius: 6px; background: var(--dawn); color: var(--ink); font-size: 11.5px; }
.claim { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }

/* pages */
.page { padding: 20px 20px 30px; }
.page h1 { font-size: 30px; }
.page .lead { margin-top: 8px; color: var(--muted); }
.panel { margin-top: 16px; background: var(--card); border: 2px solid var(--ink); border-radius: 20px; padding: 18px 16px; box-shadow: 4px 4px 0 var(--ink); }
.panel h2 { font-size: 20px; }
.gl { margin-top: 10px; border: 2px solid var(--ink); border-radius: 14px; background: var(--card); }
.gl summary { list-style: none; padding: 14px 16px; font-weight: 700; display: flex; align-items: center; gap: 10px; cursor: pointer; }
.gl summary::-webkit-details-marker { display: none; }
.gl summary::after { content: "+"; margin-left: auto; font-family: var(--mono); font-size: 18px; }
.gl[open] summary::after { content: "−"; }
.gl .tb { padding: 0 16px 14px; font-size: 16px; }
.sumcard { margin-top: 16px; border-radius: 22px; border: 2px solid var(--ink); background: var(--card); overflow: hidden; box-shadow: 4px 4px 0 var(--ink); }
.sumcard .head { padding: 18px 16px; background: var(--night); color: var(--paper); }
.sumcard .head h2 { color: var(--paper); font-size: 22px; margin-top: 2px; }
.sumcard .head .mono { color: var(--dust); font-size: 11.5px; }
.sumcard ol { margin: 0; padding: 14px 16px 16px; list-style: none; counter-reset: l; display: grid; gap: 10px; }
.sumcard li { counter-increment: l; display: grid; grid-template-columns: 28px 1fr; gap: 8px; font-size: 16px; line-height: 1.55; }
.sumcard li::before { content: counter(l, decimal-leading-zero); font-family: var(--mono); font-size: 12px; color: var(--muted); padding-top: 3px; }
.sumcard li.lock { color: var(--slate); }
.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); font-size: 16px; }
.toggle-row:first-of-type { border-top: 0; }
.switch { width: 52px; height: 30px; border-radius: 99px; border: 2px solid var(--ink); background: var(--surface); position: relative; flex: none; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 99px; background: var(--ink); transition: transform .2s var(--ease); }
.switch[aria-checked="true"] { background: var(--approval); border-color: var(--approval); }
.switch[aria-checked="true"]::after { transform: translateX(22px); background: #fff; }

.toast { position: fixed; left: 50%; bottom: calc(100px + var(--safe-b)); z-index: 80; transform: translateX(-50%); max-width: calc(100% - 32px); padding: 11px 16px; border-radius: 16px; background: var(--ink); color: var(--paper); font-size: 14.5px; font-weight: 600; text-align: center; animation: rise .3s var(--ease); }
.float-xp { position: fixed; z-index: 70; pointer-events: none; font-family: var(--mono); font-weight: 500; font-size: 18px; color: var(--approval); animation: floatup 1s var(--ease) forwards; }
.spark { position: fixed; z-index: 70; width: 8px; height: 8px; border-radius: 2px; pointer-events: none; }

@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { transform: translateY(24px); opacity: 0; } }
@keyframes enter { from { transform: translateY(10px); opacity: 0; } }
@keyframes stepin { to { opacity: 1; transform: none; } }
@keyframes pop { 0% { transform: scale(.5); opacity: 0; } 70% { transform: scale(1.06); } 100% { transform: scale(1); opacity: 1; } }
@keyframes shake { 0%, 100% { transform: translateX(0); } 20% { transform: translateX(-7px); } 40% { transform: translateX(6px); } 60% { transform: translateX(-4px); } 80% { transform: translateX(3px); } }
@keyframes flash { from { opacity: 1; } to { opacity: 0; } }
@keyframes floatup { from { transform: translate(-50%, 0); opacity: 1; } to { transform: translate(-50%, -54px); opacity: 0; } }
@keyframes blink { 0%, 92%, 100% { transform: scaleY(1); } 96% { transform: scaleY(.1); } }
.face .eyes { transform-origin: 50% 46%; animation: blink 5s infinite; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}
html.rm *, html.rm *::before, html.rm *::after { animation-duration: .001ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }

/* V3 shell and shared components. Phone remains a single reading column. */
[hidden] { display: none !important; }
button, a, input, select, summary { scroll-margin: 112px 0; }
button, a { -webkit-tap-highlight-color: transparent; }
.top { display: grid; grid-template-columns: 1fr auto auto; gap: 8px; padding: 0 16px 12px; background: var(--paper); backdrop-filter: none; }
.top .grow { display: none; }
.brand-strip { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.wordmark { display: inline-flex; flex: none; padding: 18px 0; }
.wordmark img { width: 96px; height: auto; }
.brand { font-size: 19px; min-width: 0; }
.brand-strip .booking-link { display: inline-flex; align-items: center; min-height: 44px; max-width: 215px; font-size: 12px; line-height: 1.4; text-align: right; text-underline-offset: 3px; }
.lang { height: 44px; }
.icon-btn { min-width: 44px; width: 44px; height: 44px; }
.nav-desktop { display: none; }
.hero-copy > .haru { margin: 16px 20px 0; }
.hero .cta-row { padding-bottom: 16px; }
.levels-heading { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; padding: 24px 20px 0; }
.levels-heading h2 { font-size: 18px; }
.levels-heading .progress-strip { flex: 1; min-width: 120px; padding: 0; }
.progress-strip .fill { display: block; }
.levels { gap: 16px; padding-bottom: 24px; }
.level-card { display: flex; flex-direction: column; min-width: 0; border: 2px solid var(--ink); border-radius: 12px; background: var(--card); position: relative; }
.level-card.current { box-shadow: 4px 4px 0 var(--ink); }
.level-card.locked { border-color: var(--line); color: var(--muted); }
.lv { flex: 1; box-shadow: none; border: 0; background: none; border-radius: 10px; padding: 12px; min-width: 0; }
.lv:active { box-shadow: none; transform: none; background: var(--surface); }
.lv-copy { min-width: 0; }
.lv .thumb { border-radius: 12px; }
.lv b { font-size: 20px; margin-top: 8px; }
.lv .meta { gap: 6px 8px; font-size: 12px; }
.next-label { display: block; font-family: var(--mono); font-size: 12px; margin-top: 8px; text-transform: uppercase; }
.locked-mark { display: inline-flex; margin-top: 8px; }
.locked-mark svg { width: 16px; height: 16px; }
.level-card.locked .thumb { filter: saturate(.5); }
.level-card.boss { background: var(--night); color: var(--paper); }
.level-card.boss .meta { color: var(--dust); }
.level-card.boss .lv:active { background: var(--ink); }
.level-card .stars { display: flex; align-items: center; gap: 3px; margin-top: 8px; }
.done-check { color: var(--approval); margin-left: 6px; }
.done-check svg { width: 18px; height: 18px; }
.watch-lesson { align-self: flex-start; margin: 0 12px 8px 120px; min-height: 44px; font-size: 14px; text-decoration: underline; text-underline-offset: 3px; text-align: left; }
.booking-panel { margin: 24px 20px; padding: 24px; border: 1px solid #6a7389; border-radius: 12px; background: #ccbfbc; text-align: left; }
.booking-copy { min-width: 0; }
.booking-panel h2 { margin: 0 0 8px; font-size: 22px; line-height: 1.3; color: var(--ink); text-wrap: balance; }
.booking-panel p { margin: 0; color: var(--ink); font-size: 16px; line-height: 1.6; max-width: 62ch; }
.booking-panel .btn { display: inline-flex; align-items: center; justify-content: center; margin-top: 20px; font-size: 16px; padding: 12px 18px; line-height: 1.4; text-decoration: none; text-align: center; min-height: 52px; }
.booking-panel .btn:hover { background: var(--paper); }
.done-wrap .booking-panel, .page .booking-panel { margin: 24px 0; }
.btn { min-height: 52px; padding-top: 8px; padding-bottom: 8px; line-height: 1.4; }
.card, .panel, .gl, .opt, .fb, .take, .tapitem, .m, .lab, .yesno button { border-radius: 12px; }
.card:has(> .pic) { border-radius: 22px; }
.card, .panel, .lab { box-shadow: none; }
.yesno svg { width: 24px; height: 24px; flex: none; }
.badge { white-space: normal; height: auto; min-height: 28px; line-height: 1.4; padding-top: 3px; padding-bottom: 3px; }
.badge svg { flex: none; }
.actions-in { max-width: 560px; }
.stage p, .stage .bubble, .page p { max-width: 65ch; }
.sheet-open { overflow: hidden; }
.sheet { border-radius: 22px 22px 0 0; }
.words-grid { display: grid; gap: 12px; margin-top: 24px; }
.words-grid .gl { margin: 0; }

/* Inline lesson player: custom controls never cover the video's caption safe area. */
.lesson-heading { max-width: 960px; margin: 0 auto 24px; }
.lesson-heading .haru { max-width: 760px; }
.lesson-layout { display: grid; gap: 24px; align-items: start; }
.lesson-column { width: 100%; min-width: 0; max-width: 960px; margin: 0 auto; }
.lesson-player { border: 2px solid var(--ink); border-radius: 22px; background: var(--night); color: var(--paper); box-shadow: 4px 4px 0 var(--ink); overflow: hidden; scroll-margin-top: 16px; }
.lesson-player:focus-visible { outline-offset: 6px; }
.lesson-media { position: relative; aspect-ratio: 16 / 9; background: var(--night); }
.lesson-media[data-variant="tall"] { aspect-ratio: 4 / 5; }
.lesson-media video { display: block; width: 100%; height: 100%; object-fit: contain; }
.lesson-media video::cue { font-family: "Pretendard", "Apple SD Gothic Neo", system-ui, sans-serif; }
.lesson-play { position: absolute; inset: 0; display: flex; flex-direction: column; gap: 12px; justify-content: center; align-items: center; color: var(--paper); font-family: var(--display); font-weight: 700; font-size: 18px; background: rgba(10,15,30,.14); }
.lesson-play svg { width: 72px; height: 72px; padding: 20px; border-radius: 999px; background: var(--ink); border: 2px solid var(--paper); }
.lesson-play span { background: var(--ink); padding: 4px 12px; border-radius: 999px; }
.lesson-captions { position: absolute; left: 6%; right: 6%; bottom: 7%; width: fit-content; max-width: 88%; margin: auto; padding: 6px 12px; background: rgba(27,34,51,.88); color: var(--paper); border-radius: 6px; font-family: var(--text); font-weight: 500; font-size: 16px; line-height: 1.4; text-align: center; white-space: pre-line; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; pointer-events: none; }
.player-controls { padding: 0 8px 8px; background: var(--card); color: var(--ink); border-top: 2px solid var(--ink); }
.player-timeline { position: relative; height: 44px; }
.player-timeline input { position: relative; width: 100%; height: 44px; margin: 0; padding: 0; accent-color: var(--ink); cursor: pointer; z-index: 2; background: transparent; }
.chapter-ticks { position: absolute; left: 8px; right: 8px; bottom: 7px; pointer-events: none; }
.chapter-ticks i { position: absolute; height: 5px; width: 2px; background: var(--muted); }
.player-buttons { display: flex; align-items: center; flex-wrap: wrap; gap: 0 2px; }
.player-control { min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 8px; font-family: var(--mono); font-size: 13px; line-height: 1; padding: 0 8px; }
.player-control:hover, .player-control:focus-visible { background: var(--surface); }
.player-control[aria-pressed="true"] { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 5px; }
.player-control svg { width: 22px; height: 22px; flex: none; }
.player-spacer { flex: 1; }
.player-speed { min-height: 44px; display: flex; align-items: center; }
.player-speed select { min-height: 44px; min-width: 64px; font: 13px var(--mono); background: var(--card); color: var(--ink); border: 0; padding: 0 4px; cursor: pointer; }
#lesson-time { font-size: 11px; white-space: nowrap; padding: 0 8px; }
.lesson-end { position: absolute; inset: 0; padding: 24px; background: rgba(10,15,30,.92); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 24px; text-align: center; }
.lesson-end h3 { color: var(--paper); font-size: 28px; }
.lesson-end > div { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.lesson-end .player-control { border: 2px solid var(--paper); border-radius: 999px; font-family: var(--display); font-size: 16px; padding: 8px 20px; }
.lesson-end .player-control:hover { background: var(--ink); }
.lesson-end .btn { width: auto; }
.lesson-error { color: var(--ink); background: var(--card); padding: 16px; font-size: 15px; }
.transcript-toggle { display: inline-flex; align-items: center; min-height: 44px; margin-top: 12px; }
.lesson-transcript { padding: 24px; border: 1px solid var(--line); background: var(--card); border-radius: 12px; min-width: 0; max-width: 960px; width: 100%; margin: 0 auto; }
.lesson-transcript h3 { font-size: 20px; margin-top: 24px; }
.lesson-transcript h3:first-child { margin-top: 0; }
.lesson-transcript h4 { font-family: var(--text); font-size: 16px; margin: 0; font-weight: 500; }
.lesson-transcript p { margin-top: 16px; font-size: 17px; line-height: 1.65; }
.lesson-transcript ul { padding-left: 24px; margin-bottom: 0; }
.lesson-transcript li { margin-top: 12px; font-size: 16px; line-height: 1.6; }
.chapter-links { margin-top: 12px; }
.chapter-links button { display: block; text-align: left; min-height: 44px; padding: 8px 0; text-decoration: underline; text-underline-offset: 3px; }
.chapter-links .mono { display: inline-block; font-size: 12px; color: var(--muted); margin-right: 8px; }
.lesson-player:fullscreen { width: 100%; height: 100%; border: 0; border-radius: 0; display: flex; flex-direction: column; }
.lesson-player:fullscreen .lesson-media { flex: 1; min-height: 0; aspect-ratio: auto; }
.lesson-player:fullscreen .player-controls { flex: none; }

@media (max-width: 719px) {
  .hero-img { border-bottom: 2px solid var(--ink); }
  .player-spacer { display: none; }
  #lesson-time { flex: 1; text-align: right; }
  .player-buttons > [data-player="cc"] { margin-left: 0; }
  .lesson-player .player-buttons { justify-content: space-between; }
  .lesson-player .player-buttons > [data-player="cc"]::before { content: none; }
  .player-buttons > [data-player="mute"] { margin-left: auto; }
  .player-controls { padding: 0 8px 8px; }
}

@media (min-width: 720px) {
  #app { max-width: 1296px; width: 100%; padding: 0 32px; }
  .top { display: flex; flex-wrap: wrap; gap: 16px; padding: 8px 0; min-height: 88px; }
  .top .grow { display: block; flex: 1; order: 3; }
  .brand-strip { display: contents; }
  .wordmark { order: 0; padding: 20px 0; }
  .wordmark img { width: 112px; }
  .brand { order: 1; border-left: 1px solid var(--line); padding-left: 16px; }
  .top .chip, .top .lang { order: 4; }
  .brand-strip .booking-link { order: 5; max-width: none; padding: 8px 18px; min-height: 52px; border: 2px solid var(--ink); border-radius: 999px; background: var(--card); font-family: var(--display); font-size: 15px; text-align: center; text-decoration: none; justify-content: center; }
  .nav-phone { display: none; }
  .nav-desktop { display: flex; position: static; order: 6; flex: 1 0 100%; justify-content: center; border: 0; padding: 0; background: transparent; }
  .nav-desktop button { min-height: 44px; padding: 8px 16px; flex-direction: row; gap: 8px; font-size: 14px; border-radius: 999px; }
  .nav-desktop button svg { width: 18px; height: 18px; }
  .nav-desktop button[aria-current="page"] { background: var(--ink); color: var(--paper); }
  .nav-desktop button[aria-current="page"]::before { display: none; }
  .nav-desktop .dot { top: 0; right: 0; left: auto; }
  main { padding: 32px 0 0; }
  .hero { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: center; padding: 0 0 32px; }
  .hero-img { grid-column: 2; grid-row: 1; height: 100%; min-height: 400px; aspect-ratio: 4 / 5; object-fit: cover; border: 2px solid var(--ink); border-radius: 22px; box-shadow: 4px 4px 0 var(--ink); }
  .hero-copy { grid-column: 1; grid-row: 1; min-width: 0; }
  .hero-body { padding: 0; }
  .hero-copy > .haru { margin: 24px 0 0; }
  .hero .cta-row { padding: 24px 0 0; }
  .hero h1 { font-size: 44px; line-height: 1.04; margin-top: 16px; }
  .hero .tag { margin-top: 16px; font-size: 24px; }
  .hero p.sub { font-size: 18px; margin-top: 16px; }
  .hero-copy .haru { display: none; }
  .levels-heading { padding: 32px 0 0; justify-content: space-between; }
  .levels-heading h2 { font-size: 22px; }
  .levels-heading .progress-strip { flex: 0 1 240px; }
  .levels { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; padding: 0; margin: 24px 0 32px; }
  .lv { display: flex; flex-direction: column; align-items: stretch; padding: 16px; }
  .lv .thumb { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 8px; }
  .lv .meta { margin-top: 16px; }
  .lv b { font-size: 22px; }
  .watch-lesson { margin: 0 16px 12px; }
  .level-card.boss { grid-column: 1 / -1; }
  .level-card.boss .lv { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 32px; }
  .level-card.boss .thumb { max-height: 240px; }
  .level-card.boss .watch-lesson { margin-left: calc(50% + 16px); }
  .booking-panel { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin: 32px 0; }
  .booking-panel .btn { margin: 0; width: auto; flex: none; }
  .home-foot { padding: 0 0 32px; }
  .play { width: 100%; max-width: 1120px; margin: 0 auto; }
  .play-top { padding: 16px 0; gap: 16px; }
  .stage { flex: initial; padding: 24px 24px 0; }
  .stage[style] { padding-bottom: 24px !important; }
  .actions { position: static; justify-content: flex-end; margin-top: 24px; padding: 0 24px 48px; }
  .actions-in { max-width: 100%; width: auto; display: flex; justify-content: flex-end; gap: 12px; padding: 0; background: transparent; }
  .actions-in .btn { width: auto; min-width: 220px; max-width: 560px; }
  .q-title, html[lang="ko"] .q-title { font-size: 30px; }
  .play-lesson .stage { padding-top: 16px; }
  .lesson-captions { font-size: 20px; }
  .play-order, .play-match, .play-lab, .play-boss, .play-review, .play.gate { max-width: 808px; }
  .arena { margin: 0; border-radius: 22px; overflow: hidden; }
  .done-wrap { max-width: 760px; margin: 0 auto; }
  .done-wrap > .pic { max-height: 300px; }
  .done-wrap .booking-panel { display: block; }
  .done-wrap .booking-panel .btn { margin-top: 16px; }
  .page { max-width: 760px; margin: 0 auto; padding: 16px 0 48px; }
  .page h1 { font-size: 40px; }
  .scrim { align-items: center; padding: 32px; }
  .sheet { max-width: 560px; border: 2px solid var(--ink); border-radius: 12px; box-shadow: 4px 4px 0 var(--ink); padding: 32px; max-height: calc(100dvh - 64px); }
  .sheet .grab { display: none; }
  .gate .stage { max-width: 560px; margin: 0 auto; width: 100%; }
}

@media (min-width: 1024px) {
  #app { padding: 0 48px; }
  .hero { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 48px; padding-top: 16px; }
  .hero-img { aspect-ratio: 4 / 3; min-height: 480px; }
  .hero h1 { font-size: 56px; }
  .hero-copy .haru { display: flex; }
  .hero-copy .haru .bubble { font-size: 15px; }
  .levels { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .level-card.boss .lv { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
  .level-card.boss .watch-lesson { margin-left: calc(42% + 16px); }
  .quiz-layout { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); column-gap: 48px; align-content: start; }
  .quiz-layout > .kicker, .quiz-layout > .q-title { grid-column: 1; }
  .quiz-layout > .q-title { grid-row: 1 / span 2; margin-top: 0; font-size: 32px; line-height: 1.35; }
  .quiz-layout:has(> .kicker) > .q-title { margin-top: 32px; }
  .quiz-layout > .options { grid-column: 2; grid-row: 1 / span 2; margin-top: 0; }
  .quiz-layout > .fbslot { grid-column: 2; }
  .play-card .stage > .card { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; }
  .play-card .card > .pic { height: 100%; min-height: 320px; }
  .play-card .card > .diagram { border-bottom: 0; padding: 24px; }
  .play-card .card > .in { padding: 32px; }
  .play-card .card h2 { font-size: 30px; }
  .play-swipe .stage { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 0 48px; align-content: start; }
  .play-swipe .stage > .kicker, .play-swipe .stage > .q-title { grid-column: 1; }
  .play-swipe .stage > .q-title { grid-row: 2; }
  .play-swipe .stage > .deck { grid-column: 2; grid-row: 1 / span 3; margin-top: 0; }
  .play-swipe .stage > .yesno, .play-swipe .stage > .fbslot { grid-column: 2; }
  .play-boss .quiz-layout { display: block; }
  .play-boss .quiz-layout > .q-title { margin-top: 16px; }
  .play-boss .quiz-layout > .options { margin-top: 24px; }
  .view-terms .page { max-width: 960px; }
  .words-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
}

@media (min-width: 1200px) {
  .top { flex-wrap: nowrap; gap: 12px; }
  .nav-desktop { order: 2; flex: 1; }
  .top .grow { display: none; }
  .nav-desktop button { padding: 8px 12px; }
  .nav-desktop button svg { display: none; }
}
@media (min-width: 1280px) {
  .lesson-layout:has(.lesson-transcript:not([hidden])) { grid-template-columns: minmax(760px, 1fr) 280px; gap: 32px; }
  .lesson-transcript { padding: 20px; }
  .lesson-transcript p { font-size: 16px; }
}
@media (min-width: 1440px) {
  .hero h1 { font-size: 64px; }
  .hero .tag { font-size: 28px; }
  .nav-desktop button { padding: 8px 16px; }
}

.quest-fallback{max-width:760px;padding:24px;margin:auto}
