/* THE MIND OF J — cosmic visual language */
:root {
  --bg: #05060e;
  --ink: #e8e6df;
  --dim: #9a97a8;
  --faint: #55536a;
  --gold: #ffd166;
  --ember: #ff7a45;
  --panel: rgba(13, 14, 26, 0.92);
  --panel-edge: rgba(255, 209, 102, 0.14);
  --serif: Georgia, 'Times New Roman', serif;
  --sans: 'Segoe UI', system-ui, -apple-system, sans-serif;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; overflow: hidden; background: var(--bg); color: var(--ink); font-family: var(--sans); }
button { font-family: inherit; cursor: pointer; }
.hidden { display: none !important; }

/* ---------- LOADING ---------- */
#loading {
  position: fixed; inset: 0; z-index: 100; background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  transition: opacity 1.2s ease;
}
#loading.fade { opacity: 0; pointer-events: none; }
.load-inner { text-align: center; }
.load-star { font-size: 42px; color: var(--gold); animation: pulse 2s ease-in-out infinite; }
#loading h1 {
  font-family: var(--serif); font-size: 34px; letter-spacing: 0.28em; margin: 18px 0 10px;
  color: var(--ink); font-weight: 400;
}
#load-status { color: var(--dim); font-size: 13px; letter-spacing: 0.08em; min-height: 20px; }
.load-bar { width: 260px; height: 2px; background: #1c1d30; margin: 22px auto 0; border-radius: 2px; overflow: hidden; }
#load-fill { height: 100%; width: 0%; background: linear-gradient(90deg, var(--ember), var(--gold)); transition: width .3s; }
@keyframes pulse { 0%,100% { opacity: .5; transform: scale(1);} 50% { opacity: 1; transform: scale(1.15);} }

/* ---------- CANVAS ---------- */
#galaxy { position: fixed; inset: 0; display: block; cursor: grab; }
#galaxy.dragging { cursor: grabbing; }

/* ---------- TOP BAR ---------- */
#topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 20;
  display: flex; align-items: center; gap: 18px; padding: 14px 20px;
  pointer-events: none;
}
#topbar > * { pointer-events: auto; }
#brand { display: flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; }
.brand-star { color: var(--gold); font-size: 18px; text-shadow: 0 0 12px var(--gold); }
.brand-name {
  font-family: var(--serif); letter-spacing: 0.3em; font-size: 15px; color: var(--ink);
  text-shadow: 0 2px 14px rgba(0,0,0,.9);
}
#omni-wrap { position: relative; flex: 1; max-width: 560px; }
#omni {
  width: 100%; padding: 10px 16px; font-size: 14px; color: var(--ink);
  background: rgba(13,14,26,.78); border: 1px solid var(--panel-edge); border-radius: 22px;
  outline: none; backdrop-filter: blur(6px); font-family: var(--sans);
}
#omni:focus { border-color: rgba(255,209,102,.45); box-shadow: 0 0 24px rgba(255,209,102,.12); }
#omni::placeholder { color: var(--faint); }
#omni-results {
  position: absolute; top: 46px; left: 0; right: 0; max-height: 60vh; overflow-y: auto;
  background: var(--panel); border: 1px solid var(--panel-edge); border-radius: 14px;
  backdrop-filter: blur(10px); box-shadow: 0 18px 60px rgba(0,0,0,.7); padding: 6px;
}
.res-row { padding: 9px 12px; border-radius: 9px; cursor: pointer; display: flex; gap: 10px; align-items: baseline; }
.res-row:hover { background: rgba(255,209,102,.08); }
.res-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; align-self: center; }
.res-title { font-size: 13.5px; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.res-year { font-size: 11.5px; color: var(--dim); flex: none; }
.res-head { padding: 8px 12px 4px; font-size: 11px; letter-spacing: .18em; color: var(--dim); }
.res-more { padding: 8px 12px; font-size: 12px; color: var(--gold); cursor: pointer; text-align: center; }
.res-more:hover { text-decoration: underline; }
#topbar-right { margin-left: auto; }
.chip-btn {
  width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--panel-edge);
  background: rgba(13,14,26,.78); color: var(--dim); font-size: 15px;
}
.chip-btn:hover { color: var(--gold); border-color: rgba(255,209,102,.45); }

