/* =========================================================
   Descubre la magia de la Boccia — estilos
   Dirección: minimalista y editorial. Fondo neutro, la página
   del folleto como protagonista, tipografía clara y un único
   color de acento tomado del azul del PDF.
   ========================================================= */

:root {
  --scale: 1;

  --bg: #f5f6f8;
  --surface: #ffffff;
  --ink: #131a2c;
  --ink-2: #5a6377;
  --ink-3: #8b93a5;
  --line: #e4e7ec;
  --line-2: #d3d8e0;
  --accent: #2f4b85;
  --accent-2: #243b6b;
  --accent-soft: #eaf0fa;
  --mark: rgba(255, 205, 64, .28);
  --ok: #1f8a5b;
  --red: #d23a3a;
  --blue: #2557b0;

  --focus: #2f4b85;
  --shadow-page: 0 1px 2px rgba(16, 24, 40, .04), 0 30px 60px -30px rgba(16, 24, 40, .28);
  --shadow-dock: 0 1px 2px rgba(16, 24, 40, .05), 0 16px 40px -16px rgba(16, 24, 40, .3);

  --top-h: 4rem;
  --dock-h: 4.25rem;
  --dock-gap: 1.25rem;

  --font: 'Plus Jakarta Sans', 'Segoe UI', system-ui, -apple-system, Roboto, Arial, sans-serif;
  --font-display: 'DM Serif Display', Georgia, 'Times New Roman', serif;
  --ease: cubic-bezier(.16, 1, .3, 1);
  color-scheme: light;
}

html { font-size: calc(100% * var(--scale)); -webkit-text-size-adjust: 100%; }
*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  min-height: 100vh;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
svg { width: 1.25rem; height: 1.25rem; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
svg .fill, svg.fill { fill: currentColor; stroke: none; }
[hidden] { display: none !important; }

.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 1rem; top: -4rem; z-index: 100;
  background: var(--ink); color: #fff; padding: .7rem 1.1rem; border-radius: 10px;
  font-weight: 600; text-decoration: none; transition: top .2s;
}
.skip-link:focus { top: 1rem; }

:focus { outline: none; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 10px; }

/* ---------------- Barra superior ---------------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  height: var(--top-h);
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 0 clamp(1rem, 3vw, 2.25rem);
  background: rgba(245, 246, 248, .85);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
}
.brand { display: flex; align-items: center; gap: .75rem; min-width: 0; }
.brand-dots { display: inline-flex; gap: .2rem; }
.brand-dots .d { width: .6rem; height: .6rem; border-radius: 50%; display: block; }
.d--red { background: var(--red); }
.d--white { background: #fff; box-shadow: inset 0 0 0 1px var(--line-2); }
.d--blue { background: var(--blue); }
.brand-name { font-weight: 600; font-size: .95rem; letter-spacing: -.01em; color: var(--ink); white-space: nowrap; }

.topbar-right { display: flex; align-items: center; gap: .25rem; }
.counter {
  margin: 0 .5rem 0 0; font-size: .9rem; font-weight: 600; color: var(--ink-2);
  font-variant-numeric: tabular-nums; letter-spacing: .02em;
}
.divider { width: 1px; height: 1.25rem; background: var(--line-2); margin: 0 .5rem 0 0; }
.tbtn {
  display: inline-flex; align-items: center; gap: .45rem;
  height: 2.5rem; padding: 0 .85rem;
  border: 0; border-radius: 999px; background: transparent;
  color: var(--ink-2); font-weight: 500; font-size: .9rem;
  transition: background .2s, color .2s;
}
.tbtn:hover { background: rgba(19, 26, 44, .06); color: var(--ink); }
.tbtn[aria-pressed="true"] { background: var(--ink); color: #fff; }
a.tbtn { text-decoration: none; }
.tbtn--video { background: var(--accent-soft); color: var(--accent-2); font-weight: 600; }
.tbtn--video:hover { background: #dde7f7; color: var(--accent-2); }
.hc .tbtn--video { background: #ffe600; color: #000; border: 1px solid #ffe600; }

.progress-track { position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--line); }
.progress-fill { height: 100%; width: 0; background: var(--accent); transition: width .7s var(--ease); }

/* ---------------- Escenario ---------------- */
.stage {
  padding: 1.5rem clamp(1rem, 3vw, 2.25rem) calc(var(--dock-h) + var(--dock-gap) * 2 + env(safe-area-inset-bottom));
}
.screen {
  display: grid;
  grid-template-columns: minmax(0, auto) minmax(17rem, 25rem);
  justify-content: center;
  align-items: center;
  gap: clamp(1.5rem, 5vw, 4.5rem);
  max-width: 80rem; margin: 0 auto;
  min-height: calc(100vh - var(--top-h) - var(--dock-h) - var(--dock-gap) * 2 - 3rem);
  perspective: 1600px;
}
.page-col { display: flex; justify-content: center; min-width: 0; width: 100%; }
.view-text .screen { grid-template-columns: minmax(0, 46rem) minmax(17rem, 25rem); align-items: start; }
.page { margin: 0; width: 100%; display: flex; justify-content: center; }

