
:root {
  --paper: #F6F4EE;
  --surface: #FFFEFA;
  --surface-muted: #EEEBE3;
  --ink: #17231E;
  --ink-soft: #4A564F;
  --ink-faint: #8A928C;
  --forest: #1F6B54;
  --forest-deep: #134536;
  --gold: #D4A574;
  --gold-soft: #F3E4D0;
  --hairline: #E6E2D8;
  --radius: 18px;
  --shadow-card: 0 1px 2px rgba(23,35,30,.05), 0 14px 40px -18px rgba(23,35,30,.18);
  --shadow-pop: 0 2px 6px rgba(23,35,30,.08), 0 28px 60px -24px rgba(19,69,54,.35);
  --serif: "Fraunces", "Iowan Old Style", Georgia, serif;
  --reading: "Literata", "Iowan Old Style", Georgia, "Noto Sans Georgian",
    "Noto Sans Armenian", "Noto Naskh Arabic", "Noto Sans Hebrew",
    "Noto Sans Thai", "Noto Sans JP", "Noto Sans KR", "Noto Sans SC", serif;
  --ui: ui-sans-serif, -apple-system, "SF Pro Text", "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
body {
  font-family: var(--ui);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  font-size: 16.5px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
/* Grid/flex items must be allowed to shrink below their content width. */
.hero-grid > *, .method-grid > *, .steps > *, .features > *,
.book-focus > *, .foot-grid > *, .cta-inner > *, .demo-col > * { min-width: 0; }
::selection { background: var(--gold-soft); }
img { max-width: 100%; display: block; }
a { color: var(--forest); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 4px; }
.wrap { max-width: 1140px; margin-inline: auto; padding-inline: 24px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.12; letter-spacing: -0.015em; text-wrap: balance; }
section { padding-block: 88px; }
.eyebrow {
  font-family: var(--ui); font-size: 12.5px; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--forest);
  display: flex; align-items: center; gap: 10px; margin-bottom: 18px;
}
.eyebrow::before { content: ""; width: 26px; height: 2px; background: var(--gold); border-radius: 2px; }
.section-head { max-width: 640px; margin-bottom: 48px; }
.section-head h2 { font-size: clamp(30px, 3.6vw, 42px); margin-bottom: 14px; }
.section-head p { color: var(--ink-soft); font-size: 18px; }

/* Header */
header.site {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--hairline);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: flex; align-items: center; gap: 11px; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand img { width: 34px; height: 34px; border-radius: 9px; box-shadow: 0 1px 4px rgba(23,35,30,.18); }
.brand-name { font-family: var(--serif); font-size: 21px; font-weight: 700; letter-spacing: -0.01em; }
.nav-links { display: flex; align-items: center; gap: 26px; font-size: 15px; font-weight: 500; }
.nav-links > a:not(.btn) { color: var(--ink-soft); }
.nav-links > a:not(.btn):hover { color: var(--ink); text-decoration: none; }
.nav-links > a.btn:hover { text-decoration: none; }
@media (max-width: 760px) { .nav-links > a:not(.btn) { display: none; } }

/* Buttons & badges */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  font-family: var(--ui); font-weight: 600; font-size: 16px;
  padding: 13px 24px; border-radius: 13px; border: 1px solid transparent;
  cursor: pointer; transition: transform .15s ease, background .15s ease, box-shadow .15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--forest); color: #fff; box-shadow: 0 8px 20px -10px rgba(19,69,54,.55); }
.btn-primary:hover { background: var(--forest-deep); }
.btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--hairline); }
.btn-ghost:hover { border-color: var(--gold); }
.btn-small { padding: 9px 18px; font-size: 14.5px; border-radius: 11px; }
.stores { display: flex; flex-wrap: wrap; gap: 12px; }
.store-badge {
  display: inline-flex; align-items: center; gap: 11px;
  background: var(--ink); color: #fff; border-radius: 13px; padding: 10px 18px 10px 14px;
  transition: transform .15s ease, box-shadow .15s ease; line-height: 1.15;
}
.store-badge:hover { text-decoration: none; transform: translateY(-1px); box-shadow: 0 10px 24px -12px rgba(23,35,30,.5); }
.store-badge svg { width: 26px; height: 26px; flex: none; }
.sb-top { display: block; font-size: 11px; opacity: .75; letter-spacing: .02em; }
.sb-name { display: block; font-size: 16.5px; font-weight: 600; }
.store-badge[aria-disabled="true"] { background: transparent; color: var(--ink-faint); border: 1px dashed var(--hairline); cursor: default; }
.store-badge[aria-disabled="true"]:hover { transform: none; box-shadow: none; }

