:root {
  --blue: #1547ec;
  --blue-dark: #0b2da9;
  --cyan: #18c8ff;
  --green: #07d91b;
  --green-dark: #079323;
  --panel: #f7f9ff;
  --panel-strong: #ffffff;
  --ink: #251516;
  --muted: #6c5a64;
  --line: #d8e1f2;
  --danger: #ef4e38;
  --shadow-hard: 0 9px 0 rgba(0, 0, 0, 0.2);
  --shadow-soft: 0 18px 40px rgba(15, 22, 36, 0.26);
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  background: #111928;
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  margin: 0;
  overflow: hidden;
}

button {
  appearance: none;
  border: 0;
  cursor: pointer;
  font: inherit;
  font-weight: 900;
  letter-spacing: 0;
}

.game-shell {
  background:
    radial-gradient(circle at 28% 10%, rgba(61, 153, 255, 0.32), transparent 30%),
    linear-gradient(135deg, #21314f, #101827 60%, #0c1220);
  height: 100vh;
  min-width: 1120px;
  overflow: hidden;
  position: relative;
}

.top-hud {
  align-items: center;
  background: linear-gradient(#1d55ff, var(--blue));
  border-bottom: 5px solid var(--cyan);
  box-shadow: 0 8px 0 rgba(0, 0, 0, 0.18);
  display: flex;
  height: 86px;
  justify-content: space-between;
  padding: 12px 22px;
  position: relative;
  z-index: 30;
}

.brand-block,
.resource-strip,
.resource-pill {
  align-items: center;
  display: flex;
}

.brand-block {
  gap: 14px;
  min-width: 330px;
}

.app-mark {
  align-items: center;
  background: #ffe100;
  border: 5px solid #fff;
  border-radius: 16px;
  box-shadow: var(--shadow-hard);
  color: #ff4e0d;
  display: flex;
  font-size: 28px;
  font-weight: 900;
  height: 58px;
  justify-content: center;
  text-shadow: 0 2px 0 rgba(255, 255, 255, 0.5);
  width: 82px;
}

.brand-block p,
.assistant-card p:first-of-type,
.mission-card p,
.section-title p {
  letter-spacing: 0;
  margin: 0;
}

.brand-block p {
  color: #bfe7ff;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.brand-block h1 {
  color: #fff;
  font-size: 24px;
  line-height: 1;
  margin: 3px 0 0;
  text-shadow: 0 3px 0 rgba(0, 0, 0, 0.18);
}

.resource-strip {
  gap: 12px;
}

.resource-pill {
  background: rgba(12, 31, 122, 0.28);
  border: 2px solid rgba(255, 255, 255, 0.18);
  border-radius: 16px;
  gap: 10px;
  min-height: 54px;
  padding: 8px 12px;
}

.resource-pill strong,
.day-chip {
  color: #fff;
  font-size: 25px;
  line-height: 1;
  text-shadow: 0 4px 0 rgba(0, 0, 0, 0.2);
  white-space: nowrap;
}

.money-pill strong {
  min-width: 128px;
}

.bill-icon {
  align-items: center;
  background: #71e84e;
  border: 4px solid #effff1;
  border-radius: 9px;
  box-shadow: inset 0 -4px 0 rgba(0, 0, 0, 0.18), 0 4px 0 rgba(0, 0, 0, 0.18);
  color: #144514;
  display: inline-flex;
  font-size: 20px;
  font-weight: 900;
  height: 34px;
  justify-content: center;
  min-width: 56px;
  position: relative;
}

.bill-icon::before,
.bill-icon::after {
  background: #effff1;
  border-radius: 50%;
  content: "";
  height: 8px;
  position: absolute;
  top: 9px;
  width: 8px;
}

.bill-icon::before {
  left: 5px;
}

.bill-icon::after {
  right: 5px;
}

.coin-icon,
.gem-icon {
  align-items: center;
  border-radius: 50%;
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.18);
  display: inline-flex;
  font-size: 20px;
  font-weight: 900;
  height: 36px;
  justify-content: center;
  width: 36px;
}

.coin-icon {
  background: #ffcd23;
  border: 5px solid #f89920;
  color: #ef5a17;
}

.gem-icon {
  background: linear-gradient(135deg, #ff8aea 0 31%, #bb18ff 32% 62%, #ff48d8 63%);
  clip-path: polygon(50% 0, 93% 26%, 79% 76%, 50% 100%, 20% 76%, 7% 26%);
}

.tiny-gem {
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.18);
  height: 20px;
  width: 20px;
}

.day-chip {
  background: rgba(12, 31, 122, 0.28);
  border: 2px solid rgba(255, 255, 255, 0.18);
  border-radius: 16px;
  padding: 15px 16px;
}

.plus-button {
  align-items: center;
  background: #28ca3a;
  border: 5px solid #119526;
  border-radius: 14px;
  box-shadow: var(--shadow-hard);
  color: #effff1;
  display: flex;
  font-size: 36px;
  height: 58px;
  justify-content: center;
  line-height: 1;
  padding: 0;
  width: 58px;
}

.pc-layout {
  display: grid;
  gap: 16px;
  grid-template-columns: 280px minmax(0, 1fr) 300px;
  height: calc(100vh - 86px);
  padding: 16px;
}

.left-panel,
.right-panel,
.stage-card,
.upgrade-drawer {
  background: rgba(247, 249, 255, 0.96);
  border: 4px solid rgba(255, 255, 255, 0.84);
  border-radius: 18px;
  box-shadow: var(--shadow-soft);
}

.left-panel,
.right-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 0;
  overflow-y: auto;
  padding: 14px;
}

