/* Palette taken from the reference screenshots (StudySapuri ENGLISH):
   navy #0c41a0, blue #1d80e7→#419bf5, teal #33abb3→#62cac8, aqua ring
   #9ce2e8→#49c4eb, magenta #e452d3, pale blue #e1edfa / #f8faff.
   Button gradients are nudged a little darker than the reference so white
   text stays readable. Change colours here and every page and illustration follows. */
:root {
  --bg: #ffffff;
  --soft: #f8faff;        /* page-section background */
  --band: #e1edfa;        /* pale blue panels */
  --panel: #f6fbff;
  --surface: #ffffff;
  --card: #f1f6fd;
  --text: #2b3440;
  --muted: #5f6b7a;
  --line: #d3e1f2;
  --navy: #0c41a0;        /* labels, outlines, emphasis */
  --brand: #1670d6;       /* links-as-accents, numbers, eyebrows */
  --brand-ink: #ffffff;
  --brand-2: #49c4eb;     /* aqua, decoration */
  --sky: #d6e8fb;         /* soft shapes behind illustrations */
  --btn-1: #1670d6;       /* blue button gradient */
  --btn-2: #2f8cee;
  --cta-1: #13848f;       /* teal "start" gradient */
  --cta-2: #26a3a8;
  --ring-1: #9ce2e8;      /* progress-ring gradient */
  --ring-2: #49c4eb;
  --ring-3: #0c41a0;
  --magenta: #bf36b1;     /* key words, "free" badges (text-safe) */
  --magenta-2: #e452d3;   /* decorative magenta */
  --sun: #ffc83d;         /* illustrations only */
  --sun-ink: #2a2100;
  --red: #e0364f;         /* wrong answers, vending machines, torii */
  --green: #34b27b;
  --link: #1166b5;
  --focus: #1166b5;
  --shadow: 0 8px 24px rgba(12, 65, 160, 0.10);
  /* soft pastel gradients (reference: pink → lavender → sky) */
  --ink-strong: #14254f;  /* big headings */
  --grad-page: linear-gradient(115deg, #fdf0f7 0%, #f1f1fd 38%, #e8f1fc 70%, #dcecf9 100%);
  --grad-soft: linear-gradient(160deg, #f6f3fe 0%, #eef5fd 100%);
  --grad-cta: linear-gradient(90deg, #7a3ce0 0%, #4a64e6 52%, #1795d8 100%);
  --grad-text: linear-gradient(90deg, #1b56c9 0%, #1a8fc4 100%);
  --grad-cool: linear-gradient(120deg, #173a8c 0%, #1f63d4 55%, #1a95d4 100%);
  --swash: #e3a2d4;
  --cyan-line: #2bb8ec;
  --glass: rgba(255, 255, 255, 0.72);
  /* illustration-only tones */
  --il-ink: #22304a;
  --il-paper: #ffffff;
  --il-skin: #f6cfae;
  --il-wood: #a86f45;
  --il-sakura: #f9c4d2;
  --il-sakura2: #f4a9bd;
  --il-glass: #cfe6fb;
  --il-frame: #9db3cf;
  --il-ground: #e6f2f5;
  --radius: 16px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Plus Jakarta Sans", "Noto Sans JP", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-ja: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic", Meiryo, sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1526;
    --soft: #0e1a2e;
    --band: #142848;
    --panel: #12223c;
    --surface: #111f36;
    --card: #17294a;
    --text: #e6eefb;
    --muted: #9fb0c8;
    --line: #22385e;
    --navy: #8fb8ff;
    --brand: #5aa7ff;
    --brand-ink: #06121d;
    --brand-2: #62d0f0;
    --sky: #1b3560;
    --magenta: #f07de4;
    --magenta-2: #f07de4;
    --red: #ff6b7f;
    --green: #4cc894;
    --link: #8cc8ff;
    --focus: #8cc8ff;
    --ink-strong: #eef3ff;
    --grad-page: linear-gradient(115deg, #221731 0%, #161b36 40%, #0f2036 100%);
    --grad-soft: linear-gradient(160deg, #1a1834 0%, #102039 100%);
    --grad-text: linear-gradient(90deg, #7fb2ff 0%, #5fd3f2 100%);
    --swash: #b36aa6;
    --cyan-line: #3aa9d8;
    --glass: rgba(17, 31, 54, 0.78);
    --shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
    --il-paper: #eef5fb;
    --il-glass: #9fd2f3;
    --il-frame: #6f8aa3;
    --il-ground: #17363a;
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
}
[lang="ja"] { font-family: var(--font-ja); }
a { color: var(--link); text-underline-offset: 0.18em; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { line-height: 1.25; letter-spacing: -0.01em; }
h1 { font-size: clamp(1.7rem, 4.5vw, 2.4rem); margin: 0.3em 0 0.4em; }
h2 { font-size: 1.35rem; margin: 2.2em 0 0.6em; }
h3 { font-size: 1rem; margin: 1.2em 0 0.4em; color: var(--muted); font-weight: 600; }
p { margin: 0 0 1em; }

.wrap { width: 100%; max-width: 760px; margin: 0 auto; padding: 0 16px; }
.skip { position: absolute; left: -999px; top: 0; }
.skip:focus { left: 16px; top: 8px; background: var(--surface); padding: 8px 12px; z-index: 10; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.nowrap { white-space: nowrap; }

/* ---------- header / footer ---------- */
.site-header { border-bottom: 1px solid var(--line); background: var(--surface); }
.header-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 16px; padding-top: 12px; padding-bottom: 12px; }
.brand { font-weight: 800; color: var(--text); text-decoration: none; font-size: 1.05rem; }
.site-header nav { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 0.95rem; }
.site-header nav a { color: var(--muted); text-decoration: none; }
.site-header nav a:hover { color: var(--text); text-decoration: underline; }
.site-footer { margin-top: 64px; border-top: 1px solid var(--line); padding: 24px 0 40px; color: var(--muted); font-size: 0.9rem; }

/* ---------- common ---------- */
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 4px; padding: 0; margin: 20px 0 0; font-size: 0.85rem; color: var(--muted); }
.crumbs li + li::before { content: "›"; margin-right: 4px; }
.crumbs a { color: var(--muted); }
.eyebrow { margin: 28px 0 0; color: var(--brand); font-weight: 700; font-size: 1.05rem; }
.lede { font-size: 1.12rem; color: var(--muted); }
.h1-ja, .h2-ja { font-weight: 500; color: var(--muted); font-size: 0.7em; }
.hero { padding: 16px 0 8px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; }

.button {
  display: inline-block; background: var(--brand); color: var(--brand-ink); font-weight: 700;
  padding: 12px 20px; border-radius: 999px; text-decoration: none; border: 2px solid var(--brand);
}
.button:hover { filter: brightness(1.06); }
.button-ghost { background: transparent; color: var(--text); border-color: var(--line); }

.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 0 0 8px; }
.chip {
  display: inline-block; padding: 4px 12px; border-radius: 999px; font-size: 0.85rem; font-weight: 600;
  background: var(--card); color: var(--text); text-decoration: none; border: 1px solid var(--line);
}
.chip:hover { border-color: var(--muted); }
.chip-level { background: var(--surface); color: var(--navy); border: 1.5px solid var(--navy); }
.chip-soft { background: transparent; color: var(--muted); }

.tag {
  display: inline-block; font-size: 0.72rem; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase;
  background: var(--magenta); color: #fff; padding: 2px 8px; border-radius: 6px; vertical-align: 0.2em; margin-right: 6px;
}

/* Japanese text: large enough that furigana stays readable on a phone. */
ruby rt { font-size: 0.5em; color: var(--muted); font-weight: 400; }
.ja-lg { font-size: 1.45rem; line-height: 2.1; margin: 0; font-weight: 600; }
.nb { white-space: nowrap; }
mark.hl { background: none; color: var(--magenta); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.22em; }

/* ---------- cards ---------- */
.cards { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.card-link { text-decoration: none; color: var(--text); display: block; }
.card-link:hover .card-title { text-decoration: underline; }
.card-eyebrow { display: block; color: var(--brand); font-weight: 700; font-size: 0.85rem; }
.card-title { display: block; font-weight: 750; font-size: 1.1rem; line-height: 1.35; margin: 2px 0 6px; }
.card-desc { color: var(--muted); font-size: 0.95rem; margin: 0 0 6px; }
.card-meta { font-size: 0.8rem; color: var(--muted); margin: 0; }

.browse-group h3 { margin-top: 1em; }

/* ---------- drill page ---------- */
.drill-head { margin-bottom: 8px; }

.opening-quiz, .payoff, .rule, .printable, .signup {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 4px 20px 16px; margin: 28px 0;
}
.opening-quiz h2, .payoff h2, .rule h2, .printable h2, .signup h2 { margin-top: 0.9em; }
.oq-lines { padding-left: 1.4em; margin: 0 0 8px; }
.oq-lines li { margin: 8px 0; }
.oq-scene { display: block; font-size: 0.85rem; color: var(--muted); }
.oq-later { font-size: 0.9rem; margin: 0; }
.payoff { border-left: 6px solid var(--brand); }

.rule ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.rule li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; }
.rule-en { color: var(--muted); font-size: 0.95rem; }

.how { color: var(--muted); }
.toggles { display: flex; gap: 8px; margin: 0 0 12px; }
.toggle {
  font: inherit; font-size: 0.85rem; padding: 6px 12px; border-radius: 999px; cursor: pointer;
  background: var(--surface); color: var(--text); border: 1px solid var(--line);
}
.toggle[aria-pressed="true"] { background: var(--text); color: var(--bg); border-color: var(--text); }
body.hide-romaji .phrase .romaji, body.hide-en .phrase .en { visibility: hidden; }

.phrase-list, .quiz-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.phrase {
  position: relative; background: var(--card); border-radius: var(--radius); padding: 14px 18px 12px 60px;
}
.num {
  position: absolute; left: 14px; top: 18px; width: 32px; height: 32px; border-radius: 50%;
  background: var(--brand); color: var(--brand-ink); font-weight: 800; font-size: 0.95rem;
  display: grid; place-items: center;
}
.romaji { margin: 0; color: var(--muted); font-style: italic; }
.en { margin: 0; font-weight: 600; }
.note { margin: 8px 0 0; font-size: 0.9rem; color: var(--muted); border-top: 1px dashed var(--line); padding-top: 6px; }

/* 5-second quiz */
.q { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.q-cue { background: var(--band); color: var(--navy); margin: 0; padding: 12px 18px; font-weight: 700; font-size: 1.1rem; }
.q-label { font-weight: 800; margin-right: 4px; }
.q-answer { padding: 10px 18px 14px; }
.q-answer summary { cursor: pointer; color: var(--muted); font-size: 0.9rem; }
.q-answer[open] summary { margin-bottom: 4px; }
.q-controls { display: flex; align-items: center; gap: 14px; padding: 12px 18px; }
.q-start {
  font: inherit; font-weight: 700; cursor: pointer; padding: 10px 18px; border-radius: 999px; white-space: nowrap;
  background: var(--text); color: var(--bg); border: 0;
}
.q-start[disabled] { opacity: 0.45; cursor: default; }
.timer { width: 48px; height: 48px; position: relative; flex: none; }
.timer svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.timer circle { fill: none; stroke-width: 5; }
.timer .track { stroke: var(--line); }
.timer .bar { stroke: var(--brand); stroke-linecap: round; }
.timer-n { position: absolute; inset: 0; display: grid; place-items: center; font-weight: 800; font-size: 1.1rem; }
.q-say { color: var(--muted); font-size: 0.9rem; margin: 0; }
.q.js .q-answer summary { display: none; }
.q.js .q-answer:not([open]) { display: none; }
.q.js.revealed .q-controls { display: none; }
.tired { margin-top: 16px; font-weight: 600; }

.outro { font-size: 1.1rem; margin: 28px 0; }

/* lite YouTube embed */
.video { margin: 28px 0; }
.yt { position: relative; display: block; aspect-ratio: 16 / 9; background: #000; border-radius: var(--radius); overflow: hidden; }
.yt img { width: 100%; height: 100%; object-fit: cover; opacity: 0.9; }
.yt-play { position: absolute; inset: 0; margin: auto; width: 72px; height: 50px; background: var(--red); border-radius: 14px; }
.yt-play::after { content: ""; position: absolute; left: 29px; top: 15px; border-style: solid; border-width: 10px 0 10px 18px; border-color: transparent transparent transparent #fff; }
.yt iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* signup */
.signup { border: 2px solid var(--sun); }
.signup-form { margin: 0 0 8px; }
.signup-form fieldset { border: 0; padding: 0; margin: 0; min-width: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.signup-form fieldset[disabled] { opacity: 0.55; }
.signup-form input {
  flex: 1 1 220px; min-width: 0; font: inherit; padding: 11px 14px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--bg); color: var(--text);
}
.signup-form button {
  font: inherit; font-weight: 700; padding: 11px 20px; border-radius: 999px; cursor: pointer;
  background: var(--brand); color: var(--brand-ink); border: 0;
}
.fine { font-size: 0.82rem; color: var(--muted); margin: 0; }

/* print list */
.print-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.print-list li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 16px; }
.print-dl { text-decoration: none; color: var(--text); flex: 1 1 260px; }
.print-dl:hover .print-title { text-decoration: underline; }
.print-title { display: block; font-weight: 700; }
.print-meta { display: block; font-size: 0.82rem; color: var(--muted); }
.print-drill { font-size: 0.9rem; }

.steps li, .path li { margin: 8px 0; }

@media (prefers-reduced-motion: reduce) {
  .timer .bar { transition: none !important; }
}


/* ================= site v2: level-centred layout ================= */
.site-header nav a[aria-current="page"] { color: var(--text); font-weight: 700; }
.footer-inner { display: grid; gap: 4px; }
.footer-links a { color: var(--muted); }
.fine { font-size: 0.82rem; color: var(--muted); }

.preview-bar { margin: 0; padding: 8px 16px; text-align: center; font-size: 0.85rem; font-weight: 600; background: var(--sun); color: var(--sun-ink); }
.preview-tag { display: inline-block; font-size: 0.78rem; font-weight: 700; color: var(--muted); border: 1px dashed var(--muted); border-radius: 6px; padding: 2px 8px; margin: 12px 0 0; }
.button.is-off { opacity: 0.5; cursor: not-allowed; }
.button-small { padding: 8px 14px; font-size: 0.9rem; }
.linkish { font: inherit; background: none; border: 0; padding: 0; color: var(--link); text-decoration: underline; text-underline-offset: 0.18em; cursor: pointer; }

.ja-xl { font-size: clamp(1.8rem, 6vw, 2.4rem); line-height: 1.8; font-weight: 700; }
.h1-sub { display: block; font-size: 1rem; font-weight: 500; color: var(--muted); font-style: italic; }
.ticks { padding-left: 1.2em; }
.ticks li { margin: 4px 0; }

/* home: three doors */
.doors { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); margin-top: 20px; }
.door { display: grid; gap: 2px; padding: 16px 18px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); color: var(--text); text-decoration: none; }
.door:hover { border-color: var(--muted); }
.door-main { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.door-title { font-weight: 800; font-size: 1.1rem; }
.door-text { font-size: 0.88rem; opacity: 0.85; }

/* levels */
.levels { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; grid-template-columns: repeat(5, minmax(0, 1fr)); }
.level { display: grid; justify-items: center; gap: 2px; padding: 12px 6px; border-radius: var(--radius); background: linear-gradient(135deg, var(--btn-1), var(--btn-2)); color: #fff; text-decoration: none; text-align: center; box-shadow: var(--shadow); }
.level:hover { filter: brightness(1.04); }
.level-code { font-weight: 800; font-size: 1.15rem; }
.level-name { font-size: 0.75rem; line-height: 1.2; }
.level-soon { background: var(--card); color: var(--muted); }
.level-intros { padding-left: 1.2em; }
.level-intros li { margin: 8px 0; }
@media (max-width: 420px) { .level-name { display: none; } }

.jump { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 8px 0 0; font-size: 0.9rem; }

.cards-2 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.price { font-weight: 800; font-size: 1.1rem; margin: 0; }
.price-lg { font-size: 1.6rem; }
.buy { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }

/* grammar */
.grammar-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.grammar-list a { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; padding: 12px 16px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: var(--text); }
.grammar-list a:hover { border-color: var(--muted); }
.g-pattern { font-weight: 700; font-size: 1.2rem; }
.g-meaning { color: var(--muted); font-size: 0.95rem; }
.structure { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.structure td { padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.structure tr:last-child td { border-bottom: 0; }
.structure td:first-child { font-weight: 700; font-size: 1.1rem; }
.structure td:last-child { color: var(--muted); }
@media (max-width: 480px) { .structure td { display: block; border-bottom: 0; padding-bottom: 2px; } .structure tr { display: block; border-bottom: 1px solid var(--line); padding-bottom: 8px; } }
.notes { padding-left: 1.2em; }
.notes li { margin: 6px 0; }
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 32px 0; }
.pager a { display: grid; gap: 2px; padding: 12px 16px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); text-decoration: none; color: var(--text); }
.pager a span:first-child { font-size: 0.8rem; color: var(--muted); }
.pager-next { text-align: right; }
.upsell { border: 2px solid var(--brand); border-radius: var(--radius); padding: 14px 18px; margin: 28px 0; }
.upsell p { margin: 0 0 6px; }

/* downloads */
.dl-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.dl { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; padding: 14px 16px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.dl-text { display: grid; gap: 2px; flex: 1 1 240px; }
.dl-title { font-weight: 700; }
.dl-meta { font-size: 0.8rem; color: var(--muted); font-weight: 500; }
.dl-desc { font-size: 0.92rem; color: var(--muted); }
.dl-email { margin: 20px 0; }
.dl-email h3 { color: var(--text); font-size: 1.1rem; margin-bottom: 4px; }
.signup-compact { margin-top: 8px; }
.signup-compact h2 { font-size: 1.05rem; }

/* tools (shared) */
.tool { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; margin: 24px 0; }

/* level check */
.lc-progress { display: flex; justify-content: space-between; gap: 12px; font-size: 0.85rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.lc-level { font-weight: 800; color: var(--brand); }
.lc-type { margin: 12px 0 0; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
.lc-prompt { margin: 4px 0; }
.lc-ask { color: var(--muted); }
.lc-choices { display: grid; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
.lc-choice { font: inherit; font-size: 1.15rem; font-weight: 600; padding: 12px 14px; border-radius: 12px; border: 2px solid var(--line); background: var(--bg); color: var(--text); cursor: pointer; text-align: left; }
.lc-choice:hover { border-color: var(--brand); }
.lc-idk { font: inherit; margin-top: 12px; background: none; border: 0; color: var(--muted); text-decoration: underline; cursor: pointer; padding: 0; }
.lc-title { font-size: 1.8rem; margin-top: 0.2em; }
.lc-review summary { cursor: pointer; font-weight: 600; margin: 12px 0; }
.lc-review-list { padding-left: 1.4em; }
.lc-review-list li { margin: 6px 0; }
.lc-review-list li.miss { color: var(--red); }
.lc-review-list li.miss strong { color: var(--text); }
.lc-r-level { font-size: 0.75rem; font-weight: 700; color: var(--muted); }

/* kana quiz */
.kq-script { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-bottom: 8px; font-weight: 600; }
.kq-group { border: 0; padding: 0; margin: 12px 0 0; }
.kq-group legend { font-size: 0.85rem; font-weight: 700; color: var(--muted); margin-bottom: 6px; }
.kq-rows { display: flex; flex-wrap: wrap; gap: 6px; }
.kq-row { display: inline-flex; align-items: center; gap: 4px; padding: 6px 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg); cursor: pointer; font-size: 1.05rem; }
.kq-row:has(input:checked) { background: var(--navy); color: #fff; border-color: transparent; }
.kq-row input { accent-color: var(--brand); }
.kq-quick { font-size: 0.9rem; margin: 12px 0; }
.kq-warn { color: var(--red); font-weight: 600; }
.kq-progress { text-align: center; color: var(--muted); font-variant-numeric: tabular-nums; margin: 0; }
.kq-kana { text-align: center; font-size: clamp(4.5rem, 20vw, 7rem); line-height: 1.2; margin: 8px 0 12px; font-weight: 600; }
.kq-form { display: flex; gap: 8px; max-width: 360px; margin: 0 auto; }
.kq-input { flex: 1; min-width: 0; font: inherit; font-size: 1.3rem; text-align: center; padding: 10px 12px; border-radius: 12px; border: 2px solid var(--line); background: var(--bg); color: var(--text); }
.kq-input:focus { border-color: var(--brand); outline: none; }
.kq-feedback { text-align: center; min-height: 1.6em; margin: 10px 0 0; font-weight: 600; }
.kq-feedback.is-wrong { color: var(--red); }
.kq-feedback.is-reveal { color: var(--text); }
.kq-play > p:last-child { text-align: center; font-size: 0.9rem; }
.kq-missed-list { list-style: none; padding: 0; margin: 8px 0 16px; display: flex; flex-wrap: wrap; gap: 8px; }
.kq-missed-list li { display: grid; justify-items: center; min-width: 64px; padding: 8px 10px; border-radius: 12px; background: var(--card); position: relative; }
.kq-m-kana { font-size: 1.8rem; line-height: 1.2; }
.kq-m-romaji { font-size: 0.85rem; color: var(--muted); }
.kq-m-count { position: absolute; top: 4px; right: 6px; font-size: 0.7rem; font-weight: 800; color: var(--red); }
.kq-again { display: flex; flex-wrap: wrap; gap: 8px; }

/* headings focused by script to announce a result: no visible ring */
[tabindex="-1"]:focus { outline: none; }

/* ================= v3: catchier look ================= */
h1, h2, .brand, .door-title, .card-title, .lc-title, .kq-score, .level-code, .cta-band strong {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: 0;
}
h1, h2 { text-wrap: balance; }
h2 { font-size: clamp(1.35rem, 3.5vw, 1.7rem); }

/* header */
.site-header { position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(8px); }
.brand { display: inline-flex; align-items: center; gap: 8px; font-size: 1.1rem; }
.brand-mark { width: 30px; height: 30px; border-radius: 9px; background: var(--brand); color: var(--brand-ink); display: grid; place-items: center; font-family: var(--font-ja); font-weight: 800; font-size: 1rem; flex: none; }

/* buttons */
/* Buttons: 18.7px bold counts as large text, so the gradients below pass 3:1 with white. */
.button { border: 0; border-radius: 999px; color: #fff; font-size: 1.17rem; background: linear-gradient(90deg, var(--btn-1), var(--btn-2)); box-shadow: 0 6px 16px rgba(22, 112, 214, .25); transition: transform .08s ease, filter .08s ease; }
.button:hover { filter: brightness(1.06); }
.button:active { transform: translateY(1px); }
.button-cta { background: linear-gradient(90deg, var(--cta-1), var(--cta-2)); box-shadow: 0 6px 16px rgba(19, 132, 143, .28); }
.button-ghost { background: var(--surface); color: var(--navy); box-shadow: none; border: 1.5px solid var(--navy); }
.button-big { padding: 16px 30px; }
.button-small { font-size: 0.95rem; }
.chev::after { content: ""; display: inline-block; width: 8px; height: 8px; border: solid currentColor; border-width: 3px 3px 0 0; transform: rotate(45deg); margin-left: 12px; vertical-align: 0.08em; }

/* full-width coloured bands inside the centred column, without widening the page */
.band { background: var(--band); border-radius: 24px; padding: 8px clamp(16px, 3vw, 32px) 32px; margin-top: 48px; }
.band > h2:first-child, .band > .section-head:first-child { margin-top: 32px; }

/* illustrations */
.illo { display: block; width: 100%; height: auto; }
.il-brand { fill: var(--btn-2); } .il-brand2 { fill: var(--brand-2); } .il-sky { fill: var(--sky); }
.il-sun { fill: var(--sun); } .il-red { fill: var(--red); } .il-green { fill: var(--green); }
.il-ink { fill: var(--il-ink); } .il-paper { fill: var(--il-paper); } .il-skin { fill: var(--il-skin); }
.il-wood { fill: var(--il-wood); } .il-sakura { fill: var(--il-sakura); } .il-sakura2 { fill: var(--il-sakura2); }
.il-glass { fill: var(--il-glass); } .il-frame { fill: var(--il-frame); } .il-ground { fill: var(--il-ground); }
.il-stroke { stroke: var(--il-ink); } .il-stroke-paper { stroke: var(--il-paper); } .il-stroke-skin { stroke: var(--il-skin); }
.il-ink-t { fill: var(--il-ink); } .il-paper-t { fill: var(--il-paper); }
.il-shadow { filter: drop-shadow(0 3px 4px rgba(20, 60, 100, .18)); }
.photo { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: var(--radius); }

/* hero */
.hero { display: grid; gap: 20px; align-items: center; padding: 28px 0 8px; }
@media (min-width: 820px) { .hero { grid-template-columns: 1.05fr 1fr; gap: 36px; padding-top: 44px; } }
.hero h1 { font-size: clamp(2rem, 5.6vw, 3.1rem); line-height: 1.15; margin: 0.2em 0 0.35em; }
.hero h1 .accent { color: var(--brand); }
.hero .lede { font-size: 1.15rem; }
.hero-visual { position: relative; aspect-ratio: 13 / 10; }
.hero-visual .photo { box-shadow: var(--shadow); }
.badges { list-style: none; padding: 0; margin: 18px 0 0; display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: 0.9rem; color: var(--muted); font-weight: 600; }
.badges li::before { content: "✓"; color: var(--green); font-weight: 800; margin-right: 6px; }

/* features */
.features { list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.feature { background: var(--surface); border-radius: var(--radius); padding: 8px 20px 20px; box-shadow: var(--shadow); }
.feature .illo { max-width: 180px; margin: 0 auto; }
.feature h3 { color: var(--text); font-family: var(--font-display); font-weight: 800; font-size: 1.15rem; margin: 4px 0 6px; }
.feature p { color: var(--muted); margin: 0; font-size: 0.97rem; }

/* scenes (AI photos, illustration until a photo is added) */
.scenes { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.scene { position: relative; aspect-ratio: 4 / 3; border-radius: var(--radius); overflow: hidden; background: var(--surface); box-shadow: var(--shadow); }
.scene .illo { height: 100%; }
.scene figcaption { position: absolute; left: 10px; bottom: 10px; background: var(--surface); color: var(--text); font-weight: 700; font-size: 0.85rem; padding: 4px 10px; border-radius: 999px; box-shadow: var(--shadow); }
.scene figcaption span { font-family: var(--font-ja); color: var(--brand); margin-right: 6px; }
.scene { margin: 0; }

/* page head (inner pages) */
.page-head { display: grid; gap: 8px 24px; align-items: center; }
@media (min-width: 700px) { .page-head { grid-template-columns: 1fr 200px; } }
.page-head .illo { max-width: 200px; justify-self: center; }
.page-head h1 { margin-top: 0.2em; }

/* cards with illustrations */
.card { box-shadow: var(--shadow); border-color: transparent; }
.card-illo { display: block; max-width: 150px; margin: -4px auto 4px; }
.door { box-shadow: var(--shadow); border-color: transparent; }

/* signup box with an envelope */
.signup { position: relative; border: 0; background: var(--band); box-shadow: inset 0 0 0 2px var(--sky); }
.signup-illo { float: right; width: 110px; margin: -4px -8px 0 8px; }
@media (max-width: 480px) { .signup-illo { width: 84px; } }

/* call-to-action band */
.cta-band { margin: 56px 0 0; padding: 28px 24px; border-radius: 24px; background: linear-gradient(120deg, var(--ring-3), var(--btn-1) 60%, var(--btn-2)); color: #fff; display: grid; gap: 14px; justify-items: start; }
@media (min-width: 700px) { .cta-band { grid-template-columns: 1fr auto; align-items: center; } }
.cta-band strong { font-size: clamp(1.3rem, 3.6vw, 1.7rem); display: block; line-height: 1.25; }
.cta-band p { margin: 4px 0 0; opacity: .92; }
.cta-band .button { background: linear-gradient(90deg, var(--cta-1), var(--cta-2)); }

.section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 16px; }
.section-head h2 { margin-bottom: 0.5em; }
.section-sub { color: var(--muted); margin-top: -0.4em; }
.slot-tag { position: absolute; top: 8px; right: 8px; font-size: 0.68rem; font-weight: 700; background: var(--surface); color: var(--muted); border: 1px dashed var(--muted); padding: 2px 8px; border-radius: 6px; }
.wrap-wide { max-width: 1080px; }
.wrap-wide .lede { max-width: 38em; }


/* ================= v4: reference-matched components ================= */
h1, h2 { letter-spacing: 0.03em; }
body { background: var(--bg); }
.eyebrow, .card-eyebrow { color: var(--brand); }

/* header: nav "Level check" becomes a teal pill like the reference's header CTA */
.site-header nav a.nav-cta { color: #fff; background: linear-gradient(90deg, var(--cta-1), var(--cta-2)); padding: 4px 14px; border-radius: 999px; font-weight: 700; text-decoration: none; }
.brand-mark { background: linear-gradient(135deg, var(--ring-3), var(--btn-2)); color: #fff; }
.brand { color: var(--navy); }

/* small label above a big heading, and outlined "POINT 01" pills */
.kicker { margin: 40px 0 0; text-align: center; font-weight: 700; font-size: 0.95rem; color: var(--text); }
.kicker + h2 { margin-top: 4px; text-align: center; }
.center { text-align: center; }
.point { display: inline-block; font-family: var(--font-display); font-weight: 800; letter-spacing: 0.08em; font-size: 0.85rem; color: var(--navy); border: 1.5px solid var(--navy); border-radius: 999px; padding: 3px 18px; background: var(--surface); }
.feature .point { margin: 4px 0 6px; }

/* "FREE" badge with a little tail, on signup boxes */
.free-badge { display: inline-block; position: relative; background: var(--magenta); color: #fff; font-weight: 800; font-size: 0.8rem; letter-spacing: .06em; padding: 3px 12px; border-radius: 6px; margin: 16px 0 2px; }
.free-badge::after { content: ""; position: absolute; left: 50%; bottom: -6px; transform: translateX(-50%); border: 6px solid transparent; border-top-color: var(--magenta); border-bottom: 0; }
.signup { background: var(--panel); box-shadow: inset 0 0 0 1.5px var(--line); }
.signup-form button { background: linear-gradient(90deg, var(--cta-1), var(--cta-2)); color: #fff; font-size: 1.05rem; }

/* 3 easy steps with progress rings */
.steps3 { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 8px; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; }
.step { position: relative; display: grid; justify-items: center; text-align: center; gap: 4px; }
.step + .step::before { content: ""; position: absolute; left: -9%; top: 34%; width: 12px; height: 12px; border: solid var(--btn-2); border-width: 3px 3px 0 0; transform: rotate(45deg); }
.ring { width: min(150px, 100%); aspect-ratio: 1; position: relative; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring-in { position: absolute; inset: 14%; border-radius: 50%; background: var(--surface); display: grid; place-items: center; align-content: center; gap: 2px; color: var(--navy); font-weight: 800; font-size: clamp(0.72rem, 2.4vw, 0.95rem); line-height: 1.25; padding: 4px; box-shadow: 0 2px 10px rgba(12, 65, 160, .08); }
.ring-in svg { width: 38%; transform: none; }
.step-n { font-size: 0.75rem; font-weight: 800; color: var(--brand); letter-spacing: .08em; }
.steps-note { text-align: center; color: var(--muted); font-size: 0.9rem; margin: 16px 0 0; }
.steps-cta { text-align: center; margin: 20px 0 0; }
.steps-cta .button { width: min(560px, 100%); }

/* photo cards (lessons): picture on top, blue gradient bar underneath */
.photo-cards { list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.photo-card { display: block; border-radius: 18px; overflow: hidden; background: var(--ring-3); color: #fff; text-decoration: none; box-shadow: var(--shadow); }
.pc-visual { position: relative; aspect-ratio: 16 / 9; background: var(--sky); }
.pc-visual .illo { height: 100%; }
.pc-badge { position: absolute; left: 12px; top: 12px; background: var(--btn-1); color: #fff; font-weight: 800; font-size: 0.85rem; padding: 4px 12px; border-radius: 8px; }
.pc-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; background: linear-gradient(90deg, var(--btn-1), var(--btn-2)); font-weight: 700; line-height: 1.35; }

/* scenes: navy caption pill */
.scene figcaption { background: var(--ring-3); color: #fff; }
.scene figcaption span { color: var(--ring-1); }

/* level strip */
.level-soon { background: var(--card); color: var(--muted); box-shadow: none; }

/* sticky "start" bar at the bottom, like the reference's trial button */
.sticky-cta { position: fixed; z-index: 20; left: 50%; transform: translateX(-50%); bottom: calc(10px + env(safe-area-inset-bottom, 0px)); width: min(640px, calc(100% - 24px)); display: grid; justify-items: center; gap: 0; padding: 9px 20px 11px; border-radius: 999px; color: #fff; text-decoration: none; background: linear-gradient(90deg, var(--cta-1), var(--cta-2)); box-shadow: 0 10px 24px rgba(19, 132, 143, .35); }
.sticky-cta small { font-size: 0.78rem; font-weight: 700; opacity: .95; }
.sticky-cta strong { font-size: 1.17rem; font-family: var(--font-display); }
body.has-sticky { padding-bottom: 88px; }
.q-start { background: linear-gradient(90deg, var(--btn-1), var(--btn-2)); color: #fff; }

/* Home landing page: one goal (the free workbook pack), one paid offer (audio). */
.play::before { content: ""; display: inline-block; width: 0; height: 0; border-style: solid; border-width: 7px 0 7px 11px; border-color: transparent transparent transparent currentColor; margin-right: 10px; vertical-align: -0.05em; }
.center { text-align: center; }
.get { scroll-margin-top: 80px; }
.get .kicker { margin-top: 32px; }
.get > h2 { text-align: center; }
.covers { list-style: none; padding: 0; margin: 24px 0 8px; display: grid; gap: 14px 8px; grid-template-columns: repeat(4, 1fr); }
@media (min-width: 560px) { .covers { gap: 18px 14px; } }
@media (max-width: 559px) { .cv-meta { display: none; } .cv-title { font-size: 0.72rem; } .covers img { margin-bottom: 4px; border-radius: 6px; } }
.covers li { display: grid; gap: 2px; text-align: center; }
.covers img { width: 100%; height: auto; border-radius: 10px; background: #fff; box-shadow: var(--shadow); margin-bottom: 8px; transition: transform .15s ease; }
.covers li:hover img { transform: translateY(-3px) rotate(-1deg); }
.cv-title { font-weight: 800; color: var(--navy); line-height: 1.3; }
.cv-meta { font-size: 0.85rem; color: var(--muted); }
.get .signup { margin-top: 24px; background: var(--surface); }
.videos { list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.video { display: grid; gap: 8px; text-decoration: none; color: var(--text); font-weight: 700; }
.v-thumb { position: relative; display: block; border-radius: 14px; overflow: hidden; aspect-ratio: 16 / 9; box-shadow: var(--shadow); }
.v-thumb img { width: 100%; height: 100%; object-fit: cover; }
.v-play { position: absolute; inset: 0; margin: auto; width: 52px; height: 52px; border-radius: 50%; background: linear-gradient(135deg, var(--btn-1), var(--btn-2)); box-shadow: 0 4px 14px rgba(0,0,0,.25); }
.v-play::after { content: ""; position: absolute; left: 21px; top: 16px; border-style: solid; border-width: 10px 0 10px 16px; border-color: transparent transparent transparent #fff; }
.video:hover .v-title { color: var(--brand); }
.plans-photo { border-radius: var(--radius); overflow: hidden; aspect-ratio: 2.8 / 1; margin: 28px 0 0; box-shadow: var(--shadow); }
.plans-photo .photo { border-radius: 0; object-position: center top; }
.plan-head { display: flex; align-items: center; gap: 12px; margin: 0; font-weight: 700; color: var(--navy); }
.paid-badge { display: inline-block; background: linear-gradient(90deg, var(--ring-3), var(--btn-2)); color: #fff; font-weight: 800; font-size: 0.8rem; letter-spacing: .06em; padding: 3px 12px; border-radius: 6px; }
.audio { display: grid; gap: 28px; align-items: center; margin-top: 56px; padding: clamp(20px, 4vw, 40px); border-radius: 24px; background: var(--surface); box-shadow: inset 0 0 0 2px var(--navy); }
@media (min-width: 820px) { .audio { grid-template-columns: 1.1fr 1fr; } }
.audio h2 { margin: 12px 0 8px; }
.audio-photo { border-radius: var(--radius); overflow: hidden; aspect-ratio: 3 / 2; box-shadow: var(--shadow); }
.audio-photo .photo { border-radius: 0; }
.audio-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin-bottom: 0; }
.checks { list-style: none; padding: 0; margin: 16px 0 20px; display: grid; gap: 8px; }
.checks li { position: relative; padding-left: 28px; }
.checks li::before { content: ""; position: absolute; left: 2px; top: .35em; width: 14px; height: 8px; border: solid var(--green); border-width: 0 0 3px 3px; transform: rotate(-45deg); }
.faq { display: grid; gap: 10px; max-width: 760px; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 0 18px; }
.faq summary { cursor: pointer; font-weight: 700; padding: 14px 0; color: var(--navy); }
.faq details p { margin: 0 0 16px; color: var(--muted); }
.dl-cover { width: 56px; height: auto; border-radius: 6px; box-shadow: var(--shadow); flex: none; }

/* ---- Design refresh: soft pastel gradients, arch photo, gradient pill buttons ---- */
body { overflow-x: clip; }
.button-cta, .site-header nav a.nav-cta, .sticky-cta { background: var(--grad-cta); box-shadow: 0 10px 24px rgba(90, 70, 220, .28); }
.button-cta { border-radius: 999px; }
.arrow-ne::after { content: "↗"; font-weight: 700; margin-left: 14px; font-size: 1.1em; line-height: 1; }
.cta-band { background: var(--grad-cool); }
.cta-band .button { background: #fff; color: #1b3f9a; box-shadow: 0 8px 20px rgba(0,0,0,.15); }

/* hero */
.hero-v2 { position: relative; isolation: isolate; grid-template-columns: 1fr; gap: 36px; padding: 40px 0 28px; }
.hero-v2::before { content: ""; position: absolute; z-index: -1; inset: 0 calc(50% - 50vw); background: var(--grad-page); }
.hero-v2::after { content: ""; position: absolute; z-index: -1; right: calc(50% - 50vw); bottom: 0; width: 100vw; height: 4px; background: var(--grad-cool); opacity: .9; }
@media (min-width: 900px) { .hero-v2 { grid-template-columns: 1.05fr 1fr; gap: 48px; padding: 64px 0 28px; } }
.dot-eyebrow { margin: 0; font-family: var(--font-display); font-weight: 800; font-size: 0.78rem; letter-spacing: .18em; text-transform: uppercase; color: var(--navy); }
.dot-eyebrow::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--magenta-2); margin-right: 10px; vertical-align: 0.1em; }
.hero-ja { margin: 14px 0 0; color: var(--muted); font-size: 0.95rem; letter-spacing: .06em; }
.hero-v2 h1 { font-family: var(--font-display); font-weight: 800; color: var(--ink-strong); font-size: clamp(2.5rem, 6.4vw, 4.1rem); line-height: 1.06; letter-spacing: -0.035em; margin: 0.35em 0 0.5em; }
.grad-text { background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; }
.swash { position: relative; display: inline-block; padding-bottom: 0.12em; }
.swash::after { content: ""; position: absolute; left: 0; right: -4%; bottom: -0.06em; height: 0.12em; border-radius: 50%; background: var(--swash); transform: rotate(-1.2deg); opacity: .9; }
.hero-v2 .lede { color: var(--muted); font-size: 1.08rem; line-height: 1.75; max-width: 30em; }
.hero-v2 .hero-actions { margin: 26px 0 10px; }
.hero-meta { margin: 0; font-size: 0.82rem; color: var(--muted); }
.hero-meta span { margin: 0 10px; }
.text-link { display: inline-block; margin-top: 22px; padding-bottom: 6px; border-bottom: 1.5px solid var(--ink-strong); color: var(--ink-strong); font-weight: 700; text-decoration: none; }
.text-link::after { content: "→"; margin-left: 22px; }
.text-link:hover { color: var(--brand); border-color: var(--brand); }

.hero-art { position: relative; max-width: 520px; width: 100%; justify-self: center; padding: 0 18px 44px 0; }
.arch { position: relative; aspect-ratio: 6 / 7; border-radius: 42% 22px 22px 22px / 30% 22px 22px 22px; overflow: hidden; box-shadow: 0 24px 50px rgba(30, 60, 140, .18); }
.arch::before { content: ""; position: absolute; }
.hero-art::before { content: ""; position: absolute; z-index: -1; top: 18px; right: 0; bottom: 64px; left: 18px; border-radius: 42% 26px 26px 26px / 30% 26px 26px 26px; background: var(--glass); box-shadow: inset 0 0 0 1px rgba(255,255,255,.8); }
.arch .photo { border-radius: 0; box-shadow: none; object-position: center 20%; }
.place-chip { position: absolute; top: 16px; right: 16px; background: var(--glass); backdrop-filter: blur(6px); color: var(--ink-strong); font-family: var(--font-display); font-weight: 800; font-size: 0.68rem; letter-spacing: .14em; text-transform: uppercase; padding: 7px 14px; border-radius: 999px; }
.place-chip::before { content: "◎"; margin-right: 6px; }
.caption-card { position: absolute; left: -6px; bottom: 0; margin: 0; display: grid; gap: 6px; padding: 18px 44px 16px 22px; background: var(--surface); border-radius: 4px; box-shadow: 0 16px 34px rgba(20, 40, 100, .18); transform: rotate(-2deg); }
.caption-card strong { font-size: clamp(1rem, 2.4vw, 1.3rem); color: var(--ink-strong); letter-spacing: .04em; }
.caption-card small { color: var(--muted); font-size: 0.78rem; }
.asterisk { position: absolute; right: 12px; top: -14px; font-size: 2.2rem; line-height: 1; color: var(--magenta-2); }
.vert { position: absolute; right: -26px; top: 50%; margin: 0; writing-mode: vertical-rl; transform: translateY(-50%); font-family: var(--font-display); font-weight: 700; font-size: 0.62rem; letter-spacing: .22em; text-transform: uppercase; color: var(--ink-strong); opacity: .75; }
@media (max-width: 1140px) { .vert { display: none; } }
.hero-foot { grid-column: 1 / -1; display: flex; justify-content: space-between; gap: 12px; font-family: var(--font-display); font-weight: 700; font-size: 0.66rem; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); padding-top: 8px; }
@media (max-width: 600px) { .hero-foot span:first-child { display: none; } }

/* soft gradient panels instead of flat pale blue */
.band { background: var(--grad-soft); }
.get .signup { box-shadow: inset 0 0 0 2px var(--cyan-line); border-radius: 20px; }

/* reference 1: bordered tool-list cards */
.tool-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
@media (min-width: 820px) { .tool-list { grid-template-columns: 1fr 1fr; } }
.tool-card { display: grid; grid-template-columns: 112px 1fr auto; align-items: center; gap: 16px; padding: 14px 18px 14px 14px; border-radius: 18px; background: var(--surface); border: 2px solid var(--cyan-line); color: var(--text); text-decoration: none; transition: transform .12s ease, box-shadow .12s ease; }
.tool-card:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(23, 149, 216, .18); }
.tc-thumb { position: relative; border-radius: 12px; overflow: hidden; aspect-ratio: 16 / 10; background: var(--card); }
.tc-thumb img { width: 100%; height: 100%; object-fit: cover; }
.tc-thumb .v-play { width: 30px; height: 30px; }
.tc-thumb .v-play::after { left: 12px; top: 9px; border-width: 6px 0 6px 9px; }
.tc-body { display: grid; gap: 4px; min-width: 0; }
.tc-title { font-family: var(--font-display); font-weight: 800; font-size: 1.08rem; color: var(--ink-strong); }
.tc-desc { font-size: 0.86rem; color: var(--muted); }
.new { display: inline-block; vertical-align: 0.15em; margin-left: 6px; padding: 1px 9px; border-radius: 999px; background: var(--cyan-line); color: #fff; font-size: 0.66rem; font-weight: 800; letter-spacing: .06em; }
.tool-card .chev { color: var(--cyan-line); }
.tool-card .chev::after { margin-left: 0; }
@media (max-width: 480px) { .tool-card { grid-template-columns: 84px 1fr auto; gap: 12px; } .tc-title { font-size: 0.98rem; } }

.audio { box-shadow: inset 0 0 0 2px var(--cyan-line); background: var(--grad-soft); }
.v-play { background: var(--grad-cta); }
.signup-form button { background: var(--grad-cta); border-radius: 999px; }

/* Video carousel: every video, scroll sideways (swipe on phones, arrows on desktop) */
.carousel { position: relative; }
.carousel .videos { display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 3 * 16px) / 4); grid-template-columns: none; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding: 0 2px; padding: 4px 2px 14px; scrollbar-width: thin; overscroll-behavior-x: contain; }
@media (max-width: 900px) { .carousel .videos { grid-auto-columns: calc((100% - 16px) / 2.3); } }
@media (max-width: 520px) { .carousel .videos { grid-auto-columns: 78%; } }
.carousel .videos li { scroll-snap-align: start; }
.v-meta { font-size: 0.82rem; font-weight: 500; color: var(--muted); margin-top: -4px; }
.v-new { position: absolute; top: 8px; left: 8px; margin: 0; }
.car-btn { position: absolute; top: calc(50% - 38px); z-index: 2; width: 44px; height: 44px; border-radius: 50%; border: 0; cursor: pointer; background: var(--surface); box-shadow: 0 6px 18px rgba(20, 40, 100, .2); display: grid; place-items: center; }
.car-btn::after { content: ""; width: 10px; height: 10px; border: solid var(--navy); border-width: 3px 3px 0 0; transform: rotate(45deg); margin-left: -4px; }
.car-prev { left: -18px; }
.car-prev::after { transform: rotate(-135deg); margin: 0 -4px 0 0; }
.car-next { right: -18px; }
.car-btn[hidden] { display: none; }
@media (hover: none) { .car-btn { display: none; } }