/* ---------- RAIL ---------- */
#rail {
  position: fixed; left: 14px; top: 50%; transform: translateY(-50%); z-index: 20;
  display: flex; flex-direction: column; gap: 6px;
}
#rail button {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  width: 58px; padding: 9px 4px; border-radius: 12px;
  background: rgba(13,14,26,.72); border: 1px solid rgba(255,255,255,.06);
  color: var(--dim); backdrop-filter: blur(6px);
}
#rail button span { font-size: 17px; }
#rail button label { font-size: 9.5px; letter-spacing: .12em; text-transform: uppercase; cursor: pointer; }
#rail button:hover, #rail button.active { color: var(--gold); border-color: rgba(255,209,102,.35); background: rgba(20,18,34,.9); }

/* ---------- FILTER CHIP ---------- */
#filter-chip {
  position: fixed; top: 64px; left: 50%; transform: translateX(-50%); z-index: 19;
  display: flex; align-items: center; gap: 10px; padding: 7px 8px 7px 16px;
  background: rgba(20,18,34,.92); border: 1px solid rgba(255,209,102,.35); border-radius: 20px;
  font-size: 12.5px; color: var(--gold); backdrop-filter: blur(6px);
}
#filter-clear { background: none; border: none; color: var(--dim); font-size: 16px; padding: 0 6px; }
#filter-clear:hover { color: var(--ink); }

/* ---------- TOOLTIP ---------- */
#tooltip {
  position: fixed; z-index: 30; pointer-events: none; max-width: 300px;
  background: var(--panel); border: 1px solid var(--panel-edge); border-radius: 10px;
  padding: 9px 12px; font-size: 12.5px; box-shadow: 0 8px 30px rgba(0,0,0,.6);
}
#tooltip .tt-title { font-weight: 600; margin-bottom: 3px; }
#tooltip .tt-meta { color: var(--dim); font-size: 11.5px; }

/* ---------- READER ---------- */
#reader {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(560px, 92vw); z-index: 25;
  background: var(--panel); border-left: 1px solid var(--panel-edge);
  backdrop-filter: blur(14px); display: flex; flex-direction: column;
  box-shadow: -30px 0 80px rgba(0,0,0,.6);
  animation: slideIn .28s ease;
}
@keyframes slideIn { from { transform: translateX(40px); opacity: 0; } to { transform: none; opacity: 1; } }
#reader-head { padding: 20px 24px 14px; border-bottom: 1px solid rgba(255,255,255,.07); }
#reader-close {
  float: right; background: none; border: none; color: var(--dim); font-size: 22px; line-height: 1;
}
#reader-close:hover { color: var(--ink); }
#reader-theme { font-size: 10.5px; letter-spacing: .22em; text-transform: uppercase; margin-bottom: 8px; }
#reader-title { font-family: var(--serif); font-size: 21px; font-weight: 500; line-height: 1.25; }
#reader-meta { margin-top: 8px; color: var(--dim); font-size: 12.5px; }
#reader-actions { margin-top: 12px; display: flex; gap: 8px; }
#reader-actions button {
  padding: 6px 13px; font-size: 12px; border-radius: 16px;
  background: rgba(255,209,102,.08); border: 1px solid rgba(255,209,102,.25); color: var(--gold);
}
#reader-actions button:hover { background: rgba(255,209,102,.16); }
#reader-body { flex: 1; overflow-y: auto; padding: 18px 24px 40px; }
#reader-kw { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.kw {
  font-size: 11px; padding: 3px 10px; border-radius: 12px; color: var(--dim);
  border: 1px solid rgba(255,255,255,.1); cursor: pointer;
}
.kw:hover { color: var(--gold); border-color: rgba(255,209,102,.4); }
#reader-refs { font-size: 12px; color: var(--dim); margin-bottom: 16px; line-height: 1.7; }
#reader-refs b { color: var(--ink); font-weight: 600; }
#reader-text {
  font-family: var(--serif); font-size: 15.5px; line-height: 1.75; color: #d8d5cc;
  white-space: pre-wrap; word-wrap: break-word;
}
#reader-text mark { background: rgba(255,209,102,.3); color: var(--ink); border-radius: 3px; padding: 0 2px; }
#reader-text .sect {
  display: block; font-family: var(--sans); font-size: 11.5px; letter-spacing: .24em;
  color: var(--gold); font-weight: 600; margin: 6px 0 2px;
}
#reader-related { margin-top: 30px; border-top: 1px solid rgba(255,255,255,.08); padding-top: 16px; }
#reader-related h4 { font-size: 11px; letter-spacing: .2em; color: var(--dim); margin-bottom: 10px; }
.rel-row { display: flex; gap: 9px; align-items: baseline; padding: 7px 8px; border-radius: 8px; cursor: pointer; }
.rel-row:hover { background: rgba(255,255,255,.05); }

