:root {
  --midnight:#191711;
  --deep-blue:#242119;
  --parchment:#e6dcc5;
  --gold:#b99255;
  --bronze:#a36c45;
  --silver:#b8b8ad;
  --silver-glow:rgba(230,220,197,.16);
  --bronze-glow:rgba(185,146,85,.18);
  --text-dim:#756d5e;
  --text-muted:#a89e89;
}

body {
  font-family:"Courier New",Courier,monospace;
  background-color:var(--midnight);
  background-image:linear-gradient(rgba(230,220,197,.022) 1px,transparent 1px),radial-gradient(ellipse at 50% 0%,rgba(185,146,85,.08),transparent 55%);
  background-size:100% 5px,auto;
}

.library-bar {
  flex:0 0 52px;
  min-height:52px;
  padding:0 22px;
  display:flex;
  align-items:center;
  gap:28px;
  border-bottom:1px solid rgba(230,220,197,.2);
  background:#11100c;
  font:11px/1 "Courier New",Courier,monospace;
  letter-spacing:.1em;
  position:relative;
  z-index:200;
}

.library-bar a { color:var(--parchment); text-decoration:none; }
.library-wordmark { font-weight:bold; white-space:nowrap; }
.library-location { color:var(--gold); flex:1; }
.library-links { display:flex; gap:26px; }
.library-links a { color:var(--text-muted); }
.library-links a:hover,.library-links a:focus-visible,.library-links a.active { color:var(--gold); }

.side-panel { background:rgba(25,23,17,.68); }
.side-panel.left { border-right:1px solid rgba(230,220,197,.12); }
.side-panel.right { border-left:1px solid rgba(230,220,197,.12); }
.resize-handle { width:4px; background:rgba(185,146,85,.12); }
.resize-handle:hover,.resize-handle.active { background:rgba(185,146,85,.5); }
.clock-section { background:radial-gradient(circle at center,rgba(185,146,85,.06),transparent 65%); }
.title,.subtitle,.panel-tab,.side-panel h3,.observances-year,.moon-name,.halftone-indicator,.events-popup h4,.api-popup h3,.tide-panel h3,.eclipse-vis-panel h3 { font-family:Georgia,"Times New Roman",serif; }
.title { font-size:clamp(1.45rem,2.5vw,2rem); text-transform:none; letter-spacing:.04em; font-weight:400; }
.subtitle { font-family:"Courier New",Courier,monospace; font-size:.65rem; letter-spacing:.18em; }
.time-display,.debug-info,.debug-keys,.speed-indicator,code { font-family:"Courier New",Courier,monospace; }
.panel-tab { font-family:"Courier New",Courier,monospace; letter-spacing:.08em; }
.history-entry { border-left-color:rgba(185,146,85,.32); }
.history-entry:hover { background:rgba(185,146,85,.06); }
.library-crossref {
  display:inline-block;
  margin-top:.45rem;
  color:var(--gold);
  font:500 .56rem/1.2 "Courier New",Courier,monospace;
  letter-spacing:.08em;
  text-decoration:none;
}
.library-crossref:hover,.library-crossref:focus-visible { color:var(--parchment); text-decoration:underline; }
.embedded-clock .library-bar { display:none; }
.embedded-clock body { height:100vh; }
.instrument-only .side-panel.right,.instrument-only #rightHandle,.instrument-only .footer-section { display:none; }
.api-popup,.tide-panel,.eclipse-vis-panel { background:#1c1a14; border-color:rgba(185,146,85,.55); box-shadow:0 24px 80px rgba(0,0,0,.6); }
.halftone-indicator,.debug-keys code,.vis-control-btn { border-radius:0; }
footer { background:rgba(17,16,12,.94); }

@media (max-width:800px) {
  .library-location { display:none; }
  .library-bar { gap:16px; padding:0 12px; }
  .library-links { gap:14px; margin-left:auto; }
  .library-links a:first-child { display:none; }
}
