:root{
  color-scheme:dark;
  --bg:#061b15;
  --panel:#09271d;
  --panel-soft:#0b2b20;
  --line:rgba(196,166,86,.30);
  --line-strong:rgba(205,177,96,.52);
  --gold:#c9ad60;
  --gold-light:#ddc879;
  --text:#ece8dc;
  --muted:#9faea6;
  --cover:#6f4c35;
  --cover-deep:#493121;
}
*{box-sizing:border-box}
html,body{margin:0;min-height:100%;background:var(--bg);color:var(--text)}
body{font-family:Georgia,"Times New Roman",serif;overflow:hidden}
button,a,input{font:inherit}
button{color:inherit}
.book-viewer{height:100dvh;display:grid;grid-template-rows:auto minmax(0,1fr) auto;background:
  radial-gradient(circle at 50% 12%,rgba(194,164,83,.055),transparent 32%),
  linear-gradient(180deg,#08241b 0%,#061b15 55%,#051711 100%)}
.book-toolbar{position:relative;display:grid;grid-template-columns:minmax(150px,1fr) minmax(300px,1.35fr) minmax(470px,1.2fr);align-items:center;gap:24px;padding:16px clamp(18px,3vw,48px);border-bottom:1px solid var(--line);background:rgba(5,24,18,.93);backdrop-filter:blur(14px)}
.book-back{justify-self:start;color:var(--gold-light);text-decoration:none;font:650 12px/1.1 Inter,ui-sans-serif,system-ui,sans-serif;letter-spacing:.04em;text-transform:uppercase;display:flex;align-items:center;gap:9px}
.book-back span{color:#d7d4ca}
.book-title-wrap{text-align:center;min-width:0}
.book-kicker{margin:0 0 4px;color:var(--gold);font:700 9px/1.1 Inter,ui-sans-serif,system-ui,sans-serif;letter-spacing:.16em;text-transform:uppercase}
.book-title-wrap h1{margin:0;font-size:clamp(16px,1.55vw,23px);line-height:1.15;font-weight:500;letter-spacing:-.01em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.book-toolbar-actions{justify-self:end;display:flex;align-items:center;gap:7px;font-family:Inter,ui-sans-serif,system-ui,sans-serif}
.book-toolbar-actions button,.book-download,.book-footer button{border:1px solid var(--line);background:rgba(8,38,28,.54);color:#dcd8cc;cursor:pointer;transition:border-color .18s ease,background .18s ease,color .18s ease,transform .18s ease}
.book-toolbar-actions button:hover,.book-download:hover,.book-footer button:hover{border-color:var(--line-strong);background:rgba(15,50,38,.72);color:#f0eadb}
.book-toolbar-actions button:active,.book-download:active,.book-footer button:active{transform:scale(.98)}
.book-toolbar-actions button{height:34px;min-width:34px;padding:0 10px;font-size:11px;letter-spacing:.025em}
.book-download{height:34px;display:inline-flex;align-items:center;justify-content:center;gap:5px;padding:0 11px;border:1px solid var(--line);background:rgba(8,38,28,.54);color:#d8c981;text-decoration:none;white-space:nowrap;font:650 9.6px/1 Inter,ui-sans-serif,system-ui,sans-serif;letter-spacing:.055em;text-transform:uppercase;transition:border-color .18s ease,background .18s ease,color .18s ease,transform .18s ease}
.book-download-pdf{color:#aaa78f;font-size:8.7px;letter-spacing:.08em}
.book-download:hover{color:#ebdb9d}
.book-toolbar-actions button:first-child,.book-toolbar-actions button:nth-child(3){font-size:19px;padding:0;width:34px}
.book-zoom{min-width:48px;text-align:center;color:#aab5ae;font:650 10px/1 Inter,ui-sans-serif,system-ui,sans-serif;letter-spacing:.06em}
.book-stage{position:relative;min-height:0;display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:stretch;overflow:hidden}
.book-canvas{min-width:0;min-height:0;overflow:auto;padding:clamp(22px,3.2vh,42px) clamp(20px,3vw,48px);scrollbar-width:thin;scrollbar-color:rgba(196,166,86,.35) rgba(7,28,21,.15)}
.book-canvas::-webkit-scrollbar{width:8px;height:8px}.book-canvas::-webkit-scrollbar-track{background:rgba(7,28,21,.12)}.book-canvas::-webkit-scrollbar-thumb{background:rgba(196,166,86,.32);border-radius:10px}.book-canvas::-webkit-scrollbar-thumb:hover{background:rgba(214,184,100,.5)}
.book-object{position:relative;margin:0 auto;width:max-content;max-width:none;padding:10px 11px 12px;background:linear-gradient(145deg,#7b5840 0%,#60422f 58%,#4c3324 100%);box-shadow:0 22px 60px rgba(0,0,0,.34),0 4px 16px rgba(0,0,0,.24),inset 0 1px 0 rgba(255,230,184,.09);border:1px solid rgba(203,163,99,.23);transition:width .18s ease}
.book-object::before{content:"";position:absolute;z-index:2;left:50%;top:10px;bottom:12px;width:16px;transform:translateX(-50%);pointer-events:none;background:linear-gradient(90deg,transparent,rgba(40,27,20,.20) 46%,rgba(255,255,255,.065) 50%,rgba(43,29,21,.16) 54%,transparent);mix-blend-mode:multiply}
.book-cover-edge{position:absolute;inset:4px;border:1px solid rgba(246,218,167,.07);pointer-events:none}
.book-object img{display:block;width:100%;height:auto;max-width:none;user-select:none;-webkit-user-drag:none;box-shadow:0 3px 12px rgba(0,0,0,.23);background:#d9d0bd}
.book-arrow{align-self:stretch;width:clamp(46px,4vw,68px);border:0;border-right:1px solid rgba(196,166,86,.12);background:linear-gradient(90deg,rgba(3,17,12,.42),rgba(3,17,12,.05));color:rgba(211,187,116,.72);font-size:28px;cursor:pointer;transition:background .2s ease,color .2s ease}
.book-arrow--next{border-right:0;border-left:1px solid rgba(196,166,86,.12);background:linear-gradient(270deg,rgba(3,17,12,.42),rgba(3,17,12,.05))}
.book-arrow:hover{color:#e1cc88;background:rgba(12,43,32,.38)}
.book-arrow:disabled{opacity:.2;cursor:default}
.book-footer{display:grid;grid-template-columns:160px minmax(260px,1fr) 160px;gap:18px;align-items:center;padding:12px clamp(18px,3vw,48px) 15px;border-top:1px solid var(--line);background:rgba(5,24,18,.94);font-family:Inter,ui-sans-serif,system-ui,sans-serif}
.book-footer button{height:36px;padding:0 14px;font-size:10px;text-transform:uppercase;letter-spacing:.08em}
.book-position{display:grid;grid-template-columns:auto minmax(120px,560px);justify-content:center;align-items:center;gap:18px;color:#a8b3ac;font-size:10px;letter-spacing:.08em;text-transform:uppercase}
.book-position input{accent-color:#c3a558;width:min(46vw,560px);cursor:pointer}
.book-viewer.is-loading .book-object{opacity:.54}
.book-viewer.is-loading .book-canvas{cursor:progress}
.book-viewer:fullscreen,.book-viewer:-webkit-full-screen{height:100vh}

@media(max-width:1150px) and (min-width:901px){
  .book-toolbar{grid-template-columns:120px minmax(260px,1fr) auto;gap:12px;padding-left:22px;padding-right:22px}
  .book-download-long{display:none}
  .book-download{min-width:48px;padding:0 8px}
  .book-title-wrap h1{font-size:15px}
}
@media(max-width:900px){
  body{overflow:auto}.book-viewer{height:100dvh}
  .book-toolbar{grid-template-columns:auto 1fr auto;padding:12px 14px;gap:10px}.book-title-wrap{text-align:left}.book-title-wrap h1{font-size:14px}.book-kicker{font-size:8px}.book-back span{display:none}.book-fit,.book-fullscreen,.book-zoom,.book-download-long{display:none}.book-toolbar-actions{gap:4px}.book-download{min-width:46px;padding:0 8px}.book-arrow{font-size:22px}.book-canvas{padding:18px 8px}.book-object{padding:6px 7px 8px}.book-footer{grid-template-columns:1fr 1fr;padding:10px 12px;gap:8px}.book-position{grid-column:1/-1;grid-row:1;grid-template-columns:1fr;text-align:center}.book-position input{width:100%}.book-footer button{grid-row:2}.book-footer button:last-child{justify-self:stretch}}
@media(max-width:560px){.book-toolbar-actions button{height:32px;min-width:32px}.book-canvas{padding:12px 5px}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto}.book-object,.book-toolbar-actions button,.book-download,.book-footer button{transition:none}}

/* Cursor-light tactility: the surface is the unit, never its child controls. */
@media (hover:hover) and (pointer:fine) {
  .tactile-surface {
    --touch-x: 50%;
    --touch-y: 50%;
    --touch-radius: 210px;
    --touch-size: 420px;
    position: relative;
    isolation: isolate;
  }

  .tactile-surface::after {
    content: "";
    position: absolute;
    z-index: 2;
    width: var(--touch-size);
    height: var(--touch-size);
    left: calc(var(--touch-x) - var(--touch-radius));
    top: calc(var(--touch-y) - var(--touch-radius));
    pointer-events: none;
    opacity: 0;
    background: radial-gradient(circle at 50% 50%,
      rgba(225,185,102,.070) 0%,
      rgba(225,185,102,.026) 34%,
      transparent 72%);
    transition: opacity .24s ease;
  }

  .tactile-surface:hover::after {
    opacity: 1;
  }

  .tactile-surface > * {
    position: relative;
    z-index: 1;
  }

  .book-stage.tactile-surface {
    overflow: hidden;
  }

  .book-toolbar.tactile-surface,
  .book-footer.tactile-surface {
    --touch-radius: 160px;
    --touch-size: 320px;
    overflow: visible;
  }

  /* The green viewer surface glows; the book itself stays visually untouched. */
  .book-stage.tactile-surface .book-object {
    z-index: 3;
  }
}

@media (prefers-reduced-motion:reduce) {
  .tactile-surface::after {
    display: none;
  }
}


/* === PRODUCTION MOBILE PASS 2026-10-17 === */
@media (max-width:900px) {
  .book-toolbar {
    min-height: 60px;
  }

  .book-back {
    min-width: 40px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
  }

  .book-toolbar-actions button,
  .book-download {
    height: 44px;
    min-width: 44px;
  }

  .book-toolbar-actions button:first-child,
  .book-toolbar-actions button:nth-child(3) {
    width: 44px;
  }

  .book-stage {
    grid-template-columns: 40px minmax(0,1fr) 40px;
  }

  .book-arrow {
    width: 40px;
    min-width: 40px;
  }

  .book-footer button {
    min-height: 44px;
    height: 44px;
  }

  .book-position input {
    min-height: 24px;
  }
}

@media (max-width:560px) {
  .book-toolbar {
    padding-left: 10px;
    padding-right: 10px;
  }

  .book-title-wrap h1 {
    max-width: 46vw;
  }

  .book-stage {
    grid-template-columns: 38px minmax(0,1fr) 38px;
  }

  .book-arrow {
    width: 38px;
    min-width: 38px;
  }
}

/* === BOOK VIEWER MOBILE V2 — 2026-10-17 === */
.book-mobile-controls { display: none; }

@media (max-width:900px), (max-width:1100px) and (pointer:coarse) {
  html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    overscroll-behavior: none;
  }

  .book-viewer {
    width: 100%;
    height: 100dvh;
    min-height: 0;
    grid-template-rows: auto minmax(0,1fr) auto;
  }

  .book-toolbar {
    padding: max(7px, env(safe-area-inset-top)) max(9px, env(safe-area-inset-right)) 7px max(9px, env(safe-area-inset-left));
    background: #061d16;
    backdrop-filter: none;
  }

  .book-back {
    padding: 0;
    font-size: 20px;
    line-height: 1;
  }

  .book-back span { display: none; }

  .book-title-wrap {
    text-align: left;
  }

  .book-kicker {
    margin-bottom: 3px;
  }

  .book-toolbar-actions {
    gap: 0;
  }

  .book-toolbar-actions button,
  .book-toolbar-actions .book-zoom,
  .book-toolbar-actions .book-fit,
  .book-toolbar-actions .book-fullscreen {
    display: none !important;
  }

  .book-download {
    display: inline-flex;
    border-color: rgba(196,166,86,.28);
  }

  .book-download-long { display: none; }

  .book-stage {
    position: relative;
    min-height: 0;
    overflow: hidden;
  }

  .book-canvas {
    width: 100%;
    height: 100%;
    min-width: 0;
    min-height: 0;
    padding: 10px 8px 12px;
    overflow: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x pan-y pinch-zoom;
  }

  .book-object {
    margin: 0 auto;
    padding: 5px 6px 7px;
  }

  .book-object::before {
    top: 5px;
    bottom: 7px;
  }

  .book-arrow {
    position: absolute;
    z-index: 6;
    top: 50%;
    width: 44px;
    min-width: 44px;
    height: 64px;
    border: 1px solid rgba(196,166,86,.20);
    transform: translateY(-50%);
    background: rgba(4,22,16,.84);
    color: rgba(225,204,136,.90);
    font-size: 24px;
    box-shadow: 0 7px 20px rgba(0,0,0,.18);
  }

  .book-arrow--prev {
    left: max(4px, env(safe-area-inset-left));
    border-radius: 0 2px 2px 0;
  }

  .book-arrow--next {
    right: max(4px, env(safe-area-inset-right));
    left: auto;
    border-radius: 2px 0 0 2px;
  }

  .book-footer {
    display: grid;
    grid-template-columns: 1fr;
    padding: 8px max(10px, env(safe-area-inset-right)) max(8px, env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-left));
    background: #061d16;
  }

  .book-footer > button[data-prev],
  .book-footer > button[data-next] {
    display: none;
  }

  .book-mobile-controls {
    display: grid;
    margin: 0 auto;
    align-items: center;
    font-family: Inter,ui-sans-serif,system-ui,sans-serif;
  }

  .book-mobile-controls button {
    height: 42px;
    min-width: 42px;
    padding: 0 8px;
    border: 1px solid var(--line);
    background: rgba(8,38,28,.54);
    color: #ddd8ca;
    font: 650 12px/1 Inter,ui-sans-serif,system-ui,sans-serif;
  }

  .book-mobile-controls button:first-child,
  .book-mobile-controls button:nth-child(3) {
    font-size: 20px;
  }

  .book-mobile-fit {
    text-transform: uppercase;
    letter-spacing: .055em;
  }

  .book-mobile-fit[aria-pressed="true"] {
    border-color: var(--line-strong);
    color: var(--gold-light);
  }

  .book-mobile-zoom {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 42px;
    color: #aeb8b1;
    border-top: 1px solid rgba(196,166,86,.14);
    border-bottom: 1px solid rgba(196,166,86,.14);
    font: 650 10px/1 Inter,ui-sans-serif,system-ui,sans-serif;
    letter-spacing: .055em;
  }

  .book-position {
    width: min(100%, 520px);
    margin: 0 auto;
    display: grid;
    align-items: center;
    justify-content: stretch;
    text-align: left;
  }

  .book-position input {
    width: 100%;
    min-height: 28px;
    margin: 0;
  }
}

@media (max-width:380px) {
  .book-toolbar {
    padding-left: 7px;
    padding-right: 7px;
  }

  .book-back,
  .book-download {
    width: 40px;
    min-width: 40px;
    height: 40px;
    min-height: 40px;
  }
  .book-mobile-controls { grid-template-columns: 42px 50px 42px minmax(82px,1fr); }
}

@media (orientation:landscape) and (max-height:600px) and (pointer:coarse) {
  .book-toolbar {
    min-height: 48px;
    padding-top: max(4px, env(safe-area-inset-top));
    padding-bottom: 4px;
  }

  .book-back,
  .book-download {
    height: 40px;
    min-height: 40px;
  }

  .book-kicker { display: none; }
  .book-title-wrap h1 { font-size: 12px; }

  .book-canvas {
    padding-top: 6px;
    padding-bottom: 6px;
  }

  .book-arrow {
    height: 54px;
  }

  .book-footer {
    padding-top: 5px;
    padding-bottom: max(5px, env(safe-area-inset-bottom));
  }

  .book-position {
    width: 100%;
    max-width: none;
    margin: 0;
  }
}

@media (max-width:900px), (max-width:1100px) and (pointer:coarse) {
  .book-viewer.is-fit .book-canvas {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .book-viewer.is-fit .book-object {
    flex: 0 0 auto;
    margin: 0;
  }
}

/* === MOBILE FINAL QA — compact landscape controls ===
   Landscape reserves the screen for the spread; all controls fit into one compact footer row. */
@media (orientation:landscape) and (max-height:600px) and (pointer:coarse) {
  .book-footer {
    min-height: 52px;
    grid-template-columns: minmax(0,1fr) auto;
    gap: 10px;
    align-items: center;
    padding: 5px max(10px, env(safe-area-inset-right)) max(5px, env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-left));
  }

  .book-position {
    grid-column: 1;
    grid-row: 1;
    min-width: 0;
    grid-template-columns: auto minmax(90px,1fr);
    gap: 8px;
    font-size: 8.5px;
    white-space: nowrap;
  }

  .book-position input {
    min-width: 90px;
    min-height: 32px;
  }

  .book-mobile-controls {
    grid-column: 2;
    grid-row: 1;
    grid-template-columns: 36px 44px 36px 76px;
    gap: 4px;
    width: auto;
    margin: 0;
  }

  .book-mobile-controls button,
  .book-mobile-zoom {
    height: 36px;
    min-height: 36px;
  }

  .book-mobile-controls button {
    min-width: 36px;
  }

  .book-mobile-fit {
    min-width: 76px !important;
  }
}

@media (orientation:landscape) and (max-height:430px) and (max-width:720px) and (pointer:coarse) {
  .book-position {
    grid-template-columns: auto minmax(70px,1fr);
    gap: 6px;
  }

  .book-mobile-controls {
    grid-template-columns: 34px 40px 34px 70px;
  }

  .book-mobile-controls button,
  .book-mobile-zoom {
    height: 34px;
    min-height: 34px;
  }

  .book-mobile-fit {
    min-width: 70px !important;
    font-size: 8px !important;
  }
}


/* === BOOK VIEWER MOBILE V4 — SWIPE-FIRST ===
   Touch navigation has no arrows. The spread is primary; PDF is a quiet secondary action. */
.book-title-mobile { display: none; }

@media (max-width:900px), (max-width:1100px) and (pointer:coarse) {
  /* Page navigation uses the stage arrows in every orientation. */

  .book-toolbar {
    grid-template-columns: 42px minmax(0,1fr) auto;
    min-height: 54px;
    gap: 8px;
    padding: max(6px,env(safe-area-inset-top)) max(9px,env(safe-area-inset-right)) 6px max(9px,env(safe-area-inset-left));
  }
  .book-back {
    width: 42px;
    min-width: 42px;
    height: 42px;
    min-height: 42px;
    justify-content: center;
    border-color: transparent;
  }
  .book-title-desktop { display: none; }
  .book-title-mobile { display: inline; }
  .book-title-wrap { min-width: 0; }
  .book-kicker {
    display: block;
    margin: 0 0 2px;
    color: #84958b;
    font-size: 7px;
    letter-spacing: .12em;
    line-height: 1.1;
  }
  .book-title-wrap h1 {
    max-width: none;
    margin: 0;
    color: #e6e1d4;
    font-size: clamp(12.5px,3.6vw,15px);
    line-height: 1.1;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
  }

  .book-download {
    width: auto;
    min-width: 62px;
    height: 36px;
    min-height: 36px;
    padding: 0 10px;
    gap: 5px;
    border: 1px solid rgba(196,166,86,.24);
    background: transparent;
    color: #cdb66e;
    font-size: 9px;
    line-height: 1;
    letter-spacing: .08em;
    text-transform: uppercase;
  }
  .book-download-pdf { font-size: 9px; }

  .book-stage { display: block; }
  .book-canvas {
    padding-left: max(8px,env(safe-area-inset-left));
    padding-right: max(8px,env(safe-area-inset-right));
  }

  .book-footer {
    gap: 6px;
    padding-top: 7px;
  }
  .book-position {
    grid-template-columns: auto minmax(90px,1fr);
    gap: 9px;
    font-size: 8.5px;
    letter-spacing: .065em;
  }
  .book-position span { white-space: nowrap; }

  .book-mobile-controls {
    grid-template-columns: 42px 50px 42px minmax(86px,1fr);
    gap: 5px;
    width: min(100%,320px);
  }
  .book-mobile-controls button,
  .book-mobile-zoom { height: 38px; min-height: 38px; }
  .book-mobile-fit { font-size: 8px !important; }
}

@media (max-width:380px) {
  .book-toolbar { grid-template-columns: 40px minmax(0,1fr) 58px; gap: 6px; }
  .book-back { width:40px; min-width:40px; height:40px; min-height:40px; }
  .book-download { min-width:58px; padding:0 8px; }
  .book-title-wrap h1 { font-size: 12px; }
  .book-kicker { font-size: 6.5px; }
}

@media (orientation:landscape) and (max-height:600px) and (max-width:900px) {
  .book-toolbar {
    min-height: 46px;
    grid-template-columns: 40px minmax(0,1fr) 62px;
    padding-top: max(3px,env(safe-area-inset-top));
    padding-bottom: 3px;
  }
  .book-back { width:38px; min-width:38px; height:38px; min-height:38px; }
  .book-kicker { display: none; }
  .book-title-wrap h1 {
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .book-download { min-width:60px; height:32px; min-height:32px; padding:0 8px; }
  .book-canvas { padding-top:5px; padding-bottom:5px; }

  .book-footer {
    min-height: 48px;
    grid-template-columns: minmax(0,1fr) auto;
    gap: 8px;
    padding: 4px max(9px,env(safe-area-inset-right)) max(4px,env(safe-area-inset-bottom)) max(9px,env(safe-area-inset-left));
  }
  .book-position {
    grid-column:1;
    grid-row:1;
    grid-template-columns:auto minmax(80px,1fr);
    gap:7px;
    font-size:8px;
  }
  .book-mobile-controls {
    grid-column:2;
    grid-row:1;
    grid-template-columns:34px 42px 34px 68px;
    gap:3px;
    width:auto;
    margin:0;
  }
  .book-mobile-controls button,
  .book-mobile-zoom { height:32px; min-height:32px; }
  .book-mobile-controls button { min-width:34px; }
  .book-mobile-fit { min-width:68px !important; }
}

@media (max-width:900px), (max-width:1100px) and (pointer:coarse) {
  /* Neutralize the legacy footer rule that pushed nested zoom buttons onto a second grid row. */
  .book-mobile-controls > button { grid-row: auto !important; }
  .book-mobile-controls > .book-mobile-zoom { grid-row: auto !important; }
}

/* === BOOK VIEWER MOBILE V7 — LANDSCAPE ARROWS ===
   Portrait stays swipe-first. In phone landscape restore explicit previous/next controls
   without removing swipe navigation. */
@media (orientation:landscape) and (max-height:600px) and (max-width:900px) {
  .book-stage {
    align-items: stretch;
  }
  .book-arrow {
    display: flex;
    font-size: 21px;
    background: rgba(3,17,12,.26);
    color: rgba(211,187,116,.72);
  }
  .book-arrow--prev {
    border-right: 1px solid rgba(196,166,86,.12);
  }
  .book-arrow--next {
    border-left: 1px solid rgba(196,166,86,.12);
  }
  .book-canvas {
    min-width: 0;
  }
}

/* === BOOK VIEWER MOBILE V8 — LANDSCAPE GRID FIX ===
   V7 restored arrows but inherited absolute positioning from the earlier overlay arrows.
   In landscape they must participate in the three-column grid so the canvas keeps its full center column. */
@media (orientation:landscape) and (max-height:600px) and (max-width:900px) {
  .book-stage {
    display: grid !important;
    grid-template-columns: 40px minmax(0,1fr) 40px !important;
  }
  .book-arrow {
    position: static !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    transform: none !important;
    align-self: stretch !important;
    width: 40px !important;
    min-width: 40px !important;
    height: auto !important;
    min-height: 0 !important;
    border-top: 0 !important;
    border-bottom: 0 !important;
    box-shadow: none !important;
  }
  .book-arrow--prev { grid-column: 1; }
  .book-canvas { grid-column: 2; }
  .book-arrow--next { grid-column: 3; }
  .book-viewer.is-fit .book-canvas {
    width: 100%;
    min-width: 0;
  }
}

/* V19: readable gesture model, no image selection glow; keyboard focus still visible. */
.book-canvas, .book-object, .book-object img, .book-cover-edge {
  -webkit-user-select:none!important; user-select:none!important;
  -webkit-touch-callout:none!important; -webkit-tap-highlight-color:transparent!important;
}
.book-stage, .book-canvas, .book-arrow { -webkit-tap-highlight-color:transparent; }
.book-canvas:focus:not(:focus-visible) {outline:none!important;box-shadow:none!important;}
.book-stage.tactile-surface::after {display:none!important;}
.book-position [data-spread-label] {font-variant-numeric:tabular-nums;}
@media (max-width:900px) {
  .book-canvas {touch-action:pan-x pan-y pinch-zoom;}
  .book-position {gap:8px;}
  .book-footer [data-prev], .book-footer [data-next] {
     display:inline-flex!important; align-items:center; justify-content:center;
     min-width:36px; width:36px; height:36px; padding:0!important;
     font-size:0!important; border:1px solid rgba(201,169,85,.25);
     background:rgba(10,41,31,.45);
  }
  .book-footer [data-prev]::after{content:'‹';font:400 27px/1 Georgia,serif;}
  .book-footer [data-next]::after{content:'›';font:400 27px/1 Georgia,serif;}
  .book-footer [data-prev]:disabled,.book-footer [data-next]:disabled{opacity:.28;}
}
@media (max-width:900px) and (orientation:portrait) {
  .book-footer [data-prev],.book-footer [data-next]{display:none!important;}
}

/* The viewer has subtle stage arrows in landscape: no second pair below the footer. */
@media (max-width:900px) {
 .book-footer [data-prev],.book-footer [data-next] {display:none!important;}
}

/* V23: pointer-precise panning of enlarged image; touch keeps native behavior. */
@media (hover:hover) and (pointer:fine) {
  .book-canvas.is-grabbable { cursor:grab!important; }
  .book-canvas.is-grabbable.is-dragging,
  .book-canvas.is-grabbable.is-dragging * { cursor:grabbing!important; }
  .book-canvas.is-dragging {scroll-behavior:auto!important;user-select:none!important;}
}
/* Book navigation is interface chrome, not copyable book text. */
.book-toolbar, .book-footer, .book-title-wrap, .book-position > span,
.book-arrow, .book-back, .book-zoom, .book-mobile-zoom {
  -webkit-user-select:none;user-select:none;
}

.book-back .book-brand-group {display:flex;flex-direction:column;gap:2px;align-items:flex-start;line-height:1.15;}
.book-back .book-brand-title {color:#f2efe6;}
.book-back .book-brand-sub {font:500 8px/1.25 Inter,system-ui,sans-serif;color:#d8b968;letter-spacing:.02em;white-space:nowrap;}
.book-toolbar,.book-toolbar button,.book-footer,.book-footer button {user-select:none;-webkit-user-select:none;}
@media(max-width:950px){.book-back .book-brand-sub{display:none}}


/* V26 — restore normal text selection for all readable content.
   Disable selection only on actual UI chrome; never on body, paragraphs,
   legal terms, FAQ answers, research narratives or ordinary copy. */
body { cursor:default; }
body :is(button,[role="button"],[role="tab"],[role="switch"],summary,
  a,input[type="checkbox"],input[type="radio"],input[type="range"],select),
body :is(button,[role="button"],[role="tab"],[role="switch"],summary,
  a,input[type="checkbox"],input[type="radio"],input[type="range"],select) * {
  -webkit-user-select:none !important;
  user-select:none !important;
  -webkit-touch-callout:none;
}
/* Re-enable inline citations and links when embedded inside prose. */
body :is(p,li,blockquote,dd,td) a:not(.button):not([role="button"]) {
  -webkit-user-select:text !important;
  user-select:text !important;
  -webkit-touch-callout:default;
}
body :is(input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="button"]):not([type="submit"]):not([type="reset"]),
  textarea,[contenteditable="true"],[contenteditable="plaintext-only"]) {
  -webkit-user-select:text !important;
  user-select:text !important;
  -webkit-touch-callout:default;
  caret-color:auto !important;
  cursor:text;
}
body :is(input[type="checkbox"],input[type="radio"],input[type="range"],select) {
  -webkit-user-select:none !important;
  user-select:none !important;
  caret-color:transparent !important;
}
/* Non-editable prose is selectable but never pretends to be an input. */
body :is(h1,h2,h3,h4,h5,h6,p,span,small,strong,em,label,legend,blockquote,dt,dd,li) {
  caret-color:transparent !important;
  cursor:inherit;
}
body :is(a,button,[role="button"],label:has(input[type="checkbox"]),
  label:has(input[type="radio"]),label[for],input[type="checkbox"],input[type="radio"]) {cursor:pointer;}
body :is(a,button,[role="button"]) * {cursor:inherit;}
/* Click/touch focus should not show a frame; keyboard focus remains visible. */
body :is(button,a,input[type="checkbox"],input[type="radio"],select,[role="button"]):focus:not(:focus-visible) {
  outline:none !important;
}
@media (pointer:coarse) {body * {-webkit-tap-highlight-color:transparent;}}



/* V27: Copyable editorial content, non-selectable interface controls.
   Older global V24/V25 overrides were overly broad. Reset those rules, then
   reapply nonselection exclusively to active UI and imagery. */
body, body * {
  -webkit-user-select: auto !important;
  user-select: auto !important;
}
body :is(button, [role="button"], [role="tab"], [role="switch"],
  input[type="checkbox"], input[type="radio"], input[type="range"],
  select, summary),
body :is(button, [role="button"], [role="tab"], [role="switch"],
  input[type="checkbox"], input[type="radio"], input[type="range"],
  select, summary) *,
body :is(nav, .site-header, .topbar, .brand, .intake-progress,
  .presentation-tabs, .presentation-rail, .book-toolbar,
  .book-footer, .book-canvas, .line-context-strip,
  .segmented, .pedigree-picker .branch-option),
body :is(nav, .site-header, .topbar, .brand, .intake-progress,
  .presentation-tabs, .presentation-rail, .book-toolbar,
  .book-footer, .book-canvas, .line-context-strip,
  .segmented, .pedigree-picker .branch-option) *,
body a:is(.button, .price-cta, .header-cta, .presentation-page-link, .back-link),
body a:is(.button, .price-cta, .header-cta, .presentation-page-link, .back-link) *,
body :is(img, svg, canvas, video),
body :is(img, svg, canvas, video) * {
  -webkit-user-select: none !important;
  user-select: none !important;
}
/* Text inside paragraphs, headings, labels and historical descriptions stays copyable.
   Link text embedded in copy is selectable, unlike actual CTA buttons. */
body :is(input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="button"]):not([type="submit"]):not([type="reset"]),
  textarea, [contenteditable="true"], [contenteditable="plaintext-only"]) {
  -webkit-user-select: text !important;
  user-select: text !important;
  cursor: text;
}
body :is(button, [role="button"], [role="tab"], [role="switch"],
  input[type="checkbox"], input[type="radio"], input[type="range"], select) { cursor: pointer; }
/* High-specificity legacy rules suppressed first-screen headings despite V26. */
body .screen-heading :is(h1,h2,h3,.eyebrow),
body .form-section .section-heading :is(h2,h3),
body .form-section :is(.field__label, .field-label, legend),
body .legal-section :is(h1,h2,h3,h4) {
  -webkit-user-select: text !important;
  user-select: text !important;
}


/* V28 — Viewer toolbar belongs to the Zhivoy Sled site, not to page-turn controls. */
.book-toolbar { --book-seam-energy:0; }
.book-toolbar::before {
  content:"";position:absolute;z-index:6;pointer-events:none;
  left:0;right:0;bottom:-1px;height:1px;
  background:rgba(180,151,67,.30);
}
.book-toolbar::after {
  content:"";position:absolute;z-index:6;pointer-events:none;
  left:0;right:0;bottom:-1px;height:2px;
  opacity:var(--book-seam-energy);
  background:linear-gradient(90deg,rgba(195,166,93,.48),rgba(220,196,126,.64),rgba(195,166,93,.48));
  box-shadow:0 0 6px rgba(203,179,103,.20);
  transition:opacity .12s linear;
}
.book-toolbar .book-back {
  gap:0; text-transform:none;letter-spacing:normal;min-width:0;max-width:100%;
  text-decoration:none;
}
.book-toolbar .book-back .book-brand-group {display:flex;flex-direction:column;gap:4px;min-width:0;line-height:1.15;}
.book-toolbar .book-back .book-brand-title {
  color:#f2efe6;font:500 clamp(16px,1.22vw,21px)/1.12 Georgia,'Times New Roman',serif;white-space:nowrap;
}
.book-toolbar .book-back .book-brand-sub {
  display:block;color:#d8b968;font:600 9.6px/1.25 Inter,system-ui,sans-serif;
  text-transform:uppercase;letter-spacing:.025em;white-space:nowrap;
}
@media(max-width:1150px) and (min-width:951px){
 .book-toolbar{grid-template-columns:minmax(205px,.9fr) minmax(180px,1fr) auto;gap:10px;}
 .book-toolbar .book-back .book-brand-title{font-size:17px;}
 .book-toolbar .book-back .book-brand-sub{font-size:8.5px;letter-spacing:0;}
}
@media(max-width:950px){
  .book-toolbar{grid-template-columns:minmax(93px,100px) minmax(0,1fr) auto!important;gap:6px!important;}
  .book-toolbar .book-back{display:flex!important;width:auto!important;min-width:0!important;max-width:100px!important;justify-content:flex-start!important;align-items:center!important;padding:0!important;}
  .book-toolbar .book-back .book-brand-group{display:flex!important;}
  .book-toolbar .book-back .book-brand-title{display:block!important;font-size:12px;letter-spacing:-.025em;}
  .book-toolbar .book-back .book-brand-sub{display:none!important;}
  .book-toolbar .book-title-wrap{text-align:center;min-width:0;}
  .book-toolbar .book-title-wrap h1{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
}
@media(max-width:380px){
  .book-toolbar{grid-template-columns:90px minmax(0,1fr) auto!important;gap:4px!important;}
  .book-toolbar .book-back .book-brand-title{font-size:11px;}
}
@media(prefers-reduced-motion:reduce){ .book-toolbar::after{transition:none;} }
/* Intermediate desktop sizes keep the complete book title alongside the larger brand. */
@media (min-width:951px) and (max-width:1599px) {
 .book-title-wrap h1 {font-size:clamp(12.5px,calc(1.47vw - 2.5px),21px)!important;}
}


/* V29: the viewer toolbar is an opaque elevated site header, not part of the paper. */
.book-toolbar {
  z-index:30;
  background:#051b14!important;
  border-bottom:1px solid rgba(208,178,99,.53)!important;
  box-shadow:0 2px 0 rgba(7,33,25,.98),0 9px 22px rgba(1,9,6,.86),0 18px 34px rgba(1,9,6,.32)!important;
  isolation:isolate;
}
.book-toolbar::before {
  height:1px!important;
  bottom:-1px!important;
  background:rgba(217,185,105,.62)!important;
  opacity:1!important;
}
.book-toolbar::after {
  height:3px!important;
  bottom:-2px!important;
  background:linear-gradient(90deg,rgba(200,167,85,.72),rgba(239,208,127,.88),rgba(200,167,85,.72))!important;
  box-shadow:0 0 8px rgba(216,185,104,.34),0 2px 11px rgba(216,185,104,.22)!important;
  opacity:var(--book-seam-energy,0)!important;
}
@media (max-width:900px) {
 .book-toolbar {box-shadow:0 2px 0 rgba(7,33,25,.98),0 7px 16px rgba(1,9,6,.78)!important;}
}
@media (prefers-reduced-motion:reduce) {
 .book-toolbar::after {opacity:0!important;}
}

/* === V33: single-purpose viewer navigation (desktop / landscape / portrait) === */
.book-arrow {
  color:#e5ca83;
  font-size:clamp(34px,2.7vw,44px);
  font-weight:400;
  text-shadow:0 0 9px rgba(225,190,103,.45),0 0 23px rgba(216,185,104,.17);
  transition:color .2s ease,background .2s ease,text-shadow .2s ease;
}
.book-arrow:not(:disabled):hover,
.book-arrow:not(:disabled):focus-visible {
  color:#f8e6ab;
  text-shadow:0 0 13px rgba(240,204,119,.75),0 0 30px rgba(216,185,104,.28);
}
.book-arrow:not(:disabled):active {color:#fff0c7;}
.book-arrow:disabled {opacity:.42;text-shadow:none;}
/* Page zoom is controlled by +, − and Fit; no competing browser pinch gesture. */
.book-canvas {touch-action:pan-x pan-y;}
@media (max-width:900px), (max-width:1100px) and (pointer:coarse) {
  .book-canvas {
    touch-action:pan-x pan-y;
    display:flex;
    overscroll-behavior:contain;
  }
  /* Auto margins center the spread only while it fits; on overflow they
     resolve to zero so both scroll axes reach the actual image edges. */
  .book-viewer .book-canvas .book-object {margin:auto;flex:0 0 auto;transition:none;}
  .book-arrow {
    display:flex;
    align-items:center;
    justify-content:center;
    color:#e8cf8c;
    font-size:36px;
    background:linear-gradient(90deg,rgba(3,17,12,.77),rgba(3,17,12,.18));
    text-shadow:0 0 9px rgba(225,190,103,.5),0 0 21px rgba(216,185,104,.17);
  }
  .book-arrow--next {background:linear-gradient(270deg,rgba(3,17,12,.77),rgba(3,17,12,.18));}
}
/* Mobile portrait alone puts previous ABOVE the book and next BELOW it. */
@media (max-width:900px) and (orientation:portrait) {
  .book-stage {
    display:grid;
    grid-template-columns:minmax(0,1fr);
    grid-template-rows:46px minmax(0,1fr) 46px;
    align-items:stretch;
  }
  .book-stage > .book-arrow {
    display:flex;
    position:relative;
    inset:auto;
    transform:none;
    width:100%;min-width:0;height:46px;min-height:46px;
    align-self:stretch;
    border:0;
    border-radius:0;
    box-shadow:none;
    font-size:0;
    z-index:3;
    background:linear-gradient(180deg,rgba(5,27,20,.93),rgba(5,27,20,.43));
  }
  .book-stage > .book-arrow::after {
    content:'↑';font:400 39px/1 Georgia,serif;
    text-shadow:0 0 10px rgba(232,195,104,.5),0 0 20px rgba(225,190,103,.2);
  }
  .book-stage > .book-arrow--prev {grid-column:1;grid-row:1;border-bottom:1px solid rgba(196,166,86,.11);}
  .book-stage > .book-arrow--next {
    grid-column:1;grid-row:3;
    border-top:1px solid rgba(196,166,86,.11);
    background:linear-gradient(0deg,rgba(5,27,20,.93),rgba(5,27,20,.43));
  }
  .book-stage > .book-arrow--next::after {content:'↓';}
  .book-stage > .book-canvas {grid-column:1;grid-row:2;min-height:0;}
}
/* On phone/tablet landscape, arrows stay on the LEFT and RIGHT of the spread. */
@media (orientation:landscape) and (max-height:600px) and (max-width:1100px) {
  .book-stage {display:grid;grid-template-columns:52px minmax(0,1fr) 52px;}
  .book-stage > .book-arrow {
    display:flex;
    position:static;inset:auto;transform:none;
    height:auto;min-height:0;align-self:stretch;
    width:52px;min-width:52px;
    border-top:0;border-bottom:0;
    border-radius:0;box-shadow:none;
    font-size:40px;
  }
  .book-stage > .book-arrow--prev {grid-column:1;}
  .book-stage > .book-canvas {grid-column:2;min-width:0;}
  .book-stage > .book-arrow--next {grid-column:3;}
}
@media (orientation:landscape) and (max-height:600px) and (max-width:900px) {
  /* Match the former V8 grid's !important specificity without losing layout. */
  .book-stage {grid-template-columns:52px minmax(0,1fr) 52px !important;}
  .book-stage > .book-arrow {width:52px !important;min-width:52px !important;}
}
@media(prefers-reduced-motion:reduce){.book-arrow{transition:none;}}

/* V34 mobile viewer: arrows stay in their established slots.
   Desktop appearance and all desktop arrow rules remain untouched. */
@media (max-width:900px), (max-width:1100px) and (pointer:coarse) {
  /* Pointer gestures zoom and pan the spread, never the browser viewport. */
  .book-canvas { touch-action:none; }
  .book-stage > .book-arrow,
  .book-stage > .book-arrow:not(:disabled):hover,
  .book-stage > .book-arrow:not(:disabled):focus-visible {
    color:#ddc78c;
    text-shadow:none;
  }
  .book-stage > .book-arrow { font-size:38px; }
}
@media (max-width:900px) and (orientation:portrait) {
  /* The buttons are above/below the book, but read LEFT/RIGHT. */
  .book-stage > .book-arrow { font-size:38px; }
  .book-stage > .book-arrow::after { content:none; }
  .book-stage > .book-arrow--prev { background:linear-gradient(180deg,rgba(5,27,20,.89),rgba(5,27,20,.39)); }
  .book-stage > .book-arrow--next { background:linear-gradient(0deg,rgba(5,27,20,.89),rgba(5,27,20,.39)); }
}