/* ---------- DRAWER (timeline) ---------- */
.drawer {
  position: fixed; left: 90px; right: 24px; bottom: 18px; z-index: 18;
  background: var(--panel); border: 1px solid var(--panel-edge); border-radius: 16px;
  backdrop-filter: blur(10px); padding: 14px 20px 10px;
  animation: rise .3s ease;
}
@keyframes rise { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
.drawer-title { font-size: 11px; letter-spacing: .22em; color: var(--dim); margin-bottom: 10px; }
.drawer-sub { letter-spacing: .04em; text-transform: lowercase; color: var(--faint); margin-left: 10px; }
#timeline-chart { display: flex; align-items: flex-end; gap: 4px; height: 110px; }
.yr-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; cursor: pointer; min-width: 0; }
.yr-bar {
  width: 100%; border-radius: 4px 4px 0 0; min-height: 2px;
  background: linear-gradient(180deg, var(--gold), var(--ember));
  opacity: .55; transition: opacity .15s, box-shadow .15s;
}
.yr-col:hover .yr-bar, .yr-col.active .yr-bar { opacity: 1; box-shadow: 0 0 18px rgba(255,169,77,.5); }
.yr-label { font-size: 9.5px; color: var(--dim); transform: rotate(-38deg); transform-origin: center; margin-top: 6px; }
.yr-count { font-size: 9px; color: var(--faint); }

/* ---------- MODALS ---------- */
#modal-backdrop { position: fixed; inset: 0; z-index: 26; background: rgba(3,4,10,.62); backdrop-filter: blur(3px); }
.modal {
  position: fixed; z-index: 27; top: 50%; left: 50%; transform: translate(-50%,-50%);
  width: min(680px, 94vw); max-height: 86vh; display: flex; flex-direction: column;
  background: var(--panel); border: 1px solid var(--panel-edge); border-radius: 18px;
  padding: 26px 30px; backdrop-filter: blur(16px); box-shadow: 0 30px 90px rgba(0,0,0,.75);
  animation: rise .25s ease;
}
.modal-wide { width: min(860px, 96vw); }
.modal h2 { font-family: var(--serif); letter-spacing: .18em; font-size: 20px; font-weight: 500; }
.modal-sub { color: var(--dim); font-size: 12.5px; margin: 6px 0 16px; }
.modal h3 { font-size: 11.5px; letter-spacing: .2em; color: var(--gold); margin: 20px 0 10px; font-weight: 600; }
.modal h3 .hint { color: var(--faint); letter-spacing: .03em; text-transform: none; font-weight: 400; margin-left: 8px; }
.modal-close {
  position: absolute; top: 14px; right: 16px; background: none; border: none;
  color: var(--dim); font-size: 24px; line-height: 1; z-index: 2;
}
.modal-close:hover { color: var(--ink); }
.modal-scroll { overflow-y: auto; flex: 1; padding-right: 6px; }
.modal-actions { margin-top: 18px; }
.modal-actions button {
  padding: 9px 20px; border-radius: 20px; font-size: 13px;
  background: rgba(255,122,69,.12); border: 1px solid rgba(255,122,69,.4); color: var(--ember);
}
.modal-actions button:hover { background: rgba(255,122,69,.22); }