/* Hero */
.hero { position: relative; overflow: hidden; padding-block: 84px 72px; }
.hero::before {
  content: ""; position: absolute; inset: -20% -10% auto auto;
  width: 640px; height: 640px; border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--gold-soft) 75%, transparent) 0%, transparent 65%);
  pointer-events: none;
}
.hero-grid { position: relative; display: grid; grid-template-columns: 1.04fr .96fr; gap: 56px; align-items: center; }
.hero h1 { font-size: clamp(40px, 5vw, 62px); margin-bottom: 22px; }
.hero h1 em { font-style: italic; color: var(--forest); }
.hero-sub { font-size: 19px; color: var(--ink-soft); max-width: 34em; margin-bottom: 30px; }
.hero-ctas { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-bottom: 22px; }
.hero-note { font-size: 14px; color: var(--ink-faint); }
.hero-chips { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 26px; }
.chip {
  font-size: 13.5px; font-weight: 600; color: var(--forest-deep);
  background: var(--surface); border: 1px solid var(--hairline);
  padding: 7px 14px; border-radius: 999px;
}
@media (max-width: 920px) {
  .hero-grid { grid-template-columns: 1fr; gap: 48px; }
  .hero { padding-block: 56px 48px; }
}

/* Phone demo */
.demo-col { display: grid; gap: 18px; justify-items: center; }
.demo-tabs { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.demo-tab {
  font-family: var(--ui); font-size: 13.5px; font-weight: 600; cursor: pointer;
  background: var(--surface); color: var(--ink-soft);
  border: 1px solid var(--hairline); border-radius: 999px; padding: 7px 14px;
  transition: all .15s ease;
}
.demo-tab:hover { border-color: var(--gold); color: var(--ink); }
.demo-tab[aria-selected="true"] { background: var(--forest); border-color: var(--forest); color: #fff; }
.phone {
  width: min(392px, 100%); background: var(--ink); border-radius: 46px;
  padding: 11px; box-shadow: var(--shadow-pop);
}
.screen {
  background: var(--surface); border-radius: 36px; padding: 26px 24px 18px;
  min-height: 540px; display: flex; flex-direction: column; overflow: hidden;
}
.screen-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.screen-title { font-family: var(--serif); font-weight: 600; font-size: 17px; }
.known-chip {
  flex: none; font-size: 11.5px; font-weight: 700; color: var(--forest-deep);
  background: var(--gold-soft); border-radius: 999px; padding: 4px 11px;
}
.screen-text {
  font-family: var(--reading); font-size: 20px; line-height: 2.05; flex: 1;
}
.w { border-radius: 7px; padding: 1px 3px; margin: -1px -1px; cursor: pointer; transition: background .12s ease, color .12s ease; }
.w:hover { background: var(--gold-soft); }
.w.met { text-decoration: underline dotted var(--gold); text-decoration-thickness: 2px; text-underline-offset: 5px; }
.w.hit { background: var(--forest); color: #fff; }
.w.speak { background: var(--gold); color: var(--ink); }
.sent { border-radius: 7px; transition: background .15s ease; }
.sent.hl, .sent.speaking { background: color-mix(in srgb, var(--gold-soft) 55%, transparent); }
.screen-hint { font-size: 12.5px; color: var(--ink-faint); margin-block: 10px 12px; }
.trans-bar {
  background: var(--paper); border: 1px solid var(--hairline); border-radius: 15px;
  padding: 13px 16px; margin-bottom: 12px; box-shadow: 0 6px 18px -10px rgba(23,35,30,.25);
}
.trans-word { font-family: var(--reading); font-size: 20px; font-weight: 600; color: var(--forest); }
.trans-gloss { font-size: 15.5px; }
.trans-roman { font-size: 13px; font-style: italic; color: var(--ink-faint); }
.trans-sent { font-size: 13.5px; color: var(--ink-soft); border-top: 1px solid var(--hairline); margin-top: 9px; padding-top: 9px; }
.screen-bottom { display: flex; align-items: center; justify-content: center; gap: 14px; font-size: 12.5px; color: var(--ink-faint); border-top: 1px solid var(--hairline); padding-top: 13px; }
.page-btn {
  font-size: 16px; width: 34px; height: 34px; border-radius: 10px; cursor: pointer;
  background: var(--surface); color: var(--ink-soft); border: 1px solid var(--hairline);
  display: inline-flex; align-items: center; justify-content: center; transition: all .15s ease;
}
.page-btn:hover:not(:disabled) { border-color: var(--gold); color: var(--ink); }
.page-btn:disabled { opacity: .35; cursor: default; }
.audio-btn { color: var(--forest); font-size: 13px; }
.tap-dot {
  position: absolute; width: 34px; height: 34px; border-radius: 50%;
  background: color-mix(in srgb, var(--gold) 55%, transparent);
  border: 2px solid var(--gold); pointer-events: none; opacity: 0; z-index: 5;
}
.tap-dot.play { animation: tap 1.1s ease forwards; }
@keyframes tap {
  0% { opacity: 0; transform: scale(.4); }
  30% { opacity: 1; transform: scale(1); }
  55% { transform: scale(.82); }
  80% { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(1.5); }
}

/* Bookshelf */
.shelf-band { background: var(--surface); border-block: 1px solid var(--hairline); padding-block: 64px; }
.shelf {
  display: flex; gap: 24px; overflow-x: auto; align-items: flex-start;
  padding: 18px 8px 22px; scroll-snap-type: x proximity; scrollbar-width: thin;
}
.shelf-item {
  flex: none; width: 148px; scroll-snap-align: center;
  display: flex; flex-direction: column; transition: transform .18s ease;
}
.shelf-item:hover { transform: translateY(-8px); text-decoration: none; }
.shelf-cover { position: relative; width: 148px; height: 222px; }
.shelf-cover img {
  width: 100%; height: 100%; aspect-ratio: 2/3; object-fit: cover; border-radius: 7px;
  box-shadow: 0 3px 6px rgba(23,35,30,.18), 0 16px 28px -14px rgba(23,35,30,.4);
}
/* Title typeset into the cover's intentionally-empty lower third —
   crisp HTML instead of AI-garbled lettering baked into the art. */
.shelf-title {
  position: absolute; left: 12px; right: 12px; bottom: 11px;
  font-family: var(--reading); font-weight: 600; font-size: 12px; line-height: 1.3;
  text-align: center; color: var(--ink);
  background: rgba(246,244,238,.88); border-radius: 6px; padding: 4px 6px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.shelf-lang {
  font-size: 11px; font-weight: 600; color: var(--ink-faint);
  margin-top: 9px; text-align: center; min-height: 15px;
}

/* Audiobook section */
.audio-mock {
  background: var(--surface); border: 1px solid var(--hairline); border-radius: 22px;
  padding: 32px; box-shadow: var(--shadow-card);
}
.audio-mock .am-text { font-family: var(--reading); font-size: 22px; line-height: 1.9; }
.audio-mock .am-text .g { background: var(--gold); border-radius: 7px; padding: 1px 4px; }
.am-controls { display: flex; align-items: center; gap: 14px; margin-top: 24px; }
.am-play {
  width: 46px; height: 46px; border-radius: 50%; flex: none;
  background: var(--forest); color: #fff; display: inline-flex;
  align-items: center; justify-content: center; font-size: 15px;
}
.am-track { flex: 1; height: 6px; border-radius: 3px; background: var(--surface-muted); position: relative; }
.am-track::before { content: ""; position: absolute; inset: 0 62% 0 0; border-radius: 3px; background: linear-gradient(90deg, var(--forest), var(--gold)); }
.am-time { font-size: 12.5px; color: var(--ink-faint); font-variant-numeric: tabular-nums; }
.am-speed { font-size: 12.5px; font-weight: 700; color: var(--forest); border: 1px solid var(--hairline); border-radius: 999px; padding: 4px 10px; }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr; } }
.step {
  background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--radius);
  padding: 30px 28px; box-shadow: var(--shadow-card);
}
.step-num { font-family: var(--serif); font-size: 15px; font-weight: 700; color: var(--gold); letter-spacing: .08em; }
.step h3 { font-size: 22px; margin-block: 10px 10px; }
.step p { color: var(--ink-soft); font-size: 15.5px; }
.step-demo {
  margin-top: 20px; background: var(--paper); border: 1px solid var(--hairline);
  border-radius: 12px; padding: 14px 16px; font-family: var(--reading); font-size: 16.5px;
}
.step-demo .k { background: var(--forest); color: #fff; border-radius: 6px; padding: 1px 5px; }
.step-demo .g { background: var(--gold); border-radius: 6px; padding: 1px 5px; }
.step-demo small { display: block; font-family: var(--ui); color: var(--ink-faint); font-size: 12px; margin-top: 7px; }

/* Ladder */
.method-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
@media (max-width: 860px) { .method-grid { grid-template-columns: 1fr; } }
.ladder { display: flex; align-items: flex-end; gap: 9px; min-height: 220px; }
.spine {
  flex: 1; border-radius: 7px 7px 3px 3px; position: relative; min-width: 34px;
  display: flex; flex-direction: column; justify-content: space-between; align-items: center;
  padding: 9px 4px; box-shadow: 0 6px 14px -8px rgba(19,69,54,.5);
}
.spine .lvl { font-size: 10.5px; font-weight: 700; color: rgba(255,255,255,.9); letter-spacing: .04em; }
.spine .ttl {
  writing-mode: vertical-rl; font-family: var(--reading); font-size: 11.5px;
  color: rgba(255,255,255,.85); max-height: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.method-points { list-style: none; display: grid; gap: 16px; margin-top: 26px; }
.method-points li { padding-left: 30px; position: relative; color: var(--ink-soft); }
.method-points li strong { color: var(--ink); }
.method-points li::before {
  content: ""; position: absolute; left: 0; top: 7px; width: 16px; height: 16px;
  border-radius: 50%; background: var(--gold-soft); border: 4px solid var(--gold);
}

/* Language grid */
.langs { display: grid; grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); gap: 14px; }
.lang-card {
  display: flex; align-items: center; gap: 13px;
  background: var(--surface); border: 1px solid var(--hairline); border-radius: 15px;
  padding: 15px 17px; color: var(--ink); transition: all .15s ease;
}
.lang-card:hover { text-decoration: none; border-color: var(--forest); transform: translateY(-2px); box-shadow: var(--shadow-card); }
.lang-flag { font-size: 26px; flex: none; }
.lang-card b { display: block; font-size: 15.5px; }
.lang-card span { display: block; font-size: 13px; color: var(--ink-faint); font-family: var(--reading); }
.lang-card .go { margin-left: auto; color: var(--gold); font-weight: 700; }

/* Feature grid */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
@media (max-width: 860px) { .features { grid-template-columns: 1fr; } }
.feature { background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--radius); padding: 26px; }
.feature svg { width: 26px; height: 26px; color: var(--forest); margin-bottom: 14px; }
.feature h3 { font-size: 19px; margin-bottom: 8px; }
.feature p { font-size: 15px; color: var(--ink-soft); }

/* Book focus (language pages) */
.book-focus {
  display: grid; grid-template-columns: 220px 1fr; gap: 44px; align-items: center;
  background: var(--surface); border: 1px solid var(--hairline); border-radius: 24px;
  padding: 40px; box-shadow: var(--shadow-card);
}
@media (max-width: 760px) { .book-focus { grid-template-columns: 1fr; justify-items: center; text-align: center; } }
.book-focus .bc-cover img { width: 100%; transform: none; }
.book-focus img { width: 220px; border-radius: 10px; box-shadow: 0 6px 12px rgba(23,35,30,.2), 0 24px 44px -18px rgba(23,35,30,.45); transform: rotate(-2deg); }
.book-focus h3 { font-size: 26px; margin-bottom: 12px; }
.book-focus p { color: var(--ink-soft); }
.book-stats { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 18px; }

/* FAQ */
.faq { max-width: 780px; }
.faq details { border-bottom: 1px solid var(--hairline); }
.faq summary {
  cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 20px;
  font-family: var(--serif); font-weight: 600; font-size: 19px; padding-block: 22px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--ui); font-size: 24px; color: var(--gold); transition: transform .2s ease; flex: none; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--ink-soft); padding-bottom: 24px; max-width: 62ch; }

