/* ============================================
   睡前 · 全球文化随机采风
   极简夜空美学 · Silk Road Nightfall
   ============================================ */

:root {
  --bg-0: #0a0d18;
  --bg-1: #11162a;
  --bg-2: #1a2040;
  --surface: rgba(19, 24, 42, 0.72);
  --surface-solid: #13182a;
  --line: rgba(232, 201, 122, 0.14);
  --line-strong: rgba(232, 201, 122, 0.32);
  --ivory: #ede4d3;
  --ivory-dim: #b8ad97;
  --muted: #7a7464;
  --amber: #e8c97a;
  --amber-soft: #d8b870;
  --amber-deep: #b08a3e;
  --ember: #c47a3a;
  --dusk: #3a2818;
  --serif: 'Cormorant Garamond', 'Noto Serif SC', 'Songti SC', serif;
  --sans: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  overflow: hidden;
  background: var(--bg-0);
  color: var(--ivory);
  font-family: var(--sans);
  font-feature-settings: "ss01", "ss02";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ====== Background star canvas ====== */
#starfield {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

/* ====== Globe container ====== */
#globe-stage {
  position: fixed;
  inset: 0;
  z-index: 1;
  display: grid;
  place-items: center;
}
#globe-stage canvas { outline: none; }

/* Vignette overlay */
#globe-stage::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 50% 55%, transparent 35%, rgba(10,13,24,0.55) 75%, var(--bg-0) 100%);
  pointer-events: none;
}

/* ====== Top header ====== */
.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 28px 36px;
  pointer-events: none;
}
.topbar > * { pointer-events: auto; }

.brand {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.brand-mark {
  display: flex;
  align-items: center;
  gap: 14px;
}
.brand-glyph {
  width: 22px; height: 22px;
  border: 1px solid var(--amber);
  border-radius: 50%;
  position: relative;
}
.brand-glyph::before {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  background: var(--amber);
  opacity: 0.85;
}
.brand-glyph::after {
  content: "";
  position: absolute;
  width: 30px; height: 1px;
  background: linear-gradient(90deg, rgba(232,201,122,0.6), transparent);
  top: 50%; left: calc(100% + 4px);
  transform: translateY(-50%);
  pointer-events: none;
}
.brand-title {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--ivory);
  line-height: 1;
  white-space: nowrap;
}
.brand-sub {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 8px;
  margin-left: 36px;
}

.session-meta {
  text-align: right;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  color: var(--ivory-dim);
  line-height: 1.8;
}
.session-meta .row {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}
.session-meta .label {
  color: var(--muted);
  text-transform: uppercase;
}
.session-meta .value {
  color: var(--amber);
  font-variant-numeric: tabular-nums;
}

/* ====== Side rail (filters) ====== */
.rail {
  position: fixed;
  top: 50%;
  right: 36px;
  transform: translateY(-50%);
  z-index: 9;
  display: flex;
  flex-direction: column;
  gap: 22px;
  width: 240px;
  max-height: 78vh;
  padding: 22px 20px;
  background: var(--surface);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--line);
  border-radius: 2px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--amber-deep) transparent;
}
.rail::-webkit-scrollbar { width: 4px; }
.rail::-webkit-scrollbar-thumb { background: var(--amber-deep); }
.rail-section { display: flex; flex-direction: column; gap: 10px; }
.rail-label {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 8px;
}
.rail-label::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}
.chip-group { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  font-family: var(--sans);
  font-size: 11.5px;
  color: var(--ivory-dim);
  padding: 5px 11px;
  border: 1px solid var(--line);
  background: transparent;
  cursor: pointer;
  letter-spacing: 0.04em;
  transition: all 0.3s var(--ease);
  border-radius: 2px;
  white-space: nowrap;
  line-height: 1.4;
}
.chip:hover {
  color: var(--amber);
  border-color: var(--line-strong);
}
.chip.active {
  color: var(--bg-0);
  background: var(--amber);
  border-color: var(--amber);
}
.chip .dot {
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  margin-right: 6px;
  vertical-align: 1px;
}