/* scripture */
.book-grid { display: grid; grid-template-columns: repeat(13, 1fr); gap: 5px; margin-bottom: 10px; }
.book-cell {
  aspect-ratio: 1; border-radius: 7px; display: flex; flex-direction: column;
  align-items: center; justify-content: center; cursor: default; text-align: center;
  border: 1px solid rgba(255,255,255,.05); transition: transform .12s;
}
.book-cell:hover { transform: scale(1.08); border-color: rgba(255,209,102,.35); z-index: 2; }
.book-cell .bk { font-size: 8.5px; color: var(--ink); opacity: .85; line-height: 1.05; padding: 0 2px; }
.book-cell .bn { font-size: 8px; color: var(--dim); }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.two-col ol { padding-left: 20px; font-size: 13px; line-height: 2; color: var(--ink); }
.two-col ol li { cursor: pointer; }
.two-col ol li:hover { color: var(--gold); }
.two-col ol .n { color: var(--faint); font-size: 11px; margin-left: 7px; }

/* stats */
#stat-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.tile {
  border: 1px solid rgba(255,255,255,.08); border-radius: 14px; padding: 16px 14px; text-align: center;
  background: rgba(255,255,255,.02);
}
.tile .big { font-family: var(--serif); font-size: 26px; color: var(--gold); }
.tile .lbl { font-size: 10.5px; letter-spacing: .14em; color: var(--dim); margin-top: 5px; text-transform: uppercase; }
.tile .sub2 { font-size: 10px; color: var(--faint); margin-top: 3px; }
#year-chart { display: flex; align-items: flex-end; gap: 3px; height: 90px; margin-bottom: 6px; }
#year-chart .yc { flex: 1; background: linear-gradient(180deg,#8b5cf6,#38bdf8); border-radius: 3px 3px 0 0; opacity: .7; position: relative; min-height: 2px; }
#year-chart .yc:hover { opacity: 1; }
#word-cloud { line-height: 2.1; text-align: center; padding: 6px 0 10px; }
#word-cloud span { cursor: pointer; margin: 0 7px; color: var(--ink); opacity: .82; }
#word-cloud span:hover { color: var(--gold); opacity: 1; }
#longest-list, #theme-list { font-size: 13.5px; line-height: 2.1; padding-left: 22px; }
#longest-list li { cursor: pointer; }
#longest-list li:hover { color: var(--gold); }
.theme-row { display: flex; align-items: center; gap: 12px; padding: 8px 6px; border-radius: 10px; cursor: pointer; }
.theme-row:hover { background: rgba(255,255,255,.05); }
.theme-dot { width: 13px; height: 13px; border-radius: 50%; flex: none; }
.theme-name { flex: 1; }
.theme-n { color: var(--dim); font-size: 12px; }

/* ember */
#ember-quote {
  font-family: var(--serif); font-size: 21px; line-height: 1.55; color: var(--ink);
  padding: 10px 6px 4px; quotes: '“' '”';
}
#ember-quote::before { content: open-quote; color: var(--ember); font-size: 30px; }
#ember-quote::after { content: close-quote; color: var(--ember); font-size: 30px; }
#ember-src { margin-top: 14px; font-size: 12.5px; color: var(--dim); }
#ember-src a { color: var(--gold); cursor: pointer; text-decoration: none; }
#ember-src a:hover { text-decoration: underline; }

