:root { color-scheme: dark; font-family: system-ui, sans-serif; background: #0b0f1a; color: #e7edf7; --blue:#1f5fbf; --yellow:#e0a800; --grey:#6b6b6b; --red:#b3261e; }
* { box-sizing: border-box; }
html, body { height:100%; margin:0; overflow:hidden; }
header { display:flex; gap:20px; align-items:center; padding:0 20px; height:56px; border-bottom:1px solid #26324a; background:#101727; }
a { color:#9ed5ff; text-underline-offset:3px; }
.brand { color:#fff; text-decoration:none; font-size:21px; font-weight:700; }
#data-state { color:#9cb6d8; font-size:13px; margin-left:auto; }
button { cursor:pointer; border:1px solid #405475; border-radius:7px; padding:8px 10px; min-height:40px; min-width:40px; color:#e7edf7; background:#182338; font:inherit; }
button:hover, button:focus-visible { background:#273d60; }
button[aria-pressed="true"] { background:#254b7a; border-color:#85b9ed; }
button:disabled { opacity:.45; cursor:default; }
main { display:grid; grid-template-columns:minmax(0,1fr) 360px; height:calc(100dvh - 56px); }
#stage { position:relative; overflow:hidden; min-width:0; min-height:0; background:#0b0f1a; }
canvas { position:absolute; inset:0; display:block; width:100%; height:100%; touch-action:none; cursor:grab; }
canvas:active { cursor:grabbing; }
[hidden] { display:none !important; }
#status { position:absolute; top:76px; left:16px; right:16px; width:fit-content; max-width:650px; background:#17243bf2; padding:10px 14px; border-radius:8px; border:1px solid #405475; font-size:13px; pointer-events:none; z-index:3; }
#controls { position:absolute; z-index:4; left:14px; right:14px; top:14px; display:flex; flex-wrap:wrap; gap:6px; align-items:center; }
#controls label { border:1px solid #405475; border-radius:7px; padding:9px; background:#182338df; font-size:12px; min-height:40px; }
.gesture-help { position:absolute; bottom:6px; left:8px; right:8px; text-align:center; pointer-events:none; color:#c4d7ed; font-size:12px; }
#tooltip { position:absolute; max-width:min(320px,calc(100% - 16px)); padding:10px 12px; border:1px solid #627a9c; border-radius:7px; background:#0d1729f5; pointer-events:none; font-size:13px; line-height:1.5; z-index:5; overflow-wrap:anywhere; }
#tooltip.touch { pointer-events:auto; }
#tooltip strong, #tooltip small { display:block; }
#tooltip a { display:block; padding:8px; margin-top:6px; }
aside { overflow:auto; padding:20px; border-left:1px solid #26324a; background:#101727; font:15px/1.45 system-ui,sans-serif; overflow-wrap:anywhere; }
h1 { margin:0; font-size:22px; } h2 { font-size:20px; line-height:1.3; margin:10px 0; } h3 { font-size:14px; }
#counts, .breadcrumb, .muted, small { color:#a6b8d1; font-size:12px; line-height:1.5; }
small { display:block; }
#info { border-block:1px solid #26324a; padding:15px 0; margin:18px 0; }
#info p { font-size:14px; line-height:1.5; margin:8px 0; }
.territory-id { font-family:monospace; color:#9ed5ff; }
label { display:block; font-weight:600; margin-bottom:6px; }
input[type="search"] { width:100%; min-width:0; padding:10px; background:#0b1220; color:#e7edf7; border:1px solid #405475; border-radius:7px; font:inherit; }
.tabs { display:flex; gap:4px; margin-top:8px; }.tabs button { flex:1; min-width:0; padding:6px 4px; font-size:12px; }
#book-list, #results { list-style:none; padding:0; margin:10px 0; display:grid; gap:4px; max-height:280px; overflow:auto; }
#results a, #book-list a { display:flex; flex-wrap:wrap; align-items:center; gap:7px; padding:8px; border-radius:6px; color:#dce7f7; text-decoration:none; font-size:14px; }
#results a:hover, #book-list a:hover, #results a:focus-visible, #book-list a:focus-visible { background:#23314a; }
#results small { flex-basis:100%; }
.edge-bar { display:inline-block; height:3px; background:#79a6e5; }
.swatch { width:12px; height:12px; flex:0 0 12px; border-radius:3px; }
.card-links { display:flex; flex-wrap:wrap; gap:10px; }
.group-label { text-transform:uppercase; color:#9cb6d8; letter-spacing:.05em; }
.notice { border-left:3px solid #85b9ed; padding:8px 10px; background:#182338; }
.bands { padding-left:18px; color:#a6b8d1; font-size:12px; }
.relations { border-left:3px solid var(--grey); padding-left:10px; }.relations.blue { border-color:var(--blue); }.relations.yellow { border-color:var(--yellow); }
.relations ul { list-style:none; padding:0; }.relations li { margin:12px 0; }
.fbadge { display:inline-block; border-radius:10px; padding:1px 6px; margin-left:5px; font-size:11px; background:#29354b; }.f0 { border:1px dashed #a6b8d1; }
.severe { display:inline-block; color:#ff9a91; border:2px solid var(--red); border-radius:12px; font-size:11px; padding:0 5px; margin:3px; }
#legend { position:absolute; left:14px; bottom:44px; padding:8px 10px; max-width:min(500px,calc(100% - 28px)); background:#101727e8; border:1px solid #405475; border-radius:7px; font-size:11px; }
#legend summary { cursor:pointer; padding:2px; }.legend-content { display:flex; flex-wrap:wrap; gap:8px 12px; padding-top:8px; }
.legend-item { display:flex; align-items:center; gap:6px; }.dot { display:inline-block; width:12px; height:12px; border-radius:50%; flex-shrink:0; background:var(--spot,#9cb6d8); }.hollow { background:transparent; border:1.5px solid #fff; }.dashed { background:#9cb6d855; border:2px dashed #c4d7ed; }.serious { outline:2px solid var(--red); outline-offset:2px; }
#dense-note { position:absolute; bottom:25px; right:14px; font-size:11px; }
.mobile-only { display:none; }
@media (max-width:900px) {
  header { padding:0 12px; gap:12px; }.brand { font-size:18px; } #data-state { display:none; }
  main { grid-template-columns:1fr; } .mobile-only { display:block; margin-left:auto; }
  #panel { position:fixed; z-index:6; left:0; right:0; bottom:0; max-height:55dvh; border:1px solid #405475; border-radius:14px 14px 0 0; transform:translateY(100%); transition:transform .18s ease; }
  #panel.open { transform:translateY(0); }
  #controls { top:10px; left:10px; right:10px; gap:4px; } #controls button { font-size:12px; padding:6px 8px; }
  #controls label { font-size:11px; } #status { top:108px; }
  #legend { bottom:38px; }.gesture-help { font-size:10px; }
}
@media (prefers-reduced-motion:reduce) { #panel { transition:none; } }

/* ---- Opus 5.5 addition: looks, labels, demo, gauge ---- */
#stage { background: radial-gradient(ellipse at 50% 45%, #14203a 0%, #0a0f1e 55%, #05070d 100%); }
#stage[data-look="sand"] { background: radial-gradient(ellipse at 50% 40%, #2b3557 0%, #161c33 50%, #0a0c18 100%); }
#controls .group { display:inline-flex; gap:0; }
#controls .group button { border-radius:0; }
#controls .group button:first-child { border-radius:7px 0 0 7px; }
#controls .group button:last-child { border-radius:0 7px 7px 0; border-left:none; }
#controls label { display:inline-flex; align-items:center; gap:6px; margin:0; font-weight:500; }
#demo[aria-pressed="true"] { background:#7a4b00; border-color:#ffc24a; color:#fff3d6; }
#demo-banner { position:absolute; bottom:52px; left:50%; transform:translateX(-50%); max-width:min(640px, calc(100% - 28px)); background:#3a2600f0; border:2px solid #ffc24a; color:#fff3d6; padding:8px 14px; border-radius:10px; font-size:13px; z-index:4; text-align:center; }
.notice.demo { border-left-color:#ffc24a; background:#3a2600; color:#fff3d6; }
#labels { position:absolute; inset:0; pointer-events:none; overflow:hidden; z-index:2; }
#labels .label { position:absolute; left:0; top:0; white-space:nowrap; will-change:transform, opacity; transition:opacity .15s linear; }
#labels .book { color:#fff; font-weight:700; letter-spacing:.01em; padding:2px 8px; border-radius:999px; background:rgba(8,12,24,.62); text-shadow:0 1px 2px #000; }
#stage[data-look="sand"] #labels .book { background:rgba(255,251,234,.92); color:#2a2118; text-shadow:none; box-shadow:0 2px 6px rgba(0,0,0,.35); border:1px solid rgba(0,0,0,.15); }
#labels .chapter { font-size:10px; color:#f4f7ff; background:rgba(8,12,24,.55); padding:1px 5px; border-radius:4px; }
#labels .band { font-size:12px; font-weight:600; padding:3px 9px; border-radius:6px; border:1px solid; background:rgba(8,12,24,.7); }
#labels .band.symptoms { color:#9fe0ff; border-color:#5fc8ff; } #labels .band.treatments { color:#ffe5a3; border-color:#ffd36b; } #labels .band.diseases { color:#ffc2a8; border-color:#ff7a50; }
#labels .orbit { font-size:10px; color:#ffe9b0; background:rgba(40,30,0,.55); padding:1px 6px; border-radius:4px; }
#gauge { position:absolute; right:14px; top:120px; bottom:70px; width:26px; border-radius:13px; overflow:visible; display:flex; flex-direction:column; z-index:3; border:1px solid #405475; background:#0b1220; }
#gauge .band { position:relative; }
#gauge .band span { position:absolute; right:34px; top:50%; transform:translateY(-50%); white-space:nowrap; font-size:11px; color:#c4d7ed; }
#gauge .treatments { flex:1.5; background:linear-gradient(#ffd36b55, #ffd36b22); border-radius:13px 13px 0 0; }
#gauge .symptoms { flex:0.5; background:linear-gradient(#5fc8ff55, #5fc8ff22); }
#gauge .surface { flex:0 0 3px; background:#fbf6e6; }
#gauge .diseases { flex:0.7; background:linear-gradient(#ff7a5044, #ff7a5099); }
#gauge::after { content:""; flex:0.3; background:#ff7a50cc; border-radius:0 0 13px 13px; }
#gauge .marker { position:absolute; left:-6px; right:-6px; height:4px; background:#fff; border-radius:2px; box-shadow:0 0 8px #fff; transform:translateY(50%); }
#gauge .marker span { position:absolute; right:42px; top:50%; transform:translateY(-50%); background:#fff; color:#111; font-size:11px; font-weight:700; padding:2px 7px; border-radius:5px; white-space:nowrap; }
#flower-note { position:absolute; bottom:26px; right:14px; margin:0; font-size:12px; color:#c4d7ed; pointer-events:none; }
@media (max-width:900px) { #gauge { top:150px; right:8px; width:18px; } #demo-banner { bottom:60px; font-size:12px; } }
body[data-mode="2d"] #labels, body[data-mode="2d"] #gauge { display:none; }

@media (max-width:900px) { #labels .book { font-size:11px !important; } }

/* BIBLE Part 0 12.5(f): golden connections on the card */
.golden { margin: .35em 0 .6em; padding: .35em .6em; border-left: 3px solid #ffc21a; background: rgba(255, 194, 26, .08); font-size: .92em; }
.golden .arrow-line { font-weight: 600; }
.golden q, #tooltip q { display: block; font-style: italic; margin: .2em 0; }
