/* Prototype 01: Dark Optic */

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #000; }
body { font-family: var(--font-ui); color: var(--text); -webkit-font-smoothing: antialiased; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, p, ul { margin: 0; }
ul { padding: 0; list-style: none; }
img { display: block; }
b { font-weight: 700; }

/* ---------- fixed 16:9 stage, scaled to fit ---------- */
.viewport { position: fixed; inset: 0; overflow: hidden; background: radial-gradient(ellipse at center, #0a0f1d, #000 70%); }
.stage {
  position: absolute; left: 50%; top: 50%;
  width: 1920px; height: 1080px;
  transform: translate(-50%, -50%) scale(var(--scale, 1));
  overflow: hidden; background: var(--bg);
  font-variant-numeric: tabular-nums;
  user-select: none;
}
.city { position: absolute; inset: 0; width: 1920px; height: 1080px; transition: filter var(--dur-panel) var(--ease-out); }
/* pause freezes and dims whatever sits underneath it (the inventory) */
.stage.is-dimmed .city,
.stage.is-dimmed .inventory { filter: blur(6px) saturate(0.45) brightness(0.5); }
.inventory { transition: filter var(--dur-panel) var(--ease-out); }

.screen { position: absolute; inset: 0; visibility: hidden; }
.screen.is-on { visibility: visible; }
.overlay { z-index: 5; }

/* texture + transition layers */
.fx-scan { position: absolute; inset: 0; z-index: 30; pointer-events: none; background: repeating-linear-gradient(0deg, rgb(255 255 255 / 0.022) 0 1px, transparent 1px 3px); mix-blend-mode: overlay; }
.fx-vignette { position: absolute; inset: 0; z-index: 29; pointer-events: none; background: radial-gradient(ellipse at center, transparent 55%, rgb(0 0 0 / 0.6) 100%); }
.iris-ring { position: absolute; left: 960px; top: 540px; width: 240px; height: 240px; margin: -120px; border-radius: 50%; border: 2px solid var(--cyan); box-shadow: 0 0 32px var(--cyan-32), inset 0 0 32px var(--cyan-32); opacity: 0; pointer-events: none; z-index: 20; }
.wipe-bar { position: absolute; top: 0; bottom: 0; left: 0; width: 4px; background: var(--cyan); box-shadow: 0 0 24px 4px var(--cyan-32), 0 0 80px 10px rgb(61 232 250 / 0.18); opacity: 0; pointer-events: none; z-index: 20; }
.boot { position: absolute; inset: 0; z-index: 40; background: #000; pointer-events: none; display: none; }
.boot i { position: absolute; left: 0; right: 0; top: 539px; height: 2px; background: var(--cyan); box-shadow: 0 0 20px var(--cyan); transform: scaleX(0); }

/* ---------- shared atoms ---------- */
.cham {
  --c: var(--cut); --edge: var(--line); --fill: rgb(14 20 36 / 0.88);
  position: relative; isolation: isolate;
  clip-path: polygon(0 0, calc(100% - var(--c)) 0, 100% var(--c), 100% 100%, var(--c) 100%, 0 calc(100% - var(--c)));
  background: var(--edge);
  transition: background-color var(--dur-focus) var(--ease-out);
}
.cham::before {
  content: ""; position: absolute; inset: 1px; z-index: -1;
  clip-path: polygon(0 0, calc(100% - var(--c)) 0, 100% var(--c), 100% 100%, var(--c) 100%, 0 calc(100% - var(--c)));
  background: var(--fill);
  transition: background-color var(--dur-focus) var(--ease-out);
}

.eyebrow { font-weight: 600; font-size: 14px; letter-spacing: 0.3em; text-transform: uppercase; color: var(--cyan); }
.eyebrow.orange { color: var(--orange); }

.kbd {
  display: inline-grid; place-items: center; min-width: 30px; height: 30px; padding: 0 7px; margin-left: 16px;
  border: 1px solid var(--line-2); background: var(--surface-2); color: var(--text);
  font-weight: 700; font-size: 14px; letter-spacing: 0.04em;
  box-shadow: inset 0 -3px 0 rgb(0 0 0 / 0.35);
}
.kbd + .kbd { margin-left: 4px; }
.kbd.wide { padding: 0 10px; }
.hints { display: flex; align-items: center; gap: 8px; }


/* big-number + small-label stat */
.stat { display: flex; flex-direction: column; gap: 4px; }
.stat b { font-family: var(--font-display); font-weight: 800; font-size: 30px; line-height: 1; color: var(--text); }
.stat span { position: relative; font-weight: 600; font-size: 13px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--muted); }
.stat span i { position: absolute; left: 0; right: 0; bottom: -8px; height: 2px; background: var(--line); }
.stat span i::after { content: ""; position: absolute; inset: 0; background: var(--cyan); transform: scaleX(var(--v)); transform-origin: left; }

/* chromatic ghost behind big display type */
.ghosted { position: relative; }
.ghosted::before, .ghosted::after {
  content: attr(data-text); position: absolute; inset: 0; z-index: -1; pointer-events: none;
  mix-blend-mode: screen; opacity: 0.55;
}
.ghosted::before { color: var(--cyan); transform: translate(-3px, 1px); }
.ghosted::after { color: var(--magenta); transform: translate(3px, -1px); }

/* ---------- menu rows (title + pause) ---------- */
.menu { display: grid; gap: 6px; width: 600px; }
.menu-item {
  --c: 18px;
  position: relative; display: grid; grid-template-columns: 54px 1fr auto; align-items: center;
  height: 66px; padding: 0 26px 0 22px; text-align: left;
  font-weight: 600; font-size: 25px; letter-spacing: 0.14em; text-transform: uppercase;
  clip-path: polygon(0 0, calc(100% - var(--c)) 0, 100% var(--c), 100% 100%, var(--c) 100%, 0 calc(100% - var(--c)));
  background: linear-gradient(90deg, rgb(14 20 36 / 0.7), rgb(14 20 36 / 0.15));
  outline: none;
  transition: color var(--dur-press) var(--ease-out);
}
.menu-item::before { /* focus fill sweeps in from the left */
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: var(--cyan);
  transform: scaleX(0); transform-origin: left;
  transition: transform var(--dur-focus) var(--ease-out);
}
.menu-item::after { /* hairline under each row */
  content: ""; position: absolute; left: 22px; right: 0; bottom: 0; height: 1px; background: var(--line);
}
.menu-item { isolation: isolate; }
.menu-item .idx { font-size: 14px; font-weight: 700; letter-spacing: 0.1em; color: var(--muted); transition: color var(--dur-press) var(--ease-out); }
.menu-item .meta { font-size: 14px; font-weight: 600; letter-spacing: 0.16em; color: var(--muted); transition: color var(--dur-press) var(--ease-out); }
.menu-item:focus-visible, .menu-item.is-focus { color: var(--ink); }
.menu-item:focus-visible::before, .menu-item.is-focus::before { transform: scaleX(1); }
.menu-item:focus-visible .idx, .menu-item.is-focus .idx,
.menu-item:focus-visible .meta, .menu-item.is-focus .meta { color: var(--ink); }
.menu-item:active { transform: scale(0.99); }
.menu-item.is-locked .label { color: var(--muted); }
.menu-item.is-locked::before { background: var(--line-2); }
.menu-item.is-locked:focus-visible, .menu-item.is-locked.is-focus { color: var(--text); }
.menu-item.is-locked:focus-visible .label, .menu-item.is-locked.is-focus .label,
.menu-item.is-locked:focus-visible .idx, .menu-item.is-locked.is-focus .idx,
.menu-item.is-locked:focus-visible .meta, .menu-item.is-locked.is-focus .meta { color: var(--text); }

.tag { display: inline-block; padding: 4px 9px; background: var(--magenta); color: var(--ink); font-size: 12px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; }

/* ---------- TITLE ---------- */
.title::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(90deg, rgb(7 10 20 / 0.92) 0%, rgb(7 10 20 / 0.78) 34%, rgb(7 10 20 / 0) 58%); }
.title-left { position: absolute; left: 120px; top: 150px; width: 780px; z-index: 2; }
.logo { display: flex; align-items: center; gap: 30px; }
.logo-mark { position: relative; width: 78px; height: 78px; flex: none; }
.logo-mark i { position: absolute; display: block; }
.logo-mark i:first-child { left: 0; top: 0; width: 58px; height: 58px; background: var(--cyan); }
.logo-mark i:last-child { right: 0; bottom: 0; width: 30px; height: 30px; background: var(--magenta); }
.logo-word {
  position: relative; display: flex; isolation: isolate;
  font-family: var(--font-display); font-weight: 900; font-size: 128px; line-height: 0.9; letter-spacing: -0.01em;
}
.logo-word span { display: inline-block; }
.logo-word::before, .logo-word::after {
  content: attr(data-text); position: absolute; inset: 0; z-index: -1; pointer-events: none; mix-blend-mode: screen; opacity: 0.6;
}
.logo-word::before { color: var(--cyan); transform: translate(-4px, 2px); }
.logo-word::after { color: var(--magenta); transform: translate(4px, -2px); }
.logo-word.glitch::before { animation: glitch-a 220ms steps(2) 1; }
.logo-word.glitch::after { animation: glitch-b 220ms steps(2) 1; }
@keyframes glitch-a { 0% { transform: translate(-10px, 2px); clip-path: inset(10% 0 55% 0); } 50% { transform: translate(6px, -2px); clip-path: inset(60% 0 8% 0); } 100% { transform: translate(-4px, 2px); clip-path: inset(0); } }
@keyframes glitch-b { 0% { transform: translate(10px, -2px); clip-path: inset(50% 0 20% 0); } 50% { transform: translate(-6px, 2px); clip-path: inset(5% 0 70% 0); } 100% { transform: translate(4px, -2px); clip-path: inset(0); } }


.title-tag { display: inline-block; margin: 22px 0 60px 108px; padding: 8px 18px 8px 26px; border: 1px solid var(--line-2); font-family: var(--font-display); font-weight: 700; font-size: 22px; letter-spacing: 0.62em; text-transform: uppercase; color: var(--orange); }
.lens { position: absolute; left: 1010px; top: 70px; width: 800px; height: 800px; z-index: 1; }
.lens-rings { position: absolute; inset: 0; overflow: visible; }
.ring { fill: none; stroke: var(--line-2); stroke-width: 1; }
.ring.r1 { stroke: var(--line); }
.ring.ticks { stroke: var(--cyan); stroke-width: 12; stroke-dasharray: 1.4 10; opacity: 0.3; }
.ring.r3 { stroke: var(--cyan-32); stroke-dasharray: 3 7; }
.ring.r5 { stroke: rgb(224 78 232 / 0.25); }
.arc { fill: none; stroke-width: 3; stroke-linecap: square; }
.arc.a1 { stroke: var(--cyan); }
.arc.a2 { stroke: var(--magenta); }
.arc.a3 { stroke: var(--orange); stroke-width: 2; }
.cross { stroke: var(--cyan); stroke-width: 1.5; opacity: 0.6; }
.lens-label { fill: var(--muted); font-family: var(--font-ui); font-weight: 600; font-size: 13px; letter-spacing: 0.3em; }
.spin-slow { transform-origin: 400px 400px; animation: spin 90s linear infinite; }
.spin-rev { transform-origin: 400px 400px; animation: spin 60s linear infinite reverse; }
@keyframes spin { to { transform: rotate(360deg); } }

.holo { position: absolute; }
.holo img { width: 100%; height: 100%; filter: drop-shadow(-3px 0 0 rgb(224 78 232 / 0.5)) drop-shadow(3px 0 0 rgb(61 232 250 / 0.45)) drop-shadow(0 0 26px rgb(61 232 250 / 0.22)); }
.holo-scan { position: absolute; inset: 0; overflow: hidden; pointer-events: none; mix-blend-mode: screen; -webkit-mask: var(--mask) center / contain no-repeat; mask: var(--mask) center / contain no-repeat; }
.holo-scan > div {
  position: absolute; left: 0; right: 0; top: -100%; height: 300%;
  background:
    linear-gradient(180deg, transparent 46%, rgb(61 232 250 / 0.38) 50%, transparent 54%),
    repeating-linear-gradient(0deg, rgb(61 232 250 / 0.13) 0 2px, transparent 2px 5px);
  animation: holo-sweep 4.8s linear infinite;
}
@keyframes holo-sweep { to { transform: translateY(33.333%); } }

.title-cassidy { left: 244px; top: 62px; width: 313px; height: 710px; animation: bob 5s ease-in-out infinite alternate; will-change: transform; }
  position: absolute; left: 470px; top: 190px; width: 300px; height: 470px;
  background: linear-gradient(200deg, rgb(61 232 250 / 0.2), rgb(61 232 250 / 0) 75%);
  clip-path: polygon(74% 0, 82% 0, 62% 100%, 2% 100%);
  mix-blend-mode: screen; animation: beam 2.8s ease-in-out infinite alternate;
}
@keyframes bob { from { transform: translateY(-8px); } to { transform: translateY(8px); } }

.log-card { position: absolute; right: 110px; bottom: 100px; width: 400px; padding: 22px 26px 24px; z-index: 2; --edge: rgb(255 122 46 / 0.45); --fill: rgb(7 10 20 / 0.9); }
.log-card h2 { margin: 10px 0 8px; font-family: var(--font-display); font-weight: 800; font-size: 20px; line-height: 1.2; }
.log-card p:last-child { color: var(--muted); font-size: 17px; line-height: 1.45; text-wrap: pretty; }
.log-card .eyebrow { color: var(--orange); }


/* ---------- INVENTORY ---------- */
.inventory { background: radial-gradient(1400px 700px at 50% -10%, rgb(61 232 250 / 0.06), transparent 70%), rgb(7 10 20 / 0.93); }
.inventory::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0.22; background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: 60px 60px; -webkit-mask: radial-gradient(ellipse at center, #000 30%, transparent 80%); mask: radial-gradient(ellipse at center, #000 30%, transparent 80%); }
.inv-head { position: absolute; left: 60px; right: 60px; top: 30px; height: 150px; }
.inv-head::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: linear-gradient(90deg, var(--magenta) 0 140px, var(--line) 140px); }
.crumb { position: absolute; left: 0; top: 6px; font-weight: 600; font-size: 16px; letter-spacing: 0.26em; color: var(--cyan); }
.crumb i { font-style: normal; margin: 0 12px; color: var(--magenta); }
.screen-title { position: absolute; left: -4px; top: 44px; isolation: isolate; font-family: var(--font-display); font-weight: 900; font-size: 74px; line-height: 1; letter-spacing: -0.01em; }
.screen-title::before, .screen-title::after { content: attr(data-text); position: absolute; inset: 0; z-index: -1; mix-blend-mode: screen; opacity: 0.5; }
.screen-title::before { color: var(--cyan); transform: translate(-3px, 1px); }
.screen-title::after { color: var(--magenta); transform: translate(3px, -1px); }

.callout { position: absolute; left: 50%; top: -6px; width: 600px; margin-left: -250px; padding: 14px 28px 16px; text-align: center; --b: var(--orange);
  background:
    linear-gradient(var(--b), var(--b)) left top / 18px 2px no-repeat, linear-gradient(var(--b), var(--b)) left top / 2px 18px no-repeat,
    linear-gradient(var(--b), var(--b)) right top / 18px 2px no-repeat, linear-gradient(var(--b), var(--b)) right top / 2px 18px no-repeat,
    linear-gradient(var(--b), var(--b)) left bottom / 18px 2px no-repeat, linear-gradient(var(--b), var(--b)) left bottom / 2px 18px no-repeat,
    linear-gradient(var(--b), var(--b)) right bottom / 18px 2px no-repeat, linear-gradient(var(--b), var(--b)) right bottom / 2px 18px no-repeat,
    linear-gradient(180deg, rgb(255 122 46 / 0.10), rgb(4 6 12 / 0.6)); }
.callout-src { display: block; font-weight: 700; font-size: 14px; letter-spacing: 0.32em; color: var(--b); }
.callout-msg { display: block; margin-top: 6px; font-weight: 600; font-size: 23px; letter-spacing: 0.08em; text-transform: uppercase; }
.callout.is-ok { --b: var(--cyan); background-color: transparent; }
.callout.is-warn { --b: var(--magenta); }

.inv-stats { position: absolute; right: 0; top: 0; display: flex; gap: 44px; }
.tabs { position: absolute; right: 0; top: 92px; display: flex; align-items: center; gap: 6px; }
.tabs .kbd { margin: 0 8px; }
.tab { --c: 10px; height: 44px; padding: 0 26px; font-weight: 600; font-size: 17px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); border: 1px solid var(--line); clip-path: polygon(0 0, calc(100% - var(--c)) 0, 100% var(--c), 100% 100%, var(--c) 100%, 0 calc(100% - var(--c))); transition: color var(--dur-focus) var(--ease-out), background-color var(--dur-focus) var(--ease-out), border-color var(--dur-focus) var(--ease-out); outline: none; }
.tab.is-active { color: var(--cyan); border-color: var(--cyan); background: var(--cyan-16); }
.tab:focus-visible { border-color: var(--cyan); color: var(--text); }