.boss-panel {
  align-items: center;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(231, 246, 255, 0.96)),
    linear-gradient(135deg, #fff, #dff4ff);
  border: 3px solid rgba(24, 200, 255, 0.38);
  border-radius: 14px;
  box-shadow: 0 8px 0 rgba(60, 77, 112, 0.12), inset 0 0 0 2px rgba(255, 255, 255, 0.72);
  display: flex;
  gap: 12px;
  padding: 12px;
  position: relative;
  overflow: hidden;
}

.boss-panel::after {
  background: linear-gradient(90deg, transparent, rgba(24, 200, 255, 0.32), transparent);
  content: "";
  height: 2px;
  left: 12px;
  position: absolute;
  right: 12px;
  top: 10px;
}

.boss-panel p,
.pc-note p,
.shortcut-card p,
.flow-card p,
.plant-health p {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.35;
  margin: 0;
}

.boss-panel h2,
.mission-card h2,
.assistant-card h2,
.pc-note h2,
.section-title h2 {
  letter-spacing: 0;
  margin: 0;
}

.boss-panel h2 {
  font-size: 24px;
  color: #173055;
}

.boss-portrait {
  background:
    radial-gradient(circle at 50% 86%, rgba(23, 32, 51, 0.28) 0 16px, transparent 17px),
    radial-gradient(circle at 35% 47%, #111 0 5px, transparent 6px),
    radial-gradient(circle at 65% 47%, #111 0 5px, transparent 6px),
    radial-gradient(circle at 36% 28%, rgba(255, 255, 255, 0.55) 0 9px, transparent 10px),
    linear-gradient(#f4b56b 0 65%, #173055 65%);
  border: 6px solid #151515;
  border-radius: 48% 48% 42% 42%;
  box-shadow: 0 7px 0 rgba(0, 0, 0, 0.18), inset -8px -8px 0 rgba(95, 39, 29, 0.12);
  height: 72px;
  position: relative;
  width: 78px;
}

.boss-portrait::after {
  background: #ffee18;
  border: 3px solid #151515;
  border-radius: 50%;
  color: #173055;
  content: "B";
  font-size: 12px;
  font-weight: 900;
  height: 21px;
  line-height: 16px;
  position: absolute;
  right: -7px;
  text-align: center;
  top: 39px;
  width: 21px;
}

.helmet {
  background: #ffd421;
  border: 5px solid #151515;
  border-bottom: 0;
  border-radius: 54px 54px 0 0;
  height: 29px;
  left: 6px;
  position: absolute;
  top: -17px;
  width: 56px;
}

.helmet::after {
  background: #ffe85a;
  border: 4px solid #151515;
  border-radius: 0 0 12px 12px;
  content: "";
  height: 11px;
  left: -3px;
  position: absolute;
  top: 21px;
  width: 62px;
}

.visor {
  border-bottom: 9px solid #52ddff;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  filter: drop-shadow(0 3px 0 rgba(0, 0, 0, 0.24));
  height: 0;
  left: 13px;
  position: absolute;
  top: 29px;
  width: 48px;
}

.smile {
  border-bottom: 4px solid #5f271d;
  border-radius: 50%;
  height: 12px;
  left: 29px;
  position: absolute;
  top: 47px;
  width: 20px;
}

.radio {
  background: #173055;
  border: 3px solid #151515;
  border-radius: 7px;
  height: 22px;
  position: absolute;
  right: -14px;
  top: 16px;
  width: 13px;
}

.radio::before {
  background: #151515;
  content: "";
  height: 17px;
  left: 8px;
  position: absolute;
  top: -17px;
  transform: rotate(-24deg);
  transform-origin: bottom;
  width: 3px;
}

.radio::after {
  background: #52ddff;
  border-radius: 50%;
  content: "";
  height: 5px;
  left: 4px;
  position: absolute;
  top: 5px;
  width: 5px;
}

.mission-card {
  background: linear-gradient(#08e51e, #06c914);
  border-radius: 16px;
  box-shadow: var(--shadow-hard);
  color: #fff;
  padding: 14px;
}

.mission-prize {
  align-items: center;
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
}

.mission-prize strong {
  font-size: 28px;
  text-shadow: 0 4px 0 rgba(0, 0, 0, 0.16);
}

.mission-card h2 {
  font-size: 25px;
  line-height: 1.05;
  margin-bottom: 8px;
}

.mission-card p {
  color: #eaffea;
  font-size: 14px;
  font-weight: 900;
  line-height: 1.25;
}

.status-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr 1fr;
}

.status-grid article {
  background: #fff;
  border: 3px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 5px 0 rgba(60, 77, 112, 0.12);
  min-height: 78px;
  padding: 11px;
}

.status-grid span,
.shortcut-card span,
.flow-card span,
.plant-health span {
  color: var(--blue);
  display: block;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.status-grid strong {
  display: block;
  font-size: 22px;
  line-height: 1;
  margin-top: 8px;
}

.shortcut-card,
.flow-card,
.plant-health,
.pc-note,
.product-card,
.mission-tracker,
.event-log-card {
  background: #fff;
  border: 3px solid var(--line);
  border-radius: 14px;
  padding: 12px;
}

.flow-card ol {
  counter-reset: flow;
  display: grid;
  gap: 8px;
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
}

.flow-card li {
  align-items: center;
  color: var(--ink);
  display: flex;
  font-size: 13px;
  font-weight: 900;
  gap: 8px;
}

.flow-card li::before {
  align-items: center;
  background: linear-gradient(#35a0ff, #1e6eeb);
  border-radius: 8px;
  color: #fff;
  content: counter(flow);
  counter-increment: flow;
  display: flex;
  flex: 0 0 auto;
  font-size: 12px;
  height: 24px;
  justify-content: center;
  width: 24px;
}

.plant-health {
  display: grid;
  gap: 10px;
}

.flow-health-list {
  display: grid;
  gap: 9px;
}

.flow-health-row {
  display: grid;
  gap: 5px;
}

.flow-health-row header {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

.flow-health-row b {
  color: var(--ink);
  font-size: 12px;
}

.flow-health-row em {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
}

.flow-meter {
  background: #e3e9f4;
  border-radius: 999px;
  height: 10px;
  overflow: hidden;
}

.flow-meter span {
  border-radius: inherit;
  display: block;
  height: 100%;
  transition: width 180ms ease, background 180ms ease;
}

.flow-meter.good span {
  background: linear-gradient(90deg, #17c943, #8df257);
}

.flow-meter.warn span {
  background: linear-gradient(90deg, #ffbf1e, #ffee18);
}

.flow-meter.bad span {
  background: linear-gradient(90deg, #ef4e38, #ff8b55);
}

.shortcut-card b {
  color: var(--ink);
}

.stage-card {
  background:
    radial-gradient(circle at 50% 28%, rgba(136, 245, 112, 0.52), transparent 34%),
    linear-gradient(135deg, #79e966, #46cb58 58%, #2faf48);
  cursor: grab;
  min-height: 0;
  overflow: hidden;
  position: relative;
}

.stage-card.is-panning {
  cursor: grabbing;
}

.stage-card.has-hotspot {
  cursor: pointer;
}

.stage-card.has-hotspot.is-panning {
  cursor: grabbing;
}

.stage-card::before {
  background:
    linear-gradient(90deg, rgba(255,255,255,0.08) 1px, transparent 1px),
    linear-gradient(rgba(255,255,255,0.08) 1px, transparent 1px);
  background-size: 36px 36px;
  content: "";
  inset: 0;
  pointer-events: none;
  position: absolute;
  z-index: 1;
}

.stage-card::after {
  background:
    radial-gradient(circle at 50% 44%, transparent 0 54%, rgba(13, 25, 30, 0.16) 82%),
    linear-gradient(180deg, rgba(255,255,255,0.16), transparent 18%, rgba(0,0,0,0.12));
  content: "";
  inset: 0;
  pointer-events: none;
  position: absolute;
  z-index: 2;
}

.stage-toolbar {
  align-items: center;
  display: flex;
  gap: 9px;
  left: 14px;
  position: absolute;
  top: 14px;
  z-index: 8;
}

.settings-button {
  align-items: center;
  background: linear-gradient(#3c93ff, #2474ea);
  border-bottom: 5px solid #1553b7;
  border-radius: 14px;
  box-shadow: 0 6px 0 rgba(0, 0, 0, 0.2);
  display: flex;
  height: 54px;
  justify-content: center;
  padding: 0;
  width: 54px;
}

.gear-shape {
  background: #fff;
  border-radius: 50%;
  height: 30px;
  position: relative;
  width: 30px;
}

.gear-shape::before {
  background: #2474ea;
  border: 8px solid #fff;
  border-radius: 50%;
  content: "";
  inset: 5px;
  position: absolute;
}

.gear-shape::after {
  background:
    linear-gradient(#fff, #fff) center / 8px 42px no-repeat,
    linear-gradient(90deg, #fff, #fff) center / 42px 8px no-repeat;
  content: "";
  inset: -6px;
  position: absolute;
  transform: rotate(45deg);
}

.contract-ticket {
  align-items: center;
  background: rgba(255, 255, 255, 0.92);
  border: 3px solid #ffe100;
  border-radius: 14px;
  box-shadow: 0 6px 0 rgba(0, 0, 0, 0.16);
  display: flex;
  gap: 8px;
  padding: 8px 11px;
}

.contract-ticket span {
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.contract-ticket b {
  align-items: center;
  background: #ffc70d;
  border-radius: 50%;
  color: #fff;
  display: flex;
  font-size: 18px;
  height: 32px;
  justify-content: center;
  width: 32px;
}

.factory-canvas {
  display: block;
  height: 100%;
  min-height: 620px;
  position: relative;
  user-select: none;
  width: 100%;
  z-index: 0;
}

.operator {
  animation: bob 1.8s ease-in-out infinite;
  transform-box: fill-box;
  transform-origin: center bottom;
}

.op-b,
.op-d {
  animation-delay: 0.35s;
}

.op-c {
  animation-delay: 0.7s;
}

.asrs {
  animation: hoverBot 2.2s ease-in-out infinite;
  transform-box: fill-box;
  transform-origin: center;
}

.truck {
  animation: truckRoll 12s linear infinite;
  transform-box: fill-box;
  transform-origin: center;
}

.wind-blades {
  animation: spin 3.8s linear infinite;
  transform-box: fill-box;
  transform-origin: center;
}

.map-bubble {
  align-items: center;
  background: rgba(255, 255, 255, 0.82);
  border: 2px solid rgba(255, 255, 255, 0.82);
  border-radius: 15px;
  box-shadow: 0 8px 20px rgba(20, 28, 41, 0.18);
  display: flex;
  gap: 8px;
  max-width: 252px;
  padding: 8px 10px;
  position: absolute;
  right: 16px;
  top: 98px;
  z-index: 8;
}

.map-bubble span {
  align-items: center;
  background: #ef1414;
  border-radius: 50%;
  color: #fff;
  display: flex;
  flex: 0 0 auto;
  font-size: 20px;
  font-weight: 1000;
  height: 34px;
  justify-content: center;
  width: 34px;
}

.map-bubble strong {
  display: block;
  font-size: 13px;
  line-height: 1;
  text-transform: lowercase;
}

.map-bubble p {
  color: #4a3032;
  display: none;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
  margin: 4px 0 0;
}

.zone-legend {
  background: rgba(255, 255, 255, 0.68);
  border: 2px solid rgba(255, 255, 255, 0.58);
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(20, 28, 41, 0.14);
  display: grid;
  gap: 5px;
  left: 14px;
  padding: 7px;
  position: absolute;
  top: 84px;
  z-index: 8;
}

.zone-legend div {
  align-items: center;
  color: var(--ink);
  display: flex;
  font-size: 10px;
  font-weight: 900;
  gap: 6px;
  white-space: nowrap;
}

.dot {
  border-radius: 50%;
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.16);
  display: inline-block;
  height: 9px;
  width: 9px;
}

.dot-receiving { background: #2d8cff; }
.dot-production { background: #ff7d1a; }
.dot-storage { background: #9a5a32; }
.dot-dispatch { background: #ffee18; }
.dot-energy { background: #7be928; }

.flow-minimap {
  background: rgba(16, 27, 35, 0.76);
  border: 2px solid rgba(255, 255, 255, 0.26);
  border-radius: 14px;
  bottom: 12px;
  box-shadow: 0 10px 24px rgba(6, 15, 24, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.16);
  color: #fff;
  display: grid;
  gap: 7px;
  padding: 8px;
  position: absolute;
  right: 12px;
  width: min(350px, calc(100% - 24px));
  z-index: 8;
}

.flow-minimap header {
  align-items: center;
  display: flex;
  gap: 8px;
  justify-content: space-between;
}

.flow-minimap header span {
  font-size: 10px;
  font-weight: 1000;
  letter-spacing: 0;
  text-transform: uppercase;
}

.flow-minimap header strong {
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  color: #ffee18;
  font-size: 10px;
  max-width: 124px;
  overflow: hidden;
  padding: 4px 7px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mini-map-nodes {
  display: grid;
  gap: 5px;
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.mini-map-node {
  align-content: center;
  background: rgba(255, 255, 255, 0.11);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 9px;
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.14);
  color: #fff;
  display: grid;
  gap: 2px;
  min-height: 49px;
  overflow: hidden;
  padding: 5px 4px 8px;
  position: relative;
  text-align: center;
}

.mini-map-node::after {
  background: rgba(255, 255, 255, 0.34);
  content: "";
  height: 3px;
  left: calc(100% + 1px);
  position: absolute;
  top: 22px;
  width: 5px;
}

.mini-map-node:last-child::after {
  display: none;
}

.mini-map-node span {
  align-items: center;
  background: #2d8cff;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 7px;
  box-shadow: 0 3px 0 rgba(0, 0, 0, 0.18);
  display: flex;
  font-size: 8px;
  font-weight: 1000;
  height: 22px;
  justify-content: center;
  margin: 0 auto;
  width: 31px;
}

.mini-map-node b {
  display: none;
  font-size: 9px;
  font-weight: 1000;
  line-height: 1.05;
}

.mini-map-node em {
  color: rgba(255, 255, 255, 0.76);
  font-size: 9px;
  font-style: normal;
  font-weight: 900;
}

.mini-map-node i {
  background: rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  bottom: 4px;
  height: 3px;
  left: 5px;
  overflow: hidden;
  position: absolute;
  right: 5px;
}

.mini-map-node i::before {
  background: #35db58;
  border-radius: inherit;
  content: "";
  display: block;
  height: 100%;
  width: var(--flow-level);
}

.mini-map-node.good span,
.mini-map-node.good i::before {
  background: #25d84a;
}

.mini-map-node.warn span,
.mini-map-node.warn i::before {
  background: #ffc400;
}

.mini-map-node.bad span,
.mini-map-node.bad i::before {
  background: #f0402f;
}

.mini-map-node.active {
  border-color: rgba(255, 238, 24, 0.84);
  box-shadow: 0 0 0 3px rgba(255, 238, 24, 0.18), inset 0 -4px 0 rgba(0, 0, 0, 0.14);
}

.station-inspector {
  backdrop-filter: blur(4px);
  background: rgba(255, 255, 255, 0.82);
  border: 2px solid rgba(255, 255, 255, 0.74);
  border-radius: 14px;
  bottom: 46px;
  box-shadow: 0 9px 22px rgba(20, 28, 41, 0.18);
  display: grid;
  gap: 6px;
  left: 14px;
  max-width: calc(100% - 28px);
  padding: 8px;
  position: absolute;
  width: 268px;
  z-index: 8;
}

.station-inspector header {
  align-items: center;
  display: grid;
  gap: 8px;
  grid-template-columns: auto 1fr;
}

.station-inspector header > span {
  align-items: center;
  border: 2px solid #ffffff;
  border-radius: 10px;
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.14);
  color: #ffffff;
  display: flex;
  font-size: 11px;
  font-weight: 1000;
  height: 36px;
  justify-content: center;
  width: 48px;
}

.station-inspector p {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  line-height: 1.2;
  margin: 0;
}

.station-inspector header p {
  text-transform: uppercase;
}

.station-inspector strong {
  color: var(--ink);
  display: block;
  font-size: 14px;
  line-height: 1.1;
}

#selectedStationDetail {
  max-height: 24px;
  overflow: hidden;
}

.station-meter-row {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

.station-status {
  border-radius: 999px;
  color: #ffffff;
  font-size: 9px;
  font-weight: 1000;
  padding: 4px 7px;
  text-transform: uppercase;
}

.station-status.good {
  background: #15b83d;
}

.station-status.warn {
  background: #f0a400;
}

.station-status.bad {
  background: #e23b2e;
}

.station-meter-row b {
  color: var(--ink);
  font-size: 18px;
  font-weight: 1000;
}

.station-projection {
  background: #152033;
  border: 2px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  display: grid;
  gap: 6px;
  padding: 7px;
}

.station-projection header {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

.station-projection header span {
  color: #dce7ff;
  font-size: 10px;
  font-weight: 1000;
  text-transform: uppercase;
}

.station-projection header strong {
  border-radius: 999px;
  color: #ffffff;
  font-size: 9px;
  font-weight: 1000;
  padding: 4px 7px;
  text-transform: uppercase;
}

.station-projection .risk-good {
  background: #17c943;
}

.station-projection .risk-warn {
  background: #f0a400;
}

.station-projection .risk-bad {
  background: #e23b2e;
}

.station-projection-grid {
  display: grid;
  gap: 4px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.station-projection-grid article {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  display: grid;
  gap: 3px;
  overflow: hidden;
  padding: 5px;
}

.station-projection-grid span {
  color: #bac8e5;
  font-size: 9px;
  font-weight: 900;
}

.station-projection-grid strong {
  color: #ffffff;
  font-size: 11px;
  font-weight: 1000;
}

.station-projection-grid .good strong {
  color: #8df257;
}

.station-projection-grid .warn strong {
  color: #ffd25a;
}

.station-projection-grid .bad strong {
  color: #ff8f82;
}

.station-projection-grid i {
  background: #17c943;
  border-radius: 999px;
  display: block;
  height: 3px;
  max-width: 100%;
}

.station-projection-grid .bad i {
  background: #e23b2e;
}

.station-projection-grid .warn i {
  background: #f0a400;
}

.station-projection p {
  color: #dce7ff;
  display: none;
  font-size: 10px;
  line-height: 1.25;
}

.station-upgrade {
  align-items: center;
  background: #eef3fb;
  border: 2px solid #dbe4f1;
  border-radius: 10px;
  display: grid;
  gap: 6px;
  grid-template-columns: 1fr auto;
  padding: 6px;
}

.station-upgrade span {
  color: var(--ink);
  font-size: 10px;
  font-weight: 1000;
  line-height: 1.15;
}

.station-upgrade button {
  background: #18c936;
  border-bottom: 4px solid #0e7d24;
  border-radius: 8px;
  color: #ffffff;
  font-size: 10px;
  min-height: 30px;
  padding: 6px 8px;
}

.station-upgrade button:disabled {
  background: #a9b2be;
  border-bottom-color: #737c87;
}

.secondary-station-action {
  background: #2d8cff;
  border-bottom-color: #1857b8;
  grid-column: 1 / -1;
}

.secondary-station-action:disabled {
  background: #a9b2be;
  border-bottom-color: #737c87;
}

.camera-chip {
  background: rgba(20, 28, 41, 0.78);
  border: 2px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  bottom: 18px;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  left: 18px;
  padding: 9px 12px;
  position: absolute;
  z-index: 8;
  display: none;
}

.assistant-card {
  background:
    linear-gradient(145deg, rgba(73, 243, 255, 0.08), transparent 38%),
    #fff;
  border: 3px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 6px 0 rgba(60, 77, 112, 0.12);
  display: grid;
  gap: 10px;
  grid-template-columns: auto 1fr;
  padding: 14px;
}

.robot-head {
  align-items: center;
  animation: robotAdvisorFloat 3.4s ease-in-out infinite;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.28), transparent 34%),
    linear-gradient(160deg, #65f4ff 0%, #20cddd 46%, #087989 100%);
  border: 5px solid #0c7782;
  border-radius: 18px;
  box-shadow:
    inset 0 4px 0 rgba(255, 255, 255, 0.32),
    inset 0 -7px 0 rgba(0, 0, 0, 0.18),
    0 8px 0 rgba(7, 29, 34, 0.18);
  display: flex;
  height: 66px;
  justify-content: center;
  overflow: visible;
  position: relative;
  width: 66px;
}

.robot-head::before {
  background: #172033;
  border: 3px solid #49f3ff;
  border-radius: 999px;
  box-shadow: 0 3px 0 rgba(7, 29, 34, 0.18);
  content: "";
  height: 14px;
  position: absolute;
  right: -7px;
  top: -10px;
  width: 14px;
}

.robot-head::after {
  background:
    radial-gradient(circle at 50% 50%, #8df257 0 4px, transparent 5px),
    #0f2730;
  border: 3px solid #0c7782;
  border-radius: 9px;
  bottom: -9px;
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.22);
  content: "";
  height: 16px;
  position: absolute;
  width: 42px;
}

.robot-head span {
  background:
    radial-gradient(circle at 31% 43%, #8df257 0 3px, #49f3ff 4px 6px, #071d22 7px 10px, transparent 11px),
    radial-gradient(circle at 69% 43%, #8df257 0 3px, #49f3ff 4px 6px, #071d22 7px 10px, transparent 11px),
    linear-gradient(#172033, #071d22);
  border: 3px solid rgba(255, 255, 255, 0.88);
  border-radius: 10px;
  box-shadow:
    inset 0 3px 0 rgba(255, 255, 255, 0.14),
    0 4px 0 rgba(0, 0, 0, 0.14);
  display: block;
  height: 38px;
  position: relative;
  width: 46px;
}

.robot-head span::before {
  background:
    linear-gradient(90deg, transparent, #8df257, transparent),
    linear-gradient(#49f3ff, #49f3ff);
  border-radius: 999px;
  bottom: 8px;
  content: "";
  height: 4px;
  left: 11px;
  position: absolute;
  width: 24px;
}

.robot-head span::after {
  background: rgba(255, 255, 255, 0.62);
  border-radius: 999px;
  content: "";
  height: 5px;
  left: 7px;
  position: absolute;
  top: 5px;
  transform: rotate(-18deg);
  width: 16px;
}

@keyframes robotAdvisorFloat {
  0%, 100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-2px);
  }
}

@keyframes robotScreenScan {
  0%, 100% {
    box-shadow:
      inset 0 3px 0 rgba(255, 255, 255, 0.14),
      0 4px 0 rgba(0, 0, 0, 0.14);
  }

  50% {
    box-shadow:
      inset 0 3px 0 rgba(255, 255, 255, 0.14),
      0 4px 0 rgba(0, 0, 0, 0.14);
  }
}

.assistant-card p:first-of-type {
  color: var(--blue);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.assistant-card h2 {
  font-size: 22px;
}

.assistant-card > p:last-child {
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
  grid-column: 1 / 3;
  line-height: 1.36;
  margin: 0;
}

.action-grid {
  display: grid;
  gap: 12px;
}

.action-grid button {
  align-items: center;
  background: linear-gradient(#318dff, #1d6eed);
  border-bottom: 7px solid #154eb3;
  border-radius: 14px;
  box-shadow: var(--shadow-hard);
  color: #fff;
  display: flex;
  font-size: 17px;
  gap: 12px;
  justify-content: center;
  min-height: 68px;
  padding: 12px;
}

.action-grid button:disabled {
  cursor: not-allowed;
  filter: grayscale(0.35);
  opacity: 0.62;
}

.action-grid .primary-action {
  background: linear-gradient(#21df3b, #0fc02b);
  border-bottom-color: #0b8421;
  font-size: 20px;
}

.action-label {
  white-space: nowrap;
}

.action-cost {
  align-items: center;
  background: rgba(12, 31, 122, 0.22);
  border: 2px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  display: inline-flex;
  font-size: 15px;
  gap: 6px;
  line-height: 1;
  padding: 5px 8px;
}

.action-grid .danger-action {
  background: linear-gradient(#ff725d, var(--danger));
  border-bottom-color: #b52e22;
}

.play-icon {
  border-bottom: 15px solid transparent;
  border-left: 24px solid #fff;
  border-top: 15px solid transparent;
  height: 0;
  width: 0;
}

.contract-icon {
  background: #fff;
  border: 5px solid #552216;
  border-radius: 12px;
  height: 32px;
  position: relative;
  transform: rotate(8deg);
  width: 42px;
}

.contract-icon::after {
  border-bottom: 5px solid #2c8ed2;
  border-left: 5px solid #2c8ed2;
  content: "";
  height: 10px;
  left: 9px;
  position: absolute;
  top: 7px;
  transform: rotate(-45deg);
  width: 14px;
}

.upgrade-icon {
  background: #ffe100;
  border-radius: 6px;
  box-shadow: inset 0 -5px 0 rgba(0,0,0,0.18);
  height: 34px;
  position: relative;
  width: 34px;
}

.upgrade-icon::before,
.upgrade-icon::after {
  background: #ff4e0d;
  content: "";
  left: 7px;
  position: absolute;
  top: 15px;
}

.upgrade-icon::before {
  height: 5px;
  width: 20px;
}

.upgrade-icon::after {
  height: 20px;
  left: 15px;
  top: 7px;
  width: 5px;
}

.pc-note h2 {
  font-size: 20px;
  margin-bottom: 7px;
}

.product-card,
.mission-tracker,
.analytics-card,
.event-log-card {
  display: grid;
  gap: 10px;
}

.product-card > header,
.mission-tracker > header,
.analytics-card > header,
.event-log-card > header {
  align-items: center;
  display: flex;
  gap: 10px;
}

.mission-tracker > header,
.analytics-card > header,
.event-log-card > header {
  display: block;
}

.product-card p,
.mission-tracker p,
.analytics-card p,
.event-log-card p {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  line-height: 1.25;
  margin: 0;
}

.product-card h2,
.mission-tracker h2,
.analytics-card h2,
event-log-card h2 {
  font-size: 20px;
  margin: 2px 0 0;
}

.oven-icon {
  background:
    radial-gradient(circle at 76% 50%, #27e0ff 0 5px, transparent 6px),
    linear-gradient(#f5f5f5 0 24%, #2f3338 24%);
  border: 4px solid #101010;
  border-radius: 10px;
  box-shadow: 0 5px 0 rgba(0, 0, 0, 0.18);
  height: 48px;
  width: 58px;
}

.product-specs,
.mission-list {
  display: grid;
  gap: 8px;
}

.product-spec-row,
.mission-row {
  display: grid;
  gap: 5px;
}

.product-spec-row header,
mission-row header {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

.product-spec-row span,
.mission-row span {
  color: var(--ink);
  font-size: 12px;
  font-weight: 900;
}

.product-spec-row b,
.mission-row b {
  color: var(--blue);
  font-size: 12px;
}

.spec-meter,
.mission-meter {
  background: #e3e9f4;
  border-radius: 999px;
  height: 9px;
  overflow: hidden;
}

.spec-meter i,
.mission-meter i {
  background: linear-gradient(90deg, #318dff, #49f3ff);
  border-radius: inherit;
  display: block;
  height: 100%;
}

.mission-meter i {
  background: linear-gradient(90deg, #20d838, #ffee16);
}

.mission-row.complete span::after {
  color: #17c943;
  content: " ✓";
}

.analytics-card {
  background: #ffffff;
  border: 3px solid var(--line);
  border-radius: 14px;
  padding: 12px;
}

.kpi-canvas {
  aspect-ratio: 16 / 9;
  border-radius: 10px;
  box-shadow: inset 0 -4px 0 rgba(0, 0, 0, 0.12);
  display: block;
  min-height: 145px;
  width: 100%;
}

.kpi-summary {
  display: grid;
  gap: 7px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.kpi-item {
  background: #f1f5ff;
  border: 2px solid #d9e4f6;
  border-radius: 10px;
  display: grid;
  gap: 2px;
  min-width: 0;
  padding: 8px;
}

.kpi-item span,
.kpi-item em {
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
  line-height: 1.15;
}

.kpi-item strong {
  color: var(--ink);
  font-size: 16px;
  line-height: 1;
}

.kpi-item.good {
  border-color: rgba(23, 201, 67, 0.45);
}

.kpi-item.good strong {
  color: #079323;
}

.kpi-item.warn {
  border-color: rgba(255, 191, 30, 0.62);
}

.kpi-item.warn strong {
  color: #a86f00;
}

.kpi-item.bad {
  border-color: rgba(239, 78, 56, 0.52);
}

.kpi-item.bad strong {
  color: #d93324;
}

.event-log-list {
  display: grid;
  gap: 8px;
}

.event-log-list article {
  background: #f1f5ff;
  border-radius: 10px;
  padding: 8px;
}

.event-log-list span {
  color: var(--blue);
  display: block;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.event-log-list p {
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
  margin-top: 3px;
}

.upgrade-drawer {
  bottom: 16px;
  max-width: 430px;
  padding: 14px;
  position: fixed;
  right: 16px;
  top: 102px;
  transform: translateX(calc(100% + 28px));
  transition: transform 220ms ease;
  width: 430px;
  z-index: 60;
}

.upgrade-drawer.open {
  transform: translateX(0);
}

.section-title {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
}

.section-title p {
  color: var(--blue);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.section-title h2 {
  font-size: 25px;
}

.section-title button {
  align-items: center;
  background: #f04d36;
  border-radius: 11px;
  color: #fff;
  display: flex;
  font-size: 31px;
  height: 44px;
  justify-content: center;
  line-height: 1;
  padding: 0 0 4px;
  width: 44px;
}

.upgrades-list {
  display: grid;
  gap: 14px;
  height: calc(100% - 70px);
  overflow-y: auto;
  padding: 0 2px 6px 0;
}

.upgrade-summary {
  background: linear-gradient(#172033, #101827);
  border: 3px solid #263a63;
  border-radius: 16px;
  box-shadow: 0 7px 0 rgba(0, 0, 0, 0.22);
  color: #fff;
  padding: 13px;
}

.upgrade-summary span {
  color: #49f3ff;
  display: block;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.upgrade-summary strong {
  display: block;
  font-size: 22px;
  margin-top: 4px;
}

.upgrade-summary p {
  color: #dbe7ff;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.3;
  margin: 6px 0 0;
}

.investment-plan {
  display: grid;
  gap: 7px;
  margin-top: 10px;
}

.investment-plan article {
  align-items: center;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  display: grid;
  gap: 8px;
  grid-template-columns: auto 1fr auto;
  min-width: 0;
  padding: 8px;
}

.investment-plan article > b {
  align-items: center;
  background: #ffee18;
  border-radius: 50%;
  color: #173055;
  display: flex;
  font-size: 12px;
  height: 24px;
  justify-content: center;
  width: 24px;
}

.investment-plan div {
  min-width: 0;
}

.investment-plan span,
.investment-plan em {
  display: block;
  line-height: 1.15;
}

.investment-plan span {
  color: #ffffff;
  font-size: 12px;
  font-weight: 900;
}

.investment-plan em {
  color: #dbe7ff;
  font-size: 10px;
  font-style: normal;
  font-weight: 800;
  margin-top: 2px;
}

.investment-plan article > strong {
  color: #8df257;
  font-size: 11px;
  white-space: nowrap;
}

.investment-plan .locked > strong {
  color: #ffbf1e;
}

.upgrade-group {
  display: grid;
  gap: 8px;
}

.upgrade-group > header {
  align-items: center;
  display: flex;
  justify-content: space-between;
  padding: 0 2px;
}

.upgrade-group > header h3 {
  font-size: 17px;
  margin: 0;
}

.upgrade-group > header span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.upgrade-group-grid {
  display: grid;
  gap: 10px;
}

.upgrade-card {
  background: #fff;
  border: 4px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 6px 0 rgba(60, 77, 112, 0.16);
  display: grid;
  gap: 8px;
  grid-template-columns: auto 1fr auto;
  padding: 10px;
}

.upgrade-card.recommended {
  border-color: #ffee18;
  box-shadow: 0 6px 0 rgba(176, 143, 0, 0.28), 0 0 0 3px rgba(255, 238, 24, 0.22);
}

.upgrade-icon-badge {
  align-items: center;
  background: linear-gradient(#318dff, #1d6eed);
  border: 3px solid #154eb3;
  border-radius: 12px;
  color: #fff;
  display: flex;
  font-size: 12px;
  font-weight: 900;
  height: 44px;
  justify-content: center;
  width: 44px;
}

.upgrade-card h3 {
  font-size: 15px;
  letter-spacing: 0;
  margin: 0 0 3px;
}

.upgrade-card p {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.28;
  margin: 0;
}

.upgrade-meta {
  color: var(--blue);
  display: block;
  font-size: 12px;
  font-weight: 900;
}

.upgrade-impact {
  background: #f1f5ff;
  border-radius: 8px;
  color: #4a5369;
  font-size: 11px;
  font-weight: 900;
  line-height: 1.2;
  margin-top: 7px;
  padding: 7px 8px;
}

.upgrade-card.recommended .upgrade-impact {
  background: #fff9bf;
  color: #7b5a00;
}

.upgrade-simulation {
  background: #f8fbff;
  border: 2px solid #d9e4f6;
  border-radius: 10px;
  display: grid;
  gap: 7px;
  margin-top: 8px;
  padding: 8px;
}

.upgrade-simulation header {
  align-items: center;
  display: flex;
  gap: 8px;
  justify-content: space-between;
}

.upgrade-simulation header span,
.upgrade-simulation p {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  line-height: 1.15;
  margin: 0;
}

.upgrade-simulation header strong {
  border-radius: 999px;
  color: #fff;
  font-size: 9px;
  padding: 4px 6px;
  white-space: nowrap;
}

.upgrade-simulation .risk-good {
  background: #079323;
}

.upgrade-simulation .risk-warn {
  background: #b47a00;
}

.upgrade-simulation .risk-bad {
  background: #d93324;
}

.upgrade-sim-grid {
  display: grid;
  gap: 5px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.upgrade-sim-grid article {
  background: #ffffff;
  border: 1px solid #d8e1f2;
  border-radius: 8px;
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 6px;
}

.upgrade-sim-grid span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 900;
}

.upgrade-sim-grid strong {
  color: var(--ink);
  font-size: 12px;
  line-height: 1;
}

.upgrade-sim-grid i {
  background: #20d838;
  border-radius: 999px;
  display: block;
  height: 4px;
}

.upgrade-sim-grid .bad i {
  background: #ef4e38;
}

.upgrade-sim-grid .bad strong {
  color: #d93324;
}

.upgrade-sim-grid .good strong {
  color: #079323;
}

.upgrade-card button {
  align-self: center;
  background: #18c936;
  border-bottom: 6px solid #0e7d24;
  border-radius: 10px;
  color: #fff;
  min-height: 44px;
  min-width: 88px;
  padding: 8px 10px;
}

.upgrade-card button:disabled {
  background: #a9b2be;
  border-bottom-color: #737c87;
}

.level-bar {
  background: #dce3ef;
  border-radius: 999px;
  grid-column: span 3;
  height: 10px;
  overflow: hidden;
}

.level-bar span {
  background: linear-gradient(90deg, #20d838, #ffee16);
  display: block;
  height: 100%;
}

.toast {
  background: #161616;
  border: 4px solid #fff;
  border-radius: 14px;
  bottom: 24px;
  box-shadow: var(--shadow-hard);
  color: #fff;
  font-weight: 900;
  left: 50%;
  max-width: min(520px, calc(100vw - 40px));
  opacity: 0;
  padding: 13px 16px;
  pointer-events: none;
  position: fixed;
  transform: translate(-50%, 18px);
  transition: opacity 180ms ease, transform 180ms ease;
  width: max-content;
  z-index: 80;
}

.toast.visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

@keyframes bob {
  0%,
  100% {
    translate: 0 0;
  }
  50% {
    translate: 0 -5px;
  }
}

@keyframes hoverBot {
  0%,
  100% {
    translate: 0 0;
  }
  50% {
    translate: 0 -8px;
  }
}

@keyframes truckRoll {
  from {
    translate: -220px 0;
  }
  to {
    translate: 1380px 0;
  }
}

@keyframes spin {
  to {
    rotate: 360deg;
  }
}

@media (max-width: 1220px) {
  .game-shell {
    min-width: 980px;
  }

  .pc-layout {
    grid-template-columns: 250px minmax(0, 1fr) 270px;
  }

  .brand-block {
    min-width: 260px;
  }

  .brand-block h1 {
    font-size: 20px;
  }

  .resource-pill strong,
  .day-chip {
    font-size: 21px;
  }

  .flow-minimap {
    width: min(330px, calc(100% - 24px));
  }

  .station-inspector {
    bottom: 44px;
    width: 258px;
  }

  .mini-map-node {
    min-height: 48px;
  }

  .mini-map-node b {
    display: none;
  }
}
