/* Scholado — anime theme. Same palette, type and card language as the CLEAR VISION training player
   (../../SiteVue/training.empvue/public/training/training.css). No inline styles anywhere: the content
   policy is style-src 'self', so every look lives in this file. */
@font-face { font-family: 'Bangers'; font-display: swap; src: url(/fonts/bangers-latin.woff2) format('woff2'); }
@font-face { font-family: 'M PLUS Rounded 1c'; font-weight: 400; font-display: swap; src: url(/fonts/mplus-rounded-400-latin.woff2) format('woff2'); }
@font-face { font-family: 'M PLUS Rounded 1c'; font-weight: 700; font-display: swap; src: url(/fonts/mplus-rounded-700-latin.woff2) format('woff2'); }
@font-face { font-family: 'M PLUS Rounded 1c'; font-weight: 800; font-display: swap; src: url(/fonts/mplus-rounded-800-latin.woff2) format('woff2'); }
/* Japanese display face, subset to the glyphs this site uses (ops/fonts.mjs rebuilds it). */
@font-face { font-family: 'Dela Gothic One'; font-display: swap; src: url(/fonts/dela-gothic-one-subset.woff2) format('woff2'); }

:root {
  --ink: #221c3d; --ink-2: #4a4370; --paper: #fffaf6;
  --pink: #ff4f8b; --pink-deep: #c21f5a; --pink-soft: #ffe1ec;
  --teal: #1fc7b8; --teal-deep: #0e7a70; --teal-soft: #dcfaf6;
  --violet: #6c4ef2; --violet-deep: #4a2fc0; --violet-soft: #ece7ff;
  --gold: #ffd23f; --red: #ff3b5c; --green: #18b47b;
  --night: #120e26; --night-2: #1d1740;
  --font-ui: 'M PLUS Rounded 1c', ui-rounded, 'Hiragino Maru Gothic ProN', 'Segoe UI', system-ui, sans-serif;
  --font-jp: 'Dela Gothic One', 'Hiragino Sans', 'Yu Gothic', 'Meiryo', sans-serif;
  --font-sfx: 'Bangers', 'Impact', 'Arial Black', sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column; overflow-x: hidden;
  background: var(--night); background-image: radial-gradient(rgba(255, 255, 255, .045) 1px, transparent 1.4px), radial-gradient(circle at 50% 0%, #2a1f5c 0%, var(--night) 60%);
  background-size: 14px 14px, 100% 900px; background-repeat: repeat, no-repeat;
  color: #fff; font: 400 17px/1.6 var(--font-ui); -webkit-font-smoothing: antialiased;
}
main { flex: 1; }
main:focus { outline: none; }
h1, h2, h3, h4, p { margin: 0; }
a { color: inherit; }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
button, a { touch-action: manipulation; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 6px; }
.ico { width: 1.2em; height: 1.2em; flex: none; }
.jp { font-family: var(--font-jp); font-weight: 400; color: var(--pink); letter-spacing: 1px; text-transform: none; }
.shell { width: min(1120px, calc(100% - 48px)); margin-inline: auto; }
.shell.narrow { width: min(840px, calc(100% - 48px)); }
.skip { position: absolute; left: -999px; top: 8px; background: #fff; color: var(--ink); padding: 8px 14px; border-radius: 8px; z-index: 100; font-weight: 800; }
.skip:focus { left: 8px; }

/* ---------- top bar ---------- */
.hud { position: sticky; top: 0; z-index: 30; background: rgba(18, 14, 38, .88); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid rgba(255, 255, 255, .1); }
.hud-in { height: 60px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.hud-logo { display: flex; align-items: baseline; gap: 8px; text-decoration: none; font-family: var(--font-sfx); font-size: 28px; letter-spacing: 1.5px; line-height: 1; text-transform: uppercase; white-space: nowrap; }
.hud-logo b { color: var(--pink); font-weight: 400; }
.hud-logo small { font-family: var(--font-jp); font-size: 11px; color: #b9b0e8; letter-spacing: 0; }
nav { display: flex; gap: 6px; }
.hbtn { display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 14px; border-radius: 99px; background: rgba(255, 255, 255, .1); color: #fff; border: 1px solid rgba(255, 255, 255, .16); font-size: 14px; font-weight: 700; text-decoration: none; white-space: nowrap; }
.hbtn:hover { background: rgba(255, 255, 255, .18); }
.hbtn.accent { background: var(--pink); border-color: transparent; font-weight: 800; }
.hbtn.accent:hover { background: #ff6a9d; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; text-decoration: none; min-height: 48px;
  font-weight: 800; font-size: 17px; line-height: 1.2; padding: 12px 26px; border-radius: 99px; color: #fff; background: var(--pink);
  box-shadow: 0 5px 0 var(--pink-deep), 0 10px 24px rgba(255, 79, 139, .35); transition: transform .12s, box-shadow .12s, filter .2s;
}
.btn:hover { filter: brightness(1.06); transform: translateY(-1px); }
.btn:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--pink-deep); }
.btn.secondary { background: #fff; color: var(--ink); box-shadow: 0 5px 0 #c9c2ea, 0 10px 24px rgba(0, 0, 0, .14); }
.btn.violet { background: var(--violet); box-shadow: 0 5px 0 var(--violet-deep), 0 10px 24px rgba(108, 78, 242, .35); }
.btn.teal { background: var(--teal); color: var(--ink); box-shadow: 0 5px 0 #0f8f84, 0 10px 24px rgba(31, 199, 184, .35); }
.btn.gold { background: var(--gold); color: var(--ink); box-shadow: 0 5px 0 #c99a00, 0 10px 24px rgba(255, 210, 63, .3); }
.btn.small { font-size: 15px; padding: 9px 18px; min-height: 42px; }
.btn[disabled] { opacity: .55; cursor: wait; transform: none; }
.tlink { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; color: var(--ink-2); font-weight: 800; font-size: 14.5px; background: none; border: 0; padding: 8px 12px; border-radius: 99px; text-decoration: none; }
.tlink:hover { background: var(--violet-soft); color: var(--ink); }
.status-pill { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; font-size: 13px; padding: 4px 12px; border-radius: 99px; background: var(--teal-soft); color: var(--teal-deep); }
.status-pill.idle { background: #fff1c2; color: #946800; }
.chip { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 800; padding: 4px 11px; border-radius: 99px; background: var(--violet-soft); color: var(--violet-deep); white-space: nowrap; }
.pips { display: inline-flex; gap: 4px; vertical-align: middle; }
.pips i { width: 18px; height: 8px; border-radius: 99px; background: #e2dcf6; }
.pips .on { background: linear-gradient(90deg, var(--teal), var(--pink)); }
.pips .now { background: var(--gold); box-shadow: 0 0 0 2px var(--ink); }

/* ---------- title screen ---------- */
.title-screen { position: relative; min-height: min(660px, calc(100vh - 60px)); overflow: hidden; display: grid; place-items: center; padding: 56px 16px 64px; background: linear-gradient(#57b4ff, #bfe6ff 55%, #ffe3f1); border-bottom: 4px solid var(--ink); }
.title-bg { position: absolute; inset: 0; }
.title-bg svg, .hero-bg svg, .subject-art svg { width: 100%; height: 100%; display: block; }
.petals { position: absolute; inset: 0; pointer-events: none; }
.petal { position: absolute; top: -5%; left: 8%; width: 16px; height: 12px; border-radius: 80% 0 80% 0; background: linear-gradient(135deg, #ffd6e6, #ff8fb8); opacity: .9; animation: fall 11s linear infinite; }
.petal:nth-child(2) { left: 19%; animation-duration: 14s; animation-delay: -5s; }
.petal:nth-child(3) { left: 31%; animation-duration: 10s; animation-delay: -2s; }
.petal:nth-child(4) { left: 44%; animation-duration: 15s; animation-delay: -9s; }
.petal:nth-child(5) { left: 57%; animation-duration: 12s; animation-delay: -4s; }
.petal:nth-child(6) { left: 68%; animation-duration: 16s; animation-delay: -11s; }
.petal:nth-child(7) { left: 79%; animation-duration: 11s; animation-delay: -7s; }
.petal:nth-child(8) { left: 90%; animation-duration: 13s; animation-delay: -1s; }
.petal:nth-child(9) { left: 2%; animation-duration: 17s; animation-delay: -13s; }
.petal:nth-child(10) { left: 50%; animation-duration: 18s; animation-delay: -15s; }
.title-cast { position: absolute; inset: 0; pointer-events: none; }
.title-cast .tc { position: absolute; left: max(1.5%, calc(50% - 610px)); bottom: -1%; height: 66%; aspect-ratio: 300 / 340; animation: rise .9s .2s cubic-bezier(.2, .9, .3, 1) both; }
.title-card { position: relative; z-index: 2; text-align: center; color: var(--ink); max-width: 600px; width: 100%; background: rgba(255, 255, 255, .9); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); border-radius: 28px; padding: 26px 28px; border: 4px solid var(--ink); box-shadow: 10px 10px 0 var(--ink); }
.title-buddy { display: none; width: 112px; margin: -100px auto 4px; animation: float 3s ease-in-out infinite; }
.logo-jp { font-family: var(--font-jp); color: var(--pink); font-size: 19px; letter-spacing: 6px; margin-top: 8px; }
.logo { font-family: var(--font-sfx); font-weight: 400; font-size: clamp(46px, 7.2vw, 78px); line-height: .98; letter-spacing: 2.5px; text-transform: uppercase; color: #fff; -webkit-text-stroke: 3px var(--ink); paint-order: stroke fill; text-shadow: 4px 4px 0 var(--pink), 7px 7px 0 var(--ink); margin: 4px 0 14px; }
.logo span { color: var(--teal); }
.title-sub { font-weight: 800; font-size: 18px; }
.title-meta { color: var(--ink-2); font-size: 15.5px; margin: 2px 0 18px; }
.title-links { display: flex; justify-content: center; gap: 6px; flex-wrap: wrap; margin-top: 14px; }

/* ---------- sections on the night sky ---------- */
.block { margin-top: 56px; }
.page { padding: 22px 0 8px; }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 6px 14px; flex-wrap: wrap; margin: 0 2px 18px; }
.sec-head h2 { font-family: var(--font-sfx); font-weight: 400; font-size: clamp(28px, 4vw, 36px); letter-spacing: 2px; text-transform: uppercase; line-height: 1.1; }
.sec-head h2 .jp { font-size: 17px; margin-left: 8px; }
.sec-note { font-weight: 800; color: #c9c2f0; font-size: 14px; }
.back { display: inline-flex; align-items: center; gap: 4px; margin: 0 0 14px -6px; font-weight: 800; font-size: 14px; color: #c9c2f0; text-decoration: none; padding: 6px 14px 6px 8px; border-radius: 99px; }
.back:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.reveal { opacity: 0; transform: translateY(18px); }
.reveal.in { opacity: 1; transform: none; transition: opacity .5s ease, transform .5s cubic-bezier(.2, 1, .4, 1), box-shadow .12s; }

.subjects { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.subject { --shadow: var(--pink); display: block; background: #fff; color: var(--ink); border-radius: 22px; border: 4px solid var(--ink); overflow: hidden; text-decoration: none; box-shadow: 8px 8px 0 var(--shadow); }
.subject.latin { --shadow: var(--teal); }
.subject.logic { --shadow: var(--violet); }
.subject.science { --shadow: var(--gold); }
.course { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; color: #fff; font-size: 18px; }
.subject.in:hover { transform: translate(-3px, -3px); box-shadow: 11px 11px 0 var(--shadow); transition: transform .12s, box-shadow .12s; }
.subject-art { aspect-ratio: 16 / 7; border-bottom: 4px solid var(--ink); overflow: hidden; }
.subject-body { padding: 16px 22px 20px; }
.subject-head { display: flex; align-items: baseline; gap: 10px; }
.subject h3 { font-family: var(--font-sfx); font-weight: 400; font-size: 36px; letter-spacing: 1.5px; text-transform: uppercase; line-height: 1.1; }
.subject p { color: var(--ink-2); margin-top: 4px; }
.subject-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.go { display: inline-flex; align-items: center; gap: 4px; font-weight: 800; color: var(--pink-deep); }

.how { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.how-tile { background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .14); border-radius: 20px; padding: 20px; }
.how-tile h3 { font-size: 19px; font-weight: 800; margin: 12px 0 4px; }
.how-tile p { color: #d6d0f5; font-size: 15.5px; line-height: 1.55; }
.ico-wrap { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; background: var(--pink); color: #fff; box-shadow: 3px 3px 0 #fff; }
.ico-wrap .ico { width: 24px; height: 24px; }
.how-tile:nth-child(2) .ico-wrap { background: var(--teal); color: var(--ink); }
.how-tile:nth-child(3) .ico-wrap { background: var(--violet); }

.membership { display: flex; align-items: center; gap: 12px 26px; background: #fff; color: var(--ink); border-radius: 22px; border: 4px solid var(--ink); box-shadow: 8px 8px 0 var(--gold); padding: 22px 26px; }
.price { display: flex; align-items: center; gap: 10px; }
.price b { font-family: var(--font-sfx); font-weight: 400; font-size: 68px; line-height: 1; color: var(--pink); -webkit-text-stroke: 2.5px var(--ink); paint-order: stroke fill; text-shadow: 3px 3px 0 var(--ink); }
.price span { font-weight: 800; font-size: 14px; line-height: 1.25; color: var(--ink-2); }
.m-copy { flex: 1; }
.m-copy h2 { font-size: 22px; font-weight: 800; }
.m-copy h2 .jp { font-size: 16px; margin-left: 4px; }
.m-copy p { color: var(--ink-2); font-size: 15.5px; margin-top: 2px; }

/* ---------- scene banners (subject page, lesson header) ---------- */
.subject-hero, .eyecatch { position: relative; overflow: hidden; isolation: isolate; border-radius: 22px; box-shadow: 0 0 0 3px rgba(255, 255, 255, .14), 0 20px 60px rgba(0, 0, 0, .45); }
.hero-bg { position: absolute; inset: 0; z-index: -1; }
.subject-hero { min-height: 270px; display: flex; align-items: flex-end; padding: 24px 28px 26px; }
.hero-text { max-width: 68%; display: flex; flex-direction: column; align-items: flex-start; }
.eyebrow { display: flex; align-items: center; gap: 6px; font-weight: 800; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--violet); }
.eyebrow .jp { font-size: 14px; letter-spacing: 1px; }
.eyebrow.light { color: var(--gold); }
.subject-hero .eyebrow { background: var(--ink); color: #fff; padding: 3px 14px; border-radius: 99px; }
.banner { font-family: var(--font-sfx); font-weight: 400; font-size: clamp(46px, 8vw, 88px); line-height: .98; letter-spacing: 3px; text-transform: uppercase; color: #fff; -webkit-text-stroke: 3px var(--ink); paint-order: stroke fill; text-shadow: 5px 5px 0 var(--pink), 8px 8px 0 var(--ink); margin: 8px 0 12px; }
.banner .jp { font-size: .24em; letter-spacing: 2px; -webkit-text-stroke: 0; text-shadow: none; color: var(--ink); background: #fff; border: 3px solid var(--ink); border-radius: 99px; padding: .2em .9em; margin-left: .5em; vertical-align: middle; display: inline-block; line-height: 1.3; }
.subject-hero .hero-text > p:last-child { background: #fff; color: var(--ink); border: 3px solid var(--ink); padding: .35em 1em; font-weight: 800; font-size: 15.5px; transform: rotate(-1.2deg); box-shadow: 5px 5px 0 var(--ink); }
.hero-buddy { position: absolute; right: 5%; bottom: 3%; height: 92%; aspect-ratio: 300 / 340; animation: rise .8s .1s cubic-bezier(.2, .9, .3, 1) both; }

.grades { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 2px 18px; }
.grades a { padding: 7px 18px; border-radius: 99px; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .16); color: #fff; font-weight: 800; font-size: 15px; text-decoration: none; }
.grades a:hover { background: rgba(255, 255, 255, .18); }
.grades a.on { background: var(--gold); border-color: var(--gold); color: var(--ink); box-shadow: 3px 3px 0 var(--pink); }
.ep-list { display: grid; gap: 14px; }
.ep-unit { display: flex; align-items: center; gap: 10px; margin: 12px 2px 0; color: #fff; font: 800 17px var(--font-ui); }
.ep-unit:first-child { margin-top: 0; }
.ep-unit span { padding: 3px 11px; border-radius: 999px; background: var(--gold); color: var(--ink); font-size: 13px; letter-spacing: .4px; text-transform: uppercase; white-space: nowrap; }
.ep-row { display: flex; align-items: center; gap: 18px; padding: 14px 20px; border-radius: 18px; background: #fff; color: var(--ink); border: 3px solid var(--ink); box-shadow: 5px 5px 0 var(--violet); text-decoration: none; transition: transform .12s, box-shadow .12s; }
.ep-row:hover { transform: translate(-2px, -2px); box-shadow: 7px 7px 0 var(--pink); }
.ep-row .n { font-family: var(--font-sfx); font-size: 22px; color: var(--pink); letter-spacing: 1px; text-transform: uppercase; white-space: nowrap; min-width: 92px; }
.ep-row .t { flex: 1; min-width: 0; overflow-wrap: anywhere; font-weight: 800; font-size: 18px; line-height: 1.3; }
.ep-row .t small { display: block; font-weight: 400; color: var(--ink-2); font-size: 14.5px; line-height: 1.45; margin-top: 2px; }
.ep-row .s { display: flex; flex-direction: column; align-items: flex-end; gap: 7px; }
.ep-row.locked .chip { background: #f1eff8; color: #5d597a; }
.ep-row.going .chip { background: var(--pink-soft); color: var(--pink-deep); }
.ep-row.done .chip { background: #e9fbf3; color: #0d8a5c; }

/* ---------- white cards: sign-in, family portal, privacy ---------- */
.panel { --shadow: var(--pink); position: relative; background: #fff; color: var(--ink); border-radius: 22px; border: 4px solid var(--ink); box-shadow: 8px 8px 0 var(--shadow); padding: 24px 26px 26px; overflow-wrap: break-word; }
.panel.teal { --shadow: var(--teal); }
.panel.violet { --shadow: var(--violet); }
.panel > * + *, form > * + * { margin-top: 14px; }
.panel h1 { font-size: clamp(26px, 4vw, 34px); font-weight: 800; line-height: 1.2; margin-top: 4px; }
.panel h2, .panel h3 { font-size: 21px; font-weight: 800; line-height: 1.25; }
.panel a:not(.btn) { color: var(--violet-deep); font-weight: 700; }
.with-buddy { margin-top: 62px; }
.panel-buddy { position: absolute; right: 20px; top: -76px; width: 104px; animation: float 3s ease-in-out infinite; }
.panel-buddy + * { margin-top: 0; }
.page-head { margin-bottom: 8px; }
.page-head .banner { font-size: clamp(40px, 7vw, 64px); margin: 4px 0 6px; }
.signed { color: #c9c2f0; font-weight: 700; }
.list { display: grid; gap: 22px; margin-bottom: 26px; }
.page > .panel { margin-top: 30px; }
.learner h3 { font-size: 24px; }
.row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.row.spread { justify-content: space-between; }
.row.center { justify-content: center; }
.subtle { color: var(--ink-2); }
label { display: block; font-weight: 800; font-size: 14.5px; }
input:not([type=checkbox]), textarea { display: block; width: 100%; min-height: 50px; margin-top: 6px; padding: 10px 14px; font-size: 18px; font-weight: 700; color: var(--ink); background: #fff; border: 3px solid #d9d2f2; border-radius: 14px; }
input:not([type=checkbox]):focus, textarea:focus { outline: none; border-color: var(--violet); box-shadow: 0 0 0 4px var(--violet-soft); }
textarea { min-height: 170px; font-size: 17px; font-weight: 400; line-height: 1.5; resize: vertical; }
input[readonly] { background: #f7f5ff; }
.check { display: flex; gap: 12px; align-items: flex-start; font-weight: 400; font-size: 15px; line-height: 1.5; }
.check input { width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--violet); flex: none; }
.notice { padding: 12px 16px; background: var(--violet-soft); border: 2px solid #d9d0ff; border-radius: 14px; font-weight: 700; }
.notice:empty { display: none; }
.notice.error { background: #fff0f2; border-color: #ffd0d8; color: #a3122f; }
.link-output { overflow-wrap: anywhere; }
.privacy h2 { margin-top: 24px; }

/* ---------- sign-in, the sign-up steps, membership ---------- */
.signin { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; align-items: start; margin-top: 62px; }
.signin.alone { grid-template-columns: 1fr; }
.signin .panel { margin-top: 0; }
.join-line { margin-top: 30px; text-align: center; font-weight: 700; color: #d6d0f5; }
.join-line a { color: var(--gold); font-weight: 800; }
.stepper { list-style: none; margin: 4px 0 0; padding: 0; display: flex; gap: 6px; counter-reset: none; }
.stepper li { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 13px; font-weight: 800; color: #9a92c9; text-align: center; position: relative; }
.stepper li::before { content: ''; position: absolute; top: 17px; right: 50%; width: 100%; height: 4px; border-radius: 99px; background: rgba(255, 255, 255, .14); }
.stepper li:first-child::before { display: none; }
.stepper li.done::before, .stepper li.now::before { background: linear-gradient(90deg, var(--teal), var(--pink)); }
.stepper span { position: relative; z-index: 1; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--night-2); border: 3px solid rgba(255, 255, 255, .22); font-family: var(--font-sfx); font-size: 20px; font-weight: 400; line-height: 1; color: #c9c2f0; }
.stepper .done span { background: var(--teal); border-color: var(--teal); color: var(--ink); }
.stepper .done span .ico { width: 20px; height: 20px; stroke-width: 3.2; }
.stepper .now { color: #fff; }
.stepper .now span { background: var(--pink); border-color: #fff; color: #fff; box-shadow: 3px 3px 0 var(--ink); }
.wizard .panel { margin-top: 84px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.small { font-size: 13.5px; line-height: 1.45; }
label + .small, .two + .small { margin-top: 5px; }
.grow { flex: 1; min-width: 0; }
.grow > * + * { margin-top: 10px; }
.row.start { align-items: flex-start; flex-wrap: nowrap; }
.roster, .people { list-style: none; padding: 0; display: grid; gap: 8px; }
.roster li, .people li { display: flex; align-items: center; gap: 6px 12px; flex-wrap: wrap; }
.roster li { padding: 8px 8px 8px 16px; background: var(--teal-soft); border: 2px solid #b5efe8; border-radius: 14px; }
.roster .tlink { margin-left: auto; }
.people .tlink { margin-left: auto; }
.people .ico { color: var(--violet); }
.wizard-next { padding-top: 18px; border-top: 2px dashed #e1dcf5; justify-content: flex-end; }
.plan { display: flex; align-items: center; gap: 14px; padding: 14px 18px; background: #fff8dc; border: 3px solid var(--ink); border-radius: 16px; box-shadow: 4px 4px 0 var(--gold); }
.plan b { font-family: var(--font-sfx); font-weight: 400; font-size: 54px; line-height: 1; color: var(--pink); -webkit-text-stroke: 2.5px var(--ink); paint-order: stroke fill; text-shadow: 3px 3px 0 var(--ink); }
.plan span { font-weight: 800; font-size: 15px; line-height: 1.35; color: var(--ink-2); }
.ticks { list-style: none; padding: 0; display: grid; gap: 8px; font-weight: 700; }
.ticks li { display: flex; gap: 10px; align-items: flex-start; }
.ticks .ico { flex: none; width: 24px; height: 24px; padding: 4px; margin-top: 1px; border-radius: 50%; background: var(--green); color: #fff; stroke-width: 3.4; }
.panel.gold { --shadow: var(--gold); }
.copy-row { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.copy-row .btn { margin-bottom: 4px; }
.confirm-note { display: flex; gap: 14px; align-items: flex-start; margin-top: 22px; padding: 14px 18px; background: #fff8dc; color: var(--ink); border: 3px solid var(--ink); border-radius: 18px; box-shadow: 5px 5px 0 var(--gold); }
.confirm-note .ico-wrap { background: var(--gold); color: var(--ink); box-shadow: 3px 3px 0 var(--ink); flex: none; }
.wizard .confirm-note { margin-top: 18px; }
.wizard .confirm-note + .panel { margin-top: 84px; }
.offer .logo { font-size: clamp(60px, 10vw, 104px); }
.offer-form { display: grid; gap: 12px; margin-top: 4px; }
.offer-form input { text-align: center; }
.offer-form .btn { font-size: 19px; min-height: 56px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.page > .flash { margin-top: 22px; }
.flash { display: flex; align-items: center; gap: 14px; padding: 12px 18px; background: #e9fbf3; color: #0b6b48; border: 3px solid var(--ink); border-radius: 18px; box-shadow: 5px 5px 0 var(--green); font-weight: 800; animation: itemIn .35s both; }
.flash .fb-icon { width: 64px; }

/* ---------- learner progress: a bar per started subject, headline numbers, every lesson ---------- */
progress { appearance: none; -webkit-appearance: none; display: block; width: 100%; height: 14px; border: 0; border-radius: 99px; background: #e2dcf6; overflow: hidden; }
progress::-webkit-progress-bar { background: #e2dcf6; border-radius: 99px; }
progress::-webkit-progress-value { background: var(--violet); border-radius: 99px; }
progress::-moz-progress-bar { background: var(--violet); border-radius: 99px; }
.meters { list-style: none; padding: 0; display: grid; gap: 14px; }
.meters li { display: grid; grid-template-columns: minmax(132px, max-content) 1fr max-content; gap: 3px 14px; align-items: center; }
.meters.plain li { grid-template-columns: 1fr max-content; }
.m-name { font-weight: 800; }
.m-name small, .grade { font-size: 12.5px; font-weight: 800; color: var(--ink-2); background: var(--violet-soft); padding: 2px 9px; border-radius: 99px; margin-left: 4px; white-space: nowrap; vertical-align: middle; }
.m-fig { font-weight: 800; font-size: 14.5px; font-variant-numeric: tabular-nums; }
.m-note { grid-column: 1 / -1; font-size: 13.5px; color: var(--ink-2); }
.tlink.more { margin: 6px 0 0 -12px; color: var(--violet-deep); }
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 22px; }
.kpi { background: #fff; color: var(--ink); border: 3px solid var(--ink); border-radius: 18px; box-shadow: 5px 5px 0 var(--violet); padding: 14px 18px 12px; }
.kpi b { display: block; font-family: var(--font-sfx); font-weight: 400; font-size: 44px; line-height: 1.05; letter-spacing: 1px; white-space: nowrap; }
.kpi span { font-size: 12.5px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-2); }
.kpis.four { margin-top: 0; }
.kpi.flat { box-shadow: none; border-width: 2px; border-color: #e6e1f7; background: #fbfaff; }
.kpi.flat b { font-size: 36px; }
.admin .panel { margin-top: 26px; }
.admin .kpi b { font-size: 40px; }
.bars-chart .day { fill: var(--violet); }
.bars-chart .day.none { fill: #e2dcf6; }
.bars-chart .bar-base { stroke: #d9d2f2; stroke-width: 2; }
.bars-chart .bar-n { font: 800 13px var(--font-ui); fill: var(--ink); }
.bars-chart .bar-day { font: 700 11.5px var(--font-ui); fill: var(--ink-2); }
.tbl.money td, .tbl.money th { white-space: nowrap; font-variant-numeric: tabular-nums; }
.mail-text { margin-top: 14px; padding: 16px; background: #fbfaff; border: 2px solid #e6e1f7; border-radius: 14px; font: 400 15px/1.55 var(--font-ui); white-space: pre-wrap; overflow-wrap: anywhere; }
.talk { list-style: none; padding: 0; display: grid; gap: 16px; }
.said-by { font-size: 13.5px; color: var(--ink-2); }
.said-by strong { color: var(--ink); }
.said .mail-text { margin-top: 6px; }
.said.us { padding-left: 22px; }
.said.us .mail-text { background: var(--violet-soft); border-color: #d9d0ff; }
.ref { font-size: 12.5px; font-weight: 800; letter-spacing: .04em; color: var(--ink-2); }
.lessons-table { min-width: 640px; font-size: 15px; }
.lessons-table th small { display: block; font-weight: 700; font-size: 12.5px; color: #946000; }
.lessons-table td { white-space: nowrap; font-variant-numeric: tabular-nums; }
.lessons-table .pips { margin-right: 6px; }
.chip.going { background: var(--pink-soft); color: var(--pink-deep); }
.chip.done { background: #e9fbf3; color: #0d8a5c; }

/* ---------- lesson ---------- */
.eyecatch { min-height: 210px; display: flex; align-items: flex-end; padding: 22px 24px; }
.eye-text { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.ec-label { font-family: var(--font-sfx); font-size: 17px; letter-spacing: .14em; color: #fff; background: var(--ink); padding: .2em 1em .12em; text-transform: uppercase; transform: skewX(-8deg); }
.ec-title { font-weight: 800; font-size: clamp(28px, 5.4vw, 46px); line-height: 1.1; color: #fff; -webkit-text-stroke: 6px var(--ink); paint-order: stroke fill; }
.ec-jp { font-family: var(--font-jp); font-size: 17px; letter-spacing: 2px; color: var(--ink); background: #fff; padding: .1em .9em; border-radius: 99px; border: 2.5px solid var(--ink); }

.dialogue { display: flex; align-items: flex-end; gap: 6px; margin-top: 34px; }
.dlg-buddy { flex: none; width: 124px; margin-bottom: -8px; animation: float 3s ease-in-out infinite; }
.dlg-box { position: relative; flex: 1; background: linear-gradient(180deg, rgba(255, 252, 249, .98), rgba(255, 246, 241, .98)); color: var(--ink); border-radius: 22px; border: 4px solid #fff; box-shadow: 0 0 0 4px var(--pink), 0 14px 34px rgba(0, 0, 0, .4); padding: 26px 24px 18px; font-size: 19px; font-weight: 700; line-height: 1.5; }
.nametag { position: absolute; top: 0; left: 22px; transform: translateY(-62%) skewX(-8deg); background: var(--pink); color: #fff; font-weight: 800; padding: .26em 1.1em; border-radius: 99px; border: 3px solid #fff; font-size: 15px; white-space: nowrap; }
.nametag small { font-weight: 700; margin-left: .5em; font-size: .82em; }

.lsteps { list-style: none; margin: 30px 0 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; }
.lcard { --shadow: var(--pink); background: #fff; color: var(--ink); border-radius: 22px; border: 4px solid var(--ink); box-shadow: 8px 8px 0 var(--shadow); padding: 22px 24px 24px; }
.lsteps .lcard:nth-child(3n+2) { --shadow: var(--teal); }
.lsteps .lcard:nth-child(3n) { --shadow: var(--violet); }
.lcard-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.step-n { flex: none; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: var(--shadow); color: #fff; font-family: var(--font-sfx); font-size: 24px; line-height: 1; box-shadow: 3px 3px 0 var(--ink); }
.lsteps .lcard:nth-child(3n+2) .step-n { color: var(--ink); }
.lcard h2 { font-size: 23px; font-weight: 800; line-height: 1.2; }
.lcard h2 .jp { font-size: 16px; margin-left: 6px; }
.lcard > p { font-size: 17.5px; line-height: 1.62; color: #2f2850; }
.lcard.example, .lcard.recap { margin-top: 28px; }
.lcard.example { --shadow: var(--gold); }
.lcard.example .step-n { color: var(--ink); }
.lcard.recap { --shadow: var(--red); background: #1b1433; color: #fff; border-color: #fff; }
.recap-list { margin: 0; padding: 0; list-style: none; counter-reset: r; display: grid; gap: 10px; }
.recap-list li { counter-increment: r; display: flex; gap: 12px; align-items: baseline; font-weight: 700; line-height: 1.45; }
.recap-list li::before { content: counter(r); flex: none; width: 1.75em; height: 1.75em; border-radius: 50%; background: var(--pink); color: #fff; display: grid; place-items: center; font-family: var(--font-sfx); font-weight: 400; }
.recap-list li:nth-child(even)::before { background: var(--teal); color: var(--ink); }

.qcard { margin-top: 36px; background: #fff; color: var(--ink); border-radius: 22px; border: 4px solid var(--ink); box-shadow: 8px 8px 0 var(--pink); padding: 22px 24px 24px; scroll-margin-top: 76px; }
.qcard.solved { box-shadow: 8px 8px 0 var(--green); }
.qcard.miss { animation: shudder .4s linear; }
.qmeta { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }
.qmeta .jp { margin-left: auto; font-size: 16px; }
.qtag { font-size: 12.5px; font-weight: 800; padding: 4px 11px; border-radius: 99px; background: var(--violet-soft); color: var(--violet-deep); }
.qprompt { font-size: clamp(19px, 2.6vw, 23px); font-weight: 800; line-height: 1.38; }
.qcard form { margin-top: 18px; }
.qcard input { font-size: 22px; min-height: 58px; }
.feedback:empty { display: none; }
.fb { border-radius: 16px; padding: 12px 16px; display: flex; gap: 14px; align-items: center; animation: itemIn .35s both; }
.fb.good { background: #e9fbf3; border: 2px solid #9fe6c8; }
.fb.bad { background: #fff7e0; border: 2px solid #ffd76b; }
.fb.hint { background: var(--violet-soft); border: 2px solid #d9d0ff; }
.fb-icon { flex: none; width: 76px; }
.fb h4 { font-size: 18px; font-weight: 800; }
.fb h4 .jp { color: inherit; margin-right: 4px; font-size: .9em; }
.fb.good h4 { color: #0d8a5c; }
.fb.bad h4 { color: #946000; }
.fb.hint h4 { color: var(--violet-deep); }
.fb p { line-height: 1.45; font-weight: 700; }
.victory { text-align: center; padding: 4px 0; }
.victory-buddy { width: 160px; margin: 0 auto; }
.victory-jp { font-family: var(--font-jp); font-size: 26px; letter-spacing: 3px; color: var(--pink); }
.victory-big { font-family: var(--font-sfx); font-weight: 400; font-size: clamp(44px, 9vw, 78px); letter-spacing: 3px; line-height: 1.02; text-transform: uppercase; color: var(--gold); -webkit-text-stroke: 3px var(--ink); paint-order: stroke fill; text-shadow: 5px 5px 0 var(--pink); animation: slam .7s cubic-bezier(.2, 1.6, .4, 1) both; }
.victory > p:not(.victory-jp) { font-size: 18px; font-weight: 700; color: var(--ink-2); margin: 12px auto 20px; max-width: 34em; }

/* ---------- infographics ---------- */
.fig { margin: 18px 0 0; padding: 18px 16px 14px; background: #fbfaff; border: 2px solid #e6e1f7; border-radius: 16px; }
.fig + .fig { margin-top: 12px; }
figcaption { margin-top: 14px; padding-top: 10px; border-top: 2px dashed #e1dcf5; font-weight: 700; font-size: 15px; line-height: 1.45; color: var(--ink-2); }
.svg-fig { display: block; width: 100%; height: auto; overflow: visible; margin-inline: auto; }
.fig-balance .svg-fig { max-width: 430px; }
.fig-depth .svg-fig { max-width: 580px; }
.pic { width: 36px; height: 36px; flex: none; }
.nl-num, .nl-tag, .nl-span, .nl-side { font-family: var(--font-ui); font-weight: 800; }
.nl-num, .nl-tag { fill: var(--ink); }
.nl-side { letter-spacing: .06em; text-transform: uppercase; }
.nl-step { font-family: var(--font-sfx); fill: var(--ink-2); }
.nl-hop { animation: itemIn .4s both; }
.nl-hop:nth-child(2) { animation-delay: .35s; } .nl-hop:nth-child(3) { animation-delay: .7s; } .nl-hop:nth-child(4) { animation-delay: 1.05s; }
.nl-hop:nth-child(5) { animation-delay: 1.4s; } .nl-hop:nth-child(6) { animation-delay: 1.75s; } .nl-hop:nth-child(7) { animation-delay: 2.1s; } .nl-hop:nth-child(8) { animation-delay: 2.45s; }
.reveal:not(.in) .nl-hop { animation-play-state: paused; }
.g-num, .g-axis, .g-step, .g-point, .tri { font-family: var(--font-ui); font-weight: 800; fill: var(--ink); }
.g-num { fill: var(--ink-2); }
.g-axis { font-style: italic; }
.g-step { fill: var(--violet-deep); }
.g-point, .g-step { paint-order: stroke fill; stroke: #fff; stroke-width: 4px; stroke-linejoin: round; }
.tri.hyp { fill: var(--pink-deep); }
.fig-graph .svg-fig { max-width: 430px; }
.fig-triangle .svg-fig { max-width: 360px; }
.graph-key { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; justify-content: center; font-weight: 800; font-size: 15px; }
.graph-key li { display: inline-flex; align-items: center; gap: 8px; }
.swatch { width: 22px; height: 6px; border-radius: 99px; background: var(--pink); }
.swatch.teal { background: var(--teal); } .swatch.violet { background: var(--violet); } .swatch.gold { background: var(--gold); }
.bal-box { font-family: var(--font-ui); font-weight: 800; font-style: italic; font-size: 23px; fill: #fff; }
.bal-num { font-family: var(--font-ui); font-weight: 800; font-size: 22px; fill: var(--ink); }
.bal-eq { font-family: var(--font-ui); font-weight: 800; font-size: 34px; fill: var(--pink-deep); }

.frac { display: inline-flex; flex-direction: column; align-items: center; vertical-align: middle; line-height: 1.08; font-size: .9em; margin: 0 .14em; }
.frac b { font-weight: 800; padding: 0 .22em; }
.frac i { font-style: normal; font-weight: 800; border-top: .13em solid currentColor; padding: 0 .22em; }
.end { color: var(--pink-deep); background: var(--pink-soft); border-radius: 5px; padding: 0 .1em; font-weight: inherit; }
.hl { font-weight: 800; background: linear-gradient(transparent 58%, rgba(255, 210, 63, .75) 58%); }

.bars { display: grid; gap: 14px; }
.bar-row { display: grid; grid-template-columns: minmax(64px, max-content) 1fr; column-gap: 14px; align-items: center; }
.bar-label { font-weight: 800; font-size: 20px; text-align: right; white-space: nowrap; }
.bar { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; height: 44px; border: 3px solid var(--ink); border-radius: 12px; overflow: hidden; background: #fff; }
.bar i { border-left: 2px solid var(--ink); }
.bar i:first-child { border-left: 0; }
.bar .a { background: var(--teal); } .bar .b { background: var(--pink); } .bar .c { background: var(--violet); } .bar .d { background: var(--gold); }
.bar-note { grid-column: 2; font-size: 14px; font-weight: 700; color: var(--ink-2); margin-top: 3px; }
.bar-row.final .bar { box-shadow: 4px 4px 0 var(--gold); }
.bar-row.final .bar-label { color: var(--pink-deep); }

.parts { display: grid; grid-template-columns: auto 1fr; gap: 6px 20px; align-items: center; }
.parts-frac { display: flex; flex-direction: column; align-items: center; font-family: var(--font-sfx); font-size: 66px; line-height: 1; }
.parts-frac b { font-weight: 400; color: var(--pink-deep); padding: 0 12px 2px; }
.parts-frac i { font-style: normal; color: var(--violet-deep); border-top: 5px solid var(--ink); padding: 6px 12px 0; }
.parts-notes { display: grid; gap: 16px; font-weight: 700; font-size: 16.5px; line-height: 1.4; }
.parts-notes .hl { background: none; }
.parts-notes .top .hl { color: var(--pink-deep); }
.parts-notes .bottom .hl { color: var(--violet-deep); }
.parts .bar { grid-column: 1 / -1; margin-top: 10px; }

.tok-legend { display: flex; align-items: center; justify-content: center; gap: 6px 14px; flex-wrap: wrap; font-weight: 800; margin-bottom: 16px; }
.tok-legend span { display: inline-flex; align-items: center; gap: 6px; }
.tok-legend .pic { width: 28px; height: 28px; }
.tok-legend b { font-family: var(--font-sfx); font-weight: 400; font-size: 28px; line-height: 1; color: var(--violet-deep); }
.tok-legend em { font-style: normal; font-weight: 700; color: var(--ink-2); }
.tokens { display: flex; flex-wrap: wrap; gap: 16px 12px; justify-content: center; }
.tok-group { position: relative; display: flex; flex-direction: column; gap: 6px; align-items: center; justify-content: center; padding: 16px 12px 10px; min-width: 96px; background: #fff; border: 3px dashed #c9c2ea; border-radius: 16px; }
.tok-tag { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; font-size: 11.5px; font-weight: 800; padding: 1px 10px; border-radius: 99px; white-space: nowrap; }
.tok-set { display: flex; gap: 3px; flex-wrap: wrap; justify-content: center; max-width: 124px; }
.tok-group.hl { border: 3px solid var(--ink); background: #fff8dc; box-shadow: 4px 4px 0 var(--gold); }
.fig-sum { text-align: center; font-weight: 800; font-size: 17px; margin-top: 14px; }

.tbl-wrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 16px; }
.tbl thead th { text-align: left; background: var(--ink); color: #fff; font-weight: 800; padding: .55em .8em; font-size: .88em; }
.tbl thead th:first-child { border-radius: .7em 0 0 0; }
.tbl thead th:last-child { border-radius: 0 .7em 0 0; }
.tbl td, .tbl tbody th { padding: .6em .8em; border-bottom: 2px solid #eee9fb; font-weight: 700; text-align: left; vertical-align: top; background: #fff; }
.tbl tbody th { font-weight: 800; }
.tbl td.hl, .tbl tr.hl td { background: #fff1c2; }

.pct { display: flex; align-items: center; justify-content: center; gap: 12px 26px; flex-wrap: wrap; }
.pct-grid { width: 190px; flex: none; margin: 0; }
.pct-big { display: block; font-family: var(--font-sfx); font-weight: 400; font-size: 68px; line-height: 1; color: var(--pink); -webkit-text-stroke: 2.5px var(--ink); paint-order: stroke fill; text-shadow: 3px 3px 0 var(--ink); }
.pct-side p { font-weight: 700; margin-top: 10px; }

.eq { display: grid; grid-template-columns: auto auto auto; gap: 8px 14px; justify-content: center; align-items: center; font-weight: 800; font-size: 25px; line-height: 1.2; }
.eq-line, .eq-op { display: contents; }
.eq .l { text-align: right; }
.eq .s { text-align: center; }
.eq-op span { color: var(--pink-deep); font-size: 21px; }
.eq-op em { font-style: normal; font-size: 12.5px; background: var(--pink-soft); padding: 3px 10px; border-radius: 99px; white-space: nowrap; }
.eq-line.final span { color: var(--violet-deep); border-top: 3px solid var(--ink); padding-top: 8px; }
.eq-note { grid-column: 1 / -1; text-align: center; font-size: 13.5px; color: var(--pink-deep); }
.eq-check { grid-column: 1 / -1; display: flex; justify-content: center; align-items: center; gap: 6px; margin-top: 6px; color: #0d8a5c; font-size: 17px; }

.vocab { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.vocab.n3 { grid-template-columns: repeat(3, 1fr); }
.vocab.n2 { grid-template-columns: repeat(2, minmax(0, 220px)); justify-content: center; }
.vcard, .pcard { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 2px; padding: 16px 8px 12px; background: #fff; border: 3px solid var(--ink); border-radius: 16px; box-shadow: 4px 4px 0 var(--teal); }
.vcard:nth-child(4n+2) { box-shadow: 4px 4px 0 var(--pink); }
.vcard:nth-child(4n+3) { box-shadow: 4px 4px 0 var(--gold); }
.vcard:nth-child(4n) { box-shadow: 4px 4px 0 var(--violet); }
.vpic .pic { width: 64px; height: 64px; display: block; }
.vtag { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; font-size: 11px; font-weight: 800; padding: 1px 10px; border-radius: 99px; white-space: nowrap; text-transform: uppercase; letter-spacing: .06em; }
.la { font-weight: 800; }
.vcard .la, .pcard .la, .word .la { font-family: var(--font-sfx); font-weight: 400; font-size: 31px; letter-spacing: 1.2px; line-height: 1.15; }
.vcard .la { margin-top: 6px; }
.vcard .la, .pcard .la { max-width: 100%; overflow-wrap: anywhere; }
.vcard .en, .pcard .en, .word .en { font-weight: 700; color: var(--ink-2); font-size: 15px; line-height: 1.3; }

.pairs { display: grid; gap: 14px; }
.pair-head, .pair { display: grid; grid-template-columns: 1fr 40px 1fr; align-items: center; }
.pair-head { text-align: center; font-size: 12.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-2); margin-bottom: -6px; }
.pcard { padding: 12px 8px; }
.pcard.many { box-shadow: 4px 4px 0 var(--pink); }
.pics { display: flex; gap: 2px; justify-content: center; align-items: center; height: 46px; }
.pics .pic { width: 44px; height: 44px; }
.pcard.many .pic { width: 36px; height: 36px; }
.parrow { display: grid; place-items: center; color: var(--ink-2); }
.parrow .ico { width: 28px; height: 28px; stroke-width: 3; }

.sent { display: grid; gap: 20px; }
.sent-row { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.word { --tag: #0e9488; --soft: var(--teal-soft); --deep: var(--teal-deep); display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 106px; padding: 0 14px 10px; background: #fff; border: 3px solid var(--ink); border-radius: 16px; overflow: hidden; text-align: center; }
.word.r-verb { --tag: var(--violet); --soft: var(--violet-soft); --deep: var(--violet-deep); }
.word.r-object { --tag: #d42a67; --soft: var(--pink-soft); --deep: var(--pink-deep); }
.word.r-adjective { --tag: var(--gold); --soft: #fff3cc; --deep: #8a6200; }
.word .role { align-self: stretch; margin: 0 -14px 6px; padding: 3px 8px; background: var(--tag); color: #fff; font-size: 11.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; white-space: nowrap; }
.word.r-adjective .role { color: var(--ink); }
.word.r-possessive { --tag: #c9601a; --soft: #ffe9d6; --deep: #a34a00; }
.word.r-indirect { --tag: #2f6aa8; --soft: #dcebff; --deep: #1f4f86; }
.word.r-phrase { --tag: #18935f; --soft: #dff7ea; --deep: #0d6b45; }
.word .la .end { color: var(--deep); background: var(--soft); }
.word.agree { outline: 3px dashed var(--pink); outline-offset: 3px; }
.sent-en { text-align: center; font-weight: 800; font-size: 18px; margin-top: 12px; }

/* ---------- Logic and Science pictures ---------- */
.arg { display: grid; gap: 8px; }
.arg-line { display: flex; gap: 12px; align-items: baseline; margin: 0; padding: 10px 14px; background: #fff; border: 2.5px solid var(--ink); border-radius: 14px; }
.arg-line.conclusion { background: #fff7d6; box-shadow: 4px 4px 0 var(--gold); margin-top: 6px; }
.arg-tag { flex: none; min-width: 92px; font: 800 12.5px var(--font-ui); letter-spacing: .6px; text-transform: uppercase; color: var(--ink-2); }
.arg-text { font-weight: 700; font-size: 17px; line-height: 1.4; }
.arg-verdict { display: flex; align-items: center; gap: 8px; margin: 4px 0 0; font-weight: 800; }
.arg-verdict .pic { width: 28px; height: 28px; }
.arg-verdict.good { color: #0e7f58; } .arg-verdict.bad { color: #c21f5a; }
.fig-circles .svg-fig { max-width: 430px; }
.cir-label { font: 800 19px var(--font-ui); fill: var(--ink); }
.square { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 8px; align-items: center; }
.sq-card { display: grid; gap: 2px; padding: 10px 12px; background: #fff; border: 2.5px solid var(--ink); border-radius: 14px; text-align: center; }
.sq-letter { font: 400 30px var(--font-sfx); line-height: 1; color: var(--violet); }
.sq-a .sq-letter, .sq-i .sq-letter { color: #0e9e92; } .sq-e .sq-letter, .sq-o .sq-letter { color: var(--pink-2, #c21f5a); }
.sq-name { font: 800 11.5px var(--font-ui); letter-spacing: .5px; text-transform: uppercase; color: var(--ink-2); }
.sq-text { font-weight: 700; font-size: 15px; line-height: 1.3; }
.sq-link { font: 800 12px var(--font-ui); color: var(--ink-2); text-align: center; padding: 4px 8px; border-radius: 99px; }
.sq-link.on { background: var(--gold); color: var(--ink); }
.sq-link.cross { font-size: 13px; }
.gtree { display: grid; justify-items: center; gap: 0; }
.gnode { padding: 8px 18px; background: #fff; border: 2.5px solid var(--ink); border-radius: 99px; font-weight: 800; font-size: 16px; }
.gnode.root { background: var(--violet); color: #fff; box-shadow: 4px 4px 0 var(--ink); margin-bottom: 22px; position: relative; }
.gnode.root::after { content: ''; position: absolute; left: 50%; top: 100%; height: 22px; border-left: 3px solid var(--ink); }
.gkids { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px 18px; padding-top: 14px; border-top: 3px solid var(--ink); }
.gbranch { display: grid; justify-items: center; gap: 8px; }
.gleaves { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; max-width: 220px; }
.gleaf { padding: 4px 12px; background: #f1edff; border: 2px solid #d9d2f2; border-radius: 99px; font-weight: 700; font-size: 14px; }
.fig-gate .svg-fig { max-width: 340px; }
.gate-name { font: 400 22px var(--font-sfx); fill: var(--ink); letter-spacing: 1px; }
.gate-io { font: 800 24px var(--font-ui); fill: var(--ink); } .gate-io.out { fill: #c21f5a; }
.flow { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 34px; }
.flow-item { position: relative; display: grid; justify-items: center; gap: 2px; width: 118px; padding: 12px 8px 10px; background: #fff; border: 2.5px solid var(--ink); border-radius: 16px; text-align: center; box-shadow: 4px 4px 0 var(--teal); }
.flow-item:not(:last-child)::after { content: ''; position: absolute; left: calc(100% + 9px); top: 50%; width: 14px; height: 14px; margin-top: -7px; border-top: 4px solid var(--ink); border-right: 4px solid var(--ink); transform: rotate(45deg); }
.flow-pic .pic { width: 42px; height: 42px; }
.flow-item b { font-size: 15px; line-height: 1.25; } .flow-item small { font-size: 12.5px; font-weight: 700; color: var(--ink-2); line-height: 1.3; }
.flow-loop { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 12px 0 0; font-weight: 800; font-size: 14px; color: var(--ink-2); }
.flow-loop .ico { width: 20px; height: 20px; }
.layers { display: grid; gap: 4px; max-width: 460px; margin-inline: auto; }
.layer { display: flex; align-items: center; gap: 4px 12px; flex-wrap: wrap; min-height: 44px; padding: 8px 16px; border: 2.5px solid var(--ink); border-radius: 12px; background: #f1edff; }
.layer.s2 { min-height: 62px; } .layer.s3 { min-height: 84px; } .layer.s4 { min-height: 110px; }
.layer b { font-size: 16px; } .layer span { font-size: 14px; font-weight: 700; color: var(--ink-2); }
.layer .layer-pic .pic { width: 30px; height: 30px; display: block; }
.layer.t-pink { background: #ffd3e2; } .layer.t-teal { background: #c9f4ef; } .layer.t-violet { background: #e2dbff; } .layer.t-gold { background: #fff1b8; } .layer.t-green { background: #c8f2dd; }
.layer-end { margin: 2px 0; text-align: center; font: 800 12px var(--font-ui); letter-spacing: .6px; text-transform: uppercase; color: var(--ink-2); }
.fig-atom .svg-fig { max-width: 280px; }
.atom-sym { font: 800 25px var(--font-ui); fill: #fff; } .atom-n { font: 800 12px var(--font-ui); fill: #fff; }
.fig-forces .svg-fig { max-width: 500px; }
.force-label { font: 800 16px var(--font-ui); fill: var(--ink); } .force-body { font: 800 17px var(--font-ui); fill: var(--ink); }
.force-net { margin: 6px 0 0; text-align: center; font-weight: 800; }
.cell { display: grid; gap: 10px; justify-items: center; }
.fig-cell .svg-fig { max-width: 420px; }
.cell-n { font: 800 16px var(--font-ui); fill: var(--ink); }
.cell-key { margin: 0; padding: 0 0 0 4px; list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 16px; counter-reset: ck; }
.cell-key li { counter-increment: ck; font-weight: 700; font-size: 15px; }
.cell-key li::before { content: counter(ck); display: inline-grid; place-items: center; width: 24px; height: 24px; margin-right: 6px; border-radius: 50%; background: var(--gold); border: 2px solid var(--ink); font-weight: 800; font-size: 13px; }
.moon-name { font: 700 12.5px var(--font-ui); fill: var(--ink-2); } .moon-name.on { fill: #c21f5a; font-weight: 800; }
/* Chemistry figures */
.elts { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; }
.elt { width: 112px; padding: 8px 10px 10px; text-align: center; background: #e2dbff; border: 3px solid var(--ink); border-radius: 12px; box-shadow: 4px 4px 0 var(--ink); }
.elt.t-pink { background: #ffd3e2; } .elt.t-teal { background: #c9f4ef; } .elt.t-gold { background: #fff1b8; } .elt.t-green { background: #c8f2dd; }
.elt-n { display: block; text-align: left; font-weight: 800; font-size: 16px; line-height: 1.1; }
.elt-s { display: block; font-size: 40px; font-weight: 800; line-height: 1.15; }
.elt-name { display: block; font-size: 13.5px; font-weight: 800; line-height: 1.25; }
.elt-m { display: block; font-size: 13px; font-weight: 700; color: var(--ink-2); }
.fig-molecule .svg-fig { max-width: 330px; max-height: 250px; }
.mol-sym { font: 800 21px var(--font-ui); fill: var(--ink); }
.mol-charge { font: 800 19px var(--font-ui); fill: var(--pink-deep); }
.mol-label { margin: 2px 0 0; text-align: center; font-weight: 800; }
.fig-energy .svg-fig { max-width: 500px; }
.en-axis { font: 800 14px var(--font-ui); fill: var(--ink-2); }
.en-level { font: 800 16px var(--font-ui); fill: var(--ink); paint-order: stroke; stroke: #fbfaff; stroke-width: 5px; stroke-linejoin: round; }
.en-note { font: 800 14.5px var(--font-ui); fill: var(--violet-deep); }
.fig-chart .svg-fig { max-width: 540px; }
.ch-tick { font: 700 13.5px var(--font-ui); fill: var(--ink-2); }
.ch-axis { font: 800 14.5px var(--font-ui); fill: var(--ink); } .ch-axis.sm { font-size: 12.5px; }
.ch-mark { font: 800 14.5px var(--font-ui); fill: var(--ink); paint-order: stroke; stroke: #fbfaff; stroke-width: 5px; stroke-linejoin: round; }
.fig-key { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 18px; margin: 8px 0 0; font-weight: 800; font-size: 14.5px; }
.fig-key span { display: inline-flex; align-items: center; gap: 7px; }
.fig-key i { width: 24px; height: 0; border-top: 5px solid var(--pink); border-radius: 3px; }
.fig-key i.k-teal { border-color: var(--teal); } .fig-key i.k-violet { border-color: var(--violet); } .fig-key i.k-gold { border-color: var(--gold); } .fig-key i.k-green { border-color: var(--green); }
.fig-key i.dashed { border-top-style: dashed; }
.fig-particles .svg-fig { max-width: 560px; } .fig-particles .svg-fig.w1 { max-width: 230px; } .fig-particles .svg-fig.w2 { max-width: 400px; }
.pt-label { font: 800 15px var(--font-ui); fill: var(--ink); } .pt-note { font: 700 12.5px var(--font-ui); fill: var(--ink-2); }
.fig-battery .svg-fig { max-width: 480px; }
.bat-metal { font: 800 18px var(--font-ui); fill: var(--ink); } .bat-ion { font: 800 15px var(--font-ui); fill: var(--ink-2); }
.bat-flow { font: 800 15px var(--font-ui); fill: var(--pink-deep); } .bat-name { font: 800 17px var(--font-ui); fill: var(--ink); } .bat-note { font: 700 13px var(--font-ui); fill: var(--ink-2); }
/* On a phone these drawings are shown at about half size, so their words are set larger. */
@media (max-width: 600px) {
  .en-axis { font-size: 18px; } .en-level { font-size: 20px; } .en-note { font-size: 18.5px; }
  .ch-tick { font-size: 19px; } .ch-axis { font-size: 19px; } .ch-axis.sm { font-size: 15.5px; } .ch-mark { font-size: 19px; }
  .bat-note { font-size: 16.5px; } .bat-ion { font-size: 18px; } .bat-flow { font-size: 16.5px; } .bat-name { font-size: 20px; }
  .elts { gap: 10px; } .elt { width: 104px; }
  .pt-label { font-size: 17px; } .pt-note { font-size: 13.5px; }
}
@media (max-width: 600px) {
  .arg-line { flex-direction: column; gap: 2px; } .arg-tag { min-width: 0; }
  .sq-text { font-size: 13.5px; } .sq-link { font-size: 10.5px; padding: 2px 4px; }
  .flow { gap: 12px 26px; } .flow-item { width: 104px; }
}
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; counter-reset: st; }
.step { display: flex; gap: 14px; align-items: center; counter-increment: st; }
.step::before { content: counter(st); flex: none; width: 2.1em; height: 2.1em; border-radius: 50%; display: grid; place-items: center; background: var(--pink); color: #fff; font-family: var(--font-sfx); font-size: 20px; box-shadow: 3px 3px 0 var(--ink); }
.step:nth-child(2)::before { background: var(--teal); color: var(--ink); }
.step:nth-child(3)::before { background: var(--violet); }
.step-pic .pic { width: 44px; height: 44px; display: block; }
.step h4 { font-size: 17px; font-weight: 800; }
.step p { font-size: 15.5px; line-height: 1.45; color: #3b3460; }

/* ---------- footer ---------- */
footer { margin-top: 76px; border-top: 1px solid rgba(255, 255, 255, .1); background: rgba(0, 0, 0, .25); color: #b9b0e8; font-size: 14px; }
footer .shell { min-height: 72px; display: flex; align-items: center; gap: 8px 18px; flex-wrap: wrap; padding: 14px 0; }
footer a:first-child { font-family: var(--font-sfx); font-size: 22px; letter-spacing: 1.5px; text-transform: uppercase; color: #fff; text-decoration: none; margin-right: auto; }
footer a:first-child b { color: var(--pink); font-weight: 400; }

/* ---------- art in motion ---------- */
.buddy { display: block; width: 100%; height: auto; overflow: visible; }
.buddy-eyes { transform-box: fill-box; transform-origin: center; animation: blink 4.6s infinite; }
.buddy-wave { transform-box: fill-box; transform-origin: 0% 100%; animation: wave 1.1s ease-in-out infinite; }
.fx-sweat { animation: sweat 1.6s ease-in infinite; }
.fx-twinkle, .bg-twinkle { animation: pulse 1.4s ease-in-out infinite alternate; }
.bg-drift { animation: drift 40s linear infinite alternate; }
@keyframes blink { 0%, 93%, 100% { transform: scaleY(1); } 96.5% { transform: scaleY(.08); } }
@keyframes wave { 50% { transform: rotate(-9deg); } }
@keyframes sweat { 0% { transform: translateY(-6px); opacity: 0; } 20% { opacity: 1; } 100% { transform: translateY(16px); opacity: 0; } }
@keyframes pulse { from { opacity: .3; } to { opacity: 1; } }
@keyframes drift { to { transform: translateX(60px); } }
@keyframes rise { from { transform: translateY(30%); } }
@keyframes float { 50% { transform: translateY(-6%); } }
@keyframes itemIn { from { transform: translateY(12px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes slam { from { transform: scale(2.4); opacity: 0; } 60% { transform: scale(.92); opacity: 1; } to { transform: scale(1); opacity: 1; } }
@keyframes shudder { 0%, 100% { transform: translateX(0); } 20% { transform: translateX(-1.5%); } 40% { transform: translateX(1.5%); } 60% { transform: translateX(-1%); } 80% { transform: translateX(1%); } }
@keyframes fall { from { transform: translate(0, 0) rotate(0); } to { transform: translate(140px, 780px) rotate(540deg); } }

/* ---------- smaller screens ---------- */
@media (max-width: 980px) {
  .title-cast { display: none; }
  .title-buddy { display: block; }
  .title-screen { padding-top: 124px; }
  .how { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .shell, .shell.narrow { width: calc(100% - 28px); }
  .hud-logo { font-size: 24px; }
  .hud-logo small { display: none; }
  .hbtn { padding: 0 11px; font-size: 13.5px; }
  .block { margin-top: 44px; }
  .subjects { grid-template-columns: 1fr; gap: 24px; }
  .membership { flex-direction: column; align-items: flex-start; padding: 20px; }
  /* Tomo stands in the scene at the top and the words sit under him, so he never covers them. */
  .subject-hero { min-height: 300px; padding: 132px 18px 20px; }
  .hero-text { max-width: 100%; }
  .hero-buddy { height: 122px; right: 4%; bottom: auto; top: 8px; }
  .ep-row { flex-wrap: wrap; gap: 4px 12px; padding: 12px 16px; }
  .ep-row .n { min-width: 0; font-size: 19px; }
  .ep-row .t { order: 3; flex-basis: 100%; }
  .ep-row .s { flex-direction: row; align-items: center; margin-left: auto; }
  .panel, .lcard, .qcard { padding: 18px 16px 20px; box-shadow: 6px 6px 0 var(--shadow, var(--pink)); }
  .signin, .two { grid-template-columns: 1fr; }
  .meters li { grid-template-columns: 1fr max-content; }
  .meters progress { grid-column: 1 / -1; grid-row: 2; }
  .meters.plain progress { grid-row: auto; }
  .meters.plain .m-fig { grid-column: 1 / -1; }
  .kpis { grid-template-columns: 1fr 1fr; gap: 12px; }
  .kpi b { font-size: 34px; }
  .signin { gap: 74px; }
  .stepper li { font-size: 11px; }
  .stepper span { width: 32px; height: 32px; font-size: 17px; }
  .stepper li::before { top: 14px; }
  .plan b { font-size: 44px; }
  .row.start .ico-wrap { display: none; }
  .flash .fb-icon { width: 48px; }
  .eyecatch { min-height: 180px; padding: 16px; }
  .ec-label { font-size: 14px; }
  .dialogue { margin-top: 28px; }
  .dlg-buddy { width: 86px; }
  .dlg-box { font-size: 16.5px; padding: 22px 16px 14px; }
  .nametag { left: 14px; font-size: 13.5px; }
  .lcard h2 { font-size: 20px; }
  .lcard > p { font-size: 16.5px; }
  .fig { padding: 14px 10px 12px; }
  .vocab { grid-template-columns: 1fr 1fr; gap: 16px 12px; }
  .vocab.n3 { grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
  .vcard .la, .pcard .la, .word .la { font-size: 25px; }
  .vocab.n3 .vpic .pic { width: 48px; height: 48px; }
  .vocab.n3 .vcard .la { font-size: 21px; }
  .pair-head, .pair { grid-template-columns: 1fr 26px 1fr; }
  .pics .pic { width: 36px; height: 36px; }
  .pcard.many .pic { width: 26px; height: 26px; }
  .word { min-width: 84px; padding: 0 9px 8px; }
  .word .role { margin: 0 -9px 5px; font-size: 10.5px; letter-spacing: .03em; }
  .word .en { font-size: 13.5px; }
  .tbl { font-size: 14.5px; }
  .tbl td, .tbl tbody th, .tbl thead th { padding: .5em .55em; }
  .eq { font-size: 21px; column-gap: 10px; }
  .parts-frac { font-size: 54px; }
  .parts-notes { font-size: 15px; }
  .bar-label { font-size: 17px; }
  .bar-row { grid-template-columns: minmax(48px, max-content) 1fr; column-gap: 10px; }
  .tok-set .pic { width: 28px; height: 28px; }
  .tok-set { max-width: 100px; }
  .tok-group { min-width: 78px; padding: 14px 8px 8px; }
  .fb { align-items: flex-start; padding: 12px; gap: 10px; }
  .fb-icon { width: 58px; }
  footer { margin-top: 56px; }
}
@media (max-width: 540px) {
  nav a[href="#membership"] { display: none; }
  .title-card { padding: 22px 18px; box-shadow: 7px 7px 0 var(--ink); }
  .title-links { flex-direction: column; align-items: center; gap: 0; }
  .logo { -webkit-text-stroke-width: 2.5px; text-shadow: 3px 3px 0 var(--pink), 5px 5px 0 var(--ink); }
  .banner { -webkit-text-stroke-width: 2.5px; text-shadow: 3px 3px 0 var(--pink), 6px 6px 0 var(--ink); }
  .ec-title { -webkit-text-stroke-width: 5px; }
  .qactions .btn { flex: 1; }
  .row .btn.small { flex: 1 1 100%; }
}
@media (max-width: 360px) {
  .shell, .shell.narrow { width: calc(100% - 20px); }
  .hud-in { gap: 6px; }
  .hud-logo { font-size: 21px; letter-spacing: 1px; }
  nav { gap: 4px; }
  .hbtn { padding: 0 9px; font-size: 12.5px; height: 34px; }
  .word { min-width: 74px; }
  .kpi { padding: 12px 12px 10px; }
  .kpi b { font-size: 26px; white-space: normal; }
  .vcard .la, .pcard .la, .word .la { font-size: 22px; }
  .vocab { gap: 12px 8px; }
  .vcard { padding: 14px 4px 10px; }
  .vocab.n3 .vcard .la { font-size: 17px; letter-spacing: .5px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .petal { display: none; }
  .reveal { opacity: 1; transform: none; }
}
