:root { color-scheme: dark; }
* { box-sizing: border-box; }
html, body { width: 100%; height: 100%; margin: 0; background: var(--bg-app); color: var(--fg1); font-family: var(--font-ui); }
body { overflow: hidden; }
h1, h2, p { margin: 0; }
h1 { font-size: 21px; font-weight: 600; letter-spacing: -.01em; }
h2 { margin-top: 6px; font-size: 16px; font-weight: 600; }
.mono, output, dd { font-family: var(--font-mono); }
.eyebrow { color: var(--fg3); font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.topbar { height: 72px; display: flex; align-items: center; justify-content: space-between; padding: 0 24px; border-bottom: 1px solid var(--border-hair); }
.top-meta { display: flex; gap: 16px; color: var(--fg-muted); font-size: 12px; }
.workspace { height: calc(100vh - 72px); display: grid; grid-template-columns: 286px minmax(520px, 1fr) 318px; }
.controls, .evidence { overflow-y: auto; }
.controls { border-right: 1px solid var(--border-hair); }
.evidence { border-left: 1px solid var(--border-hair); }
.controls section, .evidence section { padding: 22px 20px; border-bottom: 1px solid var(--border-hair); }
label { display: block; margin-top: 15px; color: var(--fg-muted); font-size: 12px; }
select, button { width: 100%; min-height: 38px; margin-top: 7px; padding: 0 11px; border: 1px solid var(--border-hair); border-radius: var(--r-sm); background: var(--white-a05); color: var(--fg1); font: 12.5px var(--font-ui); }
button { cursor: pointer; }
button:hover, select:hover { border-color: var(--white-a25); background: var(--white-a10); }
button:focus-visible, select:focus-visible, input:focus-visible { outline: 2px solid var(--teal-bright); outline-offset: 2px; }
button.primary { width: 74px; margin: 0; border-color: var(--teal); background: var(--teal); color: #071414; font-weight: 700; }
.note, .boundary { margin-top: 11px; color: var(--fg-muted); font-size: 12px; line-height: 1.55; }
.stage { position: relative; min-width: 0; background: #101112; overflow: hidden; }
#world { display: block; width: 100%; height: 100%; }
.stage-toolbar { position: absolute; z-index: 4; top: 14px; left: 14px; right: 14px; display: flex; align-items: center; justify-content: space-between; color: var(--fg3); font-size: 11px; pointer-events: none; }
.stage-toolbar button { width: auto; min-height: 32px; margin: 0; pointer-events: auto; }
#loading, #error { position: absolute; inset: 0; z-index: 5; display: grid; place-items: center; background: #101112; color: var(--fg-muted); font: 12px var(--font-mono); }
#loading[hidden], #error[hidden] { display: none; }
#error { padding: 32px; color: var(--danger); text-align: center; }
.transport { position: absolute; z-index: 4; left: 14px; right: 14px; bottom: 14px; min-height: 56px; display: flex; align-items: center; gap: 12px; padding: 9px 12px; border: 1px solid var(--border-hair); border-radius: var(--r-sm); background: var(--bg-float); color: var(--fg-muted); font: 12px var(--font-mono); box-shadow: var(--shadow-float); }
.transport input { min-width: 80px; flex: 1; accent-color: var(--blue); }
.event-list { display: grid; gap: 7px; margin-top: 14px; }
.event-row { min-height: 48px; margin: 0; display: flex; align-items: center; justify-content: space-between; gap: 10px; text-align: left; }
.event-row span:first-child { text-transform: capitalize; }
.event-row span:last-child { color: var(--fg3); font: 10px var(--font-mono); white-space: nowrap; }
.evidence dl { margin: 15px 0 0; }
.evidence dl div { min-height: 42px; display: flex; align-items: center; justify-content: space-between; gap: 14px; border-top: 1px solid var(--border-hair); }
.evidence dt { color: var(--fg-muted); font-size: 12px; }
.evidence dd { margin: 0; max-width: 175px; color: var(--fg1); font-size: 11px; text-align: right; overflow-wrap: anywhere; }
@media (max-width: 1080px) {
  body { overflow: auto; }
  .workspace { height: auto; grid-template-columns: 260px minmax(500px, 1fr); }
  .stage { min-height: 700px; }
  .evidence { grid-column: 1 / -1; border-left: 0; border-top: 1px solid var(--border-hair); display: grid; grid-template-columns: repeat(3, 1fr); }
}
