:root {
  --bg: #01030b;
  --ink: #dcebff;
  --muted: #86a2cc;
  --faint: #4e6890;
  --line: rgba(110, 170, 255, .18);
  --glass: rgba(6, 16, 38, .62);
  --glass-hi: rgba(12, 30, 66, .78);
  --accent: #4aa8ff;
  --accent-2: #7ef0ff;
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Consolas, monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--bg); color: var(--ink); font: 15px/1.5 var(--font); }
body { background: radial-gradient(ellipse at 50% 45%, #061433 0%, #020717 45%, var(--bg) 80%); }
button { font: inherit; color: inherit; cursor: pointer; }
a { color: var(--accent-2); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; }
#gl { position: fixed; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
.glass { background: var(--glass); border: 1px solid var(--line); backdrop-filter: blur(14px) saturate(140%); -webkit-backdrop-filter: blur(14px) saturate(140%); border-radius: 16px; box-shadow: 0 10px 40px rgba(0, 10, 40, .45), inset 0 1px 0 rgba(150, 200, 255, .06); }

/* ---------- top HUD ---------- */
.hud-top { position: fixed; top: 14px; left: 16px; right: 16px; display: flex; align-items: center; gap: 14px; z-index: 6; pointer-events: none; }
.hud-top > * { pointer-events: auto; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); padding: 8px 14px 8px 10px; }
.brand svg { width: 26px; height: 26px; filter: drop-shadow(0 0 8px rgba(80, 170, 255, .8)); }
.brand b { font-size: 14px; letter-spacing: .22em; text-transform: uppercase; }
.brand b, .brand small { white-space: nowrap; }
.brand small { display: block; font-size: 10.5px; letter-spacing: .12em; color: var(--muted); text-transform: uppercase; }
.crumbs { display: flex; align-items: center; gap: 2px; padding: 6px 8px; font-size: 13px; min-width: 0; overflow: hidden; }
.crumbs button, .crumbs span { background: none; border: 0; padding: 4px 8px; border-radius: 8px; white-space: nowrap; color: var(--ink); }
.crumbs button:hover { background: rgba(90, 160, 255, .14); }
.crumbs button[style]::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--c); box-shadow: 0 0 8px var(--c); margin-right: 7px; vertical-align: 1px; }
.crumbs em { font-style: normal; color: var(--faint); }
.crumbs span { color: var(--accent-2); }
.tools { margin-left: auto; display: flex; gap: 4px; padding: 5px; }
.tools button, .tools a { display: grid; place-items: center; min-width: 38px; height: 34px; padding: 0 10px; border-radius: 10px; border: 0; background: none; color: var(--ink); text-decoration: none; font-size: 13px; gap: 6px; grid-auto-flow: column; }
.tools button:hover, .tools a:hover { background: rgba(90, 160, 255, .16); }
.tools svg { width: 17px; height: 17px; }
.tools [aria-pressed="true"] { color: var(--accent-2); }