.inv-body { position: absolute; left: 60px; top: 206px; width: 1800px; height: 770px; display: grid; grid-template-columns: 320px 640px 440px 310px; gap: 30px; }
.col { position: relative; }
.col-title { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 14px; padding-bottom: 10px; border-bottom: 1px solid var(--line); font-weight: 700; font-size: 17px; letter-spacing: 0.22em; text-transform: uppercase; }
.col-title span::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 10px; background: var(--magenta); vertical-align: 2px; }
.storage .col-title span::before { background: var(--cyan); }
.col-title em { font-style: normal; font-weight: 600; font-size: 14px; letter-spacing: 0.16em; color: var(--muted); }

/* loadout */
.gear-list { display: grid; gap: 12px; }
.gear { --c: 16px; display: grid; grid-template-columns: 112px 1fr; align-items: center; gap: 14px; height: 126px; padding: 10px 16px 10px 14px; text-align: left; outline: none; }
.gear img { width: 112px; height: 106px; object-fit: contain; filter: drop-shadow(0 6px 14px rgb(0 0 0 / 0.5)); }
.gear-slot { font-weight: 700; font-size: 13px; letter-spacing: 0.22em; color: var(--muted); }
.gear-name { margin: 6px 0 4px; font-weight: 600; font-size: 19px; line-height: 1.15; }
.gear.is-current, .gear:focus-visible { --edge: var(--cyan); }

