/* Open Book website. Colours follow the app icon: night purple, golden page. */
:root {
  --bg: #fbf8f2; --fg: #2a2620; --muted: #6b6358; --accent: #6236a0; --accent-2: #8a5cd0; --line: #e4ddd0;
  --card: #ffffff; --vi: #4a4255; --soft: #f3ecff; --hl: #fff1c9;
  --night: #1d1036; --night-2: #2c1652; --gold: #ffd27a; --gold-2: #ffc24a; --page: #fff6dc;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --serif: Georgia, "Times New Roman", serif;
  --radius: 16px; --shadow: 0 10px 30px rgba(40, 20, 80, .10);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #17131f; --fg: #ece6db; --muted: #a9a1b4; --accent: #b293ec; --accent-2: #c9b1f5; --line: #342c42;
    --card: #211b2c; --vi: #c4bacf; --soft: #2a2140; --hl: #3d3216; --shadow: 0 10px 30px rgba(0, 0, 0, .35);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #17131f; --fg: #ece6db; --muted: #a9a1b4; --accent: #b293ec; --accent-2: #c9b1f5; --line: #342c42;
  --card: #211b2c; --vi: #c4bacf; --soft: #2a2140; --hl: #3d3216; --shadow: 0 10px 30px rgba(0, 0, 0, .35);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 72px; }
body { font-variant-numeric: lining-nums; margin: 0; background: var(--bg); color: var(--fg); font: 17px/1.6 var(--sans); overflow-wrap: break-word; overflow-x: clip; }
img { max-width: 100%; height: auto; }
a { color: var(--accent); }
h1, h2, h3 { font-family: var(--serif); line-height: 1.2; }
h2 { font-size: clamp(26px, 4vw, 38px); margin: 0 0 12px; }
h3 { font-size: 20px; margin: 0 0 6px; }
p { margin: 0 0 12px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--card); padding: 8px 12px; z-index: 50; }
.skip:focus { left: 8px; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--gold-2); outline-offset: 2px; border-radius: 6px; }
.i { width: 1.2em; height: 1.2em; vertical-align: -.22em; flex: none; }

/* Buttons */
.button { display: inline-flex; align-items: center; gap: 8px; background: var(--accent); color: #fff; text-decoration: none;
  padding: 11px 18px; border-radius: 12px; font: 600 16px var(--sans); border: 0; cursor: pointer;
  transition: transform .15s ease, box-shadow .2s ease, background .2s; }
