:root {
  --ink: #e9f0ed;
  --ink-dim: #91a29d;
  --ink-faint: #788a84;
  --void: #0b1114;
  --shell: #10181c;
  --panel: #162126;
  --panel-2: #1b292e;
  --panel-3: #233239;
  --line: #304249;
  --line-hot: #45616a;
  --teal: #35d0a5;
  --teal-deep: #1a8d74;
  --orange: #f6a94d;
  --red: #ed6b5c;
  --blue: #63a8c7;
  --yellow: #f5d264;
  --shadow: 0 22px 60px rgb(0 0 0 / 34%);
  --radius: 4px;
  color-scheme: dark;
  font-family: "Segoe UI", Tahoma, sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(rgb(53 208 165 / 2%) 1px, transparent 1px),
    linear-gradient(90deg, rgb(53 208 165 / 2%) 1px, transparent 1px),
    radial-gradient(circle at 50% -10%, #1e3034 0, var(--void) 52%);
  background-size: 32px 32px, 32px 32px, auto;
}

button, input { font: inherit; }
button { color: inherit; }
button:not(:disabled) { cursor: pointer; }
button:focus-visible, a:focus-visible, input:focus-visible {
  outline: 3px solid var(--yellow);
  outline-offset: 3px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 10px;
  left: 10px;
  padding: 10px 14px;
  color: #07110d;
  background: var(--yellow);
  transform: translateY(-150%);
}
.skip-link:focus { transform: translateY(0); }

.topbar {
  position: sticky;
  z-index: 20;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
  padding: 12px clamp(18px, 3vw, 52px);
  border-bottom: 1px solid var(--line);
  background: rgb(11 17 20 / 92%);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  gap: 13px;
  align-items: center;
  color: inherit;
  text-decoration: none;
}
.brand-mark {
  position: relative;
  display: grid;
  place-items: center;
  width: 43px;
  height: 43px;
  border: 1px solid var(--teal-deep);
  background: #13231f;
  box-shadow: inset 0 0 18px rgb(53 208 165 / 10%);
}
.brand-mark::before, .brand-mark::after {
  position: absolute;
  width: 9px;
  height: 9px;
  content: "";
  border-radius: 50%;
  background: var(--orange);
  box-shadow: 0 0 10px rgb(246 169 77 / 70%);
}
.brand-mark::before { left: 7px; }
.brand-mark::after { right: 7px; }
.brand-mark i {
  position: absolute;
  width: 14px;
  height: 2px;
  background: var(--teal);
}
.brand-mark i:nth-child(1) { transform: rotate(30deg); }
.brand-mark i:nth-child(2) { transform: rotate(-30deg); }
.brand-mark i:nth-child(3) { width: 7px; }
.brand strong {
  display: block;
  font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
  font-size: 1.45rem;
  font-weight: 500;
  letter-spacing: .08em;
  line-height: 1;
}
.brand small {
  display: block;
  margin-top: 4px;
  color: var(--ink-dim);
  font-family: Consolas, "Courier New", monospace;
  font-size: .64rem;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.topbar-actions { display: flex; gap: 14px; align-items: center; }
.build-tag {
  color: var(--ink-faint);
  font: .68rem Consolas, monospace;
  letter-spacing: .1em;
}
.icon-button {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--line);
  background: var(--panel);
}
.icon-button:hover { border-color: var(--teal); background: var(--panel-2); }
.icon-button svg { width: 19px; fill: var(--ink-dim); }

.game-shell { width: min(1780px, 100%); margin: 0 auto; padding: 22px clamp(14px, 2.6vw, 42px) 48px; }

.status-rack {
  display: grid;
  grid-template-columns: 1.05fr 1fr 1fr 1.4fr;
  border: 1px solid var(--line);
  background: var(--shell);
  box-shadow: var(--shadow);
}
.status-cell {
  position: relative;
  display: flex;
  gap: 12px;
  align-items: center;
  min-height: 84px;
  padding: 14px 18px;
  border-right: 1px solid var(--line);
}
.status-cell:last-child { border-right: 0; }
.status-cell small, .facility-card small, .prestige-card small {
  display: block;
  margin-bottom: 5px;
  color: var(--ink-faint);
  font: .66rem Consolas, monospace;
  letter-spacing: .13em;
}
.status-cell strong { font: 700 1.35rem Consolas, monospace; }
.status-icon {
  display: grid;
  place-items: center;
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  color: var(--teal);
  border: 1px solid var(--teal-deep);
  background: rgb(53 208 165 / 6%);
  font: 700 1.1rem Consolas, monospace;
}
.ticket-icon { color: var(--orange); border-color: #805c32; background: rgb(246 169 77 / 6%); }
.rep-icon { color: var(--yellow); border-color: #766832; background: rgb(245 210 100 / 6%); }
.rate { margin-left: auto; color: var(--ink-faint); font: .68rem Consolas, monospace; white-space: nowrap; }
.rate.positive { color: var(--teal); }
.muted { color: var(--ink-faint); font-size: .9rem; }
.level-cell { display: block; }
.level-copy { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.level-copy strong { font-size: 1rem; }
.level-track { height: 5px; margin-top: 14px; overflow: hidden; background: #26353a; }
.level-track span { display: block; width: 0; height: 100%; background: linear-gradient(90deg, var(--teal-deep), var(--teal)); transition: width .4s ease; }

.event-strip {
  display: flex;
  gap: 12px;
  align-items: center;
  min-height: 39px;
  padding: 8px 14px;
  color: var(--ink-dim);
  border: 1px solid var(--line);
  border-top: 0;
  background: #0e171a;
  font-size: .76rem;
}
.event-strip strong { color: var(--ink); font: 700 .7rem Consolas, monospace; letter-spacing: .1em; }
.event-strip time { margin-left: auto; color: var(--orange); font: .72rem Consolas, monospace; }
.event-pulse, .status-led {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 10px var(--teal);
  animation: pulse 2s infinite;
}
.event-strip.active { border-color: #7d582f; background: rgb(246 169 77 / 8%); }
.event-strip.active .event-pulse { background: var(--orange); box-shadow: 0 0 10px var(--orange); }

.command-grid { display: grid; grid-template-columns: minmax(260px, .78fr) minmax(470px, 1.55fr) minmax(285px, .85fr); gap: 14px; margin-top: 14px; align-items: stretch; }
.panel, .dispatch-board { border: 1px solid var(--line); background: rgb(16 24 28 / 96%); box-shadow: 0 14px 38px rgb(0 0 0 / 20%); }
.panel { padding: 16px; }
.panel-heading { display: flex; gap: 11px; align-items: center; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.panel-heading p, .office-header p { margin: 0 0 3px; color: var(--ink-faint); font: .63rem Consolas, monospace; letter-spacing: .15em; }
.panel-heading h2, .dispatch-heading h2 { margin: 0; font-size: .99rem; letter-spacing: .02em; }
.panel-code {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  color: var(--teal);
  border: 1px solid var(--teal-deep);
  font: 700 .68rem Consolas, monospace;
}

.ticket-card { position: relative; margin: 16px 0 10px; padding: 15px; border: 1px solid #4b4935; background: linear-gradient(135deg, rgb(246 169 77 / 9%), transparent 60%); }
.ticket-card::after { position: absolute; right: -1px; bottom: -1px; width: 24px; height: 24px; content: ""; border-right: 3px solid var(--orange); border-bottom: 3px solid var(--orange); }
.ticket-topline { display: flex; gap: 9px; align-items: center; color: var(--ink-faint); font: .61rem Consolas, monospace; letter-spacing: .08em; }
.ticket-topline #ticket-age { margin-left: auto; color: var(--orange); }
.severity { padding: 3px 5px; color: #171008; background: var(--orange); font-weight: 800; }
.ticket-card h3 { margin: 13px 0 5px; font-size: 1rem; line-height: 1.35; }
.ticket-card p { min-height: 2.4em; margin: 0; color: var(--ink-dim); font-size: .76rem; line-height: 1.5; }
.ticket-payout { display: flex; justify-content: space-between; margin-top: 14px; padding-top: 10px; color: var(--ink-faint); border-top: 1px dashed var(--line); font-size: .7rem; }
.ticket-payout strong { color: var(--teal); font: 700 .82rem Consolas, monospace; }

.action-button {
  display: flex;
  width: 100%;
  min-height: 54px;
  padding: 0;
  align-items: stretch;
  text-align: left;
  border: 1px solid var(--line-hot);
  background: var(--panel-2);
  transition: transform .12s ease, border-color .12s ease, filter .12s ease;
}
.action-button:not(:disabled):hover { border-color: var(--teal); filter: brightness(1.08); transform: translateY(-1px); }
.action-button:not(:disabled):active { transform: translateY(1px); }
.action-button:disabled { color: var(--ink-faint); opacity: .56; }
.primary-action { color: #071612; border-color: var(--teal); background: linear-gradient(90deg, #28b28f, var(--teal)); }
.button-glyph { display: grid; place-items: center; width: 48px; border-right: 1px solid rgb(0 0 0 / 18%); font-size: 1.2rem; }
.action-button > span:nth-child(2) { display: flex; flex: 1; flex-direction: column; justify-content: center; padding: 8px 11px; }
.action-button strong { font: 800 .71rem Consolas, monospace; letter-spacing: .08em; }
.action-button small { margin-top: 3px; opacity: .75; font-size: .66rem; }
.action-button kbd { align-self: center; margin-right: 10px; padding: 3px 6px; color: inherit; border: 1px solid currentColor; background: transparent; font: .58rem Consolas, monospace; opacity: .7; }
.secondary-action { min-height: 54px; margin-top: 9px; padding: 10px 12px; gap: 10px; justify-content: space-between; color: var(--ink); font-size: .72rem; }
.secondary-action > span { display: flex; flex: 1; min-width: 0; flex-direction: column; justify-content: center; }
.secondary-action b { color: var(--orange); font: 700 .74rem Consolas, monospace; }
.secondary-action .locked { color: var(--red); }

.mini-stats { display: grid; grid-template-columns: 1fr 1fr; margin: 11px 0 18px; border: 1px solid var(--line); }
.mini-stats div { padding: 9px 11px; }
.mini-stats div + div { border-left: 1px solid var(--line); }
.mini-stats small { display: block; color: var(--ink-faint); font-size: .63rem; }
.mini-stats strong { font: 700 .8rem Consolas, monospace; }
.cyber-card { margin: 14px 0 18px; padding: 12px; border: 1px solid #5f4437; background: linear-gradient(135deg, rgb(237 107 92 / 10%), rgb(16 24 28 / 96%) 62%); }
.cyber-card.active { border-color: var(--red); box-shadow: inset 0 0 28px rgb(237 107 92 / 7%); }
.cyber-card-header { display: grid; grid-template-columns: 32px 1fr auto; gap: 9px; align-items: center; }
.cyber-card-header small { display: block; color: var(--red); font: .58rem Consolas, monospace; letter-spacing: .12em; }
.cyber-card-header h3 { margin: 2px 0 0; font-size: .78rem; }
.cyber-card-header time { color: var(--ink-faint); font: 700 .61rem Consolas, monospace; }
.cyber-glyph { display: grid; place-items: center; width: 32px; height: 32px; color: #190b08; background: var(--red); font: 900 .8rem Consolas, monospace; }
#cyber-idle p, #cyber-active p { margin: 11px 0 5px; color: var(--ink-dim); font-size: .66rem; line-height: 1.45; }
#cyber-idle small { color: var(--ink-faint); font: .58rem Consolas, monospace; }
.cyber-severity { display: inline-block; margin-top: 12px; padding: 3px 5px; color: #1a0907; background: var(--red); font: 800 .56rem Consolas, monospace; }
#cyber-active h4 { margin: 8px 0 0; font-size: .78rem; }
.cyber-progress { height: 6px; margin: 11px 0 7px; overflow: hidden; background: #35282a; }
.cyber-progress span { display: block; width: 0; height: 100%; background: linear-gradient(90deg, var(--red), var(--orange)); transition: width .2s; }
.cyber-meta { display: flex; justify-content: space-between; color: var(--ink-faint); font: .56rem Consolas, monospace; }
.cyber-meta b { color: var(--ink); }
#cyber-risk { color: var(--red); }
#cyber-response { display: flex; justify-content: space-between; align-items: center; width: 100%; min-height: 44px; margin-top: 11px; padding: 0 10px; color: #1a0907; border: 0; background: var(--red); font: 900 .62rem Consolas, monospace; letter-spacing: .07em; }
#cyber-response small { font-size: .57rem; opacity: .72; }
.section-label { display: flex; gap: 9px; align-items: center; margin: 18px 0 9px; color: var(--ink-dim); font: 700 .66rem Consolas, monospace; letter-spacing: .1em; }
.section-label::after { flex: 1; height: 1px; content: ""; background: var(--line); }
.section-label span { color: var(--teal); }
.stack { display: grid; gap: 7px; }
.shop-item {
  position: relative;
  display: grid;
  grid-template-columns: 35px 1fr auto;
  gap: 9px;
  align-items: center;
  width: 100%;
  min-height: 54px;
  padding: 8px;
  overflow: hidden;
  text-align: left;
  border: 1px solid var(--line);
  background: var(--panel-2);
}
.shop-item:not(:disabled):hover { border-color: var(--teal-deep); background: var(--panel-3); }
.shop-item:disabled { color: var(--ink-faint); opacity: .62; }
.shop-item .item-icon { display: grid; place-items: center; width: 35px; height: 35px; color: var(--orange); border: 1px solid var(--line); background: var(--shell); font: 700 .8rem Consolas, monospace; }
.shop-item strong { display: block; font-size: .72rem; }
.shop-item small { display: block; margin-top: 3px; color: var(--ink-faint); font-size: .61rem; line-height: 1.3; }
.shop-item b { color: var(--teal); font: 700 .68rem Consolas, monospace; white-space: nowrap; }
.shop-item .count { position: absolute; top: 0; right: 0; padding: 2px 5px; color: var(--void); background: var(--orange); font: 700 .55rem Consolas, monospace; }

.office-column { display: flex; min-width: 0; flex-direction: column; }
.office-header { display: flex; justify-content: space-between; align-items: end; padding: 6px 3px 10px; }
.office-title { margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: clamp(1.65rem, 2.2vw, 2.55rem); font-weight: 400; letter-spacing: -.035em; }
.office-status { color: var(--ink-faint); font: .62rem Consolas, monospace; letter-spacing: .08em; }
.office-status b { font-weight: 400; }
.office-status span { display: inline-block; width: 7px; height: 7px; margin-right: 5px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 8px var(--teal); }
.office-status.incident { color: var(--red); }
.office-status.incident span { background: var(--red); box-shadow: 0 0 8px var(--red); }
.eyebrow { color: var(--teal) !important; }
.office-map { position: relative; aspect-ratio: 16 / 9; margin: 0; overflow: hidden; border: 1px solid var(--line-hot); background: #10181c; box-shadow: var(--shadow); }
.office-map::before { position: absolute; z-index: 2; inset: 0; content: ""; pointer-events: none; box-shadow: inset 0 0 50px rgb(0 0 0 / 42%); }
.office-map img { display: block; width: 100%; height: 100%; object-fit: cover; image-rendering: pixelated; filter: saturate(.9) contrast(1.04) brightness(.88); transition: filter .6s ease, transform 1.4s ease, opacity .25s ease; }
.office-map img.scene-changing { opacity: .18; }
.office-map.busy img { filter: saturate(1.15) contrast(1.05) brightness(.98); transform: scale(1.01); }
.office-scan { position: absolute; z-index: 3; top: -20%; left: 0; width: 100%; height: 15%; pointer-events: none; background: linear-gradient(transparent, rgb(53 208 165 / 8%), transparent); animation: scan 7s linear infinite; }
.map-techs { position: absolute; z-index: 4; inset: 0; pointer-events: none; }
.tech-pip { position: absolute; width: 11px; height: 11px; margin: -5px 0 0 -5px; border: 2px solid #d8fff4; border-radius: 50%; background: var(--teal); box-shadow: 0 0 0 4px rgb(53 208 165 / 18%), 0 0 12px var(--teal); animation: pulse 2s infinite; }
.scene-badge { position: absolute; z-index: 5; top: 9px; left: 9px; padding: 4px 6px; color: var(--ink-dim); border: 1px solid rgb(255 255 255 / 16%); background: rgb(8 14 16 / 78%); font: .55rem Consolas, monospace; letter-spacing: .08em; }
.office-map figcaption { position: absolute; z-index: 4; right: 10px; bottom: 9px; display: flex; gap: 14px; padding: 6px 8px; color: #d6e2de; border: 1px solid rgb(255 255 255 / 13%); background: rgb(8 14 16 / 80%); font: .6rem Consolas, monospace; backdrop-filter: blur(8px); }
.map-dot { display: inline-block; width: 6px; height: 6px; margin-right: 4px; border-radius: 50%; }
.map-dot.live { background: var(--teal); }
.map-dot.queue { background: var(--orange); }
.map-hotspot { position: absolute; z-index: 5; display: flex; gap: 4px; align-items: center; padding: 3px 5px; color: #c4eee3; border: 1px solid rgb(53 208 165 / 50%); background: rgb(11 24 22 / 80%); font: .52rem Consolas, monospace; letter-spacing: .08em; }
.map-hotspot span { width: 5px; height: 5px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 6px var(--teal); }
.map-hotspot:hover { color: #07110e; background: var(--teal); }
.map-hotspot:hover span { background: #07110e; }
.server-hotspot { top: 19%; left: 42%; }
.desk-hotspot { top: 61%; right: 20%; }

.dispatch-board { display: flex; flex: 1; min-height: 332px; margin-top: 10px; padding: 13px; flex-direction: column; }
.dispatch-heading { display: flex; justify-content: space-between; align-items: center; }
.dispatch-heading > div { display: flex; gap: 10px; align-items: center; }
.text-button { min-height: 44px; padding: 7px 0; color: var(--teal); border: 0; background: transparent; font-size: .68rem; }
.text-button:hover { color: #7ce8ca; text-decoration: underline; }
.throughput { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: end; margin: 13px 0 10px; padding: 11px; border: 1px solid var(--line); background: var(--shell); }
.throughput > div:not(.throughput-line) { display: grid; grid-template-columns: auto auto; gap: 2px 6px; align-items: baseline; }
.throughput small { grid-column: 1 / -1; color: var(--ink-faint); font-size: .61rem; }
.throughput strong { color: var(--orange); font: 700 .86rem Consolas, monospace; }
.throughput > div:last-child strong { color: var(--teal); }
.throughput span { color: var(--ink-faint); font-size: .56rem; }
.throughput-line { height: 5px; margin-bottom: 6px; overflow: hidden; background: #28383d; }
.throughput-line span { display: block; width: 0; height: 100%; background: var(--teal); transition: width .3s; }
.dispatch-board.cyber-diverted .throughput-line span { background: var(--red); }
.staff-list { display: grid; flex: 1; gap: 6px; grid-template-rows: repeat(3, minmax(54px, 1fr)); overflow: visible; }
.staff-empty { display: grid; grid-row: 1 / -1; place-items: center; padding: 20px 12px; color: var(--ink-faint); border: 1px dashed var(--line); text-align: center; font-size: .72rem; }
.staff-row { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto 44px; gap: 9px; align-items: center; padding: 7px 0 7px 9px; border: 1px solid var(--line); background: var(--panel-2); }
.staff-avatar { display: grid; place-items: center; width: 32px; height: 32px; color: #091712; background: var(--teal); font: 800 .66rem Consolas, monospace; }
.staff-row strong { display: block; font-size: .7rem; }
.staff-row small { color: var(--ink-faint); font-size: .59rem; }
.staff-output { text-align: right; }
.staff-output b { display: block; color: var(--teal); font: 700 .65rem Consolas, monospace; }
.staff-manage { align-self: stretch; width: 44px; min-height: 44px; padding: 0; color: var(--ink-faint); border: 0; border-left: 1px solid var(--line); background: transparent; font: 800 .72rem Consolas, monospace; letter-spacing: .08em; }
.staff-manage:hover { color: var(--void); background: var(--teal); }
.staff-pager { display: grid; grid-template-columns: 44px 1fr 44px; align-items: center; min-height: 44px; margin-top: 9px; border: 1px solid var(--line); background: var(--shell); }
.staff-pager button { width: 44px; height: 44px; padding: 0; color: var(--teal); border: 0; background: transparent; }
.staff-pager button:first-child { border-right: 1px solid var(--line); }
.staff-pager button:last-child { border-left: 1px solid var(--line); }
.staff-pager button:not(:disabled):hover { color: var(--void); background: var(--teal); }
.staff-pager button:disabled { color: var(--ink-faint); opacity: .35; }
.staff-pager span { color: var(--ink-faint); text-align: center; font: .58rem Consolas, monospace; letter-spacing: .08em; }

.facility-card { display: grid; grid-template-columns: 54px 1fr; gap: 12px; align-items: center; padding: 11px; border: 1px solid var(--line); background: var(--panel-2); }
.facility-card h3, .prestige-card h3 { margin: 0 0 3px; font-size: .82rem; }
.facility-card p, .prestige-card p { margin: 0; color: var(--ink-faint); font-size: .63rem; line-height: 1.45; }
.facility-visual { display: flex; align-items: end; width: 54px; height: 46px; padding: 7px; border: 1px solid var(--line); background: var(--shell); }
.facility-visual span { display: flex; gap: 3px; align-items: end; width: 100%; height: 100%; }
.facility-visual i { flex: 1; height: 25%; background: var(--line-hot); transition: height .4s, background .4s; }
.facility-visual i.active { background: var(--teal); }
.contracts .shop-item .item-icon { color: var(--blue); }
.prestige-card { display: grid; gap: 12px; margin-top: 20px; padding: 13px; border: 1px solid #65583c; background: linear-gradient(135deg, rgb(245 210 100 / 9%), transparent 65%); }
.prestige-card button { width: 100%; min-height: 44px; margin-top: 12px; color: var(--yellow); border: 1px solid #6d603c; background: rgb(245 210 100 / 7%); font: 700 .67rem Consolas, monospace; letter-spacing: .08em; }
.prestige-card button:disabled { color: var(--ink-faint); opacity: .5; }
.legacy-status { display: grid; grid-template-columns: 42px 1fr; gap: 10px; align-items: center; padding: 9px; border: 1px solid var(--line); background: var(--shell); }
.legacy-status > span { display: grid; place-items: center; width: 42px; height: 42px; color: var(--ink-faint); border: 1px solid var(--line); font: 800 .62rem Consolas, monospace; }
.legacy-status.active { border-color: #65583c; }
.legacy-status.active > span { color: var(--void); border-color: var(--yellow); background: var(--yellow); }
.legacy-status small, .legacy-status strong { display: block; }
.legacy-status small { color: var(--ink-faint); font: .52rem Consolas, monospace; letter-spacing: .08em; }
.legacy-status strong { margin: 3px 0; color: var(--ink); font-size: .68rem; }
.legacy-status p { color: var(--ink-faint); font-size: .58rem; }
.badge-status { display: flex; justify-content: space-between; gap: 10px; color: var(--ink-faint); font: .55rem Consolas, monospace; }
.badge-status span { color: var(--yellow); }

.activity-log { display: grid; grid-template-columns: auto 1fr auto; gap: 16px; align-items: center; min-height: 46px; margin-top: 14px; padding: 8px 14px; border: 1px solid var(--line); background: var(--shell); }
.log-title { display: flex; gap: 8px; align-items: center; }
.log-title h2 { margin: 0; font: 700 .65rem Consolas, monospace; letter-spacing: .08em; text-transform: uppercase; }
.log-items { display: flex; gap: 20px; min-width: 0; overflow: hidden; color: var(--ink-faint); font: .62rem Consolas, monospace; white-space: nowrap; }
.log-items span { overflow: hidden; text-overflow: ellipsis; }
.log-items time { margin-right: 6px; color: var(--teal-deep); }
.site-footer { display: flex; justify-content: space-between; width: min(1780px, 100%); margin: 0 auto; padding: 0 clamp(14px, 2.6vw, 42px) 35px; color: var(--ink-faint); font: .63rem Consolas, monospace; }
.site-footer strong { color: var(--ink-dim); }

.game-dialog { width: min(850px, calc(100% - 24px)); max-height: min(760px, calc(100vh - 32px)); padding: 0; color: var(--ink); border: 1px solid var(--line-hot); background: var(--shell); box-shadow: 0 35px 100px #000; }
.game-dialog::backdrop { background: rgb(2 6 8 / 75%); backdrop-filter: blur(5px); }
.dialog-shell > header { display: flex; justify-content: space-between; align-items: start; padding: 18px 20px; border-bottom: 1px solid var(--line); background: var(--panel); }
.dialog-shell h2 { margin: 2px 0 0; font-family: Georgia, serif; font-size: 1.45rem; font-weight: 400; }
.dialog-close { width: 44px; height: 44px; color: var(--ink-dim); border: 1px solid var(--line); background: transparent; font-size: 1.4rem; }
.dialog-intro { margin: 0; padding: 16px 20px 0; color: var(--ink-dim); font-size: .76rem; }
.staff-dialog { width: min(720px, calc(100% - 24px)); }
.staff-dialog-content { display: grid; gap: 12px; padding: 16px 20px; }
.staff-profile, .incoming-candidate { display: grid; grid-template-columns: 46px 1fr; gap: 10px 13px; align-items: center; padding: 14px; border: 1px solid var(--line); background: var(--panel); }
.staff-profile > .staff-avatar { width: 46px; height: 46px; }
.staff-profile h3, .incoming-candidate h3 { margin: 0 0 3px; font-size: .9rem; }
.staff-profile p, .incoming-candidate p { margin: 0; color: var(--teal); font: .63rem Consolas, monospace; }
.profile-stats { display: grid; grid-column: 1 / -1; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); }
.profile-stats div { display: grid; gap: 4px; padding: 9px; background: var(--shell); }
.profile-stats span { color: var(--ink-faint); font: .55rem Consolas, monospace; letter-spacing: .08em; }
.profile-stats b { color: var(--ink); font: 700 .67rem Consolas, monospace; }
.roster-warning { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; padding: 13px; border: 1px solid #713d38; background: rgb(240 103 87 / 6%); }
.roster-warning strong, .roster-warning span { color: var(--red); font: 700 .65rem Consolas, monospace; letter-spacing: .07em; }
.roster-warning p { grid-column: 1 / -1; margin: 4px 0 0; color: var(--ink-dim); font-size: .68rem; line-height: 1.45; }
.release-button { width: 100%; min-height: 44px; color: var(--red); border: 1px solid #713d38; background: transparent; font: 700 .66rem Consolas, monospace; letter-spacing: .06em; }
.release-button:not(:disabled):hover { color: #190805; background: var(--red); }
.release-button:disabled { color: var(--ink-faint); opacity: .5; }
.incoming-candidate { grid-template-columns: 1fr; border-color: var(--teal-deep); background: rgb(53 208 165 / 5%); }
.incoming-candidate > div:first-child > span { color: var(--teal); font: .56rem Consolas, monospace; letter-spacing: .1em; }
.replacement-list { display: grid; gap: 7px; max-height: min(360px, 46vh); padding-right: 3px; overflow-y: auto; }
.replacement-option { display: grid; grid-template-columns: minmax(110px, .8fr) minmax(250px, 1.5fr) auto; gap: 12px; align-items: center; min-height: 66px; padding: 8px 10px 8px 12px; color: var(--ink); border: 1px solid var(--line); background: var(--panel-2); text-align: left; }
.replacement-option:hover { border-color: var(--teal-deep); background: rgb(53 208 165 / 7%); }
.replacement-tech strong, .replacement-tech small { display: block; }
.replacement-tech strong { font-size: .7rem; }
.replacement-tech small { margin-top: 3px; color: var(--ink-faint); font-size: .58rem; }
.replacement-deltas { display: flex; flex-wrap: wrap; gap: 5px 10px; color: var(--ink-faint); font: .55rem Consolas, monospace; }
.replacement-deltas > span { white-space: nowrap; }
.replacement-option > b { color: var(--teal); font: 700 .6rem Consolas, monospace; letter-spacing: .08em; }
.delta { margin-left: 3px; }
.delta.positive { color: var(--teal); }
.delta.negative { color: var(--red); }
.dialog-footnote { color: var(--ink-faint); font: .6rem Consolas, monospace; }
.rebrand-dialog { width: min(980px, calc(100% - 24px)); overflow-y: auto; }
.acquisition-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; margin: 16px 20px 0; border: 1px solid #65583c; background: #65583c; }
.acquisition-summary div { display: grid; gap: 5px; padding: 12px; background: #171b19; }
.acquisition-summary span { color: var(--ink-faint); font: .54rem Consolas, monospace; letter-spacing: .09em; }
.acquisition-summary strong { color: var(--yellow); font: 700 .78rem Consolas, monospace; }
.rebrand-section { padding: 16px 20px; border-top: 1px solid var(--line); }
.rebrand-section:first-of-type { border-top: 0; }
.rebrand-section-heading { display: grid; grid-template-columns: 28px 1fr; gap: 9px; align-items: start; margin-bottom: 10px; }
.rebrand-section-heading > span { display: grid; place-items: center; width: 28px; height: 28px; color: var(--yellow); border: 1px solid #65583c; font: 700 .56rem Consolas, monospace; }
.rebrand-section-heading h3 { margin: 0; font-size: .78rem; }
.rebrand-section-heading p { margin: 3px 0 0; color: var(--ink-faint); font-size: .63rem; }
.legacy-options { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.legacy-option { display: grid; grid-template-columns: 42px 1fr; gap: 10px; align-items: start; min-height: 152px; padding: 11px; color: var(--ink); border: 1px solid var(--line); background: var(--panel-2); text-align: left; }
.legacy-option:hover { border-color: #65583c; background: rgb(245 210 100 / 5%); }
.legacy-option.selected { border-color: var(--yellow); box-shadow: inset 0 0 0 1px rgb(245 210 100 / 20%); }
.legacy-option > span { display: grid; place-items: center; width: 42px; height: 42px; color: var(--yellow); border: 1px solid #65583c; font: 800 .6rem Consolas, monospace; }
.legacy-option.selected > span { color: var(--void); background: var(--yellow); }
.legacy-option strong, .legacy-option small { display: block; }
.legacy-option strong { font-size: .7rem; }
.legacy-option small { margin-top: 5px; color: var(--teal); font: .57rem Consolas, monospace; line-height: 1.35; }
.legacy-option p { grid-column: 1 / -1; margin: 9px 0 0; color: var(--ink-faint); font-size: .62rem; line-height: 1.45; }
.veteran-options { display: grid; grid-template-columns: repeat(2, 1fr); gap: 7px; max-height: 230px; padding-right: 3px; overflow-y: auto; }
.veteran-option { display: grid; grid-template-columns: 38px 1fr; gap: 9px; align-items: center; min-height: 60px; padding: 8px; color: var(--ink); border: 1px solid var(--line); background: var(--panel-2); text-align: left; }
.veteran-option:hover, .veteran-option.selected { border-color: var(--teal-deep); background: rgb(53 208 165 / 6%); }
.veteran-option .staff-avatar, .veteran-none { width: 38px; height: 38px; }
.veteran-none { display: grid; place-items: center; color: var(--ink-faint); border: 1px solid var(--line); font: 700 .52rem Consolas, monospace; }
.veteran-option strong, .veteran-option small { display: block; }
.veteran-option strong { font-size: .66rem; }
.veteran-option small { margin-top: 4px; color: var(--ink-faint); font-size: .57rem; }
.milestone-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; }
.milestone { display: grid; grid-template-columns: 38px 1fr auto; gap: 9px; align-items: center; min-height: 56px; padding: 8px; border: 1px solid var(--line); background: var(--shell); }
.milestone > span { display: grid; place-items: center; width: 38px; height: 38px; color: var(--ink-faint); border: 1px solid var(--line); font: 700 .52rem Consolas, monospace; }
.milestone strong, .milestone small { display: block; }
.milestone strong { font-size: .63rem; }
.milestone small { margin-top: 3px; color: var(--ink-faint); font-size: .55rem; }
.milestone > b { color: var(--ink-faint); font: 700 .5rem Consolas, monospace; letter-spacing: .07em; }
.milestone.unlocked { border-color: var(--teal-deep); }
.milestone.unlocked > span { color: var(--void); border-color: var(--teal); background: var(--teal); }
.milestone.unlocked > b { color: var(--teal); }
.milestone.new { border-color: #65583c; background: rgb(245 210 100 / 5%); }
.milestone.new > span { color: var(--void); border-color: var(--yellow); background: var(--yellow); }
.milestone.new > b { color: var(--yellow); }
.dialog-actions { display: flex; gap: 8px; }
.confirm-rebrand { min-height: 44px; padding: 0 15px; color: var(--void); border: 1px solid var(--yellow); background: var(--yellow); font: 800 .64rem Consolas, monospace; letter-spacing: .06em; }
.confirm-rebrand:disabled { color: var(--ink-faint); border-color: var(--line); background: var(--panel-3); }
.candidate-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; padding: 16px 20px; }
.candidate-grid.expanded-board { grid-template-columns: repeat(2, 1fr); }
.candidate-card { padding: 14px; border: 1px solid var(--line); background: var(--panel); }
.candidate-badge { display: flex; justify-content: space-between; color: var(--ink-faint); font: .6rem Consolas, monospace; }
.candidate-badge b { color: var(--orange); }
.candidate-card h3 { margin: 15px 0 3px; font-size: .88rem; }
.candidate-role { margin: 0 0 13px; color: var(--teal); font: .63rem Consolas, monospace; }
.candidate-stats { display: grid; gap: 7px; margin-bottom: 14px; }
.candidate-stats div { display: flex; justify-content: space-between; padding-bottom: 6px; border-bottom: 1px solid var(--line); color: var(--ink-faint); font-size: .65rem; }
.candidate-stats b { color: var(--ink); font-family: Consolas, monospace; }
.candidate-actions { display: grid; gap: 7px; }
.hire-button { width: 100%; min-height: 44px; color: #06140f; border: 0; background: var(--teal); font: 800 .68rem Consolas, monospace; }
.hire-button:disabled { color: var(--ink-faint); background: var(--panel-3); }
.compare-button { width: 100%; min-height: 44px; color: var(--teal); border: 1px solid var(--teal-deep); background: transparent; font: 700 .61rem Consolas, monospace; letter-spacing: .05em; }
.compare-button:not(:disabled):hover { color: var(--void); background: var(--teal); }
.compare-button:disabled { color: var(--ink-faint); border-color: var(--line); opacity: .5; }
.dialog-shell > footer { display: flex; justify-content: space-between; align-items: center; padding: 14px 20px; border-top: 1px solid var(--line); background: var(--panel); }
.secondary-button, .save-tools button { min-height: 44px; padding: 0 14px; color: var(--ink); border: 1px solid var(--line-hot); background: var(--panel-2); font-size: .7rem; }
.settings-dialog { width: min(590px, calc(100% - 24px)); }
.settings-list { display: grid; padding: 10px 20px; }
.settings-list label { display: flex; justify-content: space-between; align-items: center; min-height: 70px; border-bottom: 1px solid var(--line); }
.settings-list strong, .settings-list small { display: block; }
.settings-list strong { font-size: .78rem; }
.settings-list small { margin-top: 4px; color: var(--ink-faint); font-size: .65rem; }
.settings-list input { width: 40px; height: 22px; accent-color: var(--teal); }
.save-tools { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; padding: 12px 20px; }
.save-tools .danger-button { color: var(--red); border-color: #713d38; }
.save-status { margin: 0; padding: 4px 20px 16px; color: var(--ink-faint); font: .62rem Consolas, monospace; }
.toast-region { position: fixed; z-index: 100; right: 18px; bottom: 18px; display: grid; gap: 8px; width: min(360px, calc(100% - 36px)); pointer-events: none; }
.toast { padding: 11px 13px; color: var(--ink); border: 1px solid var(--teal-deep); background: rgb(18 32 34 / 96%); box-shadow: var(--shadow); font-size: .72rem; animation: toast-in .25s ease-out; }
.toast b { color: var(--teal); }
.number-pop { animation: number-pop .25s ease; }

@keyframes pulse { 50% { opacity: .42; } }
@keyframes scan { to { transform: translateY(800%); } }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }
@keyframes number-pop { 50% { color: var(--yellow); transform: scale(1.04); } }

@media (max-width: 1180px) {
  .status-rack { grid-template-columns: repeat(2, 1fr); }
  .status-cell:nth-child(2) { border-right: 0; }
  .status-cell:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .command-grid { grid-template-columns: minmax(250px, .8fr) minmax(500px, 1.4fr); }
  .growth-panel { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 16px; }
  .growth-panel .panel-heading { grid-column: 1 / -1; }
  .growth-panel .prestige-card { grid-column: 2; }
}

@media (max-width: 820px) {
  .topbar { min-height: 66px; }
  .build-tag { display: none; }
  .game-shell { padding-top: 12px; }
  .command-grid { grid-template-columns: 1fr; }
  .office-column { grid-row: 1; }
  .dispatch-board { min-height: 0; }
  .staff-list { grid-template-rows: repeat(3, minmax(56px, auto)); }
  .workbench-panel { grid-row: 2; }
  .growth-panel { grid-row: 3; grid-column: auto; display: block; }
  .office-header { align-items: start; }
  .office-status { display: none; }
  .activity-log { grid-template-columns: 1fr auto; }
  .log-items { grid-column: 1 / -1; grid-row: 2; }
  .candidate-grid, .candidate-grid.expanded-board { grid-template-columns: 1fr; max-height: 58vh; overflow-y: auto; }
  .legacy-options { grid-template-columns: 1fr; }
  .legacy-option { min-height: 0; }
}

@media (max-width: 560px) {
  .brand small { display: none; }
  .brand strong { font-size: 1.15rem; }
  .status-rack { grid-template-columns: 1fr 1fr; }
  .status-cell { min-height: 72px; padding: 10px; }
  .status-icon { display: none; }
  .status-cell strong { font-size: 1rem; }
  .rate { position: absolute; right: 9px; bottom: 7px; }
  .level-copy { display: block; }
  .level-copy strong { font-size: .77rem; }
  .event-strip span:not(.event-pulse), .event-strip time { display: none; }
  .event-strip strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .office-map { aspect-ratio: 4 / 3; }
  .office-map img { object-position: center; }
  .map-hotspot { display: none; }
  .office-map figcaption { right: 6px; bottom: 6px; left: 6px; justify-content: space-between; }
  .throughput { gap: 6px; padding: 8px; }
  .throughput-line { min-width: 40px; }
  .site-footer { display: block; }
  .save-tools { grid-template-columns: 1fr; }
  .staff-dialog-content { padding: 12px; }
  .replacement-option { grid-template-columns: 1fr auto; }
  .replacement-deltas { grid-column: 1 / -1; grid-row: 2; }
  .dialog-footnote { max-width: 55%; }
  .acquisition-summary { grid-template-columns: 1fr; }
  .veteran-options, .milestone-grid { grid-template-columns: 1fr; }
  .rebrand-dialog .dialog-shell > footer { align-items: stretch; gap: 10px; flex-direction: column; }
  .rebrand-dialog .dialog-footnote { max-width: none; }
  .dialog-actions { display: grid; grid-template-columns: 1fr; }
}

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

body.reduce-motion *, body.reduce-motion *::before, body.reduce-motion *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