.page-frame {
  --avail: calc(100vh - var(--top-h) - var(--dock-h) - var(--dock-gap) * 2 - 3rem);
  position: relative;
  width: min(100%, calc(var(--avail) * var(--arn, .707)));
  aspect-ratio: var(--ar, 1400 / 1980);
  background: #fff;
  border-radius: 6px;
  box-shadow: var(--shadow-page);
  overflow: hidden;
}
@supports (height: 100dvh) {
  .page-frame { --avail: calc(100dvh - var(--top-h) - var(--dock-h) - var(--dock-gap) * 2 - 3rem); }
}
.page-img { display: block; width: 100%; height: 100%; object-fit: contain; user-select: none; -webkit-user-drag: none; }
.zones { position: absolute; inset: 0; }

/* ---------------- Textos que se pueden tocar ---------------- */
/* Invisibles: la página se ve igual que el PDF. Al leer aparece
   un resaltado suave, como un marcador. */
.zone {
  position: absolute; padding: 0; margin: 0;
  background: transparent; border: 0; border-radius: 6px;
  -webkit-tap-highlight-color: transparent;
  cursor: pointer;
  transition: background-color .4s ease;
}
.zone:hover { background: rgba(255, 205, 64, .12); }
.zone:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; background: rgba(255, 205, 64, .16); }
.zone[aria-pressed="true"], .zone.is-reading { background: var(--mark); mix-blend-mode: multiply; }
.zone.is-reading { animation: reading 2.6s ease-in-out infinite; }
@keyframes reading {
  0%, 100% { background: rgba(255, 205, 64, .18); }
  50% { background: rgba(255, 205, 64, .32); }
}

/* ---------------- Panel de lectura ---------------- */
.panel { display: flex; flex-direction: column; gap: 1.5rem; align-self: center; }
.reader {
  padding-left: 1.25rem;
  border-left: 2px solid var(--accent);
  max-height: calc(100vh - var(--top-h) - var(--dock-h) - 16rem);
  overflow: auto;
}
.reader.pop { animation: fadeUp .45s var(--ease); }
@keyframes fadeUp { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.reader-kicker {
  margin: 0 0 .6rem; font-size: .75rem; font-weight: 600;
  letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3);
}
.reader-title {
  margin: 0 0 .75rem; font-family: var(--font-display); font-weight: 400;
  font-size: 2rem; line-height: 1.12; letter-spacing: -.005em; color: var(--ink);
}
.reader-text { margin: 0; font-size: 1.12rem; line-height: 1.7; color: var(--ink-2); }
.reader-source { margin: .9rem 0 0; font-size: .85rem; color: var(--ink-3); }
.reader-source a { color: var(--accent); font-weight: 600; }
.reader-hint { margin: 0; font-size: .875rem; color: var(--ink-3); }
.voice-status { margin: 0; font-size: .875rem; font-weight: 600; color: var(--accent); min-height: 1.3em; }
.voice-status:empty { display: none; }

