/* KXTXR CONTROL ROOM — autonomous visual language. Not SFI UI. */
:root{
  --kx-void:#030201;--kx-ink:#080604;--kx-ember:#d68627;--kx-hot:#ffc05a;--kx-bone:#e5d3ae;
  --kx-rust:#713315;--kx-smoke:rgba(38,24,12,.56);--kx-line:rgba(222,139,39,.24);--kx-dim:rgba(213,165,101,.48);
  --cyan:#d68627!important;--cyan-dim:rgba(214,134,39,.18)!important;--cyan-faint:rgba(214,134,39,.07)!important;
  --gold:#c98a3e!important;--parchment:#d7c19a!important;--rune:#d3994d!important;--line:rgba(222,139,39,.18)!important;
}
html,body,.kxtxr-scene{background:var(--kx-void)!important;color:var(--kx-bone)}
.scene-bg{filter:saturate(.72) sepia(.10) contrast(1.08) brightness(.72);animation:kxBackgroundBreath 13s ease-in-out infinite;will-change:filter,transform}
.scene-bg::before{content:"";position:absolute;inset:0;background:linear-gradient(116deg,rgba(8,2,0,.52),transparent 32%,rgba(72,34,8,.055) 58%,rgba(0,0,0,.55));mix-blend-mode:multiply;pointer-events:none}
@keyframes kxBackgroundBreath{0%,100%{filter:saturate(.66) sepia(.12) contrast(1.08) brightness(.67);transform:scale(1.008)}50%{filter:saturate(.78) sepia(.08) contrast(1.12) brightness(.75);transform:scale(1.018)}}
.hud-title{color:#e7c590!important;text-shadow:0 0 9px rgba(224,133,29,.2)!important}.hud-recovery,.core-state{color:rgba(218,171,105,.5)!important}
.core-ring{border-color:rgba(219,139,43,.24)!important}.core-ring-2{border-color:rgba(164,84,23,.2)!important}.core-ring-3{border-color:rgba(239,173,72,.26)!important}.core-crosshair:before,.core-crosshair:after{background:rgba(204,120,31,.22)!important}
.projection-beam{background:linear-gradient(180deg,rgba(255,196,92,.02),rgba(225,125,28,.44) 68%,rgba(120,52,12,.02))!important;box-shadow:0 0 16px rgba(226,126,26,.24),0 0 70px rgba(115,46,9,.16)!important}
.projection-screen{background:linear-gradient(180deg,rgba(66,34,13,.20),rgba(13,7,3,.24) 42%,rgba(72,31,8,.12))!important;border-color:rgba(230,151,52,.18)!important;box-shadow:0 0 36px rgba(173,80,9,.12),inset 0 0 70px rgba(132,61,10,.05)!important;backdrop-filter:blur(4px) contrast(1.04)}
.projection-layer-name{color:#efd4aa!important}.projection-layer-subtitle,.projection-status,.projection-fragments-left,.projection-fragments-right{color:rgba(218,174,114,.48)!important}
.projection-frame{background:repeating-linear-gradient(180deg,transparent 0 4px,rgba(235,156,55,.018) 4px 5px)!important}
.scanlines{opacity:.06!important;background:repeating-linear-gradient(to bottom,transparent 0 2px,rgba(255,159,48,.028) 2px 3px)!important}.crt-noise{mix-blend-mode:soft-light!important;opacity:.065!important}.crt-roll{background:linear-gradient(180deg,transparent,rgba(230,137,37,.07),transparent)!important}

/* Primary runes are intentionally irregular: no institutional orbit. */
.rune-orbit{left:50%!important;top:50%!important}
.rune-node{width:66px!important;height:66px!important;border:0!important;border-radius:0!important;background:transparent!important;filter:drop-shadow(0 0 8px rgba(206,119,31,.12))!important;animation:kxRuneDrift 8.9s ease-in-out infinite,kxRuneCorrupt 7.7s steps(1,end) infinite!important}
.rune-node:nth-child(1){left:-39vw!important;top:-31vh!important;animation-delay:-1.2s,-4.1s!important}.rune-node:nth-child(2){left:31vw!important;top:-35vh!important;animation-delay:-4.8s,-1.8s!important}.rune-node:nth-child(3){left:39vw!important;top:-8vh!important;animation-delay:-2.3s,-6.2s!important}.rune-node:nth-child(4){left:27vw!important;top:34vh!important;animation-delay:-6.1s,-2.4s!important}.rune-node:nth-child(5){left:-11vw!important;top:39vh!important;animation-delay:-3.9s,-5.8s!important}.rune-node:nth-child(6){left:-36vw!important;top:27vh!important;animation-delay:-7.1s,-3.1s!important}.rune-node:nth-child(7){left:-42vw!important;top:1vh!important;animation-delay:-2.8s,-7.4s!important}.rune-node:nth-child(8){left:-24vw!important;top:-20vh!important;animation-delay:-5.5s,-1.1s!important}
.rune-main{stroke:#d99540!important;stroke-width:1.25!important;stroke-dasharray:17 8 3 12!important;filter:drop-shadow(0 0 5px rgba(225,125,26,.24))!important}.rune-frag{stroke:#ffac3c!important;opacity:.25!important}.rune-scan{stroke:#f7c47d!important;opacity:.33!important}.rune-ghost{stroke:#802f10!important;opacity:.18!important;filter:blur(1.4px)!important}
.rune-node::before{color:rgba(213,146,65,.35)!important}.rune-node::after{color:#d9a05b!important}
.rune-node:hover,.rune-node.is-active{filter:drop-shadow(0 0 9px rgba(255,174,62,.52)) drop-shadow(0 0 25px rgba(124,47,6,.24))!important}
@keyframes kxRuneDrift{0%,100%{transform:translate(-50%,-50%) rotate(-1.2deg)}34%{transform:translate(calc(-50% + 4px),calc(-50% - 7px)) rotate(.7deg)}67%{transform:translate(calc(-50% - 3px),calc(-50% + 4px)) rotate(-.4deg)}}
@keyframes kxRuneCorrupt{0%,84%,100%{clip-path:none;opacity:.72}85%{clip-path:polygon(0 0,100% 0,100% 31%,0 36%);transform:translate(calc(-50% + 6px),-50%);opacity:.25}86%{clip-path:polygon(0 42%,100% 37%,100% 72%,0 68%);transform:translate(calc(-50% - 5px),calc(-50% + 2px));opacity:1}87%{clip-path:none}}
.ambient-rune{opacity:.25!important;filter:drop-shadow(0 0 4px rgba(213,117,26,.11));animation:ambientBreath var(--dur,14s) ease-in-out infinite var(--delay,0s),runeGlitch 8.3s steps(1,end) infinite!important}.ambient-main{stroke:rgba(205,128,42,.46)!important}.ambient-frag{stroke:rgba(245,151,38,.28)!important}.ambient-scan{stroke:rgba(255,194,104,.38)!important}.ambient-ghost{stroke:rgba(99,34,8,.3)!important}
.artist-rune{border:0!important;border-radius:0!important;background:transparent!important;color:#d4913f!important;animation:kxArtistRune 9.6s ease-in-out infinite,kxRuneCorrupt 11s steps(1,end) infinite!important}.artist-rune span{color:#ae7941!important}.artist-rune path,.artist-rune circle{filter:drop-shadow(0 0 5px rgba(213,128,31,.24))}
@keyframes kxArtistRune{0%,100%{transform:translate(0,0) rotate(-1deg);opacity:.64}50%{transform:translate(5px,-7px) rotate(1deg);opacity:.96}}

/* Neural trace field */
.trace-graph{position:absolute;inset:0;z-index:16;pointer-events:none;overflow:hidden}.trace-edges{position:absolute;inset:0;width:100%;height:100%;overflow:visible}.trace-edge{fill:none;stroke:rgba(210,125,35,.28);stroke-width:1;stroke-dasharray:2 8;vector-effect:non-scaling-stroke;animation:kxEdgeFlow 3.7s linear infinite}.trace-edge.secondary{stroke:rgba(118,55,17,.22);stroke-dasharray:1 11}.trace-edge-hot{fill:none;stroke:rgba(255,183,76,.46);stroke-width:.7;stroke-dasharray:1 18;vector-effect:non-scaling-stroke;animation:kxEdgeFlow 1.8s linear infinite;filter:drop-shadow(0 0 3px rgba(219,121,25,.4))}@keyframes kxEdgeFlow{to{stroke-dashoffset:-80}}
.trace-node{position:absolute;z-index:17;width:48px;height:48px;margin:-24px 0 0 -24px;pointer-events:auto;border:0;background:transparent;color:#b8732d;cursor:pointer;opacity:0;transform:scale(.24) rotate(10deg);animation:kxNodeEmerge .62s cubic-bezier(.15,.86,.2,1) forwards,kxTracePulse 7.2s ease-in-out infinite 1s}.trace-node svg{width:100%;height:100%;overflow:visible}.trace-node path,.trace-node circle{fill:none;stroke:currentColor;stroke-width:1;vector-effect:non-scaling-stroke}.trace-node::after{content:attr(data-label);position:absolute;left:50%;top:100%;transform:translateX(-50%);font:500 7px/1.25 ui-monospace,'SF Mono',monospace;letter-spacing:.09em;color:rgba(217,167,105,.56);white-space:nowrap;max-width:150px;overflow:hidden;text-overflow:ellipsis}.trace-node[data-type="song"]{color:#f0a441}.trace-node[data-type="lore"]{color:#d0aa75}.trace-node[data-type="document"],.trace-node[data-type="history"]{color:#9b7045}.trace-node[data-type="image"],.trace-node[data-type="video"]{color:#bd6f31}.trace-node:hover,.trace-node.focus{color:#ffd08a;filter:drop-shadow(0 0 10px rgba(238,139,35,.5));z-index:22}.trace-node:nth-of-type(3n){animation-delay:.13s,1.4s}.trace-node:nth-of-type(4n){animation-delay:.25s,2.6s}.trace-node:nth-of-type(5n){animation-delay:.37s,3.2s}@keyframes kxNodeEmerge{35%{opacity:.3;transform:scale(1.22) translate(5px,-2px)}58%{opacity:.12;transform:scale(.76) translate(-4px,1px)}100%{opacity:.85;transform:scale(1)}}@keyframes kxTracePulse{0%,100%{opacity:.55}48%{opacity:.92}51%{opacity:.28}54%{opacity:.88}}
.trace-detail{position:absolute;z-index:23;right:24px;bottom:24px;width:min(360px,42vw);pointer-events:auto;padding:14px 16px 16px;background:rgba(8,5,2,.76);border-left:1px solid rgba(225,139,40,.35);backdrop-filter:blur(8px);opacity:0;transform:translateY(10px);transition:.35s}.trace-detail.show{opacity:1;transform:none}.trace-detail small{display:block;color:#98602d;font-size:7px;letter-spacing:.16em}.trace-detail b{display:block;margin:6px 0;color:#e2b477;font:400 20px/1.05 Georgia,serif}.trace-detail p{margin:0;color:#a98f70;font-size:8px;line-height:1.6}.trace-detail a{display:inline-block;margin-top:10px;color:#d58a37;font-size:7px;letter-spacing:.13em;text-decoration:none;border-bottom:1px solid rgba(213,138,55,.35)}
.projection-close{position:absolute;z-index:30;right:12px;top:10px;width:28px;height:28px;border:0;background:rgba(12,6,2,.46);color:#b57b3f;cursor:pointer;font-size:16px;line-height:28px;text-align:center;opacity:.7}.projection-close:hover{opacity:1;color:#ffd08a}.projection-screen:not(.is-open) .projection-close{display:none}
.kx-motes{position:absolute;inset:0;z-index:4;pointer-events:none;overflow:hidden}.kx-mote{position:absolute;width:1px;height:1px;background:#e99539;box-shadow:0 0 5px rgba(226,132,37,.7);opacity:.16;animation:kxMote var(--mt) linear infinite var(--md)}@keyframes kxMote{0%{transform:translate(0,15vh);opacity:0}18%{opacity:.22}78%{opacity:.12}100%{transform:translate(var(--mx),-110vh);opacity:0}}

@media(max-width:1180px){.rune-node:nth-child(1){left:-41vw!important;top:-35vh!important}.rune-node:nth-child(2){left:34vw!important;top:-37vh!important}.rune-node:nth-child(3){left:41vw!important;top:-5vh!important}.rune-node:nth-child(4){left:34vw!important;top:32vh!important}.rune-node:nth-child(5){left:-6vw!important;top:40vh!important}.rune-node:nth-child(6){left:-39vw!important;top:28vh!important}.rune-node:nth-child(7){left:-43vw!important;top:1vh!important}.rune-node:nth-child(8){left:-25vw!important;top:-22vh!important}.trace-detail{width:min(320px,48vw)}}
@media(max-width:700px){.rune-node{width:52px!important;height:52px!important}.trace-node{width:38px;height:38px;margin:-19px 0 0 -19px}.trace-node::after{display:none}.trace-detail{right:10px;left:10px;bottom:10px;width:auto}.scene-bg{animation-duration:18s}}
@media(prefers-reduced-motion:reduce){.scene-bg,.rune-node,.ambient-rune,.artist-rune,.trace-edge,.trace-edge-hot,.trace-node,.kx-mote{animation:none!important}}