/* bible reader */
.kjv-badge {
  font-family: var(--sans); font-size: 10px; letter-spacing: .18em; color: var(--gold);
  border: 1px solid rgba(255,209,102,.4); border-radius: 10px; padding: 2px 8px; vertical-align: middle; margin-left: 8px;
}
#bible-controls { display: flex; align-items: center; gap: 8px; margin: 4px 0 14px; flex-wrap: wrap; }
#bible-controls select {
  background: rgba(255,255,255,.05); color: var(--ink); border: 1px solid rgba(255,255,255,.15);
  border-radius: 9px; padding: 7px 10px; font-family: var(--sans); font-size: 13px; outline: none; cursor: pointer;
}
#bible-controls select:focus { border-color: rgba(255,209,102,.5); }
#bible-prev, #bible-next {
  width: 34px; height: 34px; border-radius: 9px; font-size: 18px; line-height: 1;
  background: rgba(255,209,102,.08); border: 1px solid rgba(255,209,102,.28); color: var(--gold);
}
#bible-prev:hover, #bible-next:hover { background: rgba(255,209,102,.18); }
#bible-ref-label { margin-left: auto; font-family: var(--serif); font-size: 16px; color: var(--gold); }
#bible-text { font-family: var(--serif); font-size: 16px; line-height: 1.5; color: #d8d5cc; }
.bverse { margin-bottom: 8px; padding: 3px 6px; border-radius: 6px; }
.bverse .bvn { color: var(--ember); font-size: 11px; font-family: var(--sans); font-weight: 600; margin-right: 7px; vertical-align: super; }
.bverse.bhi { background: rgba(255,209,102,.14); box-shadow: inset 3px 0 0 var(--gold); }
.bverse .supplied { color: #b9b5c8; font-style: italic; }

/* beliefs */
#beliefs-body { font-size: 14px; line-height: 1.75; color: #d5d2c8; }
#beliefs-body h4 {
  color: var(--gold); letter-spacing: .16em; font-size: 12px; margin: 18px 0 6px; font-weight: 600;
}
#beliefs-body p { margin-bottom: 8px; }
#beliefs-body .verse { color: var(--dim); font-size: 12px; }
#beliefs-body .bridge {
  border: 1px solid rgba(255,209,102,.28); border-radius: 12px; padding: 12px 16px;
  background: rgba(255,209,102,.05); margin: 14px 0; font-family: var(--serif); font-size: 15px;
}

/* ask */
#ask-suggest { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 14px; }
.sugg {
  font-size: 12px; padding: 5px 13px; border-radius: 15px; cursor: pointer;
  border: 1px solid rgba(255,255,255,.14); color: var(--dim); background: rgba(255,255,255,.03);
}
.sugg:hover { color: var(--gold); border-color: rgba(255,209,102,.45); background: rgba(255,209,102,.07); }
.ask-modes { display: flex; gap: 8px; margin-bottom: 14px; }
.ask-mode {
  padding: 7px 16px; border-radius: 18px; font-size: 12.5px;
  background: none; border: 1px solid rgba(255,255,255,.14); color: var(--dim);
}
.ask-mode.active { color: var(--gold); border-color: rgba(255,209,102,.5); background: rgba(255,209,102,.07); }
#ask-input-row { display: flex; gap: 10px; }
#ask-input {
  flex: 1; padding: 11px 16px; border-radius: 12px; font-size: 14px; color: var(--ink);
  background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.12); outline: none;
}
#ask-input:focus { border-color: rgba(255,209,102,.4); }
#ask-go {
  padding: 11px 26px; border-radius: 12px; font-size: 14px; font-weight: 600;
  background: linear-gradient(135deg, var(--ember), var(--gold)); border: none; color: #1a1206;
}
#ask-go:disabled { opacity: .45; cursor: wait; }
#ask-mic {
  padding: 0 14px; border-radius: 12px; font-size: 15px; flex: none;
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.14); color: var(--dim);
}
#ask-mic:hover { color: var(--gold); border-color: rgba(255,209,102,.4); }
#ask-mic.listening { color: #ff5a5a; border-color: rgba(255,90,90,.6); background: rgba(255,90,90,.08); animation: pulse 1.1s infinite; font-size: 12px; letter-spacing: .05em; }
#ask-answer-tools { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
#ask-answer-tools button {
  padding: 6px 15px; border-radius: 16px; font-size: 12.5px;
  background: rgba(56,189,248,.08); border: 1px solid rgba(56,189,248,.32); color: #7dd3fc;
}
#ask-answer-tools button:hover { background: rgba(56,189,248,.16); }
#ask-stop { border-color: rgba(255,90,90,.4) !important; color: #ff8a8a !important; background: rgba(255,90,90,.08) !important; }
#ask-status { margin-top: 14px; font-size: 12.5px; color: var(--dim); }
#ask-status .spark { color: var(--gold); animation: pulse 1.2s infinite; display: inline-block; }
#ask-sources { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 6px; }
.src-chip {
  font-size: 11px; padding: 4px 11px; border-radius: 12px; cursor: pointer;
  border: 1px solid rgba(255,209,102,.3); color: var(--gold); background: rgba(255,209,102,.05);
}
.src-chip:hover { background: rgba(255,209,102,.14); }
#ask-answer { margin-top: 16px; font-size: 14.5px; line-height: 1.75; color: #ddd9cf; white-space: pre-wrap; font-family: var(--serif); }
#ask-answer .ans-h {
  display: block; font-family: var(--sans); font-size: 11.5px; letter-spacing: .2em;
  color: var(--gold); font-weight: 600; text-transform: uppercase; margin: 4px 0 -8px;
}
#ask-answer .ans-hr { display: block; border-top: 1px solid rgba(255,255,255,.12); margin: 2px 0; }
#ask-answer b { color: var(--ink); }

