:root {
  --bg: #0b0f17;
  --panel: #111723;
  --panel-2: #161e2d;
  --line: #243045;
  --line-soft: #1b2434;
  --text: #e6ebf3;
  --muted: #8a97ad;
  --dim: #5b677c;
  --pos: #4ade80;
  --neg: #f87171;
  --warn: #fbbf24;
  --accent: #7dd3fc;
  --mono: ui-monospace, "SF Mono", Menlo, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); font-family: var(--sans); font-size: 13px; }
button { font-family: inherit; }
.hidden { display: none !important; }

#app {
  display: grid;
  grid-template-columns: 270px 1fr 340px;
  grid-template-rows: minmax(56px, auto) 1fr 28px;
  grid-template-areas: "top top top" "left board right" "tick tick tick";
  height: 100vh;
}

/* ── Top bar ── */
#topbar {
  grid-area: top; display: flex; align-items: center; gap: 14px; padding: 6px 14px; white-space: nowrap; flex-wrap: wrap; row-gap: 6px;
  background: var(--panel); border-bottom: 1px solid var(--line);
}
.brand { font-family: var(--mono); font-weight: 700; letter-spacing: 0.22em; font-size: 15px; color: var(--accent); }
.brand small { display: block; letter-spacing: 0.04em; font-weight: 500; color: var(--muted); font-size: 11px; font-family: var(--sans); }
.kpi { display: flex; flex-direction: column; line-height: 1.15; }
.kpi .k { font-size: 10px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.kpi .v { font-family: var(--mono); font-size: 14px; font-weight: 600; }
#topbar .btn { padding: 6px 9px; } #topbar .btn.big { padding: 9px 14px; }
@media (max-width: 1700px) { #topbar .era-chip { display: none; } }
.kpi .v.pos { color: var(--pos); } .kpi .v.neg { color: var(--neg); } .kpi .v.warn { color: var(--warn); }
.spacer { flex: 1; }
.btn {
  background: var(--panel-2); color: var(--text); border: 1px solid var(--line); border-radius: 6px;
  padding: 7px 12px; cursor: pointer; font-size: 12px;
}
.btn:hover:not(:disabled) { border-color: var(--accent); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }
.btn.primary { background: #0e7490; border-color: #0891b2; font-weight: 600; }
.btn.primary:hover:not(:disabled) { background: #0891b2; }
.btn.danger { border-color: #7f1d1d; color: #fecaca; }
.btn.big { padding: 10px 18px; font-size: 14px; }

/* ── Side panels ── */
#left, #right { background: var(--panel); overflow-y: auto; padding: 14px; }
#left { grid-area: left; border-right: 1px solid var(--line); }
#right { grid-area: right; border-left: 1px solid var(--line); }
h3 { font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); margin: 18px 0 8px; font-weight: 600; }
h3:first-child { margin-top: 0; }

.sh-row { display: grid; grid-template-columns: 1fr 70px 40px; align-items: center; gap: 8px; padding: 5px 6px; border-radius: 5px; cursor: pointer; }
.sh-row:hover, .sh-row.sel { background: var(--panel-2); }
.sh-row .name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sh-row .num { font-family: var(--mono); font-size: 11px; text-align: right; }
.cbar { position: relative; height: 6px; background: var(--line-soft); border-radius: 3px; }
.cbar::after { content: ""; position: absolute; left: 50%; top: -2px; bottom: -2px; width: 1px; background: var(--dim); }
.cbar span { position: absolute; top: 0; bottom: 0; border-radius: 3px; }

.race-row { margin: 8px 0; }
.race-row .lbl { display: flex; justify-content: space-between; font-size: 12px; margin-bottom: 3px; }
.race-row .lbl b { font-family: var(--mono); }
.rbar { height: 8px; background: var(--line-soft); border-radius: 4px; overflow: hidden; }
.rbar span { display: block; height: 100%; border-radius: 4px; }

.approval { display: flex; justify-content: space-between; align-items: baseline; padding: 8px 6px; border-top: 1px solid var(--line); margin-top: 6px; }
.approval b { font-family: var(--mono); font-size: 16px; }
.note { color: var(--muted); font-size: 12px; line-height: 1.45; }

/* ── Board ── */
#boardWrap { grid-area: board; position: relative; overflow: hidden; background: radial-gradient(circle at center, #121a29 0%, var(--bg) 70%); }
#board { width: 100%; height: 100%; display: block; }
.node { cursor: pointer; }
.node text { pointer-events: none; font-family: var(--mono); }
.node .abbr { font-size: 12px; font-weight: 700; fill: var(--text); text-anchor: middle; dominant-baseline: central; }
.node .val { font-size: 12px; font-weight: 600; text-anchor: middle; dominant-baseline: central; }
.node .lbl { font-size: 9.5px; fill: var(--muted); text-anchor: middle; font-family: var(--sans); }
.node.inactive .abbr { fill: var(--dim); }
.node:hover circle.body, .node.sel circle.body { stroke-width: 3; }
#board.focus .node { opacity: 0.18; transition: opacity 0.15s; }
#board.focus .node.lit { opacity: 1; }
.cat-label { font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase; font-weight: 700; font-family: var(--sans); }
.ring-label { font-size: 9px; letter-spacing: 0.2em; fill: var(--dim); text-transform: uppercase; }
.wire { fill: none; stroke-linecap: round; stroke-dasharray: 6 8; animation: flow 0.9s linear infinite; pointer-events: none; }
@keyframes flow { to { stroke-dashoffset: -14; } }
.sit-pulse { animation: pulse 2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: 0.45; } }

#tooltip {
  position: absolute; pointer-events: none; background: #0a0e15ee; border: 1px solid var(--line);
  border-radius: 6px; padding: 7px 10px; font-size: 12px; max-width: 260px; z-index: 5;
}
#tooltip b { display: block; margin-bottom: 2px; }

/* ── Inspector ── */
.insp-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.chip { font-size: 10px; text-transform: uppercase; letter-spacing: 0.08em; padding: 2px 7px; border-radius: 10px; border: 1px solid currentColor; }
.insp-title { font-size: 17px; font-weight: 650; margin: 4px 0 6px; }
.big-num { font-family: var(--mono); font-size: 30px; font-weight: 700; }
.desc { color: #c3cbd8; line-height: 1.5; margin: 6px 0 10px; }
.eff { display: grid; grid-template-columns: 1fr 64px 46px; gap: 8px; align-items: center; padding: 4px 4px; border-radius: 4px; cursor: pointer; font-size: 12px; }
.eff:hover { background: var(--panel-2); }
.eff .tag { font-size: 10px; color: var(--dim); }
.eff .num { font-family: var(--mono); font-size: 11px; text-align: right; }
.slider-box { background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; padding: 12px; margin: 10px 0; }
.slider-box input[type=range] { width: 100%; accent-color: var(--accent); }
.slider-ends { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); }
.row { display: flex; justify-content: space-between; padding: 3px 0; }
.row .m { font-family: var(--mono); }
.btn-row { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.err { color: var(--neg); font-size: 12px; margin-top: 6px; }
.fin-row { display: grid; grid-template-columns: 1fr 90px; gap: 8px; padding: 3px 0; align-items: center; }
.fin-row .bar { height: 4px; border-radius: 2px; margin-top: 3px; }
.fin-row .m { font-family: var(--mono); text-align: right; }
.sit-tag { display: inline-block; padding: 3px 8px; border-radius: 4px; margin: 2px 4px 2px 0; font-size: 12px; cursor: pointer; }
.sit-tag.bad { background: #451a1a; color: #fecaca; } .sit-tag.good { background: #14361f; color: #bbf7d0; }

/* ── Modal ── */
#modal { position: fixed; inset: 0; background: #05070bcc; display: flex; align-items: center; justify-content: center; z-index: 20; padding: 16px; }
.modal-card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; width: min(760px, 100%); max-height: 92vh; overflow-y: auto; padding: 24px 26px; }
.modal-card h1 { margin: 0 0 4px; font-size: 22px; }
.modal-card h2 { margin: 0 0 6px; font-size: 13px; color: var(--muted); font-weight: 500; }
.modal-card .lede { font-size: 14px; line-height: 1.55; color: #d4dae4; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 12px; margin: 14px 0; }
.card { background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; padding: 14px; cursor: pointer; text-align: left; color: var(--text); }
.card:hover, .card.sel { border-color: var(--accent); }
.card h4 { margin: 0 0 4px; font-size: 15px; }
.card p { margin: 6px 0; color: #b9c2d0; line-height: 1.45; font-size: 12.5px; }
.card .meta { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.diff { font-size: 10px; text-transform: uppercase; letter-spacing: 0.08em; float: right; }
.diff.Easy { color: var(--pos); } .diff.Normal { color: var(--warn); } .diff.Hard { color: var(--neg); }
.name-input { width: 100%; background: var(--bg); border: 1px solid var(--line); color: var(--text); border-radius: 6px; padding: 10px; font-size: 15px; }
.rep-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.rep-list { list-style: none; padding: 0; margin: 0; }
.rep-list li { padding: 4px 0; border-bottom: 1px solid var(--line-soft); display: flex; justify-content: space-between; gap: 10px; }
.rep-list li .m { font-family: var(--mono); white-space: nowrap; }
.callout { border-left: 3px solid var(--accent); background: var(--panel-2); padding: 10px 12px; border-radius: 0 6px 6px 0; margin: 10px 0; line-height: 1.45; }
.callout.bad { border-color: var(--neg); } .callout.good { border-color: var(--pos); } .callout.warn { border-color: var(--warn); }
.howto { columns: 2; column-gap: 24px; font-size: 12.5px; color: #b9c2d0; line-height: 1.5; }
.howto p { margin: 0 0 8px; break-inside: avoid; }
.pos { color: var(--pos); } .neg { color: var(--neg); } .muted { color: var(--muted); }

@media (max-width: 1100px) {
  #app { grid-template-columns: 220px 1fr 300px; }
}
@media (max-width: 860px) {
  #app { grid-template-columns: 1fr; grid-template-rows: auto 70vh auto auto; grid-template-areas: "top" "board" "right" "left"; height: auto; }
  #topbar { flex-wrap: wrap; padding: 8px 16px; gap: 12px; }
  .rep-grid, .howto { grid-template-columns: 1fr; columns: 1; }
}

/* ── Juice ── */
.float-delta { font-family: var(--mono); font-size: 15px; font-weight: 700; text-anchor: middle; pointer-events: none;
  animation: floatUp 900ms ease-out both; paint-order: stroke; stroke: #0b0f17; stroke-width: 3px; }
@keyframes floatUp { from { opacity: 0; transform: translateY(0); } 15% { opacity: 1; } to { opacity: 0; transform: translateY(-24px); } }
#fxLayer { position: fixed; inset: 0; pointer-events: none; z-index: 40; overflow: hidden; }
.particle { position: absolute; width: 7px; height: 7px; border-radius: 2px; animation: burst 1.2s cubic-bezier(.15,.7,.35,1) forwards; }
@keyframes burst { to { transform: translate(var(--dx), calc(var(--dy) + 260px)) rotate(var(--rot)); opacity: 0; } }
#fxFlash { position: fixed; inset: 0; pointer-events: none; z-index: 39; opacity: 0; }
#fxFlash.go { animation: flash 320ms ease-out; }
@keyframes flash { from { opacity: 0.11; } to { opacity: 0; } }
#boardWrap.thinking #board { opacity: 0.45; filter: saturate(0.5); transition: opacity 250ms, filter 250ms; }
.reveal > * { animation: rise 380ms ease-out both; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }

/* ── Toasts ── */
#toasts { position: fixed; right: 356px; bottom: 40px; display: flex; flex-direction: column; gap: 6px; z-index: 19; width: min(330px, calc(100vw - 32px)); pointer-events: none; }
@media (max-width: 1100px) { #toasts { right: 16px; } }
.toast { background: var(--panel-2); border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: 8px; padding: 10px 12px;
  font-size: 12.5px; line-height: 1.4; box-shadow: 0 8px 24px #0008; animation: toastIn 300ms ease-out; }
.toast .tk { font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); display: block; margin-bottom: 2px; }
.toast.good { border-left-color: var(--pos); } .toast.bad { border-left-color: var(--neg); }
.toast.rare { border-left-color: #a78bfa; } .toast.legendary { border-left-color: #fbbf24; background: linear-gradient(90deg, #3a2a0a, var(--panel-2)); }
.toast.out { opacity: 0; transform: translateX(20px); transition: all 400ms; }
@keyframes toastIn { from { opacity: 0; transform: translateX(30px); } }

/* ── Ticker ── */
#ticker { grid-area: tick; position: fixed; left: 0; right: 0; bottom: 0; height: 28px; background: #070a10; border-top: 1px solid var(--line);
  overflow: hidden; white-space: nowrap; font-family: var(--mono); font-size: 11.5px; color: var(--muted); z-index: 10; }
#tickerTrack { display: inline-block; padding-left: 100%; line-height: 28px; animation: tick linear infinite; }
#tickerTrack span { margin-right: 48px; } #tickerTrack b { color: var(--accent); font-weight: 600; }
@keyframes tick { to { transform: translateX(-100%); } }

/* ── Left panel additions ── */
.obj { background: var(--panel-2); border: 1px solid var(--line); border-radius: 7px; padding: 8px 10px; margin-bottom: 7px; }
.obj .who { font-size: 10px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); display: flex; justify-content: space-between; }
.obj .txt { margin: 3px 0 6px; line-height: 1.35; }
.pbar { height: 5px; background: var(--line-soft); border-radius: 3px; overflow: hidden; }
.pbar span { display: block; height: 100%; background: var(--accent); border-radius: 3px; transition: width 600ms ease-out; }
.pbar span.near { background: var(--pos); }
.risk { padding: 6px 8px; border-radius: 6px; margin-bottom: 5px; background: #1a1410; border: 1px solid #3b2a14; cursor: help; }
.risk .top { display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.risk .hz { font-size: 9.5px; text-transform: uppercase; letter-spacing: .08em; padding: 1px 6px; border-radius: 8px; border: 1px solid; }
.hz.short { color: #fca5a5; } .hz.medium { color: #fcd34d; } .hz.long { color: #93c5fd; }
.risk .w { font-size: 11.5px; color: #d6c3a3; margin-top: 3px; line-height: 1.35; }
.risk .pbar span { background: linear-gradient(90deg, #f59e0b, #ef4444); }
.era-chip { font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--warn); border: 1px solid #5b4a1a; padding: 2px 8px; border-radius: 10px; }

/* ── Newspaper & cards ── */
.paper { background: #f2ede1; color: #1c1a17; border-radius: 6px; padding: 14px 18px; margin: 4px 0 14px; font-family: Georgia, 'Times New Roman', serif; }
.paper .mast { display: flex; justify-content: space-between; border-bottom: 3px double #1c1a17; padding-bottom: 4px; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; }
.paper .mast b { font-size: 20px; letter-spacing: .02em; text-transform: none; font-style: italic; }
.paper h1 { font-size: 26px; line-height: 1.12; margin: 10px 0 6px; color: #1c1a17; }
.paper p { margin: 0; font-size: 14px; color: #3b362f; }
.paper.tabloid { background: #fff3f0; } .paper.tabloid .mast b { color: #b91c1c; font-style: normal; font-family: Impact, 'Arial Black', sans-serif; }
.paper.tabloid h1 { font-family: Impact, 'Arial Black', sans-serif; text-transform: uppercase; color: #b91c1c; }
.quote { border-left: 3px solid #a78bfa; padding: 8px 12px; margin: 12px 0; background: #161226; border-radius: 0 6px 6px 0; }
.quote q { font-family: Georgia, serif; font-size: 15px; font-style: italic; color: #e9e3ff; }
.quote .by { display: block; margin-top: 4px; font-size: 11.5px; color: var(--muted); }
.history { border: 1px solid #3a3320; background: #17140c; border-radius: 8px; padding: 12px 14px; margin-top: 12px; }
.history h4 { margin: 0 0 6px; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--warn); }
.history p { margin: 0 0 8px; line-height: 1.5; color: #e6dcc4; }
.history .lesson { color: #fde68a; font-weight: 600; }
.ms-card { text-align: center; padding: 18px 8px; }
.ms-card .kicker { font-size: 11px; letter-spacing: .25em; text-transform: uppercase; color: var(--warn); }
.ms-card .big { font-size: 44px; font-weight: 800; letter-spacing: .02em; margin: 6px 0; background: linear-gradient(90deg, #7dd3fc, #f472b6, #fbbf24); -webkit-background-clip: text; background-clip: text; color: transparent; }
.ms-card p { font-size: 15px; color: #cbd5e1; max-width: 520px; margin: 8px auto; line-height: 1.5; }
.archive-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; margin-top: 12px; }
.acard { background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; font-size: 12px; line-height: 1.45; }
.acard.rare { border-color: #6d5bd0; } .acard.legendary { border-color: #d4a017; box-shadow: 0 0 0 1px #d4a01733 inset; }
.acard.locked { opacity: .45; display: flex; align-items: center; justify-content: center; min-height: 92px; font-family: var(--mono); color: var(--dim); }
.acard h5 { margin: 0 0 4px; font-size: 13px; } .acard .yr { color: var(--muted); font-family: var(--mono); font-size: 11px; }
.acard q { font-style: italic; color: #e2e8f0; display: block; margin: 4px 0; }
.acard .ls { color: #fcd34d; margin-top: 4px; } .acard a { color: var(--accent); font-size: 11px; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.tabs .btn.on { border-color: var(--accent); color: var(--accent); }
.tag-line { display: flex; gap: 6px; flex-wrap: wrap; margin: 6px 0; }

/* ── Recruiting (LinkedOut) & Compute ── */
.modal-card.wide { width: min(1240px, 100%); }
.li-brand { font-size: 20px; font-weight: 700; color: #e2e8f0; margin-bottom: 2px; }
.li-brand b { background: #0a66c2; color: #fff; padding: 0 5px; border-radius: 4px; margin-left: 2px; }
.li-grid { display: grid; grid-template-columns: 1.05fr 1.1fr 1fr; gap: 18px; margin-top: 8px; }
.li-card { background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; padding: 12px; margin-bottom: 10px; }
.li-top { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 8px; }
.avatar { width: 44px; height: 44px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; color: #fff; flex: none; font-size: 15px; }
.avatar.sm { width: 32px; height: 32px; font-size: 12px; }
.li-head { color: #b9c2d0; font-size: 12px; line-height: 1.35; } .li-meta { color: var(--muted); font-size: 11px; margin-top: 2px; }
.li-skill { display: grid; grid-template-columns: 36px 1fr 28px; gap: 8px; align-items: center; font-size: 12px; margin-bottom: 6px; }
.li-row { display: flex; gap: 10px; align-items: flex-start; padding: 7px 0; border-bottom: 1px solid var(--line-soft); flex-wrap: wrap; }
.li-ctl { flex-basis: 100%; display: flex; gap: 6px; padding-left: 42px; flex-wrap: wrap; } .li-ctl:empty { display: none; }
.ttag { font-size: 10.5px; padding: 1px 7px; border-radius: 9px; border: 1px solid; cursor: help; }
.ttag.good { color: #86efac; border-color: #14532d; } .ttag.bad { color: #fca5a5; border-color: #7f1d1d; } .ttag.unk { color: var(--muted); border-color: var(--line); }
.pills { display: flex; flex-wrap: wrap; gap: 6px; }
.pill { background: var(--panel-2); color: var(--text); border: 1px solid var(--line); border-radius: 14px; padding: 4px 10px; font-size: 12px; cursor: pointer; }
.pill.uber { border-style: dashed; border-color: #6b5b2a; } .pill.on { background: #0e7490; border-color: #22d3ee; color: #fff; }
.sel { background: var(--bg); color: var(--text); border: 1px solid var(--line); border-radius: 6px; padding: 5px; font-size: 12px; }
table.fleet { width: 100%; border-collapse: collapse; font-size: 12.5px; }
table.fleet th { text-align: left; font-weight: 600; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; padding: 6px 4px; border-bottom: 1px solid var(--line); }
table.fleet td { padding: 6px 4px; border-bottom: 1px solid var(--line-soft); } table.fleet .m { font-family: var(--mono); }
@media (max-width: 1000px) { .li-grid { grid-template-columns: 1fr; } }

/* ── CLI bridge ── */
#bridgePill { position: fixed; left: 12px; bottom: 36px; z-index: 30; font-family: var(--mono); font-size: 11px; color: #a7f3d0;
  background: #052e1f; border: 1px solid #14532d; border-radius: 10px; padding: 3px 9px; }
#advisor { position: fixed; left: 16px; bottom: 64px; z-index: 31; width: min(420px, calc(100vw - 32px)); background: #101a2b; border: 1px solid #1e3a5f;
  border-left: 4px solid var(--accent); border-radius: 10px; padding: 10px 12px; box-shadow: 0 10px 30px #0009; }
#advisor .adv-head { display: flex; justify-content: space-between; align-items: center; font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); margin-bottom: 6px; }
#advisor .adv-head .btn { padding: 2px 8px; font-size: 11px; letter-spacing: 0; text-transform: none; }
#advisor .adv-body { white-space: pre-wrap; line-height: 1.5; font-size: 13px; max-height: 40vh; overflow-y: auto; }

/* ── Real quotes: splash, interstitial, newspaper ── */
#splash { position: fixed; inset: 0; z-index: 60; background: radial-gradient(circle at 50% 40%, #13203a, #05070b 70%); display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center; padding: 24px; cursor: pointer; transition: opacity 450ms; }
#splash.out { opacity: 0; }
.splash-title { font-family: var(--mono); font-weight: 800; letter-spacing: .4em; font-size: clamp(32px, 6vw, 64px); color: var(--accent); }
.splash-sub { color: var(--muted); margin: 8px 0 34px; letter-spacing: .06em; }
.splash-quote, #interstitial { max-width: 680px; }
.splash-quote q, #interstitial q { font-family: Georgia, serif; font-style: italic; font-size: clamp(17px, 2.2vw, 22px); line-height: 1.45; color: #e9e3ff; }
.splash-quote .by, #interstitial .by { margin-top: 10px; color: var(--muted); font-size: 13px; }
.splash-load { width: 220px; height: 3px; background: #1b2434; border-radius: 2px; margin-top: 34px; overflow: hidden; }
.splash-load span { display: block; height: 100%; width: 100%; background: var(--accent); transform-origin: left; animation: load 3s linear forwards; }
@keyframes load { from { transform: scaleX(0); } }
.splash-hint { margin-top: 10px; font-size: 11px; color: var(--dim); }
#interstitial { position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 25; background: #0b1120ee; border: 1px solid var(--line);
  border-radius: 12px; padding: 22px 26px; text-align: center; box-shadow: 0 20px 60px #000a; animation: rise 300ms ease-out; width: min(640px, calc(100vw - 32px)); }
#interstitial .kicker { font-size: 10.5px; letter-spacing: .2em; text-transform: uppercase; color: var(--warn); margin-bottom: 10px; }
.paper-cols { display: grid; grid-template-columns: 1fr 210px; gap: 16px; }
.paper-quote { border-left: 1px solid #1c1a1755; padding-left: 14px; margin-top: 10px; font-size: 13px; }
.paper-quote span { display: block; font-size: 10px; letter-spacing: .14em; text-transform: uppercase; margin-bottom: 4px; }
.paper-quote q { font-style: italic; display: block; line-height: 1.4; }
.paper-quote i { display: block; margin-top: 6px; font-size: 11.5px; color: #5b554c; font-style: normal; }
.paper-archive { margin-top: 10px; padding-top: 8px; border-top: 1px solid #1c1a1733; font-size: 13px; color: #3b362f; line-height: 1.45; }
@media (max-width: 700px) { .paper-cols { grid-template-columns: 1fr; } }

/* ── Multiplayer ── */
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; vertical-align: middle; }
.chatlog { background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; height: 180px; overflow-y: auto; font-size: 12.5px; line-height: 1.5; }
.mono { font-family: var(--mono); letter-spacing: .12em; color: var(--accent); }

/* ── Real-time clock ── */
#clock { position: fixed; top: 64px; left: 50%; transform: translateX(-50%); z-index: 35; background: #0b1120f2; border: 1px solid var(--line); border-radius: 10px;
  padding: 6px 10px; display: flex; align-items: center; gap: 10px; font-family: var(--mono); font-size: 12px; box-shadow: 0 6px 20px #0008; }
#clock b { font-size: 15px; color: var(--accent); min-width: 44px; text-align: right; }
#clock.urgent b { color: var(--neg); animation: pulse 0.8s ease-in-out infinite; }
#clock .cbar2 { width: 120px; height: 5px; background: var(--line-soft); border-radius: 3px; overflow: hidden; }
#clock .cbar2 span { display: block; height: 100%; background: var(--accent); transition: width 250ms linear; }
#clock.urgent .cbar2 span { background: var(--neg); }
#clock .btn { padding: 3px 8px; font-size: 11px; }

/* ── Real time: speed, inbox, news card, fog ── */
.speed { display: flex; align-items: center; gap: 3px; }
.speed .btn { padding: 6px 8px; font-family: var(--mono); min-width: 34px; }
.speed .btn.on { background: #0e7490; border-color: #22d3ee; color: #fff; }
.qbar { width: 70px; height: 5px; background: var(--line-soft); border-radius: 3px; overflow: hidden; margin-left: 6px; }
.qbar span { display: block; height: 100%; background: var(--accent); }
#inbox { position: fixed; top: 70px; left: calc(270px + 14px); z-index: 15; width: min(380px, 40vw); display: flex; flex-direction: column; gap: 8px; max-height: calc(100vh - 120px); overflow-y: auto; }
.dcard { background: #0e1524f2; border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: 10px; padding: 10px 12px; box-shadow: 0 10px 30px #000a; animation: rise 250ms ease-out; }
.dcard.pit { border-left-color: var(--neg); background: #1a0f12f2; }
.dcard.done { border-left-color: var(--warn); }
.dcard .dhead { display: flex; justify-content: space-between; align-items: center; font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 5px; font-family: var(--mono); }
.dcard .dhead .btn { padding: 2px 7px; font-size: 10px; letter-spacing: 0; text-transform: none; }
.dcard .dbar { height: 4px; background: var(--line-soft); border-radius: 2px; overflow: hidden; margin-bottom: 7px; }
.dcard .dbar span { display: block; height: 100%; background: var(--warn); transition: width 400ms linear; }
.dcard.pit .dbar span { background: var(--neg); }
.dcard b { font-size: 14px; } .dcard p { margin: 4px 0 8px; font-size: 12.5px; line-height: 1.45; color: #cbd5e1; }
.dopts { display: flex; flex-direction: column; gap: 5px; }
.dopts .btn { text-align: left; white-space: normal; line-height: 1.3; }
.dopts .btn.dflt { border-style: dashed; }
.dcard .history { margin-top: 6px; padding: 8px 10px; }
#newsCard { position: fixed; left: 284px; bottom: 40px; z-index: 16; width: min(380px, 40vw); cursor: pointer; animation: rise 300ms ease-out; }
.paper.mini { padding: 10px 14px; margin: 0; box-shadow: 0 12px 30px #000b; }
.paper.mini h1 { font-size: 19px; margin: 6px 0 4px; } .paper.mini p { font-size: 12.5px; margin-bottom: 4px; } .paper.mini .muted { font-size: 11px; color: #6b645a; }
.rbar { position: relative; }
.rbar .range { position: absolute; top: 0; bottom: 0; opacity: .25; border-radius: 4px; }
@media (max-width: 1100px) { #inbox { left: 14px; width: min(360px, calc(100vw - 28px)); } #newsCard { right: 14px; } }

/* ── Dock under the board (inbox · live feed · newspaper): nothing overlaps the wheel ── */
#boardWrap { display: flex; flex-direction: column; }
#boardArea { position: relative; flex: 1; min-height: 0; }
#dock { flex: none; height: 214px; display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 10px; padding: 8px 10px 34px; border-top: 1px solid var(--line); background: #0a0e15; }
.dock-col { min-width: 0; display: flex; flex-direction: column; }
.dock-col h4 { margin: 0 0 6px; font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
#inbox { position: static; width: auto; max-height: none; flex: 1; display: flex; flex-direction: row; gap: 8px; overflow-x: auto; overflow-y: hidden; z-index: auto; }
#inbox .dcard { flex: 0 0 290px; overflow-y: auto; box-shadow: none; }
#inbox:empty::before { content: 'Nothing waiting. The clock is running.'; color: var(--dim); font-size: 12px; }
#toasts { position: static; width: auto; flex: 1; overflow: hidden; z-index: auto; pointer-events: auto; gap: 5px; }
#toasts .toast { box-shadow: none; padding: 6px 9px; font-size: 12px; animation: toastIn 250ms ease-out; }
#newsCard { position: static; width: auto; flex: 1; overflow: hidden; animation: none; }
#newsCard .paper.mini { box-shadow: none; height: 100%; overflow: hidden; }
#oppLayer { position: absolute; inset: 0; pointer-events: none; }
.opp { position: absolute; transform: translate(-50%, -50%); pointer-events: auto; border: 2px solid #fde68a; background: radial-gradient(circle, #fbbf24, #b45309); color: #1c1206;
  border-radius: 999px; padding: 8px 14px; font-weight: 700; font-size: 12px; cursor: pointer; box-shadow: 0 0 0 0 #fbbf2499; animation: oppPulse 1.2s ease-in-out infinite; white-space: nowrap; }
.opp.wrath { background: radial-gradient(circle, #f87171, #7f1d1d); border-color: #fca5a5; color: #fff; }
.opp small { display: block; font-weight: 500; font-size: 10px; opacity: .8; }
@keyframes oppPulse { 50% { box-shadow: 0 0 0 14px #fbbf2400; transform: translate(-50%, -50%) scale(1.06); } }
.buffs { display: flex; flex-wrap: wrap; gap: 5px; }
.buff { font-size: 11px; padding: 3px 8px; border-radius: 10px; border: 1px solid #14532d; color: #bbf7d0; background: #0c1f14; }
.buff.bad { border-color: #7f1d1d; color: #fecaca; background: #1f0c0c; }
.kpi.click { cursor: pointer; } .kpi.click:hover .v { text-decoration: underline; }
.map { width: 100%; background: radial-gradient(ellipse at center, #0f1a2e, #070b13); border-radius: 10px; }
.legacy { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.perk { background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; padding: 10px; font-size: 12.5px; }
.perk.owned { border-color: #d4a017; }
@media (max-width: 1000px) { #dock { grid-template-columns: 1fr; height: auto; } }
