/* UI-2 learner app — visual language from the Claude Design handoff (design/project/UI toeic project.dc.html):
   cream canvas, violet primary, lime CTA, mint / sky / pink tiles, Fredoka display + DM Sans text. */
:root {
  --bg: #F4F1EA; --card: #fff; --soft: #F7F4EE; --track: #F0ECE3; --track2: #E6E0D4; --line: #E3DED3; --line2: #EEE9DF;
  --ink: #1F1A2E; --ink2: #3A3150; --muted: #5B546B; --muted2: #8A8398; --muted3: #A39DAF;
  --brand-purple: #7548EA; --violet: var(--brand-purple); --violet2: #8A70E6; --violet3: var(--brand-purple); --violet-ink: var(--brand-purple); --violet-d: #4F37B8; --lilac: #E4DCFF; --lilac2: #C9C1DD;
  --lime: #C8EB45; --lime-sh: #8FAE1E; --lime-ink: #3E4A12;
  --mint: #5AD8A6; --sky: #93D5EC; --pink: #EDAACB; --peach: #F6B9A0; --pink2: #F2C3DA; --orange: #FF7A45;
  --red: #F0567A; --red-d: #D93A62; --red-bg: #FDE8EE; --red-ink: #9B1F43;
  --green: #1F8A5B; --green-bg: #E3F7EE; --green-ink: #1F6B47; --green-bd: #9ED9BD;
  --night: #251E36; --night2: #2F2745; --blob: #241D33;
  --display: 'Fredoka', 'DM Sans', 'Noto Sans Thai', system-ui, sans-serif; --text: 'DM Sans', 'Noto Sans Thai', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --ease: cubic-bezier(.2, .8, .2, 1);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 15px/1.45 var(--text); min-height: 100vh; }
a { color: var(--violet-ink); }
a:hover { color: var(--violet-d); }
button { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; font-family: var(--display); font-weight: 600; }
img { max-width: 100%; }
.hidden { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid var(--violet); outline-offset: 2px; }