/* rig */
.rig-lens { position: absolute; inset: 0; overflow: visible; }
.rig-lens circle { fill: none; stroke: var(--line); }
.rig-lens .dash { stroke: var(--cyan-32); stroke-dasharray: 3 8; transform-origin: 320px 370px; animation: spin 120s linear infinite; }
.rig-cassidy { position: absolute; left: 140px; top: 40px; width: 360px; height: 648px; filter: drop-shadow(-2px 0 0 rgb(224 78 232 / 0.35)) drop-shadow(2px 0 0 rgb(61 232 250 / 0.35)) drop-shadow(0 0 30px rgb(61 232 250 / 0.12)); }
.traces { position: absolute; inset: 0; overflow: visible; pointer-events: none; }
.traces .wire { fill: none; stroke: var(--line-2); stroke-width: 1.5; transition: stroke var(--dur-panel) var(--ease-out); }
.traces .wire.on { stroke: rgb(61 232 250 / 0.55); }
.traces .wire.on.passive { stroke: rgb(224 78 232 / 0.55); }
.traces .pulse { fill: none; stroke: var(--cyan); stroke-width: 3; stroke-linecap: round; opacity: 0; }
.traces .node { fill: var(--surface); stroke: var(--line-2); stroke-width: 1.5; }
.traces .node.on { fill: var(--cyan); stroke: var(--cyan); }
.traces .node.on.passive { fill: var(--magenta); stroke: var(--magenta); }
.traces .burst { fill: none; stroke: var(--cyan); stroke-width: 2; opacity: 0; transform-box: fill-box; transform-origin: center; }

