/* Retail Rivals: midnight trading floor, mint control markings, championship brass. */
:root {
  color-scheme: dark;
  --ink: #0a1216;
  --base: #0d181b;
  --surface: #111f22;
  --raised: #16282a;
  --line: #2b4342;
  --line-light: #3a5753;
  --type: #eef3ea;
  --subtle: #b6c6bf;
  --faint: #92aaa0;
  --mint: #79e6b5;
  --mint-dark: #0b2a22;
  --mint-wash: #15372e;
  --gold: #eac77e;
  --loss: #ff9e97;
  --shadow: 0 18px 48px #0006;
  --sans: Inter, "Segoe UI", system-ui, -apple-system, sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --shell: min(100% - clamp(1.4rem, 5vw, 5rem), 91rem);
  font: 16px/1.5 var(--sans);
  font-synthesis: none;
}

*, *::before, *::after { box-sizing: border-box; }
html { min-width: 16rem; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--type);
  background:
    radial-gradient(90% 34rem at 82% -8%, #1d3b34 0, transparent 72%),
    linear-gradient(155deg, #111e20 0, var(--ink) 58%);
}
[hidden] { display: none !important; }
::selection { background: var(--gold); color: var(--ink); }
:focus-visible { outline: 2px solid var(--mint); outline-offset: 4px; }
a { color: var(--mint); text-underline-offset: .22em; }
button, input, select { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .54; }
button, a, input, select { -webkit-tap-highlight-color: #7be8b62e; }
img, canvas, svg { display: block; max-width: 100%; }
p, h1, h2, h3, h4 { margin: 0; }
h1, h2, h3, strong { overflow-wrap: anywhere; }
h1, h2, h3 { line-height: 1.08; }
h2 { font-size: clamp(1.6rem, 4vw, 2.7rem); letter-spacing: -.035em; }
h3 { font-size: 1.16rem; letter-spacing: -.01em; }
p { max-inline-size: 70ch; }
:where(main, section, div, aside, article, form, header, footer) { min-inline-size: 0; }
ul, ol { padding-inline-start: 1.2rem; }
li + li { margin-top: .35rem; }
::marker { color: var(--mint); }
.visually-hidden, .sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
.skip-link { position: absolute; inset: 1rem auto auto 1rem; z-index: 90; transform: translateY(-160%); }
.skip-link:focus { transform: none; }
.muted { color: var(--subtle); }
.tiny, .micro, .fine-print { font-size: .84rem; color: var(--subtle); }
.kicker, .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .48rem;
  color: var(--gold);
  font: 750 .73rem/1.3 var(--sans);
  letter-spacing: .14em;
  text-transform: uppercase;
}
:where(.eyebrow, .kicker)::before {
  content: "";
  display: inline-block;
  width: .47rem;
  height: .47rem;
  flex: 0 0 .47rem;
  transform: rotate(45deg);
  background: currentColor;
  border-radius: 1px;
}

.mast {
  position: relative;
  z-index: 10;
  width: var(--shell);
  min-height: 4.55rem;
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.3rem;
  border-bottom: 1px solid var(--line);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: .7rem;
  flex: 0 1 auto;
  padding-block: .45rem;
  color: var(--type);
  font-size: .95rem;
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -.02em;
  text-decoration: none;
}
.brand img { width: 2.5rem; height: 2.5rem; }
.brand img[src*="wordmark"] { width: min(12.5rem, 48vw); height: auto; }
.brand em, .brand b, .brand strong b { color: var(--mint); font-style: normal; }
.brand small { display: block; margin-top: .18rem; color: var(--gold); font-size: .58rem; font-weight: 700; letter-spacing: .11em; text-transform: uppercase; }
.nav { display: flex; gap: .2rem; align-items: center; flex-wrap: wrap; }
.nav a, .nav button {
  display: inline-flex;
  min-height: 2.65rem;
  align-items: center;
  padding: .5rem .8rem;
  border: 1px solid transparent;
  border-radius: .55rem;
  background: none;
  color: var(--subtle);
  font-size: .8rem;
  font-weight: 750;
  text-decoration: none;
}
.nav :is(a, button):hover { color: var(--type); background: var(--raised); }
.nav [aria-current="page"], .nav [aria-selected="true"], .nav .active { color: var(--mint); border-color: #3c6556; background: #203c34; }

main, .screen, #landing, #shift, #board, #results, #help, #about { max-width: none; }
main { width: var(--shell); margin-inline: auto; }
main > :where(section, .screen) { margin-block: clamp(1.6rem, 4vw, 3.8rem); }
footer {
  width: var(--shell);
  margin: clamp(2rem, 7vw, 5.5rem) auto 0;
  padding-block: 1.3rem 2.1rem;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .8rem 1.2rem;
  flex-wrap: wrap;
  font-size: .83rem;
  color: var(--subtle);
}
footer a { color: var(--type); }

.btn, .button, button.primary {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: .48rem;
  min-height: 2.8rem;
  padding: .59rem .95rem;
  border: 1px solid var(--line-light);
  border-radius: .58rem;
  background: #182a2b;
  color: var(--type);
  font-size: .9rem;
  font-weight: 800;
  line-height: 1.25;
  text-align: center;
  text-decoration: none;
  transition: background .16s ease, border-color .16s ease, transform .16s ease;
}
.btn:not(:disabled):hover, .button:not(:disabled):hover { border-color: var(--mint); background: var(--mint-wash); transform: translateY(-1px); }
.btn:active, .button:active { transform: translateY(1px); }
.btn.primary, .button.primary, button.primary {
  background: linear-gradient(115deg, #8ceec0, #63d9a6);
  color: #072016;
  border-color: #7ce8b6;
  box-shadow: 0 3px 0 #2a7e60;
}
.btn.primary:not(:disabled):hover, .button.primary:not(:disabled):hover, button.primary:not(:disabled):hover { background: #a0f1c8; border-color: #b1f5d1; }
.btn.secondary, .btn.ghost { background: transparent; }
.btn.danger, .btn[data-variant="danger"] { color: var(--loss); border-color: #764240; }
.btn.small { min-height: 2.75rem; padding: .38rem .6rem; font-size: .8rem; }
.actions, .hero-actions, .result-actions, .button-row, .cta-row {
  display: flex;
  align-items: stretch;
  flex-wrap: wrap;
  gap: .7rem;
}
.btn[aria-pressed="true"] { color: var(--mint); border-color: #64be98; background: var(--mint-wash); }

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(14rem, .77fr) minmax(0, 1.23fr);
  align-items: center;
  min-height: clamp(32rem, 42vw, 40.5rem);
  overflow: hidden;
  isolation: isolate;
  gap: clamp(1rem, 3vw, 3rem);
  padding: clamp(1.5rem, 4vw, 4.4rem);
  border: 1px solid var(--line-light);
  border-radius: 1.35rem;
  background:
    linear-gradient(110deg, #19372d 0%, #122624 33%, #0b191a 76%),
    var(--base);
  box-shadow: var(--shadow);
}
.hero::before {
  content: "";
  pointer-events: none;
  z-index: -1;
  position: absolute;
  inset: 0 0 0 38%;
  background:
    linear-gradient(90deg, transparent 98%, #70ba9c18 0) 0 0 / 27px 27px,
    linear-gradient(0deg, transparent 98%, #70ba9c18 0) 0 0 / 27px 27px;
  mask-image: linear-gradient(95deg, transparent, #000 45%, #000 75%, transparent);
}
.hero::after {
  content: "";
  position: absolute;
  pointer-events: none;
  z-index: -1;
  inset: 0 .85rem auto auto;
  width: 8rem;
  height: .23rem;
  background: var(--gold);
  border-radius: 0 0 1rem 1rem;
}
.hero-copy { display: grid; align-content: center; justify-items: start; gap: 1.05rem; }
.hero-copy h1 {
  color: var(--type);
  font-size: clamp(3.15rem, 7.2vw, 7.7rem);
  font-weight: 950;
  line-height: .85;
  letter-spacing: -.075em;
  text-wrap: balance;
}
.hero-copy h1 :is(em, span, b, strong) { color: var(--mint); font-style: normal; }
.hero-copy .tagline, .hero-copy .lede, .hero-copy h2 {
  color: var(--gold);
  font-size: clamp(1.08rem, 1.85vw, 1.55rem);
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: -.025em;
}
.hero-copy p:not(.eyebrow, .tagline, .lede) { max-width: 40ch; color: var(--subtle); }
.hero-copy .hero-actions, .hero-copy .actions { margin-top: .25rem; }
.hero-art {
  position: relative;
  display: grid;
  align-content: center;
  align-self: stretch;
  min-height: 20rem;
}
.hero-art canvas, #hero-canvas { width: 100%; height: auto; object-fit: contain; }
.hero-art :is(.art-label, .map-caption, .caption, figcaption) {
  margin: .8rem 0 0;
  color: var(--faint);
  font-size: .73rem;
  font-weight: 760;
  letter-spacing: .1em;
  text-transform: uppercase;
}
#top-three, #podium {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .75rem;
  margin-block: .8rem 1rem;
}
#top-three > p:only-child, #podium > p:only-child { grid-column: 1 / -1; }
.podium-card {
  position: relative;
  display: grid;
  gap: .36rem;
  padding: 1rem;
  overflow: hidden;
  border: 1px solid var(--line-light);
  border-radius: .8rem;
  background: linear-gradient(140deg, #1d332e, var(--surface) 75%);
}
.podium-card:first-child { border-color: #9b7a48; background: linear-gradient(140deg, #393125 0, #182626 65%); }
.podium-card :is(b, strong) { color: var(--gold); font-variant-numeric: tabular-nums; }

.panel, .entry-card, .result-card {
  padding: clamp(.86rem, 2.4vw, 1.55rem);
  border: 1px solid var(--line);
  border-radius: .9rem;
  background: linear-gradient(165deg, #172628, var(--surface) 33%);
  box-shadow: 0 9px 24px #0002;
}
.panel > :is(header, .section-head, .row-heading) { margin-bottom: .9rem; }
.panel > h2 { margin-bottom: .65rem; }
.panel + .panel { margin-top: .85rem; }
#help .panel, #about .panel { max-width: 65rem; }
#help :is(p, li), #about :is(p, li) { color: var(--subtle); }
:where(#help, #about) :is(p, ul) + :is(p, ul, h2, h3) { margin-top: .85rem; }
#challenge-banner { padding: .8rem 1rem; border-radius: .62rem; border: 1px solid #9b7a48; background: #382c1d; color: #f5dab0; }

#entry-dialog {
  max-width: min(32rem, calc(100vw - 1.2rem));
  max-height: calc(100vh - 1.2rem);
  max-height: calc(100dvh - 1.2rem);
  overflow-y: auto;
  padding: clamp(1rem, 4vw, 1.8rem);
  border: 1px solid #537468;
  border-radius: 1.1rem;
  background: #132421;
  color: var(--type);
  box-shadow: 0 18px 90px #000a;
  scrollbar-gutter: stable;
}
#entry-dialog::backdrop { background: #040a0ce2; backdrop-filter: blur(8px); }
#entry-dialog h2 { margin-block: .35rem .65rem; }
#entry-form { display: grid; gap: .85rem; }
#entry-form label, .board-controls label {
  display: grid;
  min-width: 0;
  gap: .25rem;
  color: var(--subtle);
  font-size: .84rem;
  font-weight: 720;
}
#entry-dialog small { color: var(--subtle); }
:where(input:not([type="checkbox"], [type="radio"]), select) {
  width: 100%;
  min-height: 2.75rem;
  padding: .55rem .68rem;
  border: 1px solid #46615d;
  border-radius: .5rem;
  background: #0e1b1e;
  color: var(--type);
}
input::placeholder { color: #97a9a2; opacity: 1; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--mint); }

#shift { margin-top: 1rem; }
#hud {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(10rem, 100%), 1fr));
  gap: .56rem;
  margin-bottom: .82rem;
}
.hud-metric, .result-metric {
  display: grid;
  gap: .13rem;
  align-content: start;
  min-width: 0;
  padding: .68rem .8rem;
  border: 1px solid var(--line);
  border-radius: .65rem;
  background: #132225;
}
.hud-metric :is(strong, output, b), .result-metric :is(strong, output, b) {
  max-width: 100%;
  color: var(--type);
  font-size: clamp(1.16rem, 2.35vw, 1.6rem);
  font-weight: 860;
  font-variant-numeric: tabular-nums;
  line-height: 1.13;
  overflow-wrap: anywhere;
}
.hud-metric :is(small, span, label), .result-metric :is(small, span, label) { color: var(--subtle); font-size: .76rem; line-height: 1.25; }
.hud-metric :is(.eyebrow, .kicker), .result-metric :is(.eyebrow, .kicker) { color: var(--gold); }
.hud-metric :is(.eyebrow, .kicker)::before, .result-metric :is(.eyebrow, .kicker)::before { display: none; }
.hud-metric.negative :is(strong, output), .negative, .loss { color: var(--loss); }
.positive { color: var(--mint); }
.hud-metric.highlight, .hud-metric[data-kind="score"] { border-color: #537e6b; background: #17352e; }

.shift-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(19rem, 1fr);
  align-items: start;
  column-gap: .82rem;
  row-gap: .75rem;
}
.shift-grid > * { min-width: 0; }
.shift-grid .panel { padding: .86rem; }
.map-stage {
  position: relative;
  overflow: hidden;
  min-width: 0;
  border: 1px solid var(--line-light);
  border-radius: .82rem;
  background: #0d1c21;
}
#retail-canvas { display: block; width: 100%; height: auto; }
.map-stage canvas { touch-action: none; }
.map-stage :is(.map-toolbar, .map-controls) {
  position: absolute;
  z-index: 2;
  inset: auto .7rem .7rem;
  display: flex;
  justify-content: flex-end;
  gap: .4rem;
  pointer-events: none;
}
.map-stage :is(.map-toolbar, .map-controls) > * { pointer-events: auto; }
.map-stage button { min-height: 2.75rem; min-width: 2.75rem; }
#incident-list, #decision-options, #staff-list, #investment-list { list-style: none; margin: 0; padding: 0; }
#incident-list { display: grid; gap: .45rem; }
#incident-list > li { margin: 0; }
.incident {
  width: 100%;
  min-height: 2.9rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  column-gap: .65rem;
  padding: .55rem .68rem;
  border: 1px solid #43605a;
  border-left: 3px solid #527e6e;
  border-radius: .47rem;
  background: #192d2d;
  color: var(--type);
  text-align: start;
}
.incident :is(small, .subtext) { color: var(--subtle); }
.incident:hover, .incident[aria-pressed="true"], .incident[aria-selected="true"], .incident.selected, .incident.active {
  border-color: var(--mint);
  background: #224237;
}
.incident :is(.time, time, .timer) { color: var(--gold); font-variant-numeric: tabular-nums; }
.incident.urgent, .incident[data-urgency="high"] { border-left-color: var(--gold); }
.incident.critical, .incident[data-urgency="critical"] { border-left-color: var(--loss); }
#decision-panel { display: grid; gap: .65rem; }
#decision-panel :is(h2, h3) { margin: 0; }
#decision-options { display: grid; gap: .45rem; }
.choice {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: .12rem .55rem;
  width: 100%;
  min-height: 2.85rem;
  padding: .55rem .7rem;
  border: 1px solid #43605a;
  border-radius: .52rem;
  background: #192c2d;
  color: var(--type);
  font-size: .87rem;
  text-align: start;
}
.choice:not(:disabled):hover, .choice:not(:disabled):focus-visible { border-color: var(--mint); background: #234539; }
.choice[disabled] { opacity: .62; }
.choice :is(small, .choice-meta, .description) { color: var(--subtle); }
.choice :is(kbd, .choice-key) {
  color: var(--gold);
  border: 1px solid #76633f;
  border-radius: .3rem;
  background: #2c2c24;
  min-inline-size: 1.48rem;
  padding: .1rem .25rem;
  font-family: var(--mono);
  text-align: center;
}
#staff-list, #investment-list { display: grid; gap: .45rem; }
#staff-list > *, #investment-list > * { margin: 0; }
#staff-list :is(li, .staff), #investment-list :is(li, .investment) {
  display: flex;
  align-items: center;
  gap: .45rem .65rem;
  flex-wrap: wrap;
  justify-content: space-between;
  padding: .5rem .62rem;
  border: 1px solid var(--line);
  border-radius: .42rem;
  background: #142527;
}
#staff-list :is(small, .status), #investment-list :is(small, .status) { color: var(--subtle); }
#staff-list [data-state="available"] { color: var(--mint); }
#staff-list [data-state="busy"] { color: var(--gold); }

.board-controls {
  display: flex;
  flex-wrap: wrap;
  gap: .65rem;
  align-items: end;
  margin-block: .95rem;
}
.board-controls > * { min-width: 0; }
.board-controls label { flex: 1 1 10rem; }
.table-wrap, .table-scroll { overflow: auto; border: 1px solid var(--line); border-radius: .8rem; }
table { width: 100%; border-collapse: collapse; font-size: .92rem; font-variant-numeric: tabular-nums; }
th, td { border-bottom: 1px solid var(--line); padding: .7rem .72rem; text-align: start; }
th { position: relative; background: #18332e; color: var(--mint); font-size: .72rem; letter-spacing: .07em; text-transform: uppercase; }
tbody tr:nth-child(odd) { background: #152325; }
tbody tr:hover { background: #1b322d; }
td { overflow-wrap: anywhere; }
tbody tr:last-child td { border-bottom: none; }
table time { white-space: nowrap; }

#results { position: relative; }
#results :is(.results-hero, .score-hero, .result-hero) {
  display: grid;
  gap: .65rem;
  padding: clamp(1.2rem, 5vw, 3.2rem);
  background: linear-gradient(155deg, #1d4637 0, #1e322b 52%, #172024);
  border: 1px solid #5b8e76;
  border-radius: .95rem;
}
#results :is(.score-value, .result-score, #result-score) {
  color: var(--mint);
  font-size: clamp(2.5rem, 8vw, 6.5rem);
  line-height: .93;
  font-weight: 950;
  letter-spacing: -.07em;
  font-variant-numeric: tabular-nums;
}
.result-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(10rem, 100%), 1fr));
  gap: .55rem;
  margin-block: .9rem;
}

@media (max-width: 900px) {
  .hero { padding: 1.35rem; gap: .9rem; min-height: auto; }
  .hero-art { min-height: 15rem; }
  .shift-grid { grid-template-columns: minmax(0, 1.15fr) minmax(17rem, .85fr); }
}
@media (max-width: 700px) {
  .mast { align-items: flex-start; flex-direction: column; gap: .1rem; padding-block: .43rem .55rem; }
  .nav { width: 100%; justify-content: space-between; }
  .nav :is(button, a) { padding-inline: .45rem; font-size: .74rem; }
  main > :where(section, .screen) { margin-block: 1.15rem; }
  .hero { grid-template-columns: 1fr; padding: 1.2rem; gap: .85rem; border-radius: .95rem; }
  .hero::before { inset: 35% 0 0; mask-image: linear-gradient(#0000, #000 60%); }
  .hero-copy { gap: .85rem; }
  .hero-copy h1 { font-size: clamp(3.05rem, 12vw, 5.75rem); text-wrap: initial; }
  .hero-art { min-height: auto; max-width: 36rem; width: 100%; justify-self: center; }
  #top-three, #podium { grid-template-columns: 1fr; gap: .45rem; }
  #hud { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .35rem; margin-bottom: .52rem; }
  .hud-metric { padding: .5rem .4rem; }
  .hud-metric :is(small, span, label) { font-size: .68rem; }
  .hud-metric :is(strong, output, b) { font-size: 1.14rem; }
  .shift-grid { grid-template-columns: minmax(0, 1fr); gap: .65rem; }
  #entry-dialog { margin: auto; }
  footer { margin-top: 2rem; }
}
@media (max-width: 379px) {
  .hero-actions > .btn, .hero .actions > .btn { width: 100%; }
  #hud { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nav { justify-content: flex-start; gap: 0; }
  .nav :is(button, a) { padding-inline: .38rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; scroll-behavior: auto !important; }
}
[data-reduced-motion="true"] *, [data-reduced-motion="true"] *::before, [data-reduced-motion="true"] *::after {
  transition-duration: .01ms !important; animation-duration: .01ms !important; scroll-behavior: auto !important;
}

/* Shared markup detail: shift board, map controls, privacy form, and result reveal. */
.skip { position: absolute; inset: .5rem auto auto .5rem; z-index: 100; transform: translateY(-145%); padding: .6rem .7rem; background: var(--surface); color: var(--mint); }
.skip:focus { transform: none; }
.nav [aria-current="true"] { color: var(--mint); border-color: #3c6556; background: #203c34; }
.hero .eyebrow > i { display: none; }
.hero-meta { display: flex; flex-wrap: wrap; gap: .32rem .6rem; color: var(--faint); font-size: .66rem; font-weight: 760; letter-spacing: .06em; }
.hero-meta span:not(:last-child)::after { content: " /"; color: var(--gold); margin-left: .22rem; }
.hero-copy .status:empty, .status:empty, #result-versus:empty { display: none; }
.status { color: var(--subtle); font-size: .9rem; }
.status.error, .danger { color: var(--loss) !important; }
.art-head, .art-foot, .panel-heading {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem .9rem;
  align-items: center;
  justify-content: space-between;
}
.hero-art :is(.art-head, .art-foot) { padding: .45rem .55rem; border-bottom: 1px solid #365650; }
.art-foot {
  border-top: 1px solid #365650;
  border-bottom: 0;
  color: var(--faint);
  font-size: .77rem;
  font-variant-numeric: tabular-nums;
}
.art-foot > span:first-child { letter-spacing: .1em; font-size: .64rem; font-weight: 820; color: var(--mint); }
.live-pill {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  padding: .26rem .48rem;
  color: var(--mint);
  background: #16372c;
  border: 1px solid #477665;
  border-radius: 99px;
  font-size: .64rem;
  font-weight: 800;
  letter-spacing: .08em;
}
.landing-board {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: minmax(12rem, .78fr) minmax(0, 1fr) auto;
  align-items: center;
  gap: 1rem;
}
.landing-board :is(h2, p) { margin-top: .45rem; }
.landing-board h2 { font-size: clamp(1.4rem, 3.5vw, 2.25rem); }
.landing-board p { color: var(--subtle); font-size: .88rem; }
#top-three { margin: 0; }
.mini-ranks > :not(p) { min-width: 0; font-size: .86rem; }
.challenge-banner { margin-bottom: .85rem; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .6rem 1.2rem; }
.challenge-banner h2 { margin-block: .35rem; font-size: clamp(1.3rem, 4vw, 2rem); }

#entry-dialog { width: min(32rem, calc(100vw - 1.2rem)); }
#entry-form .panel-heading { margin-bottom: .1rem; }
#entry-form #close-entry { min-width: 2.75rem; padding-inline: .46rem; font-size: 1.4rem; }
#entry-form > label { grid-template-columns: max-content 1fr; align-items: baseline; }
#entry-form > label > input { grid-column: 1 / -1; }
#entry-form > label > small { font-weight: 500; }
#random-name { justify-self: start; }
#entry-budget, #entry-note { font-size: .82rem; line-height: 1.38; color: var(--subtle); }
details {
  border: 1px solid var(--line);
  border-radius: .62rem;
  background: #112022;
}
summary {
  min-height: 2.75rem;
  padding: .55rem .65rem;
  cursor: pointer;
  color: var(--mint);
  font-size: .89rem;
  font-weight: 750;
}
details[open] > summary { margin-bottom: .25rem; border-bottom: 1px solid var(--line); }
details[open] > :not(summary) { margin: .55rem; }
.investment-list { display: grid; gap: .45rem; }
#entry-form .investment {
  display: grid;
  grid-template-columns: 1.3rem minmax(0, 1fr);
  align-items: start;
  padding: .52rem;
  border: 1px solid var(--line);
  border-radius: .4rem;
  background: #182a28;
  cursor: pointer;
}
.investment input[type="checkbox"] { inline-size: 1.15rem; block-size: 1.15rem; margin: .09rem 0; }
.investment :is(strong, small), .staff-member :is(span, small) { display: block; line-height: 1.23; }
.investment small, .staff-member small { margin-top: .18rem; }

.shift-head {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem 1rem;
  justify-content: space-between;
  align-items: end;
  padding: .35rem 0 .78rem;
}
.shift-head h1, .page-intro h1 {
  font-weight: 900;
  letter-spacing: -.055em;
  font-size: clamp(1.85rem, 5vw, 4rem);
}
.shift-head h1 { margin-block: .25rem; }
.hud-metric > span { text-transform: uppercase; font-weight: 700; letter-spacing: .055em; }
.hud-metric.time-cell { border-color: #877144; background: #2e2920; }
#shift-clock { color: #ffe1a2; font-family: var(--mono); }
#net { color: var(--mint); }
.shift-grid {
  grid-template-areas:
    "map incidents"
    "ops incidents";
}
.shift-grid > .panel { margin: 0; }
.map-stage { grid-area: map; }
.map-stage .art-head { margin-bottom: .5rem; }
.map-actions { display: flex; gap: .35rem; }
.map-actions .btn { padding-inline: .55rem; font-size: .75rem; }
#retail-canvas { border-radius: .55rem; background: #0a1a1d; }
.ops-panel { grid-area: ops; }
#staff-list { grid-template-columns: repeat(auto-fit, minmax(min(11rem, 100%), 1fr)); margin-bottom: .7rem; }
.staff-member { padding: .5rem; border: 1px solid var(--line); border-radius: .38rem; background: #152628; }
.staff-member > span { font-weight: 780; font-size: .87rem; }
.incident-station { grid-area: incidents; }
.incident-station .panel-heading, .ops-panel .panel-heading { margin-bottom: .6rem; }
.incident-station h2, .ops-panel h2 { font-size: clamp(1.3rem, 3.2vw, 2rem); margin-top: .18rem; }
#queue-total { border: 1px solid #6d6344; border-radius: 999px; padding: .2rem .5rem; color: var(--gold); font-size: .75rem; font-weight: 760; }
.incident > span:first-child > :is(strong, small) { display: block; }
.deadline {
  min-inline-size: 3.15rem;
  padding: .23rem .26rem;
  border-radius: .25rem;
  background: #1a2726;
  color: var(--gold);
  font: 700 .76rem/1.1 var(--mono);
  text-align: center;
}
.incident.urgent .deadline { background: #482821; color: #ffc8b0; }
.decision-panel {
  margin-top: .88rem;
  padding-top: .88rem;
  border-top: 1px solid var(--line-light);
}
#decision-copy { color: var(--subtle); font-size: .91rem; }
.choice { grid-template-columns: 1.65rem minmax(0, 1fr); }
.choice > b {
  display: inline-grid;
  width: 1.48rem;
  height: 1.48rem;
  place-items: center;
  border: 1px solid #807047;
  border-radius: .3rem;
  background: #333026;
  color: var(--gold);
  font: 800 .82rem/1.05 var(--mono);
}
.choice span > :is(strong, small) { display: block; }
.choice span > small { margin-top: .13rem; }
.choice-note { grid-column: 2; }
.choice:disabled { opacity: .77; }
.empty {
  margin: 0;
  padding: .52rem .55rem;
  border: 1px dashed var(--line-light);
  border-radius: .37rem;
  color: var(--subtle);
  font-size: .85rem;
}
.feed {
  display: grid;
  gap: .28rem;
  max-height: 8rem;
  overflow: auto;
  margin: .6rem 0 0;
  padding: 0;
  list-style: none;
}
.feed li {
  min-width: 0;
  padding: .35rem .49rem;
  margin-top: 0;
  border-left: 2px solid #659081;
  border-radius: 0 .28rem .28rem 0;
  background: #172b2b;
  color: var(--subtle);
  font-size: .81rem;
}
.feed:empty { display: none; }

.page-intro {
  display: grid;
  gap: .65rem;
  max-width: 72rem;
  margin-bottom: 1.25rem;
}
.page-intro p { color: var(--subtle); }
#results .page-intro {
  max-width: none;
  padding: clamp(1rem, 4vw, 2.8rem);
  border: 1px solid #527d68;
  border-radius: 1rem;
  background: linear-gradient(135deg, #1a4437, #172b28 55%, #101e21);
}
#result-headline {
  color: var(--mint);
  font-size: clamp(1.1rem, 4vw, 2.05rem);
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.02em;
}
#result-versus { color: var(--gold); font-weight: 800; }
.result-panel { margin-bottom: .75rem; }
.result-panel :is(.actions, h2:not(:first-child)) { margin-top: .75rem; }
.result-panel .status { margin-top: .52rem; }
.table-shell { padding: 0; overflow: auto; }
.table-shell table { min-width: 44rem; }
.table-shell caption {
  padding: .55rem .72rem;
  color: var(--subtle);
  font-size: .82rem;
  font-weight: 740;
  text-align: start;
}
.board-pages { margin-top: .8rem; }
.help-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(16rem, 100%), 1fr));
  gap: .7rem;
  margin-bottom: .85rem;
}
.help-grid .panel { margin: 0; }
.help-grid h2, .result-panel h2 { font-size: clamp(1.26rem, 3vw, 1.8rem); }
.foot > span:first-child { color: var(--gold); font-size: .75rem; font-weight: 820; letter-spacing: .1em; }

@media (max-width: 940px) {
  .landing-board { grid-template-columns: minmax(0, 1fr) auto; }
  #top-three { grid-column: 1 / -1; order: 3; }
}
@media (max-width: 700px) {
  .landing-board { gap: .7rem; }
  .landing-board .btn { justify-self: start; }
  #top-three { order: initial; }
  .shift-grid { grid-template-areas: "incidents" "map" "ops"; }
  #hud { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .shift-grid .panel { padding: .7rem; }
  .shift-head { padding-bottom: .55rem; }
  .hud-metric { padding: .38rem .32rem; }
  .hud-metric :is(small, span, label) { line-height: 1.16; font-size: .65rem; }
  .hud-metric > strong { font-size: 1rem; }
  .hud-metric .time-cell { grid-column: 1; }
  .map-stage canvas { touch-action: none; }
}
@media (max-width: 430px) {
  .landing-board { grid-template-columns: minmax(0, 1fr); }
  .hud-metric :is(small, span, label) { font-size: .57rem; }
  .hud-metric > strong { font-size: .98rem; }
  .shift-head h1 { font-size: 1.54rem; }
  .shift-head .actions { gap: .35rem; }
  .shift-head .btn { padding-inline: .55rem; }
}
.mini-rank {
  display: grid;
  gap: .15rem;
  align-content: center;
  padding: .48rem .55rem;
  border: 1px solid var(--line);
  border-radius: .45rem;
  background: #152728;
}
.mini-rank > b { color: var(--gold); font: 800 .78rem/1.25 var(--mono); }
.mini-rank > strong { font-size: .83rem; }
.mini-rank > small { color: var(--mint); font-variant-numeric: tabular-nums; }
.podium-card h2 { font-size: clamp(1.34rem, 3vw, 2rem); }
.podium-card p { color: var(--mint); font-size: 1.45rem; font-weight: 860; font-variant-numeric: tabular-nums; }
.podium-card small { color: var(--subtle); }
.result-metric.money {
  grid-column: 1 / -1;
  min-height: 8rem;
  display: flex;
  align-items: start;
  justify-content: center;
  flex-direction: column;
  padding: .95rem clamp(.9rem, 4vw, 2rem);
  background: linear-gradient(130deg, #183b32, #152a27 72%);
  border-color: #547c69;
}
.result-metric.money > span { color: var(--gold); font-weight: 800; text-transform: uppercase; letter-spacing: .1em; }
.result-metric.money > strong { color: var(--mint); font-weight: 950; font-size: clamp(2.6rem, 8vw, 5.3rem); letter-spacing: -.067em; }
.table-shell tr.is-mine > td:first-child { border-left: 3px solid var(--mint); }
#hero-canvas:not(.rr-store-canvas) {
  background: url("./assets/brand-floor.svg") center / 95% auto no-repeat;
}
#play-ranked > [aria-hidden="true"] { display: inline-grid; width: .86rem; height: .86rem; place-items: center; font-size: 0; }
#play-ranked > [aria-hidden="true"]::after {
  content: "";
  display: block;
  width: .52rem;
  height: .52rem;
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
}
@media (max-width: 700px) {
  #hud {
    position: sticky;
    top: 0;
    z-index: 5;
    padding-block: .27rem;
    background: #0d181bf7;
  }
}
@media (max-width: 430px) {
  .hud-metric > span { letter-spacing: 0; font-size: .55rem; }
}
/* Keep layout stable while the renderer updates canvas pixel dimensions or the
   live stage is initialized behind a hidden screen. */
#hero-canvas { aspect-ratio: 65 / 48; }
#retail-canvas { aspect-ratio: 5 / 3; }
#net.negative, #net.loss, .result-metric.money.negative > strong, .result-metric.money.loss > strong { color: var(--loss); }
#play-ranked > [aria-hidden="true"] { position: relative; }
#play-ranked > [aria-hidden="true"]::before {
  content: "";
  position: absolute;
  left: 46%;
  top: 53%;
  width: .56rem;
  height: 1.5px;
  background: currentColor;
  transform: translate(-50%, -50%) rotate(-45deg);
}
.result-review{padding:.35rem 0}
.result-review strong{color:var(--gold,#efcc82)}
.result-review p{margin:.25rem 0;color:var(--muted,#b7c9c1)}
.result-badges{display:flex;flex-wrap:wrap;gap:.45rem;list-style:none;padding:0}
.result-badge{border:1px solid #67877e;background:#213a35;color:#e5f6e6;border-radius:2rem;padding:.3rem .7rem;font-size:.82rem}
.decision-signal{border-left:2px solid #7db1a0;padding:.4rem .55rem;background:#203b3590;color:#d5eee4;font-size:.84rem;margin:.4rem 0}

/* Floor-first management UI: the scene stays in view while working the queue. */
#purchase-confirm { color:var(--text,#edf9f0); background:#142424; border:1px solid #638778; border-radius:.9rem; padding:1.1rem; width:min(30rem,calc(100vw - 1.2rem)); margin:auto; }
#purchase-confirm::backdrop { background:#050c0bd6; }
#purchase-form { display:grid; gap:.8rem; }
#purchase-balance { color:var(--mint); font-weight:700; }
#investment-list .investment { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:.6rem; align-items:center; border:1px solid #395753; padding:.52rem; border-radius:.55rem; background:#132725; }
#investment-list .purchase { min-height:2.75rem; white-space:nowrap; padding-inline:.46rem; font-size:.76rem; }
.purchase-stock,.ops-note { color:var(--subtle,#bbd0c4); font-size:.78rem; }
.ops-cash { color:var(--mint); font-weight:750; margin:.6rem 0 .2rem; }
.ops-note { margin:.2rem 0 .65rem; }
#budget-start { display:block; color:var(--subtle); letter-spacing:0; font-size:.6rem; }
.decision-phase { color:#ecc486; font-size:.65rem; font-weight:800; letter-spacing:.07em; margin:0 0 .26rem; }
.decision-phase[data-state=assigned] { color:var(--mint); }
.foot > span:first-child { color:var(--subtle); font-weight:650; letter-spacing:.025em; }
.foot > .secondary-credit { color:#96a8a1; font-size:.68rem; letter-spacing:.14em; }
@media (min-width:701px) {
 .map-stage { position:sticky; top:.6rem; z-index:2; }
}
@media (max-width:700px) {
 #shift .shift-grid { grid-template-areas:"map" "incidents" "ops"; }
 #shift .map-stage { position:sticky; top:var(--rr-hud-bottom,7rem); z-index:4; padding:.28rem .42rem; box-shadow:0 .45rem 1rem #05110b99; }
 #shift .map-stage .art-head { margin:0; padding:0 0 .16rem; gap:.15rem; }
 #shift .map-stage .art-head .eyebrow { font-size:.6rem; }
 #shift .map-stage .art-head .btn { font-size:.62rem; min-height:1.72rem; padding-inline:.36rem; }
 #shift #retail-canvas { width:100%; height:clamp(104px,21svh,168px); aspect-ratio:auto; }
 #shift #feed { display:none; }
 #shift .incident-station { scroll-margin-top:17rem; }
 #shift .shift-head .actions { flex-wrap:wrap; }
 #shift .shift-head #ops-shortcut { font-size:.7rem; }
}
@media (min-width:1024px) { #shift #hud { grid-template-columns:repeat(8,minmax(0,1fr)); } }
@media (min-width:701px) and (max-width:1023px) { #shift #hud { grid-template-columns:repeat(4,minmax(0,1fr)); } }

/* A shift is a fixed-height workstation. Only the desks and activity lists scroll. */
body.shift-active{overflow:hidden;min-height:0}
body.shift-active > :is(.mast,.foot){display:none}
body.shift-active #main{width:100%;height:100vh;height:100dvh;max-height:100dvh;padding:.45rem .55rem;margin:0;overflow:hidden}
body.shift-active #shift{display:grid;grid-template-rows:auto auto auto minmax(0,1fr);gap:.42rem;height:100%;min-height:0;margin:0}
#shift .shift-head{padding:0;gap:.25rem .7rem;align-items:center;min-width:0}
#shift .shift-label{display:flex;flex-wrap:wrap;align-items:center;gap:.24rem .55rem}
#shift .shift-head h1{font-size:1.23rem;letter-spacing:-.04em;margin:0}
#shift .shift-head .eyebrow{font-size:.6rem}
#shift .shift-head .actions{gap:.32rem}
#shift .shift-head .btn{min-height:2rem;font-size:.72rem;padding:.18rem .6rem}
#shift .shift-head #shift-status{margin:0;font-size:.72rem;max-width:46ch;line-height:1.2;text-overflow:ellipsis;overflow:hidden;white-space:nowrap}
#shift #hud{position:static;z-index:auto;margin:0;padding:0;gap:.29rem;background:none;grid-template-columns:repeat(8,minmax(0,1fr))}
#shift .hud-metric{gap:.08rem;padding:.34rem .47rem;border-radius:.5rem}
#shift .hud-metric > span,#shift .hud-metric > small{font-size:.63rem;line-height:1.1}
#shift .hud-metric > strong{font-size:1.16rem;line-height:1.06}
#shift #shift-workbench{display:grid;height:100%;min-height:0;align-items:stretch;grid-template-columns:minmax(0,1.45fr) minmax(18rem,1fr);grid-template-rows:auto minmax(0,1fr);grid-template-areas:"map switch" "map incidents";gap:.37rem .46rem}
#shift #shift-workbench[data-desk=ops]{grid-template-areas:"map switch" "map ops"}
#shift .desk-switch{grid-area:switch;display:flex;align-items:center;gap:.35rem}
#shift .desk-switch .btn{min-height:1.9rem;padding:.2rem .6rem;font-size:.74rem}
#shift .desk-switch .btn[aria-pressed=true]{color:var(--mint);border-color:#84c8aa;background:#204236}
#shift #shift-workbench[data-desk=incidents] #team-desk,#shift #shift-workbench[data-desk=ops] #incident-desk{display:none}
#shift .shift-grid > .panel{position:relative;top:auto;z-index:auto;min-width:0;min-height:0;max-height:100%;height:100%;padding:.49rem;overflow:hidden;box-shadow:none}
#shift .map-stage{display:grid;grid-template-rows:auto minmax(0,1fr) auto;gap:.3rem}
#shift .map-stage .art-head{margin:0;padding:0;gap:.25rem}
#shift .map-stage .art-head .eyebrow{font-size:.62rem;white-space:nowrap}
#shift .map-stage .btn{font-size:.66rem;min-height:1.8rem;min-width:1.85rem;padding:.1rem .45rem}
#shift #retail-canvas{width:100%;height:100%;min-height:0;aspect-ratio:auto;align-self:stretch}
#shift .feed{max-height:3.15rem;margin:0;font-size:.72rem;overscroll-behavior:contain}
#shift .feed li{font-size:.72rem;padding:.18rem .4rem}
#shift .incident-station{display:grid;grid-template-rows:auto auto minmax(0,1fr);gap:.3rem}
#shift .ops-panel{display:grid;grid-template-rows:auto minmax(0,1fr);gap:.3rem}
#shift .panel-heading{margin:0 0 .15rem}
#shift .panel-heading .eyebrow{display:none}
#shift .panel-heading h2{font-size:1.08rem;margin:0}
#shift .desk-body{min-height:0;overflow-y:auto;overscroll-behavior:contain;scrollbar-gutter:stable;padding:.18rem .28rem .22rem .06rem}
#shift .desk-body:focus-visible{outline-offset:-2px}
#shift #incident-list{max-height:min(24vh,7.8rem);overflow-y:auto;overscroll-behavior:contain;scrollbar-gutter:stable;padding:.08rem .25rem .09rem .04rem;gap:.25rem}
#shift #incident-list .incident{min-height:2.1rem;padding:.25rem .38rem;font-size:.77rem;line-height:1.22}
#shift #incident-list .incident small{font-size:.66rem}
#shift #decision-panel{margin:0;padding-top:.35rem;gap:.29rem}
#shift #decision-panel > .eyebrow{font-size:.62rem}
#shift #decision-title{font-size:1.04rem}
#shift #decision-copy{font-size:.83rem;line-height:1.32}
#shift .decision-signal{margin:.12rem 0;padding:.29rem .36rem;font-size:.77rem;line-height:1.32}
#shift #decision-options{gap:.3rem}
#shift .choice{grid-template-columns:1.5rem minmax(0,1fr) auto;min-height:2.55rem;padding:.32rem .42rem;font-size:.8rem;align-items:center}
#shift .choice .choice-cost{justify-self:end;white-space:nowrap;color:var(--gold);border:1px solid #766240;background:#303025;border-radius:.3rem;font:800 .81rem/1.2 var(--mono);padding:.21rem .3rem}
#shift .choice-note{grid-column:2/-1}
#shift .staff-member{padding:.32rem;font-size:.75rem}
#shift #staff-list{gap:.26rem;grid-template-columns:repeat(2,minmax(0,1fr))}
.cash-feedback{display:grid;grid-template-columns:1fr 1fr;gap:.3rem;min-width:0}
.cash-event{display:grid;grid-template-columns:auto auto minmax(0,1fr);gap:.15rem .5rem;align-items:center;min-width:0;background:#162a2b;border:1px solid #395852;border-radius:.48rem;padding:.24rem .45rem;font-size:.68rem;line-height:1.14}
.cash-event > span{font-weight:800;letter-spacing:.08em;color:var(--subtle)}
.cash-event strong{white-space:nowrap;font:900 1.07rem/1.1 var(--mono);color:var(--type)}
.cash-event small{color:var(--subtle);font-size:.68rem;line-height:1.15;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.cash-event[data-tone=spend] strong{color:var(--gold)}
.cash-event[data-tone=gain]{border-color:#4e947c;background:#15372f}
.cash-event[data-tone=gain] strong{color:var(--mint)}
.cash-event[data-tone=loss]{border-color:#a15d51;background:#382524}
.cash-event[data-tone=loss] strong{color:var(--loss)}
@media(min-width:1320px){
 #shift #shift-workbench,#shift #shift-workbench[data-desk=ops]{grid-template-columns:minmax(0,1.55fr) minmax(22rem,1fr) minmax(12.3rem,.55fr);grid-template-rows:minmax(0,1fr);grid-template-areas:"map incidents ops"}
 #shift .desk-switch{display:none}
 #shift #shift-workbench[data-desk=incidents] #team-desk,#shift #shift-workbench[data-desk=ops] #incident-desk{display:grid}
}
@media(max-width:700px){
 body.shift-active #main{padding:.32rem .35rem;padding-bottom:max(.32rem,env(safe-area-inset-bottom))}
 body.shift-active #shift{gap:.26rem}
 #shift .shift-label h1,#shift .shift-label #shift-status{display:none}
 #shift .shift-head .btn{font-size:.66rem;min-height:1.82rem;padding:.12rem .4rem}
 #shift .shift-head #ops-shortcut{display:none}
 #shift #hud{grid-template-columns:none;grid-auto-flow:column;grid-auto-columns:calc((100% - .9rem)/4);overflow-x:auto;scrollbar-width:thin;overscroll-behavior-x:contain}
 #shift .hud-metric:not(.time-cell):not(.hud-primary){order:1}
 #shift .hud-metric{padding:.29rem .35rem}
 #shift .hud-metric > strong{font-size:1.0rem}
 #shift .hud-metric > span,#shift .hud-metric > small{font-size:.57rem}
 #shift #shift-workbench,#shift #shift-workbench[data-desk=ops]{grid-template-columns:minmax(0,1fr);grid-template-rows:clamp(104px,33%,215px) auto minmax(0,1fr);grid-template-areas:"map" "switch" "incidents";gap:.26rem}
 #shift #shift-workbench[data-desk=ops]{grid-template-areas:"map" "switch" "ops"}
 #shift .shift-grid > .panel{padding:.3rem}
 #shift .map-stage .art-head .eyebrow{font-size:.53rem}
 #shift .map-stage .btn{font-size:.58rem;min-height:1.56rem;min-width:1.44rem;padding:.1rem .25rem}
 #shift .map-actions{gap:.15rem}
 #shift #shift-workbench .desk-switch .btn{font-size:.7rem}
 #shift #incident-list{max-height:min(13vh,5.2rem)}
 #shift .cash-event{grid-template-columns:1fr auto;padding:.18rem .31rem;gap:.12rem .16rem;font-size:.57rem}
 #shift .cash-event small{grid-column:1/-1;font-size:.61rem}
 #shift .cash-event strong{font-size:.85rem}
}
@media(max-width:850px) and (orientation:landscape) and (max-height:470px){
 #shift #shift-workbench,#shift #shift-workbench[data-desk=ops]{grid-template-columns:minmax(0,1.1fr) minmax(0,1fr);grid-template-rows:auto minmax(0,1fr);grid-template-areas:"map switch" "map incidents"}
 #shift #shift-workbench[data-desk=ops]{grid-template-areas:"map switch" "map ops"}
}

.desk-head-actions{display:flex;align-items:center;gap:.28rem}
#shift #jump-options{font-size:.68rem;min-height:1.8rem;padding:.15rem .31rem}
.results-share-row{display:flex;align-items:center;flex-wrap:wrap;gap:.45rem .9rem;margin-top:.42rem}
#result-standing{color:var(--gold);font-weight:750}
@media(min-width:701px) and (min-height:720px){#shift #jump-options{display:none}}
@media(min-width:701px) and (max-height:719px){
 #shift .choice{min-height:2.22rem;line-height:1.12;padding-block:.25rem}
 #shift .choice span > small{line-height:1.14;margin-top:.12rem}
}
@media(max-width:700px){
 #shift .shift-label #shift-status.error{display:block;max-width:65vw;white-space:normal}
}
.result-commentary{border-left:2px solid #8ec7ab;padding:.35rem .64rem;margin:.05rem 0 .3rem;color:#d5eee2!important;font-size:clamp(.94rem,2.2vw,1.19rem);font-style:italic}

/* A first incoming alert must not change the map's scale. */
#shift .map-stage{grid-template-rows:auto minmax(0,1fr) 2.25rem}
#shift .feed{height:2.25rem;max-height:2.25rem}
#shift .feed:empty{display:block}
@media(max-width:700px){#shift .map-stage{grid-template-rows:auto minmax(0,1fr)}#shift .feed:empty{display:none}}
.delegate-controls{padding:.42rem .48rem;margin-top:.29rem;border:1px solid #7a7151;border-radius:.47rem;background:#282d26;display:grid;gap:.18rem}
.delegate-picker{display:flex;align-items:center;justify-content:space-between;gap:.38rem;color:#f1dfac;font-size:.8rem;line-height:1.13}
.delegate-picker label{display:grid;gap:.16rem;flex:1}
.delegate-picker select{max-width:100%;background:#172c2a;color:var(--type);border:1px solid #526e62;border-radius:.3rem;padding:.2rem .28rem}
.delegate-submit{min-height:2.15rem;border-color:#a4894e;background:#393423;color:#ffe4a1;font-size:.75rem;white-space:nowrap}
.delegate-detail{color:var(--subtle);font-size:.72rem;line-height:1.24}
#shift .specialist{border-color:#796b49;background:#2b3026}
.manager-capacity{color:#f2d18b!important;font-weight:800}

/* Workbench 5: one readable decision desk, a bigger floor, support on demand. */
body.shift-active #main { padding: .68rem clamp(.65rem, 1.2vw, 1.15rem); }
body.shift-active #shift { gap: .58rem; }
#shift .shift-head { justify-content: space-between; gap: .45rem 1rem; }
#shift .shift-label { align-items: baseline; gap: .25rem .55rem; }
#shift .shift-head #shift-title { font-size: clamp(1.25rem, 2vw, 1.7rem); color: #f3f8ee; letter-spacing: -.033em; }
#shift .shift-head .eyebrow { font-size: .72rem; color: #edcd8f; }
#shift .shift-head #shift-status { font-size: .83rem; display: block; max-width: 80ch; }
#shift .shift-head #shift-status:empty { display: none; }
#shift .shift-head .btn { min-height: 2.48rem; font-size: .88rem; padding: .4rem .65rem; }

#shift #hud { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .48rem; overflow: visible; }
#shift .hud-metric { border-radius: .72rem; padding: .52rem .7rem; gap: .13rem; background: #172a29; min-width: 0; }
#shift .hud-metric > span { font-size: .76rem; line-height: 1.22; color: #d3e1d9; letter-spacing: .035em; }
#shift .hud-metric > strong { font-size: clamp(1.32rem, 2vw, 2.13rem); line-height: 1.03; letter-spacing: -.045em; font-variant-numeric: tabular-nums; }
#shift .hud-metric > small { font-size: .72rem; line-height: 1.2; color: #d0dfd4; }
#shift .time-cell { background: #30291c; border-color: #846f44; }
#shift #shift-clock { font-size: clamp(1.6rem, 2.6vw, 2.47rem); letter-spacing: -.06em; }
#shift .net-cell { background: linear-gradient(120deg, #1c4838, #1b332b); border-color: #669181; }
#shift #net { color: #a7f3ce; font-size: clamp(1.66rem, 2.7vw, 2.55rem); }
#shift #net.negative { color: #ffc0b6; }
#shift .budget-cell[data-low="true"] { background: #3c2e20; border-color: #b58a51; }
#shift #budget-warning { color: #ffda9b; font-weight: 780; }
#shift #budget-start { font-size: .72rem; }
#shift .progress-cell progress { width: 100%; height: .38rem; margin-top: .15rem; appearance: none; border: none; border-radius: 1rem; overflow: hidden; background: #344843; color: #8cddba; }
#shift .progress-cell progress::-webkit-progress-bar { background: #344843; }
#shift .progress-cell progress::-webkit-progress-value { background: #8cddba; border-radius: 1rem; }
#shift .progress-cell progress::-moz-progress-bar { background: #8cddba; border-radius: 1rem; }

#shift .shift-utility { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; min-width: 0; }
#shift .shift-utility .btn { min-height: 2.48rem; padding: .38rem .75rem; font-size: .88rem; }
#shift .support-trigger { color: #10231e; background: #afe7c9; border-color: #c4efd7; box-shadow: 0 2px 0 #385947; }
#shift .support-trigger:not(:disabled):hover { color: #10231e; background: #d2f7e2; }
#shift #show-ops { display: none; }
#shift .density-trigger { margin-inline-start: auto; }
#shift .support-nudge { order: 4; margin-inline-start: .3rem; color: #fae1a6; font-size: .88rem; line-height: 1.24; }

#shift #shift-workbench[data-desk] { grid-template-columns: minmax(0, 1.47fr) minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); grid-template-areas: "map incidents"; gap: .58rem; }
#shift #shift-workbench[data-desk] #incident-desk { display: grid; }
#shift .shift-grid > .panel { padding: .68rem; border-color: #36514d; }
#shift .map-stage { grid-template-rows: auto minmax(0, 1fr); gap: .55rem; }
#shift .map-stage .art-head .eyebrow { font-size: .76rem; }
#shift .map-stage .btn { min-height: 2.15rem; min-width: 2.15rem; font-size: .82rem; padding: .25rem .52rem; }
#shift .map-stage .zoom-control { font-size: 1.11rem; }
#shift #retail-canvas { min-width: 0; min-height: 0; }
#shift .incident-station { grid-template-rows: auto auto minmax(0, 1fr); gap: .42rem; }
#shift .incident-station .panel-heading { min-height: 1.68rem; align-items: center; }
#shift .panel-heading h2 { font-size: 1.23rem; }
#shift #queue-total { color: #e9d59e; font-weight: 780; font-size: .84rem; font-variant-numeric: tabular-nums; }
#shift #jump-options { min-height: 2.1rem; font-size: .86rem; }
#shift .desk-body { padding: .16rem .28rem .34rem .1rem; }
#shift #incident-list { max-height: min(16vh, 6.3rem); padding: .09rem .29rem .12rem .11rem; gap: .3rem; }
#shift #incident-list .incident { min-height: 2.8rem; color: #f1f7ef; font-size: 1rem; padding: .32rem .52rem; gap: .42rem; }
#shift #incident-list .incident small { font-size: .82rem; color: #c7d9cf; }
#shift #incident-list .deadline { color: #ffe5a9; font-size: .97rem; min-width: 2.8rem; line-height: 1.3; }
#shift #incident-list .empty { font-size: .95rem; padding: .2rem .1rem; color: #c5d9d1; }
#shift #decision-panel { border-top: 1px solid #344a45; padding-top: .52rem; gap: .38rem; }
#shift #decision-panel > .eyebrow, #shift .decision-phase { font-size: .78rem; line-height: 1.32; }
#shift #decision-title { font-size: clamp(1.38rem, 1.8vw, 1.55rem); line-height: 1.13; color: #f8faf3; }
#shift #decision-copy, #shift .decision-risk, #shift .decision-signal { font-size: 1.02rem; line-height: 1.36; color: #e3eee5; }
#shift .decision-risk > strong, #shift .decision-signal > strong { color: #ffdda3; font-weight: 780; }
#shift .decision-signal { padding: .38rem .52rem; border-radius: 0 .35rem .35rem 0; background: #233b33; }
#shift .decision-risk { margin: 0; }
#shift .choice-heading { margin-block: .12rem .04rem; font-size: .94rem; font-weight: 790; color: #d6e5dd; }
#shift #decision-options { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .42rem; }
#shift .choice { min-height: 4.1rem; height: 100%; padding: .49rem .48rem; gap: .25rem .34rem;
  grid-template-columns: 1.45rem minmax(0, 1fr) auto; align-content: start; line-height: 1.27; font-size: 1rem; background: #1a332d; border-color: #50736a; }
#shift .choice > span:first-of-type { min-width: 0; }
#shift .choice > span > strong { color: #f1faf0; font-weight: 780; }
#shift .choice > span > small, #shift .choice .choice-time { color: #ccddd2; font-size: .82rem; line-height: 1.2; }
#shift .choice .choice-cost { align-self: start; font-size: .82rem; background: #3a3221; border-color: #877248; color: #ffe2a5; }
#shift .choice .choice-note { grid-column: 2/-1; font-size: .85rem; color: #ffe2ac; line-height: 1.28; max-width: 100%; }
#shift .choice:disabled { opacity: 1; background: #242e2a; border-color: #44504a; }
#shift .choice:disabled > span > strong { color: #dce4dc; }
#shift .choice:disabled > b { color: #d4b983; background: #443a2b; }
#shift .delegate-controls, #shift .delegate-picker { font-size: .95rem; }
#shift .delegate-detail { font-size: .85rem; line-height: 1.32; }

#shift .support-dialog:not([open]), #shift #shift-workbench[data-desk] #team-desk:not([open]) { display: none; }
#shift .support-dialog[open], #shift #shift-workbench[data-desk] #team-desk[open] {
  display: grid; grid-template-rows: auto minmax(0, 1fr); gap: .75rem; color: #eff8ee;
  width: min(43rem, calc(100% - 1.15rem)); min-width: 0; max-height: min(86dvh, 48rem); margin: auto;
  border: 1px solid #587b6d; border-radius: .91rem; padding: .95rem; background: #152826; box-shadow: 0 18px 54px #0009;
}
#shift .support-dialog::backdrop { background: #060d0ce6; }
#shift .support-dialog .panel-heading { display: flex; align-items: center; justify-content: space-between; gap: .8rem; }
#shift .support-dialog .panel-heading .eyebrow { display: inline-flex; font-size: .75rem; color: #eed19a; }
#shift .support-dialog .panel-heading h2 { font-size: clamp(1.35rem, 4vw, 1.85rem); margin-top: .2rem; }
#shift .support-dialog .desk-body { color: #e0ece2; min-height: 0; font-size: 1rem; line-height: 1.45; }
#shift .support-dialog .desk-body > p { margin-bottom: .53rem; }
#shift .support-dialog details { border-top: 1px solid #416058; padding: .42rem 0 .54rem; }
#shift .support-dialog details > summary { min-height: 2.8rem; padding: .45rem .28rem; color: #e9f5ed; font-size: 1rem; font-weight: 780; cursor: pointer; }
#shift #staff-availability { margin-inline-start: .42rem; color: #b8eacb; font-size: .85rem; font-weight: 600; }
#shift #staff-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .39rem; padding: .26rem 0; }
#shift .staff-member { padding: .44rem; font-size: .93rem; }
#shift .staff-member > span { font-size: .94rem; }
#shift #investment-list .investment { gap: .5rem; padding: .57rem; }
#shift #investment-list .investment > span { min-width: 0; }
#shift #investment-list .purchase { font-size: .88rem; min-height: 2.8rem; }
#shift .purchase-stock, #shift .ops-note { font-size: .9rem; color: #d3e2da; }
#shift .ledger-metrics { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: .42rem; margin: .85rem 0; }
#shift #cash-feedback { grid-template-columns: minmax(0, 1fr); }
#shift .cash-event { grid-template-columns: auto auto minmax(0,1fr); gap: .3rem .53rem; min-height: 2.55rem; font-size: .8rem; }
#shift .cash-event small { font-size: .88rem; overflow: visible; white-space: normal; }
#shift #feed { display: grid; max-height: 14rem; height: auto; margin: .3rem 0; }
#shift #feed li { font-size: .91rem; padding: .32rem .48rem; }
#shift #feed:empty { display: none; }

#shift .shift-outcome { pointer-events: none; position: absolute; inset: auto auto .86rem .88rem; width: min(24rem, calc(100% - 1.75rem));
  border: 1px solid #6c9a83; border-left: 4px solid #9be3b8; border-radius: .68rem; padding: .54rem .65rem;
  color: #eff9ee; background: #142e27f4; box-shadow: 0 8px 25px #060e0dd9; }
#shift .shift-outcome[data-tone="loss"] { background: #3a2625f4; border-color: #c98e7f; border-left-color: #ffad96; }
#shift .shift-outcome[data-tone="neutral"] { background: #27332cf4; border-color: #85927a; }
#shift .outcome-tag { display: block; font-size: .72rem; font-weight: 820; color: #e1eacf; text-transform: uppercase; letter-spacing: .09em; }
#shift #shift-outcome-net { display: block; color: #bbf5cf; font-size: 1.43rem; letter-spacing: -.035em; line-height: 1.14; }
#shift .shift-outcome[data-tone="loss"] #shift-outcome-net { color: #ffbaa7; }
#shift #shift-outcome-title { font-size: 1rem; font-weight: 810; }
#shift #shift-outcome-summary { color: #e0eae0; font-size: .85rem; line-height: 1.26; }
#shift .outcome-history-list { display: grid; gap: .55rem; list-style: none; padding: 0; margin: 0 0 .7rem; }
#shift .outcome-history-row { margin: 0; border-left: 3px solid #6ca58a; border-radius: .34rem; background: #20352e; padding: .48rem .61rem; }
#shift .outcome-history-row[data-tone="loss"] { border-color: #ec9c87; background: #362925; }
#shift .outcome-history-row .outcome-amount { color: #adf1c2; font-weight: 850; }
#shift .outcome-history-row[data-tone="loss"] .outcome-amount { color: #ffb7a3; }
#shift .outcome-history-row .outcome-time { margin-left: .52rem; color: #d1ddd2; font-size: .83rem; }
#shift .outcome-history-row > h3 { font-size: 1.04rem; margin: .15rem 0; }

#shift[data-density="compact"] .hud-metric { padding-block: .36rem; }
#shift[data-density="compact"] .shift-utility .btn { font-size: .82rem; min-height: 2.18rem; }
#shift[data-density="compact"] .shift-grid > .panel { padding: .48rem; }
#shift[data-density="compact"] #incident-list .incident { min-height: 2.45rem; padding-block: .2rem; font-size: .91rem; }
#shift[data-density="compact"] #decision-title { font-size: 1.28rem; }
#shift[data-density="compact"] :is(#decision-copy,.decision-risk,.decision-signal) { font-size: .94rem; }
#shift[data-density="compact"] .choice { font-size: .93rem; min-height: 3.45rem; padding-block: .35rem; }

#investment-review .investment-report { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); gap: .65rem; margin-top: .68rem; }
#investment-review .investment-report-row { padding: .68rem; border-radius: .6rem; border: 1px solid #456b5b; background: #162e28; }
#investment-review .comparison-note { margin-top: .47rem; color: #d6e8da; line-height: 1.45; }

@media (min-width: 701px) and (max-width: 1120px) {
  #shift #shift-workbench[data-desk] { grid-template-columns: minmax(0,1.2fr) minmax(0,1fr); }
  #shift #decision-options { grid-template-columns: minmax(0,1fr); }
}
@media (min-width: 701px) and (max-height: 680px) {
  #shift #jump-options:not([hidden]) { display: inline-flex; }
}
@media (max-width: 700px) {
  body.shift-active { overflow: auto; min-height: 100dvh; }
  body.shift-active #main { height: auto; min-height: 100dvh; max-height: none; overflow: visible; padding: .52rem .45rem max(.7rem, env(safe-area-inset-bottom)); }
  body.shift-active #shift { height: auto; gap: .46rem; grid-template-rows: auto auto auto auto; }
  #shift .shift-head { align-items: flex-start; }
  #shift .shift-label { flex: 1; }
  #shift .shift-head #shift-title { display: block; font-size: 1.22rem; }
  #shift .shift-head #shift-status { max-width: none; white-space: normal; }
  #shift .shift-head .actions { gap: .28rem; }
  #shift .shift-head .btn { min-height: 2.38rem; font-size: .78rem; padding: .28rem .41rem; }
  #shift #hud { position: sticky; top: 0; z-index: 7; padding-block: .19rem; grid-auto-flow: row; grid-auto-columns: auto; grid-template-columns: repeat(6,minmax(0,1fr)); gap: .25rem; background: #0e1b19fb; }
  #shift .hud-metric { grid-column: span 2; padding: .3rem .36rem; }
  #shift .hud-metric:where(.budget-cell,.progress-cell) { grid-column: span 3; }
  #shift .hud-metric > span { font-size: .68rem; letter-spacing: 0; }
  #shift .hud-metric > strong, #shift #net { font-size: 1.32rem; }
  #shift .hud-metric > small, #shift #budget-start { font-size: .66rem; }
  #shift #shift-clock { font-size: 1.52rem; }
  #shift .shift-utility { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .31rem; }
  #shift #ops-shortcut { display: none; }
  #shift #show-ops { display: inline-flex; }
  #shift .shift-utility .btn { min-height: 2.7rem; font-size: .91rem; padding-inline: .34rem; }
  #shift .density-trigger { margin-inline-start: 0; }
  #shift .support-nudge { grid-column: 1/-1; margin: .12rem 0; }
  #shift #shift-workbench[data-desk] { height: auto; grid-template-columns: minmax(0,1fr); grid-template-rows: clamp(9rem, 25svh, 14rem) auto; grid-template-areas: "map" "incidents"; gap: .43rem; }
  #shift .shift-grid > .panel { padding: .53rem; }
  #shift .map-stage { gap: .25rem; }
  #shift .map-stage .art-head .eyebrow { font-size: .67rem; }
  #shift .map-stage .btn { min-height: 2.08rem; min-width: 1.8rem; padding: .17rem .3rem; font-size: .72rem; }
  #shift .map-stage .zoom-control { font-size: .95rem; }
  #shift .incident-station { scroll-margin-top: 7.4rem; grid-template-rows: auto auto auto; }
  #shift #incident-list { max-height: 6.7rem; }
  #shift #decision-scroll { overflow: visible; }
  #shift #decision-scroll, #shift #decision-options, #shift #decision-title { scroll-margin-top: 7.9rem; }
  #shift #decision-options { grid-template-columns: minmax(0,1fr); }
  #shift .choice { min-height: 3.55rem; padding: .55rem .5rem; }
  #shift .shift-outcome { bottom: .37rem; left: .39rem; width: min(22rem,calc(100% - .78rem)); padding: .35rem .43rem; }
  #shift #shift-outcome-net { font-size: 1.24rem; }
  #shift #shift-outcome-summary { font-size: .79rem; }
  #shift .cash-event small { grid-column: 1/-1; }
}
@media (max-width: 375px) {
  #shift .shift-head .actions { align-content: flex-start; max-width: 6.8rem; justify-content: flex-end; }
  #shift .shift-head .btn { min-height: 2.2rem; }
  #shift .map-stage .art-head .eyebrow { display: none; }
}
@media (max-height: 460px) and (orientation: landscape) {
  body.shift-active { overflow: auto; }
  body.shift-active #main { height: auto; min-height: 100dvh; max-height: none; overflow: visible; }
  body.shift-active #shift { height: auto; }
  #shift #shift-workbench[data-desk] { min-height: 20rem; }
}
#shift #manager-override { min-height: 2.7rem; color: #fff0c6; border-color: #9b7e4b; flex-shrink: 0; padding: .32rem .48rem; }
#shift .manager-countdown { font-size: .86rem; color: #ffe3a1; font-variant-numeric: tabular-nums; white-space: nowrap; }
#shift .delegate-picker:has(#manager-override) { flex-wrap: wrap; justify-content: flex-start; }
#shift #manager-override { margin-inline-start: auto; }
#investment-review .investment-report-row > :is(h3,p) { margin-bottom: .23rem; }
#investment-review .investment-report-row > strong { color: #a6edc1; }
#investment-review .comparison-note { grid-column: 1/-1; }

/* Use the whole choice card for the action; price and ETA get their own line. */
#shift .choice { height: auto; grid-template-rows: auto auto auto; }
#shift .choice > b { grid-column: 1; grid-row: 1; }
#shift .choice > span:first-of-type { display: contents; }
#shift .choice > span:first-of-type > strong { grid-column: 2/-1; grid-row: 1; }
#shift .choice > span:first-of-type > small { grid-column: 2; grid-row: 2; }
#shift .choice > .choice-cost { grid-column: 3; grid-row: 2; }
#shift .choice > .choice-note { grid-row: 3; }
#shift #jump-options:not([hidden]) { display: inline-flex; color: #b9f1d0; background: #23483c; }

@media(min-width:701px) {
  #shift #shift-workbench[data-desk] { grid-template-columns: minmax(0,1.35fr) minmax(0,1fr); }
  #shift #decision-panel { grid-template-columns: minmax(0,1fr) auto; align-content: start; }
  #shift #decision-panel > * { grid-column: 1/-1; }
  #shift #decision-zone { grid-column: 1; align-self: center; }
  #shift .decision-phase { grid-column: 2; align-self: center; margin: 0; }
  #shift #decision-facts-label:not([hidden]), #shift #decision-responses-label:not([hidden]) {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden;
    clip-path: inset(50%); white-space: nowrap;
  }
  #shift #incident-list:has(> .incident:only-child) .incident { min-height: 2.28rem; padding-block: .16rem; }
  #shift #incident-list:has(> .incident:only-child) .incident > span:first-child > small { display: none; }
}
@media(max-width:700px) {
  #shift .shift-head { display: grid; grid-template-columns: minmax(0,1fr); gap: .25rem; }
  #shift[data-mode="ranked"] .shift-head, #shift[data-mode="challenge"] .shift-head { grid-template-columns: minmax(0,1fr) auto; }
  #shift .shift-head .actions { max-width: none; justify-content: start; }
  #shift .shift-head .btn { min-height: 2.15rem; }
  #shift .shift-label { display: grid; gap: .2rem; }
  #shift .shift-head #shift-title { font-size: 1.16rem; }
  #shift .shift-utility { grid-template-columns: repeat(4, minmax(0,1fr)); }
  #shift .shift-utility .btn { padding-inline: .12rem; font-size: .79rem; }
  #shift #shift-workbench[data-desk] { grid-template-rows: clamp(10.3rem, 24svh, 14rem) auto; }
  #shift .map-stage .art-head { justify-content: space-between; gap: .25rem; }
  #shift .map-stage .art-head .eyebrow { display: none; }
  #shift .map-actions { flex-wrap: wrap; margin-inline-start: auto; }
  #shift .map-stage #jump-options { min-height: 2.3rem; font-size: .79rem; }
}
@media(max-height:460px) and (orientation:landscape) {
  #shift #shift-workbench[data-desk] .map-stage { height: clamp(12.2rem, calc(100svh - 6.2rem), 19rem); align-self: start; }
  #shift #decision-scroll { overflow: visible; }
}
@media(max-width:700px) {
  #shift .map-stage { grid-template-rows: minmax(0,1fr); }
  #shift .map-stage .art-head { position: absolute; z-index: 2; inset: .52rem .55rem auto auto; pointer-events: none; }
  #shift .map-stage .map-actions { pointer-events: auto; }
  #shift .map-stage .btn { background-color: #19302fea; }
}
@media(min-width:1121px) and (max-height:820px) {
  body.shift-active #shift { gap: .44rem; }
  #shift .hud-metric { padding-block: .45rem; }
  #shift #decision-panel { gap: .32rem; }
  #shift .choice { padding-block: .39rem; }
}

/* A ten-second brief: premise, budget, clock, pressure, winning score and play. */
.hero-copy #hero-title{font-size:clamp(2.55rem,5.3vw,5rem);line-height:.99;letter-spacing:-.055em;margin:.55rem 0 .75rem;max-width:15ch}
.hero-copy #hero-title em{font-style:normal}
.opening-stats{list-style:none;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.4rem;padding:0;margin:.15rem 0 .62rem;max-width:34rem}
.opening-stats li{margin:0;padding:.46rem .58rem;border:1px solid #527568;background:#142923;border-radius:.48rem}
.opening-stats strong,.opening-stats span{display:block}
.opening-stats strong{color:var(--mint);font-size:clamp(1.08rem,2.4vw,1.54rem);line-height:1.15}
.opening-stats span{color:#cfdfd6;font-size:.73rem;line-height:1.2;margin-top:.15rem}
.hero-copy .opening-score{font-size:1rem;line-height:1.35;color:#e9f7f0;margin:.3rem 0 0}
.opening-score strong,.opening-score span{display:block}
.opening-score strong{color:var(--gold)}
.hero-copy .opening-tactics{font-size:1rem;line-height:1.42;color:#cbddd4;margin:.36rem 0 .78rem}
@media(max-width:700px){
 .hero-copy #hero-title{font-size:clamp(2.45rem,10.5vw,3.75rem);margin:.46rem 0 .64rem}
 .opening-stats li{padding:.39rem .36rem}
}

#landing{margin-top:clamp(1rem,2.7vw,2.6rem)}
#landing .hero{padding:clamp(.9rem,2.7vw,2.7rem);min-height:0}
#landing .hero-copy{gap:.58rem}
.hero-copy #hero-title{max-width:none;font-size:clamp(2.18rem,3.52vw,4.2rem);line-height:1.02;letter-spacing:-.052em;margin:.21rem 0 .36rem;overflow-wrap:normal;text-wrap:initial}
.hero-copy #hero-title > :is(span,em){display:block}
.hero-copy #hero-title > span{color:var(--type)}
@media(max-width:700px){
 #landing .hero-copy{gap:.48rem}
 .hero-copy #hero-title{font-size:clamp(2rem,8.8vw,3.22rem);margin:.18rem 0 .32rem}
 #landing .hero-copy .opening-score,#landing .hero-copy .opening-tactics{font-size:.91rem}
}

/* Compact the workstation chrome, not the reading size, on constrained desktops.
   Leave phones on normal page scrolling and larger desktops on the floor-first layout. */
@media (min-width: 960px) and (max-width: 1250px), (min-width: 960px) and (max-height: 740px) {
  body.shift-active #main { padding: .5rem clamp(.5rem, 1vw, .85rem); }
  body.shift-active #shift { gap: .37rem; }
  #shift .shift-head { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: .26rem .65rem; }
  #shift .shift-label { display: grid; grid-template-columns: auto minmax(0,1fr); gap: .04rem .42rem; }
  #shift .shift-head #shift-mode { grid-column: 1; grid-row: 1; }
  #shift .shift-head #shift-status { grid-column: 2; grid-row: 1; min-width: 0; max-width: 100%; line-height: 1.2; }
  #shift .shift-head #shift-status.error { white-space: normal; }
  #shift .shift-head #shift-title { grid-column: 1/-1; grid-row: 2; font-size: clamp(1.2rem, 1.65vw, 1.48rem); line-height: 1.12; }
  #shift .shift-head .btn, #shift .shift-utility .btn { min-height: 2.14rem; padding-block: .26rem; }
  #shift #hud > .hud-metric { padding-block: .4rem; }
  #shift .support-nudge { flex: 1 1 12rem; min-width: 0; }

  #shift #shift-workbench[data-desk] { grid-template-columns: minmax(0,.94fr) minmax(0,1.06fr); gap: .42rem; }
  #shift .shift-grid > .panel { padding: .52rem; }
  #shift .map-stage { grid-template-rows: auto minmax(0,1fr); gap: .28rem; }
  #shift .map-stage .btn { min-height: 2.02rem; }
  #shift .incident-station { gap: .27rem; }
  #shift .incident-station .panel-heading { min-height: 1.46rem; margin-bottom: 0; }
  #shift #incident-list { max-height: min(12vh,4.7rem); padding-block: .02rem .04rem; }
  #shift #incident-list:has(> .incident:only-child) .incident { min-height: 2.16rem; }
  #shift #decision-scroll { padding-block: .08rem .22rem; }
  #shift #decision-panel { padding-top: .31rem; gap: .25rem; }
  #shift #decision-panel #decision-zone { grid-column: 1; grid-row: 1; }
  #shift #decision-panel .decision-phase { grid-column: 2; grid-row: 1; justify-self: end; text-align: end; }
  #shift .decision-signal { padding-block: .24rem; }
  #shift #decision-options { grid-template-columns: repeat(2,minmax(0,1fr)); gap: .33rem; }
  #shift .choice { padding-block: .41rem; }
}