.button:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(98, 54, 160, .3); }
.button.small { padding: 7px 14px; font-size: 15px; border-radius: 10px; }
.button.big { padding: 14px 22px; font-size: 17px; border-radius: 14px; }
.button.gold { background: linear-gradient(180deg, #ffe09a, var(--gold-2)); color: #2a1650; }
.button.gold:hover { box-shadow: 0 10px 30px rgba(255, 194, 74, .45); }
.button.ghost { background: rgba(255, 255, 255, .08); color: #fff; box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .45); }
.button.ghost-dark { background: transparent; color: var(--accent); box-shadow: inset 0 0 0 1.5px var(--accent); }

/* Top bar */
.topbar { position: sticky; top: 0; z-index: 30; background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid var(--line); }
.topbar-in { max-width: 1160px; margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: inline-flex; align-items: center; gap: 8px; font: 700 18px var(--serif); color: var(--fg); text-decoration: none; }
.brand img { border-radius: 7px; }
.topbar nav { display: flex; align-items: center; gap: 18px; font-size: 15px; }
.topbar nav a:not(.button) { color: var(--fg); text-decoration: none; opacity: .85; }
.topbar nav a:not(.button):hover { opacity: 1; color: var(--accent); }
.home .topbar { background: rgba(29, 16, 54, .9); border-bottom-color: rgba(255, 255, 255, .08); }
.home .topbar .brand, .home .topbar nav a:not(.button) { color: #f4ecff; }
.home .topbar .button { background: var(--gold); color: #2a1650; }
@media (max-width: 560px) { .hide-s { display: none !important; } .topbar nav { gap: 12px; } }

/* Hero */
.hero { position: relative; overflow: hidden; color: #f4ecff; isolation: isolate;
  background: radial-gradient(1200px 600px at 70% 30%, #4a2470 0%, var(--night-2) 40%, var(--night) 75%); }
.sky { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.beam { position: absolute; left: 50%; top: 18%; width: 60vw; height: 120%; transform-origin: top left;
  background: linear-gradient(180deg, rgba(255, 214, 140, .30), rgba(255, 214, 140, 0) 70%); filter: blur(6px);
  animation: beam 9s ease-in-out infinite alternate; }
.beam.b1 { transform: rotate(22deg); clip-path: polygon(0 0, 22% 0, 70% 100%, 20% 100%); }
.beam.b2 { transform: rotate(8deg); clip-path: polygon(0 0, 14% 0, 45% 100%, 10% 100%); animation-duration: 12s; opacity: .7; }
@keyframes beam { from { opacity: .55; } to { opacity: 1; } }
.dust { position: absolute; width: 4px; height: 4px; border-radius: 50%; background: #ffe6b0; opacity: 0;
  box-shadow: 0 0 8px 2px rgba(255, 214, 140, .6); animation: dust 14s linear infinite; }
@keyframes dust { 0% { transform: translateY(0); opacity: 0; } 15% { opacity: .9; } 85% { opacity: .6; } 100% { transform: translateY(-60vh); opacity: 0; } }
.d0 { left: 8%; top: 90%; } .d1 { left: 18%; top: 70%; animation-delay: -3s; } .d2 { left: 27%; top: 95%; animation-delay: -6s; }
.d3 { left: 36%; top: 80%; animation-delay: -9s; width: 3px; height: 3px; } .d4 { left: 46%; top: 100%; animation-delay: -1s; }
.d5 { left: 55%; top: 85%; animation-delay: -7s; } .d6 { left: 63%; top: 95%; animation-delay: -4s; width: 5px; height: 5px; }
.d7 { left: 71%; top: 75%; animation-delay: -11s; } .d8 { left: 79%; top: 92%; animation-delay: -2s; }
.d9 { left: 87%; top: 82%; animation-delay: -8s; width: 3px; height: 3px; } .d10 { left: 93%; top: 98%; animation-delay: -5s; }
.d11 { left: 4%; top: 60%; animation-delay: -10s; } .d12 { left: 50%; top: 65%; animation-delay: -12s; } .d13 { left: 66%; top: 55%; animation-delay: -13s; }
.hero-in { max-width: 1160px; margin: 0 auto; padding: 56px 16px 72px; display: grid; gap: 40px; align-items: center; }
@media (min-width: 920px) { .hero-in { grid-template-columns: 1.05fr .95fr; padding: 80px 24px 96px; } }
.eyebrow { font: 600 13px var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--accent); margin-bottom: 10px; }
.hero .eyebrow { color: var(--gold); }
.hero h1 { font-size: clamp(34px, 5.2vw, 58px); margin: 0 0 18px; letter-spacing: -.01em; }
.rotator { display: grid; margin-top: 6px; font-size: .8em; white-space: nowrap; }
.rot-word { grid-area: 1 / 1; background: linear-gradient(90deg, #ffe8b5, var(--gold-2) 60%, #ffb35c);
  -webkit-background-clip: text; background-clip: text; color: transparent; opacity: 0; transform: translateY(.4em);
  transition: opacity .6s ease, transform .6s ease; }
.rot-word.is-on { opacity: 1; transform: none; }
.lead { font-size: clamp(17px, 2vw, 20px); color: #e2d6f5; max-width: 34em; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin: 26px 0 14px; }
.hero-note { font-size: 14px; color: #bfaedb; }
.hero-visual { position: relative; display: flex; justify-content: center; min-height: 520px; }
.phone { position: relative; width: min(290px, 70vw); aspect-ratio: 1206 / 2622; border-radius: 46px; padding: 10px;
  background: linear-gradient(145deg, #3b3150, #0e0a16); z-index: 2;
  box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .12), 0 40px 80px rgba(0, 0, 0, .45), 0 0 120px rgba(255, 200, 110, .35);
  animation: bob 7s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-10px); } }
.phone-screen { position: relative; width: 100%; height: 100%; border-radius: 37px; overflow: hidden; background: var(--page); }
.shot { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 1s ease; }
.shot.is-on { opacity: 1; }
.float-cover { position: absolute; width: 110px; border-radius: 6px; box-shadow: 0 16px 40px rgba(0, 0, 0, .45);
  animation: float 8s ease-in-out infinite; z-index: 1; }
.fc1 { left: 2%; top: 6%; transform: rotate(-10deg); animation-delay: -1s; }
.fc2 { right: 2%; top: 2%; transform: rotate(8deg); animation-delay: -3s; width: 96px; }
.fc3 { left: 0; bottom: 10%; transform: rotate(6deg); animation-delay: -5s; width: 100px; }
.fc4 { right: 0; bottom: 4%; transform: rotate(-7deg); animation-delay: -2s; }
.fc5 { left: 20%; bottom: -2%; transform: rotate(-3deg); animation-delay: -6s; width: 84px; z-index: 3; }
@keyframes float { 50% { translate: 0 -14px; } }
@media (max-width: 919px) {
  .hero-visual { min-height: 0; padding: 8px 0 20px; }
  .float-cover { width: 76px; } .fc2 { width: 68px; } .fc3, .fc5 { display: none; }
}

/* Stats */
.stats { max-width: 1160px; margin: -36px auto 0; position: relative; z-index: 3; display: grid;
  grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); width: calc(100% - 32px); }
.stats div { background: var(--card); padding: 18px 16px; display: flex; flex-direction: column; gap: 2px; }
.stats b { font: 800 clamp(26px, 4vw, 36px) var(--sans); color: var(--accent); font-variant-numeric: lining-nums; }
.stats span { color: var(--muted); font-size: 14px; }
@media (min-width: 760px) { .stats { grid-template-columns: repeat(4, 1fr); } }

/* Sections */
.home main > section:not(.hero):not(.stats):not(.final):not(.readband) { max-width: 1160px; margin: 0 auto; padding: 80px 16px 0; }
.section-head { max-width: 720px; margin: 0 auto 32px; text-align: center; }
.section-head p:not(.eyebrow) { color: var(--muted); }
.section-head.left { text-align: left; margin: 0 0 28px; max-width: 760px; }

/* Demo: tap a word */
.demo { max-width: 820px; margin: 0 auto; background: var(--card); border-radius: 22px; padding: 28px 22px; box-shadow: var(--shadow);
  border: 1px solid var(--line); position: relative; }
.demo::before { content: "“"; position: absolute; top: -28px; left: 18px; font: 120px/1 var(--serif); color: var(--gold-2); opacity: .6; }
.demo-en { font: clamp(22px, 3vw, 30px)/1.55 var(--serif); margin: 0 0 16px; }
.w { background: none; border: 0; padding: 0 1px; margin: 0; font: inherit; cursor: pointer; border-radius: 6px;
  text-decoration: underline dotted color-mix(in srgb, var(--accent) 45%, transparent); text-underline-offset: 6px;
  transition: background .2s, color .2s; }
.w:hover { background: var(--soft); }
.w.hard { font-weight: 700; text-decoration: underline solid var(--gold-2); text-decoration-thickness: 3px; }
.w.on { background: var(--hl); color: var(--fg); }
.word-card { background: var(--soft); border-radius: 14px; padding: 14px 16px; margin: 0 0 16px; animation: pop .25s ease; }
.word-card p { margin: 0 0 4px; }
.wc-head b { font: 700 22px var(--serif); }
.wc-ipa { color: var(--muted); margin-left: 4px; }
.wc-lvl { font: 600 12px var(--sans); background: var(--accent); color: #fff; border-radius: 6px; padding: 1px 6px; margin-left: 4px; vertical-align: 2px; }
.wc-pos { color: var(--muted); font-size: 14px; }
.wc-vi { font-size: 19px; }
.wc-say { margin-top: 6px; background: none; border: 0; color: var(--accent); cursor: pointer; padding: 4px 0; font-weight: 600; }
@keyframes pop { from { opacity: 0; transform: translateY(6px) scale(.98); } }
.demo-vi { font: 19px/1.6 var(--serif); color: var(--vi); border-left: 3px solid var(--gold-2); padding-left: 14px; animation: pop .3s ease; }
.demo-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--bg); border-radius: 999px;
  padding: 8px 14px; cursor: pointer; min-height: 40px; font-size: 15px; transition: background .2s, border-color .2s; }
.chip:hover { border-color: var(--accent); }
.chip.playing { background: var(--accent); color: #fff; border-color: var(--accent); }
.demo-note { color: var(--muted); font-size: 14px; margin: 14px 0 0; }

/* Feature cards */
.cards { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; transition: transform .25s, box-shadow .25s; }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card p { color: var(--muted); margin: 0; }
.ic { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; margin-bottom: 14px; color: #2a1650;
  background: linear-gradient(135deg, #ffe7b3, var(--gold-2)); font-size: 22px; }

/* Steps */
.step-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 18px; counter-reset: s; }
@media (min-width: 760px) { .step-list { grid-template-columns: repeat(3, 1fr); } }
.step-list li { background: linear-gradient(180deg, var(--soft), transparent); border-radius: var(--radius); padding: 22px; }
.step-list p { color: var(--muted); margin: 0; }
.num { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--accent); color: #fff;
  font: 700 18px var(--serif); margin-bottom: 12px; }

/* Shelf */
.covers { list-style: none; padding: 0; margin: 0 0 24px; display: grid; gap: 22px 16px; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); }
@media (min-width: 900px) { .covers { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); } }
.covers li > a, .covers li > div { position: relative; display: flex; flex-direction: column; gap: 4px; color: var(--fg); text-decoration: none; }
.covers img { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 6px 10px 10px 6px; box-shadow: 0 8px 20px rgba(30, 15, 60, .2), inset 4px 0 0 rgba(0, 0, 0, .2);
  transition: transform .3s ease, box-shadow .3s ease; transform-origin: left center; }
.covers a:hover img { transform: perspective(600px) rotateY(-14deg) translateX(4px); box-shadow: 14px 14px 30px rgba(30, 15, 60, .3); }
.ct { font: 600 15px/1.3 var(--serif); margin-top: 6px; }
.cl { font-size: 13px; color: var(--muted); }
.tag { position: absolute; top: 8px; left: 8px; background: var(--gold); color: #2a1650; font: 700 12px var(--sans);
  padding: 3px 8px; border-radius: 999px; box-shadow: 0 2px 8px rgba(0, 0, 0, .2); }
.tag.soft { background: rgba(255, 255, 255, .92); color: #4a2c80; }
.premium-head { margin-top: 56px; }

/* Read band */
.readband { margin: 80px 0 0; background: linear-gradient(120deg, var(--accent), #8a4fc7 60%, #c26fb4); color: #fff; }
.readband-in { max-width: 1160px; margin: 0 auto; padding: 48px 16px; }
.readband p { color: #f1e7ff; }
.read-links { list-style: none; padding: 0; margin: 18px 0 0; display: flex; flex-wrap: wrap; gap: 10px; }
.read-links a { display: inline-block; padding: 9px 16px; border-radius: 999px; background: rgba(255, 255, 255, .14); color: #fff;
  text-decoration: none; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .3); transition: background .2s, transform .2s; }
.read-links a:hover { background: rgba(255, 255, 255, .26); transform: translateY(-2px); }

/* Final CTA */
.final { position: relative; overflow: hidden; isolation: isolate; color: #f4ecff;
  background: radial-gradient(900px 400px at 30% 0%, #4a2470, var(--night) 70%); }
.final-in { max-width: 1160px; margin: 0 auto; padding: 72px 16px; display: flex; flex-wrap: wrap; gap: 32px; align-items: center; justify-content: space-between; }
.final p { color: #d8c9f0; }
.qr { margin: 0; background: #fff; border-radius: 18px; padding: 14px 14px 8px; text-align: center; color: #2a1650; box-shadow: 0 0 60px rgba(255, 210, 122, .35); }
.qr img { display: block; width: 168px; height: 168px; image-rendering: pixelated; }
.qr figcaption { font-size: 13px; margin-top: 4px; }
.qr.small { padding: 8px 8px 4px; box-shadow: none; border: 1px solid var(--line); }
.qr.small img { width: 112px; height: 112px; }
@media (max-width: 700px) { .final .qr { display: none; } }

/* Footer */
.footer { border-top: 1px solid var(--line); margin-top: 0; }
.home .footer, .reader .footer, .index .footer, .doc .footer { margin-top: 0; }
.footer-in { max-width: 1160px; margin: 0 auto; padding: 32px 16px 40px; font-size: 15px; }
.footer nav { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 8px 0 14px; }
.brand-f { display: flex; align-items: center; gap: 8px; font-weight: 600; margin: 0; }
.brand-f img { border-radius: 6px; }
.fine { color: var(--muted); font-size: 13px; max-width: 760px; }

/* Reveal on scroll (only when JS runs) */
.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s ease, transform .7s ease; }
.js .reveal.in { opacity: 1; transform: none; }
.cards .reveal:nth-child(2), .covers .reveal:nth-child(4n+2), .step-list .reveal:nth-child(2) { transition-delay: .08s; }
.cards .reveal:nth-child(3), .covers .reveal:nth-child(4n+3), .step-list .reveal:nth-child(3) { transition-delay: .16s; }
.cards .reveal:nth-child(5), .covers .reveal:nth-child(4n) { transition-delay: .08s; }
.cards .reveal:nth-child(6) { transition-delay: .16s; }

/* Pages without the hero */
main { display: block; }
.index main, .doc main { max-width: 1080px; margin: 0 auto; padding: 32px 16px 64px; }
.crumbs { font-size: 14px; color: var(--muted); margin-bottom: 10px; }
.crumbs a { color: var(--muted); }
.read-grid { list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.read-grid a { display: flex; gap: 16px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px;
  color: var(--fg); text-decoration: none; transition: transform .2s, box-shadow .2s; height: 100%; }
.read-grid a:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.read-grid img { width: 92px; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 4px 8px 8px 4px; flex: none; }
.rg-body { display: flex; flex-direction: column; gap: 3px; position: relative; }
.rg-title { font: 700 19px/1.25 var(--serif); }
.rg-en, .rg-meta { color: var(--muted); font-size: 14px; }
.rg-body .tag { position: static; align-self: flex-start; margin-top: auto; }
.prose { max-width: 720px; margin: 0 auto; font-family: var(--serif); }
.prose h1 { font-size: 32px; }
.prose .meta { color: var(--muted); }
.prose .lang { border-top: 1px solid var(--line); margin-top: 48px; padding-top: 24px; }

/* Reader */
.reader main { max-width: 1080px; margin: 0 auto; padding: 28px 16px 120px; }
.book-head { display: grid; gap: 22px; align-items: start; margin-bottom: 8px; }
@media (min-width: 720px) { .book-head { grid-template-columns: 170px 1fr; } }
.book-cover { width: 104px; border-radius: 6px 12px 12px 6px; box-shadow: var(--shadow), inset 4px 0 0 rgba(0, 0, 0, .2); }
@media (min-width: 720px) { .book-cover { width: 170px; } }
.intro { max-width: 720px; font-family: var(--serif); }
.intro h1 { font-size: clamp(26px, 4vw, 34px); margin: 0 0 8px; }
.meta { color: var(--muted); font: 15px/1.5 var(--sans); margin: 0 0 16px; }
.toolbar { position: sticky; top: 56px; z-index: 10; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between;
  padding: 10px 0; margin: 16px 0 8px; background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.toolbar, .views, .listen { display: none; }
.js .toolbar, .js .views { display: flex; }
.js .listen { display: inline-flex; }
.views { gap: 6px; flex-wrap: wrap; font-size: 15px; }
.views button, .p-modes button { padding: 7px 14px; border: 1px solid var(--line); background: var(--card); border-radius: 999px; cursor: pointer; min-height: 38px; }
.views button[aria-pressed="true"], .p-modes button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
.listen { align-items: center; gap: 6px; padding: 8px 16px; border-radius: 999px; border: 0; cursor: pointer; min-height: 38px;
  background: linear-gradient(180deg, #ffe09a, var(--gold-2)); color: #2a1650; font-weight: 700; }
.reading { font: 18px/1.7 var(--serif); }
.pair { padding: 12px 10px; margin: 0 -10px; border-bottom: 1px solid var(--line); border-radius: 8px; transition: background .3s; scroll-margin: 140px 0 120px; }
.pair p { margin: 0; }
.pair [lang="vi"] { color: var(--vi); margin-top: 6px; }
.view-en .pair [lang="vi"], .view-vi .pair [lang="en"] { display: none; }
.view-vi .pair [lang="vi"] { margin-top: 0; }
@media (max-width: 819px) {
  .view-both .pair:not(.heading) [lang="vi"] { border-left: 3px solid var(--gold-2); padding-left: 12px; }
}
@media (min-width: 820px) {
  .view-both .pair { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
  .view-both .pair [lang="vi"] { margin-top: 0; }
  .view-en .reading, .view-vi .reading { max-width: 720px; }
}
.pair.heading { text-align: center; border: 0; padding-top: 28px; }
.pair.heading p { font-weight: 700; font-size: 22px; }
.pair.heading.h3 p, .pair.heading.h4 p { font-size: 19px; }
.pair.heading [lang="vi"] { color: var(--muted); font-size: 17px !important; font-weight: 400; }
.view-both .pair.heading { display: block; }
.view-both .pair.same [lang="vi"] { display: none; }
.view-vi .pair.heading [lang="vi"] { color: var(--fg); font-size: 22px !important; font-weight: 700; }
.pair.quote p { font-style: italic; padding-left: 18px; border-left: 3px solid var(--line); }
.pair.speaking { background: var(--hl); }
.pair.speaking [lang].now { text-decoration: underline 2px var(--gold-2); text-underline-offset: 4px; }
.js .player-on .pair { cursor: pointer; }
figure { margin: 18px auto; text-align: center; }
figure img { max-height: 540px; width: auto; border-radius: 4px; }
figcaption { color: var(--muted); font: 13px var(--sans); margin-top: 6px; }
a.ref { text-decoration: none; font-weight: 700; }
.notes { font-size: 15px; color: var(--muted); margin-top: 28px; }
.notes li { margin-bottom: 8px; }
.cta { background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 24px 22px; margin: 48px auto 0; max-width: 720px; box-shadow: var(--shadow); }
.cta h2 { font-size: 24px; margin: 0 0 8px; }
.cta ul { padding-left: 22px; margin: 8px 0 8px; }
.cta .cta-row { justify-content: space-between; margin-bottom: 0; }
.source { color: var(--muted); font: 14px/1.5 var(--sans); margin: 28px auto 0; max-width: 720px; }
.source.small { font-size: 13px; margin-top: 8px; }

/* Read-aloud bar */
.player { position: fixed; left: 50%; bottom: 14px; transform: translateX(-50%); z-index: 40; width: min(680px, calc(100% - 20px));
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; padding: 10px 12px; border-radius: 18px;
  background: color-mix(in srgb, var(--card) 92%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--line); box-shadow: 0 16px 40px rgba(20, 10, 40, .25); font-size: 15px; animation: pop .25s ease; }
.player[hidden] { display: none; }
.p-play { width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--accent); color: #fff; cursor: pointer; font-size: 15px; flex: none; }
.p-modes { display: flex; gap: 4px; flex-wrap: wrap; }
.p-modes button { min-height: 34px; padding: 5px 11px; font-size: 14px; }
.p-rate select { font: inherit; padding: 5px 6px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg); color: var(--fg); }
.p-close { margin-left: auto; border: 0; background: none; cursor: pointer; font-size: 18px; width: 36px; height: 36px; color: var(--muted); }
.p-msg { flex-basis: 100%; margin: 0; color: var(--muted); font-size: 13px; }
.p-msg:empty { display: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .js .reveal { opacity: 1; transform: none; }
  .dust { display: none; }
}