.slot { --c: 14px; position: absolute; width: 128px; height: 150px; padding: 10px 12px 12px; display: grid; grid-template-rows: auto 1fr auto; text-align: left; outline: none; }
.slot.passive { height: 112px; --edge: rgb(224 78 232 / 0.45); }
.slot-top { display: flex; justify-content: space-between; align-items: center; font-weight: 700; font-size: 13px; letter-spacing: 0.12em; color: var(--muted); }
.slot-top .kbd { margin: 0; height: 24px; min-width: 24px; padding: 0 6px; font-size: 13px; }
.slot.passive .slot-top .kbd { color: var(--magenta); }
.slot-icon { display: grid; place-items: center; }
.slot-icon .mod-img { width: 72px; height: 72px; border: 1px solid color-mix(in srgb, var(--rc) 60%, transparent); }
.slot.passive .slot-icon .mod-img { width: 48px; height: 48px; }
.slot-name { font-weight: 600; font-size: 14px; letter-spacing: 0.06em; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.slot.is-empty { --edge: rgb(52 68 106 / 0.6); --fill: rgb(7 10 20 / 0.55); }
.slot.is-empty .slot-name { color: var(--muted); }
.slot.is-empty .slot-icon::before { content: ""; width: 34px; height: 34px; border: 1px dashed var(--line-2); transform: rotate(45deg); }
.slot:focus-visible, .slot.is-current { --edge: var(--cyan); }
.slot.is-target { --edge: var(--cyan); --fill: rgb(13 40 54 / 0.9); }
.slot.passive.is-target { --edge: var(--magenta); --fill: rgb(40 16 46 / 0.9); }
.slot.is-flash::before { background: rgb(61 232 250 / 0.35); }
.rig-legend { position: absolute; left: 0; right: 0; bottom: 0; display: flex; justify-content: center; gap: 30px; font-weight: 600; font-size: 13px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); }
.rig-legend .sw { display: inline-block; width: 10px; height: 10px; margin-right: 8px; vertical-align: -1px; border: 2px solid var(--cyan); }
.rig-legend .sw.passive { border-color: var(--magenta); }