/* CTA band */
.cta-band { padding-block: 24px 96px; }
.cta-inner {
  position: relative; overflow: hidden; background: var(--forest-deep); color: #fff;
  border-radius: 28px; padding: 72px 56px; display: grid; grid-template-columns: 1.3fr .7fr;
  gap: 40px; align-items: center;
}
@media (max-width: 820px) { .cta-inner { grid-template-columns: 1fr; padding: 52px 32px; } }
.cta-inner::after {
  content: ""; position: absolute; right: -120px; bottom: -160px; width: 420px; height: 420px;
  border-radius: 50%; background: radial-gradient(circle, rgba(212,165,116,.35), transparent 70%);
}
.cta-inner h2 { font-size: clamp(30px, 3.6vw, 44px); margin-bottom: 14px; }
.cta-inner h2 em { font-style: italic; color: var(--gold); }
.cta-inner p { color: rgba(255,255,255,.82); margin-bottom: 28px; max-width: 44ch; }
.cta-logo { justify-self: center; width: 150px; border-radius: 34px; box-shadow: 0 24px 60px -20px rgba(0,0,0,.55); }

/* Footer */
footer.site { border-top: 1px solid var(--hairline); background: var(--surface); padding-block: 52px; font-size: 14px; color: var(--ink-soft); }
.foot-grid { display: grid; grid-template-columns: 1.2fr 2fr; gap: 40px; }
@media (max-width: 760px) { .foot-grid { grid-template-columns: 1fr; } }
.foot-langs { columns: 3; gap: 24px; }
@media (max-width: 560px) { .foot-langs { columns: 2; } }
.foot-langs a, .foot-meta a { display: block; color: var(--ink-soft); padding-block: 3px; }
.foot-meta { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 16px; }