#reader-facebook {
  color: #9fc3ff !important;
  border-color: rgba(109, 154, 255, .42) !important;
  background: rgba(62, 103, 189, .1) !important;
}
#reader-facebook:hover { background: rgba(62, 103, 189, .2) !important; }
#share-toast {
  position: fixed;
  z-index: 120;
  left: 50%;
  bottom: max(24px, env(safe-area-inset-bottom));
  max-width: min(520px, calc(100vw - 30px));
  padding: 11px 16px;
  border: 1px solid rgba(255, 209, 102, .42);
  border-radius: 999px;
  color: #f8edce;
  background: rgba(12, 13, 25, .96);
  box-shadow: 0 14px 44px rgba(0, 0, 0, .58);
  font-size: 12.5px;
  line-height: 1.4;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 12px);
  transition: opacity .18s ease, transform .18s ease;
}
#share-toast.visible { opacity: 1; transform: translate(-50%, 0); }
#share-copy-panel {
  position: fixed;
  z-index: 130;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(4, 5, 13, .76);
  backdrop-filter: blur(8px);
}
#share-copy-panel[hidden] { display: none; }
.share-copy-card {
  position: relative;
  width: min(580px, 100%);
  padding: 25px;
  border: 1px solid rgba(255, 209, 102, .4);
  border-radius: 18px;
  color: var(--ink);
  background: rgba(15, 16, 31, .98);
  box-shadow: 0 24px 90px rgba(0, 0, 0, .72), 0 0 38px rgba(255, 176, 64, .08);
}
.share-copy-kicker {
  color: var(--ember);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .22em;
}
.share-copy-card h3 { margin: 7px 36px 7px 0; font-family: var(--serif); font-size: 21px; font-weight: 500; }
.share-copy-card p { margin: 0 0 13px; color: var(--dim); font-size: 12.5px; line-height: 1.55; }
.share-copy-card textarea {
  display: block;
  width: 100%;
  min-height: 112px;
  resize: vertical;
  padding: 12px 13px;
  border: 1px solid rgba(255, 255, 255, .15);
  border-radius: 11px;
  outline: none;
  color: #f3efe5;
  background: rgba(255, 255, 255, .045);
  font: 12.5px/1.5 var(--sans);
}
.share-copy-card textarea:focus { border-color: rgba(255, 209, 102, .56); }
.share-copy-close {
  position: absolute;
  top: 11px;
  right: 14px;
  border: 0;
  color: var(--dim);
  background: none;
  font-size: 24px;
}
.share-copy-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 13px; }
.share-copy-actions button {
  padding: 7px 15px;
  border: 1px solid rgba(255, 209, 102, .34);
  border-radius: 18px;
  color: var(--gold);
  background: rgba(255, 209, 102, .07);
  font-size: 12.5px;
}
.share-copy-actions button:hover { background: rgba(255, 209, 102, .15); }