/* storage grid */
.filters { display: flex; gap: 8px; }
.chip { height: 34px; padding: 0 16px; border: 1px solid var(--line); font-weight: 600; font-size: 14px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); transition: color var(--dur-focus) var(--ease-out), background-color var(--dur-focus) var(--ease-out), border-color var(--dur-focus) var(--ease-out); outline: none; }
.chip.is-active { background: var(--cyan); border-color: var(--cyan); color: var(--ink); }
.chip:focus-visible { border-color: var(--cyan); }
.grid { display: grid; grid-template-columns: repeat(4, 104px); grid-auto-rows: 104px; gap: 8px; margin-top: 14px; }
/* GDD mod art: square icons with their own black ground, framed in the rarity color */
.mod-img { display: block; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.cell { --c: 10px; --edge: color-mix(in srgb, var(--rc) 50%, transparent); display: grid; place-items: center; outline: none; overflow: hidden; }
.cell .mod-img { position: absolute; inset: 4px; width: calc(100% - 8px); height: calc(100% - 8px); transition: transform var(--dur-focus) var(--ease-out); }
.cell::before { background: #000; }
.cell .lv { position: absolute; left: 4px; right: 4px; bottom: 4px; padding: 14px 6px 4px; background: linear-gradient(transparent, rgb(0 0 0 / 0.85)); font-weight: 700; font-size: 12px; letter-spacing: 0.1em; color: var(--text); }
.cell .type { position: absolute; right: 10px; bottom: 9px; width: 7px; height: 7px; border: 1.5px solid var(--cyan); }
.cell .type.passive { border-color: var(--magenta); border-radius: 50%; }
.cell::after { content: ""; position: absolute; right: 0; top: 0; width: 24px; height: 24px; background: var(--rc); clip-path: polygon(calc(100% - 10px) 0, 100% 10px, 100% 0); opacity: 0; }
.cell .rar { position: absolute; left: 1px; top: 1px; bottom: 1px; width: 3px; background: var(--rc); z-index: 1; }
.cell .new { position: absolute; left: 9px; top: 8px; z-index: 1; padding: 2px 5px; background: var(--magenta); color: var(--ink); font-weight: 700; font-size: 10px; letter-spacing: 0.14em; }
.cell .lv, .cell .type { z-index: 1; }
.cell:focus-visible, .cell.is-current { --edge: var(--cyan); }
.cell:focus-visible .mod-img, .cell.is-current .mod-img { transform: scale(1.06); }
.cell.is-dragging { opacity: 0.35; }
.cell-empty { position: relative; background:
  linear-gradient(var(--line), var(--line)) left top / 10px 1px no-repeat, linear-gradient(var(--line), var(--line)) left top / 1px 10px no-repeat,
  linear-gradient(var(--line), var(--line)) right bottom / 10px 1px no-repeat, linear-gradient(var(--line), var(--line)) right bottom / 1px 10px no-repeat; }
.grid.is-drop .cell-empty { background-color: var(--cyan-08); }
.legend { display: flex; gap: 18px; margin-top: 18px; font-weight: 600; font-size: 13px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.legend i { display: inline-block; width: 10px; height: 10px; margin-right: 8px; background: var(--c); vertical-align: -1px; }

/* details */
.details { --c: var(--cut-lg); padding: 24px 24px 22px; display: flex; flex-direction: column; }
.details .eyebrow { display: flex; gap: 10px; align-items: center; }
.d-inner { display: flex; flex-direction: column; height: 100%; }
.d-rar { padding: 4px 9px; background: var(--rc); color: var(--ink); font-weight: 700; font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; }
.d-type { font-weight: 600; font-size: 13px; letter-spacing: 0.2em; color: var(--muted); text-transform: uppercase; }
.d-art { position: relative; height: 196px; margin: 16px 0 14px; display: grid; place-items: center; background: radial-gradient(circle at center, color-mix(in srgb, var(--rc) 18%, transparent), transparent 62%); }
.d-art::before, .d-art::after { content: ""; position: absolute; left: 50%; top: 50%; border-radius: 50%; border: 1px solid var(--line-2); }
.d-art::before { width: 190px; height: 190px; margin: -95px; }
.d-art::after { width: 176px; height: 176px; margin: -88px; border-style: dashed; border-color: color-mix(in srgb, var(--rc) 45%, transparent); }
.d-art img { position: relative; z-index: 1; width: 150px; height: 166px; object-fit: contain; }
.d-art .mod-img { width: 150px; height: 150px; border: 1px solid var(--rc); box-shadow: 0 0 36px color-mix(in srgb, var(--rc) 35%, transparent); }
.d-name { font-family: var(--font-display); font-weight: 800; font-size: 25px; line-height: 1.1; }
.d-sub { margin-top: 6px; font-weight: 600; font-size: 13px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--cyan); }
.d-desc { margin-top: 12px; color: var(--muted); font-size: 16px; line-height: 1.45; text-wrap: pretty; }
.d-empty { flex: 1; display: grid; place-content: center; justify-items: center; gap: 18px; text-align: center; color: var(--muted); font-weight: 600; font-size: 16px; letter-spacing: 0.24em; text-transform: uppercase; }
.d-empty-lens { width: 96px; height: 96px; border-radius: 50%; border: 1px dashed var(--line-2); display: grid; place-items: center; }
.d-empty-lens::after { content: ""; width: 14px; height: 14px; border-radius: 50%; background: var(--cyan-32); box-shadow: 0 0 20px var(--cyan); }


/* ---------- PAUSE ---------- */
.pause { background: linear-gradient(90deg, rgb(7 10 20 / 0.95) 0%, rgb(7 10 20 / 0.82) 42%, rgb(7 10 20 / 0.5) 100%); }
.pause-ghost { position: absolute; left: 92px; top: 60px; font-family: var(--font-display); font-weight: 900; font-size: 236px; line-height: 1; color: transparent; -webkit-text-stroke: 1.5px rgb(61 232 250 / 0.16); pointer-events: none; }
.pause-left { position: absolute; left: 120px; top: 360px; width: 600px; }
.pause-where { margin: 10px 0 30px; font-weight: 600; font-size: 18px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.pause-where span { color: var(--text); }
.pause-right { position: absolute; left: 880px; top: 120px; width: 960px; display: grid; grid-template-columns: 400px 1fr; grid-template-rows: auto 1fr; gap: 24px; height: 820px; }
.card { --c: var(--cut-lg); }
.char-card { grid-row: 1 / span 2; display: flex; flex-direction: column; }
.char-art { position: relative; flex: 1; overflow: hidden; }
.char-art svg { position: absolute; left: 50%; top: 46%; width: 380px; height: 380px; margin: -190px; overflow: visible; }
.char-art svg circle { fill: none; stroke: var(--line-2); }
.char-art svg .dash { stroke: var(--cyan-32); stroke-dasharray: 3 8; transform-origin: 200px 200px; animation: spin 90s linear infinite; }
.char-art .holo { left: 34px; bottom: 6px; width: 332px; height: 598px; }
.char-meta { padding: 20px 26px 24px; border-top: 1px solid var(--line); }
.char-name { font-family: var(--font-display); font-weight: 900; font-size: 34px; text-transform: uppercase; line-height: 1; }
.char-role { margin-top: 8px; font-weight: 600; font-size: 14px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--cyan); }
.job-card { padding: 28px 30px; }
.job-card .eyebrow { color: var(--orange); }
.job-card h2 { margin: 10px 0 18px; font-family: var(--font-display); font-weight: 800; font-size: 36px; line-height: 1.05; }
.session { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-content: start; }
.session .stat { --c: 14px; padding: 20px 22px; clip-path: polygon(0 0, calc(100% - var(--c)) 0, 100% var(--c), 100% 100%, var(--c) 100%, 0 calc(100% - var(--c))); background: rgb(14 20 36 / 0.85); border-left: 3px solid var(--cyan); }
.session .stat:nth-child(2) { border-left-color: var(--orange); }
.session .stat:nth-child(3) { border-left-color: var(--magenta); }
.session .stat b { font-size: 40px; }

/* ---------- GDD-driven pieces ---------- */
.gear.is-empty { --fill: rgb(7 10 20 / 0.55); }
.gear.is-empty .gear-name { color: var(--muted); }
.gear-empty { width: 112px; height: 112px; border: 1px dashed var(--line-2); transform: scale(0.7) rotate(45deg); }
.gear-empty.big { width: 120px; height: 120px; }
.gear-rar { font-weight: 700; font-size: 13px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); }

.linked { display: grid; gap: 8px; }
.linked li { display: grid; grid-template-columns: 44px 1fr auto; align-items: center; gap: 12px; padding: 6px 10px 6px 6px; background: rgb(14 20 36 / 0.7); border-left: 3px solid var(--rc); }
.linked .mod-img { width: 44px; height: 44px; }
.ln-name { font-weight: 600; font-size: 16px; letter-spacing: 0.04em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ln-meta { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 13px; letter-spacing: 0.1em; color: var(--muted); }
.ln-meta .kbd { margin: 0; height: 24px; min-width: 24px; padding: 0 5px; font-size: 12px; }

.d-specs { display: grid; margin-top: 14px; border-top: 1px solid var(--line); }
.d-spec { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); font-weight: 600; font-size: 13px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); }
.d-spec b { color: var(--text); font-size: 15px; letter-spacing: 0.04em; text-transform: none; text-align: right; }
.d-spec:first-child b { color: var(--rc); }

