/* ==========================================================================
   RUSTY OLD ROBOTS — 30-Page Online Glossy Spread Reader (Server + Three.js)
   ========================================================================== */

:root {
  --bg-hull: #0d0f12;
  --bg-chrome: #16191d;
  --bg-page: #1a1e23;
  --bg-page-light: #ebe3d2;
  --ink-light: #ece5d5;
  --ink-muted: #a7adb3;
  --ink-dim: #7b838c;
  --ink-dark: #181b1f;
  --ink-dark-muted: #4b525a;
  --border-steel: rgba(236, 229, 213, 0.14);
  --border-strong: rgba(236, 229, 213, 0.28);

  --vermilion: #b84a27;
  --teal: #3a6b7c;
  --amber: #d99b38;

  --font-display: "Barlow Condensed", "Arial Narrow", system-ui, sans-serif;
  --font-serif: "Newsreader", Georgia, serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;
  --font-patch: "Russo One", "Barlow Condensed", sans-serif;
}

.patch-dog {
  font-family: var(--font-patch);
  letter-spacing: 0.055em;
  text-transform: uppercase;
  font-size: 0.9em;
  color: var(--amber);
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.55);
  border-bottom: 1.5px solid rgba(184, 74, 39, 0.75);
  padding: 0 0.14em;
  white-space: nowrap;
}
.paper-light .patch-dog {
  color: #963718;
  text-shadow: none;
  border-bottom-color: rgba(150, 55, 24, 0.55);
}

*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  height: auto;
  background: var(--bg-hull);
  color: var(--ink-light);
  font-family: var(--font-serif);
  -webkit-font-smoothing: antialiased;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Keep the full 30-page glossy reader cleanly above the fold; site footer sits below it */
.reader-viewport {
  height: 100dvh;
  min-height: 620px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.grain-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 90;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.glossy-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.65rem 1.25rem;
  background: var(--bg-chrome);
  border-bottom: 1px solid var(--border-steel);
  z-index: 20;
}

.glossy-bar-left, .glossy-bar-right { display: flex; align-items: center; gap: 0.7rem; }
.brand-lockup { display: flex; align-items: center; gap: 0.5rem; }
.brand-helmet { width: 24px; height: 24px; object-fit: contain; display: block; }
.back-link { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.08em; color: var(--ink-muted); text-decoration: none; }
.back-link:hover { color: var(--amber); }
.bar-sep { color: var(--ink-dim); font-family: var(--font-mono); font-size: 0.72rem; }
.mono-label { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-muted); }
.mono-label.accent { color: var(--amber); }