/* ---------- keyframes (from the design) ---------- */
@keyframes fbIn { from { opacity: 0; transform: translateY(12px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes scoreIn { from { opacity: 0; transform: translateY(18px) scale(.94); filter: blur(4px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes barGrow { from { width: 0; } }
@keyframes spiderIn { from { opacity: 0; transform: scale(.2); } to { opacity: 1; transform: none; } }
@keyframes popUp { 0% { opacity: 0; transform: translateY(6px) scale(.8); } 20% { opacity: 1; transform: translateY(0) scale(1.1); } 100% { opacity: 0; transform: translateY(-28px); } }
@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.12); } }
@keyframes shake { 0%, 100% { transform: none; } 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
@keyframes lpBarUp { from { transform: scaleY(0); } to { transform: none; } }
@keyframes lpSlide { 0%, 100% { transform: translateX(-3px); } 50% { transform: translateX(4px); } }
@keyframes lpUp { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
@keyframes lpFan { from { opacity: 0; transform: translateY(140px) rotate(-4deg); } to { opacity: 1; transform: none; } }
@keyframes lpFloatL { 0%, 100% { transform: rotate(-4deg) translateY(0); } 50% { transform: rotate(-2deg) translateY(-10px); } }
@keyframes lpFloatR { 0%, 100% { transform: rotate(4deg) translateY(0); } 50% { transform: rotate(6deg) translateY(-10px); } }
@keyframes lpBlink { 0%, 92%, 100% { transform: scaleY(1); } 95% { transform: scaleY(.1); } }
@keyframes lpSwap { from { opacity: 0; transform: translateY(16px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes lpGlow { 0%, 100% { opacity: .7; } 50% { opacity: 1; } }
@keyframes mBlink { 0%, 90%, 100% { transform: scaleY(1); } 94% { transform: scaleY(.1); } }
@keyframes mLook { 0%, 40%, 100% { transform: translateX(0); } 50%, 85% { transform: translateX(3px); } }
@keyframes mWave { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(-16deg); } }
@keyframes mWaveR { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(16deg); } }
@keyframes mBob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
.a-up { animation: lpUp .8s var(--ease) both; }
.a-score { animation: scoreIn .9s var(--ease) both; }
.a-fb { animation: fbIn .45s var(--ease) both; }
.a-shake { animation: shake .45s ease both; }

/* ---------- type helpers ---------- */
.eyebrow { display: flex; align-items: center; gap: 8px; font: 700 11px var(--text); letter-spacing: .14em; text-transform: uppercase; }
.eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--lime); flex: none; }
.disp { font-family: var(--display); font-weight: 600; letter-spacing: -.01em; }
.muted { color: var(--muted); }
.muted2 { color: var(--muted2); }
.small { font-size: 13px; }
.tiny { font-size: 12px; }
.center { text-align: center; }

/* ---------- buttons ---------- */
.btn { all: unset; box-sizing: border-box; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 44px; padding: 0 18px; border-radius: 14px; font: 700 15px var(--text); text-decoration: none; text-align: center;
  transition: transform .1s, box-shadow .1s, background .15s, border-color .15s; }
.btn:focus-visible { outline: 3px solid var(--violet); outline-offset: 2px; }
.btn-lime { background: var(--lime); color: var(--ink); box-shadow: 0 5px 0 var(--lime-sh); height: 54px; padding: 0 26px; font-size: 16px; }
.btn-lime:hover { background: #D4F25E; color: var(--ink); }
.btn-lime:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--lime-sh); }
.btn-violet { background: var(--violet); color: #fff; box-shadow: 0 5px 0 var(--violet-d); height: 54px; font-size: 16px; }
.btn-violet:hover { background: var(--violet3); color: #fff; }
.btn-violet:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--violet-d); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: var(--ink2); color: #fff; }
.btn-ghost { background: #fff; color: var(--ink); border: 1.5px solid var(--line); font-weight: 600; }
.btn-ghost:hover { border-color: var(--ink); color: var(--ink); }
.btn-outline { background: transparent; color: var(--ink); border: 1.5px solid var(--ink); font-weight: 600; }
.btn-sm { min-height: 40px; height: auto; padding: 8px 14px; border-radius: 12px; font-size: 13px; font-weight: 600; box-shadow: none; }
.btn-block { display: flex; width: 100%; }
.btn[disabled], .btn.is-disabled { cursor: not-allowed; background: var(--track2) !important; color: var(--muted3) !important; box-shadow: none !important; transform: none !important; border-color: transparent !important; }
.linkbtn { all: unset; cursor: pointer; color: var(--violet-ink); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.linkbtn:focus-visible { outline: 3px solid var(--violet); outline-offset: 2px; }
.chipbtn { all: unset; box-sizing: border-box; cursor: pointer; padding: 12px 16px; border-radius: 12px; border: 1.5px solid var(--ink); font: 600 14px var(--text); background: #fff; color: var(--ink); min-height: 44px; display: inline-flex; align-items: center; justify-content: center; text-align: center; }
.chipbtn.on { background: var(--ink); color: #fff; }
.seg { display: inline-flex; background: var(--track); border-radius: 10px; padding: 3px; }
.seg button { all: unset; cursor: pointer; padding: 7px 12px; border-radius: 8px; font: 600 12px var(--text); color: var(--muted2); min-height: 20px; }
.seg button.on { background: #fff; color: var(--ink); }
.seg button:focus-visible { outline: 2px solid var(--violet); }
.spinner { width: 28px; height: 28px; border: 3px solid var(--line); border-top-color: var(--violet); border-radius: 50%; animation: spin .8s linear infinite; }
.loading { display: flex; align-items: center; justify-content: center; min-height: 50vh; }

/* ---------- app shell ---------- */
.shell { min-height: 100vh; display: flex; flex-direction: column; }
.topbar { display: flex; align-items: center; gap: 28px; padding: 22px 48px; position: relative; z-index: 3; }
.brand { font: 700 28px/1 var(--display); color: var(--ink); text-decoration: none; }
.brand:hover { color: var(--ink); }
.navpill { display: flex; gap: 4px; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 5px; }
.navpill a { padding: 10px 16px; border-radius: 10px; font: 600 14px var(--text); color: var(--muted); text-decoration: none; }
.navpill a:hover { color: var(--ink); }
.navpill a.on { background: var(--ink); color: #fff; }
.spacer { flex: 1; }
.streak { display: flex; align-items: center; gap: 8px; font: 600 14px var(--text); }
.streak i { width: 10px; height: 10px; border-radius: 50%; background: var(--orange); }
.avatar { all: unset; cursor: pointer; width: 40px; height: 40px; border-radius: 50%; background: var(--peach); display: flex; align-items: center; justify-content: center; font: 700 13px var(--text); color: var(--ink); }
.avatar:focus-visible { outline: 3px solid var(--violet); }
.menu { position: absolute; right: 48px; top: 72px; background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 16px 40px rgba(31,26,46,.18); padding: 8px; min-width: 230px; z-index: 40; animation: fbIn .25s var(--ease) both; }
.menu .who { padding: 10px 12px; font: 500 13px var(--text); color: var(--muted); border-bottom: 1px solid var(--line2); margin-bottom: 6px; word-break: break-all; }
.menu .who b { display: block; color: var(--ink); font-size: 14px; }
.menu button, .menu a { all: unset; box-sizing: border-box; display: block; width: 100%; cursor: pointer; padding: 10px 12px; border-radius: 10px; font: 600 14px var(--text); color: var(--ink); }
.menu button:hover, .menu a:hover { background: var(--soft); }
.page { padding: 8px 48px 48px; display: flex; flex-direction: column; gap: 24px; width: 100%; max-width: 1280px; margin: 0 auto; flex: 1; }
.page-title { font: 600 40px/1.05 var(--display); }
.mhead { display: none; align-items: center; gap: 10px; min-height: 44px; }
.mhead .t { flex: 1; font: 600 26px/1 var(--display); }
.mhead .b { font: 700 22px/1 var(--display); color: var(--violet-ink); }
.mback { all: unset; box-sizing: border-box; cursor: pointer; width: 44px; height: 44px; flex: none; border-radius: 12px; border: 1.5px solid var(--line); background: #fff; display: flex; align-items: center; justify-content: center; font: 700 18px var(--text); color: var(--ink); text-decoration: none; }
.bottomnav { display: none; }
.banner { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 14px 18px; border-radius: 18px; background: #fff; border: 2px solid var(--ink); }
.banner .t { flex: 1; min-width: 200px; display: flex; flex-direction: column; gap: 2px; }
.banner .t b { font: 600 16px var(--display); }
.toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 14px; font: 600 14px var(--text); z-index: 90; max-width: calc(100vw - 32px); animation: fbIn .3s var(--ease) both; box-shadow: 0 10px 30px rgba(0,0,0,.25); }

/* ---------- cards / tiles ---------- */
.card { background: #fff; border: 1px solid var(--line); border-radius: 28px; padding: 24px; }
.hero { position: relative; overflow: hidden; background: var(--violet); color: #fff; border-radius: 28px; padding: 30px 34px; display: flex; flex-direction: column; gap: 12px; }
.hero > * { position: relative; }
.hero .blobc { position: absolute; border-radius: 50%; background: var(--violet2); pointer-events: none; }
.hero .sub { color: var(--lilac); font: 500 15px/1.5 var(--text); }
.stat-grid { display: grid; gap: 10px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stat { background: rgba(255,255,255,.14); border-radius: 16px; padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; }
.stat .k { font: 600 13px var(--text); color: var(--lilac); }
.stat .v { font: 600 24px/1.1 var(--display); }
.stat .s { font: 500 12px var(--text); color: var(--lilac); }
.bar { height: 8px; border-radius: 4px; background: var(--track); overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: 4px; background: var(--ink); animation: barGrow 1s var(--ease) .2s both; transition: width .35s; }
.notice { padding: 14px 16px; border-radius: 14px; background: var(--soft); font: 500 14px/1.5 var(--text); color: var(--muted); }
.alert { display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px; border-radius: 14px; background: var(--red-bg); border: 1.5px solid var(--red); color: #7A1734; }
.alert .i { width: 22px; height: 22px; flex: none; border-radius: 50%; background: var(--red-d); color: #fff; display: flex; align-items: center; justify-content: center; font: 700 13px var(--text); }
.alert .t { flex: 1; display: flex; flex-direction: column; gap: 3px; font: 400 13px/1.4 var(--text); }
.alert .t b { font: 600 14px var(--text); }
.alert .x { all: unset; cursor: pointer; font: 600 18px var(--text); padding: 0 6px; }
.alert.info { background: var(--green-bg); border-color: var(--green-bd); color: var(--green-ink); }
.alert.info .i { background: var(--green); }

/* ---------- mascot (placeholder blob, not yet approved) ---------- */
.mascot { position: relative; }
.mascot .body { position: absolute; inset: 0; border-radius: 50% 50% 44% 44% / 56% 56% 44% 44%; }
.mascot .eyes { position: absolute; display: flex; gap: 6px; }
.mascot .eye { border-radius: 50%; background: var(--bg); display: flex; align-items: center; justify-content: center; animation: mBlink 4.2s ease-in-out infinite; }
.mascot .pupil { border-radius: 50%; background: var(--blob); animation: mLook 5s ease-in-out infinite; }
.mascot .smile { position: absolute; border: 5px solid var(--ink); border-top: none; border-radius: 0 0 22px 22px; }
.mascot .mouth { position: absolute; border-radius: 0 0 18px 18px; background: var(--bg); }

/* ---------- forms ---------- */
.field { display: flex; flex-direction: column; gap: 8px; font: 600 13px var(--text); }
.field input { height: 52px; border-radius: 14px; border: 1.5px solid var(--line); background: #fff; padding: 0 16px; font: 400 16px var(--text); color: var(--ink); outline: none; min-width: 0; }
.field input:focus { border-color: var(--violet); }
.field input.bad { border-color: var(--red); }
.divider { display: flex; align-items: center; gap: 12px; font: 500 12px var(--text); color: var(--muted2); }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.gbtn { all: unset; box-sizing: border-box; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 12px; height: 52px; border-radius: 14px; background: #fff; border: 1.5px solid var(--line); font: 600 15px var(--text); color: var(--ink); text-decoration: none; }
.gbtn:hover { border-color: var(--ink); color: var(--ink); }
.gbtn[disabled] { opacity: .5; cursor: not-allowed; }
.devtag { font: 600 11px ui-monospace, Menlo, monospace; color: #8A5A00; background: #FFF1D6; border-radius: 6px; padding: 4px 8px; align-self: flex-start; }

/* ---------- welcome / sign in (2a) ---------- */
.welcome { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); background: var(--bg); }
.welcome .left { position: relative; overflow: hidden; background: var(--violet); display: flex; flex-direction: column; padding: 48px 56px; color: #fff; min-height: 640px; }
.welcome .left .moon { position: absolute; left: -120px; bottom: -260px; width: 760px; height: 560px; border-radius: 50%; background: var(--bg); }
.welcome .left h1 { position: relative; margin: 64px 0 0; font: 600 64px/1 var(--display); letter-spacing: -.01em; max-width: 480px; text-wrap: balance; }
.welcome .left p { position: relative; margin: 18px 0 0; font: 400 17px/1.45 var(--text); color: var(--lilac); max-width: 400px; }
.welcome .right { display: flex; align-items: center; justify-content: center; padding: 48px; }
.welcome .form { width: 100%; max-width: 400px; display: flex; flex-direction: column; gap: 18px; }
.welcome .form h2 { font: 600 34px/1.1 var(--display); }

/* ---------- onboarding (2b) ---------- */
.steps { flex: 1; display: flex; gap: 6px; max-width: 360px; margin: 0 auto; }
.steps i { flex: 1; height: 6px; border-radius: 3px; background: var(--line); }
.steps i.on { background: var(--violet); }
.ob-wrap { flex: 1; display: grid; grid-template-columns: minmax(0, 820px); justify-content: center; padding: 24px 48px 64px; align-items: center; }
.ob { display: flex; flex-direction: column; gap: 36px; }
.ob h1 { font: 600 48px/1.05 var(--display); }
.ob-card { background: #fff; border: 1px solid var(--line); border-radius: 28px; padding: 32px 36px 28px; display: flex; flex-direction: column; gap: 20px; }
.ob-target { font: 600 56px/1 var(--display); color: var(--violet-ink); }
.ob input[type=range] { width: 100%; accent-color: var(--violet); height: 28px; cursor: pointer; margin: 0; }
.ob-marks { position: relative; height: 40px; margin: 0 10px; }
.ob-marks span { position: absolute; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 3px; }
.ob-marks span i { width: 2px; height: 8px; background: var(--lilac2); }
.ob-marks button { all: unset; cursor: pointer; font: 700 12px var(--text); color: var(--muted); padding: 2px; }
.ob-marks button.on { color: var(--violet-ink); }
.ob-marks-m { display: none; justify-content: space-between; font: 600 12px var(--text); color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.datefield { display: flex; align-items: center; gap: 12px; font: 600 13px var(--text); flex-wrap: wrap; }
.datefield input { height: 46px; border-radius: 12px; border: 1.5px solid var(--line); background: #fff; padding: 0 14px; font: 500 16px var(--text); color: var(--ink); outline: none; }
.datefield input:focus { border-color: var(--violet); }

/* ---------- intro screens (2c / 5b / 5c) ---------- */
.intro-wrap { flex: 1; display: flex; align-items: center; justify-content: center; padding: 0 48px 48px; }
.intro { position: relative; width: 100%; max-width: 980px; background: var(--violet); border-radius: 32px; overflow: hidden; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); color: #fff; }
.intro .l { padding: 48px; display: flex; flex-direction: column; gap: 18px; position: relative; z-index: 1; }
.intro h1 { font: 600 48px/1.05 var(--display); text-wrap: balance; }
.intro .lead { font: 400 16px/1.45 var(--text); color: var(--lilac); max-width: 420px; }
.intro .bul { display: flex; flex-direction: column; gap: 8px; font: 500 14px var(--text); }
.intro .r { position: relative; min-height: 460px; }
.intro .r .moon { position: absolute; left: 0; right: -80px; top: 40px; bottom: -60px; border-radius: 50%; background: var(--pink2); }
.intro .r .mascot { position: absolute; left: 50%; top: 50%; transform: translate(-45%, -45%); }
.intro .stat .v { font-size: 28px; line-height: 1; }
.intro .stat { background: rgba(255,255,255,.12); padding: 14px; }
.hpcheck { display: flex; align-items: center; gap: 14px; background: rgba(255,255,255,.12); border-radius: 16px; padding: 12px 14px; max-width: 440px; }
.hpcheck .t { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.hpcheck .t b { font: 600 14px var(--text); }
.hpcheck .t span { font: 500 12px var(--text); color: var(--lilac); }
.hpcheck button { all: unset; cursor: pointer; padding: 9px 14px; border-radius: 10px; font: 700 13px var(--text); background: #fff; color: var(--ink); min-height: 22px; }
.hpcheck button.ok { background: var(--lime); }
.resumebox { display: flex; flex-direction: column; gap: 8px; background: rgba(255,255,255,.12); border-radius: 16px; padding: 14px 16px; max-width: 420px; }
.resumebox .row { display: flex; justify-content: space-between; font: 600 13px var(--text); gap: 10px; }
.resumebox .track { height: 6px; border-radius: 3px; background: rgba(255,255,255,.2); }
.resumebox .track i { display: block; height: 100%; border-radius: 3px; background: var(--lime); }
.dur-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.dur { border-radius: 16px; padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; color: var(--ink); }
.dur .k { font: 600 13px var(--text); } .dur .v { font: 600 26px/1.1 var(--display); } .dur .s { font: 500 12px var(--text); }

/* ---------- test / practice shell (2d, 3a) ---------- */
.tbar { display: flex; align-items: center; gap: 16px; padding: 18px 40px; border-bottom: 1px solid var(--line); background: #fff; position: sticky; top: 0; z-index: 10; }
.tbar .brand { font-size: 22px; }
.tbar .where { font: 600 14px var(--text); color: var(--muted); }
.chip { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 12px; background: var(--track); font: 600 13px var(--text); color: var(--muted); white-space: nowrap; }
.chip i { width: 8px; height: 8px; border-radius: 50%; background: var(--muted3); }
.chip.on-fb { background: var(--green-bg); color: var(--green-ink); } .chip.on-fb i { background: var(--green); }
.chip.timer { background: var(--ink); color: #fff; font-variant-numeric: tabular-nums; }
.chip.timer.low { background: var(--red-d); }
.tbody { flex: 1; display: flex; justify-content: center; padding: 28px 40px 40px; min-height: 0; }
.qcard { width: 100%; max-width: 880px; background: #fff; border: 1px solid var(--line); border-radius: 24px; padding: 32px 44px; display: flex; flex-direction: column; gap: 20px; }
.qcard.wide { max-width: 1100px; }
.qprog { display: flex; flex-direction: column; gap: 10px; }
.qprog .row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.qprog .row b { font: 700 14px var(--text); }
.qprog .row span { font: 500 13px var(--text); color: var(--muted2); text-align: right; }
.qprog .bar > i { background: var(--violet); }
.qtext { margin: 4px 0 0; font: 500 26px/1.5 var(--text); text-wrap: pretty; }
.qtext .blank { display: inline-block; min-width: 90px; border-bottom: 3px solid var(--ink); margin: 0 4px; transform: translateY(-4px); }
.qsub { font: 600 16px/1.4 var(--text); }
.opts { display: flex; flex-direction: column; gap: 12px; }
.opt { all: unset; box-sizing: border-box; cursor: pointer; display: flex; align-items: center; gap: 16px; padding: 14px 18px; border-radius: 16px; border: 2px solid var(--line); background: #fff; min-height: 56px; }
.opt:hover:not(.locked) { border-color: var(--violet); }
.opt:focus-visible { outline: 3px solid var(--violet); outline-offset: 2px; }
.opt .k { width: 36px; height: 36px; flex: none; border-radius: 10px; display: flex; align-items: center; justify-content: center; font: 700 15px var(--text); background: var(--track); color: var(--ink); }
.opt .t { flex: 1; font: 500 18px/1.35 var(--text); }
.opt .m { font: 700 13px var(--text); color: var(--green); white-space: nowrap; }
.opt.sel { border-color: var(--violet); background: #F1ECFF; } .opt.sel .k { background: var(--violet); color: #fff; }
.opt.right { border-color: var(--green); background: var(--green-bg); } .opt.right .k { background: var(--green); color: #fff; }
.opt.wrong { border-color: var(--red-d); background: var(--red-bg); } .opt.wrong .k { background: var(--red-d); color: #fff; } .opt.wrong .m { color: var(--red-d); }
.opt.dim { opacity: .5; }
.opt.locked { cursor: default; }
.opts.small .opt { padding: 9px 10px; gap: 10px; border-radius: 12px; min-height: 44px; }
.opts.small .opt .k { width: 28px; height: 28px; border-radius: 8px; font-size: 13px; }
.opts.small .opt .t { font: 500 14px/1.3 var(--text); }
.opts.tiles { flex-direction: row; gap: 16px; }
.opts.tiles .opt { flex: 1; height: 120px; flex-direction: column; justify-content: center; gap: 8px; padding: 10px; }
.opts.tiles .opt .k { width: 52px; height: 52px; border-radius: 14px; font-size: 22px; }
.opts.tiles .opt .m { font-size: 12px; }
.opts.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.opts.grid2 .opt { height: 110px; justify-content: center; flex-direction: column; gap: 6px; }
.opts.grid2 .opt .k { width: 52px; height: 52px; border-radius: 14px; font-size: 22px; }
.qfoot { display: flex; justify-content: flex-end; align-items: center; gap: 16px; flex-wrap: wrap; }
.qfoot .hint { font: 500 13px var(--text); color: var(--muted2); }
.qfoot .btn { height: 52px; padding: 0 28px; }
.saved { font: 500 12px var(--text); color: var(--muted2); min-height: 16px; }

/* audio bar */
.abar { display: flex; align-items: center; gap: 16px; padding: 14px 18px; border-radius: 16px; background: var(--ink); color: #fff; }
.abar .ic { all: unset; box-sizing: border-box; width: 40px; height: 40px; flex: none; border-radius: 12px; background: #A99FC4; display: flex; align-items: center; justify-content: center; cursor: default; }
.abar .ic.live { background: var(--lime); }
.abar .ic.play { cursor: pointer; background: var(--lime); }
.abar .ic.play:focus-visible { outline: 3px solid #fff; }
.abar .tx { flex: 1; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.abar .row { display: flex; justify-content: space-between; gap: 10px; font: 600 13px var(--text); }
.abar .row span:last-child { color: #A99FC4; font-weight: 500; white-space: nowrap; }
.abar .trk { height: 6px; border-radius: 3px; background: rgba(255,255,255,.15); overflow: hidden; }
.abar .trk i { display: block; height: 100%; border-radius: 3px; background: var(--lime); width: 0; transition: width .4s linear; }
.lmedia { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 28px; }
.photo { border-radius: 18px; border: 1.5px solid var(--line); overflow: hidden; background: repeating-linear-gradient(135deg, var(--bg) 0 12px, #ECE7DD 12px 24px); display: flex; align-items: center; justify-content: center; }
.photo img { display: block; width: 100%; height: auto; }
.lvisual { border-radius: 18px; border: 1.5px solid var(--line); padding: 14px; overflow-x: auto; font-size: 14px; }
.lvisual table { border-collapse: collapse; width: 100%; } .lvisual td, .lvisual th { border: 1px solid var(--line); padding: 6px 8px; text-align: left; }
.dirs { padding: 16px 18px; border-radius: 16px; background: var(--soft); display: flex; flex-direction: column; gap: 6px; font: 400 15px/1.55 var(--text); color: var(--muted); }
.dirs b { font: 600 18px var(--display); color: var(--ink); }
.lcenter { font: 500 16px/1.5 var(--text); color: var(--muted); text-align: center; }
.qcols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.qbox { display: flex; flex-direction: column; gap: 10px; padding: 16px; border-radius: 18px; background: var(--soft); }
.qbox .n { font: 700 12px var(--text); color: var(--violet-ink); }
.qbox .q { font: 600 15px/1.4 var(--text); min-height: 21px; }
.qbox.focus { box-shadow: 0 0 0 2px var(--violet) inset; }

/* reading set (3e) */
.rset { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; padding: 20px 40px 40px; align-items: start; width: 100%; max-width: 1280px; margin: 0 auto; }
.rset-head { padding: 20px 40px 0; display: flex; flex-direction: column; gap: 10px; width: 100%; max-width: 1280px; margin: 0 auto; }
.docpane { position: sticky; top: 92px; max-height: calc(100vh - 120px); overflow-y: auto; background: #fff; border: 1px solid var(--line); border-radius: 24px; padding: 28px 32px; font: 400 16px/1.75 var(--text); }
.docpane .rv-blank { background: #F1ECFF; border-radius: 4px; padding: 0 4px; font-weight: 700; }
.docpane .rv-blank.rv-active { background: var(--lime); }
.docpane table { border-collapse: collapse; } .docpane td, .docpane th { border: 1px solid var(--line); padding: 4px 8px; }
.qpane { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.qitem { background: #fff; border: 1px solid var(--line); border-radius: 24px; padding: 22px 24px; display: flex; flex-direction: column; gap: 12px; }
.qitem .qh { display: flex; align-items: flex-start; gap: 10px; }
.qtag { background: var(--sky); padding: 5px 10px; border-radius: 8px; font: 700 12px var(--text); flex: none; }
.qitem .qh span:last-child { font: 600 16px/1.4 var(--text); }
.stimulus { white-space: pre-wrap; background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 18px; }

/* feedback card (3a) */
.fb { border-radius: 20px; border: 2px solid var(--red-bd, #F3A5B8); overflow: hidden; display: flex; flex-direction: column; background: #fff; animation: fbIn .45s var(--ease) both; }
.fb.ok { border-color: var(--green-bd); }
.fb .head { display: flex; align-items: center; gap: 12px; padding: 14px 20px; background: var(--red-bg); color: var(--red-ink); }
.fb.ok .head { background: var(--green-bg); color: var(--green-ink); }
.fb .ico { width: 32px; height: 32px; flex: none; border-radius: 50%; background: var(--red-d); color: #fff; display: flex; align-items: center; justify-content: center; font: 700 16px var(--text); }
.fb.ok .ico { background: var(--green); }
.fb .ttl { flex: 1; font: 600 22px/1 var(--display); }
.fb .sum { font: 600 13px var(--text); }
.fb .blocks { padding: 18px 20px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.fb .blk { padding: 14px 16px; border-radius: 14px; background: var(--green-bg); display: flex; flex-direction: column; gap: 6px; }
.fb .blk b { font: 700 11px var(--text); letter-spacing: .1em; color: var(--green-ink); text-transform: uppercase; }
.fb .blk span { font: 400 14px/1.5 var(--text); color: var(--ink); text-wrap: pretty; }
.fb .blk.bad { background: var(--red-bg); } .fb .blk.bad b { color: var(--red-ink); }
.fb .blk.tip { background: var(--soft); } .fb .blk.tip b { color: var(--muted); }
.fb .foot { padding: 0 20px 16px; font: 500 12px var(--text); color: var(--muted2); }
.fb.compact .head { padding: 10px 14px; } .fb.compact .ico { width: 26px; height: 26px; font-size: 13px; } .fb.compact .ttl { font-size: 17px; }
.fb.compact .blocks { padding: 12px 14px; grid-template-columns: minmax(0, 1fr); gap: 8px; } .fb.compact .blk { padding: 10px 12px; } .fb.compact .blk span { font-size: 13px; }
.transcript { margin: 0 20px 20px; padding: 16px; border-radius: 14px; border: 1.5px solid var(--line); display: flex; flex-direction: column; gap: 8px; }
.transcript > b { font: 700 11px var(--text); letter-spacing: .1em; color: var(--muted); }
.tline { display: grid; grid-template-columns: minmax(44px, max-content) minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 10px; font: 500 15px/1.4 var(--text); }
.tline .tg { font: 700 13px var(--text); }
.tline.right { background: var(--green-bg); } .tline.right .mk { color: var(--green); }
.tline.wrong { background: var(--red-bg); } .tline.wrong .mk { color: var(--red-d); }
.tline .mk { font: 700 12px var(--text); }

/* dialogs */
.scrim { position: fixed; inset: 0; z-index: 60; background: rgba(31,26,46,.5); display: flex; align-items: center; justify-content: center; padding: 16px; }
.dialog { width: 460px; max-width: 100%; background: #fff; border-radius: 26px; padding: 30px; display: flex; flex-direction: column; gap: 14px; box-shadow: 0 20px 60px rgba(31,26,46,.3); animation: fbIn .35s var(--ease) both; max-height: calc(100vh - 32px); overflow-y: auto; }
.dialog h2 { font: 600 26px/1.1 var(--display); }
.dialog p { margin: 0; font: 400 15px/1.5 var(--text); color: var(--muted); }
.dialog .acts { display: flex; justify-content: flex-end; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
.dialog .acts .btn { height: 48px; }
.gate { all: unset; box-sizing: border-box; cursor: pointer; width: 380px; max-width: 100%; background: #fff; border-radius: 28px; padding: 36px 32px; display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; box-shadow: 0 20px 60px rgba(31,26,46,.35); }
.gate:active { transform: scale(.98); }
.gate .ring { width: 84px; height: 84px; border-radius: 50%; background: var(--lime); border: 3px solid var(--ink); display: flex; align-items: center; justify-content: center; }
.gate b { font: 600 28px/1.1 var(--display); color: var(--ink); }
.gate span { font: 400 14px/1.5 var(--text); color: var(--muted); }

/* ---------- result (2e) ---------- */
.res { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 24px; align-items: stretch; }
.bigscore { font: 600 96px/.95 var(--display); letter-spacing: -.02em; }
.pill { background: rgba(255,255,255,.14); padding: 7px 12px; border-radius: 10px; font: 600 13px var(--text); }
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.sec-tiles { display: flex; gap: 10px; flex-wrap: wrap; }
.sec-tile { border-radius: 16px; padding: 14px 18px; color: var(--ink); }
.sec-tile .k { font: 600 13px var(--text); } .sec-tile .v { font: 600 28px/1.15 var(--display); }
.tgtline { display: flex; align-items: center; gap: 8px; font: 600 15px/1.4 var(--text); }
.tgtline::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--lime); flex: none; }
.spider { position: relative; }
.spider svg { width: 100%; height: auto; display: block; overflow: visible; }
.spider .lab { position: absolute; display: flex; flex-direction: column; gap: 2px; white-space: nowrap; pointer-events: none; }
.spider .lab b { font: 700 13px var(--text); } .spider .lab span { font: 600 12px var(--text); padding: 3px 8px; border-radius: 7px; color: var(--ink); }
.legend { display: flex; gap: 14px; font: 500 12px var(--text); color: var(--muted); }
.legend span { display: flex; align-items: center; gap: 6px; } .legend i { width: 10px; height: 10px; border-radius: 3px; }
.recnext { grid-column: 1 / -1; background: var(--lime); border-radius: 28px; padding: 28px 36px; display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 40px; row-gap: 8px; align-items: center; }
.recnext .acts { grid-column: 2; grid-row: 1 / span 3; display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.recnext .acts a:not(.btn) { color: var(--ink); font-weight: 600; }
.plist { display: none; flex-direction: column; gap: 4px; }
.plist div { display: flex; justify-content: space-between; font: 500 13px var(--text); padding: 4px 8px; border-radius: 8px; }

/* ---------- dashboard (1b) ---------- */
.bento { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); grid-auto-rows: minmax(150px, auto); gap: 18px; }
.tile { border-radius: 28px; padding: 24px; display: flex; flex-direction: column; gap: 8px; }
.tile .k { font: 600 14px var(--text); }
.tile .v { font: 600 44px/1 var(--display); }
.tile .s { font: 500 13px var(--text); }
.t-hero { grid-column: span 5; grid-row: span 3; position: relative; overflow: hidden; background: var(--violet); border-radius: 32px; padding: 36px; gap: 10px; color: #fff; }
.t-hero > *:not(.bg):not(.mascot-wrap) { position: relative; z-index: 1; }
.t-hero .bg { position: absolute; right: -120px; bottom: -140px; width: 420px; height: 420px; border-radius: 50%; background: var(--violet2); }
.t-hero .mascot-wrap { position: absolute; right: 40px; bottom: 0; width: 170px; height: 200px; animation: mBob 3s ease-in-out infinite; }
.t-hero .score { font: 600 88px/.95 var(--display); letter-spacing: -.02em; }
.t-exam { grid-column: span 3; background: var(--lime); justify-content: space-between; }
.t-exam .v { font-size: 64px; }
.t-rec { grid-column: span 4; background: #fff; border: 1px solid var(--line); padding: 22px 24px; }
.t-l { grid-column: span 3; background: var(--mint); }
.t-acc { grid-column: span 4; grid-row: span 2; background: #fff; border: 1px solid var(--line); gap: 14px; }
.t-r { grid-column: span 3; background: var(--sky); }
.t-words { grid-column: span 12; background: var(--pink); flex-direction: row; align-items: center; gap: 24px; padding: 24px 28px; }
.accrow { display: flex; flex-direction: column; gap: 7px; padding: 12px 14px; border-radius: 14px; background: var(--soft); }
.accrow .row { display: flex; justify-content: space-between; font: 600 13px var(--text); gap: 8px; }
.accrow .bar { background: var(--track2); }
.dash-d { display: flex; flex-direction: column; gap: 18px; }
.dash-m { display: none; }

/* ---------- practice hub (4a) / tests (5a) / words (6a) ---------- */
.cols2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.colhead { display: flex; align-items: center; gap: 12px; padding: 14px 20px; border-radius: 18px; }
.colhead b { font: 600 24px/1 var(--display); flex: 1; }
.colhead span { font: 600 13px var(--text); }
.pcard { background: #fff; border: 1px solid var(--line); border-radius: 22px; padding: 20px 22px; display: flex; flex-direction: column; gap: 12px; }
.pcard .top { display: flex; align-items: center; gap: 12px; }
.pbadge { width: 44px; height: 44px; flex: none; border-radius: 12px; display: flex; align-items: center; justify-content: center; font: 700 14px var(--text); }
.pcard .nm { flex: 1; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.pcard .nm b { font: 600 17px var(--text); } .pcard .nm span { font: 500 12px var(--text); color: var(--muted2); }
.pcard .acc { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; }
.pcard .acc b { font: 600 22px/1 var(--display); } .pcard .acc span { font: 500 11px var(--text); color: var(--muted2); }
.pcard .bot { display: flex; align-items: center; gap: 14px; }
.pcard .bot .bar { flex: 1; }
.tests2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; }
.chart { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 8px; }
.chart .y { position: relative; height: 260px; font: 500 11px var(--text); color: var(--muted2); }
.chart .y span { position: absolute; right: 0; transform: translateY(50%); }
.chart .plot { position: relative; height: 260px; border-left: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.chart .gl { position: absolute; left: 0; right: 0; border-top: 1px dashed var(--line2); }
.chart .tl { position: absolute; left: 0; right: 0; border-top: 2px dashed var(--red); }
.chart .tlab { position: absolute; right: 8px; transform: translateY(-4px); font: 700 11px var(--text); color: var(--red-d); }
.chart svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.chart .dot { position: absolute; width: 14px; height: 14px; transform: translate(-50%, 50%); border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 2px var(--violet); background: #fff; }
.chart .dot.last { background: var(--violet); }
.chart .rl { position: absolute; transform: translate(-50%, -8px); font: 700 12px var(--text); white-space: nowrap; color: var(--muted2); }
.chart .rl.last { color: var(--ink); }
.chart .x { position: relative; height: 18px; font: 500 12px var(--text); color: var(--muted); }
.chart .x span { position: absolute; transform: translateX(-50%); white-space: nowrap; }
.htable { display: flex; flex-direction: column; }
.htable .r { display: grid; grid-template-columns: 110px 150px 1fr 1fr 150px; gap: 12px; padding: 12px 14px; border-top: 1px solid var(--line2); font: 500 14px var(--text); align-items: center; }
.htable .r.h { border-top: none; padding: 10px 14px; font: 700 11px var(--text); letter-spacing: .08em; color: var(--muted2); }
.htable .r span:last-child { text-align: right; }
.empty { padding: 28px; text-align: center; color: var(--muted2); font: 500 14px var(--text); }
.deck-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.deck { all: unset; box-sizing: border-box; cursor: pointer; background: #fff; border: 1px solid var(--line); border-radius: 22px; padding: 20px 22px; display: flex; flex-direction: column; gap: 12px; color: var(--ink); }
.deck:hover { border-color: var(--ink); }
.deck:focus-visible { outline: 3px solid var(--violet); }
.deck .top { display: flex; align-items: center; gap: 12px; }
.deck .lt { width: 44px; height: 44px; flex: none; border-radius: 12px; border: 2px solid var(--ink); display: flex; align-items: center; justify-content: center; font: 700 16px var(--display); }
.deck .nm { flex: 1; display: flex; flex-direction: column; gap: 2px; } .deck .nm b { font: 600 16px var(--text); } .deck .nm span { font: 500 12px var(--text); color: var(--muted2); }
.deck .ft { display: flex; justify-content: space-between; font: 600 12px var(--text); color: var(--muted); }

/* ---------- word rush (6b) ---------- */
.rush { min-height: 100vh; background: var(--night); color: #fff; position: relative; overflow: hidden; display: flex; flex-direction: column; }
.rush .bgc { position: absolute; left: -160px; bottom: -220px; width: 560px; height: 560px; border-radius: 50%; background: var(--night2); }
.rush header { position: relative; display: flex; align-items: center; gap: 20px; padding: 22px 40px; }
.rush .quit { display: flex; align-items: center; padding: 10px 14px; border-radius: 12px; border: 1.5px solid rgba(255,255,255,.2); font: 600 14px var(--text); color: #fff; text-decoration: none; }
.rush .quit:hover { color: #fff; border-color: #fff; }
.rush .dots { flex: 1; display: flex; gap: 6px; max-width: 520px; margin: 0 auto; }
.rush .dots i { flex: 1; height: 8px; border-radius: 4px; background: rgba(255,255,255,.15); }
.rush .dots i.done { background: var(--lime); } .rush .dots i.cur { background: #fff; }
.rush .hearts { display: flex; gap: 4px; font: 700 18px var(--text); }
.rush .hearts span { color: var(--red); } .rush .hearts span.off { color: rgba(255,255,255,.18); }
.rush .pts { display: flex; align-items: baseline; gap: 6px; padding: 8px 14px; border-radius: 12px; background: var(--lime); color: var(--ink); }
.rush .pts b { font: 600 22px/1 var(--display); } .rush .pts small { font: 700 11px var(--text); }
.gain { display: inline-block; margin-left: 6px; color: var(--lime); font-weight: 700; animation: popUp 1.1s ease-out both; }
.rush main { position: relative; flex: 1; display: flex; flex-direction: column; align-items: center; gap: 26px; padding: 24px 40px 40px; }
.rush .meta { display: flex; align-items: center; gap: 10px; font: 600 13px var(--text); color: var(--lilac2); }
.combo { padding: 5px 10px; border-radius: 8px; background: rgba(255,255,255,.1); color: var(--lilac2); font-weight: 700; display: inline-block; }
.combo.hot { background: var(--orange); color: var(--ink); animation: pulse .9s ease-in-out infinite; }
.rush .word { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.rush .word small { font: 700 12px var(--text); letter-spacing: .14em; color: #A99FC4; }
.rush .word b { font: 600 76px/1 var(--display); letter-spacing: -.01em; }
.rush .word span { font: 500 15px var(--text); color: var(--lilac2); }
.ropts { width: 100%; max-width: 880px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.ropt { all: unset; box-sizing: border-box; cursor: pointer; display: flex; align-items: center; gap: 16px; padding: 22px 24px; border-radius: 20px; color: var(--ink); border: 3px solid var(--ink); box-shadow: 0 6px 0 #120E1C; }
.ropt:active:not(.locked) { transform: translateY(4px); }
.ropt:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.ropt .k { width: 44px; height: 44px; flex: none; border-radius: 12px; background: rgba(255,255,255,.65); display: flex; align-items: center; justify-content: center; font: 700 20px var(--display); }
.ropt .t { flex: 1; font: 600 19px/1.3 var(--text); }
.ropt .m { font: 700 22px var(--text); }
.ropt.locked { cursor: default; }
.ropt.hit { background: var(--mint) !important; border-color: #fff; animation: pulse .5s ease 1; }
.ropt.miss { background: var(--red) !important; border-color: #fff; animation: shake .45s ease 1; }
.ropt.dim { opacity: .35; }
.rfb { width: 100%; max-width: 880px; display: flex; align-items: center; gap: 20px; padding: 18px 22px; border-radius: 20px; color: var(--ink); animation: fbIn .4s var(--ease) both; }
.rfb .i { width: 48px; height: 48px; flex: none; border-radius: 50%; background: var(--ink); display: flex; align-items: center; justify-content: center; font: 700 22px var(--text); }
.rfb .t { flex: 1; display: flex; flex-direction: column; gap: 4px; } .rfb .t b { font: 600 20px/1.1 var(--display); } .rfb .t span { font: 500 14px/1.45 var(--text); }
.rfb .btn { height: 52px; white-space: nowrap; }
.rover { width: 520px; max-width: 100%; background: var(--bg); color: var(--ink); border-radius: 32px; padding: 36px; display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; animation: fbIn .5s var(--ease) both; margin: auto; }
.rover .sc { font: 600 88px/1 var(--display); color: var(--violet-ink); }
.missed { display: flex; flex-wrap: wrap; gap: 8px; }
.missed span { padding: 8px 12px; border-radius: 10px; background: var(--red-bg); border: 1.5px solid var(--red); font: 600 13px var(--text); }

/* ---------- challenge (7a) & landing rules ---------- */
.feebox { display: flex; align-self: flex-start; color: var(--ink); align-items: stretch; background: #fff; border: 2px solid var(--ink); border-radius: 22px; box-shadow: 0 5px 0 var(--ink); overflow: hidden; text-align: left; }
.feebox .a { display: flex; flex-direction: column; gap: 4px; padding: 16px 22px; }
.feebox .a small { font: 700 11px var(--text); letter-spacing: .12em; color: var(--muted); }
.feebox .old { position: relative; display: inline-block; font: 600 38px/1 var(--display); color: var(--muted); align-self: flex-start; }
.feebox .old::after { content: ""; position: absolute; left: -4px; right: -4px; top: 52%; height: 5px; border-radius: 3px; background: var(--red); transform-origin: left; animation: barGrow .6s var(--ease) 1.2s both; }
.feebox .cut { width: 0; border-left: 2px dashed var(--ink); margin: 12px 0; }
.feebox .b { display: flex; align-items: center; gap: 14px; padding: 16px 22px; background: var(--lime); }
.feebox .zero { font: 600 50px/1 var(--display); animation: scoreIn .7s var(--ease) 1.5s both; }
.feebox .b span { display: flex; flex-direction: column; gap: 2px; } .feebox .b span b { font: 600 18px var(--display); } .feebox .b span small { font: 500 13px var(--text); color: #2F3A0A; }
.rules { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.rule { background: #fff; border: 2px solid var(--ink); border-radius: 20px; padding: 20px; display: flex; flex-direction: column; gap: 10px; }
.rule .ill { height: 96px; margin: -6px -6px 4px; border-radius: 14px; border: 2px solid var(--ink); position: relative; overflow: hidden; display: flex; align-items: flex-end; justify-content: center; padding: 12px; }
.rule .num { width: 34px; height: 34px; border-radius: 10px; border: 2px solid var(--ink); display: flex; align-items: center; justify-content: center; font: 700 14px var(--display); }
.rule .st { padding: 5px 10px; border-radius: 8px; font: 700 11px var(--text); }
.rule .tt { font: 600 17px/1.3 var(--text); } .rule .dd { font: 500 13px/1.45 var(--text); color: var(--muted); }
.how { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.how div { display: flex; flex-direction: column; gap: 6px; padding: 18px; border-radius: 18px; background: var(--soft); }
.how div b:first-child { font: 600 28px/1 var(--display); color: var(--violet-ink); }
.how div b:nth-child(2) { font: 600 16px var(--text); } .how div span { font: 500 13px/1.45 var(--text); color: var(--muted); }
.checkbox { all: unset; cursor: pointer; display: flex; align-items: flex-start; gap: 10px; font: 500 13px/1.45 var(--text); color: var(--muted); }
.checkbox i { width: 22px; height: 22px; flex: none; border-radius: 7px; border: 2px solid var(--ink); display: flex; align-items: center; justify-content: center; font: 700 13px var(--text); font-style: normal; color: var(--lime); }
.checkbox.on i { background: var(--ink); }

/* ---------- landing (8a/8b/8c) ---------- */
.lp { position: relative; overflow: hidden; background: var(--bg); min-height: 100vh; display: flex; flex-direction: column; }
.lp .glow { position: absolute; left: 50%; top: -260px; width: 900px; height: 600px; transform: translateX(-50%); border-radius: 50%; background: radial-gradient(closest-side, rgba(112,83,217,.16), rgba(112,83,217,0)); animation: lpGlow 6s ease-in-out infinite; pointer-events: none; }
.lp header { position: relative; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 26px 48px; z-index: 2; }
.lp header .brand { font-size: 30px; }
.lp header .acts { display: flex; justify-content: flex-end; align-items: center; gap: 20px; }
.lp header .acts a:first-child { font: 600 14px var(--text); color: var(--ink); text-decoration: none; }
.lp .hero-t { position: relative; display: flex; flex-direction: column; align-items: center; gap: 18px; padding: 40px 48px 0; text-align: center; }
.lp h1 { font: 600 68px/1.04 var(--display); letter-spacing: -.01em; max-width: 900px; animation: lpUp .8s var(--ease) .12s both; }
.lp h1 em { font-style: normal; color: var(--violet-ink); }
.lp .lead { margin: 0; max-width: 600px; font: 400 17px/1.55 var(--text); color: var(--muted); animation: lpUp .8s var(--ease) .24s both; }
.tag { position: absolute; display: flex; flex-direction: column; gap: 2px; }
.tag b { padding: 7px 12px; border-radius: 10px; font: 700 13px var(--text); color: var(--ink); }
.tag i { width: 0; height: 0; border-left: 8px solid transparent; border-right: 8px solid transparent; border-bottom: 14px solid; }
.tag.l { left: 70px; top: 40px; align-items: flex-end; transform: rotate(-4deg); animation: lpFloatL 4s ease-in-out infinite; }
.tag.l i { transform: rotate(-30deg); margin-right: -6px; }
.tag.r { right: 140px; top: 230px; align-items: flex-start; transform: rotate(4deg); animation: lpFloatR 4.6s ease-in-out .8s infinite; }
.tag.r i { transform: rotate(30deg); margin-left: -6px; }
.carousel { position: relative; height: 290px; margin-top: 16px; overflow: hidden; touch-action: pan-y; user-select: none; cursor: grab; }
.carousel .card-f { position: absolute; left: 50%; top: 14px; width: 260px; height: 215px; margin-left: -130px; transition: transform .45s var(--ease), opacity .3s, filter .35s; cursor: pointer; }
.carousel .card-f > div { animation: lpFan .9s var(--ease) both; position: relative; width: 100%; height: 100%; border-radius: 30px; border: 3px solid var(--ink); overflow: hidden; padding: 24px; display: flex; flex-direction: column; gap: 4px; color: var(--ink); box-shadow: 0 20px 40px rgba(31,26,46,.18); }
.carousel .card-f.on > div { border-color: #fff; }
.carousel .card-f b { font: 600 26px/1.05 var(--display); } .carousel .card-f small { font: 500 14px var(--text); opacity: .75; }
.carousel .card-f .chip2 { position: absolute; left: 20px; bottom: 22px; padding: 8px 12px; border-radius: 14px; background: #fff; border: 3px solid var(--ink); font: 700 15px var(--text); transform: rotate(-8deg); }
.carousel .card-f .mini { position: absolute; right: -20px; bottom: -40px; width: 190px; height: 230px; transform: scale(.5); transform-origin: bottom right; }
.carousel .fade { position: absolute; left: 0; right: 0; bottom: 0; height: 60px; z-index: 15; pointer-events: none; background: linear-gradient(rgba(244,241,234,0), var(--bg)); }
.carousel .arrow { all: unset; cursor: pointer; position: absolute; top: 24px; z-index: 20; width: 52px; height: 52px; border-radius: 50%; background: var(--ink); border: 2px solid #fff; box-shadow: 0 6px 16px rgba(0,0,0,.4); display: flex; align-items: center; justify-content: center; font: 700 20px var(--text); color: #fff; }
.carousel .arrow:hover { background: var(--ink2); } .carousel .arrow.prev { left: 16px; } .carousel .arrow.next { right: 16px; }
.lpfeat { position: relative; z-index: 30; background: var(--bg); padding: 24px 48px 64px; display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.3fr); gap: 40px; align-items: start; }
.lpfeat .dots { display: flex; gap: 8px; }
.lpfeat .dots button { all: unset; cursor: pointer; height: 8px; width: 8px; border-radius: 4px; background: #D6D0C4; transition: width .3s; }
.lpfeat .dots button.on { width: 28px; background: var(--ink); }
.lpfeat h2 { font: 600 40px/1.05 var(--display); }
.lpfeat .pts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 6px; }
.lpfeat .pt { display: flex; align-items: flex-start; gap: 10px; padding: 12px; border-radius: 16px; background: #fff; border: 2px solid var(--ink); }
.lpfeat .pt > i { width: 34px; height: 34px; flex: none; border-radius: 10px; border: 2px solid var(--ink); display: flex; align-items: center; justify-content: center; font: 700 14px var(--display); font-style: normal; }
.lpfeat .pt span { display: flex; flex-direction: column; gap: 2px; min-width: 0; } .lpfeat .pt span b { font: 600 14px var(--text); } .lpfeat .pt span small { font: 500 13px/1.45 var(--text); color: var(--muted); }
.browser { border-radius: 20px; border: 2px solid var(--ink); background: #fff; overflow: hidden; box-shadow: 0 8px 0 var(--ink); }
.browser .bar2 { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-bottom: 2px solid var(--ink); background: #EEE9DF; }
.browser .bar2 i { width: 12px; height: 12px; border-radius: 50%; border: 1.5px solid var(--ink); }
.browser .bar2 span { flex: 1; margin-left: 10px; padding: 6px 12px; border-radius: 8px; background: #fff; font: 500 12px ui-monospace, Menlo, monospace; color: var(--muted); }
.browser .shot { height: 470px; overflow: hidden; background: var(--bg); }
.browser .shot img { display: block; width: 100%; height: auto; animation: lpSwap .5s var(--ease) both; }
.phone-shot { position: absolute; right: 0; bottom: -40px; width: 170px; z-index: 2; }
.phone-shot img { display: block; width: 100%; height: auto; filter: drop-shadow(0 20px 30px rgba(0,0,0,.25)); animation: lpSwap .6s var(--ease) .15s both; }
.plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.plan { border: 2px solid var(--ink); border-radius: 28px; padding: 30px; display: flex; flex-direction: column; gap: 14px; min-height: 380px; }
.plan small { font: 700 12px var(--text); letter-spacing: .14em; }
.plan b { font: 600 40px/1 var(--display); }
.plan hr { width: 100%; height: 1px; border: 0; background: currentColor; opacity: .2; margin: 0; }
.plan span { font: 500 15px/1.45 var(--text); }
.price-chip { display: inline-flex; align-items: center; gap: 10px; padding: 14px 22px; border-radius: 16px; background: var(--lime); color: var(--ink); border: 2px solid var(--ink); }
.price-chip small { font: 700 11px var(--text); letter-spacing: .12em; } .price-chip b { font: 600 24px/1 var(--display); }

/* =============================== mobile (design *-m frames, 390 wide) =============================== */
@media (max-width: 760px) {
  body { font-size: 15px; }
  .topbar { display: none; }
  .mhead { display: flex; }
  .page { padding: 8px 16px calc(110px + env(safe-area-inset-bottom)); gap: 16px; }
  .page-title { display: none; }
  .bottomnav { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; background: #fff; border-top: 1px solid var(--line); padding: 8px 6px calc(12px + env(safe-area-inset-bottom)); }
  .bottomnav a { display: flex; align-items: center; justify-content: center; min-height: 44px; text-decoration: none; }
  .bottomnav a span { padding: 8px 10px; border-radius: 12px; font: 600 12px var(--text); color: var(--muted2); }
  .bottomnav a.on span { background: var(--ink); color: #fff; }
  .menu { right: 16px; top: 60px; }
  .hero { padding: 20px; border-radius: 24px; gap: 10px; }
  .hero .blobc { display: none; }
  .stat-grid { gap: 8px; } .stat { padding: 12px; border-radius: 14px; } .stat .v { font-size: 22px; } .stat .k { font-size: 11px; order: 2; }
  .btn-lime, .btn-violet { height: 54px; width: 100%; }
  .banner .btn { width: 100%; }
  /* welcome */
  .welcome { grid-template-columns: minmax(0, 1fr); }
  .welcome .left { min-height: 0; padding: 26px 22px 26px; gap: 10px; }
  .welcome .left .moon { display: none; }
  .welcome .left h1 { margin: 10px 0 0; font-size: 30px; line-height: 1.05; max-width: 230px; }
  .welcome .left p { display: none; }
  .welcome .left .mascot-slot { position: absolute !important; right: 18px; bottom: -14px; left: auto !important; transform: scale(.46); transform-origin: bottom right; }
  .welcome .left .shadow { display: none; }
  .welcome .right { padding: 20px 16px 32px; align-items: flex-start; }
  .welcome .form { gap: 16px; } .welcome .form h2 { font-size: 28px; }
  /* onboarding */
  .ob-wrap { padding: 8px 16px 24px; align-items: start; }
  .ob { gap: 16px; } .ob h1 { font-size: 32px; }
  .ob-card { padding: 18px; border-radius: 22px; gap: 12px; }
  .ob-target { font-size: 44px; }
  .ob-marks { display: none; } .ob-marks-m { display: flex; }
  .chips.ex { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .chips.ex .chipbtn { padding: 0 8px; font-size: 13px; }
  .ob .acts { display: grid !important; grid-template-columns: auto 1fr; }
  .topbar-ob { padding: 16px !important; gap: 10px !important; }
  .topbar-ob .brand { font-size: 24px; }
  /* intro */
  .intro-wrap { padding: 8px 16px calc(24px + env(safe-area-inset-bottom)); align-items: start; }
  .intro { grid-template-columns: minmax(0, 1fr); border-radius: 28px; }
  .intro .l { padding: 24px 20px; gap: 14px; }
  .intro h1 { font-size: 32px; max-width: 220px; }
  .intro .lead { font-size: 14px; }
  .intro .r { position: absolute; right: 0; top: 0; min-height: 0; width: 150px; height: 140px; }
  .intro .r .moon { left: 10px; right: -40px; top: -30px; bottom: auto; height: 160px; }
  .intro .r .mascot { transform: translate(-30%, -60%) scale(.47); }
  .intro .r .mascot .arm, .intro .r .mascot .band { display: none; }
  .hpcheck { padding: 10px 12px; }
  .dur-grid { gap: 8px; } .dur { padding: 12px; border-radius: 14px; } .dur .v { font-size: 22px; }
  .intro-head { padding: 16px !important; }
  /* test shell */
  .tbar { padding: 12px 16px; gap: 8px; flex-wrap: wrap; }
  .tbar .brand, .tbar .where { display: none; }
  .tbar .chip { order: 3; }
  .tbody { padding: 12px 16px calc(24px + env(safe-area-inset-bottom)); }
  .qcard { padding: 0; background: transparent; border: 0; gap: 16px; }
  .qprog .row span { display: none; }
  .qtext { font-size: 20px; }
  .opt { padding: 12px 14px; gap: 12px; } .opt .k { width: 34px; height: 34px; font-size: 14px; } .opt .t { font-size: 16px; }
  .opts.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
  .opts.tiles .opt { height: 88px; gap: 4px; } .opts.tiles .opt .k, .opts.grid2 .opt .k { width: 44px; height: 44px; font-size: 20px; }
  .opts.grid2 .opt { height: 88px; }
  .qfoot { flex-direction: column-reverse; align-items: stretch; gap: 8px; }
  .qfoot .hint { text-align: center; font-size: 12px; }
  .qfoot .btn { width: 100%; height: 54px; }
  .abar { padding: 12px 14px; gap: 12px; } .abar .ic { width: 36px; height: 36px; border-radius: 10px; } .abar .row { font-size: 12px; }
  .lmedia { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .qcols { grid-template-columns: minmax(0, 1fr); }
  .qbox { background: #fff; border: 1px solid var(--line); }
  .rset-head { padding: 12px 16px 0; }
  .rset { grid-template-columns: minmax(0, 1fr); padding: 12px 16px calc(24px + env(safe-area-inset-bottom)); gap: 14px; }
  .docpane { position: sticky; top: 0; z-index: 3; max-height: 230px; border-radius: 18px; padding: 14px; font-size: 15px; line-height: 1.7; box-shadow: 0 8px 12px -10px rgba(31,26,46,.35); }
  .docpane-note { display: block !important; }
  .qitem { padding: 16px; border-radius: 20px; }
  .fb .blocks { grid-template-columns: minmax(0, 1fr); padding: 12px 14px; gap: 8px; }
  .fb .head { padding: 12px 14px; } .fb .ttl { font-size: 18px; }
  .transcript { margin: 0 14px 14px; padding: 12px; }
  .tline { grid-template-columns: minmax(30px, max-content) minmax(0, 1fr) auto; font-size: 14px; }
  .scrim.sheet { align-items: flex-end; padding: 0; }
  .scrim.sheet .dialog { width: 100%; border-radius: 26px 26px 0 0; padding: 24px 20px calc(34px + env(safe-area-inset-bottom)); }
  .scrim.sheet .dialog .acts { flex-direction: column-reverse; } .scrim.sheet .dialog .acts .btn { width: 100%; }
  /* result */
  .res { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .bigscore { font-size: 60px; }
  .res .hero { padding: 22px 20px; border-radius: 26px; }
  .sec-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; } .sec-tile .v { font-size: 22px; } .sec-tile { padding: 12px; }
  .spider .lab span { display: none; } .spider .lab b { font-size: 11px; }
  .spider { margin: 18px 34px 22px; }
  .plist { display: flex; }
  .recnext { grid-template-columns: minmax(0, 1fr); padding: 18px; border-radius: 24px; }
  .recnext .acts { grid-column: 1; grid-row: auto; flex-direction: column; align-items: stretch; gap: 10px; }
  .recnext .acts .btn { width: 100%; } .recnext .acts a:not(.btn) { text-align: center; padding: 8px; }
  /* dashboard */
  .dash-d { display: none; }
  .dash-m { display: flex; flex-direction: column; margin: -8px -16px 0; }
  /* hubs */
  .cols2, .tests2 { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .colhead { padding: 12px 16px; border-radius: 16px; } .colhead b { font-size: 20px; }
  .pcard { padding: 14px 16px; border-radius: 18px; gap: 10px; } .pbadge { width: 38px; height: 38px; font-size: 13px; }
  .pcard .nm b { font-size: 15px; } .pcard .acc span { display: none; } .pcard .acc b { font-size: 20px; }
  .chart { grid-template-columns: minmax(0, 1fr); margin: 16px 8px 0; } .chart .y, .chart .rl, .chart .tlab { display: none; } .chart .plot { height: 190px; }
  .htable .r { grid-template-columns: 60px 1fr auto; } .htable .r.h { display: none; } .htable .r span:nth-child(3), .htable .r span:nth-child(4) { display: none; }
  .deck-grid { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .deck { padding: 14px 16px; border-radius: 18px; gap: 8px; }
  /* rush */
  .rush header { padding: 16px; gap: 10px; flex-wrap: wrap; }
  .rush .dots { order: 2; flex-basis: 100%; gap: 3px; } .rush .dots i { height: 6px; }
  .rush main { padding: 8px 16px 24px; gap: 18px; }
  .rush .word b { font-size: 48px; }
  .ropts { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .ropt { padding: 14px 16px; min-height: 60px; gap: 12px; border-radius: 16px; box-shadow: 0 5px 0 #120E1C; } .ropt .k { width: 34px; height: 34px; font-size: 16px; } .ropt .t { font-size: 16px; }
  .rfb { flex-direction: column; align-items: stretch; gap: 10px; padding: 14px; } .rfb .i { display: none; } .rfb .btn { width: 100%; }
  .rover { padding: 24px 20px; border-radius: 26px; } .rover .sc { font-size: 64px; }
  /* challenge / landing */
  .feebox { flex-direction: column; align-self: stretch; } .feebox .cut { width: auto; height: 0; border-left: 0; border-top: 2px dashed var(--ink); margin: 0 12px; }
  .feebox .old { font-size: 28px; } .feebox .zero { font-size: 36px; } .feebox .a, .feebox .b { padding: 12px 14px; }
  .rules, .how, .plans { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .rule { padding: 14px; } .rule .ill { margin: 0; }
  .lp header { grid-template-columns: 1fr auto; padding: 16px; gap: 10px; }
  .lp header .brand { font-size: 26px; }
  .lp header nav { grid-column: 1 / -1; grid-row: 2; justify-self: center; }
  .lp header .acts { gap: 12px; } .lp header .acts .btn { padding: 0 14px; }
  .lp .hero-t { padding: 24px 16px 0; }
  .lp h1 { font-size: 38px; } .lp .lead { font-size: 15px; }
  .tag { display: none; }
  .carousel { height: 250px; } .carousel .arrow { top: auto; bottom: 30px; width: 44px; height: 44px; }
  .lpfeat { grid-template-columns: minmax(0, 1fr); padding: 16px 16px 48px; gap: 24px; }
  .lpfeat h2 { font-size: 30px; } .lpfeat .pts { grid-template-columns: minmax(0, 1fr); }
  .browser .shot { height: 260px; } .phone-shot { display: none; }
  .lp section { padding-left: 16px !important; padding-right: 16px !important; }
  .lp .big-h1 { white-space: normal !important; font-size: 36px !important; }
}
@media (min-width: 761px) and (max-width: 1100px) {
  .topbar { padding: 18px 24px; gap: 16px; }
  .page { padding: 8px 24px 40px; }
  .t-hero { grid-column: span 12; grid-row: span 2; }
  .t-exam, .t-l, .t-r { grid-column: span 4; }
  .t-rec, .t-acc { grid-column: span 6; }
  .deck-grid, .rules, .how { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .intro { grid-template-columns: minmax(0, 1fr); } .intro .r { display: none; }
  .lp h1 { font-size: 52px; } .tag { display: none; }
}

/* landing: panel cross-fade when the selected feature changes (no page rebuild) */
.lp-swap { transition: opacity .16s ease, transform .16s ease; }
.lp-swap.out { opacity: 0; transform: translateY(8px); }
#lpText { display: flex; flex-direction: column; gap: 14px; }
#lpText > * { animation: lpSwap .45s var(--ease) both; }
#lpText > *:nth-child(2) { animation-delay: .04s; } #lpText > *:nth-child(3) { animation-delay: .08s; } #lpText > *:nth-child(4) { animation-delay: .12s; }

/* ---------------------------------------------------------------- 2e v2 pretest result (design 29-9-2569) */
@keyframes mCA { 0%,30% { opacity: 0; transform: translate(0,0) rotate(0); } 38% { opacity: 1; } 78%,100% { opacity: 0; transform: translate(26px,-54px) rotate(240deg); } }
@keyframes mCB { 0%,30% { opacity: 0; transform: translate(0,0) rotate(0); } 38% { opacity: 1; } 78%,100% { opacity: 0; transform: translate(58px,-24px) rotate(-200deg); } }
@keyframes mCC { 0%,30% { opacity: 0; transform: translate(0,0) rotate(0); } 38% { opacity: 1; } 78%,100% { opacity: 0; transform: translate(50px,30px) rotate(180deg); } }
@keyframes mCD { 0%,30% { opacity: 0; transform: translate(0,0) rotate(0); } 38% { opacity: 1; } 78%,100% { opacity: 0; transform: translate(4px,-66px) rotate(300deg); } }
@keyframes mCE { 0%,30% { opacity: 0; transform: translate(0,0) rotate(0); } 38% { opacity: 1; } 78%,100% { opacity: 0; transform: translate(70px,4px) rotate(-260deg); } }
.res.v2 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.res .lcol { display: flex; flex-direction: column; gap: 20px; }
.hero.pre2 { border-radius: 32px; padding: 32px 36px; gap: 14px; justify-content: center; flex: 1; }
.done-t { align-self: flex-start; display: flex; flex-direction: column; gap: 4px; padding: 0 4px; }
.done-t .t { font: 600 34px/1.1 var(--display); animation: scoreIn .7s var(--ease) both; }
.done-t .s { font: 500 15px/1.4 var(--text); color: var(--lilac); }
.confetti { position: absolute; top: 14px; width: 0; height: 0; }
.confetti i { position: absolute; display: block; }
.confetti i:nth-child(1) { width: 9px; height: 9px; border-radius: 2px; background: #C8EB45; animation: mCA 2.4s ease-out infinite; }
.confetti i:nth-child(2) { width: 8px; height: 8px; border-radius: 50%; background: #FFD84D; animation: mCB 2.4s ease-out infinite .2s; }
.confetti i:nth-child(3) { width: 10px; height: 5px; border-radius: 2px; background: #F0567A; animation: mCC 2.4s ease-out infinite .1s; }
.confetti i:nth-child(4) { width: 7px; height: 7px; border-radius: 50%; background: #93D5EC; animation: mCD 2.4s ease-out infinite .3s; }
.confetti i:nth-child(5) { width: 10px; height: 5px; border-radius: 2px; background: #FF8A5B; animation: mCE 2.4s ease-out infinite .15s; }
.hero .hr { height: 1px; background: rgba(255,255,255,.2); margin: 4px 0; }
.ptrow { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.ptrow .bigscore { line-height: .9; }
.lvl { background: var(--lime); color: var(--ink); border: 2px solid var(--ink); border-radius: 999px; padding: 8px 18px; font: 700 16px var(--text); }
.scalebar { display: flex; flex-direction: column; gap: 6px; margin-top: 4px; }
.scalebar .trk { position: relative; height: 10px; border-radius: 6px; background: rgba(255,255,255,.2); }
.scalebar .band { position: absolute; top: 0; bottom: 0; border-radius: 6px; background: var(--lime); animation: barGrow .9s var(--ease) both; }
.scalebar .pt { position: absolute; top: 50%; width: 16px; height: 16px; margin: -8px 0 0 -8px; border-radius: 50%; background: #fff; border: 3px solid var(--ink); }
.scalebar .tg { position: absolute; top: -5px; width: 3px; height: 20px; margin-left: -1px; border-radius: 2px; background: #FFD84D; }
.scalebar .lb { display: flex; justify-content: space-between; gap: 10px; font: 600 13px var(--text); color: var(--lilac); }
.scalebar .lb .y { color: #FFD84D; }
.gapline { font: 600 20px/1.3 var(--display); }
.pill.l { background: #FFB08F; color: var(--ink); } .pill.r { background: #DCD3FA; color: var(--ink); }
.estnote { font: 500 12px/1.5 var(--text); color: var(--lilac); }
.hero .revbtn { display: none; }
.revcard { background: #fff; border: 1px solid var(--line); border-radius: 24px; padding: 20px 24px; display: flex; align-items: center; gap: 16px; }
.revcard .t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.revcard .t b { font: 600 20px var(--display); } .revcard .t span { font: 500 14px/1.45 var(--text); color: var(--muted); }
.btn-soft { background: var(--bg); border: 2px solid var(--ink); color: var(--ink); }
@media (max-width: 760px) {
  .res.v2 { grid-template-columns: minmax(0, 1fr); }
  .hero.pre2 { padding: 22px 20px; border-radius: 26px; gap: 10px; }
  .done-t .t { font-size: 26px; } .done-t .s { font-size: 13px; }
  .confetti { transform: scale(.8); }
  .ptrow { gap: 12px; } .ptrow .bigscore { font-size: 68px; }
  .lvl { padding: 6px 14px; font-size: 14px; }
  .scalebar .lb { font-size: 12px; } .gapline { font-size: 18px; }
  .hero .revbtn { display: flex; align-items: center; justify-content: center; min-height: 50px; background: #fff; color: var(--ink); border: 2px solid var(--ink); border-radius: 14px; font: 700 15px var(--text); }
  .revcard { display: none; }
}

/* ---------------------------------------------------------------- answer explanation (EXPL-TH-1) + pretest review */
.fb .blk ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; }
.fb .blk li { font: 400 14px/1.55 var(--text); color: var(--ink); text-wrap: pretty; }
.fb .blk li.mine { font-weight: 500; }
.fb .blk .lt { font-weight: 700; }
.fb .blk.why-ok .lt { color: var(--green-ink); } .fb .blk.bad .lt { color: var(--red-ink); }
.fb .blk .yours { display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 6px; background: #fff; font: 700 11px var(--text); color: var(--red-ink); vertical-align: 1px; }
.fb.skip { border-color: var(--line); } .fb.skip .head { background: var(--soft); color: var(--muted); } .fb.skip .ico { background: var(--muted2); }
.revnav { display: flex; flex-wrap: wrap; gap: 6px; }
.revnav button { min-width: 36px; height: 36px; padding: 0 6px; border-radius: 10px; border: 1.5px solid var(--line); background: #fff; font: 700 13px var(--text); color: var(--ink); cursor: pointer; position: relative; }
.revnav button.ok { background: var(--green-bg); border-color: var(--green-bd); color: var(--green-ink); }
.revnav button.bad { background: var(--red-bg); border-color: var(--red-bd, #F3A5B8); color: var(--red-ink); }
.revnav button.skip { background: var(--soft); color: var(--muted); }
.revnav button.cur { outline: 3px solid var(--violet); outline-offset: 1px; }
.revnav button.ch::after { content: ""; position: absolute; top: -4px; right: -4px; width: 10px; height: 10px; border-radius: 50%; background: #FFD84D; border: 1.5px solid var(--ink); }
.revtop { display: flex; flex-direction: column; gap: 12px; padding: 16px 20px; border-radius: 20px; background: #fff; border: 1px solid var(--line); }
.revtop .row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.revtop .row .sp { flex: 1; }
.revtop .legend { font: 500 12px var(--text); color: var(--muted); display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
/* Thai labels: no letter-spacing / uppercase (they were set for English capitals) */
.fb .blk > b, .transcript > b { letter-spacing: 0; text-transform: none; font-size: 13px; }
/* design update 02 (2026-09-29): answer card 3a / 3b / 3e — head with skill tag + Save star, Key clue, one block per choice */
.chbadge { display: inline-flex; align-items: center; gap: 5px; height: 24px; flex: none; padding: 0 10px 0 8px; border-radius: 999px; background: #1F1A2E; color: #C8EB45; font: 700 12px var(--text); letter-spacing: .02em; vertical-align: middle; }
.qprog .row .lbl, .revtop .row .lbl { display: flex; align-items: center; gap: 10px; }
.qprog .row .lbl .chbadge, .revtop .row .lbl .chbadge { display: inline-flex; color: #C8EB45; font: 700 12px var(--text); text-align: left; }
.qbox .n { display: flex; align-items: center; gap: 8px; }
.qitem .qh .chbadge { margin-top: 1px; }
.fb .head { flex-wrap: nowrap; }
.fb .hd { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.fb .hd .ttl { flex: none; }
.fb .meta { display: flex; align-items: center; gap: 8px; flex: none; margin-left: 8px; padding-left: 14px; border-left: 1.5px solid rgba(31, 26, 46, .12); }
.fb .meta .tests { font: 500 12px var(--text); color: #5B546B; }
.fb .skilltag { display: inline-flex; align-items: center; height: 28px; padding: 0 12px; border-radius: 999px; background: #fff; border: 1.5px solid #D8CEF7; color: #4F37B8; font: 700 13px var(--text); white-space: nowrap; }
.fb .star { all: unset; cursor: pointer; box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 36px; padding: 0 14px; border-radius: 999px;
  border: 1.5px solid #E3DED3; background: #fff; font: 700 13px var(--text); color: #1F1A2E; transition: background .2s, border-color .2s; }
.fb .star svg { fill: none; stroke: #5B546B; }
.fb .star.on { background: #FFF1C2; border-color: #F0C24B; } .fb .star.on svg { fill: #FFB400; stroke: #B87F00; }
.fb .star:focus-visible { outline: 3px solid var(--violet); outline-offset: 2px; }
.fb .savedbar { animation: fbIn .35s var(--ease) both; padding: 8px 20px; background: #FFF1C2; font: 600 13px/1.4 var(--text); color: #8A5A00; }
.fb .clue { margin: 16px 20px 0; padding: 14px 18px; border-radius: 14px; background: #FFF6D6; display: flex; flex-direction: column; gap: 4px; }
.fb .clue b { font: 700 12px var(--text); color: #8A5A00; }
.fb .clue span { font: 600 17px/1.5 var(--text); color: #1F1A2E; text-wrap: pretty; }
.fb .blocks { padding: 14px 20px 18px; display: flex; flex-direction: column; gap: 10px; }
.fb .blk { padding: 14px 18px; border-radius: 14px; background: #EAF8F1; gap: 6px; }
.fb .blk.bad { background: #FDEEF2; }
.fb .blk .bt { display: flex; align-items: flex-start; gap: 8px; font: 700 15px/1.4 var(--text); color: #1F6B47; }
.fb .blk .bt .tx { flex: 1; min-width: 0; padding-top: 1px; font: inherit; color: inherit; }
.fb .ttl { white-space: nowrap; }
.fb .blk.bad .bt { color: #9B1F43; }
.fb .blk .bt i { font: 700 12px var(--text); width: 22px; height: 22px; flex: none; border-radius: 50%; background: #1F6B47; color: #fff; display: flex; align-items: center; justify-content: center; }
.fb .blk.bad .bt i { background: #9B1F43; }
.fb .blk p { margin: 0; font: 400 16px/1.6 var(--text); color: #1F1A2E; text-wrap: pretty; }
.fb .blk .yours { margin-left: 0; }
.fb.compact .head { flex-wrap: wrap; row-gap: 4px; }
.fb.compact .hd { display: contents; }
.fb.compact .hd .ttl { flex: 1 0 auto; font-size: 16px; }
.fb.compact .hd .sum { order: 5; flex-basis: 100%; padding-left: 34px; font-size: 12px; }
.fb.compact .meta { margin-left: auto; flex-shrink: 1; min-width: 0; padding-left: 0; border-left: 0; }
.fb.compact .meta .tests, .fb.compact .star .lbl { display: none; }
.fb.compact .skilltag { height: 26px; padding: 0 10px; font-size: 12px; }
.fb.compact .star { width: 36px; padding: 0; }
.fb.compact .savedbar { padding: 8px 14px; }
.fb.compact .clue { margin: 12px 14px 0; padding: 12px 14px; } .fb.compact .clue span { font-size: 15px; }
.fb.compact .blocks { padding: 12px 14px; gap: 10px; } .fb.compact .blk { padding: 12px 14px; }
.fb.compact .blk .bt { font-size: 14px; } .fb.compact .blk p { font-size: 15px; }
@media (max-width: 760px) {
  .fb .head { flex-wrap: wrap; row-gap: 4px; padding: 12px 14px; }
  .fb .hd { display: contents; }
  .fb .hd .ttl { flex: 1 0 auto; font-size: 18px; }
  .fb .hd .sum { order: 5; flex-basis: 100%; padding-left: 38px; font-size: 12px; }
  .fb .meta { margin-left: auto; padding-left: 0; border-left: 0; }
  .fb .meta .tests, .fb .star .lbl { display: none; }
  .fb .skilltag { height: 26px; padding: 0 10px; font-size: 12px; }
  .fb .star { width: 40px; height: 40px; padding: 0; }
  .fb .star svg { width: 18px; height: 18px; }
  .fb .savedbar { padding: 8px 14px; }
  .fb .clue { margin: 12px 14px 0; padding: 12px 14px; } .fb .clue span { font-size: 15px; }
  .fb .blocks { padding: 12px 14px; } .fb .blk { padding: 12px 14px; }
  .fb .blk .bt { font-size: 14px; } .fb .blk p { font-size: 15px; }
}
/* 2e-m Accuracy by part (design update 02): bars on phones, the spider stays on desktop */
.pbars { display: none; }
@media (max-width: 760px) {
  .res.v2 .spiderwrap, .res.v2 .card .legend { display: none; }
  .pbars { display: flex; flex-direction: column; gap: 14px; margin-top: 8px; }
  .pbars .sub { font: 500 12px var(--text); color: #5B546B; margin-top: -4px; }
  .pbar { display: flex; flex-direction: column; gap: 5px; }
  .pbar .r { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
  .pbar .nm { font: 600 13px var(--text); color: #1F1A2E; }
  .pbar .pc { font: 700 15px var(--display); color: #1F1A2E; }
  .pbar .trk { height: 14px; border-radius: 7px; background: #F0ECE3; overflow: hidden; }
  .pbar .trk i { display: block; height: 100%; border-radius: 7px; }
  .pbar .ct { font: 500 12px var(--text); color: #5B546B; }
  .pbar.none .pc, .pbar.none .ct { color: var(--muted2); }
  .pbars .lg { display: flex; gap: 14px; flex-wrap: wrap; font: 500 12px var(--text); color: #5B546B; padding-top: 2px; }
  .pbars .lg span { display: flex; align-items: center; gap: 6px; }
  .pbars .lg i { width: 10px; height: 10px; border-radius: 3px; }
}
/* Practice hub: skills saved from the answer card (design update 02) */
.savedsk { display: flex; flex-direction: column; gap: 10px; padding: 20px 24px; border-radius: 24px; }
.savedsk .h { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.savedsk .h b { font: 600 20px var(--display); } .savedsk .h .muted2 { font: 500 13px var(--text); }
.savedsk .st { color: #FFB400; font-size: 18px; }
.savedsk .row { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 14px; background: #FFF6D6; }
.savedsk .nm { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.savedsk .nm b { font: 700 15px var(--text); } .savedsk .nm span { font: 500 12px var(--text); color: #5B546B; }
@media (max-width: 760px) { .savedsk { padding: 16px; } .savedsk .row { flex-wrap: wrap; } .savedsk .nm { flex-basis: 100%; } }
/* Part 5 teaching card (owner 2026-09-29): marks in the sentence, the answer in the blank, formula chips, coloured endings */
.qtext .blank.filled { min-width: 0; padding: 0 6px; border-bottom: 3px solid var(--green); color: var(--green-ink); font-weight: 700; transform: none; animation: fbIn .4s var(--ease) both; }
.qtext mark.hl { padding: 1px 5px; border-radius: 6px; color: inherit; }
.qtext mark.hl.key { background: #FFE58A; }
.qtext mark.hl.link { background: #DCD2FB; }
.fb .clue .pat { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 4px 0 2px; }
.fb .clue .pat .ps { font: 700 15px var(--text); font-style: normal; color: #8A5A00; }
.fb .clue .chip { display: inline-flex; align-items: baseline; gap: 6px; padding: 4px 10px; border-radius: 10px; font: 500 13px var(--text); }
.fb .clue .chip b { font: 700 12px var(--text); }
.fb .clue .chip em { font: 700 14px var(--text); font-style: normal; }
.fb .clue .chip.key { background: #FFE58A; color: #5B4300; }
.fb .clue .chip.link { background: #DCD2FB; color: #3A2A85; }
.fb .clue .chip.answer { background: #CDEFDD; color: #1F6B47; }
.opt .t b.sfx { font-weight: 700; color: #4F37B8; border-bottom: 2px solid #C4B5F2; }
.opt.right .t b.sfx { color: #1F6B47; border-bottom-color: #7BCFA3; }
@media (max-width: 760px) { .fb .clue .chip { font-size: 12px; } .fb .clue .chip em { font-size: 13px; } }
.fb .clue .pat .pg { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; }
.fb .clue .chip { flex-wrap: wrap; row-gap: 0; }
/* Parts 6-7 teaching card (owner 2026-09-30): answers in the blanks, evidence of the focused question, jump chips */
.fb .clue .clh { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.fb .clue .clh .onpass { display: none; font: 600 11px var(--text); color: #8A5A00; }
.qitem.focus .fb .clue .clh .onpass { display: inline; }
.qitem.focus { border-color: #C4B5F2; box-shadow: 0 0 0 3px rgba(112, 83, 217, .12); }
.fb .clue .chip.ev { all: unset; box-sizing: border-box; cursor: pointer; display: inline-flex; align-items: baseline; gap: 6px; max-width: 100%; padding: 4px 10px; border-radius: 10px; font: 500 13px var(--text); }
.fb .clue .chip.ev.key { background: #FFE58A; color: #5B4300; } .fb .clue .chip.ev.link { background: #DCD2FB; color: #3A2A85; }
.fb .clue .chip.ev:hover { filter: brightness(.96); } .fb .clue .chip.ev:focus-visible { outline: 3px solid var(--violet); outline-offset: 2px; }
.fb .clue .chip.ev b, .fb .clue .chip.ev em { font-size: 12px; }
.fb .clue .chip.ev em { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 26ch; }
.fb .clue .chip .pr { font-style: normal; font-weight: 700; opacity: .7; }
.fb .clue .chip em.pair { font-weight: 600; }
.docpane .rv-blank.filled { background: #DDF3E6; color: #1F6B47; border-radius: 6px; padding: 0 6px; font-weight: 700; }
.docpane .rv-blank.filled.long { display: inline; border-bottom: 0; text-align: left; padding: 2px 6px; font: 600 .95em var(--text); }
.docpane mark.hl { padding: 1px 3px; border-radius: 5px; color: inherit; }
.docpane mark.hl.key { background: #FFE58A; } .docpane mark.hl.link { background: #DCD2FB; }
.docpane span.ins { background: #DDF3E6; color: #1F4F37; border-radius: 6px; padding: 1px 6px; }
.docpane span.ins b { color: #1F6B47; }
.docpane .pulse { animation: hlPulse 1.1s var(--ease) 1; }
@keyframes hlPulse { 0% { box-shadow: 0 0 0 0 rgba(112, 83, 217, .55); } 70% { box-shadow: 0 0 0 9px rgba(112, 83, 217, 0); } 100% { box-shadow: 0 0 0 0 rgba(112, 83, 217, 0); } }
@media (prefers-reduced-motion: reduce) { .docpane .pulse { animation: none; } }
@media (max-width: 760px) { .fb .clue .chip.ev em { max-width: 18ch; } }

/* ---- Listening highlights (owner 2026-09-30): the keyword of the answer, marked in the audio script after the answer */
.transcript mark.hl { padding: 1px 4px; border-radius: 5px; color: inherit; }
.transcript mark.hl.key { background: #FFE58A; } .transcript mark.hl.link { background: #DCD2FB; }
.transcript .pulse { animation: hlPulse 1.1s var(--ease) 1; }
.qbox.focus .fb .clue .clh .onpass { display: inline; }
@media (prefers-reduced-motion: reduce) { .transcript .pulse { animation: none; } }
.transcript .hlfor { margin-left: 10px; font: 600 11px var(--text); color: #8A5A00; background: #FFF3C4; padding: 2px 8px; border-radius: 999px; }
.transcript mark.hl { cursor: help; }

/* =============================== design update 03 (owner 2026-09-30): explanations inside the choices =============================== */
/* no feedback card: each choice explains itself after Submit */
.opt.withex { align-items: flex-start; }
.opt .ob { flex: 1; min-width: 0; min-height: 36px; display: flex; flex-direction: column; justify-content: center; gap: 6px; }
.opt .ot { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.opt .ot .t { flex: 1; min-width: 0; }
.opt .ex { font: 400 15px/1.55 var(--text); color: #5B546B; text-wrap: pretty; animation: fbIn .35s var(--ease) both; }
.opt.right .ex { color: #1F4F38; } .opt.wrong .ex { color: #7A1834; }
.opt.withex.dim { opacity: 1; background: #FAF8F4; border-color: #EEE9DF; } .opt.withex.dim .t { color: #5B546B; }
.opt.withex .t { font-size: 17px; }
.opts.small .opt .ex { font-size: 14px; }
.opt mark.hl, .trbox mark.hl { background: #A7E1C2; color: inherit; padding: 1px 4px; border-radius: 5px; cursor: help; }
.qs1 { display: flex; flex-direction: column; gap: 14px; }
.qbox .qrow, .qitem .qrow { gap: 6px; }
/* skill it tests + Save */
.qrow { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; animation: fbIn .35s var(--ease) both; }
.qrow .sp { flex: 1; }
.qrow .skilltag { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-radius: 999px; background: transparent; border: 1.5px solid #D5CFC2; font: 700 12px var(--text); color: #1F1A2E; white-space: nowrap; }
.qrow .skilltag .tests { font-weight: 500; color: #5B546B; }
.qrow .star { all: unset; cursor: pointer; box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 36px; padding: 0 14px; border-radius: 999px; border: 1.5px solid #D5CFC2; background: #fff; font: 700 13px var(--text); color: #1F1A2E; transition: background .2s, border-color .2s; }
.qrow .star svg { fill: none; stroke: #5B546B; }
.qrow .star.on { background: #FFF1C2; border-color: #F0C24B; } .qrow .star.on svg { fill: #FFB400; stroke: #B87F00; }
.qrow .star:focus-visible { outline: 3px solid var(--violet); outline-offset: 2px; }
/* TIP strip (Reading) */
.tipstrip { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; background: #FFF6D6; animation: fbIn .45s var(--ease) both; }
.tipstrip .tp { flex: none; height: 22px; padding: 0 8px; border-radius: 6px; background: #FFE08A; color: #8A5A00; font: 700 11px/22px var(--text); letter-spacing: .06em; }
.tipstrip .tb { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.tipstrip .tt { font: 500 16px/1.5 var(--text); color: #1F1A2E; text-wrap: pretty; }
.tipstrip .pat { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 4px 0 2px; }
.tipstrip .pat .ps { font: 700 15px var(--text); font-style: normal; color: #8A5A00; }
.tipstrip .chip { display: inline-flex; align-items: baseline; gap: 6px; padding: 4px 10px; border-radius: 10px; font: 500 13px var(--text); }
.tipstrip .chip b { font: 700 12px var(--text); }
.tipstrip .chip em { font: 700 14px var(--text); font-style: normal; }
.tipstrip .chip.key { background: #FFE58A; color: #5B4300; }
.tipstrip .chip.link { background: #DCD2FB; color: #3A2A85; }
.tipstrip .chip.answer { background: #CDEFDD; color: #1F6B47; }
.tipstrip .pat .pg { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; }
.tipstrip .chip { flex-wrap: wrap; row-gap: 0; }
.tipstrip .chip.ev { all: unset; box-sizing: border-box; cursor: pointer; display: inline-flex; align-items: baseline; gap: 6px; max-width: 100%; padding: 4px 10px; border-radius: 10px; font: 500 13px var(--text); }
.tipstrip .chip.ev.key { background: #FFE58A; color: #5B4300; } .tipstrip .chip.ev.link { background: #DCD2FB; color: #3A2A85; }
.tipstrip .chip.ev:hover { filter: brightness(.96); } .tipstrip .chip.ev:focus-visible { outline: 3px solid var(--violet); outline-offset: 2px; }
.tipstrip .chip.ev b, .tipstrip .chip.ev em { font-size: 12px; }
.tipstrip .chip.ev em { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 26ch; }
.tipstrip .chip .pr { font-style: normal; font-weight: 700; opacity: .7; }
.tipstrip .chip em.pair { font-weight: 600; }
@media (max-width: 760px) { .tipstrip .chip { font-size: 12px; } .tipstrip .chip em { font-size: 13px; } .tipstrip .chip.ev em { max-width: 18ch; } }
.qitem .foot, .qbox .foot, .qs1 .foot { font: 500 12px var(--text); color: var(--muted2); }
/* audio script above the choices (Parts 2-4) */
.trbox { margin: 0; padding: 14px 16px; border-radius: 16px; border: 1.5px solid #E3DED3; background: #FBFAF6; gap: 6px; animation: fbIn .35s var(--ease) both; }
.trbox .trh { display: flex; justify-content: space-between; align-items: center; gap: 8px; font: 700 11px var(--text); color: #5B546B; }
.trbox .trh b { font: 700 12px var(--text); letter-spacing: 0; text-transform: none; }
.trbox .trh .scr { font-weight: 500; color: #8A8398; }
.trbox .trbody { max-height: 200px; overflow-y: auto; overscroll-behavior: contain; display: flex; flex-direction: column; gap: 2px; padding-right: 4px; }
.qcols ~ .trbox, #trs .trbox { margin-bottom: 0; } #trs .trbody { max-height: 168px; }
.trbox .tline { grid-template-columns: minmax(46px, max-content) minmax(0, 1fr); padding: 7px 10px; }
.trbox .tline.ev { background: #E3F7EE; }
.trbox .tline .qtg { display: inline-block; margin-right: 4px; padding: 1px 6px; border-radius: 6px; background: #1F8A5B; color: #fff; font: 700 10px var(--text); font-style: normal; }
.trbox .hlfor { margin-left: 10px; font: 600 11px var(--text); color: #1F6B47; background: #DDF3E8; padding: 2px 8px; border-radius: 999px; } .trbox .hlfor:empty { display: none; }
.trbox .pulse, .opt .t .pulse { animation: hlPulse 1.1s var(--ease) 1; }
.trnote { margin: 0; font: 500 13px var(--text); color: var(--muted2); }
/* Reading passage evidence: green, tagged with the question it answers */
.docpane mark.hl.ev { background: #DDF3E8; color: inherit; padding: 1px 3px; border-radius: 5px; }
.docpane mark.hl.ev.foc { background: #B4E4CB; }
.docpane mark.hl.ev::before { content: attr(data-q); display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 17px; margin-right: 4px; padding: 0 4px; border-radius: 5px; background: #1F8A5B; color: #fff; font: 700 10px var(--text); vertical-align: 2px; }
/* question tabs (phones) */
.qtabs { display: none; }
/* Reading sets on desktop (3e-2): the passage and the questions scroll on their own */
@media (min-width: 761px) {
  .rset { height: calc(100vh - 205px); min-height: 520px; align-items: stretch; padding-bottom: 28px; }
  .docpane { position: static; max-height: none; height: 100%; }
  .qpane { overflow-y: auto; padding-right: 6px; }
}
@media (max-width: 760px) {
  .qtabs { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 6px; padding: 4px; border-radius: 14px; background: #E9E4D9; }
  .qtab { all: unset; cursor: pointer; box-sizing: border-box; height: 44px; border-radius: 10px; display: flex; align-items: center; justify-content: center; gap: 7px; font: 700 14px var(--text); color: #1F1A2E; transition: background .2s; }
  .qtab.on { background: #1F1A2E; color: #fff; box-shadow: 0 2px 6px rgba(31, 26, 46, .2); }
  .qtab:focus-visible { outline: 3px solid var(--violet); outline-offset: 2px; }
  .qtab .dot { width: 8px; height: 8px; border-radius: 50%; background: #C9C2B4; } .qtab.on .dot { background: #8A8398; }
  .qtab .dot.pk { background: #A48CF0; } .qtab .dot.ok { background: #2FB47C; } .qtab .dot.bad { background: #E0524A; }
  .qbox:not(.tabon), .qitem:not(.tabon) { display: none; }
  .qbox, .qitem { box-shadow: none !important; }
  /* the footer button stays in reach */
  #foot { position: sticky; bottom: 0; z-index: 6; margin: 0 -16px; padding: 10px 16px calc(12px + env(safe-area-inset-bottom)); background: #F4F1EA; border-top: 1px solid #E3DED3; }
  .qfoot { flex-wrap: nowrap; gap: 12px; } .qfoot .hint { flex: 1; min-width: 0; font-size: 12px; line-height: 1.3; } .qfoot .btn { height: 50px; padding: 0 22px; white-space: nowrap; }
  .opt .ex { font-size: 14px; } .opt.withex .t { font-size: 16px; } .opts.small .opt .ex { font-size: 13px; }
  .trbox { padding: 10px 10px 8px; border-radius: 14px; } .trbox .trbody { max-height: 112px; } #trs .trbody { max-height: 84px; }
  .trbox .tline { font-size: 13px; padding: 5px 8px; }
  .qrow .star { height: 36px; } .qrow .skilltag { font-size: 12px; }
  .tipstrip .tt { font-size: 14px; }
  .rset { height: auto; }
  .docpane { max-height: 168px; padding: 10px 12px; font-size: 13.5px; line-height: 1.6; }
}
@media (max-width: 760px) {
  .qfoot { flex-direction: row; align-items: center; justify-content: space-between; } .qfoot .hint { text-align: left; } .qfoot .btn { width: auto; height: 50px; }
}
@media (max-width: 760px) {
  .trbox .tline { grid-template-columns: minmax(30px, max-content) minmax(0, 1fr); gap: 6px; } .trbox .tline .qtg { font-size: 9px; padding: 1px 4px; margin-right: 2px; }
  .trbox .trbody, #trs .trbody { max-height: 120px; }
}
.qrow .skilltag { min-width: 0; flex: 0 1 auto; } .qrow .skilltag .tests { flex: none; } .qrow .skilltag .nm { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qrow .star { flex: none; }
@media (max-width: 760px) { .qrow { flex-wrap: nowrap; } .qrow .star .lbl { display: inline; } }
[hidden] { display: none !important; }

/* Logo System v1: preserve SVG canvas and existing shell slots. */
.brand-wordmark { display:block; width:78px; height:36px; object-fit:contain; max-width:none; }
.brand { display:inline-flex; align-items:center; flex-shrink:0; }
.mhead .brand-wordmark { width:64px; height:30px; }
.dashboard-brand-mascot { position:relative; height:120px; margin-top:4px; display:flex; align-items:center; justify-content:center; }