/* Botones */
.cta { display: flex; flex-direction: column; align-items: flex-start; gap: .75rem; }
.btn-primary {
  display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
  height: 3.5rem; padding: 0 1.75rem;
  border: 0; border-radius: 999px;
  background: var(--ink); color: #fff;
  font-size: 1.05rem; font-weight: 600; letter-spacing: -.005em;
  transition: background .2s, transform .15s, box-shadow .2s;
  box-shadow: 0 10px 24px -12px rgba(19, 26, 44, .6);
}
.btn-primary:hover { background: var(--accent-2); }
.btn-primary:active { transform: scale(.97); }
.btn-primary svg { transition: transform .25s var(--ease); }
.btn-primary:hover svg { transform: translateX(3px); }
.btn-primary--sm { height: 2.75rem; padding: 0 1.4rem; font-size: .95rem; box-shadow: none; }
.btn-secondary, .btn-soft {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  height: 3rem; padding: 0 1.3rem;
  border: 1px solid var(--line-2); border-radius: 999px;
  background: var(--surface); color: var(--ink); font-weight: 600; font-size: .95rem;
  transition: border-color .2s, background .2s;
}
.btn-secondary:hover, .btn-soft:hover { border-color: var(--ink-3); }
.btn-text { border: 0; background: none; color: var(--ink-2); font-weight: 600; padding: .5rem .75rem; border-radius: 8px; }
.btn-text:hover { color: var(--ink); background: rgba(19, 26, 44, .05); }

.finish { display: flex; flex-direction: column; align-items: flex-start; gap: .9rem; }
.finish-badge svg { width: 3rem; height: 3rem; }
.finish-badge circle { fill: #e8f5ee; stroke: none; }
.finish-badge .check { stroke: var(--ok); stroke-width: 3.5; stroke-dasharray: 40; stroke-dashoffset: 40; animation: draw .7s .3s var(--ease) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.finish-text { margin: 0; font-family: var(--font-display); font-size: 1.6rem; line-height: 1.2; }

/* ---------------- Vista de texto ---------------- */
.textview {
  width: 100%; max-width: 46rem;
  background: var(--surface); border-radius: 12px; box-shadow: var(--shadow-page);
  padding: clamp(1.25rem, 4vw, 3rem);
  display: flex; flex-direction: column;
}
.tv-kicker { margin: 0 0 1rem; font-size: .75rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); }
.tv-block {
  display: grid; grid-template-columns: 1fr auto; gap: 1rem; align-items: start;
  padding: 1.1rem .75rem; margin: 0 -.75rem; border-radius: 10px;
  border-top: 1px solid var(--line);
  transition: background .3s;
}
.tv-block--titulo { border-top: 0; padding-top: 0; }
.tv-block.is-selected, .tv-block.is-reading { background: rgba(255, 205, 64, .16); }
.tv-title { margin: 0; font-family: var(--font-display); font-weight: 400; font-size: 2.2rem; line-height: 1.12; }
.tv-label { margin: 0 0 .25rem; font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-3); }
.tv-text { margin: 0; font-size: 1.2rem; line-height: 1.75; color: var(--ink); }
.tv-source { margin: .5rem 0 0; font-size: .85rem; word-break: break-all; }
.tv-source a { color: var(--accent); }
.tv-listen {
  display: inline-flex; align-items: center; gap: .4rem;
  height: 2.5rem; padding: 0 .9rem;
  border: 1px solid var(--line-2); border-radius: 999px; background: var(--surface);
  color: var(--ink-2); font-weight: 600; font-size: .85rem;
  transition: border-color .2s, color .2s;
}
.tv-listen:hover { border-color: var(--ink-3); color: var(--ink); }
.tv-listen svg { width: 1.1rem; height: 1.1rem; }

