:root {
  --pine-950: #102b24;
  --pine-900: #173a31;
  --pine-800: #255347;
  --pine-700: #376d5e;
  --sage: #9bb6a3;
  --mint: #dcebd6;
  --mint-soft: #edf4e9;
  --paper: #f4eee2;
  --paper-bright: #fffaf1;
  --ink: #18342c;
  --muted: #6f7f76;
  --line: #d4d7ca;
  --amber: #eba846;
  --amber-soft: #f6d69d;
  --coral: #c86e52;
  --blue: #7fa9ae;
  --game-coral: oklch(0.68 0.12 40);
  --game-coral-soft: oklch(0.91 0.045 52);
  --game-blue: oklch(0.7 0.075 206);
  --game-blue-soft: oklch(0.92 0.035 202);
  --display: "Fraunces", Georgia, serif;
  --body: "DM Sans", system-ui, sans-serif;
  --shadow: 0 22px 70px rgba(24, 52, 44, .12);
  --soft-shadow: 0 12px 32px rgba(24, 52, 44, .09);
  --ease: cubic-bezier(.2,.8,.2,1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { min-width: 320px; margin: 0; color: var(--ink); font-family: var(--body); background: var(--paper); }
body.modal-open { overflow: hidden; }
button, input, select, textarea { font: inherit; }
button { color: inherit; }
button,input,select,textarea,img,svg,video,canvas { max-width: 100%; }
h1,h2,h3,h4,h5,h6,p,dt,dd,figcaption,legend,caption,blockquote,.kicker,.capability-note,.question-feedback,.ticket-label,.ticket-meta,.page-heading > p,.site-footer > span { display: block; width: fit-content; max-width: 100%; overflow-wrap: anywhere; }
a { color: inherit; }
[hidden] { display: none !important; }
.grain { position: fixed; z-index: 100; inset: 0; pointer-events: none; opacity: .3; background: radial-gradient(circle at 20% 20%, rgba(255,255,255,.18), transparent 38%), repeating-linear-gradient(90deg, rgba(28,63,52,.025), rgba(28,63,52,.025) 1px, transparent 1px, transparent 4px); mix-blend-mode: soft-light; }
.skip-link { position: fixed; z-index: 200; left: 16px; top: 10px; padding: 10px 14px; color: white; background: var(--pine-950); border-radius: 8px; transform: translateY(-160%); }
.skip-link:focus { transform: none; }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 3px; }

.brand { display: inline-flex; align-items: center; color: var(--pine-950); font-family: var(--display); font-size: 24px; font-weight: 700; text-decoration: none; }
.brand-button { padding: 0; background: none; border: 0; cursor: pointer; }
.kicker { display: block; color: var(--pine-700); font-size: 11px; font-weight: 700; letter-spacing: .15em; text-transform: uppercase; }
.kicker.light { color: var(--sage); }

/* Session resolution */
.boot-screen { display: grid; min-height: 100vh; place-items: center; background: var(--paper); }
.boot-screen span { color: var(--pine-950); font-family: var(--display); font-size: clamp(2rem, 6vw, 3.5rem); font-weight: 700; letter-spacing: -.04em; }

/* Authentication */
.auth-screen { display: grid; min-height: 100vh; grid-template-columns: minmax(420px, 1.08fr) minmax(480px, .92fr); }
.auth-story { position: relative; min-height: 720px; overflow: hidden; color: white; background: radial-gradient(circle at 75% 15%, rgba(128,192,165,.23), transparent 25%), linear-gradient(145deg, #0c2722, #214e43 62%, #173a31); isolation: isolate; }
.auth-story::before { position: absolute; inset: 0; z-index: -1; content: ""; opacity: .19; background-image: radial-gradient(circle, rgba(255,255,255,.55) 0 1px, transparent 1.5px); background-size: 38px 38px; mask-image: linear-gradient(to bottom, black, transparent 70%); }
.auth-orbit { position: absolute; width: 620px; height: 620px; border: 1px solid rgba(190,225,207,.14); border-radius: 50%; }
.orbit-one { right: -140px; top: -240px; }
.orbit-two { right: -280px; top: -70px; width: 790px; height: 790px; }
.auth-copy { position: relative; z-index: 2; width: min(590px, calc(100% - 90px)); margin: clamp(80px, 11vh, 132px) auto 0; }
.auth-copy h1 { margin: 18px 0 24px; font-family: var(--display); font-size: clamp(72px, 8vw, 118px); line-height: .82; letter-spacing: -.055em; }
.auth-copy h1 em { color: var(--amber); font-weight: 600; }
.auth-copy p { max-width: 440px; margin: 0; color: #d1dfd6; font-size: clamp(17px, 1.6vw, 21px); line-height: 1.55; }
.auth-landscape { position: absolute; z-index: 1; inset: 48% 0 0; overflow: hidden; }
.auth-landscape::before { position: absolute; right: -7%; bottom: -39%; width: 88%; height: 84%; content: ""; background: #102f28; border-radius: 50% 50% 0 0; transform: rotate(-7deg); }
.auth-landscape::after { position: absolute; left: -18%; bottom: -54%; width: 88%; height: 85%; content: ""; background: #153b32; border-radius: 50% 50% 0 0; transform: rotate(11deg); }
.auth-moon { position: absolute; right: 17%; top: 4%; width: 74px; height: 74px; background: #f6d9a8; border-radius: 50%; box-shadow: 0 0 50px rgba(246,217,168,.28); }
.auth-house { position: absolute; z-index: 2; right: 23%; bottom: 23%; width: 78px; height: 64px; background: #d2825c; box-shadow: inset 0 -20px rgba(73,49,36,.18); }
.auth-house::before { position: absolute; left: -12px; top: -35px; width: 102px; height: 48px; content: ""; background: #142a24; clip-path: polygon(50% 0,100% 78%,88% 100%,12% 100%,0 78%); }
.auth-house::after { position: absolute; right: 14px; bottom: 0; width: 22px; height: 37px; content: ""; background: #f2cb85; box-shadow: 0 0 20px rgba(242,203,133,.35); }
.auth-path { position: absolute; z-index: 1; right: -8%; bottom: -20%; width: 42%; height: 60%; background: linear-gradient(90deg, transparent, rgba(205,185,137,.58), transparent); clip-path: polygon(49% 0,62% 0,100% 100%,0 100%); }
.auth-phrase { position: absolute; z-index: 4; left: clamp(45px, 7vw, 100px); bottom: 55px; min-width: 230px; padding: 16px 21px; color: var(--ink); background: rgba(255,250,241,.94); border: 1px solid rgba(255,255,255,.78); border-radius: 16px 16px 16px 3px; box-shadow: 0 20px 50px rgba(4,24,18,.27); transform: rotate(-2deg); }
.auth-phrase span,.auth-phrase small { display: block; color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.auth-phrase strong { display: block; margin: 5px 0 3px; font-family: var(--display); font-size: 23px; }
.auth-panel { position: relative; display: flex; min-height: 720px; flex-direction: column; justify-content: center; padding: 54px clamp(38px, 7vw, 110px); background: var(--paper); }
.auth-brand { position: absolute; left: clamp(38px, 7vw, 110px); top: 42px; }
.auth-box { width: min(100%, 480px); margin: auto; }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; padding: 5px; background: rgba(212,215,202,.5); border-radius: 13px; }
.auth-tabs button { min-height: 44px; background: transparent; border: 0; border-radius: 9px; cursor: pointer; }
.auth-tabs button[aria-selected="true"] { font-weight: 700; background: var(--paper-bright); box-shadow: 0 5px 15px rgba(20,45,38,.08); }
.auth-form { display: grid; gap: 17px; margin-top: 38px; }
.form-heading { margin-bottom: 5px; }
.form-heading h2 { margin: 7px 0 6px; font-family: var(--display); font-size: clamp(33px, 4vw, 46px); line-height: 1; letter-spacing: -.035em; }
.form-heading p { margin: 0; color: var(--muted); }
label { display: grid; gap: 7px; font-size: 12px; font-weight: 700; }
input, select, textarea { width: 100%; min-height: 48px; padding: 11px 13px; color: var(--ink); background: rgba(255,250,241,.7); border: 1px solid var(--line); border-radius: 10px; outline: none; transition: border-color .2s, box-shadow .2s, background .2s; }
textarea { min-height: 110px; resize: vertical; line-height: 1.5; }
input:focus, select:focus, textarea:focus { background: var(--paper-bright); border-color: var(--pine-700); box-shadow: 0 0 0 3px rgba(55,109,94,.1); }
.field-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.primary-button,.secondary-button,.ghost-button,.danger-button { display: inline-flex; min-height: 45px; gap: 12px; align-items: center; justify-content: center; padding: 0 17px; font-size: 12px; font-weight: 700; border-radius: 10px; cursor: pointer; transition: transform .2s var(--ease), box-shadow .2s, opacity .2s; }
.primary-button { color: white; background: var(--pine-900); border: 1px solid var(--pine-900); box-shadow: 0 9px 24px rgba(23,58,49,.18); }
.secondary-button { color: var(--pine-900); background: var(--mint); border: 1px solid #bdd1b9; }
.ghost-button { color: var(--pine-900); background: transparent; border: 1px solid var(--line); }
.danger-button { color: #803820; background: #f6ddd1; border: 1px solid #e8bca9; }
.primary-button:hover,.secondary-button:hover,.ghost-button:hover,.danger-button:hover { transform: translateY(-2px); }
button:disabled { cursor: not-allowed; opacity: .45; transform: none !important; }
.wide { width: 100%; justify-content: space-between; padding-inline: 19px; }
.auth-error,.inline-error { margin: 16px 0 0; padding: 11px 13px; color: #843c29; font-size: 12px; background: #f8ded4; border: 1px solid #e9b9a8; border-radius: 9px; }
.auth-meta { width: min(100%, 480px); margin: 20px auto 0; color: var(--muted); font-size: 11px; text-align: center; }

/* Platform shell */
.platform { min-height: 100vh; }
.topbar { position: sticky; z-index: 50; top: 0; display: grid; height: 74px; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 0 clamp(20px, 4vw, 58px); background: rgba(244,238,226,.9); border-bottom: 1px solid rgba(188,194,183,.7); backdrop-filter: blur(17px); }
.main-nav { display: flex; height: 100%; gap: 5px; align-items: stretch; }
.main-nav button { position: relative; display: flex; min-width: 98px; gap: 7px; align-items: center; justify-content: center; color: var(--muted); font-size: 12px; font-weight: 600; background: none; border: 0; cursor: pointer; }
.main-nav button::after { position: absolute; left: 20%; right: 20%; bottom: -1px; height: 3px; content: ""; background: var(--amber); border-radius: 3px 3px 0 0; transform: scaleX(0); transition: transform .2s; }
.main-nav button.active { color: var(--pine-950); }
.main-nav button.active::after { transform: scaleX(1); }
.account-cluster { display: flex; gap: 10px; align-items: center; justify-content: flex-end; }
.xp-pill { display: flex; gap: 5px; align-items: center; min-height: 40px; padding: 0 12px; background: var(--paper-bright); border: 1px solid var(--line); border-radius: 999px; }
.xp-pill span { color: var(--amber); }.xp-pill strong { font-family: var(--display); font-size: 17px; }.xp-pill small { color: var(--muted); font-size: 9px; font-weight: 700; }
.profile-button { display: flex; min-height: 48px; gap: 9px; align-items: center; padding: 4px 9px 4px 5px; background: transparent; border: 1px solid transparent; border-radius: 13px; cursor: pointer; }
.profile-button:hover { background: rgba(255,250,241,.7); border-color: var(--line); }
.avatar { display: grid; width: 38px; height: 38px; place-items: center; color: white; font-size: 12px; font-weight: 700; background: linear-gradient(145deg, var(--coral), #a94f3a); border-radius: 50%; }
.profile-copy { text-align: left; }.profile-copy strong,.profile-copy small { display: block; }.profile-copy strong { max-width: 110px; overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }.profile-copy small { margin-top: 2px; color: var(--muted); font-size: 9px; font-weight: 700; letter-spacing: .08em; }
#main { min-height: calc(100vh - 140px); }
.view-shell { width: min(1220px, calc(100% - 40px)); margin: 0 auto; padding: clamp(35px, 6vw, 76px) 0 80px; }
.site-footer { display: flex; width: min(1220px, calc(100% - 40px)); min-height: 66px; align-items: center; justify-content: space-between; margin: auto; color: var(--muted); font-size: 11px; border-top: 1px solid var(--line); }
.site-footer > span:last-child { display: flex; gap: 10px; }.site-footer a:hover { color: var(--pine-900); }

/* Library */
.library-hero { position: relative; display: grid; min-height: 330px; grid-template-columns: 1.25fr .75fr; overflow: hidden; color: white; background: linear-gradient(125deg, var(--pine-950), var(--pine-800)); border-radius: 27px; box-shadow: var(--shadow); isolation: isolate; }
.library-hero::after { position: absolute; z-index: -1; right: -110px; top: -190px; width: 560px; height: 560px; content: ""; border: 1px solid rgba(255,255,255,.12); border-radius: 50%; box-shadow: 0 0 0 70px rgba(255,255,255,.025), 0 0 0 140px rgba(255,255,255,.018); }
.hero-copy { align-self: center; padding: clamp(35px, 5vw, 65px); }
.hero-copy h1 { max-width: 680px; margin: 12px 0 15px; font-family: var(--display); font-size: clamp(42px, 6vw, 72px); line-height: .98; letter-spacing: -.045em; }
.hero-copy h1 em { color: var(--amber-soft); font-weight: 600; }
.hero-copy p { max-width: 600px; margin: 0; color: #cedfd6; font-size: 15px; line-height: 1.65; }
.hero-stats { display: grid; align-content: center; padding: 35px 50px 35px 10px; }
.stat-card { position: relative; display: grid; grid-template-columns: 46px 1fr; gap: 12px; align-items: center; padding: 17px 0; border-bottom: 1px solid rgba(255,255,255,.12); }
.stat-card:last-child { border: 0; }
.stat-icon { display: grid; width: 42px; height: 42px; place-items: center; color: var(--pine-950); font-size: 18px; background: var(--amber); border-radius: 13px; transform: rotate(-3deg); }
.stat-card strong,.stat-card small { display: block; }.stat-card strong { font-family: var(--display); font-size: 19px; }.stat-card small { margin-top: 2px; color: var(--sage); font-size: 10px; text-transform: uppercase; letter-spacing: .08em; }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; margin: 55px 0 20px; }
.section-heading h2 { margin: 5px 0 0; font-family: var(--display); font-size: clamp(30px, 4vw, 44px); letter-spacing: -.035em; }
.section-heading p { max-width: 480px; margin: 0 0 4px; color: var(--muted); font-size: 12px; text-align: right; }
.home-row { margin-top: 36px; }
.compact-heading { margin-top: 0; }
.row-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 16px; }
.active-story-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.compact-ticket .ticket-body { padding: 18px; }
.compact-ticket .ticket-body h3 { font-size: 23px; }
.difficulty-path { margin-top: 36px; }
.difficulty-heading { margin-top: 0; }
.difficulty-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.difficulty-card { display: grid; min-width: 0; gap: 12px; padding: 16px; background: var(--paper-bright); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--soft-shadow); }
.difficulty-card.locked { opacity: .62; }
.difficulty-card.passed { border-color: #b8d3bd; background: #f7fbf3; }
.difficulty-card header { display: flex; min-width: 0; gap: 12px; align-items: flex-start; justify-content: space-between; }
.difficulty-card h3 { margin: 5px 0 0; font-family: var(--display); font-size: 21px; line-height: 1.05; }
.difficulty-title-button { padding: 0; color: inherit; font: inherit; line-height: inherit; text-align: left; background: transparent; border: 0; cursor: pointer; }
.difficulty-title-button:hover { color: var(--pine-700); }
.difficulty-card header > strong { display: grid; min-width: 42px; height: 42px; place-items: center; color: white; background: var(--pine-900); border-radius: 10px; }
.difficulty-status { display: inline-flex; min-height: 23px; align-items: center; padding: 0 8px; color: var(--pine-700); font-size: 8px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; background: var(--mint-soft); border: 1px solid #cbdac7; border-radius: 999px; }
.difficulty-meter { height: 7px; overflow: hidden; background: #dde2d8; border-radius: 999px; }
.difficulty-meter span { display: block; height: 100%; background: var(--amber); border-radius: inherit; }
.difficulty-stats { display: flex; gap: 8px; flex-wrap: wrap; color: var(--muted); font-size: 10px; font-weight: 700; }
.difficulty-retry { margin: 0; color: #89452f; font-size: 10px; font-weight: 800; }
.difficulty-actions { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; align-items: center; }
.difficulty-actions .primary-button,.difficulty-actions .ghost-button { width: 100%; min-height: 40px; padding-inline: 10px; }
.split-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.home-exam-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.exam-shell .exam-section + .exam-section { margin-top: 42px; }
.exam-card .difficulty-actions,.exam-actions { grid-template-columns: minmax(0, 1fr); }
.exam-question legend { display: flex; gap: 9px; align-items: center; color: var(--muted); font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.exam-question h2 { margin: 12px 0; font-family: var(--display); font-size: 22px; line-height: 1.22; }
.exam-options { display: grid; gap: 8px; }
.exam-options label { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 10px; align-items: center; padding: 10px; font-weight: 700; background: var(--paper-bright); border: 1px solid var(--line); border-radius: 10px; }
.exam-options input { width: 18px; min-height: 18px; padding: 0; }
.difficulty-settings-list { display: grid; gap: 14px; }
.settings-form-head { display: flex; gap: 16px; align-items: flex-start; justify-content: space-between; margin-bottom: 16px; }
.settings-form-head h2 { margin: 6px 0 0; font-family: var(--display); font-size: 24px; }
.lesson-filters { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)) auto auto; gap: 10px; align-items: end; margin-bottom: 18px; padding: 15px; background: rgba(255,250,241,.72); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--soft-shadow); }
.lesson-filters label { min-width: 0; }
.lesson-filters button { min-height: 48px; }
.lesson-count-row { display: flex; gap: 8px; align-items: baseline; margin-bottom: 15px; color: var(--muted); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.lesson-count-row strong { color: var(--pine-950); font-family: var(--display); font-size: 26px; letter-spacing: 0; text-transform: none; }
.story-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.story-ticket { position: relative; min-height: 0; overflow: hidden; background: var(--paper-bright); border: 1px solid rgba(190,197,185,.8); border-radius: 19px; box-shadow: var(--soft-shadow); transition: transform .3s var(--ease), box-shadow .3s; }
.story-ticket:hover { transform: translateY(-7px) rotate(-.25deg); box-shadow: 0 24px 55px rgba(24,52,44,.15); }
.ticket-label { display: block; width: fit-content; max-width: 100%; margin-bottom: 13px; padding: 6px 10px; color: var(--pine-900); font-size: 9px; font-weight: 700; letter-spacing: .1em; line-height: 1.25; text-transform: uppercase; overflow-wrap: anywhere; background: var(--mint-soft); border: 1px solid #cbdac7; border-radius: 999px; }
.ticket-body { padding: 21px 21px 18px; }
.ticket-meta { color: var(--muted); font-size: 9px; font-weight: 700; letter-spacing: .08em; line-height: 1.4; text-transform: uppercase; }
.ticket-meta > * { display: inline-block; vertical-align: middle; }
.ticket-meta > * + * { margin-left: 8px; }
.ticket-body h3 { margin: 7px 0 7px; font-family: var(--display); font-size: 26px; line-height: 1.04; letter-spacing: -.025em; }
.ticket-body p { min-height: 39px; margin: 0; color: var(--muted); font-size: 11px; line-height: 1.55; }
.ticket-footer { display: flex; align-items: center; justify-content: space-between; margin-top: 15px; padding-top: 13px; border-top: 1px solid #e0e0d5; }
.ticket-progress { display: grid; gap: 5px; min-width: 100px; color: var(--muted); font-size: 9px; font-weight: 700; }
.mini-progress { height: 4px; overflow: hidden; background: #dfe2d8; border-radius: 999px; }.mini-progress span { display: block; height: 100%; background: var(--amber); border-radius: inherit; }
.story-open { display: grid; width: 37px; height: 37px; place-items: center; color: white; background: var(--pine-900); border: 0; border-radius: 50%; cursor: pointer; transition: transform .2s; }.story-open:hover { transform: rotate(-8deg) scale(1.08); }
.story-open::before { width: 8px; height: 8px; content: ""; border-top: 2px solid white; border-right: 2px solid white; transform: translateX(-2px) rotate(45deg); }
#main[data-page="library"] *,#main[data-page="library"] *::before,#main[data-page="library"] *::after { animation: none !important; transition: none !important; }
#main[data-page="library"] .story-ticket:hover,#main[data-page="library"] .story-open:hover { transform: none; }

/* Reader */
.reader-shell { display: grid; width: min(1400px, 100%); min-height: calc(100vh - 74px); grid-template-columns: 270px 1fr; margin: 0 auto; }
.reader-rail { position: sticky; top: 74px; height: calc(100vh - 74px); padding: 38px 25px; background: #e8e5d9; border-right: 1px solid var(--line); }
.reader-rail-actions { display: flex; gap: 10px; align-items: center; justify-content: space-between; }
.back-link { display: flex; gap: 8px; align-items: center; padding: 0; color: var(--pine-700); font-size: 11px; font-weight: 700; background: none; border: 0; cursor: pointer; }
.reader-menu-button { display: none; min-height: 40px; gap: 9px; align-items: center; justify-content: center; padding: 0 13px; color: var(--pine-950); font-size: 10px; font-weight: 800; background: var(--paper-bright); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 6px 16px rgba(20,43,36,.07); cursor: pointer; }
.reader-menu-button strong { font-family: var(--display); font-size: 14px; line-height: 1; }
.reader-story-head { margin: 34px 0 25px; }.reader-story-head h2 { margin: 7px 0 8px; font-family: var(--display); font-size: 27px; line-height: 1.05; }.reader-story-head p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.segment-list { display: grid; gap: 9px; padding: 0; list-style: none; }
.segment-nav { display: grid; width: 100%; grid-template-columns: 37px 1fr; gap: 10px; align-items: center; padding: 10px; text-align: left; background: transparent; border: 1px solid transparent; border-radius: 11px; cursor: pointer; }
.segment-nav.active { background: var(--paper-bright); border-color: var(--line); box-shadow: 0 6px 16px rgba(20,43,36,.07); }
.segment-nav:disabled { opacity: .45; }
.segment-number { display: grid; width: 34px; height: 34px; place-items: center; color: var(--pine-700); font-family: var(--display); font-size: 11px; background: var(--mint); border-radius: 50%; }.segment-nav.complete .segment-number { color: var(--pine-950); background: var(--amber); }
.segment-nav strong,.segment-nav small { display: block; }.segment-nav strong { font-family: var(--display); font-size: 12px; }.segment-nav small { margin-top: 2px; color: var(--muted); font-size: 9px; }
.rail-xp { position: absolute; left: 25px; right: 25px; bottom: 27px; padding: 17px; color: white; background: var(--pine-900); border-radius: 14px; }.rail-xp span { display: block; color: var(--sage); font-size: 9px; text-transform: uppercase; letter-spacing: .1em; }.rail-xp strong { display: block; margin-top: 5px; font-family: var(--display); font-size: 25px; }
.reader-stage { min-width: 0; padding: 40px clamp(25px, 6vw, 85px) 80px; }
.reader-topline { display: flex; align-items: center; justify-content: space-between; margin-bottom: 15px; }
.reader-topline > span { color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.reader-card { overflow: hidden; background: var(--paper-bright); border: 1px solid rgba(255,255,255,.8); border-radius: 22px; box-shadow: var(--shadow); }
.reader-illustration { position: relative; height: clamp(180px, 22vw, 275px); overflow: hidden; background: linear-gradient(135deg,#315e52,#9ab39b); }
.reader-illustration::before { position: absolute; right: 12%; top: 14%; width: 61px; height: 61px; content: ""; background: #f6d49c; border-radius: 50%; box-shadow: 0 0 36px rgba(246,212,156,.32); }
.reader-illustration::after { position: absolute; left: -5%; right: -5%; bottom: -52%; height: 90%; content: ""; background: var(--pine-900); border-radius: 50% 50% 0 0; box-shadow: 220px -35px 0 rgba(28,70,59,.78); }
.reader-illustration.tram { background: linear-gradient(135deg,#6f999b,#d2c49f); }.reader-illustration.tram::after { left: 25%; right: 25%; bottom: -8px; height: 125px; background: #d27655; border: 7px solid #22433c; border-radius: 22px 22px 0 0; box-shadow: inset 0 -35px #b85b46; }
.reader-illustration.dinner { background: linear-gradient(135deg,#573b3b,#bd7e59); }.reader-illustration.dinner::after { left: 28%; right: 28%; bottom: -33px; height: 125px; background: #ead19c; border-radius: 50% 50% 0 0; box-shadow: 0 -17px 0 -7px #d06c4e; }
.reader-illustration.library { background: linear-gradient(135deg,#8da184,#d2c59e); }.reader-illustration.library::after { left: 12%; right: 12%; bottom: 17px; height: 20px; background: #315347; border-radius: 4px; box-shadow: 0 -45px 0 #315347,0 -90px 0 #315347; }
.reader-illustration.cafe { background: linear-gradient(135deg,#765547,#c59c70); }.reader-illustration.cafe::after { left: 24%; right: 24%; bottom: -52px; height: 140px; background: #e3c691; border-radius: 50% 50% 0 0; box-shadow: 0 -20px 0 -12px #f3dfb7; }
.reader-illustration.grocery { background: linear-gradient(135deg,#557d69,#dbc176); }.reader-illustration.grocery::after { left: 23%; right: 23%; bottom: 8px; height: 80px; background: #bf7449; border-radius: 7px 7px 24px 24px; box-shadow: inset 0 11px rgba(92,50,34,.2); }
.illustration-caption { position: absolute; z-index: 3; left: 22px; bottom: 19px; padding: 8px 11px; color: white; font-size: 9px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; background: rgba(12,38,31,.52); border: 1px solid rgba(255,255,255,.25); border-radius: 999px; backdrop-filter: blur(7px); }
.reader-copy { padding: clamp(27px, 5vw, 52px); }
.reader-paused-card .reader-illustration { height: clamp(125px,16vw,190px); filter: saturate(.45); }
.reader-paused-card .reader-copy { padding: clamp(24px,4vw,42px); }
.reader-paused-card .empty-state { padding-block: clamp(36px,6vw,64px); background: var(--paper-bright); border-color: var(--line); }
.reader-paused-card .empty-state h1 { margin: 0; font-family: var(--display); font-size: clamp(30px,4vw,44px); line-height: 1; }
.reader-paused-card .empty-state p { max-width: 530px; line-height: 1.65; }
.reader-paused-card .empty-state .primary-button { margin: 22px auto 0; }
.reader-title { container: reader-title / inline-size; padding-bottom: 23px; border-bottom: 1px solid var(--line); }
.reader-title-meta { display: flex; min-width: 0; gap: 10px; align-items: center; }
.reader-title-meta .kicker { min-width: 0; }
.reader-title h1 { margin: 10px 0 0; font-family: var(--display); font-size: clamp(31px, 4vw, 45px); line-height: 1; letter-spacing: -.035em; }
.reward-badge { display: inline-block; width: max-content; max-width: 100%; min-width: 0; padding: 6px 10px; color: var(--pine-900); white-space: nowrap; background: var(--amber-soft); border: 1px solid #edbd72; border-radius: 999px; }.reward-badge strong,.reward-badge small { display: inline-block; line-height: 1; vertical-align: middle; }.reward-badge strong { margin-right: 6px; font-family: var(--display); font-size: 18px; }.reward-badge small { font-size: 8px; font-weight: 700; text-transform: uppercase; }
.story-paragraphs { padding: 26px 0 4px; }
.story-paragraph { position: relative; margin: 0 0 22px; color: #29483d; font-family: var(--display); font-size: clamp(18px, 2vw, 22px); }
.story-paragraph::first-letter { font-size: 1.15em; }
.source-hint { margin: 7px 0 25px; padding: 16px 18px; color: #645643; font-size: 12px; line-height: 1.6; background: #f6e8cf; border-left: 3px solid var(--amber); border-radius: 0 10px 10px 0; }
.glossary-row { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 12px; padding-top: 18px; border-top: 1px solid var(--line); }
.word-chip { display: inline-flex; gap: 7px; align-items: center; min-height: 35px; padding: 0 10px; color: var(--pine-700); font-size: 10px; font-weight: 700; background: var(--mint-soft); border: 1px solid #ceddc9; border-radius: 999px; cursor: pointer; }.word-chip:hover { background: var(--mint); }.word-chip.saved { background: var(--amber-soft); border-color: #edbd72; }
.capability-note { margin: 16px 0 0; color: var(--muted); font-size: 10px; }
.question-card { margin-top: 18px; padding: clamp(22px, 3vw, 31px); background: rgba(255,250,241,.7); border: 1px solid var(--line); border-radius: 17px; box-shadow: var(--soft-shadow); }
.question-head { display: grid; grid-template-columns: 44px 1fr; gap: 13px; align-items: center; }.question-count { display: grid; width: 42px; height: 42px; place-items: center; color: #9a5b1d; font-family: var(--display); background: var(--amber-soft); border-radius: 50%; }.question-head h2 { margin: 5px 0 0; font-family: var(--display); font-size: 19px; }
.answer-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 9px; margin-top: 18px; }
.answer-choice { min-height: 60px; padding: 10px; font-size: 11px; font-weight: 700; background: var(--paper-bright); border: 1px solid var(--line); border-radius: 11px; cursor: pointer; transition: transform .2s,border .2s,background .2s; }.answer-choice:hover:not(:disabled) { transform: translateY(-2px); border-color: var(--pine-700); }.answer-choice.correct { background: var(--mint); border-color: var(--pine-700); }.answer-choice.wrong { color: #7f3828; background: #f7ddd3; border-color: #dfaa97; animation: shake .3s; }
.question-footer { display: flex; min-height: 49px; gap: 14px; align-items: center; justify-content: space-between; margin-top: 15px; padding-top: 14px; border-top: 1px solid var(--line); }.question-feedback { margin: 0; color: var(--muted); font-size: 11px; }.question-feedback.success { color: var(--pine-700); font-weight: 700; }
.question-gate-card { display: grid; grid-template-columns: 72px 1fr; gap: 20px; align-items: center; }
.question-gate-mark { display: grid; width: 68px; height: 68px; place-items: center; color: #875117; font-family: var(--display); font-size: 32px; background: var(--amber-soft); border: 1px solid #e6b96f; border-radius: 50%; box-shadow: inset 0 0 0 7px rgba(255,250,241,.35); }
.question-gate-card h2 { margin: 5px 0 6px; font-family: var(--display); font-size: 23px; }
.question-gate-card p { max-width: 720px; margin: 0; color: var(--muted); font-size: 11px; line-height: 1.55; }
.question-reveal-button { margin-top: 15px; }
.question-gate-card small { display: block; margin-top: 9px; color: #8a4937; font-size: 10px; }
.reader-nav-modal > p { margin-bottom: 18px; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.reader-modal-list { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.reader-modal-segment { display: grid; width: 100%; min-height: 64px; grid-template-columns: 42px minmax(0,1fr); gap: 12px; align-items: center; padding: 10px 12px; color: var(--ink); text-align: left; background: rgba(255,250,241,.75); border: 1px solid var(--line); border-radius: 12px; cursor: pointer; }
.reader-modal-segment.active { background: var(--paper-bright); border-color: #d6a24e; box-shadow: inset 0 0 0 2px rgba(235,168,70,.22),0 9px 24px rgba(24,52,44,.09); }
.reader-modal-segment.complete .segment-number { color: var(--pine-950); background: var(--amber); }
.reader-modal-segment:disabled { opacity: .55; cursor: not-allowed; }
.reader-modal-segment strong,.reader-modal-segment small { display: block; }
.reader-modal-segment strong { min-width: 0; font-family: var(--display); font-size: 17px; line-height: 1.15; overflow-wrap: anywhere; }
.reader-modal-segment small { margin-top: 3px; color: var(--muted); font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }

/* Vocabulary, profile, studio */
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 30px; }.page-heading h1 { margin: 7px 0 0; font-family: var(--display); font-size: clamp(40px,6vw,65px); line-height: .95; letter-spacing: -.045em; }.page-heading p { max-width: 480px; margin: 0 0 4px; color: var(--muted); font-size: 12px; text-align: right; }
.summary-strip { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; margin-bottom: 27px; }.summary-box { padding: 18px; background: rgba(255,250,241,.68); border: 1px solid var(--line); border-radius: 14px; }.summary-box span,.summary-box strong { display: block; }.summary-box span { color: var(--muted); font-size: 9px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }.summary-box strong { margin-top: 5px; font-family: var(--display); font-size: 24px; }
.word-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; }.word-card { padding: 18px; background: var(--paper-bright); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 7px 20px rgba(24,52,44,.05); }.word-card-top { display: flex; align-items: start; justify-content: space-between; }.word-card h3 { margin: 0; font-family: var(--display); font-size: 23px; }.word-card p { margin: 5px 0 15px; color: var(--muted); font-size: 11px; }.tiny-button { display: grid; width: 30px; height: 30px; place-items: center; color: var(--muted); background: transparent; border: 1px solid var(--line); border-radius: 50%; cursor: pointer; }.mastery { display: flex; gap: 5px; align-items: center; }.mastery span { margin-right: 4px; color: var(--muted); font-size: 9px; font-weight: 700; text-transform: uppercase; }.mastery button { width: 16px; height: 16px; padding: 0; background: #e0e3d9; border: 0; border-radius: 50%; cursor: pointer; }.mastery button.filled { background: var(--amber); }
.practice-banner { position: relative; display: grid; grid-template-columns: 86px 1fr auto; gap: 23px; align-items: center; margin-bottom: 18px; padding: 23px 25px; overflow: hidden; color: white; background: linear-gradient(115deg,var(--pine-950),var(--pine-800)); border-radius: 18px; box-shadow: var(--soft-shadow); isolation: isolate; }
.practice-banner::after { position: absolute; z-index: -1; right: -40px; top: -95px; width: 250px; height: 250px; content: ""; border: 1px solid rgba(255,255,255,.12); border-radius: 50%; box-shadow: 0 0 0 35px rgba(255,255,255,.025); }
.practice-mark { position: relative; width: 72px; height: 72px; }.practice-mark span,.practice-mark strong { position: absolute; display: grid; width: 51px; height: 63px; place-items: center; font-family: var(--display); border-radius: 9px; }.practice-mark span { left: 0; top: 0; color: var(--pine-950); background: var(--amber); transform: rotate(-8deg); }.practice-mark strong { right: 0; bottom: 0; color: var(--pine-900); background: var(--mint); border: 1px solid rgba(255,255,255,.5); transform: rotate(7deg); }
.practice-banner h2 { margin: 4px 0 3px; font-family: var(--display); font-size: 26px; }.practice-banner p { margin: 0; color: var(--sage); font-size: 11px; }.practice-start { min-width: 155px; color: var(--pine-950); background: var(--amber); border-color: var(--amber); }
.word-practice-studio { position: relative; margin: 31px 0 55px; padding: clamp(25px,4vw,42px); overflow: hidden; color: var(--paper-bright); background: radial-gradient(circle at 94% 5%,rgba(127,169,174,.2),transparent 28%),var(--pine-950); border: 1px solid rgba(220,235,214,.14); border-radius: 24px; box-shadow: var(--shadow); isolation: isolate; }
.word-practice-studio::after { position: absolute; z-index: -1; right: -125px; bottom: -225px; width: 440px; height: 440px; content: ""; border: 1px solid rgba(255,250,241,.09); border-radius: 50%; box-shadow: 0 0 0 48px rgba(255,250,241,.018),0 0 0 96px rgba(255,250,241,.012); }
.practice-studio-heading { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 28px; align-items: end; }
.practice-studio-heading h2 { margin: 7px 0 9px; color: var(--paper-bright); font-family: var(--display); font-size: clamp(34px,4vw,49px); line-height: 1; letter-spacing: -.035em; }
.practice-studio-heading p { max-width: 620px; margin: 0; color: #c1d2c9; font-size: 16px; line-height: 1.55; }
.pool-count { display: grid; min-width: 108px; padding: 15px 17px; color: var(--pine-950); text-align: center; background: var(--amber); border: 1px solid var(--amber-soft); border-radius: 14px; box-shadow: 0 10px 24px rgba(3,22,17,.2); }
.pool-count strong { font-family: var(--display); font-size: 31px; line-height: 1; }
.pool-count span { margin-top: 4px; font-size: 16px; font-weight: 700; }
.pool-workbench { display: flex; min-height: 92px; gap: 20px; align-items: center; justify-content: space-between; margin-top: 28px; padding: 16px 18px; background: rgba(255,250,241,.075); border: 1px solid rgba(255,250,241,.13); border-radius: 15px; }
.pool-workbench > div:first-child { min-width: 0; }
.pool-label { display: block; margin-bottom: 9px; color: var(--sage); font-size: 16px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.pool-chips { display: flex; min-width: 0; gap: 7px; flex-wrap: wrap; }
.pool-chips button { display: inline-flex; min-height: 37px; gap: 9px; align-items: center; padding: 0 11px; color: var(--paper-bright); font-size: 16px; font-weight: 700; background: rgba(255,250,241,.08); border: 1px solid rgba(255,250,241,.18); border-radius: 999px; cursor: pointer; transition: background .18s var(--ease),border-color .18s var(--ease),transform .18s var(--ease); }
.pool-chips button:hover { background: rgba(235,168,70,.17); border-color: var(--amber); transform: translateY(-1px); }
.pool-chips button span:last-child { color: var(--amber-soft); font-size: 18px; }
.pool-empty { color: #b6c8be; font-size: 16px; }
.pool-actions { display: flex; flex: 0 0 auto; gap: 7px; }
.pool-action { min-height: 40px; padding: 0 13px; color: var(--paper-bright); font-size: 16px; font-weight: 700; background: transparent; border: 1px solid rgba(255,250,241,.2); border-radius: 9px; cursor: pointer; transition: color .18s,background .18s,border-color .18s; }
.pool-action:hover:not(:disabled) { color: var(--pine-950); background: var(--mint); border-color: var(--mint); }
.game-lanes { display: grid; grid-template-columns: minmax(0,1.12fr) minmax(0,.88fr); gap: 13px; margin-top: 13px; }
.game-lane { position: relative; display: grid; min-width: 0; min-height: 235px; grid-template-columns: 92px minmax(0,1fr) auto; gap: 24px; align-items: center; padding: 27px; overflow: hidden; color: var(--ink); text-align: left; background: var(--paper-bright); border: 1px solid transparent; border-radius: 17px; cursor: pointer; box-shadow: 0 15px 36px rgba(3,22,17,.14); transition: transform .22s var(--ease),box-shadow .22s var(--ease),border-color .22s; }
.game-lane:hover:not(:disabled) { transform: translateY(-3px); box-shadow: 0 22px 45px rgba(3,22,17,.22); }
.game-lane:active:not(:disabled) { transform: translateY(-1px); }
.game-lane:disabled { color: var(--muted); background: #e8e5dc; opacity: .68; }
.game-lane-number { position: absolute; right: 15px; top: 11px; color: rgba(24,52,44,.16); font-family: var(--display); font-size: 32px; }
.game-lane-copy { display: block; min-width: 0; }
.game-lane-copy small,.game-lane-copy strong,.game-lane-copy span,.game-lane-copy b { display: block; }
.game-lane-copy small { color: var(--pine-700); font-size: 16px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; }
.game-lane-copy strong { margin-top: 7px; font-family: var(--display); font-size: 29px; line-height: 1; }
.game-lane-copy > span { max-width: 310px; margin-top: 8px; color: var(--muted); font-size: 16px; line-height: 1.45; }
.game-lane-copy b { margin-top: 20px; color: var(--pine-900); font-size: 16px; }
.game-lane-arrow { align-self: end; color: var(--pine-900); font-size: 26px; transition: transform .2s var(--ease); }
.game-lane-arrow svg { display: block; width: 25px; height: 25px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.game-lane:hover:not(:disabled) .game-lane-arrow { transform: translateX(4px); }
.match-up-preview,.pairs-preview { display: grid; width: 92px; height: 112px; grid-template-columns: 1fr 1fr; gap: 5px; transform: rotate(-2deg); }
.match-up-preview i,.pairs-preview i { display: grid; place-items: center; margin: 0; padding: 5px; color: var(--pine-950); font-family: var(--body); font-size: 12px; font-style: normal; font-weight: 700; background: var(--game-blue-soft); border: 1px solid color-mix(in oklch,var(--game-blue) 45%,var(--paper-bright)); border-radius: 7px; }
.match-up-preview i:nth-child(even) { background: var(--game-coral-soft); border-color: color-mix(in oklch,var(--game-coral) 45%,var(--paper-bright)); }
.pairs-preview { gap: 7px; transform: rotate(3deg); }
.pairs-preview i { color: var(--paper-bright); font-size: 17px; background: var(--pine-800); border-color: var(--pine-700); box-shadow: inset 0 0 0 3px rgba(255,250,241,.07); }
.pairs-lane { grid-template-columns: 82px minmax(0,1fr) auto; background: var(--game-blue-soft); }
.pairs-lane .pairs-preview { width: 82px; height: 104px; }
.word-bank-section { margin-top: 0; }
.word-bank-heading { display: flex; gap: 30px; align-items: end; justify-content: space-between; margin-bottom: 18px; }
.word-bank-heading h2 { margin: 6px 0 0; font-family: var(--display); font-size: 33px; line-height: 1; }
.word-bank-heading p { max-width: 480px; margin: 0; color: var(--muted); font-size: 16px; line-height: 1.5; text-align: right; }
.word-card { transition: background .18s,border-color .18s,box-shadow .18s,transform .18s var(--ease); }
.word-card.practice-selected { background: color-mix(in oklch,var(--amber-soft) 26%,var(--paper-bright)); border-color: #d7a558; box-shadow: 0 10px 26px rgba(117,70,13,.1),inset 0 0 0 2px rgba(235,168,70,.13); }
.word-card.practice-selected:hover { transform: translateY(-2px); }
.word-card-top { gap: 12px; }
.word-select-toggle { display: inline-flex; min-height: 40px; gap: 8px; align-items: center; margin: 0 0 15px; padding: 0 11px; color: var(--pine-800); font-size: 16px; font-weight: 700; background: var(--mint-soft); border: 1px solid #c4d7c0; border-radius: 999px; cursor: pointer; transition: color .18s,background .18s,border-color .18s,transform .18s var(--ease); }
.word-select-toggle:hover { transform: translateY(-1px); border-color: var(--pine-700); }
.word-select-toggle[aria-pressed="true"] { color: #61400d; background: var(--amber-soft); border-color: #dcad63; }
.word-select-toggle > span:first-child { display: grid; width: 20px; height: 20px; place-items: center; color: var(--paper-bright); background: var(--pine-700); border-radius: 50%; }
.word-select-toggle[aria-pressed="true"] > span:first-child { color: var(--pine-950); background: var(--amber); }

/* Vocabulary matching games */
.vocabulary-game-shell { width: min(1120px,calc(100% - 40px)); padding-top: 40px; }
.vocabulary-game-header { display: grid; grid-template-columns: minmax(170px,1fr) auto minmax(170px,1fr); gap: 26px; align-items: center; margin-bottom: 30px; }
.vocabulary-game-header > div:nth-child(2) { text-align: center; }
.vocabulary-game-header .kicker,.vocabulary-game-header h1 { width: auto; }
.vocabulary-game-header h1 { margin: 5px 0 0; font-family: var(--display); font-size: 46px; line-height: 1; }
.game-back { display: inline-flex; width: fit-content; min-height: 44px; gap: 9px; align-items: center; padding: 0 13px; color: var(--pine-900); font-size: 16px; font-weight: 700; background: transparent; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; transition: background .18s,border-color .18s,transform .18s var(--ease); }
.game-back svg { width: 19px; height: 19px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.game-back:hover { background: var(--paper-bright); border-color: var(--pine-700); transform: translateX(-2px); }
.game-hud { display: flex; min-width: 0; gap: 12px; align-items: center; justify-self: end; }
.game-score { display: grid; min-width: 96px; min-height: 58px; place-items: center; align-content: center; padding: 6px 9px; color: var(--pine-950); background: var(--paper-bright); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 6px 17px rgba(24,52,44,.07); }
.game-score > span { display: block; width: auto; color: var(--muted); font-size: 16px; font-weight: 700; line-height: 1; text-transform: uppercase; }
.game-score-value { display: flex; width: 100%; min-width: 65px; align-items: center; justify-content: center; margin-top: 4px; }
.game-score strong { display: block; flex: 0 0 auto; font-family: var(--display); font-size: 24px; line-height: 1; }
.game-score i { display: grid; width: 0; min-width: 0; height: 24px; place-items: center; margin-left: 0; padding: 0; overflow: hidden; color: var(--paper-bright); font-size: 16px; font-style: normal; font-weight: 800; line-height: 1; white-space: nowrap; background: transparent; border-radius: 7px; opacity: 0; }
.game-score.gain strong,.game-score.loss strong { animation: point-score-shift .32s var(--ease) both; }
.game-score.gain i,.game-score.loss i { width: 32px; min-width: 32px; margin-left: 5px; padding: 0 5px; opacity: 1; animation: point-delta-slide .32s var(--ease) both; }
.game-score.gain i { background: var(--pine-700); }
.game-score.loss i { background: var(--game-coral); }
.game-score.gain { border-color: #b7cfae; box-shadow: 0 0 0 3px rgba(80,137,105,.1); }
.game-score.loss { border-color: var(--game-coral); box-shadow: 0 0 0 3px rgba(190,91,67,.09); }
.game-progress { display: grid; grid-template-columns: minmax(90px,1fr) auto; gap: 11px; align-items: center; justify-self: end; width: min(100%,230px); }
.game-progress > span { height: 8px; overflow: hidden; background: #daddd2; border-radius: 999px; box-shadow: inset 0 1px 2px rgba(23,58,49,.08); }
.game-progress i { display: block; height: 100%; background: var(--amber); border-radius: inherit; transition: width .22s var(--ease); }
.game-progress strong { min-width: 44px; color: var(--pine-800); font-size: 16px; text-align: right; }
.game-round-meta { display: flex; min-height: 47px; gap: 13px; align-items: center; margin: -11px 0 15px; padding: 9px 13px; color: var(--muted); font-size: 16px; background: rgba(255,250,241,.55); border: 1px solid var(--line); border-radius: 11px; }
.game-round-meta span { flex: 0 0 auto; padding: 5px 8px; color: var(--pine-950); font-weight: 800; background: var(--amber-soft); border-radius: 7px; }
.game-round-meta strong { color: var(--pine-800); font-size: 16px; }
.game-round-meta small { margin-left: auto; font-size: 16px; }
.match-up-board { display: grid; min-height: 560px; grid-template-columns: minmax(0,1fr) 66px minmax(0,1fr); gap: 18px; padding: clamp(22px,4vw,40px); background: rgba(255,250,241,.64); border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--soft-shadow); }
.match-column { display: grid; gap: 10px; align-content: start; }
.match-column-heading { display: flex; min-height: 40px; align-items: center; justify-content: space-between; margin-bottom: 4px; padding: 0 4px; }
.match-column-heading span { color: var(--muted); font-size: 16px; font-weight: 700; letter-spacing: .1em; }
.match-column-heading strong { font-family: var(--display); font-size: 20px; }
.match-choice { position: relative; display: flex; min-width: 0; min-height: 62px; align-items: center; justify-content: space-between; padding: 12px 16px; color: var(--ink); font-size: 18px; font-weight: 700; text-align: left; background: var(--paper-bright); border: 1px solid var(--line); border-radius: 12px; cursor: pointer; box-shadow: 0 7px 18px rgba(24,52,44,.055); transition: color .18s,background .18s,border-color .18s,box-shadow .18s,transform .18s var(--ease); }
.match-choice:hover:not(:disabled) { border-color: var(--game-blue); box-shadow: 0 10px 23px rgba(24,52,44,.1); transform: translateY(-2px); }
.match-choice.selected { background: var(--amber-soft); border-color: var(--amber); box-shadow: 0 0 0 3px rgba(235,168,70,.14); transform: translateY(-1px); }
.match-choice.matched { color: var(--pine-700); background: var(--mint); border-color: #b8cfb2; box-shadow: none; }
.match-choice.matched i { display: grid; width: 25px; height: 25px; flex: 0 0 auto; place-items: center; color: var(--paper-bright); font-style: normal; background: var(--pine-700); border-radius: 50%; }
.match-choice.matched i svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.match-choice.wrong { color: #713825; background: var(--game-coral-soft); border-color: var(--game-coral); animation: shake .25s var(--ease); }
.match-choice:disabled { opacity: 1; }
.match-bridge { display: grid; min-height: 100%; grid-template-rows: 1fr auto 1fr; place-items: center; color: var(--amber); }
.match-bridge span { width: 1px; height: 100%; background: var(--line); }
.match-bridge i { display: grid; width: 42px; height: 42px; place-items: center; font-size: 22px; font-style: normal; background: var(--paper); border: 1px solid var(--line); border-radius: 50%; }
.match-bridge i svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.memory-board { display: grid; min-height: 560px; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 13px; padding: clamp(22px,4vw,39px); background: var(--pine-950); border: 1px solid rgba(220,235,214,.14); border-radius: 23px; box-shadow: var(--shadow); perspective: 1200px; }
.memory-board.memory-count-3 { grid-template-columns: repeat(3,minmax(0,1fr)); }
.memory-board.memory-count-5 { grid-template-columns: repeat(5,minmax(0,1fr)); }
.memory-card { min-width: 0; min-height: 135px; padding: 0; background: transparent; border: 0; border-radius: 14px; cursor: pointer; perspective: 900px; }
.memory-card-inner { position: relative; display: block; width: 100%; height: 100%; min-height: 135px; transform-style: preserve-3d; transition: transform .36s cubic-bezier(.22,.8,.22,1); }
.memory-card.revealed .memory-card-inner { transform: rotateY(180deg); }
.memory-card-back,.memory-card-face { position: absolute; inset: 0; display: grid; place-items: center; padding: 16px; overflow: hidden; border-radius: 14px; backface-visibility: hidden; }
.memory-card-back { color: var(--amber-soft); background: radial-gradient(circle at 50% 35%,rgba(235,168,70,.15),transparent 38%),var(--pine-800); border: 1px solid rgba(220,235,214,.2); box-shadow: inset 0 0 0 5px rgba(255,250,241,.035),0 8px 21px rgba(3,22,17,.28); }
.memory-card-back::after { position: absolute; inset: 10px; content: ""; border: 1px dashed rgba(220,235,214,.22); border-radius: 8px; }
.memory-card-back > svg { width: 34px; height: 34px; fill: var(--amber-soft); filter: drop-shadow(0 0 11px rgba(235,168,70,.28)); }
.memory-card-back small { position: absolute; right: 14px; bottom: 12px; color: var(--sage); font-size: 16px; font-weight: 700; }
.memory-card-face { align-content: center; color: var(--pine-950); background: var(--paper-bright); border: 1px solid var(--amber-soft); box-shadow: 0 10px 25px rgba(3,22,17,.22); transform: rotateY(180deg); transition: background .2s var(--ease),border-color .2s var(--ease),box-shadow .2s var(--ease); }
.memory-card-face small { color: var(--pine-700); font-size: 16px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; }
.memory-card-face strong { max-width: 100%; margin-top: 8px; font-family: var(--display); font-size: clamp(20px,2.3vw,30px); line-height: 1.08; overflow-wrap: anywhere; }
.memory-card-face > i { position: absolute; right: 11px; top: 10px; display: grid; width: 25px; height: 25px; place-items: center; color: var(--paper-bright); font-style: normal; background: var(--pine-700); border-radius: 50%; }
.memory-card-face > i svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.memory-card:hover:not(:disabled) .memory-card-back { border-color: var(--amber); box-shadow: inset 0 0 0 5px rgba(235,168,70,.065),0 12px 27px rgba(3,22,17,.38); }
.memory-card.matched .memory-card-face { background: var(--mint); border-color: #a9c7a2; box-shadow: 0 0 0 4px rgba(97,151,111,.14),0 11px 27px rgba(3,22,17,.23); }
.memory-card.matched .memory-card-face::after { position: absolute; right: 12px; top: 11px; display: grid; width: 25px; height: 25px; place-items: center; content: "✓"; color: var(--paper-bright); font-size: 16px; font-weight: 800; background: var(--pine-700); border-radius: 50%; }
.memory-card.wrong .memory-card-face { background: var(--game-coral-soft); border-color: var(--game-coral); box-shadow: 0 0 0 4px rgba(190,91,67,.14),0 11px 27px rgba(3,22,17,.23); }
.memory-card:disabled { opacity: 1; }
.game-live-status { width: fit-content; margin: 16px auto 0; padding: 8px 13px; color: var(--muted); font-size: 16px; font-weight: 700; text-align: center; background: rgba(255,250,241,.65); border: 1px solid var(--line); border-radius: 999px; }
.vocabulary-stage-complete { display: grid; min-height: 500px; place-items: center; align-content: center; padding: 45px; text-align: center; background: radial-gradient(circle at 50% 7%,rgba(235,168,70,.14),transparent 34%),var(--paper-bright); border: 1px solid var(--line); border-radius: 23px; box-shadow: var(--soft-shadow); }
.vocabulary-stage-complete.retry { background: radial-gradient(circle at 50% 7%,rgba(200,110,82,.11),transparent 34%),var(--paper-bright); }
.stage-orbit { display: flex; gap: 9px; align-items: center; margin-bottom: 23px; }
.stage-orbit span,.stage-orbit strong { display: grid; width: 62px; height: 72px; place-items: center; color: var(--pine-950); font-family: var(--display); font-size: 25px; background: var(--game-blue-soft); border: 1px solid var(--game-blue); border-radius: 12px; box-shadow: 0 10px 24px rgba(24,52,44,.1); transform: rotate(-5deg); }
.stage-orbit strong { background: var(--mint); border-color: #b8cfb2; transform: rotate(5deg); }
.vocabulary-stage-complete.retry .stage-orbit strong { background: var(--game-coral-soft); border-color: var(--game-coral); }
.stage-orbit i { display: grid; width: 34px; height: 34px; place-items: center; color: var(--pine-950); font-size: 19px; font-style: normal; background: var(--amber); border-radius: 50%; }
.stage-orbit i svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.vocabulary-stage-complete h2 { margin: 9px 0 10px; font-family: var(--display); font-size: clamp(38px,5vw,54px); line-height: 1; }
.vocabulary-stage-complete > p { max-width: 570px; margin: 0 0 27px; color: var(--muted); font-size: 16px; line-height: 1.55; }
.vocabulary-game-finish { display: grid; min-height: 560px; place-items: center; align-content: center; padding: 45px; text-align: center; background: radial-gradient(circle at 50% 10%,rgba(235,168,70,.15),transparent 34%),var(--paper-bright); border: 1px solid var(--line); border-radius: 23px; box-shadow: var(--soft-shadow); }
.finish-pair { position: relative; width: 130px; height: 92px; margin-bottom: 25px; }
.finish-pair span,.finish-pair strong { position: absolute; display: grid; width: 66px; height: 80px; place-items: center; color: var(--pine-950); font-family: var(--display); font-size: 22px; background: var(--game-blue-soft); border: 1px solid var(--game-blue); border-radius: 13px; box-shadow: 0 12px 28px rgba(24,52,44,.12); transform: rotate(-7deg); }
.finish-pair strong { right: 0; color: #663d24; background: var(--game-coral-soft); border-color: var(--game-coral); transform: rotate(7deg); }
.finish-pair i { position: absolute; z-index: 2; left: 50%; top: 50%; display: grid; width: 38px; height: 38px; place-items: center; color: var(--pine-950); font-size: 19px; font-style: normal; background: var(--amber); border: 4px solid var(--paper-bright); border-radius: 50%; transform: translate(-50%,-50%); animation: spark-pop .45s var(--ease) both; }
.finish-pair i svg { width: 22px; height: 22px; fill: currentColor; }
.vocabulary-game-finish h2 { margin: 9px 0 10px; font-family: var(--display); font-size: clamp(38px,5vw,56px); line-height: 1; }
.vocabulary-game-finish > p { max-width: 560px; margin: 0; color: var(--muted); font-size: 16px; line-height: 1.55; }
.game-result-line { display: flex; gap: 38px; margin: 31px 0; }
.game-result-line div { min-width: 75px; }
.game-result-line span,.game-result-line strong { display: block; }
.game-result-line span { color: var(--muted); font-size: 16px; font-weight: 700; text-transform: uppercase; }
.game-result-line strong { margin-top: 5px; font-family: var(--display); font-size: 30px; }
.game-finish-actions { display: flex; gap: 9px; justify-content: center; }
.empty-state { padding: 55px 25px; text-align: center; background: rgba(255,250,241,.5); border: 1px dashed #b9c1b6; border-radius: 18px; }.empty-state span { display: grid; width: 60px; height: 60px; place-items: center; margin: 0 auto 14px; color: var(--pine-700); font-size: 28px; background: var(--mint); border-radius: 50%; }.empty-state h1,.empty-state h2 { margin: 0; font-family: var(--display); }.empty-state p { margin: 8px auto 0; color: var(--muted); font-size: 12px; }
.empty-state h1,.empty-state h2,.coach-finished h2,.coach-error h1,.practice-finish h1 { margin-inline: auto; }
.account-alert { display: flex; gap: 15px; align-items: center; margin: -10px 0 22px; padding: 17px 20px; color: #633514; background: #f7dfb6; border: 1px solid #e6bc74; border-radius: 15px; box-shadow: var(--soft-shadow); }.account-alert > span { display: grid; width: 35px; height: 35px; flex: 0 0 auto; place-items: center; color: white; font-weight: 800; background: #a86423; border-radius: 50%; }.account-alert strong { font-family: var(--display); font-size: 18px; }.account-alert p { margin: 3px 0 0; font-size: 11px; line-height: 1.5; }
.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }.settings-card { padding: 25px; background: rgba(255,250,241,.78); border: 1px solid var(--line); border-radius: 17px; box-shadow: var(--soft-shadow); }.settings-card.full { grid-column: 1/-1; }.settings-card h2 { margin: 0 0 5px; font-family: var(--display); font-size: 25px; }.settings-card > p { margin: 0 0 20px; color: var(--muted); font-size: 11px; }.settings-form { display: grid; gap: 14px; }.settings-form .primary-button { justify-self: start; }.settings-switch { display: grid; min-width: 0; grid-template-columns: 38px minmax(0,1fr); gap: 12px; align-items: center; padding: 13px; background: var(--mint-soft); border: 1px solid #cbdac7; border-radius: 12px; cursor: pointer; }.settings-switch input { position: relative; width: 38px; height: 22px; min-height: 22px; margin: 0; appearance: none; background: #d7ddd2; border: 1px solid #bac8b7; border-radius: 999px; cursor: pointer; transition: background .2s,border-color .2s; }.settings-switch input::before { position: absolute; left: 2px; top: 2px; width: 16px; height: 16px; content: ""; background: white; border-radius: 50%; box-shadow: 0 2px 5px rgba(16,43,36,.18); transition: transform .2s var(--ease); }.settings-switch input:checked { background: var(--pine-700); border-color: var(--pine-700); }.settings-switch input:checked::before { transform: translateX(16px); }.settings-switch strong,.settings-switch small { display: block; }.settings-switch strong { font-size: 11px; line-height: 1.25; }.settings-switch small { margin-top: 4px; color: var(--muted); font-size: 9px; font-weight: 500; line-height: 1.45; }.session-list,.key-list,.user-list,.studio-list { display: grid; gap: 9px; padding: 0; list-style: none; }.row-item { display: flex; gap: 13px; align-items: center; justify-content: space-between; padding: 12px 13px; background: var(--paper-bright); border: 1px solid var(--line); border-radius: 10px; }.row-item strong,.row-item small { display: block; }.row-item strong { font-size: 11px; }.row-item small { margin-top: 2px; color: var(--muted); font-size: 9px; }.row-actions { display: flex; gap: 7px; align-items: center; }.api-callout { display: flex; gap: 13px; align-items: center; justify-content: space-between; padding: 16px; background: var(--pine-900); color: white; border-radius: 13px; }.api-callout p { margin: 3px 0 0; color: var(--sage); font-size: 10px; }.api-callout a { color: var(--amber-soft); font-size: 10px; font-weight: 700; }
.studio-tabs { display: flex; gap: 5px; margin-bottom: 22px; padding: 5px; background: rgba(212,215,202,.48); border-radius: 12px; width: max-content; }.studio-tabs button { min-height: 39px; padding: 0 16px; font-size: 11px; font-weight: 700; background: transparent; border: 0; border-radius: 8px; cursor: pointer; }.studio-tabs button.active { background: var(--paper-bright); box-shadow: 0 4px 13px rgba(24,52,44,.08); }
.studio-card { display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: center; padding: 17px 19px; background: var(--paper-bright); border: 1px solid var(--line); border-radius: 13px; }.studio-card h3 { margin: 0; font-family: var(--display); font-size: 20px; }.studio-card p { margin: 4px 0 0; color: var(--muted); font-size: 10px; }.status-pill { display: inline-flex; min-height: 23px; align-items: center; padding: 0 8px; color: var(--pine-700); font-size: 8px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; background: var(--mint); border: 1px solid #c7d9c1; border-radius: 999px; }.status-pill.draft { color: #7d581d; background: #f4e2bf; border-color: #e7cc98; }.status-pill.suspended,.status-pill.archived { color: #7b3d2d; background: #f2dcd3; border-color: #dfb9aa; }
.user-card { display: grid; grid-template-columns: 42px 1fr auto; gap: 12px; align-items: center; padding: 14px; background: var(--paper-bright); border: 1px solid var(--line); border-radius: 12px; }.user-card .avatar { width: 40px; height: 40px; }.user-card h3 { margin: 0; font-size: 12px; }.user-card p { margin: 3px 0 0; color: var(--muted); font-size: 9px; }

/* Adaptive coach */
.main-nav .coach-nav { align-self: center; height: 44px; min-width: 108px; margin-inline: 2px; color: var(--pine-900); background: var(--amber-soft); border: 1px solid rgba(206,143,50,.3); border-radius: 999px; box-shadow: 0 7px 18px rgba(126,83,29,.08); }
.main-nav .coach-nav::after { display: none; }
.main-nav .coach-nav:hover,.main-nav .coach-nav.active { color: var(--pine-950); background: var(--amber); box-shadow: 0 9px 24px rgba(126,83,29,.17); }
.coach-shell { width: min(1280px,calc(100% - 40px)); }
.coach-hero { position: relative; display: grid; min-height: 440px; grid-template-columns: minmax(0,1.25fr) minmax(340px,.75fr); overflow: hidden; color: white; background: radial-gradient(circle at 86% 16%,rgba(246,214,157,.16),transparent 19%),linear-gradient(125deg,#102b24,#1d4c40 68%,#2d6254); border-radius: 28px; box-shadow: var(--shadow); isolation: isolate; }
.coach-hero::before,.coach-hero::after { position: absolute; z-index: -1; content: ""; border: 1px solid rgba(214,233,219,.12); border-radius: 50%; }
.coach-hero::before { right: -120px; top: -250px; width: 650px; height: 650px; box-shadow: 0 0 0 54px rgba(255,255,255,.018),0 0 0 108px rgba(255,255,255,.014); }
.coach-hero::after { left: 46%; bottom: -250px; width: 490px; height: 490px; }
.coach-hero-copy { display: flex; max-width: 700px; flex-direction: column; align-items: flex-start; justify-content: center; padding: clamp(46px,7vw,84px); }
.coach-hero-copy h1 { margin: 15px 0 21px; font-family: var(--display); font-size: clamp(50px,6.5vw,86px); line-height: .88; letter-spacing: -.055em; }
.coach-hero-copy h1 em { color: var(--amber); font-weight: 600; }
.coach-hero-copy p { max-width: 590px; margin: 0; color: #c9dbd1; font-size: clamp(14px,1.4vw,17px); line-height: 1.65; }
.coach-start-button { display: inline-flex; min-height: 50px; gap: 25px; align-items: center; margin-top: 31px; padding: 0 20px; color: var(--pine-950); font-size: 12px; font-weight: 700; background: var(--amber); border: 1px solid #f0be72; border-radius: 12px; box-shadow: 0 12px 30px rgba(3,22,17,.22); cursor: pointer; transition: transform .2s var(--ease),box-shadow .2s; }
.coach-start-button:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 16px 35px rgba(3,22,17,.28); }
.coach-start-button:disabled { opacity: .55; cursor: default; }
.coach-goal-cluster { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 42px; }
.coach-goal-ring { position: relative; display: grid; width: clamp(210px,22vw,270px); height: clamp(210px,22vw,270px); place-items: center; background: conic-gradient(var(--amber) var(--goal-progress),rgba(255,255,255,.13) 0); border-radius: 50%; filter: drop-shadow(0 20px 26px rgba(4,25,19,.22)); }
.coach-goal-ring::before { position: absolute; inset: 13px; content: ""; background: linear-gradient(145deg,#163d33,#245247); border: 1px solid rgba(255,255,255,.16); border-radius: inherit; box-shadow: inset 0 0 35px rgba(5,30,23,.25); }
.coach-goal-ring::after { position: absolute; inset: -12px; content: ""; border: 1px dashed rgba(244,220,173,.22); border-radius: inherit; }
.coach-goal-ring > div { position: relative; z-index: 1; text-align: center; }
.coach-goal-ring strong,.coach-goal-ring span,.coach-goal-ring small { display: block; }
.coach-goal-ring strong { font-family: var(--display); font-size: clamp(55px,7vw,75px); line-height: .9; }
.coach-goal-ring span { margin-top: 6px; color: var(--amber-soft); font-size: 12px; font-weight: 700; }
.coach-goal-ring small { margin-top: 10px; color: var(--sage); font-size: 9px; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; }
.coach-vitals { display: grid; width: min(100%,390px); grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 30px; }
.coach-vitals > div { display: flex; min-width: 0; gap: 10px; align-items: center; padding: 11px 13px; background: rgba(255,255,255,.075); border: 1px solid rgba(255,255,255,.12); border-radius: 12px; backdrop-filter: blur(10px); }
.vital-mark { display: grid; width: 34px; height: 34px; flex: 0 0 auto; place-items: center; color: var(--pine-950); background: var(--amber); border-radius: 50%; }
.vital-mark.review { background: var(--mint); }
.coach-vitals p { min-width: 0; margin: 0; }
.coach-vitals strong,.coach-vitals small { display: block; white-space: nowrap; }
.coach-vitals strong { font-size: 11px; }
.coach-vitals small { margin-top: 2px; overflow: hidden; color: var(--sage); font-size: 8px; text-overflow: ellipsis; }
.coach-insight-grid { display: grid; grid-template-columns: minmax(0,1.12fr) minmax(330px,.88fr); gap: 18px; margin-top: 18px; }
.mastery-panel,.coach-recommendation { min-height: 335px; padding: clamp(25px,4vw,39px); border-radius: 21px; box-shadow: var(--soft-shadow); }
.mastery-panel { background: rgba(255,250,241,.82); border: 1px solid var(--line); }
.coach-panel-head { display: flex; align-items: center; justify-content: space-between; }
.coach-panel-head h2 { margin: 6px 0 0; font-family: var(--display); font-size: clamp(28px,3vw,38px); line-height: 1; }
.signal-pulse { width: 12px; height: 12px; background: var(--amber); border-radius: 50%; box-shadow: 0 0 0 7px rgba(235,168,70,.12),0 0 0 14px rgba(235,168,70,.06); animation: signal 2.4s ease-in-out infinite; }
.mastery-bands { display: grid; gap: 18px; margin-top: 30px; }
.mastery-band { display: grid; grid-template-columns: minmax(105px,.55fr) minmax(130px,1.45fr) 40px; gap: 14px; align-items: center; }
.mastery-label span,.mastery-label small { display: block; }
.mastery-label span { font-size: 11px; font-weight: 700; }
.mastery-label small { margin-top: 2px; color: var(--muted); font-size: 8px; text-transform: uppercase; }
.mastery-track { height: 9px; overflow: hidden; background: #dfe3d8; border-radius: 999px; box-shadow: inset 0 1px 2px rgba(23,58,49,.08); }
.mastery-track span { display: block; height: 100%; background: linear-gradient(90deg,var(--pine-700),#76a48d); border-radius: inherit; transform-origin: left; animation: band-grow .7s var(--ease) both; }
.mastery-band strong { color: var(--pine-700); font-family: var(--display); font-size: 15px; text-align: right; }
.coach-mini-empty { display: grid; min-height: 190px; place-items: center; margin-top: 20px; color: var(--muted); text-align: center; background: var(--mint-soft); border: 1px dashed #c8d1c4; border-radius: 14px; }
.coach-mini-empty p { max-width: 310px; margin: 0; font-size: 11px; line-height: 1.6; }
.coach-recommendation { position: relative; display: flex; overflow: hidden; flex-direction: column; justify-content: space-between; color: white; background: radial-gradient(circle at 85% 14%,rgba(255,255,255,.17),transparent 18%),linear-gradient(135deg,#9b563e,var(--coral)); border: 1px solid rgba(136,70,49,.3); isolation: isolate; }
.coach-recommendation::after { position: absolute; z-index: -1; right: -70px; bottom: -105px; width: 260px; height: 260px; content: ""; border: 1px solid rgba(255,255,255,.18); border-radius: 50%; box-shadow: 0 0 0 31px rgba(255,255,255,.035),0 0 0 62px rgba(255,255,255,.025); }
.coach-recommendation.quiet { background: linear-gradient(135deg,var(--pine-800),var(--pine-700)); }
.coach-recommendation .kicker { color: #f3dbc9; }
.recommendation-orbit { float: right; color: rgba(255,255,255,.55); font-size: 54px; line-height: .7; }
.recommendation-meta { margin: 22px 0 6px !important; color: #f4ddcf !important; font-size: 9px !important; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.coach-recommendation h2 { max-width: 420px; margin: 5px 0 8px; font-family: var(--display); font-size: clamp(28px,3.4vw,42px); line-height: 1; }
.coach-recommendation p { max-width: 440px; margin: 0; color: #f5e1d6; font-size: 11px; line-height: 1.6; }
.recommendation-cta { display: flex; min-height: 47px; align-items: center; justify-content: space-between; margin-top: 25px; padding: 0 15px; color: var(--pine-950); font-size: 11px; font-weight: 700; background: var(--paper-bright); border: 0; border-radius: 10px; cursor: pointer; transition: transform .2s,box-shadow .2s; }
.recommendation-cta:hover { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(63,28,18,.18); }
.coach-practice { scroll-margin-top: 92px; margin-top: 20px; padding: clamp(25px,4vw,42px); background: rgba(255,250,241,.68); border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--soft-shadow); }
.coach-practice-top { display: flex; gap: 25px; align-items: end; justify-content: space-between; margin-bottom: 25px; }
.coach-practice-top h2 { margin: 5px 0 0; font-family: var(--display); font-size: clamp(29px,3.8vw,43px); line-height: 1; }
.exercise-position { display: grid; width: min(240px,32vw); gap: 8px; color: var(--muted); font-size: 9px; font-weight: 700; text-align: right; }
.exercise-card { position: relative; padding: clamp(24px,4vw,42px); overflow: hidden; background: var(--paper-bright); border: 1px solid #d7d7c8; border-radius: 18px; box-shadow: 0 13px 35px rgba(24,52,44,.08); }
.exercise-card::before { position: absolute; left: 0; top: 0; bottom: 0; width: 5px; content: ""; background: var(--amber); }
.exercise-card.answered-correct::before { background: var(--pine-700); }
.exercise-card.answered-wrong::before { background: var(--coral); }
.exercise-head { display: flex; gap: 20px; align-items: flex-start; justify-content: space-between; }
.exercise-head > div { display: flex; gap: 7px; flex-wrap: wrap; align-items: center; }
.exercise-head small { width: 100%; margin-top: 4px; color: var(--muted); font-size: 9px; }
.exercise-type,.exercise-skill { display: inline-flex; min-height: 25px; align-items: center; padding: 0 9px; font-size: 8px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; border-radius: 999px; }
.exercise-type { color: #7c531d; background: var(--amber-soft); border: 1px solid #edc277; }
.exercise-skill { color: var(--pine-700); background: var(--mint); border: 1px solid #c8d9c2; }
.exercise-number { color: #c7c8bd; font-family: var(--display); font-size: 34px; line-height: 1; }
.exercise-prompt { max-width: 850px; margin-top: 28px; }
.exercise-prompt > p { margin: 0 0 8px; color: var(--muted); font-size: 11px; }
.exercise-prompt h3 { margin: 0; color: #28493e; font-family: var(--display); font-size: clamp(23px,3.1vw,35px); line-height: 1.35; }
.exercise-clue { display: inline-flex; min-height: 31px; align-items: center; margin-top: 13px; padding: 0 11px; color: #775122; font-size: 10px; font-weight: 700; background: var(--amber-soft); border: 1px solid #edc57c; border-radius: 999px; }
.coach-answer-form { display: grid; max-width: 760px; gap: 16px; margin-top: 27px; }
.coach-answer-form label { font-size: 10px; letter-spacing: .04em; text-transform: uppercase; }
.coach-answer-form input { min-height: 57px; font-size: 16px; text-transform: none; }
.coach-answer-form > .primary-button { width: max-content; min-width: 145px; }
.coach-choice-grid { display: grid; max-width: 880px; grid-template-columns: repeat(3,1fr); gap: 10px; margin-top: 25px; }
.coach-choice-grid > button { display: grid; min-height: 65px; grid-template-columns: 31px 1fr; gap: 10px; align-items: center; padding: 10px 14px; color: var(--ink); font-size: 11px; font-weight: 700; text-align: left; background: #fbf6ec; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; transition: transform .2s,border-color .2s,background .2s; }
.coach-choice-grid > button > span { display: grid; width: 29px; height: 29px; place-items: center; color: var(--pine-700); background: var(--mint); border-radius: 50%; }
.coach-choice-grid > button:hover:not(:disabled) { background: white; border-color: var(--pine-700); transform: translateY(-2px); }
.word-order-form { max-width: 900px; margin-top: 27px; }
.word-order-answer { display: flex; min-height: 83px; gap: 8px; flex-wrap: wrap; align-items: center; padding: 13px; background: #f4ede0; border: 1px dashed #abb8aa; border-radius: 13px; }
.word-order-placeholder { color: var(--muted); font-family: var(--display); font-size: 17px; }
.word-order-answer button,.word-order-tokens button { min-height: 40px; padding: 0 13px; font-size: 11px; font-weight: 700; border-radius: 9px; cursor: pointer; }
.word-order-answer button { display: inline-flex; gap: 8px; align-items: center; color: white; background: var(--pine-700); border: 1px solid var(--pine-700); }
.word-order-answer button span { color: var(--amber-soft); font-size: 15px; }
.word-order-tokens { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.word-order-tokens button { color: var(--pine-800); background: var(--mint-soft); border: 1px solid #c6d5c1; transition: transform .2s,opacity .2s; }
.word-order-tokens button:hover:not(:disabled) { transform: translateY(-2px); }
.word-order-tokens button:disabled { opacity: .25; }
.exercise-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 21px; padding-top: 18px; border-top: 1px solid var(--line); }
.listening-controls { margin-top: 27px; }
.listen-button { display: grid; width: min(100%,380px); min-height: 92px; grid-template-columns: 70px 1fr; grid-template-rows: auto auto; column-gap: 17px; align-items: end; padding: 15px 20px; color: white; text-align: left; background: linear-gradient(120deg,var(--pine-900),var(--pine-700)); border: 1px solid var(--pine-800); border-radius: 15px; box-shadow: 0 10px 25px rgba(24,52,44,.15); cursor: pointer; }
.listen-button:disabled { opacity: .58; cursor: default; }
.listen-button strong { align-self: end; font-size: 12px; }
.listen-button small { align-self: start; color: var(--sage); font-size: 9px; }
.listen-rings { position: relative; display: grid; width: 63px; height: 63px; grid-row: 1/3; place-items: center; color: var(--pine-950); background: var(--amber); border-radius: 50%; }
.listen-rings::before { content: "▶"; font-size: 17px; transform: translateX(1px); }
.listen-rings i { position: absolute; inset: -1px; border: 1px solid rgba(246,214,157,.5); border-radius: 50%; opacity: 0; }
.listen-button:not(:disabled):hover .listen-rings i { animation: listen-wave 1.7s ease-out infinite; }
.listen-button .listen-rings i:nth-child(2) { animation-delay: .45s; }
.listen-button .listen-rings i:nth-child(3) { animation-delay: .9s; }
.listening-choice-label { margin: 24px 0 -12px; color: var(--muted); font-size: 10px; font-weight: 700; }
.pronunciation-row { display: flex; gap: 12px; align-items: center; }
.pronunciation-row small { max-width: 440px; color: var(--muted); font-size: 9px; line-height: 1.45; }
.microphone-button.listening { color: white; background: var(--coral); border-color: var(--coral); }
.exercise-status { min-height: 18px; margin: 17px 0 0; color: var(--muted); font-size: 10px; }
.exercise-status.error { color: #9b4934; font-weight: 700; }
.coach-feedback { display: grid; grid-template-columns: 56px minmax(0,1fr) auto; gap: 17px; align-items: center; margin-top: 28px; padding: 22px; background: var(--mint-soft); border: 1px solid #bed3b9; border-radius: 15px; }
.coach-feedback.wrong { background: #f8e6df; border-color: #e3b9aa; }
.feedback-mark { display: grid; width: 52px; height: 52px; place-items: center; color: white; font-size: 23px; background: var(--pine-700); border-radius: 50%; }
.coach-feedback.wrong .feedback-mark { background: var(--coral); }
.coach-feedback h4 { margin: 4px 0 0; font-family: var(--display); font-size: clamp(18px,2.3vw,27px); line-height: 1.25; }
.coach-feedback p { margin: 8px 0 0; color: var(--muted); font-size: 11px; }
.feedback-metrics { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 11px; }
.feedback-metrics span { display: inline-flex; min-height: 26px; align-items: center; padding: 0 9px; color: var(--pine-700); font-size: 9px; font-weight: 700; background: white; border: 1px solid rgba(55,109,94,.18); border-radius: 999px; }
.coach-feedback > .primary-button { min-width: 145px; }
.coach-finished { max-width: 760px; margin: auto; padding: 30px 20px 45px; text-align: center; }
.coach-finished .finish-spark { margin-top: 0; }
.coach-finished h2 { margin: 8px 0; font-family: var(--display); font-size: clamp(34px,5vw,54px); line-height: 1; }
.coach-finished p { max-width: 600px; margin: 0 auto; color: var(--muted); font-size: 12px; line-height: 1.7; }
.coach-empty-actions { display: flex; gap: 9px; justify-content: center; margin-top: 22px; }
.coach-practice-empty .empty-state { border: 0; background: transparent; }
.coach-error { display: grid; min-height: 520px; place-items: center; align-content: center; padding: 40px; text-align: center; background: rgba(255,250,241,.6); border: 1px dashed #b9c1b6; border-radius: 22px; }
.coach-error > span { display: grid; width: 75px; height: 75px; place-items: center; color: white; font-size: 32px; background: var(--coral); border-radius: 50%; }
.coach-error h1 { margin: 18px 0 5px; font-family: var(--display); font-size: clamp(35px,5vw,55px); }
.coach-error p { max-width: 520px; margin: 0 0 20px; color: var(--muted); font-size: 12px; }

/* Modal and builder */
.modal { width: min(820px, calc(100% - 28px)); max-height: calc(100vh - 35px); padding: 0; color: var(--ink); background: var(--paper); border: 0; border-radius: 22px; box-shadow: 0 35px 100px rgba(8,33,26,.35); }.modal::backdrop { background: rgba(7,29,23,.66); backdrop-filter: blur(6px); }.modal-close { position: sticky; z-index: 5; float: right; top: 15px; right: 15px; display: grid; width: 37px; height: 37px; place-items: center; color: var(--ink); font-size: 23px; background: var(--paper-bright); border: 1px solid var(--line); border-radius: 50%; cursor: pointer; }.modal-body { padding: 35px clamp(23px,5vw,50px) 45px; }.modal-body h1 { margin: 7px 0 9px; font-family: var(--display); font-size: clamp(32px,5vw,47px); line-height: 1; }.modal-body > p { margin: 0 0 25px; color: var(--muted); font-size: 11px; }.builder-form { display: grid; gap: 19px; }.builder-section { padding: 18px; background: rgba(255,250,241,.68); border: 1px solid var(--line); border-radius: 13px; }.builder-section h2 { margin: 0 0 14px; font-family: var(--display); font-size: 20px; }.builder-segment { margin-top: 12px; padding-top: 17px; border-top: 1px dashed #bfc5b9; }.builder-segment:first-of-type { border-top: 0; }.builder-segment h3 { margin: 0 0 12px; font-size: 11px; text-transform: uppercase; letter-spacing: .1em; }.builder-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }.builder-fields .full { grid-column: 1/-1; }.builder-fields textarea { min-height: 85px; }.choice-builder { display: grid; grid-template-columns: 36px 1fr 1fr; gap: 8px; margin-top: 8px; }.choice-builder input { min-height: 42px; }.builder-actions { display: flex; justify-content: flex-end; gap: 9px; }
.access-form { margin-top: 26px; }
.access-section { padding: clamp(18px,3vw,25px); }
.access-section-heading { display: flex; gap: 18px; align-items: flex-start; justify-content: space-between; }
.access-section-heading h2 { margin-bottom: 5px; }
.access-section-heading p { max-width: 510px; margin: 0; color: var(--muted); font-size: 10px; line-height: 1.55; }
.access-count { flex: none; padding: 6px 9px; color: var(--pine-700); font-size: 8px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; background: var(--mint); border: 1px solid #c8d9c2; border-radius: 999px; }
.access-toolbar { display: grid; grid-template-columns: minmax(0,1.5fr) minmax(165px,.5fr); gap: 11px; margin-top: 20px; }
.access-rule-note { display: grid; min-height: 43px; grid-template-columns: 9px auto 1fr; gap: 8px; align-items: center; margin-top: 11px; padding: 10px 12px; color: var(--muted); font-size: 9px; background: #f0ebdf; border: 1px solid #d7d4c8; border-radius: 9px; }
.access-rule-note strong { color: var(--ink); font-size: 9px; }
.access-rule-dot { width: 8px; height: 8px; background: #9aab9a; border-radius: 50%; box-shadow: 0 0 0 3px rgba(154,171,154,.13); }
.access-rule-dot.custom { background: var(--amber); box-shadow: 0 0 0 3px rgba(235,168,70,.15); }
.access-rule-dot.pending { background: var(--coral); box-shadow: 0 0 0 3px rgba(200,110,82,.14); }
.access-loading,.access-empty { display: grid; min-height: 110px; place-items: center; margin-top: 14px; color: var(--muted); font-size: 10px; text-align: center; background: rgba(239,238,226,.55); border: 1px dashed #bbc3b8; border-radius: 11px; }
.access-empty { align-content: center; gap: 4px; }
.access-empty strong { color: var(--ink); font-family: var(--display); font-size: 17px; }
.access-empty span { font-size: 9px; }
.segment-access-list { display: grid; gap: 12px; margin-top: 14px; }
.segment-access-card { min-width: 0; margin: 0; padding: 17px; background: var(--paper-bright); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 7px 19px rgba(24,52,44,.045); }
.segment-access-card legend { max-width: calc(100% - 20px); padding: 0 7px; overflow: hidden; color: var(--ink); font-family: var(--display); font-size: 16px; text-overflow: ellipsis; white-space: nowrap; }
.segment-access-card legend span { margin-right: 8px; color: var(--coral); font-family: var(--body); font-size: 8px; font-weight: 700; letter-spacing: .11em; text-transform: uppercase; }
.segment-access-meta { display: flex; justify-content: flex-end; margin: -7px 0 10px; }
.access-mode { padding: 4px 7px; color: var(--muted); font-size: 7px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; background: #eeece3; border-radius: 999px; }
.access-mode.custom { color: #78501a; background: var(--amber-soft); }
.access-mode.pending { color: #843c29; background: #f6ddd1; }
.segment-switch-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 7px; }
.segment-switch { display: grid; min-width: 0; min-height: 58px; grid-template-columns: 21px minmax(0,1fr); gap: 10px; align-items: center; padding: 9px 10px; background: #f7f2e8; border: 1px solid transparent; border-radius: 9px; cursor: pointer; transition: background .2s,border-color .2s,transform .2s var(--ease); }
.segment-switch:first-child { grid-column: 1/-1; background: var(--mint-soft); border-color: #d0ddcb; }
.segment-switch:hover { background: white; border-color: var(--line); transform: translateY(-1px); }
.segment-switch input { width: 19px; height: 19px; min-height: 19px; margin: 0; padding: 0; accent-color: var(--pine-700); cursor: pointer; }
.segment-switch:has(input:focus-visible) { border-color: var(--pine-700); box-shadow: 0 0 0 3px rgba(55,109,94,.1); }
.segment-switch strong,.segment-switch small { display: block; }
.segment-switch strong { color: var(--ink); font-size: 9px; line-height: 1.2; }
.segment-switch small { margin-top: 3px; color: var(--muted); font-size: 8px; font-weight: 500; line-height: 1.3; }
.account-danger { margin-top: 25px; padding-top: 18px; border-top: 1px solid var(--line); }
.practice-game { min-height: 650px; padding-top: 34px; }.practice-top { display: grid; grid-template-columns: auto 1fr; gap: 20px; align-items: end; margin-bottom: 25px; }.practice-top strong { display: block; margin-top: 3px; font-family: var(--display); }.practice-meter { height: 6px; overflow: hidden; background: #dde0d5; border-radius: 999px; }.practice-meter span { display: block; height: 100%; background: var(--amber); border-radius: inherit; transition: width .35s var(--ease); }
.flash-card { position: relative; display: flex; width: min(100%,560px); min-height: 365px; flex-direction: column; align-items: center; justify-content: center; margin: auto; padding: 40px; color: var(--pine-950); background: radial-gradient(circle at 80% 15%,rgba(255,255,255,.7),transparent 25%),linear-gradient(145deg,#e7f0df,#c7dcc2); border: 1px solid #afc7ab; border-radius: 24px; box-shadow: 0 25px 55px rgba(24,52,44,.15),inset 0 0 0 8px rgba(255,255,255,.2); cursor: pointer; transform-style: preserve-3d; transition: transform .45s var(--ease),box-shadow .3s; }.flash-card:not(:disabled):hover { transform: translateY(-4px) rotateX(2deg); box-shadow: 0 31px 65px rgba(24,52,44,.19); }.flash-card:disabled { opacity: 1; cursor: default; }.flash-card::before { position: absolute; inset: 15px; content: ""; border: 1px dashed rgba(55,109,94,.34); border-radius: 15px; }.card-language { position: absolute; left: 29px; top: 27px; color: var(--pine-700); font-size: 9px; font-weight: 700; letter-spacing: .14em; }.flash-card strong { font-family: var(--display); font-size: clamp(43px,7vw,70px); line-height: 1; }.flash-card em { margin-top: 8px; color: #7b4a1f; font-family: var(--display); font-size: clamp(24px,4vw,36px); font-style: normal; }.flash-card small { position: absolute; bottom: 28px; color: var(--muted); font-size: 10px; }.card-divider { display: block; margin-top: 22px; color: var(--amber); }.rating-grid { display: grid; width: min(100%,560px); grid-template-columns: repeat(4,1fr); gap: 8px; margin: 15px auto 0; }.rating-grid button { min-height: 58px; color: var(--ink); background: var(--paper-bright); border: 1px solid var(--line); border-radius: 10px; cursor: pointer; transition: transform .2s,border-color .2s; }.rating-grid button:hover { transform: translateY(-2px); border-color: var(--pine-700); }.rating-grid strong,.rating-grid small { display: block; }.rating-grid strong { font-size: 10px; }.rating-grid small { margin-top: 3px; color: var(--muted); font-size: 8px; }.practice-tip { max-width: 560px; margin: 17px auto 0 !important; text-align: center; }
.practice-finish { padding-block: 55px; text-align: center; }.finish-spark { display: grid; width: 88px; height: 88px; place-items: center; margin: 20px auto; color: var(--pine-950); font-size: 40px; background: var(--amber); border-radius: 50%; box-shadow: 0 0 0 12px rgba(235,168,70,.15),0 16px 35px rgba(24,52,44,.13); animation: spark-pop .55s var(--ease) both; }.practice-finish > p { max-width: 560px; margin: 12px auto 25px; line-height: 1.6; }.practice-results { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; margin: 25px 0; }.practice-results div { padding: 17px; background: var(--paper-bright); border: 1px solid var(--line); border-radius: 12px; }.practice-results strong,.practice-results span { display: block; }.practice-results strong { font-family: var(--display); font-size: 25px; }.practice-results span { margin-top: 3px; color: var(--muted); font-size: 9px; text-transform: uppercase; }.practice-finish .builder-actions { justify-content: center; }
.loading { display: grid; min-height: 60vh; place-items: center; color: var(--muted); font-size: 12px; }.loading span { display: block; width: 38px; height: 38px; margin: 0 auto 12px; border: 3px solid var(--mint); border-top-color: var(--pine-700); border-radius: 50%; animation: spin .8s linear infinite; }
.toast { position: fixed; z-index: 300; left: 50%; bottom: 25px; max-width: min(430px,calc(100% - 30px)); padding: 12px 16px; color: white; font-size: 11px; font-weight: 600; background: var(--pine-950); border: 1px solid rgba(255,255,255,.13); border-radius: 10px; box-shadow: 0 14px 35px rgba(7,29,23,.25); opacity: 0; pointer-events: none; transform: translate(-50%,18px); transition: opacity .25s,transform .25s; }.toast.visible { opacity: 1; transform: translate(-50%,0); }

/* XP tooltip wand */
.wand-toggle { position: relative; display: inline-grid; width: 40px; min-width: 40px; min-height: 40px; place-items: center; padding: 0; color: #744611; font-weight: 800; background: #fff6e5; border: 1px solid #e4c58d; border-radius: 50%; cursor: pointer; box-shadow: 0 5px 14px rgba(116,70,17,.08); transition: color .2s,background .2s,box-shadow .2s,transform .2s; }
.wand-toggle > svg { width: 18px; height: 18px; fill: none; stroke: var(--amber); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.wand-toggle::after { position: absolute; z-index: 30; right: 0; top: calc(100% + 9px); display: none; width: max-content; max-width: min(260px,calc(100vw - 24px)); padding: 9px 11px; content: attr(data-tooltip); color: white; font-size: 1rem; font-weight: 700; line-height: 1.4; text-align: left; white-space: normal; background: var(--pine-950); border: 1px solid rgba(255,255,255,.14); border-radius: 9px; box-shadow: 0 10px 26px rgba(7,29,23,.24); pointer-events: none; }
.wand-toggle:hover::after,.wand-toggle:focus-visible::after { display: block; }
.wand-toggle:hover { transform: translateY(-1px); box-shadow: 0 8px 18px rgba(116,70,17,.13); }
.wand-toggle.active { color: white; background: var(--pine-900); border-color: var(--pine-900); box-shadow: 0 0 0 4px rgba(235,168,70,.18),0 8px 22px rgba(23,58,49,.2); }
.wand-toggle.active > svg { stroke: var(--amber-soft); }
.wand-layer { position: fixed; z-index: 500; inset: 0; pointer-events: none; }
.wand-mark-layer { position: fixed; z-index: 250; inset: 0; pointer-events: none; }
.wand-element-highlight { position: fixed; display: block; border-radius: 0; pointer-events: none; }
.wand-element-highlight-start { border-radius: 5px 0 0 5px; }
.wand-element-highlight-end { border-radius: 0 5px 5px 0; }
.wand-element-highlight-start.wand-element-highlight-end { border-radius: 5px; }
.wand-element-highlight-candidate { background: rgba(119,128,123,.08); box-shadow: inset 0 0 0 10px rgba(105,116,110,.16),inset 0 0 12px rgba(105,116,110,0); }
.wand-element-highlight-purchased { background: rgba(235,168,70,.2); box-shadow: inset 0 0 0 10px rgba(235,168,70,.16),inset 0 0 12px rgba(235,168,70,0); }
.wand-hold-indicator { position: fixed; display: grid; max-width: calc(100vw - 24px); min-width: 132px; min-height: 42px; place-items: center; padding: 8px 13px 8px 39px; color: var(--ink); font-weight: 800; white-space: nowrap; background: #fffaf1; border: 1px solid #d7c59e; border-radius: 999px; box-shadow: 0 10px 28px rgba(16,43,36,.2); pointer-events: none; }
.wand-hold-indicator::before { position: absolute; left: 8px; top: 50%; width: 24px; height: 24px; content: ""; background: conic-gradient(var(--amber) 0 100%,#e3dfd5 0); border-radius: 50%; transform: translateY(-50%) rotate(-90deg); animation: wand-hold-fill 460ms linear both; }
.wand-hold-indicator::after { position: absolute; left: 13px; top: 50%; width: 14px; height: 14px; content: "✦"; display: grid; place-items: center; color: var(--pine-900); font-size: 10px; background: #fffaf1; border-radius: 50%; transform: translateY(-50%); }
.wand-hold-disable::before { background: conic-gradient(var(--coral) 0 100%,#e3dfd5 0); }
.wand-popover,.wand-result { position: fixed; width: min(310px,calc(100vw - 24px)); padding: 19px; color: var(--ink); background: #fffaf1; border: 1px solid #d7c59e; border-radius: 15px; box-shadow: 0 22px 58px rgba(16,43,36,.25),0 0 0 5px rgba(255,250,241,.42); pointer-events: auto; animation: wand-pop .18s var(--ease) both; }
.wand-drag-price { position: fixed; display: flex; width: auto; min-width: 86px; gap: 8px; align-items: center; justify-content: space-between; padding: 7px 9px; color: #5f665f; background: #f6f4ee; border: 1px solid #b9c0bb; border-radius: 9px; box-shadow: 0 8px 22px rgba(16,43,36,.16); pointer-events: none; }
.wand-drag-price span { font-size: 8px; font-weight: 700; }
.wand-drag-price strong { color: #75460d; font-family: var(--display); font-size: 13px; }
.wand-popover::before,.wand-result::before { position: absolute; inset: 7px; content: ""; pointer-events: none; border: 1px solid rgba(235,168,70,.25); border-radius: 10px; }
.wand-popover > *,.wand-result > * { position: relative; z-index: 1; }
.wand-spark { display: grid; width: 31px; height: 31px; place-items: center; margin-bottom: 9px; color: #75460d; background: var(--amber-soft); border-radius: 50%; }
.wand-popover > p { margin: 7px 0 12px; color: var(--muted); font-size: 10px; }
.wand-popover > strong,.wand-result > strong { display: block; padding-right: 22px; font-family: var(--display); font-size: 20px; line-height: 1.25; }
.wand-result > strong { margin-top: 7px; color: #75460d; font-size: 23px; }
.wand-result > small { display: block; margin-top: 9px; color: var(--muted); font-size: 9px; line-height: 1.4; }
.wand-action-row { display: grid; grid-template-columns: 58px minmax(0,1fr); gap: 8px; align-items: stretch; margin-top: 12px; }
.wand-speak-stack { display: grid; gap: 6px; align-content: stretch; }
.wand-result-action-row .wand-speak-stack { grid-template-rows: repeat(2,minmax(0,1fr)); }
.wand-action-note { margin: 8px 0 0; color: var(--muted); font-size: 8px; line-height: 1.35; text-align: center; }
.wand-popover > .wand-action-note,.wand-result > .wand-action-note { margin: 8px 0 0; color: var(--muted); font-size: 8px; line-height: 1.35; }
.wand-speak,.wand-undo { display: flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 800; cursor: pointer; }
.wand-speak { width: 58px; min-height: 42px; gap: 6px; padding: 0; color: #53605a; background: #f2efe7; border: 1px solid #d9d1bf; border-radius: 10px; }
.wand-speak:hover { color: var(--pine-800); background: white; border-color: #c6d5c1; }
.wand-speak.speaking { color: white; background: var(--pine-700); border-color: var(--pine-700); }
.wand-speak-code { display: block; width: 17px; color: currentColor; font-size: 15px; font-weight: 900; line-height: 1; text-align: center; }
.wand-speak-icon { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.wand-speak-source { color: #5a4d3d; background: #f2efe7; border-color: #d9d1bf; }
.wand-speak-translation { color: var(--pine-800); background: #f5faf3; border-color: #c6d5c1; }
.wand-speak-translation:hover { background: white; border-color: var(--pine-700); }
.wand-undo { width: 100%; min-height: 42px; padding: 0 10px; color: #803820; line-height: 1.1; text-align: center; overflow-wrap: anywhere; background: #f6ddd1; border: 1px solid #e8bca9; border-radius: 9px; }
.wand-kicker { display: block; margin-bottom: 5px; color: #97611f; font-size: 8px; font-weight: 800; text-transform: uppercase; }
.wand-close { position: absolute !important; z-index: 3 !important; right: 10px; top: 9px; width: 29px; height: 29px; padding: 0; color: var(--muted); font-size: 17px; background: transparent; border: 0; border-radius: 50%; cursor: pointer; }
.wand-close:hover { color: var(--ink); background: #f1eadc; }
.wand-buy { display: flex; width: 100%; min-height: 42px; align-items: center; justify-content: center; padding: 0 10px; color: white; font-size: 10px; font-weight: 800; line-height: 1.1; text-align: center; overflow-wrap: anywhere; background: var(--pine-900); border: 0; border-radius: 9px; cursor: pointer; }
.wand-popover,.wand-result {
  --wand-ink-0: #f7f3ff;
  --wand-ink-1: #cabfe4;
  --wand-bg-0: #150d26;
  --wand-bg-1: #251a42;
  --wand-line: rgba(167,139,250,.22);
  --wand-accent: #a78bfa;
  --wand-accent-soft: rgba(167,139,250,.16);
  --wand-accent-ink: #241a3f;
  width: min(336px,calc(100vw - 32px));
  box-sizing: border-box;
  padding: 16px 18px 0;
  overflow: hidden;
  color: var(--wand-ink-0);
  font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  background: radial-gradient(120% 160% at 12% -12%,rgba(167,139,250,.18),transparent 55%),linear-gradient(165deg,var(--wand-bg-1),var(--wand-bg-0));
  border: 1px solid var(--wand-line);
  border-radius: 18px;
  box-shadow: 0 24px 48px -16px rgba(5,2,12,.7),0 0 0 1px rgba(0,0,0,.3),0 0 32px -12px var(--wand-accent-soft);
  letter-spacing: 0;
}
.wand-result {
  --wand-accent: #f2b957;
  --wand-accent-soft: rgba(242,185,87,.18);
  --wand-accent-ink: #3d2a06;
}
.wand-popover *,.wand-result * { letter-spacing: 0; }
.wand-popover::before,.wand-result::before { content: none; }
.wand-header-row { display: flex; gap: 12px; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.wand-popover .wand-speak-stack,.wand-result .wand-speak-stack { display: flex; gap: 8px; align-content: center; }
.wand-popover .wand-speak,.wand-result .wand-speak {
  width: auto;
  height: 40px;
  min-height: 40px;
  box-sizing: border-box;
  gap: 7px;
  padding: 0 14px;
  color: var(--wand-ink-1);
  background: rgba(255,255,255,.03);
  border: 1px solid var(--wand-line);
  border-radius: 999px;
  transition: color .15s ease,border-color .15s ease,background .15s ease;
}
.wand-popover .wand-speak:hover,.wand-result .wand-speak:hover { color: var(--wand-ink-0); background: var(--wand-accent-soft); border-color: var(--wand-accent); }
.wand-popover .wand-speak-code,.wand-result .wand-speak-code { width: auto; font-size: .78em; font-weight: 600; }
.wand-popover .wand-speak-icon,.wand-result .wand-speak-icon { width: 17px; height: 17px; stroke-width: 1.8; }
.wand-popover .wand-close,.wand-result .wand-close {
  position: static !important;
  right: auto;
  top: auto;
  z-index: auto !important;
  display: flex;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  padding: 0;
  color: var(--wand-ink-1);
  font-size: 1.15rem;
  line-height: 1;
  background: transparent;
  border: 1px solid var(--wand-line);
  border-radius: 50%;
  transition: color .15s ease,border-color .15s ease,background .15s ease;
}
.wand-popover .wand-close:hover,.wand-result .wand-close:hover { color: var(--wand-ink-0); background: var(--wand-accent-soft); border-color: var(--wand-accent); }
.wand-popover > strong,.wand-result > strong {
  margin: 0 0 6px;
  padding-right: 0;
  color: var(--wand-ink-0);
  font-family: var(--display);
  font-size: 1.34em;
  font-weight: 600;
  line-height: 1.3;
}
.wand-result > small {
  display: block;
  margin: 0 0 16px;
  color: var(--wand-ink-1);
  font-family: var(--display);
  font-size: 1em;
  font-style: italic;
  font-weight: 400;
  line-height: 1.42;
}
.wand-popover > p {
  margin: 0 0 12px;
  color: var(--wand-ink-1);
  font-family: var(--display);
  font-size: 1em;
  font-style: italic;
  font-weight: 400;
  line-height: 1.42;
}
.wand-popover > .wand-action-note {
  margin: -4px 0 14px;
  color: var(--wand-ink-1);
  font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: .72em;
  font-style: normal;
  line-height: 1.35;
  text-align: left;
}
.wand-popover .wand-action-row,.wand-result .wand-action-row { display: block; margin: 4px -18px 0; }
.wand-popover .wand-buy,.wand-result .wand-undo {
  width: 100%;
  box-sizing: border-box;
  gap: 8px;
  min-height: 0;
  padding: 17px 18px;
  color: var(--wand-accent-ink);
  font-size: .76em;
  font-weight: 600;
  text-transform: uppercase;
  background: var(--wand-accent);
  border: 0;
  border-radius: 0;
  transition: filter .15s ease;
}
.wand-popover .wand-buy::before { content: "+"; font-size: 1.25em; }
.wand-result .wand-undo::before { content: "\21ba"; font-size: 1.25em; }
.wand-popover .wand-buy:hover,.wand-result .wand-undo:hover { filter: brightness(1.08); }
.wand-popover .wand-buy:active,.wand-result .wand-undo:active { filter: brightness(.96); }
.wand-popover .wand-buy:disabled { opacity: .55; cursor: not-allowed; filter: none; }
.wand-popover > small { display: block; margin-top: 8px; color: #9b4934; font-size: 8px; text-align: center; }
.wand-paragraph-wrap { position: relative; }
.wand-paragraph-button { position: absolute; right: calc(100% + 15px); top: 3px; display: inline-flex; min-height: 31px; gap: 6px; align-items: center; padding: 0 9px; color: #5f665f; font-size: 9px; font-weight: 800; white-space: nowrap; background: #f0eee8; border: 1px solid #c9cec8; border-radius: 9px; opacity: 0; pointer-events: none; transform: translateX(5px); transition: opacity .18s,transform .18s,box-shadow .18s; }
.wand-paragraph-button > span { display: none; }
.wand-active .wand-paragraph-button { opacity: 1; pointer-events: auto; transform: none; cursor: pointer; }
.wand-active .wand-paragraph-button:hover { color: var(--ink); background: white; box-shadow: inset 0 0 0 2px rgba(108,119,113,.22),0 6px 15px rgba(24,52,44,.09); }
.wand-word { position: relative; border-radius: 4px; box-decoration-break: clone; -webkit-box-decoration-break: clone; transition: box-shadow .12s,background .12s; }
.wand-active .wand-word { cursor: crosshair; }
.wand-active .wand-text { touch-action: pan-y; }
.wand-active .wand-word,.wand-active .wand-gap,.wand-handle,.wand-holding { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.wand-active .wand-candidate { background: rgba(119,128,123,.08); box-shadow: inset 0 0 0 10px rgba(105,116,110,.16),inset 0 0 12px rgba(105,116,110,0); }
.wand-candidate-element { background: transparent !important; box-shadow: none !important; border-radius: 0; }
.wand-purchased { position: relative; box-shadow: inset 0 0 0 10px rgba(235,168,70,.2),inset 0 0 12px rgba(235,168,70,0) !important; border-radius: 5px; }
.wand-purchased-element { background: transparent !important; box-shadow: none !important; border-radius: 0 !important; }
.wand-inflow-element-chrome .wand-candidate-element { background: rgba(119,128,123,.08) !important; box-shadow: inset 0 0 0 10px rgba(105,116,110,.16),inset 0 0 12px rgba(105,116,110,0) !important; border-radius: 5px !important; }
.wand-inflow-element-chrome .wand-purchased-element { background: rgba(235,168,70,.16) !important; box-shadow: inset 0 0 0 10px rgba(235,168,70,.18),inset 0 0 12px rgba(235,168,70,0) !important; border-radius: 5px !important; }
.wand-word.wand-candidate,.wand-word.wand-purchased { border-radius: 0; }
.wand-word.wand-candidate-start,.wand-word.wand-purchased-start { border-radius: 5px 0 0 5px; }
.wand-word.wand-candidate-end,.wand-word.wand-purchased-end { border-radius: 0 5px 5px 0; }
.wand-word.wand-candidate-start.wand-candidate-end,.wand-word.wand-purchased-start.wand-purchased-end { border-radius: 5px; }
.wand-gap.wand-candidate,.wand-gap.wand-purchased { border-radius: 0; }
.wand-tooltip-badge { position: absolute; z-index: 8; right: 0; top: 0; display: grid !important; width: 10px; height: 10px; place-items: center; padding: 0; visibility: visible !important; opacity: 1 !important; background: var(--amber); border: 1px solid #fffaf1; border-radius: 50%; box-shadow: 0 0 0 2px rgba(235,168,70,.28),0 3px 8px rgba(16,43,36,.2); transform: translate(50%,-50%); pointer-events: auto; cursor: pointer; touch-action: manipulation; -webkit-user-select: none; user-select: none; }
.wand-floating-badge { position: fixed; right: auto; top: auto; }
.wand-tooltip-badge::before { position: absolute; inset: -8px; content: ""; }
.wand-tooltip-badge:hover,.wand-tooltip-badge:focus-visible { background: #f6c66f; box-shadow: 0 0 0 3px rgba(235,168,70,.35),0 7px 18px rgba(16,43,36,.24); }
.wand-hover-tooltip { position: fixed; z-index: 260; display: block; width: max-content; max-width: min(180px,calc(100vw - 16px)); padding: 6px 8px; color: white; font-size: 9px; font-weight: 700; line-height: 1.25; text-align: center; white-space: normal; background: var(--pine-950); border: 1px solid rgba(255,255,255,.14); border-radius: 7px; box-shadow: 0 10px 24px rgba(7,29,23,.25); opacity: 0; pointer-events: none; transform: translateY(4px); transition: opacity .16s,transform .16s; }
.wand-hover-tooltip.visible { opacity: 1; transform: translateY(0); }
.wand-handle { position: absolute; z-index: 4; top: 50%; display: block; width: 11px; height: 19px; background: #f6f4ee; border: 2px solid #737d77; border-radius: 999px; box-shadow: 0 2px 7px rgba(16,43,36,.2); transform: translateY(-50%); pointer-events: auto; cursor: ew-resize; }
.wand-handle::after { position: absolute; left: 50%; top: 50%; width: 3px; height: 3px; content: ""; background: #737d77; border-radius: 50%; transform: translate(-50%,-50%); }
.wand-handle-start { left: -7px; }
.wand-handle-end { right: -7px; }
.wand-purchased-start::before,.wand-purchased-end::after { position: absolute; top: -2px; color: #bd7923; font-size: 8px; line-height: 1; }
.wand-purchased-start::before { left: -2px; content: "⌜"; }
.wand-purchased-end::after { right: -2px; content: "⌟"; }
.wand-active .wand-purchased { cursor: inherit; }

@keyframes wand-pulse { 50% { opacity: .6; transform: rotate(16deg) scale(.88); } }
@keyframes wand-pop { from { opacity: 0; transform: translateY(5px) scale(.98); } }
@keyframes wand-hold-fill { from { clip-path: polygon(50% 50%,50% 0,50% 0,50% 0,50% 0,50% 0); } to { clip-path: polygon(50% 50%,50% 0,100% 0,100% 100%,0 100%,0 0); } }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shake { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
@keyframes spark-pop { from { opacity: 0; transform: scale(.45) rotate(-25deg); } to { opacity: 1; transform: none; } }
@keyframes point-score-shift { from { transform: translateX(18px); } to { transform: none; } }
@keyframes point-delta-slide { from { opacity: 0; transform: translateX(9px) scale(.84); } to { opacity: 1; transform: none; } }
@keyframes signal { 50% { box-shadow: 0 0 0 11px rgba(235,168,70,.09),0 0 0 20px rgba(235,168,70,0); } }
@keyframes band-grow { from { transform: scaleX(0); } }
@keyframes listen-wave { from { opacity: .55; transform: scale(1); } to { opacity: 0; transform: scale(1.7); } }

@container reader-title (max-width: 360px) {
  .reader-title-meta { align-items: flex-start; flex-direction: column; gap: 8px; }
  .reader-title-meta .kicker { width: 100%; box-sizing: border-box; }
  .reader-title-meta .kicker { display: flex; min-height: 30px; align-items: center; }
}

@media (max-width: 980px) {
  .auth-screen { grid-template-columns: 1fr; }.auth-story { min-height: 500px; }.auth-panel { min-height: 700px; }.auth-copy { margin-top: 90px; }.auth-copy h1 { font-size: 80px; }.auth-phrase { bottom: 30px; }
  .story-grid,.word-grid,.difficulty-grid,.active-story-grid,.home-exam-grid { grid-template-columns: repeat(2,1fr); }.library-hero { grid-template-columns: 1fr; }.hero-stats { grid-template-columns: repeat(3,1fr); padding: 0 45px 35px; }.stat-card { grid-template-columns: 1fr; text-align: center; border: 0; }.stat-icon { margin: auto; }.lesson-filters { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .reader-shell { grid-template-columns: 220px 1fr; }.reader-rail { padding-inline: 18px; }.reader-stage { padding-inline: 25px; }
  .settings-grid { grid-template-columns: 1fr; }.settings-card.full { grid-column: auto; }
  .coach-hero { grid-template-columns: minmax(0,1fr) 330px; }.coach-hero-copy { padding: 48px 40px; }.coach-goal-cluster { padding: 35px 25px; }.coach-goal-ring { width: 215px; height: 215px; }.coach-insight-grid { grid-template-columns: 1fr; }.coach-recommendation { min-height: 300px; }.coach-choice-grid { grid-template-columns: repeat(2,1fr); }
  .game-lanes { grid-template-columns: minmax(0,1fr); }.game-lane,.pairs-lane { grid-template-columns: 92px minmax(0,1fr) auto; }.pairs-lane .pairs-preview { width: 92px; }.memory-board { grid-template-columns: repeat(4,minmax(0,1fr)); }
}

@media (max-width: 720px) {
  .topbar { height: 68px; grid-template-columns: auto 1fr auto; padding-inline: 15px; }.profile-copy,.xp-pill small { display: none; }.main-nav { justify-self: center; }.main-nav button { min-width: 48px; padding-inline: 4px; font-size: 8px; }.main-nav button span { display: none; }.xp-pill { padding: 0 9px; }.profile-button { padding: 3px; }.profile-button > span:last-child { display: none; }
  .view-shell { width: min(100% - 26px,1220px); padding-top: 28px; }.library-hero { min-height: auto; border-radius: 20px; }.hero-copy { padding: 36px 27px; }.hero-copy h1 { font-size: 46px; }.hero-stats { padding: 0 20px 25px; }.stat-card strong { font-size: 15px; }.stat-icon { width: 35px; height: 35px; }.section-heading,.page-heading { display: block; }.section-heading p,.page-heading p { margin-top: 10px; text-align: left; }.story-grid,.word-grid,.difficulty-grid,.active-story-grid,.home-exam-grid { grid-template-columns: 1fr; }.row-actions { justify-content: stretch; flex-direction: column; }.row-actions button { width: 100%; }.lesson-filters { grid-template-columns: 1fr; }
  .reader-shell { display: block; }.reader-rail { position: relative; top: 0; height: auto; padding: 17px; border: 0; border-bottom: 1px solid var(--line); }.reader-story-head { display: none; }.segment-list { display: flex; margin: 15px 0 0; overflow-x: auto; overscroll-behavior-inline: contain; }.segment-list li { min-width: min(180px,calc(100vw - 34px)); }.rail-xp { display: none; }.reader-stage { min-width: 0; padding: 22px 14px 65px; }.reader-card,.reader-copy,.reader-title,.reader-title > div:first-child { min-width: 0; }.reader-title { gap: 10px; align-items: flex-start; }.reader-title h1 { overflow-wrap: anywhere; }.reward-badge { overflow-wrap: normal; }.reward-badge small { white-space: nowrap; }.illustration-caption { right: 18px; left: 18px; max-width: calc(100% - 36px); overflow-wrap: anywhere; border-radius: 14px; }.answer-grid { grid-template-columns: minmax(0,1fr); }.question-footer { align-items: flex-start; flex-direction: column; }.question-footer .primary-button { width: 100%; }.question-gate-card { grid-template-columns: minmax(0,1fr); }.question-gate-mark { width: 56px; height: 56px; font-size: 26px; }
  .reader-rail-actions { gap: 12px; }.reader-menu-button { display: inline-flex; flex: 0 0 auto; }.segment-list { display: none; }.reader-nav-modal h1 { font-size: clamp(28px,9vw,38px); }
  .summary-strip { grid-template-columns: 1fr; }.field-pair,.builder-fields { grid-template-columns: 1fr; }.builder-fields .full { grid-column: auto; }.choice-builder { grid-template-columns: 34px 1fr; }.choice-builder input:last-child { grid-column: 2; }.site-footer { width: calc(100% - 28px); }
  .practice-banner { grid-template-columns: 72px minmax(0,1fr); }.practice-mark { width: 72px; height: 72px; transform: none; }.practice-start { grid-column: 1/-1; width: 100%; }.rating-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }.flash-card { min-height: 330px; }.practice-results { grid-template-columns: minmax(0,1fr); }
  .word-practice-studio { margin-bottom: 42px; padding: 24px 19px; border-radius: 20px; }.practice-studio-heading { grid-template-columns: minmax(0,1fr); }.pool-count { min-width: 0; grid-template-columns: auto auto; gap: 7px; align-items: center; justify-content: start; justify-self: start; padding: 10px 13px; }.pool-count span { margin: 0; }.pool-workbench { align-items: stretch; flex-direction: column; }.pool-actions { width: 100%; }.pool-action { flex: 1; }.word-bank-heading { display: block; }.word-bank-heading p { margin-top: 10px; text-align: left; }.vocabulary-game-header { grid-template-areas: "back progress" "title title"; grid-template-columns: minmax(0,1fr) minmax(220px,.65fr); }.vocabulary-game-header .game-back { grid-area: back; }.vocabulary-game-header > div:nth-child(2) { grid-area: title; }.vocabulary-game-header .game-hud { grid-area: progress; }.match-up-board { grid-template-columns: minmax(0,1fr) 46px minmax(0,1fr); gap: 9px; padding: 22px 15px; }.match-bridge i { width: 36px; height: 36px; }.memory-board { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; padding: 18px; }.game-finish-actions { width: min(100%,480px); flex-direction: column-reverse; }.game-finish-actions button { width: 100%; }
  .studio-card { grid-template-columns: 1fr; }.studio-card .row-actions { flex-wrap: wrap; }
  .access-toolbar { grid-template-columns: 1fr; }.access-rule-note { grid-template-columns: 9px 1fr; }.access-rule-note > span:last-child { grid-column: 2; }.segment-switch-grid { grid-template-columns: 1fr; }.segment-switch:first-child { grid-column: auto; }
  .main-nav .coach-nav { height: 39px; min-width: 52px; margin-inline: 0; border-radius: 10px; }.coach-shell { width: min(100% - 26px,1280px); }.coach-hero { grid-template-columns: 1fr; border-radius: 21px; }.coach-hero-copy { padding: 41px 27px 22px; }.coach-hero-copy h1 { font-size: clamp(47px,14vw,68px); }.coach-goal-cluster { padding: 20px 25px 38px; }.coach-goal-ring { width: 205px; height: 205px; }.coach-vitals { margin-top: 25px; }.mastery-panel,.coach-recommendation { min-height: auto; padding: 25px 21px; }.coach-recommendation { min-height: 310px; }.mastery-band { grid-template-columns: 95px 1fr 35px; gap: 9px; }.coach-practice { padding: 22px 16px; }.coach-practice-top { align-items: flex-start; flex-direction: column; }.exercise-position { width: 100%; text-align: left; }.exercise-card { padding: 24px 19px; }.coach-choice-grid { grid-template-columns: 1fr; }.coach-feedback { grid-template-columns: 48px 1fr; }.coach-feedback > .primary-button { grid-column: 1/-1; width: 100%; }.exercise-actions { justify-content: stretch; }.exercise-actions button { flex: 1; }
  .reader-title .reward-badge { flex: 0 0 auto; }.wand-toggle { width: 40px; padding: 0; justify-content: center; touch-action: manipulation; }.wand-paragraph-button { right: calc(100% + 5px); width: 25px; min-height: 27px; padding: 0; justify-content: center; }.wand-handle { width: 17px; height: 30px; touch-action: none; }.wand-handle-start { left: -10px; }.wand-handle-end { right: -10px; }
}

@media (max-width: 520px) {
  .topbar { height: auto; min-height: 110px; grid-template-areas: "brand account" "nav nav"; grid-template-columns: 1fr auto; grid-template-rows: 48px 52px; row-gap: 0; padding: 5px 15px 0; }.topbar > .brand { grid-area: brand; }.main-nav { grid-area: nav; width: 100%; justify-self: stretch; justify-content: center; }.account-cluster { grid-area: account; }
  .auth-story { min-height: 410px; }.auth-copy { width: calc(100% - 42px); margin-top: 70px; }.auth-copy h1 { font-size: 61px; }.auth-copy p { font-size: 15px; }.auth-phrase { left: 22px; bottom: 20px; transform: scale(.88) rotate(-2deg); transform-origin: left bottom; }.auth-panel { min-height: 700px; padding: 90px 21px 35px; }.auth-brand { left: 21px; top: 28px; }.auth-tabs button { font-size: 11px; }
  .hero-stats { grid-template-columns: minmax(0,1fr); }.stat-card { grid-template-columns: 40px minmax(0,1fr); text-align: left; padding: 10px 0; }.stat-icon { margin: 0; }.story-ticket,.ticket-body,.ticket-footer,.ticket-progress { min-width: 0; }.ticket-label { max-width: 100%; white-space: normal; }.settings-card { min-width: 0; padding: 19px; }.api-callout { min-width: 0; align-items: flex-start; flex-direction: column; }.modal-body { min-width: 0; padding-top: 24px; }.studio-tabs { max-width: 100%; overflow-x: auto; }.site-footer { gap: 14px; flex-wrap: wrap; padding-block: 16px; }.site-footer > span { min-width: 0; }
  .access-section-heading { display: block; }.access-count { display: inline-flex; margin-top: 9px; }.segment-access-card { padding: 14px 11px; }.segment-access-card legend { font-size: 14px; }.segment-access-meta { justify-content: flex-start; margin: 0 0 9px; padding-left: 3px; }
  .reader-title h1 { font-size: clamp(1.55rem,6.4vw,1.75rem); }.xp-pill { display: none; }.wand-toggle { width: 35px; min-height: 35px; }.main-nav button { min-width: 43px; }.main-nav .coach-nav { min-width: 47px; }.coach-hero-copy { min-width: 0; padding-inline: 22px; }.coach-start-button { width: 100%; justify-content: space-between; }.coach-vitals { grid-template-columns: minmax(0,1fr); }.coach-vitals > div { justify-content: center; }.coach-vitals strong,.coach-vitals small { white-space: normal; overflow-wrap: anywhere; }.mastery-band { grid-template-columns: minmax(0,1fr) 36px; }.mastery-label { min-width: 0; grid-column: 1/-1; }.mastery-label small { display: inline; margin-left: 6px; }.coach-empty-actions,.pronunciation-row { min-width: 0; align-items: stretch; flex-direction: column; }.coach-empty-actions button { width: 100%; }.listen-button { grid-template-columns: 58px minmax(0,1fr); padding-inline: 14px; }.listen-rings { width: 52px; height: 52px; }.word-order-answer { min-height: 105px; }.coach-feedback { grid-template-columns: minmax(0,1fr); text-align: center; }.feedback-mark { margin: auto; }.feedback-metrics { justify-content: center; }
  .game-lane,.pairs-lane { min-height: 0; grid-template-columns: 68px minmax(0,1fr); gap: 16px; padding: 21px 17px; }.match-up-preview,.pairs-preview,.pairs-lane .pairs-preview { width: 68px; height: 88px; }.game-lane-arrow { display: none; }.game-lane-copy strong { font-size: 25px; }.game-lane-copy > span { display: none; }.game-lane-copy b { margin-top: 13px; }.word-select-toggle { width: 100%; justify-content: center; }.vocabulary-game-shell { width: min(100% - 20px,1120px); padding-top: 24px; }.vocabulary-game-header { gap: 16px 8px; grid-template-columns: minmax(0,1fr) minmax(220px,.65fr); }.vocabulary-game-header h1 { font-size: 38px; }.game-back > span:last-child { display: none; }.game-back { width: 44px; justify-content: center; padding: 0; }.game-hud { gap: 8px; }.game-score { min-width: 88px; min-height: 54px; padding-inline: 7px; }.game-score-value { min-width: 61px; }.game-score.gain i,.game-score.loss i { width: 30px; min-width: 30px; margin-left: 4px; }.game-progress { width: 118px; grid-template-columns: minmax(48px,1fr) auto; }.game-round-meta { flex-wrap: wrap; gap: 7px 10px; margin-top: -3px; }.game-round-meta small { width: 100%; margin: 0; }.match-up-board { min-height: 480px; grid-template-columns: minmax(0,1fr) 30px minmax(0,1fr); gap: 5px; padding: 13px 8px; border-radius: 17px; }.match-column { gap: 7px; }.match-column-heading { align-items: flex-start; flex-direction: column; justify-content: center; }.match-column-heading strong { font-size: 17px; }.match-bridge i { width: 28px; height: 28px; font-size: 16px; }.match-choice { min-height: 67px; padding: 9px; font-size: 16px; overflow-wrap: anywhere; }.memory-board[class*="memory-count-"] { min-height: 480px; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; padding: 12px; border-radius: 17px; }.memory-card,.memory-card-inner { min-height: 118px; }.vocabulary-stage-complete,.vocabulary-game-finish { min-height: 500px; padding: 35px 20px; }.game-result-line { width: 100%; gap: 8px; justify-content: space-between; }.game-live-status { max-width: 100%; }.pool-chips { max-height: 140px; overflow-y: auto; }
}

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