:root {
  --ink: #e9f2f7;
  --muted: #8da5b4;
  --bg: #061019;
  --panel: #0b1924;
  --panel-2: #0e202c;
  --line: #1d3543;
  --cyan: #55d6e8;
  --cyan-soft: rgba(85,214,232,.12);
  --green: #6be3a2;
  --amber: #ffbd59;
  --red: #ff6678;
  --purple: #ab92ff;
  --magenta: #ff4fd8;
  --shadow: 0 24px 70px rgba(0,0,0,.35);
}

* { box-sizing: border-box; }
.sr-only { position:absolute !important; width:1px !important; height:1px !important; padding:0 !important; margin:-1px !important; overflow:hidden !important; clip:rect(0,0,0,0) !important; white-space:nowrap !important; border:0 !important; }
.game-logo { display:block; height:auto; object-fit:contain; }
.gameplay-logo { width:108px; }
.start-logo { width:min(100%,560px); margin:0 auto 10px; filter:drop-shadow(0 10px 26px rgba(0,0,0,.32)); }
.popup-logo { width:min(230px,58%); max-height:92px; margin:0 auto 12px; filter:drop-shadow(0 6px 14px rgba(0,0,0,.25)); }
html { min-width: 320px; background: var(--bg); }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 18% -10%, rgba(36,126,153,.2), transparent 34rem),
    linear-gradient(180deg, #07131d 0%, #050c13 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  height:100vh;
  height:100dvh;
  overflow:hidden;
}
body::before { content:""; position:fixed; z-index:50; inset:0; pointer-events:none; opacity:.025; background:repeating-linear-gradient(180deg,transparent 0 3px,#8deeff 4px); }

button { font: inherit; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, tbody tr:focus-visible { outline:2px solid var(--cyan); outline-offset:2px; }
.app-shell { min-height:100vh; height:100vh; height:100dvh; display:grid; grid-template-rows:auto auto auto minmax(0,1fr); overflow:hidden; }
.topbar {
  min-height: 56px;
  display: grid;
  grid-template-columns: 118px minmax(520px, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 6px 18px;
  border-bottom: 1px solid var(--line);
  background: rgba(5,14,22,.86);
  backdrop-filter: blur(18px);
}
.brand-block, .operator, .week-clock { display: flex; align-items: center; gap: 10px; }
.brand-block > div { display:none; }
.brand-mark {
  width: 46px; height: 46px; display: grid; place-items: center;
  border: 1px solid var(--cyan); color: var(--cyan); font-weight: 850; letter-spacing: -.04em;
  clip-path: polygon(12% 0, 100% 0, 100% 75%, 75% 100%, 0 100%, 0 12%);
}
h1, h2, p { margin: 0; }
h1 { color:#f4fcff; font-size:1.08rem; letter-spacing:.02em; text-shadow:0 0 14px rgba(85,214,232,.38); }
.brand-block p { color: var(--muted); font-size: .78rem; margin-top: 3px; }
.eyebrow { display: block; color: var(--muted); font-size: .68rem; font-weight: 800; letter-spacing: .14em; }
.week-clock { display:grid; grid-template-columns:auto 32px minmax(190px,1fr) auto; justify-content:stretch; width:100%; gap:10px; }
.week-clock strong { display: block; margin-top: 1px; font-size: .96rem; letter-spacing: .04em; white-space:nowrap; }
.week-track { position: relative; width:auto; padding-top: 5px; }
.week-track::before { content: ""; display: block; height: 4px; border-radius: 10px; background: #18303d; }
.week-progress { position: absolute; left: 0; top: 5px; width: 0; height: 4px; border-radius: 10px; background: linear-gradient(90deg, var(--cyan), var(--green)); box-shadow: 0 0 14px rgba(85,214,232,.5); }
.day-ticks { display: flex; justify-content: space-between; margin-top: 5px; color: #67808e; font-size: .56rem; font-weight: 800; letter-spacing: .07em; }
.icon-button { width: 32px; height: 32px; border-radius: 7px; border: 1px solid var(--line); color: var(--ink); background: var(--panel); cursor: pointer; }
.clock-actions { display:flex; flex-wrap:nowrap; align-items:center; gap:5px; }
.shortcut-button { min-height:32px; display:flex; align-items:center; gap:6px; padding:0 8px; border-radius:7px; border:1px solid var(--line); color:var(--muted); background:var(--panel); cursor:pointer; font-size:.68rem; font-weight:750; text-decoration:none; white-space:nowrap; }
.shortcut-button b { min-width:14px; color:var(--cyan); font-size:.82rem; text-align:center; }
.shortcut-button:hover { color:var(--cyan); border-color:#386276; }
.shortcut-button:disabled { opacity:.38; cursor:not-allowed; }
kbd { display:inline-grid; min-width:20px; height:20px; place-items:center; padding:0 5px; border:1px solid #416071; border-bottom-width:2px; border-radius:4px; color:var(--ink); background:#07141d; font:700 .68rem/1 ui-monospace, SFMono-Regular, Menlo, monospace; box-shadow:0 1px 0 rgba(255,255,255,.05); }
.operator { justify-content: flex-end; }
.operator strong { display: block; font-size: .72rem; margin-top: 2px; white-space:nowrap; }
#operator-rank { color:var(--green); text-shadow:0 0 9px rgba(107,227,162,.25); }
.online-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--green); box-shadow: 0 0 10px var(--green); }
.incident-bar { display:flex; align-items:center; gap:14px; min-height:40px; padding:6px 24px; border-bottom:1px solid rgba(255,102,120,.55); color:#ffd5da; background:#2c0f17; font-size:.72rem; font-weight:850; letter-spacing:.08em; }
.incident-list { display:flex; flex-wrap:wrap; gap:7px; }
.incident-chip { position:relative; display:flex; align-items:center; gap:8px; padding:5px 9px; border:1px solid rgba(255,102,120,.68); border-radius:5px; color:#ffe9ec; background:rgba(255,102,120,.1); letter-spacing:.03em; cursor:help; }
.incident-chip small { min-width:28px; color:#ffabb5; font:800 .68rem/1 ui-monospace, SFMono-Regular, Menlo, monospace; text-align:right; }
.incident-chip::after { content:attr(data-impact); position:absolute; z-index:90; left:0; top:calc(100% + 8px); width:260px; padding:9px 11px; border:1px solid rgba(255,102,120,.75); border-radius:5px; color:#ffe9ec; background:#2c0f17; box-shadow:0 12px 30px rgba(0,0,0,.45); font-size:.7rem; font-weight:650; line-height:1.4; letter-spacing:0; opacity:0; transform:translateY(-3px); pointer-events:none; transition:opacity .12s,transform .12s; transition-delay:0s; }
.incident-chip:focus-visible::after, .incident-chip.tooltip-open::after { opacity:1; transform:translateY(0); transition-delay:0s; }
@media (hover:hover) { .incident-chip:hover::after { opacity:1; transform:translateY(0); transition-delay:.5s; } }

.tournament-banner { display:flex; align-items:center; justify-content:center; gap:14px; min-height:35px; padding:6px 18px; border-bottom:1px solid rgba(255,189,89,.65); color:#061019; background:linear-gradient(90deg,#ffbd59,#55d6e8,#ffbd59); font-size:.68rem; letter-spacing:.08em; }
.tournament-banner.hidden { display:none; }
.tournament-banner span { font-weight:800; }
.tournament-banner b { padding:3px 7px; border:1px solid rgba(6,16,25,.4); background:rgba(255,255,255,.28); }

main { width:100%; height:100%; min-height:0; display:grid; grid-template-rows:auto minmax(0,1fr); padding:10px 14px 12px; max-width:1800px; margin:0 auto; overflow:hidden; }
.metric-strip { display:grid; grid-template-columns:repeat(8,minmax(112px,1fr)); border:1px solid var(--line); background:rgba(11,25,36,.74); margin-bottom:8px; overflow-x:auto; }
.metric { position: relative; min-height: 46px; padding: 7px 10px; border-right: 1px solid var(--line); }
.metric-button { appearance:none; width:100%; border:0; border-right:1px solid var(--line); color:var(--ink); background:rgba(85,214,232,.035); text-align:left; cursor:pointer; }
.metric-button:hover { background:rgba(85,214,232,.09); box-shadow:inset 0 -2px var(--cyan); }
.metric:last-child { border-right: 0; }
.metric span { display:block; overflow:hidden; color:var(--muted); font-size:.72rem; font-weight:800; letter-spacing:.045em; text-overflow:ellipsis; white-space:nowrap; }
.metric strong { display: block; margin-top: 2px; font-size: 1.02rem; line-height:1; letter-spacing: -.02em; }
.metric small { display: none; }
.metric.stress::after { content:""; position:absolute; left:10px; right:10px; bottom:3px; height:2px; background:linear-gradient(90deg,var(--green),var(--amber),var(--red)); opacity:.7; }
.metric.average-delay { background:rgba(85,214,232,.035); box-shadow:inset 0 -3px currentColor; }
.metric.average-delay.safe { color:var(--green); }
.metric.average-delay.watch { color:var(--amber); }
.metric.average-delay.late { color:var(--red); }
.metric.average-delay span, .metric.average-delay small { color:var(--muted); }
.metric.tone-good strong { color:var(--green); }
.metric.tone-watch strong { color:var(--amber); }
.metric.tone-danger strong { color:var(--red); text-shadow:0 0 12px rgba(255,102,120,.24); }
.score-metric { background:linear-gradient(145deg,rgba(85,214,232,.07),rgba(255,189,89,.05)); }
.score-metric strong { color:var(--cyan); }
.score-metric small { color:var(--amber); font-weight:800; }

.workspace { height:100%; min-height:0; display:grid; grid-template-columns:minmax(540px,1.1fr) minmax(500px,1fr); gap:10px; align-items:stretch; overflow:hidden; }
.panel { border: 1px solid var(--line); background: rgba(11,25,36,.82); box-shadow: var(--shadow); }
.panel-head { min-height:54px; display:flex; align-items:center; justify-content:space-between; gap:12px; padding:9px 12px; border-bottom:1px solid var(--line); }
.panel-head.compact { min-height: 65px; }
.panel-head h2, .detail-panel h2 { font-size: 1rem; margin-top: 4px; }
.filters { display: flex; gap: 4px; padding: 4px; border-radius: 9px; background: #06131c; }
.case-controls { display:flex; align-items:center; gap:14px; }
.queue-legend { display:flex; gap:10px; color:var(--muted); font-size:.66rem; white-space:nowrap; }
.queue-legend span { display:flex; align-items:center; gap:5px; }
.queue-legend .next-indicator { width:18px; height:18px; font-style:normal; }
.filter { border: 0; border-radius: 6px; padding: 8px 10px; color: var(--muted); background: transparent; font-size: .76rem; cursor: pointer; }
.filter span { display: inline-grid; place-items: center; min-width: 20px; height: 20px; margin-left: 4px; border-radius: 5px; background: #132a37; color: #a7bdc9; }
.filter.active { background: #18303d; color: var(--ink); }
.case-panel { min-height:0; display:grid; grid-template-rows:auto minmax(0,1fr); overflow:hidden; }
.table-wrap { height:auto; max-height:none; min-height:0; overflow:auto; }
table { width: 100%; min-width: 900px; border-collapse: collapse; }
.mode-arcade table { min-width:0; table-layout:fixed; }
.mode-arcade th, .mode-arcade td { overflow:hidden; }
.mode-arcade th:nth-child(1) { width:8%; }
.mode-arcade th:nth-child(2) { width:18%; }
.mode-arcade th:nth-child(3) { width:16%; }
.mode-arcade th:nth-child(4) { width:26%; }
.mode-arcade th:nth-child(5) { width:7%; }
.mode-arcade th:nth-child(6) { width:17%; }
.mode-arcade th:nth-child(7) { width:8%; }
.mode-arcade .sort-button { max-width:100%; overflow:hidden; text-overflow:ellipsis; }
.mode-arcade.arcade-compact .panel-head { min-height:44px; padding-block:5px; }
.mode-arcade.arcade-compact th, .mode-arcade.arcade-compact td { padding-block:6px; }
.mode-arcade.arcade-compact .asset { margin-top:1px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.mode-arcade.arcade-compact .pill { padding-block:3px; }
.mode-arcade.arcade-compact .next-indicator { width:24px; height:24px; }
thead { position: sticky; top: 0; z-index: 2; background: #091720; }
th { padding:9px 11px; color:#87a2b1; font-size:.75rem; text-align:left; letter-spacing:.06em; text-transform:uppercase; }
.sort-button { display:inline-flex; align-items:center; gap:5px; padding:0; border:0; color:inherit; background:transparent; font:inherit; letter-spacing:inherit; text-transform:inherit; cursor:pointer; white-space:nowrap; }
.sort-button:hover, .sort-button.active { color:var(--cyan); }
.sort-arrow { display:inline-block; width:10px; color:var(--cyan); }
.sort-button.active[data-direction="asc"] .sort-arrow::after { content:"↑"; }
.sort-button.active[data-direction="desc"] .sort-arrow::after { content:"↓"; }
td { padding:10px 11px; border-top:1px solid rgba(29,53,67,.7); vertical-align:middle; }
tbody tr { cursor: pointer; transition: background .15s, box-shadow .15s; }
tbody tr:hover { background: rgba(85,214,232,.045); }
tbody tr.selected { background: var(--cyan-soft); box-shadow: inset 3px 0 var(--cyan); }
.case-id { color: var(--cyan); font-weight: 800; font-size: .78rem; white-space:nowrap; }
.customer { display: block; font-weight: 720; font-size: .86rem; }
.asset { display:block; color:var(--muted); font-size:.75rem; margin-top:3px; }
.deadline { font-weight: 700; font-size: .82rem; }
.deadline small { display:block; color:var(--muted); font-weight:500; margin-top:3px; }
.pill { display: inline-flex; align-items: center; gap: 6px; border: 1px solid; border-radius: 999px; padding: 5px 8px; font-size: .67rem; font-weight: 800; white-space: nowrap; }
.pill::before { content:""; width:6px; height:6px; border-radius:50%; background:currentColor; }
.pill.green { color: var(--green); background: rgba(107,227,162,.07); border-color: rgba(107,227,162,.25); }
.pill.amber { color: var(--amber); background: rgba(255,189,89,.07); border-color: rgba(255,189,89,.25); }
.pill.red { color: var(--red); background: rgba(255,102,120,.07); border-color: rgba(255,102,120,.25); }
.pill.purple { color: var(--purple); background: rgba(171,146,255,.07); border-color: rgba(171,146,255,.25); }
.pill.grey { color:#aab7be; background:rgba(170,183,190,.07); border-color:rgba(170,183,190,.28); }
.delta-indicator { display:inline-flex; align-items:center; gap:7px; font-weight:850; font-size:.82rem; white-space:nowrap; }
.delta-indicator::before { content:""; width:8px; height:8px; border-radius:50%; background:currentColor; box-shadow:0 0 9px currentColor; }
.delta-indicator.safe { color:var(--green); }
.delta-indicator.watch { color:var(--amber); }
.delta-indicator.late { color:var(--red); }
.delta-indicator.critical { color:#ff3b52; }
.location { display:inline-flex; align-items:center; gap:7px; color:#c7d7de; font-size:.76rem; font-weight:700; white-space:nowrap; }
.location::before { content:""; width:7px; height:7px; border:1px solid currentColor; transform:rotate(45deg); }
.location.transit { color:var(--cyan); }
.location.blocked { color:var(--purple); }
.location.customer { color:#b9cad3; }
.location.received { color:var(--green); }
.location.unknown { color:#aab7be; border-bottom:1px dotted currentColor; }
.next-indicator { display:inline-grid; place-items:center; width:28px; height:28px; border-radius:50%; font-size:.8rem; font-weight:950; }
.next-indicator.action { color:#16090b; background:var(--red); box-shadow:0 0 13px rgba(255,102,120,.35); }
.next-indicator.running { color:#052029; background:var(--cyan); }
.next-indicator.unknown { color:#fff; border:1px dashed #aab7be; background:#586772; }
.next-indicator.action::after { content:"!"; }
.next-indicator.running::after { content:"▶"; font-size:.62rem; margin-left:1px; }
.next-indicator.unknown::after { content:"?"; }
.amount { font-weight: 800; font-size: .82rem; white-space:nowrap; }
.amount.positive { color: var(--red); }
.amount.negative { color: var(--green); }

.right-rail { min-height:0; display:grid; grid-template-rows:minmax(0,1fr) auto; gap:8px; overflow:hidden; }
.detail-panel { min-height:0; overflow:auto; }
.empty-detail { min-height: 425px; display:flex; flex-direction:column; align-items:center; justify-content:center; text-align:center; padding:30px; color:var(--muted); }
.empty-detail h2 { color:var(--ink); margin-bottom:8px; }
.empty-detail p { max-width:300px; font-size:.84rem; line-height:1.55; }
.radar-icon { width:64px; height:64px; display:grid; place-items:center; margin-bottom:16px; border-radius:50%; border:1px solid var(--line); color:var(--cyan); font-size:2.3rem; background:var(--cyan-soft); }
.detail-head { position:relative; padding:12px 14px; border-bottom:1px solid var(--line); }
.detail-title-row { display:flex; justify-content:space-between; gap:12px; }
.detail-head h2 { font-size:1.08rem; margin-top:5px; }
.detail-meta { display:grid; grid-template-columns:1fr 1fr; gap:8px; padding:10px 12px; border:0; }
.meta-box { background:#07141d; padding:10px; }
.meta-box span { color:var(--muted); font-size:.66rem; display:block; }
.meta-box strong { font-size:.82rem; display:block; margin-top:4px; }
.journey-meta { border-left:2px solid rgba(85,214,232,.45); }
.score-indicator { display:inline-flex !important; align-items:center; gap:6px; }
.score-indicator::before { content:""; width:7px; height:7px; border-radius:50%; background:currentColor; box-shadow:0 0 8px currentColor; }
.score-indicator.strong { color:var(--green); }
.score-indicator.medium { color:var(--amber); }
.score-indicator.weak { color:var(--red); }
.issue-box { position:relative; margin:10px 12px 0; padding:12px 13px 12px 15px; border:1px solid rgba(255,189,89,.38); border-left:5px solid var(--amber); background:linear-gradient(90deg,rgba(255,189,89,.14),rgba(255,189,89,.04)); box-shadow:0 0 24px rgba(255,189,89,.08); }
.issue-box span { display:block; color:var(--amber); font-size:.68rem; font-weight:900; letter-spacing:.12em; }
.issue-box p { margin-top:7px; color:#fff3d9; font-size:.86rem; font-weight:650; line-height:1.5; }
.action-group { margin-top:8px; padding:10px 12px 12px; border-top:1px solid rgba(85,214,232,.18); border-bottom:1px solid var(--line); background:rgba(5,16,24,.34); }
.case-secondary, .case-history { margin:8px 12px; border:1px solid rgba(29,53,67,.72); background:rgba(7,20,29,.55); }
.case-secondary > summary, .case-history > summary { padding:9px 11px; color:var(--muted); cursor:pointer; font-size:.72rem; font-weight:850; letter-spacing:.06em; }
.case-history { opacity:.86; }
.case-history-list { padding:0 11px 8px; }
.case-history-list { max-height:116px; overflow:auto; }
.case-history-item { display:grid; grid-template-columns:105px 1fr; gap:8px; padding:7px 0; border-top:1px solid rgba(29,53,67,.65); }
.case-history-item:first-child { border-top:0; }
.case-history-item time { color:#67808e; font-size:.64rem; }
.case-history-item p { color:#bfd0d8; font-size:.7rem; line-height:1.35; }
.action-group h3 { margin:0 0 9px; color:var(--muted); font-size:.68rem; letter-spacing:.1em; }
.action-title-row { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.action-title-row h3 { margin:0; }
.action-title-row > span { display:flex; align-items:center; gap:4px; color:#708b9a; font-size:.66rem; }
.action-title-row kbd { min-width:18px; height:18px; font-size:.62rem; }
.action-empty { margin:10px 0 0; padding:11px; color:var(--muted); border:1px dashed var(--line); font-size:.74rem; }
.action-cluster { margin-top:9px; padding:10px; border:1px solid var(--line); background:rgba(5,15,23,.62); }
.action-cluster h4 { margin:0 0 8px; font-size:.62rem; letter-spacing:.1em; }
.customer-cluster { border-left:3px solid var(--cyan); }
.customer-cluster h4, .customer-action { color:var(--cyan); }
.internal-cluster { border-left:3px solid var(--purple); }
.internal-cluster h4, .internal-action { color:#c0afff; }
.financial-cluster { border-left:3px solid var(--amber); }
.financial-cluster h4, .process-action { color:var(--amber); }
.actions { display:grid; grid-template-columns:1fr 1fr; gap:8px; }
.action-btn { position:relative; min-height:46px; padding:9px 38px 9px 10px; border:1px solid var(--line); border-radius:7px; color:var(--ink); background:#0d202b; text-align:left; cursor:pointer; font-size:.82rem; line-height:1.3; transition:.15s; }
.action-btn > kbd { position:absolute; top:8px; right:8px; color:var(--muted); border-color:#36505f; background:rgba(5,16,25,.7); }
.action-btn:hover { border-color:#386276; transform:translateY(-1px); }
.action-btn small { display:block; color:#9db2bd; font-size:.72rem; margin-top:3px; }
.action-btn.customer-action { color:var(--cyan); border-color:rgba(85,214,232,.28); background:rgba(24,57,69,.68); }
.action-btn.internal-action { color:#c0afff; border-color:rgba(171,146,255,.28); background:rgba(40,32,70,.35); }
.action-btn.process-action { color:var(--amber); border-color:rgba(255,189,89,.3); background:rgba(66,47,20,.3); }
.action-btn.financial-action { color:var(--amber); border-color:rgba(255,189,89,.34); background:rgba(66,47,20,.3); }
.action-btn.money { border-color:rgba(85,214,232,.35); color:var(--cyan); }
.action-btn.danger { border-color:rgba(255,102,120,.38); color:var(--red); }
.action-btn:disabled { opacity:.35; cursor:not-allowed; transform:none; }
.feed-pulse { color:var(--green); font-size:.62rem; font-weight:900; letter-spacing:.12em; }
.activity-panel { min-height:0; max-height:220px; transition:max-height .18s ease; }
.activity-panel.collapsed { max-height:44px; overflow:hidden; }
.activity-panel.collapsed .activity-feed { display:none; }
.activity-panel .panel-head.compact { min-height:42px; padding:6px 10px; }
.activity-toggle { padding:4px 8px; border:1px solid var(--line); color:var(--cyan); background:var(--panel); cursor:pointer; font-size:.68rem; }
.activity-feed { height:166px; overflow:auto; padding:4px 12px 10px; }
.detail-back { display:none; padding:5px 8px; border:1px solid var(--line); color:var(--cyan); background:var(--panel); cursor:pointer; }
.feed-item { display:grid; grid-template-columns:48px 1fr; gap:10px; padding:11px 0; border-bottom:1px solid rgba(29,53,67,.6); }
.feed-item time { color:#637f8e; font-size:.67rem; }
.feed-item p { font-size:.73rem; line-height:1.4; color:#b9cad3; }
.feed-item strong { color:var(--ink); }

.modal-backdrop { position:fixed; z-index:20; inset:0; display:grid; place-items:center; padding:20px; background:rgba(2,7,11,.82); backdrop-filter:blur(10px); }
.modal-backdrop.hidden { display:none; }
.modal-backdrop > section { max-height:calc(100vh - 32px); overflow:auto; }
.start-card, .event-card, .end-card, .shortcut-card, .customer-card, .changelog-card, .credits-card, .quit-card, .cheats-card, .music-card, .career-card, .achievement-detail-card, .fod-card, .validator-card, .share-card-modal, .bug-details-card { width:min(620px,100%); padding:38px; border:1px solid #2e596b; background:linear-gradient(145deg,#102633,#08141d); box-shadow:0 40px 100px #000; }
.customer-card { width:min(900px,100%); }
.start-kicker { color:var(--cyan); font-size:.7rem; font-weight:900; letter-spacing:.16em; }
.start-card h2, .event-card h2, .end-card h2, .shortcut-card h2, .customer-card h2, .changelog-card h2, .credits-card h2, .quit-card h2, .cheats-card h2, .music-card h2, .career-card h2, .achievement-detail-card h2, .fod-card h2, .validator-card h2, .share-card-modal h2, .bug-details-card h2 { font-size:clamp(1.8rem,5vw,3rem); line-height:1.02; letter-spacing:-.05em; margin:12px 0 14px; }
.customer-card > p { color:var(--muted); margin-bottom:16px; }
.start-card > p, .event-card > p, .end-card > p { color:#a9bdc8; line-height:1.6; }
.brief-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:1px; margin:25px 0; background:var(--line); border:1px solid var(--line); }
.brief-grid div { padding:16px; background:#091821; }
.brief-grid strong { display:block; color:var(--amber); font-size:1.18rem; }
.brief-grid span { display:block; color:var(--muted); margin-top:5px; font-size:.72rem; line-height:1.35; }
.brief-note { display:flex; gap:12px; align-items:flex-start; margin-bottom:22px; padding:12px; background:rgba(255,189,89,.07); border:1px solid rgba(255,189,89,.18); }
.brief-note > span { flex:0 0 24px; height:24px; display:grid; place-items:center; border-radius:50%; background:var(--amber); color:#171006; font-weight:900; }
.brief-note p { color:#dbc69e; font-size:.75rem; line-height:1.45; }
.primary-button { width:100%; min-height:50px; display:flex; align-items:center; justify-content:space-between; padding:0 18px; border:0; color:#041015; background:var(--cyan); font-weight:850; cursor:pointer; }
.primary-button:hover { filter:brightness(1.08); }
.start-card > small { display:block; color:var(--muted); text-align:center; margin-top:12px; }
.continue-career { width:100%; min-height:58px; display:flex; align-items:center; justify-content:space-between; gap:16px; margin:18px 0 4px; padding:10px 14px; border:1px solid rgba(107,227,162,.52); color:var(--ink); background:linear-gradient(90deg,rgba(107,227,162,.14),rgba(85,214,232,.06)); text-align:left; cursor:pointer; }
.continue-career.hidden { display:none; }
.continue-career span { display:grid; gap:3px; }
.continue-career strong { color:var(--green); font-size:.92rem; }
.continue-career small { color:var(--muted); font-size:.7rem; }
.continue-career b { color:var(--green); font-size:.7rem; letter-spacing:.08em; white-space:nowrap; }
.continue-career:hover { border-color:var(--green); background:rgba(107,227,162,.16); }
.start-resumes { display:grid; grid-template-columns:1fr 1fr; gap:8px; }
.start-resumes .continue-career { margin:10px 0 2px; }
.entry-choice { display:grid; grid-template-columns:1fr 1fr; gap:14px; margin:20px 0 8px; }
.entry-card { min-height:218px; display:flex; flex-direction:column; align-items:center; justify-content:flex-end; overflow:hidden; padding:10px 14px 15px; border:1px solid rgba(85,214,232,.42); color:var(--ink); background:linear-gradient(145deg,rgba(20,58,72,.88),#091821); cursor:pointer; text-align:center; }
.entry-card img { width:150px; height:150px; margin:-6px auto 2px; object-fit:contain; filter:drop-shadow(0 8px 12px rgba(0,0,0,.3)); transition:transform .2s; }
.entry-card span { display:grid; gap:3px; }
.entry-card strong { color:var(--cyan); font-size:1.08rem; }
.entry-card small { color:var(--muted); font-size:.7rem; }
.entry-card:hover { border-color:var(--cyan); box-shadow:0 0 30px rgba(85,214,232,.1); }
.entry-card:hover img { transform:translateY(-3px) scale(1.03); }
.tournament-entry { border-color:rgba(255,189,89,.5); background:linear-gradient(145deg,rgba(83,56,18,.6),rgba(25,22,49,.9)); }
.tournament-entry strong { color:var(--amber); }
.setup-back, .score-validator-link { padding:6px 9px; border:1px solid var(--line); color:var(--muted); background:transparent; cursor:pointer; font-size:.68rem; font-weight:800; }
.setup-back { margin-bottom:14px; }
.score-validator-link { display:block; margin:11px auto 0; }
.setup-back:hover, .score-validator-link:hover { color:var(--cyan); border-color:var(--cyan); }
.hidden { display:none !important; }
.player-name-field { display:grid; gap:5px; margin:10px 0 14px; color:var(--muted); font-size:.62rem; font-weight:900; letter-spacing:.1em; }
.player-name-field input { width:100%; min-height:40px; padding:0 12px; border:1px solid var(--line); color:var(--ink); background:#07141d; font-size:.85rem; outline:none; }
.player-name-field input:focus { border-color:var(--cyan); box-shadow:0 0 0 2px rgba(85,214,232,.12); }
.tournament-start { width:100%; min-height:54px; display:flex; align-items:center; justify-content:space-between; gap:14px; margin:10px 0 14px; padding:9px 14px; border:1px solid rgba(255,189,89,.52); color:var(--ink); background:linear-gradient(90deg,rgba(255,189,89,.14),rgba(171,146,255,.08)); cursor:pointer; text-align:left; }
.tournament-start span { display:grid; gap:3px; }
.tournament-start strong { color:var(--amber); }
.tournament-start small { color:var(--muted); font-size:.67rem; }
.tournament-start b { color:var(--amber); font-size:.7rem; letter-spacing:.08em; }
.tournament-card > p { color:var(--muted); font-size:.78rem; line-height:1.5; }
.tournament-settings select { width:100%; min-height:40px; padding:0 10px; border:1px solid var(--line); color:var(--ink); background:#07141d; }
.tournament-warning { margin-top:14px; padding:10px; border-left:3px solid var(--red); color:#ffd1d6 !important; background:rgba(255,102,120,.08); }
.event-visual { width:100%; aspect-ratio:16/7; margin:2px 0 14px; border:1px solid var(--line); background-image:url("event-scenes.webp"); background-size:200% auto; background-repeat:no-repeat; box-shadow:inset 0 0 20px rgba(0,0,0,.2); }
.event-visual.hidden { display:none; }
.event-visual.breakfast { background-position:left center; }
.event-visual.management { background-position:right center; }
.time-cost { margin:20px 0; padding:14px; border-left:3px solid var(--red); background:rgba(255,102,120,.08); color:#ffc0c8; font-weight:800; }
.grade { float:right; display:grid; place-items:center; width:86px; height:86px; margin:0 0 20px 20px; border:2px solid var(--cyan); color:var(--cyan); font-size:3rem; font-weight:900; transform:rotate(4deg); }
.end-stats { clear:both; display:grid; grid-template-columns:repeat(3,1fr); gap:8px; margin:22px 0; }
.end-stats div { background:#07141d; padding:12px; }
.end-stats span { display:block; color:var(--muted); font-size:.66rem; }
.end-stats strong { display:block; margin-top:5px; }
.end-actions { display:grid; grid-template-columns:1fr 1fr; gap:8px; }
.end-actions .primary-button { grid-column:1 / -1; }
.end-actions > button:not(.primary-button), .feedback-button { min-height:42px; display:flex; align-items:center; justify-content:center; padding:0 12px; border:1px solid var(--line); color:var(--ink); background:#0d202b; cursor:pointer; font-size:.74rem; font-weight:800; text-decoration:none; text-align:center; }
.feedback-button:hover, .feedback-link:hover { border-color:var(--amber); color:var(--amber); }
.compact-feedback { margin-top:8px; }
.save-status { margin:11px 0 0; color:var(--muted); font-size:.72rem; text-align:center; }
.bug-details-card { width:min(760px,100%); }
.bug-details-card > p { color:var(--muted); font-size:.78rem; line-height:1.5; }
.bug-details-card textarea { width:100%; min-height:260px; margin:14px 0 4px; padding:12px; resize:vertical; border:1px solid var(--line); color:#dff7ff; background:#041019; font:500 .76rem/1.5 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace; }
.bug-details-actions { grid-template-columns:auto 1fr 1fr; }
.bug-details-actions .feedback-button { min-height:46px; }
.shortcut-grid { display:grid; grid-template-columns:1fr 1fr; gap:8px; margin:22px 0; }
.shortcut-grid div { min-height:54px; display:flex; align-items:center; gap:7px; padding:11px; background:#07141d; border:1px solid rgba(29,53,67,.72); }
.shortcut-grid span { margin-left:auto; color:#a9bdc8; font-size:.74rem; text-align:right; }
.legend-grid { display:grid; grid-template-columns:1fr 1fr; gap:8px; margin:18px 0 8px; }
.legend-grid > div { min-height:48px; display:flex; align-items:center; gap:9px; padding:10px; border:1px solid var(--line); background:#07141d; }
.legend-grid > div > span:last-child { margin-left:auto; color:var(--muted); font-size:.7rem; text-align:right; }
.customer-table-wrap { max-height:55vh; overflow:auto; margin:12px 0 18px; border:1px solid var(--line); }
.customer-table { min-width:680px; }
.customer-table th, .customer-table td { padding:11px 13px; }
.customer-table td:first-child { color:var(--ink); font-weight:750; }
.toast-stack { position:fixed; z-index:70; right:24px; bottom:24px; display:flex; width:min(390px,calc(100vw - 32px)); flex-direction:column; align-items:stretch; gap:8px; pointer-events:none; }
.toast-message { padding:13px 16px; border:1px solid #37677a; background:#102b38; color:var(--ink); box-shadow:var(--shadow); font-size:.8rem; transform:translateY(18px); opacity:0; transition:.2s; }
.toast-message.show { transform:translateY(0); opacity:1; }
.toast-message.financial { border-color:var(--amber); background:#3a2912; color:#ffe5b3; box-shadow:0 0 28px rgba(255,189,89,.28); }
.toast-message.critical, .toast-message.incident { border-color:var(--red); background:#35131a; color:#ffd3d8; box-shadow:0 0 28px rgba(255,102,120,.28); }
.toast-message.restored { border-color:var(--green); background:#103222; color:#d7ffe9; box-shadow:0 0 28px rgba(107,227,162,.24); }
.toast-message.evil { border-color:#f044ff; background:#120715; color:#ff86f7; box-shadow:0 0 30px rgba(240,68,255,.42); font-family:ui-monospace,SFMono-Regular,Menlo,monospace; }
.toast-message.lovely { border-color:#ff8dd8; background:#3d1733; color:#ffe2f5; box-shadow:0 0 30px rgba(255,141,216,.34); }
.toast-message.achievement { border-color:#ffe370; background:linear-gradient(100deg,#33290a,#162e2f); color:#fff2aa; box-shadow:0 0 34px rgba(255,227,112,.28); font-weight:850; }

@media (max-width:1450px) {
  .topbar { grid-template-columns:110px minmax(0,1fr); }
  .operator { display:none; }
  .shortcut-button span { display:none; }
  .shortcut-button { width:32px; justify-content:center; padding:0; }
}

@media (max-width: 1100px) {
  .topbar { grid-template-columns:112px minmax(0,1fr); }
  .operator { display:none; }
  .shortcut-button span { display:none; }
  .shortcut-button { width:32px; justify-content:center; padding:0; }
  .metric-strip { grid-template-columns:repeat(4,1fr); }
  .metric:nth-child(4) { border-right:0; }
  .metric:nth-child(-n+4) { border-bottom:1px solid var(--line); }
  .workspace { grid-template-columns:1fr; }
  .table-wrap { max-height:none; min-height:0; }
  .right-rail { grid-template-columns:1fr; }
}
@media (max-width: 720px) {
  .topbar { display:block; padding:14px 16px; }
  .week-clock { justify-content:space-between; margin-top:14px; }
  .shortcut-button span { display:none; }
  .gameplay-logo { width:120px; }
  .start-logo { margin-bottom:6px; }
  .popup-logo { width:min(210px,65%); }
  .week-track { width:48vw; }
  main { padding:12px; }
  .metric-strip { grid-template-columns:repeat(2,1fr); }
  .metric { border-bottom:1px solid var(--line); }
  .metric:nth-child(2n) { border-right:0; }
  .panel-head { align-items:flex-start; flex-direction:column; }
  .case-controls { width:100%; align-items:flex-start; flex-direction:column; }
  .filters { width:100%; }
  .filter { flex:1; }
  table { min-width:720px; }
  .case-panel th:nth-child(4), .case-panel td:nth-child(4), .case-panel th:nth-child(7), .case-panel td:nth-child(7) { display:none; }
  .right-rail { grid-template-columns:1fr; }
  .brief-grid, .end-stats { grid-template-columns:1fr; }
  .start-card, .event-card, .end-card, .shortcut-card, .customer-card { padding:25px; }
  .shortcut-grid, .legend-grid { grid-template-columns:1fr; }
}

/* Mode selection */
.mode-choice { display:grid; grid-template-columns:1fr 1fr; gap:12px; margin:22px 0 14px; }
.mode-card { min-height:190px; display:flex; flex-direction:column; align-items:flex-start; padding:18px; border:1px solid var(--line); color:var(--ink); background:#091821; text-align:left; cursor:pointer; }
.mode-card:hover { transform:translateY(-2px); }
.mode-card strong { margin-top:13px; font-size:1.05rem; }
.mode-card small { margin-top:8px; color:var(--muted); line-height:1.45; }
.mode-card i { margin-top:auto; font-style:normal; font-size:.72rem; font-weight:900; }
.mode-badge { font-size:.65rem; font-weight:900; letter-spacing:.12em; }
.arcade-choice { border-color:rgba(85,214,232,.45); background:linear-gradient(145deg,rgba(20,58,72,.85),#091821); }
.arcade-choice .mode-badge, .arcade-choice i { color:var(--cyan); }
.reality-choice { border:2px outset #fff; color:#000; background:#c0c0c0; font-family:Tahoma,"MS Sans Serif",sans-serif; box-shadow:inset 0 0 0 1px #808080; }
.reality-choice small { color:#333; }
.reality-choice .mode-badge { width:100%; padding:5px; color:#fff; background:#000080; }
.reality-choice i { width:100%; padding:7px; border:2px outset #fff; color:#000; background:#c0c0c0; text-align:center; }
.start-card .mode-card { min-height:145px; }
.version-line { display:flex; justify-content:center; gap:6px; margin-top:14px; }
.version-button { padding:5px 9px; border:1px solid transparent; color:#708b9a; background:transparent; cursor:pointer; font-size:.66rem; font-weight:850; letter-spacing:.12em; }
.version-line a.version-button { text-decoration:none; }
.version-button:hover { color:var(--cyan); border-color:var(--line); }
.changelog-list { display:grid; gap:8px; margin:18px 0 22px; }
.changelog-list section { display:grid; grid-template-columns:54px 1fr; gap:10px; padding:12px; border:1px solid var(--line); background:#07141d; }
.changelog-list strong { color:var(--cyan); }
.changelog-list p { color:var(--muted); font-size:.76rem; line-height:1.45; }
.credits-card { width:min(760px,100%); }
.ascii-frame { position:relative; overflow:hidden; margin:4px 0 18px; padding:12px; border:1px solid #31596c; color:var(--cyan); background:#02090d; box-shadow:inset 0 0 35px rgba(85,214,232,.08),0 0 24px rgba(85,214,232,.08); font-family:"Courier New",monospace; }
.ascii-frame::after { content:""; position:absolute; inset:0; pointer-events:none; background:repeating-linear-gradient(180deg,transparent 0 3px,rgba(85,214,232,.05) 4px); animation:ascii-scan 5s linear infinite; }
.ascii-frame pre { overflow:hidden; margin:0; font:700 clamp(.38rem,1.5vw,.78rem)/1.15 "Courier New",monospace; white-space:pre; text-align:center; text-shadow:0 0 10px currentColor; animation:ascii-pulse 1.2s steps(2,end) infinite; }
.ascii-marquee { overflow:hidden; margin-top:11px; color:var(--amber); font-size:.76rem; font-weight:900; letter-spacing:.08em; white-space:nowrap; animation:ascii-marquee 7s linear infinite; }
.rok-credit { display:block; margin:18px 0 12px; padding:10px; border:1px solid rgba(255,189,89,.5); color:var(--amber) !important; font-size:.82rem !important; font-weight:900; text-align:center; letter-spacing:.08em; }
.credits-copy { display:grid; gap:12px; }
.credits-copy p { color:#b7c9d2; font-size:.79rem; line-height:1.55; }
.credits-copy strong { color:var(--amber); }
.credits-joke { padding:9px 11px; border-left:2px solid var(--magenta); color:#f5c7eb !important; background:rgba(255,79,216,.06); font-family:ui-monospace,SFMono-Regular,Menlo,monospace; }
.credits-disclaimer { margin-top:16px; padding:12px 14px; border:1px solid rgba(141,165,180,.35); color:#a9bdc8; background:rgba(4,16,25,.72); }
.credits-disclaimer strong { display:block; margin-bottom:7px; color:var(--ink); font-size:.76rem; letter-spacing:.06em; text-transform:uppercase; }
.credits-disclaimer p { margin-top:6px; color:inherit; font-size:.7rem; line-height:1.5; }
.rok-credit { display:block; margin:15px 0 10px; color:#546a76; font-size:.56rem; font-weight:400; text-align:right; letter-spacing:.05em; }
@keyframes ascii-pulse { 0%,78% { opacity:1; } 79%,84% { opacity:.62; } 85%,100% { opacity:1; } }
@keyframes ascii-scan { from { transform:translateY(-12%); } to { transform:translateY(12%); } }
@keyframes ascii-marquee { from { transform:translateX(96%); } to { transform:translateX(-115%); } }
.quit-card p { color:var(--muted); line-height:1.55; }
.quit-stamp { float:right; margin:0 0 18px 18px; padding:12px 15px; border:3px double var(--red); color:var(--red); font-size:1.05rem; font-weight:950; letter-spacing:.08em; text-align:center; transform:rotate(5deg); }
.cheat-console { position:fixed; z-index:100; left:50%; bottom:22px; width:min(430px,calc(100vw - 32px)); display:flex; align-items:center; gap:8px; transform:translateX(-50%); padding:9px 12px; border:1px solid #6f2b78; background:#09070b; box-shadow:0 12px 40px rgba(0,0,0,.65),0 0 24px rgba(240,68,255,.16); color:#ff63ef; font:700 .85rem/1 ui-monospace,SFMono-Regular,Menlo,monospace; }
.cheat-console.hidden { display:none; }
.cheat-console input { min-width:0; flex:1; border:0; outline:0; color:#f8d8f6; background:transparent; font:inherit; text-transform:none; }
.cheat-list { display:grid; gap:7px; margin:18px 0 22px; }
.cheat-list div { display:grid; grid-template-columns:minmax(150px,.8fr) 1.2fr; gap:14px; align-items:center; padding:10px 12px; border:1px solid var(--line); background:#07141d; }
.cheat-list code { color:#ff63ef; font:800 .78rem/1.3 ui-monospace,SFMono-Regular,Menlo,monospace; }
.cheat-list span { color:var(--muted); font-size:.76rem; }
.difficulty-select { margin-top:16px; padding-top:14px; border-top:1px solid var(--line); }
.difficulty-select > span { display:block; margin-bottom:8px; color:var(--muted); font-size:.66rem; font-weight:900; letter-spacing:.12em; }
.difficulty-select > div { display:flex; gap:7px; }
.difficulty-btn { flex:1; min-height:38px; border:1px solid var(--line); border-radius:5px; color:var(--muted); background:#07141d; cursor:pointer; font-size:.76rem; font-weight:800; }
.difficulty-btn:hover, .difficulty-btn.active { color:#061019; border-color:var(--cyan); background:var(--cyan); }
.difficulty-btn.custom { flex:.8; border-style:dashed; }
.difficulty-select > small { display:block; margin-top:9px; color:var(--muted); font-size:.7rem; }
.guided-toggle { display:flex; align-items:center; justify-content:center; gap:8px; margin:11px 0 0; color:var(--muted); font-size:.7rem; cursor:pointer; }
.guided-toggle input { accent-color:var(--cyan); }
.settings-card, .stats-card, .menu-card, .hr-card, .privacy-card { width:min(760px,100%); max-height:min(88vh,900px); overflow:auto; padding:30px; border:1px solid #2e596b; background:linear-gradient(145deg,#102633,#08141d); box-shadow:0 40px 100px #000; }
.settings-card h2, .stats-card h2, .menu-card h2, .hr-card h2, .privacy-card h2 { margin:10px 0 18px; font-size:clamp(1.55rem,4vw,2.5rem); }

.analytics-consent { position:fixed; z-index:120; left:50%; bottom:16px; width:min(980px,calc(100% - 24px)); transform:translateX(-50%); display:grid; grid-template-columns:minmax(240px,1fr) auto auto auto; gap:9px; align-items:center; padding:13px 14px; border:1px solid #387489; border-radius:12px; color:#eafaff; background:rgba(7,24,34,.97); box-shadow:0 18px 60px #000b; backdrop-filter:blur(12px); }
.analytics-consent.hidden { display:none; }
.analytics-consent div { display:flex; flex-direction:column; gap:3px; }
.analytics-consent strong { color:#fff; font-size:.9rem; }
.analytics-consent span { color:#a8c2ce; font-size:.75rem; }
.analytics-consent button { min-height:36px; padding:7px 11px; border:1px solid #31586a; border-radius:7px; color:#dff7ff; background:#0b2130; font:inherit; font-size:.74rem; font-weight:800; cursor:pointer; }
.analytics-consent .primary-button { color:#04151d; background:#43dff7; border-color:#43dff7; }
.privacy-lead { margin:-7px 0 18px; color:#b8d3de; line-height:1.55; }
.privacy-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
.privacy-grid section { padding:13px 14px; border:1px solid #25495a; border-radius:9px; background:#071722; }
.privacy-grid h3 { margin:0 0 6px; color:#5be5fa; font-size:.78rem; text-transform:uppercase; letter-spacing:.08em; }
.privacy-grid p,.privacy-external { margin:0; color:#bad1db; font-size:.79rem; line-height:1.55; }
.privacy-grid p + p { margin-top:7px; }
.privacy-external { margin:13px 0 0; }
.privacy-external a { color:#60e6fa; }
.privacy-status { margin:13px 0 0; padding:9px 11px; border-left:3px solid #6beab0; color:#dffbef; background:#0a2a28; font-size:.78rem; }
.privacy-actions { flex-wrap:wrap; }
.privacy-actions .danger-button { color:#ffdce2; border-color:#8f3444; background:#3b1520; }
.settings-grid { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.settings-grid label { display:grid; gap:6px; color:var(--muted); font-size:.74rem; font-weight:700; }
.settings-grid input { min-height:42px; padding:7px 10px; border:1px solid var(--line); color:var(--ink); background:#07141d; }
.dialog-actions { display:flex; gap:9px; margin-top:20px; }
.dialog-actions > button, .menu-actions > button { min-height:46px; flex:1; padding:0 14px; border:1px solid var(--line); color:var(--ink); background:#0d202b; cursor:pointer; font-weight:750; }
.dialog-actions > .primary-button { border:0; color:#041015; background:var(--cyan); }
.dialog-actions.stacked, .menu-actions { display:grid; gap:9px; }
.menu-actions .primary-button { color:#041015; background:var(--cyan); }
.stats-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:8px; margin-bottom:18px; }
.stats-grid > div { min-height:76px; padding:12px; border:1px solid var(--line); background:#07141d; }
.stats-grid span { display:block; color:var(--muted); font-size:.65rem; font-weight:800; }
.stats-grid strong { display:block; margin-top:6px; font-size:1.15rem; }
.score-history-section { margin:4px 0 18px; }
.score-history-section h3, .week-score-story h3 { margin:0 0 9px; color:var(--muted); font-size:.68rem; letter-spacing:.1em; text-transform:uppercase; }
.score-history-list { display:grid; gap:6px; max-height:220px; overflow:auto; }
.score-history-item { display:flex; align-items:center; justify-content:space-between; gap:14px; padding:9px 11px; border:1px solid var(--line); background:#07141d; }
.score-history-item > div { min-width:0; }
.score-history-item strong { display:block; overflow:hidden; color:var(--ink); font-size:.74rem; text-overflow:ellipsis; white-space:nowrap; }
.score-history-item small { display:block; margin-top:3px; color:var(--muted); font-size:.63rem; }
.score-history-item p, .week-driver p { display:flex; flex-wrap:wrap; justify-content:flex-end; gap:5px; }
.score-history-item p span, .week-driver p span { padding:3px 6px; border-radius:4px; font-size:.65rem; font-weight:850; white-space:nowrap; }
.score-history-item .gain, .week-driver .gain { color:var(--green); background:rgba(107,227,162,.1); }
.score-history-item .loss, .week-driver .loss { color:var(--red); background:rgba(255,102,120,.1); }
.score-history-empty { padding:12px; border:1px dashed var(--line); color:var(--muted); font-size:.74rem; }
.week-score-story { clear:both; display:grid; grid-template-columns:1fr 1fr; gap:8px; margin:-6px 0 18px; }
.week-score-story h3 { grid-column:1/-1; }
.week-driver { padding:11px; border:1px solid var(--line); background:#07141d; }
.week-driver > span { display:block; color:var(--muted); font-size:.61rem; font-weight:850; letter-spacing:.08em; }
.week-driver > strong { display:block; margin:4px 0 9px; font-size:.82rem; }
.week-driver-identity { display:grid; gap:3px; padding:8px 9px; border-left:2px solid var(--line); background:rgba(255,255,255,.025); }
.week-driver-identity b { color:var(--ink); font-size:.74rem; }
.week-driver-identity small, .week-driver-customer { color:var(--muted); font-size:.64rem; line-height:1.4; }
.week-driver-detail { display:grid; gap:6px; margin:9px 0; }
.week-driver-detail > div { display:grid; grid-template-columns:58px 1fr; gap:8px; align-items:start; }
.week-driver-detail dt { color:var(--muted); font-size:.6rem; font-weight:900; letter-spacing:.06em; text-transform:uppercase; }
.week-driver-detail dd { margin:0; color:#d9e6eb; font-size:.69rem; line-height:1.4; }
.week-driver.positive { border-left:3px solid var(--green); }
.week-driver.negative { border-left:3px solid var(--red); }
.hr-card > p { color:var(--muted); line-height:1.5; }
.pause-screen { position:fixed; z-index:65; inset:0; display:grid; place-items:center; padding:20px; background:rgba(2,7,11,.4); }
.pause-screen.hidden { display:none; }
.pause-screen > section { width:min(440px,100%); max-height:calc(100dvh - 24px); overflow:auto; padding:34px; border:1px solid #2e596b; background:linear-gradient(145deg,#102633,#08141d); box-shadow:0 30px 90px #000; text-align:center; }
.pause-screen h2 { margin:8px 0 10px; font-size:2rem; }
.pause-screen p { min-height:48px; margin-bottom:18px; color:var(--muted); line-height:1.5; }
body.manually-paused .app-shell { filter:blur(6px) brightness(.62); }
.coffee-mug { position:relative; width:92px; height:78px; margin:0 auto 12px; }
.coffee-mug span { display:block; font-size:4rem; animation:mug-bob 1.8s ease-in-out infinite; }
.coffee-mug i { position:absolute; z-index:2; top:-5px; left:38px; width:3px; height:25px; border-radius:50%; background:rgba(255,255,255,.65); animation:steam 1.5s ease-in-out infinite; }
.coffee-mug i:nth-child(2) { left:52px; animation-delay:.35s; }
.coffee-mug i:nth-child(3) { left:65px; animation-delay:.7s; }
@keyframes mug-bob { 50% { transform:translateY(4px) rotate(-2deg); } }
@keyframes steam { 0% { opacity:0; transform:translateY(12px) scaleX(1); } 50% { opacity:.8; } 100% { opacity:0; transform:translateY(-12px) scaleX(2); } }

/* Counterpart Administration 2000 */
.reality-dialog { position:fixed; z-index:35; inset:0; display:grid; place-items:center; padding:24px; background:rgba(0,0,0,.18); }
.reality-dialog.hidden, .reality-wait.hidden { display:none; }
.win-window { width:min(780px,96vw); max-height:90vh; overflow:auto; border:2px outset #fff; color:#000; background:#c0c0c0; box-shadow:4px 4px 0 rgba(0,0,0,.38); font-family:Tahoma,"MS Sans Serif",sans-serif; }
.win-titlebar { position:sticky; top:0; z-index:4; display:flex; justify-content:space-between; align-items:center; min-height:28px; padding:3px 4px 3px 7px; color:#fff; background:#000080; font-weight:700; font-size:.8rem; }
.win-titlebar button { width:24px; height:22px; padding:0; border:2px outset #fff; color:#000; background:#c0c0c0; font-weight:900; line-height:16px; cursor:pointer; }
.win-content { padding:5px; }
.win-logo-row { padding:8px 8px 0; text-align:center; }
.win-logo-row .popup-logo { margin-bottom:2px; }
.win-statusbar { margin:3px; padding:4px 7px; border:2px inset #fff; font-size:.7rem; }
.reality-wait { position:fixed; z-index:70; left:50%; top:50%; min-width:220px; display:flex; align-items:center; gap:12px; transform:translate(-50%,-50%); padding:18px; border:2px outset #fff; color:#000; background:#c0c0c0; box-shadow:5px 5px 0 rgba(0,0,0,.45); font:700 .8rem Tahoma,"MS Sans Serif",sans-serif; cursor:wait; }
.hourglass { font-size:1.8rem; animation:hourglass-flip .7s steps(2,end) infinite; }
@keyframes hourglass-flip { 50% { transform:rotate(180deg); } }

/* Arcade daylight shift */
body.mode-arcade.arcade-day {
  --ink:#142632; --muted:#597180; --bg:#eaf5fa; --panel:#ffffff; --panel-2:#edf7fb;
  --line:#bfd4df; --cyan:#087e9c; --cyan-soft:rgba(8,126,156,.1); --green:#168451;
  --amber:#a76600; --red:#c7354b; --purple:#694bc2; --magenta:#b3259f; --shadow:0 18px 45px rgba(31,74,95,.14);
  background:radial-gradient(circle at 18% -10%,rgba(42,166,201,.18),transparent 34rem),linear-gradient(180deg,#f7fcfe 0%,#e7f2f7 100%);
}
.mode-arcade.arcade-day::before { opacity:.012; }
.mode-arcade.arcade-day .topbar { background:rgba(247,252,254,.9); }
.mode-arcade.arcade-day h1 { color:#102a38; text-shadow:none; }
.mode-arcade.arcade-day .metric-strip, .mode-arcade.arcade-day .panel { background:rgba(255,255,255,.88); }
.mode-arcade.arcade-day .filters, .mode-arcade.arcade-day thead, .mode-arcade.arcade-day .meta-box,
.mode-arcade.arcade-day .case-history, .mode-arcade.arcade-day .shortcut-grid div,
.mode-arcade.arcade-day .legend-grid > div, .mode-arcade.arcade-day .stats-grid > div,
.mode-arcade.arcade-day .end-stats div, .mode-arcade.arcade-day .changelog-list section,
.mode-arcade.arcade-day .score-history-item, .mode-arcade.arcade-day .week-driver { background:#f2f9fc; }
.mode-arcade.arcade-day .filter.active { background:#d8eaf1; }
.mode-arcade.arcade-day .filter span { color:#365d70; background:#dcecf3; }
.mode-arcade.arcade-day td { border-color:rgba(130,166,184,.38); }
.mode-arcade.arcade-day tbody tr:hover { background:rgba(8,126,156,.05); }
.mode-arcade.arcade-day .issue-box p { color:#563700; }
.mode-arcade.arcade-day .action-group { background:rgba(225,240,246,.48); }
.mode-arcade.arcade-day .action-cluster { background:rgba(255,255,255,.72); }
.mode-arcade.arcade-day .action-btn { color:#17303e; background:#f6fbfd; }
.mode-arcade.arcade-day .action-btn.customer-action { color:#08687f; background:#e6f6fa; }
.mode-arcade.arcade-day .action-btn.internal-action { color:#5637aa; background:#f0ebff; }
.mode-arcade.arcade-day .action-btn.process-action, .mode-arcade.arcade-day .action-btn.financial-action { color:#7a4b00; background:#fff5df; }
.mode-arcade.arcade-day .case-history-item p, .mode-arcade.arcade-day .feed-item p { color:#375566; }
.mode-arcade.arcade-day kbd { color:#102a38; border-color:#7fa4b5; background:#ffffff; box-shadow:0 1px 0 rgba(16,42,56,.15); }
.mode-arcade.arcade-day .action-btn > kbd { color:#244b5e; border-color:#8aabba; background:#e6f2f7; }
.mode-arcade.arcade-day .shortcut-grid span, .mode-arcade.arcade-day .legend-grid > div > span:last-child { color:#365d70; }
.mode-arcade.arcade-day .start-card, .mode-arcade.arcade-day .event-card, .mode-arcade.arcade-day .end-card,
.mode-arcade.arcade-day .shortcut-card, .mode-arcade.arcade-day .customer-card, .mode-arcade.arcade-day .settings-card,
.mode-arcade.arcade-day .stats-card, .mode-arcade.arcade-day .menu-card, .mode-arcade.arcade-day .hr-card, .mode-arcade.arcade-day .privacy-card,
.mode-arcade.arcade-day .achievement-detail-card, .mode-arcade.arcade-day .fod-card, .mode-arcade.arcade-day .validator-card,
.mode-arcade.arcade-day .changelog-card, .mode-arcade.arcade-day .credits-card, .mode-arcade.arcade-day .quit-card, .mode-arcade.arcade-day .cheats-card, .mode-arcade.arcade-day .share-card-modal, .mode-arcade.arcade-day .pause-screen > section {
  color:#142632; border-color:#adc7d4; background:linear-gradient(145deg,#ffffff,#eaf5fa); box-shadow:0 30px 90px rgba(31,74,95,.25);
}
.mode-arcade.arcade-day .modal-backdrop { background:rgba(211,230,239,.82); }
.mode-arcade.arcade-day .privacy-grid section { border-color:#c7dce6; background:#f4fafc; }
.mode-arcade.arcade-day .privacy-grid h3 { color:#087e9c; }
.mode-arcade.arcade-day .privacy-grid p,.mode-arcade.arcade-day .privacy-lead,.mode-arcade.arcade-day .privacy-external { color:#3d5b69; }
.mode-arcade.arcade-day .privacy-status { color:#1e5b43; background:#e6f7ef; }
.mode-arcade.arcade-day .menu-actions > button, .mode-arcade.arcade-day .dialog-actions > button { color:#17303e; background:#f2f9fc; }
.mode-arcade.arcade-day .feedback-button { color:#17303e; border-color:#bfd4df; background:#f2f9fc; }
.mode-arcade.arcade-day .menu-actions > .primary-button, .mode-arcade.arcade-day .dialog-actions > .primary-button { color:#fff; background:var(--cyan); }
.mode-arcade.arcade-day .settings-grid input { color:#17303e; background:#fff; }
.mode-arcade.arcade-day .achievement-detail-stats, .mode-arcade.arcade-day .validator-result { color:#17303e; background:#f2f9fc; }
.mode-arcade.arcade-day .entry-card { color:#142632; background:#f2f9fc; }
.mode-arcade.arcade-day .entry-card small { color:#597180; }
.mode-arcade.arcade-day .cheat-list div { border-color:#bfd4df; background:#f2f9fc; }
.mode-arcade.arcade-day .cheat-list span { color:#365d70; }
.mode-arcade.arcade-day .toast-message { border-color:#477a8f; color:#102a38; background:#f8fdff; box-shadow:0 14px 34px rgba(31,74,95,.24); }
.mode-arcade.arcade-day .toast-message.financial { border-color:#9a6000; color:#4e3000; background:#fff4d9; }
.mode-arcade.arcade-day .toast-message.critical, .mode-arcade.arcade-day .toast-message.incident { border-color:#a91e35; color:#68101e; background:#ffe8ec; }
.mode-arcade.arcade-day .toast-message.restored { border-color:#147446; color:#0c4d2d; background:#e5f8ed; }
.mode-arcade.arcade-day .toast-message.achievement { border-color:#8a6d00; color:#493900; background:#fff7cf; }

.music-card { width:min(760px,100%); }
.music-card > p { color:var(--muted); margin-bottom:18px; }
.music-choice { display:grid; grid-template-columns:1fr 1fr; gap:9px; margin:18px 0; }
.music-choice button { min-height:106px; display:flex; flex-direction:column; align-items:flex-start; gap:6px; padding:15px; border:1px solid var(--line); color:var(--ink); background:#07141d; cursor:pointer; text-align:left; }
.music-choice button:hover { border-color:var(--cyan); }
.music-choice button.active { border-color:var(--amber); background:linear-gradient(145deg,rgba(255,189,89,.16),rgba(85,214,232,.08)); box-shadow:inset 0 0 0 1px rgba(255,189,89,.2); }
.music-choice button > span { color:var(--cyan); font-size:.62rem; font-weight:950; letter-spacing:.14em; }
.music-choice button.active > span { color:var(--amber); }
.music-choice button strong { font-size:.95rem; }
.music-choice button small { color:var(--muted); font-size:.68rem; }
.volume-control { display:grid; grid-template-columns:auto 1fr 44px; align-items:center; gap:12px; margin:4px 0 20px; color:var(--muted); font-size:.65rem; font-weight:900; letter-spacing:.1em; }
.volume-control input { width:100%; accent-color:var(--cyan); }
.volume-control output { color:var(--ink); text-align:right; }
.effects-control { display:flex; align-items:center; justify-content:space-between; gap:18px; margin:18px 0 10px; padding:13px 14px; border:1px solid var(--line); background:#07141d; }
.effects-control > div { display:grid; gap:4px; }
.effects-control strong { font-size:.82rem; }
.effects-control small { color:var(--muted); font-size:.66rem; line-height:1.35; }
.effects-control button { flex:0 0 auto; min-width:112px; min-height:36px; padding:0 12px; border:1px solid var(--line); color:var(--muted); background:#0d202b; cursor:pointer; font-size:.7rem; font-weight:850; }
.effects-control button.active { border-color:var(--green); color:#07130d; background:var(--green); }
.career-card { width:min(820px,100%); }
.rank-progress { display:grid; grid-template-columns:.8fr 1.2fr; gap:10px; margin:18px 0; }
.rank-summary, .promotion-meter { padding:15px; border:1px solid var(--line); background:#07141d; }
.rank-summary > span, .promotion-meter > div span { color:var(--cyan); font-size:.61rem; font-weight:900; letter-spacing:.11em; }
.rank-summary > strong { display:block; margin:7px 0; font-size:1.15rem; }
.rank-summary p, .rank-summary small, .promotion-meter small { color:var(--muted); font-size:.7rem; line-height:1.45; }
.rank-summary small { display:block; margin-top:9px; color:var(--amber); font-weight:800; }
.promotion-meter > div { display:flex; justify-content:space-between; gap:12px; }
.promotion-meter > div strong { color:var(--amber); }
.promotion-meter > i { display:block; height:8px; margin:12px 0; overflow:hidden; border-radius:99px; background:#142935; }
.promotion-meter > i b { display:block; height:100%; background:linear-gradient(90deg,var(--cyan),var(--amber)); box-shadow:0 0 15px rgba(85,214,232,.35); }
.achievement-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:8px; margin:0 0 20px; }
.achievement { width:100%; min-height:118px; display:flex; gap:10px; padding:12px; border:1px solid var(--line); color:var(--ink); background:#07141d; text-align:left; cursor:pointer; }
.achievement:hover { border-color:var(--cyan); transform:translateY(-1px); }
.achievement > .achievement-badge { flex:0 0 54px; width:54px; height:54px; display:block; border:0; background-image:url("achievement-badges.webp"); background-size:400% 400%; background-position:var(--badge-x) var(--badge-y); background-repeat:no-repeat; filter:drop-shadow(0 5px 8px rgba(0,0,0,.35)); }
.achievement > .achievement-badge.badge-v2, .achievement-badge-large.badge-v2 { background-image:url("achievement-badges-v2.webp"); }
.achievement strong { display:block; font-size:.75rem; }
.achievement p { margin:4px 0; color:var(--muted); font-size:.64rem; line-height:1.35; }
.achievement small { color:#6e8a99; font-size:.6rem; font-weight:850; }
.achievement.locked { filter:saturate(.35); opacity:.55; }
.achievement.unlocked { border-color:rgba(255,189,89,.48); background:linear-gradient(145deg,rgba(255,189,89,.1),#07141d); }
.achievement.unlocked > .achievement-badge { filter:drop-shadow(0 0 10px rgba(255,189,89,.42)); }
.achievement.unlocked small { color:var(--green); }
.achievement > .achievement-badge.symbol-badge, .achievement-badge-large.symbol-badge { display:grid; place-items:center; border:1px solid rgba(255,189,89,.6); border-radius:50%; color:#061019; background:radial-gradient(circle at 34% 28%,#fff1a3 0 9%,#ffbd59 34%,#dd6b18 68%,#0f2632 70% 100%); font:950 .82rem/1 ui-monospace,SFMono-Regular,Menlo,monospace; text-shadow:0 1px rgba(255,255,255,.35); }
.achievement-badge-large.symbol-badge { font-size:2.15rem; }
.achievement-detail-card { width:min(680px,100%); text-align:center; }
.achievement-badge-large { width:176px; height:176px; display:block; margin:0 auto 12px; background-image:url("achievement-badges.webp"); background-size:400% 400%; background-position:var(--badge-x) var(--badge-y); background-repeat:no-repeat; filter:drop-shadow(0 12px 20px rgba(0,0,0,.4)); }

.menu-comment { margin:12px 0 0; padding:10px 12px; border-left:3px solid #31dff5; color:#a9c5d1; background:#071822; font-size:.76rem; line-height:1.45; }
.mode-reality .menu-comment { color:#000; border:1px inset #fff; background:#fff; }
.achievement-detail-card > p { color:var(--muted); line-height:1.55; }
.achievement-detail-stats { display:grid; gap:6px; margin:18px 0; padding:14px; border:1px solid var(--line); background:#07141d; text-align:left; }
.achievement-detail-stats strong { color:var(--green); }
.achievement-detail-stats span { color:var(--muted); font-size:.75rem; }
.achievement-detail-card blockquote { margin:14px 0 20px; padding:14px; border-left:3px solid var(--amber); color:#ffe3a9; background:rgba(255,189,89,.07); font-style:italic; }
.performance-strikes { margin:18px 0; padding:13px; border:1px solid var(--red); color:#ffd3d8; background:rgba(255,102,120,.1); font-size:.72rem; font-weight:900; letter-spacing:.08em; }
.validator-card > p { color:var(--muted); }
.validator-result { min-height:48px; display:grid; place-items:center; margin:14px 0; padding:10px; border:1px dashed var(--line); color:var(--muted); font-size:.75rem; font-weight:900; text-align:center; }
.validator-result.valid { border-style:solid; border-color:var(--green); color:var(--green); background:rgba(107,227,162,.08); }
.validator-result.invalid { border-style:solid; border-color:var(--red); color:var(--red); background:rgba(255,102,120,.08); }
.result-code { color:var(--amber); font-family:ui-monospace,SFMono-Regular,Menlo,monospace; letter-spacing:.08em; }
.result-proof-note { color:var(--muted); font-size:.76rem; }
.share-card-modal { width:min(760px,100%); }
.share-card { position:relative; overflow:hidden; min-height:330px; display:grid; grid-template-columns:1.2fr .8fr; gap:22px; align-items:end; margin:18px 0 12px; padding:26px; border:1px solid rgba(85,214,232,.55); color:#eefbff; background:radial-gradient(circle at 12% 12%,rgba(85,214,232,.2),transparent 38%),linear-gradient(145deg,#0d2a38,#071018 68%); box-shadow:inset 0 0 50px rgba(85,214,232,.06); }
.share-card::after { content:""; position:absolute; inset:0; pointer-events:none; background:linear-gradient(110deg,transparent 0 64%,rgba(255,189,89,.08) 64% 66%,transparent 66%); }
.share-result-main, .share-result-side { position:relative; z-index:1; }
.share-result-main > span { color:var(--cyan); font-size:.65rem; font-weight:950; letter-spacing:.15em; }
.share-result-main h3 { margin:9px 0 5px; font-size:2.2rem; line-height:1; letter-spacing:-.05em; }
.share-result-main p { color:#abc2ce; font-size:.78rem; line-height:1.5; }
.share-score { margin:24px 0 4px; color:var(--amber); font-size:3.2rem; font-weight:950; line-height:.9; }
.share-score-rank { color:#ffe1a6; font-size:.75rem; font-weight:900; letter-spacing:.1em; }
.share-result-side { display:grid; gap:7px; }
.share-result-side div { padding:9px 10px; border:1px solid rgba(255,255,255,.12); background:rgba(0,0,0,.18); }
.share-result-side span { display:block; color:#7895a4; font-size:.58rem; font-weight:900; letter-spacing:.1em; }
.share-result-side strong { display:block; margin-top:3px; font-size:.92rem; }
.share-signature { grid-column:1 / -1; position:relative; z-index:1; padding-top:14px; border-top:1px solid rgba(255,255,255,.12); color:#7895a4; font-size:.65rem; letter-spacing:.08em; }
.share-status { min-height:20px; color:var(--muted); font-size:.72rem; }
.share-actions { display:grid; grid-template-columns:repeat(4,1fr); }
.share-actions > button { min-width:0; }
.tutorial-coach { position:fixed; z-index:15; left:18px; bottom:18px; width:min(350px,calc(100vw - 36px)); padding:15px; border:1px solid rgba(85,214,232,.5); background:linear-gradient(145deg,rgba(14,43,55,.97),rgba(7,18,26,.98)); box-shadow:0 18px 54px rgba(0,0,0,.48),0 0 24px rgba(85,214,232,.1); }
.tutorial-coach.hidden { display:none; }
.tutorial-coach > span { display:block; color:var(--cyan); font-size:.58rem; font-weight:950; letter-spacing:.13em; }
.tutorial-coach > strong { display:block; margin:5px 0; font-size:.9rem; }
.tutorial-coach > p { color:#b6cbd5; font-size:.7rem; line-height:1.48; }
.tutorial-coach > div { display:flex; justify-content:space-between; gap:8px; margin-top:12px; }
.tutorial-coach button { padding:7px 9px; border:1px solid var(--line); color:var(--muted); background:#0b202b; cursor:pointer; font-size:.65rem; font-weight:800; }
.tutorial-coach #tutorial-next { color:#061019; border-color:var(--cyan); background:var(--cyan); }
.mode-arcade.arcade-day .music-card, .mode-arcade.arcade-day .career-card { color:#142632; border-color:#adc7d4; background:linear-gradient(145deg,#ffffff,#eaf5fa); box-shadow:0 30px 90px rgba(31,74,95,.25); }
.mode-arcade.arcade-day .music-choice button, .mode-arcade.arcade-day .effects-control, .mode-arcade.arcade-day .rank-summary, .mode-arcade.arcade-day .promotion-meter, .mode-arcade.arcade-day .achievement { color:#142632; border-color:#bfd4df; background:#f2f9fc; }
.mode-arcade.arcade-day .tutorial-coach { color:#142632; border-color:#84bacd; background:rgba(247,252,254,.97); }
.mode-arcade.arcade-day .tutorial-coach p { color:#375566; }

body.mode-reality { --ink:#000; --muted:#333; --bg:#3a6ea5; --panel:#c0c0c0; --line:#808080; --cyan:#000080; --green:#000; --amber:#000; --red:#000; --purple:#000; color:#000; background:#3a6ea5; font-family:Tahoma,"MS Sans Serif",sans-serif; font-size:16px; }
body.mode-reality::before { display:none; }
.mode-reality button:focus-visible { outline:1px dotted #000; outline-offset:-4px; }
.mode-reality .app-shell { margin:10px; width:calc(100% - 20px); height:calc(100vh - 20px); height:calc(100dvh - 20px); min-height:0; border:2px outset #fff; background:#c0c0c0; }
.mode-reality .topbar { min-height:48px; grid-template-columns:104px minmax(480px,1fr) auto; gap:6px; padding:3px 4px; border:0; border-bottom:2px groove #fff; background:#c0c0c0; backdrop-filter:none; }
.mode-reality .brand-block { align-self:stretch; padding:3px 6px; color:#fff; background:#000080; }
.mode-reality .brand-mark { width:30px; height:30px; border:0; clip-path:none; color:#000080; background:#fff; font-size:.7rem; }
.mode-reality .gameplay-logo { width:90px; }
.mode-reality .popup-logo { filter:none; }
.mode-reality h1 { color:#fff; font-family:Tahoma,"MS Sans Serif",sans-serif; font-size:.88rem; text-shadow:none; }
.mode-reality .brand-block p { color:#fff; font-size:.7rem; }
.mode-reality .week-clock { color:#000; }
.mode-reality .week-track::before { height:12px; border:2px inset #fff; border-radius:0; background:#fff; }
.mode-reality .week-progress { top:5px; height:12px; border:2px inset #fff; border-radius:0; background:#000080; box-shadow:none; }
.mode-reality .day-ticks, .mode-reality .eyebrow { color:#333; letter-spacing:0; }
.mode-reality .operator { color:#000; }
.mode-reality #operator-rank { color:#000; text-shadow:none; }
.mode-reality .online-dot { border-radius:0; background:#808080; box-shadow:none; }
.mode-reality .tournament-banner { border:2px inset #fff; color:#fff; background:#000080; font-family:Tahoma,"MS Sans Serif",sans-serif; }
.mode-reality .icon-button, .mode-reality .shortcut-button { border:2px outset #fff; border-radius:0; color:#000; background:#c0c0c0; }
.mode-reality main { max-width:none; padding:5px; }
.mode-reality .metric-strip, .mode-reality .filters, .mode-reality .detail-panel { display:none; }
.mode-reality .workspace { display:flex; flex-direction:column; gap:6px; }
.mode-reality .case-panel, .mode-reality .activity-panel { width:100%; border:2px outset #fff; color:#000; background:#c0c0c0; box-shadow:none; }
.mode-reality .case-panel .panel-head, .mode-reality .activity-panel .panel-head { min-height:34px; padding:5px 7px; border:0; color:#fff; background:#000080; }
.mode-reality .panel-head h2 { margin:0; color:#fff; font-size:.8rem; }
.mode-reality .panel-head .eyebrow { display:none; }
.mode-reality .feed-pulse { color:#fff; }
.mode-reality .table-wrap { min-height:390px; max-height:58vh; margin:5px; border:2px inset #fff; background:#fff; }
.mode-reality table { min-width:900px; color:#000; background:#fff; font-family:Tahoma,"MS Sans Serif",sans-serif; }
.mode-reality thead { background:#c0c0c0; }
.mode-reality th { padding:7px 9px; border:2px outset #fff; color:#000; font-size:.68rem; letter-spacing:0; text-transform:none; }
.mode-reality .sort-button { color:#000; cursor:default; }
.mode-reality .sort-button:hover, .mode-reality .sort-button.active { color:#000; }
.mode-reality .sort-arrow { display:none; }
.mode-reality td { padding:8px 9px; border:1px solid #d4d0c8; color:#000; }
.mode-reality tbody tr { transition:none; }
.mode-reality tbody tr:hover { background:#e8e8e8; }
.mode-reality tbody tr.selected { color:#fff; background:#000080; box-shadow:none; }
.mode-reality tbody tr.selected * { color:#fff !important; }
.mode-reality .case-id, .mode-reality .asset, .mode-reality .customer, .mode-reality .location, .mode-reality .amount, .mode-reality .delta-indicator { color:#000; }
.mode-reality .delta-indicator::before, .mode-reality .location::before, .mode-reality .score-indicator::before, .mode-reality .pill::before { display:none; }
.mode-reality .pill { border:1px solid #808080; border-radius:0; padding:2px 5px; color:#000 !important; background:#c0c0c0 !important; }
.mode-reality .next-indicator { width:20px; height:20px; border:1px solid #808080; border-radius:0; color:#000; background:#c0c0c0; box-shadow:none; }
.mode-reality .next-indicator.running::after { content:"..."; }
.mode-reality .right-rail { display:block; width:100%; }
.mode-reality .activity-feed { height:155px; margin:5px; padding:3px 7px; border:2px inset #fff; color:#000; background:#fff; }
.mode-reality .feed-item { grid-template-columns:105px 1fr; padding:5px 0; border-bottom:1px solid #ddd; }
.mode-reality .feed-item time, .mode-reality .feed-item p, .mode-reality .feed-item strong { color:#000; font-size:.7rem; }
.mode-reality .win-content .detail-head, .mode-reality .win-content .detail-meta, .mode-reality .win-content .action-group { border-color:#808080; }
.mode-reality .win-content .detail-head { padding:8px; }
.mode-reality .win-content .detail-meta { padding:5px; gap:5px; }
.mode-reality .win-content .meta-box, .mode-reality .win-content .case-secondary, .mode-reality .win-content .case-history, .mode-reality .win-content .action-cluster { border:2px inset #fff; color:#000; background:#fff; opacity:1; }
.mode-reality .win-content .meta-box span, .mode-reality .win-content .meta-box strong, .mode-reality .win-content .case-history *, .mode-reality .win-content .action-title-row span { color:#000; }
.mode-reality .win-content .case-secondary summary { color:#000; }
.mode-reality .win-content .issue-box { margin:5px; border:2px inset #fff; color:#000; background:#fff; box-shadow:none; }
.mode-reality .win-content .issue-box span, .mode-reality .win-content .issue-box p { color:#000; }
.mode-reality .win-content .action-group { margin:0; padding:5px; background:#c0c0c0; }
.mode-reality .win-content .action-cluster { padding:6px; border:2px groove #fff; }
.mode-reality .win-content .action-btn { min-height:42px; border:2px outset #fff; border-radius:0; color:#000 !important; background:#c0c0c0 !important; transform:none; }
.mode-reality .win-content .action-btn:active { border-style:inset; }
.mode-reality .win-content kbd { border:1px solid #808080; border-radius:0; color:#000; background:#fff; box-shadow:none; }
.mode-reality .incident-bar { min-height:34px; padding:3px 8px; border:2px inset #fff; color:#000; background:#c0c0c0; font-family:Tahoma,"MS Sans Serif",sans-serif; letter-spacing:0; }
.mode-reality .incident-chip { border:1px solid #000; border-radius:0; color:#fff; background:#800000; }
.mode-reality .incident-chip small { color:#fff; }
.mode-reality .toast-message { border:2px outset #fff; border-radius:0; color:#000; background:#c0c0c0; box-shadow:4px 4px 0 rgba(0,0,0,.35); font-family:Tahoma,"MS Sans Serif",sans-serif; }
.mode-reality .toast-message.incident, .mode-reality .toast-message.critical { color:#fff; background:#800000; }
.mode-reality .toast-message.restored { color:#000; background:#9fd69f; }
.mode-reality .modal-backdrop { padding:12px; background:rgba(0,0,0,.18); backdrop-filter:none; }
.mode-reality .start-card, .mode-reality .event-card, .mode-reality .end-card, .mode-reality .shortcut-card, .mode-reality .customer-card, .mode-reality .settings-card, .mode-reality .stats-card, .mode-reality .menu-card, .mode-reality .music-card, .mode-reality .career-card, .mode-reality .achievement-detail-card, .mode-reality .hr-card, .mode-reality .fod-card, .mode-reality .validator-card, .mode-reality .changelog-card, .mode-reality .credits-card, .mode-reality .quit-card, .mode-reality .cheats-card, .mode-reality .share-card-modal, .mode-reality .bug-details-card, .mode-reality .privacy-card, .mode-reality .pause-screen > section { padding:8px; border:2px outset #fff; color:#000; background:#c0c0c0; box-shadow:5px 5px 0 rgba(0,0,0,.38); font-family:Tahoma,"MS Sans Serif",sans-serif; }
.mode-reality .event-card::before, .mode-reality .end-card::before, .mode-reality .shortcut-card::before, .mode-reality .customer-card::before, .mode-reality .settings-card::before, .mode-reality .stats-card::before, .mode-reality .menu-card::before, .mode-reality .music-card::before, .mode-reality .career-card::before, .mode-reality .achievement-detail-card::before, .mode-reality .hr-card::before, .mode-reality .fod-card::before, .mode-reality .validator-card::before, .mode-reality .changelog-card::before, .mode-reality .credits-card::before, .mode-reality .quit-card::before, .mode-reality .cheats-card::before, .mode-reality .share-card-modal::before, .mode-reality .bug-details-card::before, .mode-reality .privacy-card::before, .mode-reality .pause-screen > section::before { content:"Counterpart Administration 2000"; display:block; margin:-4px -4px 8px; padding:5px 7px; color:#fff; background:#000080; font-size:.75rem; font-weight:700; text-align:left; }

.mode-reality .privacy-grid section { border:1px inset #fff; border-radius:0; background:#fff; }
.mode-reality .privacy-grid h3,.mode-reality .privacy-grid p,.mode-reality .privacy-lead,.mode-reality .privacy-external { color:#000; }
.mode-reality .privacy-status { color:#000; background:#fff; border:1px inset #fff; }
.mode-reality .analytics-consent { color:#000; border:2px outset #fff; border-radius:0; background:#c0c0c0; font-family:Tahoma,"MS Sans Serif",sans-serif; }
.mode-reality .analytics-consent strong,.mode-reality .analytics-consent span { color:#000; }
.mode-reality .analytics-consent button { color:#000; border:2px outset #fff; border-radius:0; background:#c0c0c0; }

@media (max-width:760px) {
  .analytics-consent { grid-template-columns:1fr 1fr; }
  .analytics-consent div { grid-column:1/-1; }
  .privacy-grid { grid-template-columns:1fr; }
}
.mode-reality .bug-details-card textarea { border:2px inset #fff; color:#000; background:#fff; font-family:Fixedsys,"Courier New",monospace; }
.mode-reality .feedback-button { border:2px outset #fff; color:#000; background:#c0c0c0; }
.mode-reality .share-card { min-height:260px; border:2px inset #fff; color:#000; background:#fff; box-shadow:none; }
.mode-reality .share-result-main p, .mode-reality .share-result-main > span, .mode-reality .share-score, .mode-reality .share-score-rank, .mode-reality .share-signature, .mode-reality .share-result-side span { color:#000; }
.mode-reality .share-result-side div { border:1px solid #808080; background:#fff; }
.mode-reality .credits-copy p, .mode-reality .credits-joke, .mode-reality .rok-credit { color:#000 !important; }
.mode-reality .credits-disclaimer { border:2px inset #fff; color:#000; background:#fff; }
.mode-reality .credits-disclaimer strong, .mode-reality .credits-disclaimer p { color:#000; }
.mode-reality .modal-backdrop h2, .mode-reality .pause-screen h2 { color:#000; font:700 1.1rem Tahoma,"MS Sans Serif",sans-serif; letter-spacing:0; }
.mode-reality .modal-backdrop p, .mode-reality .pause-screen p, .mode-reality .customer-card > p { color:#000; }
.mode-reality .modal-backdrop .start-kicker, .mode-reality .pause-screen .start-kicker { color:#000; letter-spacing:0; }
.mode-reality .primary-button, .mode-reality .dialog-actions > button, .mode-reality .menu-actions > button { min-height:38px; border:2px outset #fff; color:#000; background:#c0c0c0; }
.mode-reality .tournament-start, .mode-reality .player-name-field input, .mode-reality .tournament-settings select { border:2px outset #fff; border-radius:0; color:#000; background:#c0c0c0; }
.mode-reality .tournament-start strong, .mode-reality .tournament-start small, .mode-reality .tournament-start b, .mode-reality .player-name-field { color:#000; }
.mode-reality .event-visual { border:2px inset #fff; filter:saturate(.35) contrast(.9); }
.mode-reality .primary-button:active, .mode-reality .dialog-actions > button:active, .mode-reality .menu-actions > button:active { border-style:inset; }
.mode-reality .stats-grid > div, .mode-reality .settings-grid input, .mode-reality .settings-grid select, .mode-reality .shortcut-grid div, .mode-reality .legend-grid > div, .mode-reality .end-stats div { border:2px inset #fff; color:#000; background:#fff; }
.mode-reality .continue-career, .mode-reality .score-history-item, .mode-reality .week-driver { border:2px inset #fff; color:#000; background:#fff; }
.mode-reality .continue-career strong, .mode-reality .continue-career small, .mode-reality .continue-career b, .mode-reality .score-history-item strong, .mode-reality .score-history-item small, .mode-reality .week-driver strong, .mode-reality .week-driver span, .mode-reality .week-driver-identity b, .mode-reality .week-driver-detail dt, .mode-reality .week-driver-detail dd { color:#000; }
.mode-reality .week-driver-identity { border:2px inset #fff; background:#fff; }
.mode-reality .stats-grid span, .mode-reality .stats-grid strong, .mode-reality .settings-grid label, .mode-reality .settings-grid input, .mode-reality .shortcut-grid span { color:#000; }
.mode-reality .cheat-list div { border:2px inset #fff; background:#fff; }
.mode-reality .cheat-list code, .mode-reality .cheat-list span { color:#000; }
.mode-reality .time-cost { border:2px inset #fff; color:#000; background:#fff; }
.mode-reality .version-button { border:2px outset #fff; color:#000; background:#c0c0c0; letter-spacing:0; }
.mode-reality .changelog-list section { border:2px inset #fff; color:#000; background:#fff; }
.mode-reality .changelog-list strong, .mode-reality .changelog-list p, .mode-reality .quit-card p { color:#000; }
.mode-reality .quit-stamp { border-color:#000080; color:#000080; }
.mode-reality .cheat-console { border:2px outset #fff; color:#000; background:#c0c0c0; box-shadow:4px 4px 0 rgba(0,0,0,.4); font-family:Consolas,"Courier New",monospace; }
.mode-reality .cheat-console input { color:#000; }
.mode-reality .grade { border:2px solid #000080; color:#000080; }
.mode-reality .pause-screen { background:rgba(0,0,0,.12); }
.mode-reality .coffee-mug i { background:#606060; }
.mode-reality .tutorial-coach { display:none !important; }
.mode-reality .music-choice button, .mode-reality .effects-control, .mode-reality .effects-control button { border:2px outset #fff; border-radius:0; color:#000; background:#c0c0c0; box-shadow:none; }
.mode-reality .music-choice button.active, .mode-reality .effects-control button.active { color:#fff; background:#000080; }
.mode-reality .rank-progress, .mode-reality .achievement-grid { display:block; }
.mode-reality .rank-summary, .mode-reality .promotion-meter, .mode-reality .achievement { margin:5px 0; border:2px inset #fff; color:#000; background:#fff; }
.mode-reality .achievement { min-height:0; }
.mode-reality .achievement.locked { opacity:1; filter:none; }
.mode-reality .achievement > .achievement-badge { border:1px solid #808080; filter:none; }
.mode-reality .promotion-meter > i { border:2px inset #fff; border-radius:0; background:#fff; }
.mode-reality .promotion-meter > i b { background:#000080; box-shadow:none; }
.mode-reality .achievement-detail-stats, .mode-reality .validator-result, .mode-reality .performance-strikes { border:2px inset #fff; color:#000; background:#fff; }
.mode-reality .achievement-detail-card blockquote { border:2px inset #fff; color:#000; background:#fff; }
.mode-reality .entry-card { min-height:190px; border:2px outset #fff; color:#000; background:#c0c0c0; }
.mode-reality .entry-card strong, .mode-reality .entry-card small { color:#000; }

/* Windows 2000 high-contrast night theme */
body.mode-reality.reality-high-contrast { --ink:#fff; --muted:#fff; --bg:#000; --panel:#000; --line:#fff; --cyan:#00ffff; --green:#00ff00; --amber:#ffff00; --red:#ff5b5b; color:#fff; background:#000; }
.mode-reality.reality-high-contrast .app-shell, .mode-reality.reality-high-contrast .topbar, .mode-reality.reality-high-contrast .case-panel, .mode-reality.reality-high-contrast .activity-panel { color:#fff; background:#000; border-color:#fff; }
.mode-reality.reality-high-contrast .brand-block, .mode-reality.reality-high-contrast .case-panel .panel-head, .mode-reality.reality-high-contrast .activity-panel .panel-head, .mode-reality.reality-high-contrast .win-titlebar, .mode-reality.reality-high-contrast .tournament-banner { color:#fff; background:#000080; }
.mode-reality.reality-high-contrast table, .mode-reality.reality-high-contrast .table-wrap, .mode-reality.reality-high-contrast .activity-feed, .mode-reality.reality-high-contrast .win-window, .mode-reality.reality-high-contrast .win-content, .mode-reality.reality-high-contrast .win-statusbar { color:#fff; background:#000; }
.mode-reality.reality-high-contrast th, .mode-reality.reality-high-contrast td, .mode-reality.reality-high-contrast .case-id, .mode-reality.reality-high-contrast .asset, .mode-reality.reality-high-contrast .customer, .mode-reality.reality-high-contrast .location, .mode-reality.reality-high-contrast .amount, .mode-reality.reality-high-contrast .delta-indicator, .mode-reality.reality-high-contrast .feed-item time, .mode-reality.reality-high-contrast .feed-item p, .mode-reality.reality-high-contrast .feed-item strong { color:#fff; background:#000; border-color:#fff; }
.mode-reality.reality-high-contrast .shortcut-button, .mode-reality.reality-high-contrast .icon-button, .mode-reality.reality-high-contrast .win-titlebar button { color:#fff; background:#000; border-color:#fff; }
.mode-reality.reality-high-contrast .modal-backdrop { background:rgba(0,0,0,.82); }
.mode-reality.reality-high-contrast .modal-backdrop > section, .mode-reality.reality-high-contrast .pause-screen > section, .mode-reality.reality-high-contrast .reality-wait { color:#fff; background:#000; border-color:#fff; box-shadow:5px 5px 0 #fff; }
.mode-reality.reality-high-contrast .modal-backdrop h2, .mode-reality.reality-high-contrast .modal-backdrop p, .mode-reality.reality-high-contrast .modal-backdrop .start-kicker, .mode-reality.reality-high-contrast .settings-grid label, .mode-reality.reality-high-contrast .settings-grid input, .mode-reality.reality-high-contrast .settings-grid select { color:#fff; background:#000; }
.mode-reality.reality-high-contrast .primary-button, .mode-reality.reality-high-contrast .dialog-actions > button, .mode-reality.reality-high-contrast .menu-actions > button, .mode-reality.reality-high-contrast .mode-card, .mode-reality.reality-high-contrast .entry-card { color:#fff; background:#000; border-color:#fff; }
.mode-reality.reality-high-contrast .toast-message { color:#fff; background:#000; border-color:#fff; box-shadow:4px 4px 0 #fff; }
.mode-reality.reality-high-contrast .toast-message.incident, .mode-reality.reality-high-contrast .toast-message.critical { color:#fff; background:#800000; }
.mode-reality.reality-high-contrast .toast-message.restored { color:#000; background:#00ff00; }
.mode-reality.reality-high-contrast .share-card, .mode-reality.reality-high-contrast .share-result-side div { color:#fff; border-color:#fff; background:#000; }
.mode-reality.reality-high-contrast .bug-details-card textarea { color:#fff; border-color:#fff; background:#000; }
.mode-reality.reality-high-contrast .share-result-main p, .mode-reality.reality-high-contrast .share-result-main > span, .mode-reality.reality-high-contrast .share-score, .mode-reality.reality-high-contrast .share-score-rank, .mode-reality.reality-high-contrast .share-signature, .mode-reality.reality-high-contrast .share-result-side span { color:#fff; }

@media (max-width:720px) {
  .mode-choice { grid-template-columns:1fr; }
  .entry-choice, .start-resumes { grid-template-columns:1fr; }
  .entry-card { min-height:176px; }
  .entry-card img { width:118px; height:118px; }
  .settings-grid, .stats-grid { grid-template-columns:1fr 1fr; }
  .week-score-story { grid-template-columns:1fr; }
  .music-choice, .rank-progress, .achievement-grid { grid-template-columns:1fr; }
  .share-card { grid-template-columns:1fr; }
  .share-actions { grid-template-columns:1fr 1fr; }
  .bug-details-actions { grid-template-columns:1fr; }
  .bug-details-card textarea { min-height:220px; }
  .mode-reality .app-shell { margin:0; }
  .mode-reality .topbar { display:block; }
  .mode-reality .week-clock { margin-top:5px; }
}

/* Responsive cockpit: queue first, detail as a focused sheet. */
@media (max-width:1100px) {
  body.mode-arcade .workspace { grid-template-columns:1fr; }
  body.mode-arcade .right-rail { display:none; }
  body.mode-arcade.case-detail-open .right-rail {
    position:fixed;
    z-index:18;
    inset:8px;
    display:grid;
    grid-template-rows:minmax(0,1fr) auto;
    padding:0;
    background:var(--bg);
    box-shadow:0 0 0 999px rgba(2,7,11,.78);
  }
  body.mode-arcade.case-detail-open .detail-back { display:block; position:absolute; right:12px; bottom:10px; }
  body.mode-arcade.case-detail-open .detail-panel { border-color:var(--cyan); }
  .metric-strip { display:flex; }
  .metric { flex:1 0 125px; border-bottom:0 !important; }
}

@media (max-width:720px) {
  .topbar { display:grid; grid-template-columns:96px minmax(0,1fr); gap:6px; padding:5px 8px; }
  .brand-block { align-self:start; }
  .gameplay-logo { width:92px; }
  .week-clock { grid-template-columns:auto 30px minmax(72px,1fr) auto; gap:5px; margin-top:0; }
  .week-clock .eyebrow, .day-ticks { display:none; }
  .week-clock strong { font-size:.72rem; }
  .week-track { width:auto; }
  .clock-actions { max-width:70px; overflow:hidden; }
  .clock-actions .shortcut-button:not(#quick-mute):not(#wait-btn):not(#menu-btn) { display:none; }
  main { padding:6px; }
  .metric-strip { margin-bottom:5px; }
  .metric { min-height:40px; flex-basis:108px; padding:6px 8px; }
  .metric strong { font-size:.9rem; }
  .panel-head { min-height:48px; padding:7px 8px; }
  .panel-head .eyebrow { display:none; }
  .case-controls { flex-direction:row; align-items:center; }
  .filters { padding:2px; }
  .filter { padding:6px 7px; }
  table { min-width:0; }
  thead { display:none; }
  tbody { display:grid; gap:5px; padding:5px; }
  tbody tr { display:grid; grid-template-columns:minmax(0,1fr) auto auto; gap:5px 8px; padding:9px; border:1px solid var(--line); }
  tbody td { display:block !important; padding:0; border:0; }
  tbody td:nth-child(1) { grid-column:1; grid-row:1; }
  tbody td:nth-child(2) { grid-column:1; grid-row:2; }
  tbody td:nth-child(3) { grid-column:2; grid-row:1; }
  tbody td:nth-child(4) { grid-column:1 / 3; grid-row:3; }
  tbody td:nth-child(5) { grid-column:3; grid-row:1; }
  tbody td:nth-child(6) { grid-column:2 / 4; grid-row:2; text-align:right; }
  tbody td:nth-child(7) { display:none !important; }
  .location { white-space:normal; }
  .actions { grid-template-columns:1fr; }
  .detail-meta { grid-template-columns:1fr; }
  .modal-backdrop { padding:8px; }
  .modal-backdrop > section { max-height:calc(100dvh - 16px); }
}

@media (prefers-reduced-motion:reduce) {
  *, *::before, *::after { scroll-behavior:auto !important; animation-duration:.01ms !important; animation-iteration-count:1 !important; transition-duration:.01ms !important; }
}

@supports (padding:env(safe-area-inset-bottom)) {
  .toast-stack { right:max(16px,env(safe-area-inset-right)); bottom:max(16px,env(safe-area-inset-bottom)); }
  @media (max-width:720px) { main { padding-bottom:max(6px,env(safe-area-inset-bottom)); } }
}