/* Legal */
.legal { max-width: 760px; padding-block: 64px; }
.legal h1 { font-size: 38px; margin-bottom: 8px; }
.legal .updated { color: var(--ink-faint); font-size: 14px; margin-bottom: 34px; }
.legal h2 { font-size: 23px; margin: 34px 0 10px; }
.legal p, .legal li { color: var(--ink-soft); }
.legal ul { padding-left: 22px; display: grid; gap: 8px; margin-block: 10px; }

/* Language-page hero flourish */
.lang-hero { position: relative; overflow: hidden; }
.lang-hero .glyph {
  position: absolute; right: -4%; top: 50%; transform: translateY(-52%);
  font-family: var(--reading); font-size: clamp(280px, 34vw, 460px); line-height: 1;
  color: var(--surface-muted); z-index: -1; user-select: none;
}
/* The flourish is sized for the two-column desktop hero; on the stacked
   mobile layout it lands mid-content as stray giant strokes — hide it. */
@media (max-width: 920px) { .lang-hero .glyph { display: none; } }

.crumbs { font-size: 13.5px; color: var(--ink-faint); padding-top: 26px; }
.crumbs a { color: var(--ink-soft); }
.crumbs span { margin-inline: 6px; color: var(--hairline); }
.page-head { padding-block: 26px 34px; }
.page-head > * { max-width: 820px; }
.page-head h1 { font-size: clamp(32px, 4.4vw, 50px); margin-bottom: 14px; }
.page-head .lede { font-size: 19px; color: var(--ink-soft); }
.page-head .meta { font-size: 14px; color: var(--ink-faint); margin-top: 12px; }
.sec { padding-block: 40px; }
.sec h2 { font-size: clamp(24px, 2.8vw, 32px); margin-bottom: 14px; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.card {
  display: flex; flex-direction: column; gap: 6px; background: var(--surface); color: var(--ink);
  border: 1px solid var(--hairline); border-radius: 16px; padding: 20px; transition: all .15s ease;
}
a.card:hover { text-decoration: none; border-color: var(--forest); transform: translateY(-2px); box-shadow: var(--shadow-card); }
.card b { font-family: var(--serif); font-size: 18px; font-weight: 600; line-height: 1.25; }
.card span, .card small { font-size: 14px; color: var(--ink-soft); }
.card .tag { align-self: flex-start; font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--forest); background: var(--gold-soft); border-radius: 999px; padding: 3px 10px; }
.card .big { font-family: var(--reading); font-size: 30px; line-height: 1.3; color: var(--forest-deep); }
.book-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 22px; }
.book-card { color: var(--ink); display: flex; flex-direction: column; gap: 8px; }
.book-card:hover { text-decoration: none; }
.bc-cover { position: relative; display: block; }
.bc-cover .shelf-title { font-size: clamp(11px, 1.1vw, 14px); bottom: 7%; left: 9%; right: 9%; }
.book-card img { width: 100%; aspect-ratio: 2/3; object-fit: cover; border-radius: 8px; box-shadow: 0 3px 6px rgba(23,35,30,.18), 0 16px 28px -14px rgba(23,35,30,.4); transition: transform .18s ease; }
.book-card:hover img { transform: translateY(-5px); }
.book-card b { font-family: var(--reading); font-size: 16px; line-height: 1.3; }
.book-card span { font-size: 13px; color: var(--ink-faint); }
.book-card .bc-cover .shelf-title { color: var(--ink); font-size: 12px; }
.pill { display: inline-block; font-size: 12px; font-weight: 700; border-radius: 999px; padding: 3px 10px; background: var(--surface-muted); color: var(--ink-soft); }
.pill.free { background: var(--gold-soft); color: var(--forest-deep); }
.pill.pro { background: var(--forest); color: #fff; }

/* Device-aware install UI */
.stores { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.store-alt { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.store-badges { display: flex; flex-wrap: wrap; gap: 10px; }
.qr-card { display: none; align-items: center; gap: 14px; background: var(--surface); color: var(--ink); border: 1px solid var(--hairline); border-radius: 16px; padding: 10px 18px 10px 10px; box-shadow: var(--shadow-card); max-width: 360px; }
.qr-card:hover { text-decoration: none; border-color: var(--gold); }
.qr-card img { width: 104px; height: 104px; border-radius: 8px; flex: none; }
.qr-card b { display: block; font-family: var(--serif); font-size: 18px; margin-bottom: 3px; }
.qr-card span span { display: block; font-size: 13.5px; color: var(--ink-soft); line-height: 1.4; }
.web-link { font-size: 14px; color: var(--ink-soft); text-decoration: underline; text-decoration-color: var(--gold); text-underline-offset: 3px; }
.cta-inner .web-link { color: rgba(255,255,255,.8); }
.qr-mini { display: none; align-items: center; gap: 10px; color: var(--ink-soft); }
.qr-mini img { width: 84px; height: 84px; border-radius: 6px; border: 1px solid var(--hairline); }
.qr-mini small { font-size: 13px; line-height: 1.35; }
html[data-device="desktop"] .qr-card { display: flex; }
html[data-device="desktop"] .qr-mini { display: inline-flex; }
html[data-device="desktop"] .mob-only { display: none; }
html[data-device="desktop"] .store-badges .store-badge { padding: 6px 12px 6px 10px; border-radius: 10px; }
html[data-device="desktop"] .store-badges .store-badge svg { width: 18px; height: 18px; }
html[data-device="desktop"] .store-badges .sb-name { font-size: 13.5px; }
html[data-device="desktop"] .store-badges .sb-top { font-size: 9.5px; }
html[data-device="android"] .sb-ios, html[data-device="ios"] .sb-play { display: none; }
html[data-device="android"] .store-badges .store-badge, html[data-device="ios"] .store-badges .store-badge { padding: 13px 26px 13px 20px; }
html:not([data-device="desktop"]) .desk-only { display: none; }

/* Article */
.article-grid { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 56px; align-items: start; }
@media (max-width: 980px) { .article-grid { grid-template-columns: 1fr; } .toc { display: none; } }
.prose { font-family: var(--reading); font-size: 18.5px; line-height: 1.75; max-width: 720px; }
.prose h2 { font-family: var(--serif); font-size: 29px; margin: 44px 0 14px; scroll-margin-top: 90px; }
.prose h3 { font-family: var(--serif); font-size: 22px; margin: 30px 0 10px; scroll-margin-top: 90px; }
.prose p, .prose ul, .prose ol, .prose blockquote, .prose .table-wrap { margin-bottom: 18px; }
.prose ul, .prose ol { padding-left: 24px; }
.prose li { margin-bottom: 6px; }
.prose a { text-decoration: underline; text-decoration-color: var(--gold); text-underline-offset: 3px; }
.prose blockquote { border-left: 3px solid var(--gold); padding: 4px 0 4px 18px; color: var(--ink-soft); font-style: italic; }
.prose code { font-family: ui-monospace, Menlo, monospace; font-size: .85em; background: var(--surface-muted); padding: 1px 6px; border-radius: 5px; }
.table-wrap { overflow-x: auto; }
.prose table, .data-table { width: 100%; border-collapse: collapse; font-family: var(--ui); font-size: 15px; background: var(--surface); border-radius: 12px; overflow: hidden; }
.prose th, .prose td, .data-table th, .data-table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--hairline); vertical-align: top; }
.prose th, .data-table th { background: var(--surface-muted); font-size: 12.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-soft); }
.toc { position: sticky; top: 92px; font-size: 14px; border-left: 2px solid var(--hairline); padding-left: 16px; }
.toc b { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-faint); margin-bottom: 10px; }
.toc a { display: block; color: var(--ink-soft); padding-block: 4px; line-height: 1.35; }
.app-cta {
  display: grid; grid-template-columns: auto 1fr; gap: 18px; align-items: center;
  background: var(--surface); border: 1px solid var(--hairline); border-left: 4px solid var(--forest);
  border-radius: 16px; padding: 20px 22px; margin-block: 28px; font-family: var(--ui);
}
.app-cta img { width: 64px; border-radius: 8px; }
.app-cta b { font-family: var(--serif); font-size: 18px; display: block; margin-bottom: 4px; }
.app-cta p { font-size: 15px; color: var(--ink-soft); margin: 0 0 10px; }
.app-cta .btns { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
@media (max-width: 560px) { .app-cta { grid-template-columns: 1fr; } }

/* Web reader (book chapters) */
.reader { max-width: 760px; background: var(--surface); border: 1px solid var(--hairline); border-radius: 22px; padding: clamp(22px, 4vw, 44px); box-shadow: var(--shadow-card); }
.reader-text { font-family: var(--reading); font-size: 22px; line-height: 2.05; }
.reader-text p { margin-bottom: 18px; }
.reader-text h2 { font-family: var(--reading); font-size: 26px; margin-bottom: 18px; }
.reader-text .w { border-radius: 6px; padding: 1px 2px; cursor: pointer; }
.reader-text .w:hover { background: var(--gold-soft); }
.reader-text .w.hit { background: var(--forest); color: #fff; }
.reader-text .s.on { background: color-mix(in srgb, var(--gold-soft) 60%, transparent); border-radius: 6px; }
.gloss-bar {
  position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 60;
  width: min(560px, calc(100% - 32px)); background: var(--ink); color: #fff; border-radius: 16px;
  padding: 14px 18px; box-shadow: 0 18px 50px -12px rgba(0,0,0,.5); font-family: var(--ui);
}
.gloss-bar[hidden] { display: none; }
.gloss-bar .gw { font-family: var(--reading); font-size: 22px; font-weight: 600; color: var(--gold); }
.gloss-bar .gr { font-size: 13px; font-style: italic; opacity: .7; }
.gloss-bar .gg { font-size: 16px; }
.gloss-bar .gs { font-size: 14px; opacity: .8; border-top: 1px solid rgba(255,255,255,.15); margin-top: 8px; padding-top: 8px; }
.gloss-bar button { position: absolute; top: 8px; right: 10px; background: none; border: 0; color: #fff; opacity: .6; font-size: 20px; cursor: pointer; }
.reader-tools { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 22px; font-size: 14px; }
.reader-tools label { display: inline-flex; align-items: center; gap: 6px; background: var(--paper); border: 1px solid var(--hairline); border-radius: 999px; padding: 6px 12px; cursor: pointer; }
.reader-text.show-trans .s::after { content: attr(data-t); display: block; font-family: var(--ui); font-size: 14px; color: var(--ink-faint); line-height: 1.5; margin: 2px 0 8px; }
.chapter-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 28px; flex-wrap: wrap; }
.toc-list { columns: 2; gap: 28px; list-style: none; font-size: 15px; }
@media (max-width: 640px) { .toc-list { columns: 1; } }
.toc-list li { padding: 6px 0; border-bottom: 1px solid var(--hairline); break-inside: avoid; display: flex; justify-content: space-between; gap: 10px; }
.toc-list li span { color: var(--ink-faint); font-size: 13px; }

/* Tools */
.tool { background: var(--surface); border: 1px solid var(--hairline); border-radius: 22px; padding: clamp(18px, 3vw, 32px); box-shadow: var(--shadow-card); }
.tool textarea, .tool input[type=text], .tool select {
  width: 100%; font: inherit; font-size: 18px; border: 1px solid var(--hairline); border-radius: 12px;
  padding: 12px 14px; background: var(--paper); color: var(--ink);
}
.tool textarea { min-height: 150px; resize: vertical; font-family: var(--reading); line-height: 1.6; }
.tool .out { font-family: var(--reading); font-size: 24px; line-height: 1.6; min-height: 60px; background: var(--paper); border: 1px dashed var(--hairline); border-radius: 12px; padding: 14px; word-break: break-word; }
.tool .row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-block: 12px; }
.tool label.lbl { display: block; font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-faint); margin: 14px 0 6px; }
.kbd { display: grid; gap: 6px; margin-top: 14px; }
.kbd-row { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; }
.kbd button { min-width: 44px; height: 48px; font-family: var(--reading); font-size: 21px; border: 1px solid var(--hairline); border-radius: 10px; background: var(--paper); cursor: pointer; color: var(--ink); }
.kbd button:hover { border-color: var(--gold); }
.kbd button.wide { min-width: 120px; font-family: var(--ui); font-size: 14px; }
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-block: 16px; }
.stat { background: var(--paper); border: 1px solid var(--hairline); border-radius: 14px; padding: 14px; }
.stat b { display: block; font-family: var(--serif); font-size: 30px; color: var(--forest-deep); }
.stat span { font-size: 13px; color: var(--ink-faint); }
.hl-rare { background: #f7d9c4; border-radius: 4px; }
.hl-mid { background: var(--gold-soft); border-radius: 4px; }
.vt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.vt-grid label { display: flex; gap: 8px; align-items: center; background: var(--paper); border: 1px solid var(--hairline); border-radius: 10px; padding: 9px 12px; font-family: var(--reading); font-size: 18px; cursor: pointer; }
.vt-grid input { width: 18px; height: 18px; accent-color: var(--forest); }
.letters { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.letter { background: var(--surface); border: 1px solid var(--hairline); border-radius: 14px; padding: 14px; }
.letter .ch { font-family: var(--reading); font-size: 40px; line-height: 1.2; color: var(--forest-deep); }
.letter .rm { font-weight: 700; }
.letter small { display: block; color: var(--ink-faint); font-size: 12.5px; line-height: 1.45; margin-top: 4px; }
.phrase-big { font-family: var(--reading); font-size: clamp(40px, 7vw, 72px); line-height: 1.25; color: var(--forest-deep); }
.say-btn { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; }
