@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600&display=swap');

:root {
  --bg: #111315;
  --header-bg: #17191d;
  --ink: #eef0ed;
  --muted: #8e9690;
  --accent: #d9232e;
  --gold: #c49a55;
  --paper: #faf8f3;
  --paper-edge: #d6d0c6;
  --page-scale: 1;
}

* { box-sizing: border-box; }
html, body { min-width: 320px; min-height: 100%; background: var(--bg); }
body { margin: 0; color: var(--ink); font-family: 'DM Sans', system-ui, sans-serif; overflow-x: hidden; }
button { font: inherit; cursor: pointer; }
.app-shell { width: min(1320px, calc(100% - 40px)); min-height: 100vh; margin: 0 auto; display: flex; flex-direction: column; }
.site-header { position: sticky; top: 0; z-index: 20; height: 76px; flex: 0 0 76px; display: flex; align-items: center; background: var(--header-bg); }
.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--ink); text-decoration: none; }
.brand-mark { width: 44px; height: 44px; border-radius: 50%; object-fit: contain; background: #fff; }
.brand-copy { display: grid; gap: 2px; text-transform: uppercase; letter-spacing: .13em; line-height: 1; }
.brand-copy strong { font-size: 10px; font-weight: 600; }
.brand-copy span { color: var(--muted); font-size: 8px; }
.reader { position: relative; z-index: 1; overflow: hidden; flex: 1 1 auto; min-height: calc(100vh - 76px); display: flex; align-items: flex-start; justify-content: center; padding: 20px 0 28px; }
.menu-stage { position: relative; width: min(100%, 640px); margin: 0 auto; transform: translateY(20px); touch-action: none; }
.menu-page { position: relative; width: 100%; aspect-ratio: 540 / 780; transform: translate3d(var(--pan-x, 0px), var(--pan-y, 0px), 0) scale(var(--page-scale)); transform-origin: center center; cursor: grab; }
.menu-page.is-panning { cursor: grabbing; }
.menu-page img { display: block; width: 100%; height: 100%; object-fit: cover; background: var(--paper); border: 1px solid var(--paper-edge); border-radius: 4px; box-shadow: 0 18px 35px rgba(0,0,0,.42); user-select: none; pointer-events: none; -webkit-user-drag: none; }
.page-arrow { position: absolute; z-index: 2; top: 50%; display: grid; place-items: center; width: 44px; height: 44px; margin-top: -22px; padding: 0 0 5px; border: 1px solid rgba(255,255,255,.48); border-radius: 50%; color: #fff; background: rgba(16,18,20,.72); backdrop-filter: blur(8px); font-family: Georgia, serif; font-size: 37px; line-height: 1; appearance: none; -webkit-appearance: none; -webkit-tap-highlight-color: transparent; outline: none; user-select: none; }
.page-arrow:hover { border-color: var(--accent); color: #fff; background: var(--accent); }
.page-arrow:focus, .page-arrow:focus-visible, .page-arrow:active { outline: none; box-shadow: none; }
.page-arrow-left { left: -22px; }
.page-arrow-right { right: -22px; }

@media (max-width: 680px) {
  .app-shell { width: 100%; }
  .site-header { height: 62px; flex-basis: 62px; }
  .site-header { padding: 0 11px; }
  .brand-mark { width: 40px; height: 40px; }
  .brand-copy strong { font-size: 9px; }
  .brand-copy span { font-size: 8px; }
  .reader { min-height: calc(100vh - 62px); padding: 18px 0 28px; }
  .menu-stage { width: 100%; transform: translateY(18px); }
  .menu-page img { border-left: 0; border-right: 0; border-radius: 0; }
  .page-arrow { width: 36px; height: 36px; margin-top: -18px; font-size: 31px; }
  .page-arrow-left { left: 3px; }
  .page-arrow-right { right: 3px; }
}

@media (max-width: 420px) {
  .page-arrow { width: 33px; height: 33px; margin-top: -16px; font-size: 28px; }
  .page-arrow-left { left: 4px; }
  .page-arrow-right { right: 4px; }
}