.char-loadout { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; margin-top: 16px; }
.cl-slot { position: relative; aspect-ratio: 1; border: 1px solid color-mix(in srgb, var(--rc) 60%, transparent); background: rgb(7 10 20 / 0.6); }
.cl-slot.is-empty { border-style: dashed; }
.cl-slot b { position: absolute; right: 2px; bottom: 1px; font-size: 11px; letter-spacing: 0.06em; color: var(--text); text-shadow: 0 1px 4px #000; }
.cl-slot.passive b { color: var(--magenta); }

.pause-linked { display: grid; gap: 10px; }
.pause-linked li { display: grid; grid-template-columns: 52px 1fr auto; align-items: center; gap: 14px; padding: 6px 12px 6px 6px; background: rgb(7 10 20 / 0.55); border-left: 3px solid var(--rc); }
.pause-linked .mod-img { width: 52px; height: 52px; }
.pause-linked b { display: block; font-weight: 600; font-size: 18px; }
.pause-linked em { display: block; margin-top: 3px; font-style: normal; font-weight: 600; font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.pause-linked .kbd { margin: 0; }
.pause-linked .none { grid-template-columns: 1fr; color: var(--muted); border-left-color: var(--line-2); padding: 14px; }

/* ---------- script-built pieces ---------- */
h3 { margin: 0; }
.cell.is-selected { --edge: var(--cyan); }
.cell.is-selected::after { inset: 0; width: auto; height: auto; z-index: 1; opacity: 1; clip-path: none; background: rgb(61 232 250 / 0.22); box-shadow: inset 0 0 0 3px var(--cyan); }

.toast { position: absolute; left: 50%; top: 44px; z-index: 25; min-width: 520px; padding: 14px 30px 16px; text-align: center; pointer-events: none;
  --b: var(--orange);
  background:
    linear-gradient(var(--b), var(--b)) left top / 18px 2px no-repeat, linear-gradient(var(--b), var(--b)) left top / 2px 18px no-repeat,
    linear-gradient(var(--b), var(--b)) right bottom / 18px 2px no-repeat, linear-gradient(var(--b), var(--b)) right bottom / 2px 18px no-repeat,
    rgb(4 6 12 / 0.88);
  opacity: 0; transform: translate(-50%, -10px);
  transition: opacity 200ms var(--ease-out), transform 200ms var(--ease-out); }
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }
.toast-msg { display: block; margin-top: 6px; font-weight: 600; font-size: 21px; letter-spacing: 0.06em; text-transform: uppercase; }

.curtain { position: absolute; inset: 0; z-index: 35; visibility: hidden; transform: translateX(-101%); background: var(--bg); display: grid; place-items: center; }
.curtain::before, .curtain::after { content: ""; position: absolute; top: 0; bottom: 0; width: 3px; background: var(--cyan); box-shadow: 0 0 30px 6px var(--cyan-32); }
.curtain::before { right: 0; }
.curtain::after { left: 0; }
.curtain-core { display: grid; justify-items: center; gap: 22px; }
.curtain-core .logo-mark { width: 64px; height: 64px; }
.curtain-core .logo-mark i:first-child { width: 48px; height: 48px; }
.curtain-core .logo-mark i:last-child { width: 24px; height: 24px; }
.curtain-core p { font-weight: 600; font-size: 16px; letter-spacing: 0.4em; color: var(--muted); }
.curtain-bar { width: 260px; height: 2px; background: var(--line); }
.curtain-bar i { display: block; height: 100%; background: var(--cyan); transform: scaleX(0); transform-origin: left; }

/* ---------- reviewer bar ---------- */
/* collapsed to a small tab on the left edge so it never covers the game UI */
.devbar { position: fixed; left: 0; top: 50%; z-index: 100; display: flex; align-items: center; transform: translateY(-50%); font-weight: 600; font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; }
.devbar-tab { writing-mode: vertical-rl; padding: 12px 6px; background: rgb(4 6 12 / 0.85); border: 1px solid var(--line); border-left: 0; color: var(--cyan); }
.devbar-body { display: none; align-items: center; gap: 2px; padding: 4px; background: rgb(4 6 12 / 0.92); border: 1px solid var(--line); border-left: 0; }
.devbar:hover .devbar-tab, .devbar:focus-within .devbar-tab { display: none; }
.devbar:hover .devbar-body, .devbar:focus-within .devbar-body { display: flex; }
.devbar a, .devbar button { padding: 8px 10px; color: var(--muted); text-decoration: none; }
.devbar a:hover, .devbar button:hover, .devbar button.is-on { color: var(--cyan); }
.devbar-name { padding: 8px 10px; color: var(--text); border-left: 1px solid var(--line); border-right: 1px solid var(--line); }
.devbar-motion { border-left: 1px solid var(--line) !important; color: var(--orange) !important; }

/* ---------- reduced motion (OS setting or the reviewer toggle): keep fades, drop movement ---------- */
.reduce-motion .spin-slow, .reduce-motion .spin-rev, .reduce-motion .rig-lens .dash, .reduce-motion .char-art svg .dash,
.reduce-motion .title-cassidy, .reduce-motion .holo-scan > div { animation: none; }
.reduce-motion .menu-item::before { transition-duration: 1ms; }