/* ---------- atlas (left) ---------- */
.atlas { position: fixed; left: 16px; top: 78px; width: 250px; max-height: calc(100vh - 200px); max-height: calc(100dvh - 200px); display: flex; flex-direction: column; z-index: 5; padding: 14px 10px 12px; }
.atlas h2 { font-size: 10px; letter-spacing: .24em; text-transform: uppercase; color: var(--muted); margin: 0 8px 8px; font-weight: 600; }
.atlas-head { display: flex; justify-content: space-between; align-items: baseline; padding-right: 8px; }
.atlas-head span { font: 10px var(--mono); color: var(--accent-2); letter-spacing: .1em; }
.atlas ul { list-style: none; margin: 0; padding: 0; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #24406e transparent; }
.atlas li button { position: relative; width: 100%; display: grid; grid-template-columns: 22px 1fr auto; align-items: center; column-gap: 8px; padding: 6px 8px 8px 8px; border: 0; background: none; border-radius: 7px; text-align: left; font-size: 12.5px; transition: background .15s; }
.atlas li button::before { content: ""; position: absolute; left: 0; top: 7px; bottom: 9px; width: 2px; border-radius: 2px; background: var(--c); opacity: 0; box-shadow: 0 0 10px var(--c); transition: opacity .15s; }
.atlas li button:hover, .atlas li button.on { background: color-mix(in srgb, var(--c) 12%, transparent); }
.atlas li button:hover::before, .atlas li button.on::before { opacity: 1; }
.atlas li em { font: 10px var(--mono); font-style: normal; color: var(--c); opacity: .85; }
.atlas li span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #c9dcf7; }
.atlas li button:hover span, .atlas li button.on span { color: #fff; }
.atlas li small { color: var(--muted); font-family: var(--mono); font-size: 10.5px; }
.atlas li i { grid-column: 2 / 4; height: 2px; margin-top: 4px; border-radius: 2px; background: linear-gradient(90deg, var(--c) var(--w), rgba(120, 170, 255, .08) var(--w)); opacity: .75; }
.time { border-top: 1px solid var(--line); margin-top: 10px; padding: 12px 8px 0; }
.time-head { display: flex; justify-content: space-between; align-items: baseline; }
.time-head output { font-family: var(--mono); font-size: 12px; color: var(--accent-2); }
.range { position: relative; height: 26px; margin-top: 6px; }
.range input { position: absolute; inset: 0; width: 100%; margin: 0; background: none; pointer-events: none; -webkit-appearance: none; appearance: none; }
.range::before { content: ""; position: absolute; left: 0; right: 0; top: 12px; height: 2px; background: linear-gradient(90deg, #1b3a7a, var(--accent), var(--accent-2)); border-radius: 2px; opacity: .7; }
.range input::-webkit-slider-thumb { -webkit-appearance: none; pointer-events: auto; width: 14px; height: 14px; border-radius: 50%; background: #dff6ff; border: 2px solid var(--accent); box-shadow: 0 0 10px var(--accent); cursor: grab; }
.range input::-moz-range-thumb { pointer-events: auto; width: 12px; height: 12px; border-radius: 50%; background: #dff6ff; border: 2px solid var(--accent); box-shadow: 0 0 10px var(--accent); cursor: grab; }
.stat { margin: 10px 8px 0; font-size: 11px; color: var(--faint); font-family: var(--mono); }
.tools .atlas-toggle { display: none; }

/* ---------- labels in 3D ---------- */
#labels { position: fixed; inset: 0; pointer-events: none; z-index: 3; overflow: hidden; }
#labels > * { position: absolute; left: 0; top: 0; pointer-events: auto; will-change: transform, opacity; }
.lbl { border: 0; background: none; color: var(--ink); text-align: left; white-space: nowrap; padding: 0; }
/* decade markers: a glowing node + mono text, no pill */
.lbl-decade { display: flex; align-items: center; gap: 7px; padding: 2px 6px 2px 0; text-shadow: 0 0 6px #000, 0 0 12px #000; }
.lbl-decade i { width: 14px; height: 14px; border-radius: 50%; border: 1px solid var(--c); box-shadow: 0 0 12px var(--c), inset 0 0 6px var(--c); position: relative; flex: none; }
.lbl-decade i::after { content: ""; position: absolute; inset: 4px; border-radius: 50%; background: var(--c); }
.lbl-decade b { font: 600 12.5px var(--mono); color: #fff; letter-spacing: .04em; }
.lbl-decade span { font: 10.5px var(--mono); color: var(--c); opacity: .85; }
.lbl-decade:hover b { color: var(--c); }
.lbl-decade:hover i { transform: scale(1.2); }
.lbl-year { display: flex; gap: 5px; align-items: baseline; padding: 1px 7px; border-left: 1px solid var(--c); text-shadow: 0 0 6px #000; }
.lbl-year b { font: 600 11px var(--mono); color: color-mix(in srgb, var(--c) 55%, #fff); }
.lbl-year span { font: 9.5px var(--mono); color: var(--c); }
.lbl-decade.flip { flex-direction: row-reverse; padding: 2px 0 2px 6px; }
.lbl-year.flip { flex-direction: row-reverse; border-left: 0; border-right: 1px solid var(--c); }
.lbl-year:hover { background: color-mix(in srgb, var(--c) 18%, transparent); }

.card3d { display: flex; gap: 9px; width: 200px; padding: 6px; border-radius: 4px 12px 12px 12px; border: 1px solid color-mix(in srgb, var(--c) 40%, rgba(130, 190, 255, .2)); background: linear-gradient(160deg, rgba(8, 24, 58, .9), rgba(2, 8, 22, .9)); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); color: var(--ink); text-align: left; box-shadow: 0 8px 30px rgba(0, 0, 0, .5), 0 0 24px -10px var(--c); transform-origin: 50% 100%; transition: border-color .15s, box-shadow .15s; }
.card3d::before { content: ""; position: absolute; left: -1px; top: -1px; width: 18px; height: 2px; background: var(--c); box-shadow: 0 0 8px var(--c); }
.card3d::after { content: ""; position: absolute; left: 50%; bottom: -12px; width: 1px; height: 12px; background: linear-gradient(var(--c), transparent); }
.card3d:hover, .card3d.sel { border-color: var(--c); box-shadow: 0 8px 30px rgba(0, 0, 0, .5), 0 0 30px -6px var(--c); }
.c-img { flex: none; width: 74px; aspect-ratio: 16 / 9; align-self: flex-start; border-radius: 3px; overflow: hidden; background: #0b1c3d; }
.c-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.c-txt { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.c-txt b { font-size: 12px; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.c-txt i { font-style: normal; font-size: 10.5px; line-height: 1.3; color: #b9cdea; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.c-txt small { font-size: 9.5px; color: var(--muted); font-family: var(--mono); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 1px; }

/* ---------- an opened decade / year: node, branches, cards ---------- */
#labels > .bring { pointer-events: none; width: 30px; height: 30px; border-radius: 50%; border: 1.5px solid var(--c); box-shadow: 0 0 18px var(--c), inset 0 0 10px var(--c); }
.bring::before { content: ""; position: absolute; inset: 8px; border-radius: 50%; background: var(--c); box-shadow: 0 0 14px var(--c); animation: nodeBeat 1.6s ease-in-out infinite; }
.bring::after { content: ""; position: absolute; inset: -1px; border-radius: 50%; border: 1px solid var(--c); animation: ringOut 1.8s ease-out infinite; }
@keyframes ringOut { from { transform: scale(1); opacity: .9; } to { transform: scale(2.6); opacity: 0; } }
@keyframes nodeBeat { 50% { transform: scale(.7); opacity: .6; } }
.bcenter { display: flex; flex-direction: column; align-items: center; padding: 7px 26px 8px; min-width: 128px; text-align: center; border-radius: 12px; background: rgba(3, 10, 28, .78); border: 1px solid color-mix(in srgb, var(--c) 45%, transparent); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); box-shadow: 0 0 30px -10px var(--c); white-space: nowrap; }
.bcenter.hdr { align-items: flex-start; text-align: left; padding-left: 14px; min-width: 190px; }
.bcenter .b-k { font: 9.5px var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--c); }
.bcenter b { font: 600 21px/1.15 var(--mono); color: #fff; letter-spacing: .02em; }
.bcenter .b-n { font-size: 11.5px; color: var(--muted); }
.bcenter .b-back { border: 0; background: none; color: var(--accent-2); font-size: 11.5px; padding: 0 0 2px; }
.bcenter .b-back:hover { text-decoration: underline; }
.bcenter .b-x { position: absolute; top: 3px; right: 4px; border: 0; background: none; color: var(--muted); font-size: 16px; line-height: 1; padding: 2px 6px; border-radius: 6px; }
.bcenter .b-x:hover { color: #fff; background: rgba(90, 160, 255, .16); }
.bnode { display: flex; align-items: center; gap: 9px; padding: 3px 0; border: 0; background: none; color: var(--ink); white-space: nowrap; text-shadow: 0 0 8px #000, 0 0 14px #000; transform-origin: 9px 50%; }
.bnode.left { flex-direction: row-reverse; transform-origin: calc(100% - 9px) 50%; }
.bnode i { width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid var(--c); box-shadow: 0 0 12px var(--c); position: relative; flex: none; animation: nodeGlow 1.8s ease-in-out infinite; }
.bnode i::after { content: ""; position: absolute; inset: 4px; border-radius: 50%; background: var(--c); }
.bnode b { font: 600 16px var(--mono); color: #fff; }
.bnode span { font: 11px var(--mono); color: var(--c); }
.bnode:hover b { color: var(--c); }
.bnode:hover i { transform: scale(1.2); }
.bnode.more b { font-size: 13px; color: var(--accent-2); }
.bnode.more i { border-style: dashed; }
@keyframes nodeGlow { 50% { box-shadow: 0 0 22px 5px var(--c); } }
.bcard { transform-origin: 0 50%; }
.bcard.left { transform-origin: 100% 50%; }
.bcard::after { left: -18px; top: 50%; bottom: auto; width: 18px; height: 1px; background: linear-gradient(90deg, var(--c), transparent); }
.bcard.left::after { left: auto; right: -18px; background: linear-gradient(270deg, var(--c), transparent); }
@media (prefers-reduced-motion: reduce) { .bring::before, .bring::after, .bnode i { animation: none; } }

/* neighbouring regions, hinted at the screen edges while you're inside one */
.ehint { position: fixed; left: 0; top: 0; z-index: 5; display: flex; align-items: center; gap: 7px; padding: 5px 11px; border-radius: 999px; border: 1px solid color-mix(in srgb, var(--c) 28%, transparent); background: rgba(3, 10, 28, .5); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); color: var(--muted); font: 10.5px var(--mono); letter-spacing: .05em; text-transform: uppercase; white-space: nowrap; opacity: .62; transition: opacity .2s, color .2s, border-color .2s; }
.ehint[hidden] { display: none; }
.ehint:hover, .ehint:focus-visible { opacity: 1; color: #fff; border-color: var(--c); }
.ehint i { width: 6px; height: 6px; border-radius: 50%; background: var(--c); box-shadow: 0 0 8px var(--c); flex: none; }
.ehint::before { content: "‹"; color: var(--c); font: 15px/1 var(--mono); }
.ehint-r { flex-direction: row-reverse; }
.ehint-r::before { content: "›"; }
.ehint-u::before { content: "˄"; }
.ehint-d::before { content: "˅"; }
@media (max-width: 760px) { .ehint { font-size: 9.5px; padding: 4px 8px; max-width: 44vw; } .ehint span { overflow: hidden; text-overflow: ellipsis; } }

.tip { position: fixed; left: 0; top: 0; z-index: 9; pointer-events: none; padding: 7px 11px; border-radius: 10px; background: rgba(4, 14, 36, .9); border: 1px solid var(--line); font-size: 12px; max-width: 260px; }
.tip b { display: block; }
.tip span { color: var(--muted); font-size: 11px; }

/* ---------- region callout + leader line ---------- */
.leader { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 4; opacity: 0; transition: opacity .2s; overflow: visible; }
.leader.on { opacity: 1; }
.leader path { fill: none; stroke: var(--c, #7ef0ff); stroke-width: 1; stroke-dasharray: 3 3; filter: drop-shadow(0 0 4px var(--c, #7ef0ff)); }
.leader circle { fill: var(--c, #7ef0ff); filter: drop-shadow(0 0 6px var(--c, #7ef0ff)); }
.leader circle.ring { fill: none; stroke: var(--c, #7ef0ff); stroke-width: 1; opacity: .7; transform-box: fill-box; transform-origin: center; animation: ping 1.6s ease-out infinite; }
@keyframes ping { from { transform: scale(.4); opacity: .9; } to { transform: scale(1.6); opacity: 0; } }
.callout { position: fixed; left: 0; top: 0; z-index: 4; width: 262px; display: flex; flex-direction: column; gap: 3px; padding: 12px 14px 11px; text-align: left; color: var(--ink); border: 1px solid color-mix(in srgb, var(--c) 45%, transparent); border-radius: 3px 14px 14px 14px; background: linear-gradient(155deg, color-mix(in srgb, var(--c) 14%, rgba(4, 12, 32, .92)), rgba(2, 7, 20, .92)); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); box-shadow: 0 14px 40px rgba(0, 0, 0, .5), 0 0 40px -14px var(--c); animation: coIn .22s ease-out; }
.callout[hidden] { display: none; }
.callout::before { content: ""; position: absolute; left: -1px; top: -1px; width: 26px; height: 2px; background: var(--c); box-shadow: 0 0 10px var(--c); }
@keyframes coIn { from { opacity: 0; clip-path: inset(0 0 100% 0); } to { opacity: 1; clip-path: inset(0 0 0 0); } }
.co-k { font: 9.5px var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--c); }
.co-k em, .co-s em { font-style: normal; color: var(--faint); }
.co-t { font-size: 19px; font-weight: 600; line-height: 1.15; letter-spacing: -.01em; color: #fff; }
.co-s { font-size: 12px; color: var(--muted); }
.co-s b { color: #fff; font-family: var(--mono); font-weight: 600; }
.co-bars { display: flex; align-items: flex-end; gap: 2px; height: 34px; margin-top: 8px; padding-bottom: 1px; border-bottom: 1px solid rgba(120, 170, 255, .18); }
.co-bars i { flex: 1; background: linear-gradient(to top, color-mix(in srgb, var(--c) 45%, transparent), var(--c)); border-radius: 1px 1px 0 0; opacity: .9; }
.co-axis { display: flex; justify-content: space-between; font: 9px var(--mono); color: var(--faint); letter-spacing: .06em; }
.co-h { margin-top: 6px; font-size: 11.5px; color: var(--c); letter-spacing: .04em; }
.co-h b { display: inline-block; transition: transform .15s; }
.callout:hover .co-h b { transform: translateX(4px); }

/* ---------- telemetry + frame ---------- */
.telemetry { position: fixed; right: 16px; bottom: 18px; z-index: 5; width: 232px; padding: 10px 12px 11px; font: 10.5px/1.5 var(--mono); color: var(--muted); border-left: 1px solid rgba(120, 180, 255, .25); background: linear-gradient(90deg, rgba(4, 14, 36, .55), rgba(4, 14, 36, 0)); pointer-events: none; }
.t-head { display: flex; justify-content: space-between; align-items: center; font-size: 9px; letter-spacing: .24em; text-transform: uppercase; color: var(--accent-2); margin-bottom: 6px; }
.t-head i { width: 6px; height: 6px; border-radius: 50%; background: #34f5c5; box-shadow: 0 0 8px #34f5c5; animation: beat 1.6s ease-in-out infinite; }
.t-row { display: grid; grid-template-columns: 62px 1fr; gap: 6px; }
.t-row span { letter-spacing: .14em; text-transform: uppercase; font-size: 9px; color: var(--faint); padding-top: 1px; }
.t-row b { font-weight: 500; color: #cfe6ff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.t-bars { display: grid; grid-template-columns: repeat(5, 1fr); gap: 3px; margin: 3px 0 6px 68px; counter-reset: x; }
.t-bars i { height: 3px; background: rgba(120, 170, 255, .14); border-radius: 1px; }
.t-bars i:nth-child(1) { background: var(--accent-2); box-shadow: 0 0 6px var(--accent-2); }
.t-bars[style*="--d: 1"] i:nth-child(-n+2), .t-bars[style*="--d: 2"] i:nth-child(-n+3), .t-bars[style*="--d: 3"] i:nth-child(-n+4), .t-bars[style*="--d: 4"] i { background: var(--accent-2); box-shadow: 0 0 6px var(--accent-2); }
.frame { position: fixed; inset: 0; pointer-events: none; z-index: 2; background: radial-gradient(ellipse at 50% 50%, transparent 55%, rgba(0, 2, 10, .55) 100%); }
.frame > i { position: absolute; width: 22px; height: 22px; border: 0 solid rgba(126, 200, 255, .35); }
.frame > i:nth-child(1) { left: 8px; top: 8px; border-width: 1px 0 0 1px; }
.frame > i:nth-child(2) { right: 8px; top: 8px; border-width: 1px 1px 0 0; }
.frame > i:nth-child(3) { left: 8px; bottom: 8px; border-width: 0 0 1px 1px; }
.frame > i:nth-child(4) { right: 8px; bottom: 8px; border-width: 0 1px 1px 0; }
.scanline { position: absolute; left: 0; right: 0; top: 0; height: 120px; background: linear-gradient(to bottom, transparent, rgba(80, 160, 255, .035), transparent); animation: sweep 11s linear infinite; }
@keyframes sweep { from { transform: translateY(-120px); } to { transform: translateY(100vh); } }
body.panel-open .telemetry { display: none; }
@media (max-width: 1240px) { .telemetry { display: none; } }

/* ---------- detail panel ---------- */
.panel { position: fixed; top: 74px; right: 16px; bottom: 16px; width: 410px; z-index: 7; overflow-y: auto; padding: 16px 18px 22px; transform: translateX(30px); opacity: 0; transition: transform .35s cubic-bezier(.2, .8, .2, 1), opacity .3s; scrollbar-width: thin; scrollbar-color: #24406e transparent; }
.panel.open { transform: none; opacity: 1; }
.panel .x { position: sticky; top: 0; float: right; margin: -4px -6px 0 0; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); background: var(--glass-hi); font-size: 20px; line-height: 1; z-index: 2; }
.panel .x:hover { border-color: var(--accent-2); }
.p-media { aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: #000; margin: 0 0 14px; clear: both; box-shadow: 0 0 40px -12px var(--accent); }
.p-media iframe { width: 100%; height: 100%; border: 0; display: block; }
.p-media.still { aspect-ratio: auto; background: #0b1c3d; }
.p-media.still img { width: 100%; display: block; }
.p-play { position: relative; display: block; width: 100%; height: 100%; padding: 0; border: 0; background: #000; }
.p-play img { width: 100%; height: 100%; object-fit: cover; opacity: .85; display: block; }
.p-play span { position: absolute; left: 50%; top: 50%; width: 64px; height: 64px; margin: -32px 0 0 -32px; border-radius: 50%; background: rgba(40, 130, 255, .85); box-shadow: 0 0 0 8px rgba(80, 170, 255, .2), 0 0 40px rgba(80, 170, 255, .8); transition: transform .15s; }
.p-play span::after { content: ""; position: absolute; left: 25px; top: 19px; border-style: solid; border-width: 13px 0 13px 21px; border-color: transparent transparent transparent #fff; }
.p-play:hover span { transform: scale(1.08); }
.p-kicker { margin: 0 0 4px; font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); display: flex; align-items: center; gap: 7px; }
.p-kicker i { width: 7px; height: 7px; border-radius: 50%; background: var(--c); box-shadow: 0 0 10px var(--c); }
.panel h2 { font-size: 22px; line-height: 1.2; margin: 0 0 4px; letter-spacing: -.01em; }
.p-meta { margin: 0 0 12px; color: var(--muted); font-size: 13.5px; }
/* binge bars: tall, quiet side bars either side of the video */
.p-stage { display: grid; grid-template-columns: 28px minmax(0, 1fr) 28px; gap: 6px; align-items: stretch; margin: 0 0 12px; clear: both; }
.p-stage .p-media { margin: 0; }
.p-media.none { aspect-ratio: 16 / 9; display: flex; align-items: center; justify-content: center; color: var(--faint); font-size: 12px; background: #06122b; box-shadow: none; }
.p-side { display: flex; align-items: center; justify-content: center; padding: 0; border: 1px solid var(--line); border-radius: 10px; background: linear-gradient(180deg, rgba(90, 160, 255, .07), rgba(90, 160, 255, .18) 50%, rgba(90, 160, 255, .07)); color: #cfe6ff; font-size: 26px; line-height: 1; transition: background .15s, border-color .15s, box-shadow .15s, color .15s; }
.p-side span { transform: translateY(-2px); }
.p-side:hover:not(:disabled), .p-side:focus-visible { background: rgba(90, 160, 255, .32); border-color: var(--accent-2); box-shadow: 0 0 22px -6px var(--accent); color: #fff; }
.p-side:disabled { opacity: .22; cursor: default; }
.p-next { display: flex; align-items: baseline; gap: 7px; min-width: 0; font-size: 12px; color: var(--muted); margin: 0 0 8px !important; }
.p-next > span { flex: none; font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.p-next button { min-width: 0; padding: 0; border: 0; background: none; color: inherit; font-weight: 600; color: #e6f1ff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: left; }
.p-next button:hover { color: var(--accent-2); text-decoration: underline; }
.p-next small { flex: none; color: var(--faint); font-size: 11px; }
.p-nav .q { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.p-nav label { flex: none; display: flex; align-items: center; gap: 5px; cursor: pointer; }
.p-nav input { accent-color: var(--accent-2); margin: 0; }
.p-nav { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px; border: 1px solid var(--line); border-radius: 10px; font-size: 11.5px; color: var(--muted); margin-bottom: 6px; }
.p-nav button { border: 0; background: rgba(90, 160, 255, .12); border-radius: 7px; padding: 4px 10px; font-size: 12px; }
.p-nav button:hover:not(:disabled) { background: rgba(90, 160, 255, .28); }
.p-nav button:disabled { opacity: .3; cursor: default; }
.panel h3 { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--accent); margin: 18px 0 4px; font-weight: 600; }
.panel h3 small { letter-spacing: 0; text-transform: none; color: var(--faint); font-weight: 400; }
.panel p { margin: 0; }
.panel dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; font-size: 12.5px; margin: 16px 0 0; padding: 12px; border-radius: 10px; background: rgba(4, 14, 36, .5); border: 1px solid var(--line); }
.panel dt { color: var(--muted); }
.panel dd { margin: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 14px; }
.chip { display: inline-block; padding: 2px 9px; border-radius: 999px; border: 1px solid var(--line); background: rgba(40, 90, 180, .14); font-size: 11.5px; color: #cfe2ff; }
button.chip:hover { border-color: var(--accent-2); }
.p-src { font-size: 12px; color: var(--muted); margin-top: 12px !important; }
.p-full { display: inline-block; margin-top: 12px; padding: 8px 14px; border-radius: 10px; background: linear-gradient(90deg, #1652d8, #1b8cff); color: #fff; text-decoration: none; font-size: 13px; font-weight: 600; box-shadow: 0 0 24px -6px var(--accent); }
.p-rel { list-style: none; padding: 0; margin: 6px 0 0; display: grid; gap: 6px; }
.p-rel button { width: 100%; display: flex; gap: 10px; align-items: center; padding: 5px; border-radius: 10px; border: 1px solid transparent; background: rgba(4, 14, 36, .45); text-align: left; }
.p-rel button:hover { border-color: var(--line); background: rgba(14, 40, 90, .5); }
.p-rel img { width: 64px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 6px; flex: none; }
.p-rel span { min-width: 0; display: flex; flex-direction: column; }
.p-rel b { font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.p-rel small { font-size: 11px; color: var(--muted); }

/* ---------- brief chat ---------- */
.chat { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); width: min(680px, calc(100vw - 32px)); z-index: 8; display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.chat-log { max-height: 0; overflow-y: auto; padding: 0 14px; transition: max-height .35s ease; scrollbar-width: thin; scrollbar-color: #24406e transparent; }
.chat.has-log .chat-log { max-height: min(46vh, 420px); padding-top: 12px; }
.chat.min .chat-log { max-height: 0; padding-top: 0; }
.chat-head { display: none; justify-content: space-between; align-items: center; padding: 8px 14px 0; font-size: 10.5px; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.chat.has-log .chat-head { display: flex; }
.chat-head button { border: 0; background: none; color: var(--muted); font-size: 12px; letter-spacing: normal; text-transform: none; }
.chat-head button:hover { color: var(--ink); }
.msg { margin: 0 0 12px; font-size: 13.5px; }
.msg.me { margin-left: auto; width: fit-content; max-width: 80%; padding: 7px 12px; border-radius: 14px 14px 4px 14px; background: linear-gradient(90deg, #1648c0, #1a7bea); }
.msg.bot p { margin: 4px 0 8px; }
.read { font-size: 12px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }
.r-row { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: thin; scrollbar-color: #24406e transparent; }
.r-card { flex: none; width: 150px; display: flex; flex-direction: column; gap: 2px; padding: 5px 5px 7px; border-radius: 10px; border: 1px solid var(--line); background: rgba(4, 14, 36, .6); text-align: left; }
.r-card:hover { border-color: var(--accent-2); }
.r-card img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 6px; margin-bottom: 3px; }
.r-card b { font-size: 12px; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.r-card small { font-size: 10.5px; color: var(--muted); }
.r-card i { font-style: normal; font-size: 10.5px; color: #b9cdea; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.r-act { display: flex; gap: 6px; margin-top: 4px; }
.r-act button { border: 1px solid var(--line); background: rgba(40, 90, 180, .14); border-radius: 8px; padding: 4px 10px; font-size: 12px; }
.r-act button:hover { border-color: var(--accent-2); }
.chat-bar { display: flex; align-items: center; gap: 8px; padding: 8px 8px 8px 16px; }
.chat-bar svg { width: 20px; height: 20px; flex: none; color: var(--accent-2); filter: drop-shadow(0 0 6px rgba(126, 240, 255, .7)); }
.chat-bar input { flex: 1; min-width: 0; border: 0; background: none; color: var(--ink); font: inherit; font-size: 15px; padding: 8px 2px; outline: none; }
.chat-bar input::placeholder { color: var(--faint); }
.chat-bar button { border: 0; border-radius: 11px; padding: 9px 16px; background: linear-gradient(90deg, #1652d8, #1b8cff); color: #fff; font-weight: 600; font-size: 13.5px; box-shadow: 0 0 24px -6px var(--accent); }
.chat-sugg { display: flex; gap: 6px; flex-wrap: wrap; padding: 0 14px 12px; }
.chat-sugg button { border: 1px solid var(--line); background: rgba(40, 90, 180, .12); border-radius: 999px; padding: 3px 11px; font-size: 12px; color: #cfe2ff; }
.chat-sugg button:hover { border-color: var(--accent-2); }
.chat-sugg[hidden] { display: none; }

.dim-note { position: fixed; left: 50%; transform: translateX(-50%); top: 74px; z-index: 6; display: flex; gap: 10px; align-items: center; padding: 6px 8px 6px 14px; font-size: 12.5px; }
.dim-note[hidden] { display: none; }
.dim-note button { border: 1px solid var(--line); background: rgba(40, 90, 180, .2); border-radius: 8px; padding: 3px 10px; font-size: 12px; }

/* ---------- intro + help + fallback ---------- */
.intro { position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; text-align: center; background: radial-gradient(ellipse at center, #071a44 0%, var(--bg) 70%); transition: opacity 1.3s ease, visibility 1.3s; }
.intro.done { opacity: 0; visibility: hidden; }
.intro h1 { margin: 0; font-size: clamp(30px, 6vw, 64px); letter-spacing: .4em; font-weight: 300; padding-left: .4em; text-shadow: 0 0 30px rgba(80, 170, 255, .8); }
.intro p { margin: 10px 0 0; color: var(--muted); letter-spacing: .14em; text-transform: uppercase; font-size: 12px; }
.intro .pulse { width: 9px; height: 9px; border-radius: 50%; margin: 26px auto 0; background: var(--accent-2); box-shadow: 0 0 20px var(--accent-2); animation: beat 1.2s ease-in-out infinite; }
@keyframes beat { 50% { transform: scale(1.8); opacity: .4; } }
.help { position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 15; width: min(460px, calc(100vw - 32px)); padding: 22px 24px; }
.help h2 { margin: 0 0 4px; font-size: 18px; }
.help p { margin: 0 0 14px; color: var(--muted); font-size: 13.5px; }
.help ul { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 8px; font-size: 13.5px; }
.help kbd { display: inline-block; min-width: 1.9em; padding: 1px 6px; margin-right: 8px; border-radius: 6px; border: 1px solid var(--line); background: rgba(40, 90, 180, .2); font: 12px var(--mono); text-align: center; }
.help > button { border: 0; border-radius: 10px; padding: 8px 16px; background: linear-gradient(90deg, #1652d8, #1b8cff); color: #fff; font-weight: 600; }
.fallback { position: fixed; inset: 0; z-index: 30; display: grid; place-items: center; text-align: center; padding: 24px; background: var(--bg); }
.fallback[hidden] { display: none; }
.fallback a { display: inline-block; margin-top: 12px; padding: 9px 16px; border-radius: 10px; background: #1b6cff; color: #fff; text-decoration: none; }
.no-webgl .hud-top, .no-webgl .atlas, .no-webgl .chat { display: none; }

@media (min-width: 901px) {
  body.panel-open .chat { left: calc(50vw - 88px); width: min(600px, calc(100vw - 740px)); min-width: 300px; }
  body.panel-open .chat-sugg { display: none; }
}

/* ---------- small screens ---------- */
@media (max-width: 1000px) { .brand small { display: none; } }
@media (max-width: 900px) {
  .atlas { transform: translateX(calc(-100% - 24px)); transition: transform .3s; top: 70px; max-height: calc(100vh - 190px); max-height: calc(100dvh - 190px); }
  .atlas.open { transform: none; }
  .tools .atlas-toggle { display: grid; }
  .panel { top: auto; left: 8px; right: 8px; bottom: 8px; width: auto; height: 62vh; height: 62dvh; transform: translateY(30px); border-radius: 18px 18px 14px 14px; }
  .panel.open ~ .chat { display: none; }
  .tools .wide { display: none; }
}
@media (max-width: 600px) {
  .hud-top { top: 8px; left: 8px; right: 8px; gap: 8px; }
  .brand small { display: none; }
  .brand { padding: 8px 10px; }
  .brand b { font-size: 12px; letter-spacing: .14em; white-space: nowrap; }
  .tools { padding: 3px; gap: 0; }
  .tools button, .tools a { min-width: 34px; padding: 0 7px; }
  .tools a[href="about.html"] { display: none; }
  .crumbs { display: none; }
  .chat { bottom: 8px; width: calc(100vw - 16px); }
  .chat-sugg { display: none; }
  .chat-bar input { font-size: 14px; }
  .dim-note { top: 60px; }
}
@media (prefers-reduced-motion: reduce) { .intro, .panel, .chat-log { transition: none; } .intro .pulse, .scanline, .leader circle.ring, .t-head i, .callout { animation: none; } }
.no-webgl .frame, .no-webgl .telemetry { display: none; }

/* Join button: shown by signup.js only when a sign-up address is set */
[data-join][hidden], [data-cookie-settings][hidden] { display: none !important; }

/* iPhone/iPad zoom into form fields smaller than 16px; keep them at 16px on touch screens */
@media (pointer: coarse) { input, select, textarea { font-size: 16px !important; } }