.chrome-btn {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.42rem 0.75rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-strong);
  border-radius: 3px;
  color: var(--ink-light);
  cursor: pointer;
}
.chrome-btn:hover:not(:disabled) { border-color: var(--amber); color: var(--amber); }
.chrome-btn:disabled { opacity: 0.35; cursor: not-allowed; }
.chrome-btn-primary { background: var(--amber); border-color: var(--amber); color: var(--bg-hull); font-weight: 600; }
.chrome-btn-primary:hover:not(:disabled) { background: #eab04e; color: var(--bg-hull); }

.stage {
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.9rem 1.5rem;
  overflow: auto;
}

.spread-frame {
  width: 100%;
  max-width: 1180px;
  min-height: clamp(480px, calc(100dvh - 135px), 640px);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  background: var(--bg-page);
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 32px 85px rgba(0, 0, 0, 0.6);
  position: relative;
}

.spread-frame::after {
  content: "";
  position: absolute;
  top: 0; bottom: 0; left: 50%;
  width: 28px;
  transform: translateX(-50%);
  background: linear-gradient(to right, rgba(0,0,0,0), rgba(0,0,0,0.24) 48%, rgba(255,255,255,0.05) 50%, rgba(0,0,0,0.22) 52%, rgba(0,0,0,0));
  pointer-events: none;
  z-index: 5;
}

.spread-frame.single-page { max-width: 590px; grid-template-columns: 1fr; }
.spread-frame.single-page::after { display: none; }

.mag-page {
  position: relative;
  padding: 2rem 2.2rem 2.3rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: clamp(480px, calc(100dvh - 135px), 640px);
  background: var(--bg-page);
}
.mag-page.paper-light { background: var(--bg-page-light); color: var(--ink-dark); }
.mag-page.full-bleed { padding: 0; overflow: hidden; }
.mag-page.accent-vermilion { background: linear-gradient(145deg, #1d1414, #101a26); border-right: 3px solid var(--vermilion); }
.mag-page.accent-teal { background: linear-gradient(145deg, #10252a, #0f1824); border-right: 3px solid var(--teal); }
.mag-page.accent-amber { background: linear-gradient(145deg, #211811, #0f1824); border-right: 3px solid var(--amber); }

.page-running-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-dim);
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--border-steel);
  margin-bottom: 1.15rem;
}
.paper-light .page-running-head { color: var(--ink-dark-muted); border-bottom-color: rgba(21,28,36,0.15); }

.page-body { flex: 1; }
.page-body.centered { display: flex; flex-direction: column; justify-content: center; }

.page-folio {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  color: var(--ink-dim);
  margin-top: 1.15rem;
  padding-top: 0.55rem;
  border-top: 1px solid var(--border-steel);
}
.paper-light .page-folio { color: var(--ink-dark-muted); border-top-color: rgba(21,28,36,0.15); }

.mag-kicker { font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--amber); margin: 0 0 0.45rem; }
.paper-light .mag-kicker { color: var(--vermilion); }

.mag-h1 { margin: 0 0 0.75rem; font-family: var(--font-display); font-size: clamp(2.2rem, 3.6vw, 3.3rem); line-height: 0.96; text-transform: uppercase; letter-spacing: 0.015em; }
.mag-h2 { margin: 0 0 0.6rem; font-family: var(--font-display); font-size: 1.65rem; line-height: 1.04; text-transform: uppercase; }
.mag-dek { margin: 0 0 1rem; font-size: 1.03rem; line-height: 1.48; color: var(--ink-muted); }
.paper-light .mag-dek { color: var(--ink-dark-muted); }

/* Markdown body styling inside glossy pages */
.md-content p { margin: 0 0 0.92rem; font-size: 0.96rem; line-height: 1.62; }
.md-content h2, .md-content h3 { margin: 1.2rem 0 0.45rem; font-family: var(--font-display); font-size: 1.45rem; text-transform: uppercase; letter-spacing: 0.02em; color: var(--amber); }
.paper-light .md-content h2, .paper-light .md-content h3 { color: var(--vermilion); }
.md-content ul { margin: 0 0 1rem; padding-left: 1.15rem; }
.md-content li { margin-bottom: 0.55rem; font-size: 0.93rem; line-height: 1.5; }
.md-content blockquote {
  margin: 1.1rem 0;
  padding: 0.7rem 0.95rem;
  border-left: 3px solid var(--amber);
  background: rgba(217, 155, 56, 0.08);
  font-style: italic;
}
.paper-light .md-content blockquote { border-left-color: var(--vermilion); background: rgba(184, 74, 39, 0.08); }
.md-content a { color: var(--amber); }
.paper-light .md-content a { color: var(--vermilion); }

.stamp {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.64rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.18rem 0.48rem;
  border-radius: 2px;
  border: 1px solid currentColor;
}
.stamp-flown { color: #6fd3df; background: rgba(58, 107, 124, 0.2); }
.stamp-in-build { color: #ff8a6b; background: rgba(184, 74, 39, 0.2); }
.stamp-speculative { color: #ffc56c; background: rgba(217, 155, 56, 0.2); }
.paper-light .stamp-flown { color: #195d66; background: rgba(58, 107, 124, 0.12); }
.paper-light .stamp-in-build { color: #a93416; background: rgba(184, 74, 39, 0.12); }
.paper-light .stamp-speculative { color: #9c610c; background: rgba(217, 155, 56, 0.16); }

/* Cover Page */
.cover-art {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: clamp(480px, calc(100dvh - 135px), 640px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 1.85rem 1.95rem;
  background-size: cover;
  background-position: center top;
}
.cover-art::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(9,15,23,0.82) 0%, rgba(9,15,23,0.12) 34%, rgba(9,15,23,0.18) 58%, rgba(9,15,23,0.92) 100%);
}
.cover-top, .cover-bottom { position: relative; z-index: 2; }
.cover-masthead-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; border-bottom: 2px solid var(--vermilion); padding-bottom: 0.6rem; }
.cover-title { margin: 0; font-family: var(--font-display); font-size: clamp(3rem, 5.5vw, 4.2rem); line-height: 0.88; letter-spacing: 0.02em; color: #f4efe3; text-transform: uppercase; }
.cover-logo-badge { width: 54px; height: 54px; flex-shrink: 0; filter: drop-shadow(0 4px 12px rgba(0,0,0,0.55)); }
.cover-sub { display: flex; justify-content: space-between; margin-top: 0.45rem; font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.1em; color: var(--amber); }
.cover-lines { display: flex; flex-direction: column; gap: 0.65rem; }
.cover-line { border-left: 3px solid var(--amber); padding-left: 0.75rem; }
.cover-line strong { display: block; font-family: var(--font-display); font-size: 1.4rem; line-height: 1; text-transform: uppercase; color: #f7f3ea; }
.cover-line span { font-size: 0.85rem; color: rgba(235, 229, 216, 0.88); }

/* Full-Bleed Plate */
.plate-image { position: relative; width: 100%; height: 100%; min-height: clamp(480px, calc(100dvh - 135px), 640px); background-size: cover; background-position: center; }
.plate-caption-box { position: absolute; bottom: 1.4rem; left: 1.4rem; right: 1.4rem; padding: 0.9rem 1.05rem; background: rgba(9,15,23,0.86); border: 1px solid var(--border-strong); border-radius: 3px; }

/* Interactive Three.js 3D Stage inside a Page */
.three-stage-wrap {
  position: relative;
  width: 100%;
  height: 430px;
  background: radial-gradient(circle at 50% 42%, #1a212a 0%, #11151a 72%);
  border: 1px solid var(--border-strong);
  border-radius: 3px;
  overflow: hidden;
  margin: 0.5rem 0 0.85rem;
  user-select: none;
}
.three-stage-wrap canvas {
  width: 100% !important;
  height: 100% !important;
  display: block;
  cursor: grab;
}
.three-stage-wrap canvas:active { cursor: grabbing; }

.three-presets,
.three-actions {
  position: absolute;
  top: 0.55rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.28rem;
  z-index: 6;
}
.three-presets { left: 0.55rem; max-width: 55%; }
.three-actions { right: 0.55rem; justify-content: flex-end; max-width: 44%; }

.three-presets button,
.three-actions button {
  font-family: var(--font-mono);
  font-size: 0.57rem;
  letter-spacing: 0.055em;
  text-transform: uppercase;
  padding: 0.24rem 0.44rem;
  background: rgba(12, 16, 22, 0.84);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(114, 134, 150, 0.36);
  border-radius: 2px;
  color: var(--ink-light);
  cursor: pointer;
  transition: background 0.14s ease, border-color 0.14s ease, color 0.14s ease;
}
.three-presets button:hover,
.three-presets button.active {
  background: var(--amber);
  border-color: var(--amber);
  color: var(--bg-hull);
  font-weight: 600;
}
.three-actions button:hover {
  border-color: var(--amber);
  color: var(--amber);
}
.three-actions button.active {
  background: rgba(58, 107, 124, 0.92);
  border-color: #6fd3df;
  color: #f4efe3;
  font-weight: 600;
}
.three-actions button.three-btn-estop {
  border-color: rgba(200, 41, 29, 0.65);
  color: #ff9d8f;
}
.three-actions button.three-btn-estop:hover,
.three-actions button.three-btn-estop.active {
  background: #c8291d;
  border-color: #ff6b57;
  color: #fff5f2;
  font-weight: 700;
}

/* Projected 3D Interactive Hotspots */
.three-hotspots-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 5;
  overflow: hidden;
}
.three-hotspots-layer[hidden] { display: none; }
.three-hotspot {
  position: absolute;
  top: 0;
  left: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  pointer-events: auto;
  will-change: transform, opacity;
  transition: opacity 0.16s ease;
}
.three-hs-dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: rgba(14, 18, 24, 0.88);
  border: 1.5px solid var(--amber);
  color: var(--amber);
  font-family: var(--font-mono);
  font-size: 0.56rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  box-shadow: 0 0 0 3px rgba(217, 155, 56, 0.2), 0 4px 12px rgba(0, 0, 0, 0.55);
  transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.three-hotspot:hover .three-hs-dot,
.three-hotspot.active .three-hs-dot {
  transform: scale(1.14);
  background: var(--amber);
  color: #11151a;
  box-shadow: 0 0 0 4px rgba(217, 155, 56, 0.38), 0 6px 16px rgba(0, 0, 0, 0.65);
}
.three-hs-tag {
  display: none;
  padding: 0.16rem 0.4rem;
  background: rgba(12, 16, 22, 0.92);
  border: 1px solid rgba(217, 155, 56, 0.55);
  border-radius: 2px;
  color: #f4efe3;
  font-family: var(--font-mono);
  font-size: 0.55rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
}
.three-hotspot:hover .three-hs-tag {
  display: inline-block;
}
.three-hotspot.active {
  opacity: 0.25 !important;
}

/* Compact Workshop Inspection Callout Card */
.three-callout {
  position: absolute;
  left: 0.55rem;
  right: 0.55rem;
  bottom: 2.35rem;
  z-index: 7;
  padding: 0.52rem 0.68rem;
  background: rgba(12, 16, 22, 0.9);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(217, 155, 56, 0.45);
  border-left: 3px solid var(--amber);
  border-radius: 2px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.52);
}
.three-callout[hidden] { display: none; }
.three-callout-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}
.three-callout-spec {
  font-family: var(--font-mono);
  font-size: 0.55rem;
  letter-spacing: 0.08em;
  color: var(--amber);
  text-transform: uppercase;
}
.three-callout-close {
  border: 0;
  background: transparent;
  color: var(--ink-muted);
  font-size: 0.95rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 0.15rem;
}
.three-callout-close:hover { color: var(--ink-light); }
.three-callout-title {
  display: block;
  margin-top: 0.12rem;
  font-family: var(--font-display);
  font-size: 0.98rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #f4efe3;
}
.three-callout-note {
  margin: 0.18rem 0 0;
  font-family: var(--font-serif);
  font-size: 0.77rem;
  line-height: 1.38;
  color: rgba(235, 229, 216, 0.88);
}

.three-hud {
  position: absolute;
  bottom: 0.48rem;
  left: 0.55rem;
  right: 0.55rem;
  z-index: 6;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  pointer-events: none;
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.07em;
  color: rgba(235, 229, 216, 0.86);
  background: rgba(10, 14, 20, 0.82);
  backdrop-filter: blur(4px);
  padding: 0.24rem 0.5rem;
  border: 1px solid var(--border-steel);
  border-radius: 2px;
}
.three-hud-telemetry.is-estop {
  color: #ff7f70;
  font-weight: 700;
}
.three-hud-pins {
  font-family: var(--font-mono);
  font-size: 0.54rem;
  letter-spacing: 0.07em;
  padding: 0.12rem 0.36rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-steel);
  border-radius: 2px;
  color: var(--ink-muted);
  cursor: pointer;
}
.three-hud-pins.active {
  border-color: var(--amber);
  color: var(--amber);
}

/* TOC */
.toc-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.48rem; }
.toc-btn {
  width: 100%; text-align: left; display: flex; align-items: baseline; justify-content: space-between; gap: 0.65rem;
  padding: 0.45rem 0.6rem; background: rgba(255,255,255,0.03); border: 1px solid var(--border-steel); border-radius: 3px; color: var(--ink-light); cursor: pointer;
}
.toc-btn:hover { border-color: var(--amber); background: rgba(242,168,65,0.08); }
.toc-page-num { font-family: var(--font-mono); font-size: 0.7rem; color: var(--amber); flex-shrink: 0; }
.toc-name { font-family: var(--font-display); font-size: 1.05rem; text-transform: uppercase; flex: 1; }

/* Scrubber & Flatplan Modal */
.scrubber-bar {
  background: var(--bg-chrome);
  border-top: 1px solid var(--border-steel);
  padding: 0.6rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  z-index: 20;
}
.scrubber-track { display: flex; align-items: center; gap: 0.35rem; overflow-x: auto; padding-bottom: 2px; }
.scrubber-pill {
  font-family: var(--font-mono); font-size: 0.66rem; padding: 0.3rem 0.5rem;
  background: rgba(255,255,255,0.03); border: 1px solid var(--border-steel); border-radius: 2px; color: var(--ink-muted); cursor: pointer; white-space: nowrap;
}
.scrubber-pill.active { background: var(--amber); border-color: var(--amber); color: var(--bg-hull); font-weight: 600; }

.flatplan-backdrop { position: fixed; inset: 0; z-index: 80; background: rgba(6,10,15,0.86); backdrop-filter: blur(6px); display: flex; align-items: center; justify-content: center; padding: 1.5rem; }
.flatplan-backdrop[hidden] { display: none; }
.flatplan-modal { width: 100%; max-width: 980px; max-height: 88vh; background: var(--bg-chrome); border: 1px solid var(--border-strong); border-radius: 4px; display: flex; flex-direction: column; overflow: hidden; }
.flatplan-header { display: flex; align-items: center; justify-content: space-between; padding: 1rem 1.4rem; border-bottom: 1px solid var(--border-steel); }
.flatplan-header h2 { margin: 0.2rem 0 0; font-family: var(--font-display); font-size: 1.8rem; text-transform: uppercase; }
.flatplan-grid { padding: 1.25rem 1.4rem; overflow-y: auto; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.85rem; }
.flatplan-tile {
  text-align: left; padding: 0.85rem; background: rgba(255,255,255,0.03); border: 1px solid var(--border-steel); border-radius: 3px;
  color: var(--ink-light); cursor: pointer; display: flex; flex-direction: column; justify-content: space-between; gap: 0.45rem;
}
.flatplan-tile:hover, .flatplan-tile.current { border-color: var(--amber); background: rgba(242,168,65,0.1); }
.flatplan-tile-pages { font-family: var(--font-mono); font-size: 0.68rem; color: var(--amber); }
.flatplan-tile-title { font-family: var(--font-display); font-size: 1.08rem; text-transform: uppercase; line-height: 1.1; }

.back-label-short { display: none; }
.mobile-pager, .mobile-bottom-turner { display: none; }

@media (max-width: 900px) {
  html, body {
    height: auto;
    min-height: 100dvh;
  }
  .reader-viewport {
    height: auto;
    min-height: 100dvh;
    overflow: visible;
  }

  .glossy-bar {
    position: sticky;
    top: 0;
    padding: 0.6rem 0.85rem;
    gap: 0.5rem;
    z-index: 40;
  }
  .back-label-full, .issue-month-full, .bar-sep, .glossy-bar-center, .desktop-only-btn {
    display: none;
  }
  .back-label-short { display: inline; }
  .glossy-bar-left { gap: 0.65rem; }
  .back-link {
    padding: 0.35rem 0.55rem;
    border: 1px solid var(--border-steel);
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.03);
    white-space: nowrap;
  }

  .mobile-pager {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 0.5rem;
    position: sticky;
    top: 49px;
    z-index: 35;
    padding: 0.5rem 0.85rem;
    background: rgba(9, 15, 23, 0.96);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-strong);
  }
  .mobile-pager-btn {
    min-height: 40px;
    padding: 0.45rem 0.85rem;
    font-size: 0.74rem;
    white-space: nowrap;
  }
  .mobile-pager-status {
    min-height: 40px;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--amber);
    background: rgba(217, 155, 56, 0.08);
    border: 1px solid rgba(217, 155, 56, 0.3);
    border-radius: 3px;
    padding: 0.35rem 0.5rem;
    cursor: pointer;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .stage {
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    padding: 0.75rem 0.75rem calc(5.5rem + env(safe-area-inset-bottom, 0px));
    overflow: visible;
  }
  .spread-frame {
    grid-template-columns: 1fr;
    min-height: auto;
  }
  .spread-frame::after { display: none; }
  .mag-page {
    min-height: auto;
    padding: 1.35rem 1.15rem 1.5rem;
  }
  .cover-art {
    min-height: 76dvh;
    padding: 1.35rem 1.25rem;
  }
  .plate-image {
    min-height: 52dvh;
  }

  .mobile-bottom-turner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.65rem;
    margin-top: 0.9rem;
  }
  .mobile-bottom-turner .mobile-pager-btn {
    min-height: 46px;
    width: 100%;
    text-align: center;
  }

  .scrubber-bar { display: none; }
  .flatplan-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
