/* COMMAND — JARVIS DIRECTION (loaded after wings.css; supersedes the earlier Command rules)
   The dark chamber is the room; Jason's intelligence core floats over the dais; information hangs in space,
   angled toward him: hairlines and light, no boxes. Also: edge-seam navigation (no arrows, no corridor). */
body.hq #view-command { perspective: 1500px; overflow: hidden; }
body.warm-command #view-command .cm-bg { inset: -7% -6% -9%; background: url('../assets/hq/command-chamber-dark-b.webp') center 58% / cover no-repeat, #010409; }
#view-command .cm-bg::after { background: radial-gradient(ellipse 60% 55% at 50% 46%, transparent 0%, rgba(1,4,9,.15) 55%, rgba(1,4,9,.78) 100%), linear-gradient(180deg, rgba(1,4,9,.8) 0%, transparent 14%, transparent 74%, rgba(1,4,9,.9) 100%); }

/* title + one quiet status line */
#view-command .cm-head { top: 16px; left: 56px; right: 56px; display: flex; justify-content: space-between; align-items: flex-start; }
#view-command .cm-title .kicker { font-size: 9px; letter-spacing: .5em; color: rgba(143,227,255,.55); }
#view-command .cm-title h1 { font-size: 15px !important; letter-spacing: .55em !important; margin-top: 4px; }
#view-command .cm-chips { position: static !important; display: flex; gap: 0; background: none; }
#view-command #cm-chips > * { background: none !important; border: 0 !important; box-shadow: none !important; padding: 0 12px !important; font-size: 9.5px !important; letter-spacing: .26em; color: rgba(220,240,255,.62) !important; position: relative; }
#view-command #cm-chips > * + *::before { content: ''; position: absolute; left: -2px; top: 50%; width: 3px; height: 3px; border-radius: 50%; background: rgba(233,196,106,.6); transform: translateY(-50%); }

/* Jason's presence */
#view-command .cm-main { left: 27% !important; right: 30% !important; top: 8% !important; bottom: 3% !important; }
#view-command .cm-main > .cm-orbwrap { position: absolute; left: -16%; right: -16%; top: 0; height: 66%; }
#view-command #cm-orb { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 1; z-index: 2; }
.cm-holo.jp { --v: 0; position: absolute; left: 50%; top: 50%; bottom: auto; width: min(52vh, 74%); height: auto; aspect-ratio: 1; transform: translate(-50%, -50%); z-index: 1; }
.jp-core { position: absolute; inset: 9%; width: 82%; height: 82%; object-fit: contain; transform: scale(calc(1 + var(--v) * .045)); filter: brightness(calc(1 + var(--v) * .55)) saturate(calc(1 + var(--v) * .3)); animation: jpbreathe 7s ease-in-out infinite; }
.jp-glow { position: absolute; inset: -10%; border-radius: 50%; background: radial-gradient(circle, rgba(58,184,255,.22), rgba(58,184,255,.05) 45%, transparent 68%); opacity: calc(.6 + var(--v) * .4); }
.jp-flare { position: absolute; left: 50%; top: 50%; width: 22%; aspect-ratio: 1; border-radius: 50%; transform: translate(-50%, -50%) scale(calc(.6 + var(--v) * 1.5)); background: radial-gradient(circle, rgba(255,255,255,.95), rgba(160,235,255,.45) 35%, transparent 70%); opacity: calc(var(--v) * .9); }
.cm-holo.jp[data-state="listening"] .jp-glow { background: radial-gradient(circle, rgba(58,184,255,.32), transparent 66%); }
.cm-holo.jp[data-state="approval"] .jp-glow { background: radial-gradient(circle, rgba(255,181,71,.22), transparent 66%); }
@keyframes jpbreathe { 50% { translate: 0 -5px; } }
@media (prefers-reduced-motion: reduce) { .jp-core { animation: none; } }
#view-command .cm-state { bottom: 4%; font-size: 10px !important; letter-spacing: .7em !important; color: rgba(143,227,255,.7); z-index: 3; }
#view-command .cm-main > .cm-stage { top: 61%; }

