:root { color-scheme: light; --navy:#234f86; --navy-dark:#163b69; --gold:#f4cf18; --ink:#26364a; --muted:#607086; --paper:#fff; --line:#dde3e9; --background:#f6f7f8; font-family:Arial,Helvetica,sans-serif; }
* { box-sizing:border-box; }
body { margin:0; background:var(--background); color:var(--ink); }
button,input,a { -webkit-tap-highlight-color:transparent; }
button,input { font:inherit; }
button,a,input { touch-action:manipulation; }
button { cursor:pointer; }
button:disabled { cursor:default; opacity:.4; }
a { color:var(--navy); }
button:focus-visible,a:focus-visible,input:focus-visible,[tabindex]:focus-visible { outline:3px solid var(--navy); outline-offset:4px; }
[hidden] { display:none !important; }
.sr-only { position:absolute; width:1px; height:1px; padding:0; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
.skip-link { position:absolute; top:-100px; left:16px; padding:12px; background:white; z-index:100; }
.skip-link:focus { top:12px; }
.icon-defs { position:absolute; width:0; height:0; overflow:hidden; }
.icon { width:20px; height:20px; fill:none; stroke:currentColor; stroke-width:1.65; stroke-linecap:round; stroke-linejoin:round; flex-shrink:0; }
.icon-back { transform:rotate(180deg); }
main { max-width:1320px; margin:auto; padding:24px 40px 0; }
.intro { display:flex; align-items:center; justify-content:space-between; gap:28px; padding-bottom:22px; }
.eyebrow { font-size:10px; font-weight:700; letter-spacing:2.1px; color:var(--navy); margin:0 0 12px; }
.eyebrow::before { content:""; display:inline-block; width:20px; height:3px; background:var(--gold); margin:0 9px 3px 0; }
h1 { font-size:clamp(22px,2.3vw,32px); letter-spacing:-.8px; line-height:1.2; font-weight:650; margin:0; }
.intro-actions { display:flex; align-items:center; gap:22px; flex-shrink:0; }
.text-link { display:inline-flex; align-items:center; gap:8px; font-size:12px; font-weight:600; text-decoration:none; padding:12px 0; }
.text-link .icon { width:14px; height:14px; }
.text-link:hover { text-decoration:underline; }
.button { display:inline-flex; align-items:center; justify-content:center; gap:8px; min-height:42px; border:1px solid var(--line); padding:10px 14px; border-radius:7px; background:var(--paper); color:var(--ink); text-decoration:none; font-size:12px; font-weight:600; }
.button:hover:not(:disabled) { border-color:#a4b4c7; background:#f4f7fb; }
.button-primary { background:var(--navy); border-color:var(--navy); color:white; box-shadow:0 2px 4px #234f8614; }
.button-primary:hover { background:var(--navy-dark) !important; color:white; }
.button-primary .icon { width:17px; height:17px; }
.button-quiet { border-color:transparent; background:transparent; }
.button-quiet:hover:not(:disabled) { border-color:transparent; background:#edf1f5; }
.icon-button { padding:10px; min-width:42px; background:transparent; border-color:transparent; }
.viewer { border:1px solid var(--line); border-radius:12px; background:white; overflow:hidden; box-shadow:0 6px 32px #25384b06; }
.toolbar { display:flex; align-items:center; justify-content:space-between; padding:10px 16px; border-bottom:1px solid var(--line); min-height:62px; gap:12px; }
.toolbar-tools { display:flex; gap:4px; }
.view-switch { display:flex; padding:3px; gap:3px; border:1px solid var(--line); border-radius:7px; background:#f5f7fa; }
.view-switch button { display:flex; align-items:center; justify-content:center; gap:7px; border:0; border-radius:5px; padding:8px 12px; color:var(--muted); background:transparent; font-size:11px; font-weight:600; min-height:34px; }
.view-switch button .icon { width:16px; height:16px; }
.view-switch button[aria-pressed="true"] { color:var(--navy); background:white; box-shadow:0 1px 4px #1c375918; }
.stage { position:relative; height:clamp(340px,calc(100svh - 310px),850px); min-height:340px; background:#eadac2 url("assets/maple-tabletop.webp") center / cover no-repeat; display:flex; justify-content:center; align-items:center; overflow:hidden; padding:20px 24px; }
#book-shell { width:100%; height:100%; position:relative; display:flex; align-items:center; justify-content:center; }
#book { position:relative; flex-shrink:0; }
.catalog-page { overflow:hidden; background:white; box-shadow:0 2px 5px #402f242b,0 7px 16px #402f2421; }
.catalog-page img { display:block; width:100%; height:100%; object-fit:contain; background:#fff; }
.page-loading { position:absolute; inset:0; display:grid; place-items:center; color:var(--muted); font-size:12px; background:white; }
.catalog-page[data-loaded="true"] .page-loading { display:none; }
.navigation { display:flex; align-items:center; justify-content:center; gap:36px; padding:16px 20px 10px; }
.nav-button { min-width:108px; }
.nav-button .icon { width:15px; height:15px; }
.page-form { display:flex; align-items:center; gap:8px; font-size:12px; color:var(--muted); }
.page-form input { width:45px; height:36px; border:1px solid var(--line); border-radius:5px; text-align:center; color:var(--ink); font-weight:600; appearance:textfield; -moz-appearance:textfield; }
.page-form input::-webkit-inner-spin-button { -webkit-appearance:none; }
.viewer-meta { display:flex; justify-content:space-between; align-items:center; gap:16px; padding:4px 24px 14px; font-size:10px; color:var(--muted); }
#page-status { color:var(--navy); }
.navigation-hint { opacity:.85; }
.reading-tip { display:flex; align-items:center; justify-content:center; gap:8px; font-size:11px; line-height:1.6; color:var(--muted); margin:17px 0 24px; text-align:center; }
.reading-tip .icon { width:15px; height:15px; }
.loading { display:flex; align-items:center; justify-content:center; gap:10px; color:var(--muted); font-size:13px; }
.loading-dot { width:8px; height:8px; border-radius:50%; background:var(--navy); animation:pulse 1s ease-in-out infinite alternate; }
@keyframes pulse { to { opacity:.25; } }
.error-message { padding:24px; text-align:center; line-height:1.6; font-size:14px; }
.error-message h2 { font-size:18px; }
.reader { height:100%; width:100%; overflow:auto; overscroll-behavior:contain; padding:0 10px; scroll-behavior:smooth; }
.reader-page { width:min(100%,800px); margin:0 auto 28px; }
.reader-page:last-child { margin-bottom:0; }
.reader-page figcaption { display:flex; align-items:center; justify-content:space-between; gap:10px; margin-bottom:8px; font-size:12px; color:var(--navy); }
.reader-page figcaption .button { min-height:36px; padding:6px 9px; font-size:11px; }
.reader-page img { display:block; width:100%; height:auto; background:white; box-shadow:0 3px 16px #1938541a; }
.viewer[data-mode="read"] .stage { padding:20px 12px; }
dialog { color:var(--ink); border:0; border-radius:12px; box-shadow:0 20px 80px #10294438; padding:24px; }
dialog::backdrop { background:#17283e80; backdrop-filter:blur(3px); }
body:has(dialog[open]) { overflow:hidden; }
.contents-dialog { width:min(440px,calc(100% - 28px)); max-height:calc(100svh - 48px); }
.dialog-heading { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; margin-bottom:20px; }
.dialog-heading h2 { font-size:24px; font-weight:600; letter-spacing:-.5px; margin:0; }
.dialog-heading .eyebrow { margin-bottom:8px; }
.contents-link { display:flex; width:100%; align-items:center; gap:14px; border:0; border-bottom:1px solid var(--line); background:transparent; padding:12px 4px; text-align:left; font-size:12px; line-height:1.4; color:var(--ink); }
.contents-link:hover { color:var(--navy); background:#f4f7fa; }
.contents-link span { flex:1; }
.contents-link b { font-size:12px; min-width:24px; color:var(--navy); text-align:right; }
.zoom-dialog { width:min(1300px,calc(100% - 32px)); height:calc(100svh - 32px); max-width:none; max-height:none; padding:0; overflow:hidden; }
.zoom-toolbar { display:flex; align-items:center; justify-content:space-between; padding:10px 14px; gap:12px; border-bottom:1px solid var(--line); background:white; }
.zoom-page-nav,.zoom-tools { display:flex; align-items:center; gap:6px; }
#zoom-page-label { min-width:70px; text-align:center; font-size:12px; font-weight:600; }
.zoom-reset { min-width:62px; padding:10px 6px; }
.zoom-viewport { height:calc(100% - 101px); overflow:auto; background:#e9edf1; overscroll-behavior:contain; }
.zoom-canvas { padding:24px; width:max-content; min-width:100%; min-height:100%; display:flex; align-items:center; justify-content:center; }
#zoom-image { display:block; height:auto; flex-shrink:0; background:white; box-shadow:0 4px 22px #132d4b30; }
.zoom-tip { font-size:11px; text-align:center; color:var(--muted); margin:0; padding:10px; background:white; min-height:38px; }
.zoom-viewport[data-enlarged="true"] { cursor:grab; }
.zoom-viewport[data-dragging="true"] { cursor:grabbing; user-select:none; }
.viewer:fullscreen { border:0; border-radius:0; width:100%; height:100%; display:flex; flex-direction:column; }
.viewer:fullscreen .stage { flex:1; height:auto; min-height:0; }
.viewer:fullscreen .toolbar { flex-shrink:0; }
.viewer:fullscreen .viewer-meta { padding-bottom:18px; }
@media(min-width:1600px) { main { max-width:1480px; } }
@media(max-width:1000px) { main { padding:24px 24px 0; } .intro { align-items:flex-start; } .intro-actions { gap:12px; } .intro-actions .text-link { display:none; } }
@media(max-width:680px) {
  main { padding:20px 14px 0; } .intro { flex-direction:column; gap:17px; padding:0 4px 21px; } h1 { font-size:25px; line-height:1.15; max-width:320px; } .eyebrow { font-size:9px; } .intro-actions { width:100%; gap:24px; } .intro-actions .text-link { display:flex; } .intro-actions .button { min-height:38px; font-size:11px; padding:9px 12px; }
  .viewer { border-radius:9px; } .toolbar { gap:3px; padding:8px 7px; min-height:60px; } .toolbar .button { gap:5px; padding:8px 7px; font-size:11px; } .toolbar .icon { width:17px; height:17px; } .toolbar-tools { gap:0; } #zoom-button span { display:none; } #zoom-button { min-width:35px; } #fullscreen-button { min-width:35px; }
  .view-switch button { padding:8px 7px; gap:4px; font-size:10px; } .view-switch button .icon { display:none; }
  .stage { height:clamp(390px,calc(100svh - 270px),740px); padding:16px 12px; min-height:350px; } .navigation { gap:12px; padding:14px 12px 8px; } .nav-button { min-width:44px; padding:10px; } .nav-button span { display:none; } .page-form { font-size:11px; } .viewer-meta { padding:6px 14px 12px; font-size:9px; } .navigation-hint { max-width:125px; text-align:right; }
  .reading-tip { align-items:flex-start; font-size:10px; padding:0 10px; margin:14px 0 22px; } .reading-tip .icon { margin-top:2px; }
  .zoom-dialog { width:100%; height:100svh; border-radius:0; } .zoom-toolbar { padding:8px 4px; gap:2px; } .zoom-toolbar .button { min-width:36px; min-height:40px; padding:8px; } #zoom-page-label { min-width:50px; font-size:11px; } .zoom-tools,.zoom-page-nav { gap:0; } .zoom-reset { font-size:11px; } .zoom-canvas { padding:12px; } .zoom-viewport { height:calc(100% - 97px); } .zoom-tip { font-size:10px; padding:10px 6px; }
}
@media(prefers-reduced-motion:reduce) { *,*::before,*::after { animation:none !important; scroll-behavior:auto !important; } }
