:root {
  --navy-950: #040c1f;
  --navy-900: #061128;
  --navy-800: #0a1a3f;
  --navy-700: #12285c;
  --orange: #f47b20;
  --orange-2: #ff9a3c;
  --blue: #2a7de1;
  --surface: rgba(255, 255, 255, 0.06);
  --surface-strong: rgba(255, 255, 255, 0.12);
  --border: rgba(255, 255, 255, 0.10);
  --text: #f4f6fb;
  --text-dim: #a3afc7;
  --radius: 999px;
  --ease: cubic-bezier(.22, .8, .25, 1);
  --font: "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: radial-gradient(ellipse 90% 70% at 70% 30%, var(--navy-700) 0%, var(--navy-900) 55%, var(--navy-950) 100%) fixed, var(--navy-900);
  color: var(--text);
  font-family: var(--font);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior: none;
}
button { font: inherit; color: inherit; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.kicker { display: block; font-size: 11px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--orange-2); }

/* ——— Décor : réseau animé + halo de la page courante ——— */
.network { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; transition: opacity 1s; }
body.is-reading .network { opacity: .35; }
.ambient { position: fixed; inset: -10%; z-index: 0; pointer-events: none; opacity: 0; transition: opacity 1s; }
body.is-reading .ambient { opacity: .32; }
.ambient img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: blur(60px) saturate(1.3); transition: opacity 1.2s ease; opacity: 0; }
.ambient img.on { opacity: 1; }

