:root {
    color-scheme: dark;
    --desk: #101c20; --panel: #182a2c; --line: #415557; --ink: #eeefe3;
    --muted: #b6c4bc; --gold: #f3cc69; --blue: #93cde6; --paper: #e7e3c9;
    --type: "IBM Plex Mono", "Courier New", monospace;
    font: 16px/1.45 "DM Sans", system-ui, sans-serif; color: var(--ink); background: var(--desk);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: radial-gradient(ellipse at 82% 2%,#233439 0,transparent 38rem); min-height: 100vh; }
main,.mast,footer { width: min(1190px,93%); margin-inline: auto; }
a { color: inherit; text-underline-offset: .24em; }
a:hover { color: var(--gold); }
button { font-family: inherit; font-size: .94rem; font-weight: 650; line-height: 1.2; color: var(--ink); background: #223639; border: 1px solid #71817a; border-radius: 3px; padding: .65rem .9rem; min-height: 44px; cursor: pointer; }
button:disabled { opacity: .53; cursor: default; }
button:enabled:hover { border-color: var(--gold); }
:focus-visible { outline: 3px solid #76c9f3; outline-offset: 3px; z-index: 2; }
.primary { background: var(--gold); color: #20271e; border-color: var(--gold); }
.mast,footer,.shift-head,.panel-head,.paper-head,.turn,.ending-actions { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.mast { min-height: 65px; border-bottom: 1px solid var(--line); }
.mast a,footer a { display: inline-flex; align-items: center; min-height: 44px; font-size: .92rem; }
.mast .brand { text-decoration: none; font-weight: 700; gap: .65rem; }
.brand b { color: var(--gold); font: bold 2rem/1 Georgia,serif; }
.skip { position: absolute; left: .5rem; top: -4rem; }.skip:focus { top: .5rem; padding: .7rem; background: var(--desk); z-index: 4; }
h1,h2,p { margin: 0; }
h1,h2 { font-family: "Barlow Condensed","Arial Narrow",system-ui,sans-serif; font-weight: 750; }
h1 { font-size: clamp(2.55rem,5.9vw,5.5rem); line-height: .96; letter-spacing: -.055em; }
h2 { font-size: clamp(1.32rem,2vw,1.9rem); line-height: 1.1; letter-spacing: -.035em; }
.kicker,.paper-head,.shift-head .turn span,.minor,.yard-readout,.score span,.tabs button,.imprint,.memo .panel-head span { font-family: var(--type); }
.kicker { font-size: .82rem; text-transform: uppercase; letter-spacing: .14em; font-weight: 700; color: var(--gold); margin-bottom: .6rem; }
.entry { min-height: 64vh; margin-block: clamp(1.5rem,4vw,3.8rem); display: grid; grid-template-columns: 1.13fr 1fr; border: 1px solid var(--line); background: var(--panel); }
.entry-art { position: relative; min-height: 24rem; background: #243031; overflow: hidden; }
.entry-art img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.entry-copy { align-self: center; padding: clamp(1.25rem,4vw,3.5rem); }
.lede { max-width: 50ch; font-size: clamp(1.04rem,1.45vw,1.32rem); margin-block: 1.1rem; }
.minor,.tool-help,.yard-readout,footer,.turn span { color: var(--muted); font-size: .88rem; }
.minor { margin-top: 1rem; }
fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
legend { font-weight: 700; padding: 0; margin-bottom: .5rem; }
.seats { margin: 1.25rem 0; }
.seats label { display: flex; align-items: start; gap: .65rem; padding: .68rem .75rem; border: 1px solid var(--line); cursor: pointer; min-height: 44px; }
.seats label + label { margin-top: .35rem; }
.seats label:has(:checked) { border-color: var(--gold); background: #292f27; }
.seats input { margin-top: .28rem; accent-color: var(--gold); }
.seats small { display: block; color: var(--muted); font-size: .91rem; }
.shift-head { padding-block: 1.7rem 1.2rem; }
.shift-head h1 { font-size: clamp(2.35rem,4.3vw,4rem); }
.turn { flex-wrap: wrap; justify-content: end; gap: .55rem; }
.score { display: grid; grid-template-columns: repeat(4,1fr); border-block: 1px solid var(--line); }
.score div { padding: .65rem clamp(.35rem,2vw,1.4rem); display: flex; flex-wrap: wrap; gap: .2rem .9rem; align-items: baseline; border-inline-end: 1px solid var(--line); }
.score div:first-child { border-inline-start: 4px solid var(--blue); }.score div:nth-child(2) { border-inline-start: 4px solid #be8478; }
.score span { font-size: .79rem; color: #c5d2c8; }.score strong { font-size: 1.25rem; }
.briefing { color: var(--gold); min-height: 2.8rem; padding: .7rem 0; }
.workspace { display: grid; grid-template-columns: minmax(0,1.65fr) minmax(290px,1fr); gap: clamp(.85rem,2vw,1.6rem); align-items: start; }
.board-panel,.memo,.log { background: #15282a; border: 1px solid var(--line); padding: clamp(.7rem,1.6vw,1.2rem); }
.panel-head { flex-wrap: wrap; gap: .45rem; }
.tabs { display: flex; gap: .16rem; }.tabs button { font-size: .82rem; padding-inline: .55rem; }
.tabs [aria-pressed=true],.tools [aria-pressed=true] { color: var(--gold); border-color: var(--gold); background: #30382c; }
.yard-readout { margin: .6rem 0; }
.board { position: relative; isolation: isolate; display: grid; grid-template-columns: repeat(6,minmax(0,1fr)); background: #344849; border: 1px solid #536866; gap: 1px; }
.lot { position: relative; isolation: isolate; padding: 0; border: 0; border-radius: 0; min-height: 44px; aspect-ratio: 1.14; min-width: 0; background-color: #283b37; background-image: repeating-linear-gradient(135deg,transparent 0 11px,#b3cf9c08 11px 12px); }
.lot:nth-child(3n+1) { background-color: #2b403c; }.lot:nth-child(4n+1) { background-color: #33453d; }
.lot:enabled:hover { outline: 2px solid #a9c6b0; outline-offset: -2px; }
.lot.hint { outline: 2px dashed var(--gold); outline-offset: -4px; }
.lot small,.lot .stock { position: absolute; z-index: 2; font: 650 .72rem var(--type); padding: 1px 3px; color: #dbe3ca; background: #1b2e2ee8; }
.lot small { left: 0; top: 0; }.lot .stock { right: 0; bottom: 0; color: var(--gold); }
.lot img { width: 96%; height: 94%; position: absolute; inset: 3% 2%; object-fit: contain; pointer-events: none; }
.lot.offline { background-color: #653d35; }.lot.offline img { filter: grayscale(.65); }
.outage { position: absolute; inset: auto 0 0; color: #ffe4c3; background: #663526; font: bold .72rem var(--type); padding: .12rem; }
.raid-slip { pointer-events: none; position: absolute; top: 12%; right: 5%; z-index: 2; padding: .4rem .65rem; border: 2px solid #f4c298; background: #582f26; color: #ffe7cc; font: bold .85rem var(--type); }
.belt-arm,.belt-hub { position: absolute; background-color: #58615a; box-shadow: inset 0 0 0 2px #a4854e; pointer-events: none; }
.belt-hub { inset: 36%; z-index: 1; border-radius: 18%; background: #c6ad68; }
.belt-arm.e,.belt-arm.w { top:38%; height:24%; width:52%; background-image: repeating-linear-gradient(90deg,transparent 0 5px,#b4a57b 6px 8px); }
.belt-arm.e { right:0; }.belt-arm.w { left:0; }
.belt-arm.n,.belt-arm.s { left:38%; width:24%; height:52%; background-image: repeating-linear-gradient(0deg,transparent 0 5px,#b4a57b 6px 8px); }
.belt-arm.n { top:0; }.belt-arm.s { bottom:0; }
@media (prefers-reduced-motion:no-preference) { .belt-arm.e,.belt-arm.w { animation: roll-x 1.4s linear infinite; }.belt-arm.n,.belt-arm.s { animation: roll-y 1.4s linear infinite; } }
@keyframes roll-x { to { background-position: 16px 0; } } @keyframes roll-y { to { background-position: 0 -16px; } }
.tools { display: flex; flex-wrap: wrap; gap: .35rem; margin: .95rem 0 .4rem; }.tools button { padding-inline: .6rem; min-height: 44px; }
.tools button small { margin-left: .25rem; color: var(--gold); }.tool-help { min-height: 2.6rem; }
.secondary { border-color: #9f766a; }.manual { margin-top: 1rem; border-top: 1px solid var(--line); }.manual summary { padding-block: .7rem; min-height: 44px; cursor: pointer; }.manual p { margin: 0 0 .7rem; }
.desk-column { display: grid; gap: .85rem; }.paper { color-scheme: light; background: var(--paper); color: #202f2d; padding: clamp(.9rem,2vw,1.5rem); border-top: 5px solid #748785; box-shadow: 0 4px #263c39; }
.paper-head { font-size: .78rem; text-transform: uppercase; letter-spacing: .07em; border-bottom: 1px solid #87958b; padding-bottom: .45rem; }
.paper h2 { margin-top: .7rem; color: #1e3334; font-family: Georgia,serif; }.paper p { margin: .55rem 0; }
.paper table { width: 100%; border-collapse: collapse; font-size: .89rem; }.paper td,.paper th { padding: .46rem .22rem; border-block-end: 1px solid #a3aa96; text-align: left; }
.paper th { font: 700 .78rem var(--type); }.paper td:first-child { font-weight: 650; }
.stamps { display: flex; gap: .5rem; margin-top: .85rem; }.stamps button { flex: 1; background: transparent; border: 2px solid currentColor; font: bold 1.04rem var(--type); text-transform: uppercase; color: #245b49; }.stamps button:last-child { color: #854236; }.stamps button:disabled { opacity: .48; }
.imprint { width: fit-content; padding: .18rem .55rem; border: 2px solid currentColor; color: #295540; font-weight: bold; }.imprint.error { color: #803a32; }
.memo .panel-head span { font-size: .84rem; color: var(--gold); }.memo p { margin-top: .55rem; }.memo button { margin-top: .55rem; }
.log { margin-top: 1rem; }.log h2 { font-size: 1.2rem; }.log ol { margin: .55rem 0 0; padding-left: 1.4rem; }.log li { padding-block: .15rem; }
.quiet { margin-block: 1rem; background: transparent; }.message { color: var(--gold); min-height: 1.5em; margin-block: .5rem; }
.debrief { max-width: 760px; border-inline-start: 5px solid var(--gold); background: var(--panel); padding: clamp(1rem,4vw,3.5rem); margin-block: clamp(2rem,5vw,5rem); }.ending-actions { justify-content: start; flex-wrap: wrap; margin-top: 1.5rem; }
dialog { color: var(--ink); background: var(--panel); border: 1px solid var(--line); max-width: min(26rem,90vw); padding: 1.4rem; }dialog p { margin-block: .85rem; }dialog::backdrop { background: #071114bb; }
footer { border-top: 1px solid var(--line); min-height: 56px; margin-top: 1.4rem; }
@media (max-width: 800px) { .workspace { grid-template-columns: 1fr; }.desk-column { grid-template-columns: repeat(2,minmax(0,1fr)); }.entry { grid-template-columns: 1fr; }.entry-art { min-height: 0; aspect-ratio: 2.5; } }
@media (max-width: 540px) { main,.mast,footer { width: min(95%,30rem); }.entry-copy { padding: 1rem; }.desk-column { grid-template-columns: 1fr; }.score { grid-template-columns: repeat(2,1fr); }.score div { min-height: 42px; }.shift-head { align-items: end; }.turn { flex-direction: column; align-items: end; }.entry-art { aspect-ratio: 2.15; }.lot small { font-size: .65rem; }.panel-head { gap: .3rem; }.tool-help { min-height: auto; margin-bottom: .7rem; } }