/* ====== Bottom compass / CTA ====== */
.compass-deck {
  position: fixed;
  bottom: 40px; left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  pointer-events: none;
}
.compass-deck > * { pointer-events: auto; }

.compass-hint {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.32em;
  color: var(--muted);
  text-transform: uppercase;
}
.compass-btn {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 18px 36px;
  background: var(--surface);
  backdrop-filter: blur(20px);
  border: 1px solid var(--line-strong);
  cursor: pointer;
  font-family: var(--serif);
  font-size: 22px;
  color: var(--ivory);
  letter-spacing: 0.06em;
  transition: all 0.4s var(--ease-out);
  position: relative;
  overflow: hidden;
  white-space: nowrap;
}
.compass-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(232,201,122,0.18), transparent 70%);
  opacity: 0;
  transition: opacity 0.4s var(--ease);
}
.compass-btn:hover::before { opacity: 1; }
.compass-btn:hover {
  border-color: var(--amber);
  transform: translateY(-2px);
}
.compass-btn:active { transform: translateY(0); }
.compass-btn.rolling { pointer-events: none; }
.compass-btn.rolling .compass-icon { animation: spin 1.4s linear infinite; }

.compass-icon {
  width: 22px; height: 22px;
  position: relative;
  flex-shrink: 0;
}
.compass-icon::before, .compass-icon::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
}
.compass-icon::before {
  border: 1px solid var(--amber);
}
.compass-icon::after {
  background: var(--amber);
  width: 4px; height: 12px;
  border-radius: 0;
  left: 50%;
  top: 5px;
  transform: translateX(-50%);
  clip-path: polygon(50% 0%, 100% 100%, 0% 100%);
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

.compass-secondary {
  display: flex;
  gap: 22px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}
.compass-secondary button {
  background: none;
  border: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
  padding: 4px 0;
  transition: color 0.3s var(--ease);
  letter-spacing: 0.18em;
}
.compass-secondary button:hover { color: var(--amber); }

/* ====== Left progress rail ====== */
.progress-rail {
  position: fixed;
  left: 36px; top: 50%;
  transform: translateY(-50%);
  z-index: 9;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
}
.progress-title {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 4px;
}
.progress-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
  width: 96px;
}
.progress-cell {
  width: 100%;
  aspect-ratio: 1;
  border: 1px solid var(--line);
  background: transparent;
  cursor: pointer;
  transition: all 0.3s var(--ease);
  position: relative;
}
.progress-cell:hover {
  border-color: var(--amber);
  transform: scale(1.08);
}
.progress-cell.read {
  background: var(--amber);
  border-color: var(--amber);
}
.progress-cell.current {
  outline: 1px solid var(--amber);
  outline-offset: 2px;
}
.progress-count {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  color: var(--ivory-dim);
  margin-top: 8px;
}
.progress-count .now { color: var(--amber); }

/* ====== Story preview card (after roll) ====== */
.preview {
  position: fixed;
  right: 280px; bottom: 40px;
  width: 360px;
  z-index: 11;
  padding: 28px 30px;
  background: var(--surface);
  backdrop-filter: blur(24px);
  border: 1px solid var(--line);
  border-left: 2px solid var(--amber);
  transform: translateY(20px);
  opacity: 0;
  pointer-events: none;
  transition: all 0.6s var(--ease-out);
}
.preview.show {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}
.preview-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.28em;
  color: var(--muted);
  text-transform: uppercase;
  margin-bottom: 16px;
}
.preview-meta .rarity {
  color: var(--amber);
  border: 1px solid var(--amber);
  padding: 2px 8px;
}
.preview-cn {
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 500;
  letter-spacing: 0.04em;
  line-height: 1.2;
  color: var(--ivory);
  margin-bottom: 6px;
}
.preview-en {
  font-family: var(--serif);
  font-size: 14px;
  font-style: italic;
  color: var(--ivory-dim);
  margin-bottom: 18px;
  letter-spacing: 0.03em;
}
.preview-excerpt {
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.55;
  color: var(--ivory);
  margin-bottom: 22px;
  font-style: italic;
}
.preview-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.preview-coord {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  color: var(--muted);
}
.preview-cta {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  background: none;
  border: none;
  color: var(--amber);
  cursor: pointer;
  padding: 6px 0;
  border-bottom: 1px solid var(--amber);
  transition: all 0.3s var(--ease);
}
.preview-cta:hover {
  color: var(--ivory);
  border-color: var(--ivory);
}