/* captions + one elegant input line */
#view-command .cm-main > .cm-transcript { left: -10%; right: -10%; bottom: 74px; max-height: 26%; text-align: center; font-size: 13px; }
#view-command .cm-line b { display: none; }
#view-command .cm-line.owner p { color: rgba(233,196,106,.85); font-style: italic; }
#view-command .cm-line p { margin: 3px 0; }
#view-command .cm-main > .cm-input { left: -6%; right: -6%; bottom: 32px; display: flex; background: none; border: 0; }
#view-command .cm-input input { flex: 1; height: 36px; padding: 0 18px; border-radius: 18px 0 0 18px; background: rgba(2,10,20,.55); border: 1px solid rgba(143,227,255,.22); border-right: 0; color: #e8f6ff; }
#view-command .cm-input .btn { height: 36px; border-radius: 0 18px 18px 0; background: rgba(233,196,106,.12); border: 1px solid rgba(233,196,106,.4); }
#view-command .cm-main > .cm-controls { left: -6%; right: -6%; bottom: 0; justify-content: center; gap: 14px; }
#view-command .cm-controls .btn, #view-command .cm-mic { background: none !important; border: 0 !important; box-shadow: none !important; color: rgba(220,240,255,.6) !important; font-size: 9.5px !important; letter-spacing: .3em; padding: 4px 6px !important; }
#view-command .cm-mic { color: #e9c46a !important; }
#view-command .cm-mic:hover, #view-command .cm-controls .btn:hover { color: #fff !important; }

/* information hangs in space, angled toward Jason: no boxes */
#view-command .cm-evidence, #view-command .cm-console { background: none !important; border: 0 !important; box-shadow: none !important; backdrop-filter: none !important; clip-path: none !important; }
#view-command .cm-evidence::before, #view-command .cm-evidence::after, #view-command .cm-console::before, #view-command .cm-console::after { display: none !important; }
#view-command .cm-evidence { left: 56px !important; top: 22% !important; bottom: 18% !important; width: 21% !important; padding: 4px 0 4px 18px; transform: rotateY(14deg); transform-origin: left center;
  border-left: 1px solid transparent !important; border-image: linear-gradient(180deg, transparent, rgba(233,196,106,.6) 30%, rgba(58,184,255,.4) 70%, transparent) 1 !important; }
#view-command .cm-console { right: 56px !important; top: 14% !important; bottom: 12% !important; width: 26% !important; padding: 4px 18px 4px 0; transform: rotateY(-14deg); transform-origin: right center;
  border-right: 1px solid transparent !important; border-image: linear-gradient(180deg, transparent, rgba(233,196,106,.6) 30%, rgba(58,184,255,.4) 70%, transparent) 1 !important; }