/* ——— Boutons ——— */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 42px; padding: 0 18px;
  border-radius: var(--radius); border: 1px solid var(--border);
  font-size: 14px; font-weight: 600; text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background .2s, transform .15s, box-shadow .3s, opacity .2s;
}
.btn:active { transform: scale(.97); }
.btn-ghost { background: var(--surface); color: var(--text); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.btn-ghost:hover { background: var(--surface-strong); }
.btn-primary { background: linear-gradient(135deg, var(--orange-2), var(--orange)); color: #fff; border-color: transparent; box-shadow: 0 8px 24px rgba(244, 123, 32, .35); }
.btn-primary:hover { box-shadow: 0 10px 32px rgba(244, 123, 32, .55); }
.btn-lg { height: 52px; padding: 0 26px; font-size: 15px; }
.btn-lg svg { transition: transform .3s var(--ease); }
.btn-lg:hover svg { transform: translateX(3px); }
.btn.wide { width: 100%; margin-top: 12px; }

/* ——— Accueil ——— */
.intro {
  position: fixed; inset: 0; z-index: 10;
  overflow-y: auto; overflow-x: hidden;
  display: flex; align-items: center; justify-content: center;
  padding: max(24px, env(safe-area-inset-top)) 24px max(24px, env(safe-area-inset-bottom));
  transition: opacity .7s var(--ease), transform .9s var(--ease), visibility 0s .9s;
}
body.is-reading .intro { opacity: 0; transform: scale(1.06); visibility: hidden; pointer-events: none; }
body.is-intro .intro { transition-delay: 0s; }
.intro-inner {
  width: min(1180px, 100%); margin: auto;
  display: grid; grid-template-columns: 1.05fr .95fr; align-items: center; gap: 56px;
}
.eyebrow { display: inline-flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--text-dim); }
.eyebrow img { height: 25px; width: auto; }
.intro h1 {
  margin: 22px 0 18px;
  font-size: clamp(34px, 4.6vw, 62px); line-height: 1.04; font-weight: 800; letter-spacing: -.02em;
  text-transform: uppercase;
}
.intro h1 span { color: var(--orange); background: linear-gradient(90deg, var(--orange-2), var(--orange)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.lead { margin: 0; max-width: 470px; font-size: 17px; line-height: 1.6; color: var(--text-dim); }
.modes { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 26px 0 32px; }
.modes li { padding: 7px 14px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.modes li::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--orange); margin-right: 8px; vertical-align: 1px; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; }
.stats { display: grid; grid-template-columns: repeat(4, auto); justify-content: start; gap: 34px; margin: 44px 0 0; padding-top: 26px; border-top: 1px solid var(--border); }
.stats div { margin: 0; }
.stats dt { font-size: 28px; font-weight: 800; color: #fff; letter-spacing: -.01em; }
.stats dd { margin: 4px 0 0; font-size: 12px; color: var(--text-dim); }

.intro-cover {
  position: relative; justify-self: center;
  border: 0; padding: 0; background: none; cursor: pointer;
  perspective: 1600px;
  width: min(410px, 32vw);
}
.cover3d {
  display: block; position: relative;
  transform-style: preserve-3d;
  transform: rotateY(-16deg) rotateX(4deg);
  transition: transform .5s var(--ease);
  animation: float 7s ease-in-out infinite;
  border-radius: 3px 8px 8px 3px;
  box-shadow:
    1px 1px 0 #e9edf3, 2px 2px 0 #d6dce6, 3px 3px 0 #e9edf3, 4px 4px 0 #d6dce6, 5px 5px 0 #c9d0dc,
    30px 40px 60px rgba(0, 0, 0, .55);
}
.cover3d img { display: block; width: 100%; height: auto; border-radius: 3px 8px 8px 3px; }
.cover3d::before { /* reliure */
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5%;
  background: linear-gradient(90deg, rgba(0,0,0,.35), rgba(255,255,255,.12) 40%, rgba(0,0,0,.08));
  border-radius: 3px 0 0 3px; z-index: 1;
}
.gloss {
  position: absolute; inset: 0; border-radius: inherit; z-index: 2; pointer-events: none;
  background: linear-gradient(115deg, rgba(255,255,255,.22) 0%, rgba(255,255,255,0) 38%, rgba(255,255,255,0) 70%, rgba(255,255,255,.08) 100%);
  mix-blend-mode: screen;
}
.cover-shadow { position: absolute; left: 10%; right: 0; bottom: -40px; height: 40px; background: radial-gradient(ellipse at center, rgba(0,0,0,.5), transparent 70%); filter: blur(6px); }
.cover-hint {
  position: absolute; left: 50%; bottom: -64px; transform: translateX(-50%);
  font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--text-dim);
  white-space: nowrap; transition: color .3s;
}
.cover-hint::after { content: ""; display: block; height: 2px; margin-top: 8px; background: var(--orange); transform: scaleX(.3); transition: transform .4s var(--ease); }
.intro-cover:hover .cover-hint { color: #fff; }
.intro-cover:hover .cover-hint::after { transform: scaleX(1); }
@keyframes float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -10px; } }

.intro-copy > * { animation: rise .9s var(--ease) both; }
.intro-copy > :nth-child(2) { animation-delay: .08s; }
.intro-copy > :nth-child(3) { animation-delay: .16s; }
.intro-copy > :nth-child(4) { animation-delay: .24s; }
.intro-copy > :nth-child(5) { animation-delay: .32s; }
.intro-copy > :nth-child(6) { animation-delay: .4s; }
.intro-cover { animation: coverIn 1.2s var(--ease) .15s both; }
@keyframes coverIn { from { opacity: 0; transform: translateX(40px) rotate(2deg); } to { opacity: 1; transform: none; } }

/* ——— Lecteur ——— */
.reader {
  position: fixed; inset: 0; z-index: 5;
  display: flex; flex-direction: column;
  height: 100vh; height: 100dvh;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
  opacity: 0; visibility: hidden;
  transition: opacity .8s var(--ease) .15s, visibility 0s .9s;
}
body.is-reading .reader { opacity: 1; visibility: visible; transition-delay: .15s, 0s; }

.topbar { flex: none; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; padding: 14px 22px; }
.brand { display: flex; align-items: center; gap: 10px; border: 0; background: none; padding: 0; cursor: pointer; text-align: left; justify-self: start; min-width: 0; }
.brand img { height: 26px; width: auto; }
.brand-text { display: flex; flex-direction: column; min-width: 0; }
.brand-text strong { font-size: 14px; font-weight: 700; white-space: nowrap; }
.brand-text em { font-style: normal; font-size: 10.5px; color: var(--text-dim); letter-spacing: .14em; text-transform: uppercase; margin-top: 2px; }
.chapter { display: flex; align-items: center; gap: 12px; padding: 8px 18px 8px 8px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); max-width: 46vw; }
.chapter-num { display: grid; place-items: center; min-width: 30px; height: 26px; padding: 0 8px; border-radius: var(--radius); background: var(--orange); color: #fff; font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }
.chapter-title { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chapter.swap .chapter-title, .chapter.swap .chapter-num { animation: swap .45s var(--ease); }
@keyframes swap { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.top-actions { display: flex; gap: 8px; justify-self: end; }

.stage { position: relative; flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; }
.book-host { position: relative; transition: transform .7s var(--ease); }
.book-host > div { filter: drop-shadow(0 30px 50px rgba(0, 0, 0, .55)); }
.book-host .page { background: #fff; overflow: hidden; }
.book-host .page img { display: block; width: 100%; height: 100%; object-fit: contain; user-select: none; -webkit-user-drag: none; pointer-events: none; }
.book-host .page.--left::after, .book-host .page.--right::after { content: ""; position: absolute; top: 0; bottom: 0; width: 7%; pointer-events: none; }
.book-host .page.--left::after { right: 0; background: linear-gradient(to left, rgba(0,0,0,.18), transparent); }
.book-host .page.--right::after { left: 0; background: linear-gradient(to right, rgba(0,0,0,.18), transparent); }

/* zones cliquables */
.hs {
  position: absolute; z-index: 3; display: block; border-radius: 8px;
  outline: 2px solid transparent; outline-offset: 0;
  transition: background .25s, outline-color .25s;
  cursor: pointer;
}
.hs:hover, .hs:focus-visible { background: rgba(244, 123, 32, .14); outline-color: rgba(244, 123, 32, .9); }
.hs::after {
  content: attr(data-label);
  position: absolute; left: 50%; bottom: calc(100% + 6px); transform: translate(-50%, 4px);
  padding: 5px 10px; border-radius: 6px; background: var(--navy-900); color: #fff;
  font: 600 11px/1.2 var(--font); white-space: nowrap; pointer-events: none;
  opacity: 0; transition: opacity .2s, transform .2s;
}
.hs:hover::after, .hs:focus-visible::after { opacity: 1; transform: translate(-50%, 0); }
.hs.pulse { animation: hsPulse 1.6s ease-out 2; }
@keyframes hsPulse {
  0% { box-shadow: 0 0 0 0 rgba(244, 123, 32, .6); background: rgba(244, 123, 32, .18); }
  100% { box-shadow: 0 0 0 14px rgba(244, 123, 32, 0); background: transparent; }
}

.side-arrow {
  position: absolute; top: 50%; z-index: 5;
  width: 54px; height: 54px; margin-top: -27px;
  display: grid; place-items: center;
  border-radius: 50%; border: 1px solid var(--border);
  background: var(--surface); color: var(--text);
  cursor: pointer; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  transition: background .2s, opacity .3s, transform .15s, border-color .2s;
}
.side-arrow:hover:not(:disabled) { background: var(--orange); border-color: var(--orange); }
.side-arrow:active { transform: scale(.94); }
.side-arrow svg { width: 24px; height: 24px; }
.side-arrow.prev { left: 24px; }
.side-arrow.next { right: 24px; }
.side-arrow:disabled, .tb:disabled { opacity: .25; cursor: default; }

.loader { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; transition: opacity .5s; }
.loader img { height: 52px; width: auto; animation: float 3s ease-in-out infinite; }
.loader.done { opacity: 0; pointer-events: none; }
.loader-bar { width: 180px; height: 3px; background: var(--surface-strong); border-radius: 3px; overflow: hidden; }
.loader-bar span { display: block; height: 100%; width: 0; background: var(--orange); transition: width .3s; }
.loader-text { font-size: 13px; color: var(--text-dim); text-align: center; padding: 0 24px; max-width: 480px; line-height: 1.5; }
.loader.error .loader-text { color: #f2b8b5; }

/* ——— Dock : segments + barre d'outils ——— */
.dock { flex: none; display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 8px 16px 16px; }
.segments { display: flex; gap: 6px; width: min(520px, 92vw); }
.seg { position: relative; flex: 1; height: 18px; border: 0; padding: 0; background: none; cursor: pointer; }
.seg::before { content: ""; position: absolute; left: 0; right: 0; top: 7px; height: 4px; border-radius: 4px; background: rgba(255,255,255,.16); transition: background .3s, transform .2s; }
.seg.read::before { background: rgba(244, 123, 32, .45); }
.seg.active::before { background: var(--orange); }
.seg:hover::before { transform: scaleY(1.6); }
.seg-preview {
  position: absolute; left: 50%; bottom: calc(100% + 10px); transform: translate(-50%, 6px);
  width: 120px; padding: 6px; border-radius: 10px; background: #fff;
  box-shadow: 0 16px 40px rgba(0,0,0,.45);
  opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s var(--ease);
  color: var(--navy-900); text-align: left; z-index: 20;
}
.seg-preview img { display: block; width: 100%; aspect-ratio: 1055 / 1491; border-radius: 4px; background: #eee; object-fit: cover; }
.seg-preview b { display: block; margin: 6px 2px 2px; font-size: 11px; font-weight: 700; line-height: 1.3; }
.seg-preview b span { color: var(--orange); margin-right: 4px; }
@media (hover: hover) { .seg:hover .seg-preview { opacity: 1; transform: translate(-50%, 0); } }

.toolbar, .zoom-bar {
  display: flex; align-items: center; gap: 2px;
  padding: 6px; border-radius: var(--radius); border: 1px solid var(--border);
  background: rgba(6, 17, 40, .72);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 12px 34px rgba(0, 0, 0, .35);
}
.tb {
  width: 42px; height: 42px; display: grid; place-items: center; flex: none;
  border: 0; border-radius: 50%; background: transparent; cursor: pointer; color: var(--text);
  transition: background .2s, transform .15s, color .2s;
}
.tb:hover:not(:disabled) { background: var(--surface-strong); }
.tb:active:not(:disabled) { transform: scale(.92); }
.tb[aria-pressed="true"] .off, .tb[aria-pressed="false"] .on { display: none; }
.tb[aria-pressed="false"] { color: var(--text-dim); }
.counter { min-width: 74px; text-align: center; font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }
.sep { width: 1px; height: 22px; background: var(--border); margin: 0 4px; flex: none; }
.show-mobile { display: none !important; }

/* ——— Sommaire ——— */
.drawer-backdrop { position: fixed; inset: 0; z-index: 40; background: rgba(2, 6, 18, .55); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); animation: fade .25s ease; }
.drawer-backdrop[hidden] { display: none; }
.drawer {
  position: absolute; left: 0; top: 0; bottom: 0; width: min(420px, 92vw);
  background: linear-gradient(180deg, var(--navy-800), var(--navy-900));
  border-right: 1px solid var(--border);
  padding: calc(20px + env(safe-area-inset-top)) 20px 20px; overflow-y: auto;
  box-shadow: 30px 0 80px rgba(0,0,0,.5);
  animation: slideIn .4s var(--ease);
}
@keyframes slideIn { from { transform: translateX(-100%); } to { transform: none; } }
.drawer-head { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 18px; }
.drawer-head h2, .sheet-head h2 { margin: 4px 0 0; font-size: 22px; font-weight: 800; }
.toc-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.toc-item {
  display: block; width: 100%; border: 1px solid var(--border); border-radius: 12px; padding: 8px;
  background: var(--surface); cursor: pointer; text-align: left;
  transition: border-color .2s, transform .2s var(--ease), background .2s;
}
.toc-item:hover { transform: translateY(-3px); border-color: rgba(244, 123, 32, .6); }
.toc-item.active { border-color: var(--orange); background: rgba(244, 123, 32, .1); }
.toc-item img { display: block; width: 100%; aspect-ratio: 1055 / 1491; object-fit: cover; border-radius: 6px; background: #fff; }
.toc-item span { display: flex; gap: 8px; align-items: baseline; margin: 10px 4px 4px; font-size: 12.5px; font-weight: 600; line-height: 1.3; }
.toc-item span b { color: var(--orange); font-weight: 800; }

/* ——— Zoom ——— */
.zoom {
  position: fixed; inset: 0; z-index: 50;
  display: flex; flex-direction: column; align-items: center;
  background: rgba(3, 8, 20, .97);
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
  animation: fade .25s ease;
}
.zoom[hidden] { display: none; }
.zoom-stage { position: relative; flex: 1; width: 100%; overflow: hidden; touch-action: none; cursor: grab; }
.zoom-stage.dragging { cursor: grabbing; }
.zoom-stage img { position: absolute; left: 50%; top: 50%; transform-origin: center center; will-change: transform; user-select: none; -webkit-user-drag: none; box-shadow: 0 20px 60px rgba(0, 0, 0, .5); background: #fff; }
.zoom-stage img.animate { transition: transform .3s var(--ease); }
.zoom-bar { margin: 10px 0 16px; }
.zoom-hint { position: absolute; top: calc(16px + env(safe-area-inset-top)); left: 50%; transform: translateX(-50%); padding: 8px 14px; border-radius: var(--radius); background: rgba(255,255,255,.1); font-size: 13px; pointer-events: none; transition: opacity .6s; white-space: nowrap; }
.zoom-hint.gone { opacity: 0; }

/* ——— Panneaux (contact, partage) ——— */
.sheet-backdrop { position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center; background: rgba(2, 6, 18, .6); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); animation: fade .2s ease; }
.sheet-backdrop[hidden] { display: none; }
.sheet { width: min(440px, calc(100% - 32px)); background: linear-gradient(180deg, var(--navy-800), var(--navy-900)); border: 1px solid var(--border); border-radius: 22px; padding: 20px; box-shadow: 0 30px 80px rgba(0, 0, 0, .5); animation: rise .35s var(--ease); }
.sheet-head { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 16px; }
.contact-list { display: grid; gap: 8px; }
.contact-item { display: flex; align-items: center; gap: 14px; padding: 10px 12px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface); color: var(--text); text-decoration: none; transition: background .2s, border-color .2s, transform .2s var(--ease); }
.contact-item:hover { background: var(--surface-strong); border-color: rgba(244, 123, 32, .5); transform: translateX(3px); }
.contact-item strong { display: block; font-size: 14px; font-weight: 700; }
.contact-item em { display: block; font-style: normal; font-size: 12.5px; color: var(--text-dim); margin-top: 2px; }
.share-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.share-item { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 12px 4px; border-radius: 14px; border: 0; background: transparent; color: var(--text); font-size: 12px; font-weight: 500; text-decoration: none; text-align: center; cursor: pointer; transition: background .2s; }
.share-item:hover { background: var(--surface); }
.share-page { display: flex; align-items: center; gap: 10px; margin-top: 14px; padding: 12px; border-radius: 12px; background: var(--surface); font-size: 13px; cursor: pointer; }
.share-page input { accent-color: var(--orange); width: 18px; height: 18px; }
.ico { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; color: #fff; flex: none; }
.ico svg { width: 22px; height: 22px; }
.ico.wa { background: #25d366; }
.ico.li { background: #0a66c2; }
.ico.em { background: #5b6b8a; }
.ico.cp { background: #34405e; }
.ico.or { background: var(--orange); }
.ico.bl { background: var(--blue); }

.toast { position: fixed; left: 50%; bottom: calc(110px + env(safe-area-inset-bottom)); z-index: 70; transform: translate(-50%, 20px); opacity: 0; padding: 10px 18px; border-radius: var(--radius); background: #fff; color: var(--navy-900); font-size: 14px; font-weight: 600; transition: opacity .25s, transform .25s var(--ease); pointer-events: none; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes rise { from { transform: translateY(18px); opacity: 0; } to { transform: none; opacity: 1; } }

@media (max-width: 1200px) {
  .brand-text { display: none; }
}

/* ——— Tablette ——— */
@media (max-width: 980px) {
  .intro-inner { grid-template-columns: 1fr; gap: 40px; text-align: center; }
  .intro-cover { order: -1; width: min(300px, 56vw); }
  .cover-hint { display: none; }
  .lead { margin: 0 auto; }
  .modes, .cta { justify-content: center; }
  .stats { justify-content: center; }
  .chapter { max-width: 40vw; }
  .brand-text em { display: none; }
}

/* ——— Mobile ——— */
@media (max-width: 760px) {
  .intro { align-items: flex-start; padding-top: max(28px, env(safe-area-inset-top)); }
  .intro-inner { gap: 30px; }
  .intro-cover { width: min(230px, 58vw); }
  .cover3d { transform: rotateY(-12deg) rotateX(3deg); }
  .intro h1 { margin: 14px 0 12px; }
  .lead { font-size: 15px; }
  .modes { margin: 18px 0 22px; gap: 6px; }
  .modes li { padding: 6px 10px; font-size: 10.5px; }
  .cta .btn-lg { height: 50px; padding: 0 20px; }
  .stats { grid-template-columns: repeat(2, auto); gap: 18px 40px; margin-top: 30px; }
  .stats dt { font-size: 24px; }

  .topbar { grid-template-columns: auto 1fr auto; gap: 10px; padding: 10px 12px; }
  .brand-text { display: none; }
  .chapter { justify-self: center; max-width: 100%; padding: 6px 12px 6px 6px; gap: 8px; }
  .chapter-num { min-width: 26px; height: 22px; font-size: 11px; }
  .chapter-title { font-size: 12.5px; }
  .top-actions { gap: 6px; }
  .icon-mobile span { display: none; }
  .icon-mobile { width: 40px; height: 40px; padding: 0; }
  .hide-mobile { display: none !important; }
  .show-mobile { display: grid !important; }
  .side-arrow { display: none; }
  .dock { gap: 6px; padding: 4px 12px 12px; }
  .tb { width: 40px; height: 40px; }
  .counter { min-width: 54px; font-size: 12.5px; }
  .sep { margin: 0 2px; }
  .sheet-backdrop { align-items: flex-end; }
  .sheet { width: 100%; border-radius: 22px 22px 0 0; padding-bottom: calc(20px + env(safe-area-inset-bottom)); }
  .toc-list { gap: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