/* ====== Reader modal ====== */
.reader {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(10, 13, 24, 0.86);
  backdrop-filter: blur(40px);
  display: grid;
  place-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.8s var(--ease-out);
}
.reader.show {
  opacity: 1;
  pointer-events: auto;
}
.reader-frame {
  width: min(720px, calc(100% - 80px));
  max-height: 88vh;
  padding: 64px 72px;
  background: linear-gradient(180deg, #131829 0%, #0e1322 100%);
  border: 1px solid var(--line);
  position: relative;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--amber-deep) transparent;
  transform: translateY(20px) scale(0.98);
  transition: transform 0.8s var(--ease-out);
}
.reader.show .reader-frame { transform: none; }
.reader-frame::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--amber), transparent);
  opacity: 0.5;
}
.reader-close {
  position: absolute;
  top: 24px; right: 28px;
  width: 32px; height: 32px;
  background: none;
  border: 1px solid var(--line);
  color: var(--ivory-dim);
  cursor: pointer;
  font-size: 14px;
  display: grid;
  place-items: center;
  transition: all 0.3s var(--ease);
  border-radius: 50%;
}
.reader-close:hover {
  color: var(--amber);
  border-color: var(--amber);
  transform: rotate(90deg);
}

.reader-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.28em;
  color: var(--muted);
  text-transform: uppercase;
  margin-bottom: 24px;
}
.reader-meta::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}
.reader-meta .num {
  color: var(--amber);
}
.reader-cn {
  font-family: var(--serif);
  font-size: 48px;
  font-weight: 500;
  letter-spacing: 0.04em;
  line-height: 1.15;
  color: var(--ivory);
  margin-bottom: 8px;
}
.reader-en {
  font-family: var(--serif);
  font-size: 22px;
  font-style: italic;
  letter-spacing: 0.04em;
  color: var(--ivory-dim);
  margin-bottom: 36px;
}
.reader-divider {
  width: 60px; height: 1px;
  background: var(--amber);
  margin-bottom: 32px;
}
.reader-body {
  font-family: var(--serif);
  font-size: var(--reader-size, 19px);
  line-height: 1.85;
  color: var(--ivory);
  letter-spacing: 0.02em;
  text-wrap: pretty;
  margin-bottom: 40px;
}
.reader-body p { margin-bottom: 18px; }
.reader-body p:last-child {
  font-style: italic;
  color: var(--amber);
  border-top: 1px solid var(--line);
  padding-top: 22px;
  margin-top: 28px;
}

.reader-coord {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--muted);
  border-top: 1px solid var(--line);
  padding-top: 24px;
  margin-bottom: 28px;
}
.reader-coord .field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.reader-coord .field .v {
  color: var(--ivory);
  letter-spacing: 0.1em;
  font-size: 12px;
}

.reader-actions {
  display: flex;
  gap: 18px;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}
.reader-actions-left {
  display: flex;
  gap: 14px;
}
.reader-actions button {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  background: none;
  border: 1px solid var(--line);
  color: var(--ivory-dim);
  cursor: pointer;
  padding: 11px 20px;
  transition: all 0.3s var(--ease);
}
.reader-actions button:hover {
  color: var(--amber);
  border-color: var(--amber);
}
.reader-actions button.primary {
  background: var(--amber);
  color: var(--bg-0);
  border-color: var(--amber);
}
.reader-actions button.primary:hover {
  background: var(--ivory);
  border-color: var(--ivory);
  color: var(--bg-0);
}