/* about */
#about-body { font-size: 14px; line-height: 1.8; color: #cfccc2; }
#about-body h4 { color: var(--gold); margin: 16px 0 6px; letter-spacing: .1em; font-size: 12px; }
#about-body b { color: var(--ink); }

/* ---------- TOUR ---------- */
#tour-card {
  position: fixed; left: 90px; bottom: 24px; z-index: 24; width: min(460px, 80vw);
  background: var(--panel); border: 1px solid var(--panel-edge); border-radius: 18px;
  padding: 20px 24px; backdrop-filter: blur(14px); box-shadow: 0 20px 70px rgba(0,0,0,.7);
  animation: rise .3s ease;
}
#tour-close { position: absolute; top: 10px; right: 14px; background: none; border: none; color: var(--dim); font-size: 20px; }
#tour-era { font-size: 10.5px; letter-spacing: .24em; color: var(--ember); text-transform: uppercase; }
#tour-title { font-family: var(--serif); font-size: 19px; margin: 6px 0 8px; font-weight: 500; }
#tour-essay { font-size: 13.5px; line-height: 1.7; color: #cfccc2; max-height: 30vh; overflow-y: auto; }
#tour-landmarks { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 6px; }
#tour-nav { display: flex; align-items: center; gap: 14px; margin-top: 16px; }
#tour-nav button {
  padding: 7px 16px; border-radius: 16px; font-size: 12.5px;
  background: rgba(255,209,102,.08); border: 1px solid rgba(255,209,102,.3); color: var(--gold);
}
#tour-nav button:disabled { opacity: .3; cursor: default; }
#tour-pos { font-size: 11.5px; color: var(--faint); flex: 1; text-align: center; }

/* growth time-lapse */
#growth-play {
  margin-left: 14px; padding: 4px 12px; border-radius: 14px; font-size: 11px; letter-spacing: .08em;
  background: rgba(255,122,69,.12); border: 1px solid rgba(255,122,69,.4); color: var(--ember);
}
#growth-play:hover { background: rgba(255,122,69,.24); }
#growth-overlay {
  position: fixed; left: 50%; bottom: 46px; transform: translateX(-50%); z-index: 22;
  text-align: center; pointer-events: none;
}
#growth-overlay #growth-stop { pointer-events: auto; }
#growth-year {
  font-family: var(--serif); font-size: 72px; color: var(--gold); line-height: 1;
  text-shadow: 0 0 40px rgba(255,209,102,.5); letter-spacing: .04em;
}
#growth-stats { font-size: 15px; color: var(--ink); margin-top: 8px; letter-spacing: .04em; }
#growth-caption { font-size: 12px; color: var(--dim); margin-top: 6px; font-style: italic; }
#growth-stop {
  margin-top: 14px; padding: 6px 16px; border-radius: 16px; font-size: 12px;
  background: rgba(13,14,26,.8); border: 1px solid rgba(255,255,255,.15); color: var(--dim); backdrop-filter: blur(6px);
}
#growth-stop:hover { color: var(--ink); border-color: rgba(255,255,255,.3); }

/* serendipity */
#drift-btn {
  position: fixed; right: 22px; bottom: 20px; z-index: 17;
  padding: 9px 18px; border-radius: 20px; font-size: 12.5px; letter-spacing: .06em;
  background: rgba(13,14,26,.78); border: 1px solid var(--panel-edge); color: var(--dim);
  backdrop-filter: blur(6px);
}
#drift-btn:hover { color: var(--gold); border-color: rgba(255,209,102,.5); box-shadow: 0 0 22px rgba(255,209,102,.15); }

/* scrollbars */
::-webkit-scrollbar { width: 9px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #2a2b44; border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: #3d3f61; }

@media (max-width: 760px) {
  .brand-name { display: none; }
  #rail button { width: 46px; } #rail button label { display: none; }
  .book-grid { grid-template-columns: repeat(8, 1fr); }
  .two-col { grid-template-columns: 1fr; }
  #stat-tiles { grid-template-columns: 1fr 1fr; }
  .drawer { left: 74px; right: 10px; }
  #tour-card { left: 74px; }
}