#view-command .cm-evidence h3, #view-command .cm-console h4 { font-size: 9.5px !important; letter-spacing: .4em !important; color: rgba(233,196,106,.85) !important; border: 0 !important; background: none !important; padding: 0 !important; margin: 14px 0 6px !important; }
#view-command .cm-evidence h3::before, #view-command .cm-console h4::before { display: none !important; }
#view-command .cm-evidence p, #view-command .cm-console { color: rgba(225,240,250,.82); font-size: 12.5px; text-shadow: 0 1px 8px rgba(0,0,0,.9); }
#view-command .cm-tabs { display: flex; flex-wrap: wrap; gap: 4px 14px; justify-content: flex-end; border: 0 !important; background: none !important; }
#view-command .cm-tabs button { background: none !important; border: 0 !important; padding: 2px 0 !important; font-size: 9px !important; letter-spacing: .28em; color: rgba(220,240,255,.45) !important; border-bottom: 1px solid transparent !important; }
#view-command .cm-tabs button.on, #view-command .cm-tabs button[aria-selected="true"] { color: #e9c46a !important; border-bottom-color: rgba(233,196,106,.7) !important; }
#view-command .cm-tab { overflow: auto; scrollbar-width: thin; scrollbar-color: rgba(233,196,106,.3) transparent; text-align: right; }
#view-command .cm-row, #view-command .cm-ev, #view-command .cm-card { background: none !important; border: 0 !important; border-bottom: 1px solid rgba(143,227,255,.08) !important; box-shadow: none !important; }
@media (max-width: 1100px) { #view-command .cm-evidence { display: none; } #view-command .cm-main { left: 6% !important; } }

/* NAVIGATION — thin light seams at the screen edges (no arrows, no corridor) */
.hq-sweep, .hq-corridor { display: none !important; }
.hq-edge { top: 0 !important; bottom: 0; height: 100%; transform: none !important; width: 34px; padding: 0 !important; justify-content: center; opacity: 1 !important; }
.hq-edge.left { left: 0 !important; }
.hq-edge.right { right: 0 !important; }
.hq-edge .hq-chev { display: none !important; }
.hq-edge::before { content: ''; position: absolute; top: 22%; bottom: 22%; width: 1px; background: linear-gradient(180deg, transparent, rgba(143,227,255,.35) 30%, rgba(233,196,106,.45) 50%, rgba(143,227,255,.35) 70%, transparent); transition: width .3s, opacity .3s, box-shadow .3s; opacity: .55; }
.hq-edge.left::before { left: 6px; }
.hq-edge.right::before { right: 6px; }
.hq-edge:hover::before, .hq-edge:focus-visible::before { width: 2px; opacity: 1; box-shadow: 0 0 18px rgba(143,227,255,.55); }
.hq-edge b { position: absolute; top: 50%; max-width: none !important; writing-mode: vertical-rl; font: 500 9px var(--f-hud) !important; letter-spacing: .55em !important; color: rgba(220,240,255,.75); opacity: 0; transition: opacity .3s, transform .3s; }
.hq-edge.left b { left: 14px; transform: translate(-6px, -50%) rotate(180deg); }
.hq-edge.right b { right: 14px; transform: translate(6px, -50%); }
.hq-edge:hover b, .hq-edge:focus-visible b { opacity: 1; }
.hq-edge.left:hover b { transform: translate(0, -50%) rotate(180deg); }
.hq-edge.right:hover b { transform: translate(0, -50%); }
.hq-dots { gap: 6px !important; }
.hq-dots i { width: 18px !important; height: 1px !important; border-radius: 0 !important; background: rgba(220,240,255,.25) !important; }
.hq-dots i.on { width: 34px !important; background: rgba(233,196,106,.85) !important; }
/* travel: one smooth camera pan */
body.hq .hq-env { transition: transform .9s cubic-bezier(.65, 0, .25, 1), filter .9s ease !important; }
body.hq.hq-travel .hq-env { filter: brightness(.82) !important; }

/* refinement */
#view-command .cm-main { overflow: visible !important; }
#view-command .cm-main > .cm-stage { top: 63%; }
#view-command .cm-stage .btn, #view-command .cm-stage button { background: none !important; border: 0 !important; border-top: 1px solid rgba(233,196,106,.5) !important; border-bottom: 1px solid rgba(233,196,106,.5) !important; clip-path: none !important; box-shadow: none !important; padding: 7px 26px !important; font-size: 10px !important; letter-spacing: .55em !important; color: #e9c46a !important; }
#view-command .cm-stage .btn:hover, #view-command .cm-stage button:hover { background: rgba(233,196,106,.08) !important; }
#view-command .cm-console { transform: rotateY(-9deg); }
#view-command .cm-evidence { transform: rotateY(9deg); }
#view-command .cm-main > .cm-orbwrap { top: 3%; }
#view-command .cm-main > .cm-stage { top: 69%; }

/* LIVE HOLOGRAM (WebGL) — the canvas extends beyond the core so rings and bloom have room; painted core is the fallback */
.cm-holo.jp .jp-gl { position: absolute; left: -38%; top: -38%; width: 176%; height: 176%; pointer-events: none; }
#view-command.holo-live .jp-core, #view-command.holo-live .jp-flare { display: none; }
#view-command.holo-live .jp-glow { inset: -30%; opacity: calc(.35 + var(--v) * .5); background: radial-gradient(circle, rgba(58,184,255,.16), rgba(58,184,255,.04) 45%, transparent 68%); }
/* the hologram lights the dais beneath it (driven by the same real level, --hv) */
.jp-dais { position: absolute; left: 50%; top: 79%; width: 34%; height: 9%; transform: translateX(-50%); border-radius: 50%; pointer-events: none; z-index: 1; background: radial-gradient(ellipse, rgba(120,220,255,.55), rgba(58,184,255,.18) 45%, transparent 72%); opacity: calc(.18 + var(--hv, 0) * .75); mix-blend-mode: screen; }

/* projection beam: emitter sits on the painted dais, light rises into the hologram (brightens with the real level) */
#view-command .jp-beam { position: absolute; left: 50%; top: 27%; height: 60%; width: auto; transform: translateX(-50%); z-index: 1; pointer-events: none; opacity: calc(.42 + var(--hv, 0) * .45); filter: brightness(calc(1 + var(--hv, 0) * .5)); }
#view-command .jp-beam:not([src]) { display: none; }
#view-command .jp-beam { -webkit-mask-image: radial-gradient(ellipse 48% 52% at 50% 60%, #000 55%, transparent 100%); mask-image: radial-gradient(ellipse 48% 52% at 50% 60%, #000 55%, transparent 100%); }