/* Sleep mode dimmer */
.sleep-veil {
  position: fixed;
  inset: 0;
  background: var(--bg-0);
  pointer-events: none;
  z-index: 200;
  opacity: 0;
  transition: opacity 8s linear;
}
.sleep-veil.engaged { opacity: 0.7; }

/* ====== Tweaks panel ====== */
.tweaks {
  position: fixed;
  right: 36px;
  bottom: 40px;
  z-index: 12;
  width: 280px;
  padding: 20px 22px;
  background: var(--surface);
  backdrop-filter: blur(24px);
  border: 1px solid var(--line);
  transform: translateX(120%);
  opacity: 0;
  transition: all 0.5s var(--ease-out);
  display: none;
}
.tweaks.show {
  transform: none;
  opacity: 1;
  display: block;
}
.tweaks-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}
.tweaks-title {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--amber);
}
.tweaks-close {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 16px;
  padding: 0;
}
.tweak-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}
.tweak-label {
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ivory-dim);
}
.tweak-label .v {
  color: var(--amber);
  font-variant-numeric: tabular-nums;
}
.tweak-row input[type=range] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 1px;
  background: var(--line-strong);
  outline: none;
  cursor: pointer;
}
.tweak-row input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 10px; height: 10px;
  background: var(--amber);
  border-radius: 50%;
  cursor: pointer;
}
.tweak-row input[type=range]::-moz-range-thumb {
  width: 10px; height: 10px;
  background: var(--amber);
  border-radius: 50%;
  border: none;
  cursor: pointer;
}
.tweak-seg {
  display: flex;
  gap: 4px;
}
.tweak-seg button {
  flex: 1;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ivory-dim);
  background: none;
  border: 1px solid var(--line);
  cursor: pointer;
  padding: 6px 0;
  transition: all 0.3s var(--ease);
}
.tweak-seg button:hover { color: var(--amber); border-color: var(--line-strong); }
.tweak-seg button.active {
  color: var(--bg-0);
  background: var(--amber);
  border-color: var(--amber);
}

.tweak-select {
  width: 100%;
  padding: 7px 10px;
  background: var(--bg-1);
  color: var(--ivory);
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  border: 1px solid var(--line);
  cursor: pointer;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--amber) 50%), linear-gradient(135deg, var(--amber) 50%, transparent 50%);
  background-position: calc(100% - 14px) 50%, calc(100% - 9px) 50%;
  background-size: 5px 5px;
  background-repeat: no-repeat;
}
.tweak-select:focus { border-color: var(--amber); }
.tweak-select option { background: var(--bg-1); color: var(--ivory); }