/* ---------------- Dock de controles ---------------- */
.dock {
  position: fixed; left: 50%; bottom: calc(var(--dock-gap) + env(safe-area-inset-bottom)); z-index: 30;
  transform: translateX(-50%);
  display: flex; align-items: center; gap: .375rem;
  padding: .375rem;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: var(--shadow-dock);
}
.dbtn {
  position: relative; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  height: 3.5rem; min-width: 3.5rem; padding: 0 1.35rem;
  border: 0; border-radius: 999px;
  font-weight: 600; font-size: .95rem; letter-spacing: -.005em;
  transition: background .2s, color .2s, transform .12s, opacity .2s;
}
.dbtn:active { transform: scale(.96); }
.dbtn--ghost { background: transparent; color: var(--ink); }
.dbtn--ghost:hover { background: rgba(19, 26, 44, .06); }
.dbtn[aria-disabled="true"] { opacity: .35; }
.dbtn[aria-disabled="true"]:hover { background: transparent; }

.dbtn--play { background: var(--accent-soft); color: var(--accent-2); min-width: 9.5rem; }
.dbtn--play:hover { background: #dde7f7; }
.dbtn--play .ico-play { display: none; }
.dbtn--play.is-paused .ico-play { display: block; }
.dbtn--play.is-paused .ico-pause { display: none; }
.is-speaking .dbtn--play::after {
  content: ''; position: absolute; right: .9rem; top: 50%; width: .4rem; height: .4rem; margin-top: -.2rem;
  border-radius: 50%; background: var(--red); animation: dot 1.4s ease-in-out infinite;
}
@keyframes dot { 50% { opacity: .25; } }

.dbtn--next { background: var(--ink); color: #fff; padding-inline: 1.5rem 1.2rem; }
.dbtn--next:hover { background: var(--accent-2); }
.dbtn--next.is-start { background: var(--accent); }
.dbtn--next > * { position: relative; }
/* Barra que se llena antes del avance automático */
.advance-bar {
  position: absolute !important; inset: 0; z-index: 0;
  background: rgba(255, 255, 255, .18);
  transform: scaleX(0); transform-origin: left center;
}
.dbtn--next.is-advancing .advance-bar { animation: advance 1.6s linear forwards; }
@keyframes advance { to { transform: scaleX(1); } }

/* ---------------- Diálogos ---------------- */
.dialog {
  width: min(32rem, calc(100vw - 1.5rem)); max-height: calc(100vh - 2rem);
  padding: 0; border: 0; border-radius: 20px;
  background: var(--surface); color: var(--ink);
  box-shadow: 0 30px 80px -24px rgba(16, 24, 40, .45);
}
.dialog::backdrop { background: rgba(19, 26, 44, .35); backdrop-filter: blur(4px); }
.dialog[open] { animation: dlg .35s var(--ease); }
@keyframes dlg { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }
.dialog-inner { padding: 1.5rem 1.6rem 1.4rem; }
.dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.dialog-head h2 { margin: 0; font-size: 1.35rem; font-weight: 700; letter-spacing: -.015em; }
.dialog-close {
  width: 2.5rem; height: 2.5rem; border-radius: 50%; border: 0; background: var(--bg);
  display: grid; place-items: center; color: var(--ink-2);
}
.dialog-close:hover { color: var(--ink); background: var(--line); }
.dialog-foot { display: flex; justify-content: space-between; align-items: center; gap: .75rem; margin-top: 1.5rem; }
.dialog-foot:has(> :only-child) { justify-content: flex-end; }
.field-group { border: 0; margin: 0 0 1.25rem; padding: 0; }
.field-group legend {
  font-size: .72rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
  color: var(--ink-3); margin-bottom: .35rem; padding: 0;
}
.field { display: block; margin: .9rem 0; }
.field-label { display: flex; justify-content: space-between; font-weight: 500; font-size: .95rem; margin-bottom: .4rem; }
.field-label output { color: var(--ink-3); font-weight: 500; }
.field-note { margin: .25rem 0 .5rem; font-size: .82rem; color: var(--ink-3); }
.field select {
  width: 100%; height: 2.9rem; padding: 0 .8rem;
  border: 1px solid var(--line-2); border-radius: 10px; background: #fff;
}
.field input[type="range"] { width: 100%; accent-color: var(--accent); }

/* Interruptores */
.switch {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .8rem 0; border-bottom: 1px solid var(--line); font-size: .95rem; font-weight: 500; cursor: pointer;
}
.switch small { display: block; font-weight: 400; font-size: .8rem; color: var(--ink-3); }
.switch input {
  appearance: none; -webkit-appearance: none; flex: none; margin: 0;
  width: 2.75rem; height: 1.6rem; border-radius: 999px; background: var(--line-2);
  position: relative; cursor: pointer; transition: background .2s;
}
.switch input::after {
  content: ''; position: absolute; top: .2rem; left: .2rem; width: 1.2rem; height: 1.2rem; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .25s var(--ease);
}
.switch input:checked { background: var(--accent); }
.switch input:checked::after { transform: translateX(1.15rem); }
.switch input:disabled { opacity: .4; }
.switch input:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

.seg { display: inline-flex; gap: .25rem; padding: .25rem; background: var(--bg); border-radius: 999px; }
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.seg span {
  display: grid; place-items: center; width: 2.75rem; height: 2.5rem;
  border-radius: 999px; font-weight: 600; color: var(--ink-2); transition: background .2s, color .2s;
}
.seg label:nth-child(1) span { font-size: .85rem; }
.seg label:nth-child(2) span { font-size: 1rem; }
.seg label:nth-child(3) span { font-size: 1.15rem; }
.seg label:nth-child(4) span { font-size: 1.3rem; }
.seg input:checked + span { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(16, 24, 40, .12); }
.seg input:focus-visible + span { outline: 3px solid var(--focus); }

.help-list { margin: 0; padding: 0; list-style: none; counter-reset: h; display: grid; gap: .9rem; }
.help-list li { counter-increment: h; display: grid; grid-template-columns: 1.9rem 1fr; gap: .75rem; align-items: start; font-size: 1rem; color: var(--ink-2); }
.help-list li::before {
  content: counter(h); display: grid; place-items: center; width: 1.9rem; height: 1.9rem; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent-2); font-weight: 700; font-size: .85rem;
}
.help-list strong { color: var(--ink); font-weight: 600; }
kbd {
  display: inline-block; min-width: 1.7em; padding: 0 .35rem; text-align: center;
  border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 6px; background: var(--bg);
  font-family: inherit; font-size: .85em;
}
.noscript { padding: 2rem; font-size: 1.25rem; }

/* ---------------- Transiciones de página ---------------- */
.page-col, .panel { will-change: transform, opacity; }
.leave-next .page-col { animation: pageOutNext .32s cubic-bezier(.55, 0, .75, .3) forwards; transform-origin: left center; }
.leave-prev .page-col { animation: pageOutPrev .32s cubic-bezier(.55, 0, .75, .3) forwards; transform-origin: right center; }
.leave-next .panel, .leave-prev .panel { animation: panelOut .25s ease-in forwards; }
.enter-next .page-col { animation: pageInNext .75s var(--ease) both; transform-origin: right center; }
.enter-prev .page-col { animation: pageInPrev .75s var(--ease) both; transform-origin: left center; }
.enter-next .panel, .enter-prev .panel { animation: panelIn .6s .15s var(--ease) both; }
@keyframes pageOutNext { to { opacity: 0; transform: translateX(-5%) rotateY(10deg) scale(.95); filter: blur(3px); } }
@keyframes pageOutPrev { to { opacity: 0; transform: translateX(5%) rotateY(-10deg) scale(.95); filter: blur(3px); } }
@keyframes pageInNext {
  from { opacity: 0; transform: translateX(7%) rotateY(-12deg) scale(.96); filter: blur(4px); }
  60% { filter: blur(0); }
  to { opacity: 1; transform: none; filter: none; }
}
@keyframes pageInPrev {
  from { opacity: 0; transform: translateX(-7%) rotateY(12deg) scale(.96); filter: blur(4px); }
  60% { filter: blur(0); }
  to { opacity: 1; transform: none; filter: none; }
}
@keyframes panelOut { to { opacity: 0; transform: translateY(8px); } }
@keyframes panelIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

.no-anim *, .no-anim *::before, .no-anim *::after { animation: none !important; transition: none !important; }
.no-anim .finish-badge .check { stroke-dashoffset: 0; }

/* ---------------- Alto contraste ---------------- */
.hc {
  --bg: #000; --surface: #000; --ink: #fff; --ink-2: #fff; --ink-3: #fff;
  --line: #fff; --line-2: #fff; --accent: #ffe600; --accent-2: #ffe600; --accent-soft: #000; --focus: #ffe600;
}
.hc body, .hc .topbar { background: #000; }
.hc .topbar { border-bottom: 1px solid #fff; }
.hc .dock, .hc .textview, .hc .dialog { background: #000; border: 2px solid #fff; box-shadow: none; }
.hc .reader-title, .hc .tv-title, .hc .finish-text { color: #ffe600; }
.hc .tbtn, .hc .dbtn--ghost, .hc .btn-secondary, .hc .btn-soft, .hc .tv-listen, .hc .dialog-close, .hc .field select { background: #000; color: #fff; border: 1px solid #fff; }
.hc .tbtn[aria-pressed="true"], .hc .dbtn--next, .hc .dbtn--play, .hc .btn-primary, .hc .seg input:checked + span, .hc .switch input:checked {
  background: #ffe600; color: #000;
}
.hc .seg { background: #000; border: 1px solid #fff; }
.hc .progress-fill { background: #ffe600; }
.hc .help-list li::before { background: #ffe600; color: #000; }
.hc .zone:hover, .hc .zone[aria-pressed="true"], .hc .zone.is-reading, .hc .zone:focus-visible { background: rgba(255, 230, 0, .3); mix-blend-mode: normal; }
.hc .tv-block.is-selected, .hc .tv-block.is-reading { background: #222; outline: 2px solid #ffe600; }
.hc .page-frame { box-shadow: 0 0 0 2px #fff; }
.hc .finish-badge circle { fill: #000; }

/* ---------------- Pantallas medianas y pequeñas ---------------- */
@media (max-width: 960px) {
  .screen { grid-template-columns: 1fr; min-height: 0; gap: 1.75rem; }
  .view-text .screen { grid-template-columns: 1fr; }
  .page-frame { width: min(100%, 34rem); }
  .panel { align-self: stretch; max-width: 34rem; width: 100%; margin: 0 auto; }
  .reader { max-height: none; }
  .view-text .reader { display: none; }
}
@media (max-width: 640px) {
  :root { --top-h: 3.5rem; --dock-h: 3.75rem; --dock-gap: .75rem; }
  .topbar { padding: 0 .75rem; }
  .brand-name { display: none; }
  .tbtn { width: 2.75rem; height: 2.75rem; padding: 0; justify-content: center; }
  .tbtn svg { width: 1.35rem; height: 1.35rem; }
  .tbtn-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .stage { padding-top: 1rem; padding-inline: .75rem; }
  .dock { left: .75rem; right: .75rem; transform: none; justify-content: space-between; }
  .dbtn { height: 3.1rem; padding: 0 .9rem; font-size: .88rem; flex: 1 1 0; min-width: 0; }
  .dbtn--play { min-width: 0; flex: 1.2 1 0; }
  .dbtn--next { padding-inline: .6rem .45rem; gap: .2rem; flex: 1.2 1 0; }
  .dbtn { gap: .3rem; }
  .dbtn svg { width: 1.1rem; height: 1.1rem; }
  .is-speaking .dbtn--play::after { display: none; }
  .reader-title { font-size: 1.6rem; }
  .tv-block { grid-template-columns: 1fr; }
  .tv-listen { justify-self: start; }
}
@media (max-width: 360px) {
  .dbtn--ghost span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .dbtn--ghost { flex: 0 0 3.1rem; padding: 0; }
}