/* ====== Toast ====== */
.toast {
  position: fixed;
  bottom: 200px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  z-index: 100;
  padding: 14px 24px;
  background: var(--surface-solid);
  border: 1px solid var(--amber);
  font-family: var(--serif);
  font-size: 16px;
  font-style: italic;
  color: var(--amber);
  letter-spacing: 0.04em;
  opacity: 0;
  pointer-events: none;
  transition: all 0.5s var(--ease-out);
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ====== Tooltip on globe markers (overrides globe.gl default) ====== */
.scene-tooltip {
  font-family: var(--serif) !important;
  background: var(--surface-solid) !important;
  border: 1px solid var(--amber) !important;
  color: var(--ivory) !important;
  padding: 10px 16px !important;
  font-size: 15px !important;
  letter-spacing: 0.04em !important;
  border-radius: 0 !important;
}

/* ====== Responsive ====== */
@media (max-width: 1100px) {
  .rail { width: 190px; right: 20px; padding: 18px; }
  .preview { right: 230px; width: 320px; }
  .progress-rail { left: 20px; }
  .topbar { padding: 20px 24px; }
}

@media (max-width: 820px) {
  .rail, .progress-rail, .preview { display: none; }
  .brand-sub { display: none; }
  .compass-deck { bottom: 24px; }
  .compass-btn { font-size: 17px; padding: 14px 26px; }
  .reader-frame { padding: 36px 28px; }
  .reader-cn { font-size: 32px; }
  .reader-en { font-size: 17px; }
}

/* ====== Focus rings ====== */
button:focus-visible, input:focus-visible {
  outline: 1px solid var(--amber);
  outline-offset: 3px;
}

/* ====== Spine Rail Button (inside right filter rail) ====== */
.rail-section--spine {
  border-top: 1px solid var(--line);
  padding-top: 18px;
  margin-top: 4px;
}
.spine-rail-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: rgba(232,201,122,0.04);
  border: 1px solid var(--line);
  cursor: pointer;
  transition: all 0.35s var(--ease-out);
  color: var(--ivory-dim);
  text-align: left;
  position: relative;
  overflow: hidden;
}
.spine-rail-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at left center, rgba(232,201,122,0.12), transparent 70%);
  opacity: 0;
  transition: opacity 0.4s var(--ease);
}
.spine-rail-btn:hover::before { opacity: 1; }
.spine-rail-btn:hover {
  border-color: var(--line-strong);
  color: var(--ivory);
  transform: translateX(2px);
}
.spine-rail-btn__icon {
  width: 28px;
  height: 28px;
  border: 1px solid var(--amber);
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  transition: all 0.35s var(--ease);
}
.spine-rail-btn__icon svg {
  width: 14px;
  height: 14px;
  stroke: var(--amber);
  transition: stroke 0.3s var(--ease);
}
.spine-rail-btn:hover .spine-rail-btn__icon {
  background: rgba(232,201,122,0.1);
  box-shadow: 0 0 14px rgba(232,201,122,0.2);
}
.spine-rail-btn__text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.spine-rail-btn__cn {
  font-family: var(--serif);
  font-size: 14px;
  letter-spacing: 0.06em;
  color: var(--ivory);
  line-height: 1;
}
.spine-rail-btn__en {
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--muted);
}
.spine-rail-btn__arrow {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--amber);
  opacity: 0;
  transform: translateX(-4px);
  transition: all 0.3s var(--ease);
}
.spine-rail-btn:hover .spine-rail-btn__arrow {
  opacity: 1;
  transform: translateX(0);
}

/* ====== Reader Spine Button ====== */
.reader-spine-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}
.reader-spine-btn svg {
  width: 12px;
  height: 12px;
  vertical-align: middle;
}

/* ====== Enhanced design tokens — cinematic depth ====== */
:root {
  /* Glow levels */
  --glow-amber-soft: 0 0 24px rgba(232,201,122,0.18);
  --glow-amber-mid:  0 0 40px rgba(232,201,122,0.28);
  --glow-amber-hot:  0 0 60px rgba(232,201,122,0.42);
  /* Blur levels */
  --blur-glass: blur(20px);
  --blur-heavy: blur(40px);
  /* Shadow */
  --shadow-depth: 0 32px 80px -24px rgba(0,0,0,0.7);
}

/* Enhanced compass button hover glow */
.compass-btn:hover {
  box-shadow: var(--glow-amber-soft), var(--shadow-depth);
}

/* Enhanced reader frame depth */
.reader-frame {
  box-shadow: 0 40px 120px -40px rgba(0,0,0,0.8), inset 0 1px 0 rgba(232,201,122,0.08);
}

/* Enhanced preview card */
.preview {
  box-shadow: 0 24px 60px -20px rgba(0,0,0,0.6);
}

/* Enhanced rail */
.rail {
  box-shadow: -8px 0 40px rgba(0,0,0,0.3);
}

/* ====== Print ====== */
@media print {
  body * { visibility: hidden; }
  .reader, .reader * { visibility: visible; }
  .reader { position: relative; background: white; color: black; }
}
