/* ============================================================
   MICROPOLIS AGENT ARENA — Spectator UI
   ============================================================ */

:root {
  --bg-primary: #0a0b10;
  --bg-panel: #11141c;
  --bg-panel-2: #151923;
  --bg-panel-3: #1a2030;
  --bg-elevated: #1e2536;
  --bg-overlay: rgba(7, 9, 14, 0.74);
  --border: #232b3e;
  --border-bright: #384564;
  --text-primary: #edf1f7;
  --text-secondary: #aeb8cb;
  --text-dim: #71809f;
  --green: #68f0a6;
  --green-glow: rgba(104, 240, 166, 0.16);
  --amber: #ffcf70;
  --amber-glow: rgba(255, 207, 112, 0.14);
  --cyan: #66d7ff;
  --red: #ff6d8b;
  --blue: #7eb2ff;
  --text-mono: 'IBM Plex Mono', 'Courier New', monospace;
  --text-sans: 'IBM Plex Sans', 'Helvetica Neue', sans-serif;
  --sidebar-width: 420px;
  --header-h: 52px;
  --footer-h: 88px;
  --radius: 14px;
  --shadow: 0 18px 48px rgba(0, 0, 0, 0.28);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-height: 100%;
  margin: 0;
  background:
    radial-gradient(circle at top, rgba(102, 215, 255, 0.08), transparent 32%),
    linear-gradient(180deg, #090b11 0%, #0b0d14 100%);
  color: var(--text-primary);
  font-family: var(--text-sans);
}

body {
  overflow: hidden;
}

a {
  color: var(--green);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.app-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--sidebar-width);
  height: 100vh;
  width: 100vw;
}

.game-panel {
  display: flex;
  min-width: 0;
  flex-direction: column;
  background:
    radial-gradient(circle at 20% 10%, rgba(104, 240, 166, 0.06), transparent 32%),
    linear-gradient(180deg, #060709 0%, #000 100%);
  border-right: 1px solid var(--border);
}

.game-header,
.game-footer {
  flex-shrink: 0;
  background: rgba(9, 11, 18, 0.92);
  backdrop-filter: blur(12px);
}

.game-header {
  min-height: var(--header-h);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 16px;
}

.game-title {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  color: var(--green);
  font-family: var(--text-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.title-icon {
  font-size: 18px;
}

.title-sub {
  color: var(--text-dim);
  font-size: 10px;
  font-weight: 500;
}

.game-hud {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  font-family: var(--text-mono);
  font-size: 12px;
}

.hud-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.hud-label {
  color: var(--text-dim);
  font-size: 9px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.hud-value {
  color: var(--amber);
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.hud-sep {
  color: var(--border-bright);
}

.canvas-container {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  cursor: grab;
  background: #000;
}

.canvas-container:active {
  cursor: grabbing;
}

#game-canvas {
  display: block;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

.canvas-loading {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  background: rgba(0, 0, 0, 0.88);
  z-index: 2;
}

.canvas-loading.hidden {
  display: none;
}

.loading-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid rgba(255, 255, 255, 0.08);
  border-top-color: var(--green);
  border-radius: 999px;
  animation: spin 0.8s linear infinite;
}

.loading-text {
  color: var(--green);
  font-family: var(--text-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.game-footer {
  min-height: var(--footer-h);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
}

.minimap-container {
  flex-shrink: 0;
}

#mini-canvas {
  width: 72px;
  height: 60px;
  border: 1px solid var(--border-bright);
  border-radius: 8px;
  image-rendering: pixelated;
  display: block;
}

.minimap-label {
  margin-top: 4px;
  color: var(--text-dim);
  font-family: var(--text-mono);
  font-size: 9px;
  letter-spacing: 0.16em;
  text-align: center;
  text-transform: uppercase;
}

.game-controls {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.game-controls-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.game-attribution {
  color: var(--text-dim);
  font-size: 11px;
  line-height: 1.35;
}

.game-attribution strong {
  color: var(--text-secondary);
}

.game-attribution:hover {
  color: var(--green);
  text-decoration: none;
}

.ctrl-btn {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--border-bright);
  border-radius: 999px;
  background: var(--bg-panel-3);
  color: var(--text-primary);
  cursor: pointer;
  font-family: var(--text-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  transition: border-color 0.18s ease, background 0.18s ease, color 0.18s ease;
  white-space: nowrap;
}

.ctrl-btn:hover {
  border-color: var(--green);
  background: var(--green-glow);
  color: var(--green);
}

.ctrl-btn.active {
  border-color: var(--amber);
  color: var(--amber);
  background: var(--amber-glow);
}

.status-bar {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
  font-family: var(--text-mono);
  font-size: 11px;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--text-dim);
}

.status-dot.connected {
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
}

.status-dot.reasoning {
  background: var(--amber);
  box-shadow: 0 0 8px var(--amber);
  animation: blink 1s step-start infinite;
}

.status-dot.acting {
  background: var(--cyan);
  box-shadow: 0 0 8px var(--cyan);
}

.status-dot.error {
  background: var(--red);
  box-shadow: 0 0 8px var(--red);
}

@keyframes blink {
  50% { opacity: 0.35; }
}

.sidebar {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  background:
    linear-gradient(180deg, rgba(14, 18, 28, 0.98) 0%, rgba(10, 12, 19, 0.98) 100%);
  overflow: hidden;
  position: relative;
}

.sidebar.reasoning {
  box-shadow: inset 3px 0 0 var(--amber), -8px 0 36px rgba(255, 207, 112, 0.1);
}

.sidebar.acting {
  box-shadow: inset 3px 0 0 var(--green), -8px 0 36px rgba(104, 240, 166, 0.1);
}

.sidebar-pinned {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px 14px 12px;
  border-bottom: 1px solid var(--border);
  background:
    linear-gradient(180deg, rgba(19, 23, 33, 0.98) 0%, rgba(14, 17, 27, 0.94) 100%);
}

.sidebar-section {
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(19, 24, 35, 0.92);
}

.section-header,
.panel-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.section-icon {
  flex-shrink: 0;
  font-size: 13px;
}

.section-title {
  color: var(--text-secondary);
  font-family: var(--text-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.strategy-section {
  background:
    linear-gradient(180deg, rgba(38, 32, 17, 0.42) 0%, rgba(19, 24, 35, 0.96) 100%);
}

.strategy-text {
  color: var(--amber);
  font-family: var(--text-sans);
  font-size: 14px;
  line-height: 1.55;
}

.agent-status-section {
  padding: 10px 14px;
  background: rgba(14, 18, 26, 0.96);
}

.status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.agent-status-indicator {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
  font-family: var(--text-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
}

.agent-status-indicator.observing { color: var(--cyan); }
.agent-status-indicator.reasoning { color: var(--amber); }
.agent-status-indicator.acting { color: var(--green); }
.agent-status-indicator.waiting { color: var(--text-dim); }

.status-pulse {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: currentColor;
  flex-shrink: 0;
}

.agent-status-indicator.reasoning .status-pulse {
  animation: pulse 1.2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 207, 112, 0.45); }
  55% { box-shadow: 0 0 0 8px rgba(255, 207, 112, 0); }
}

.turn-counter {
  color: var(--text-dim);
  font-family: var(--text-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
}

.metrics-grid {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

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

.kpi-card {
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(28, 34, 48, 0.92);
}

.kpi-label,
.metric-divider,
.demand-badge,
.metric-label,
.kpi-sub,
.kpi-delta {
  font-family: var(--text-mono);
}

.kpi-label {
  color: var(--text-dim);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.metric-value {
  color: var(--text-primary);
  font-family: var(--text-mono);
  font-size: 18px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.metric-value.good { color: var(--green); }
.metric-value.warn { color: var(--amber); }
.metric-value.bad { color: var(--red); }

.kpi-sub,
.kpi-delta {
  color: var(--text-dim);
  font-size: 10px;
  line-height: 1.4;
}

.kpi-delta.up { color: var(--green); }
.kpi-delta.down { color: var(--red); }

.metric-divider {
  margin-top: 4px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  color: var(--text-dim);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.metric-row {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: space-between;
}

.metric-label {
  color: var(--text-secondary);
  font-size: 10px;
  flex: 0 0 92px;
}

.demand-bar-container {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
}

.demand-badge {
  width: 62px;
  color: var(--text-dim);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.demand-badge.high { color: var(--green); }
.demand-badge.med { color: var(--amber); }
.demand-badge.low { color: var(--text-dim); }

.demand-bar {
  position: relative;
  height: 8px;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--border-bright);
  border-radius: 999px;
  background: rgba(9, 12, 18, 0.9);
}

.demand-bar::after {
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--fill, 0%);
  border-radius: 999px;
  transition: width 0.4s ease;
}

.demand-r::after { background: linear-gradient(90deg, rgba(104, 240, 166, 0.25), var(--green)); }
.demand-c::after { background: linear-gradient(90deg, rgba(102, 215, 255, 0.25), var(--cyan)); }
.demand-i::after { background: linear-gradient(90deg, rgba(255, 207, 112, 0.25), var(--amber)); }

.demand-val {
  width: 48px;
  color: var(--text-secondary);
  font-family: var(--text-mono);
  font-size: 11px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.sidebar-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: 12px 14px 0;
}

.sidebar-tab {
  min-height: 40px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(23, 28, 39, 0.88);
  color: var(--text-secondary);
  cursor: pointer;
  font-family: var(--text-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  transition: border-color 0.18s ease, color 0.18s ease, background 0.18s ease;
}

.sidebar-tab:hover {
  border-color: var(--border-bright);
  color: var(--text-primary);
}

.sidebar-tab.active {
  border-color: var(--blue);
  background: rgba(126, 178, 255, 0.16);
  color: var(--blue);
}

.sidebar-tab-panels {
  flex: 1;
  min-height: 0;
  padding: 12px 14px 14px;
}

.tab-panel {
  height: 100%;
  min-height: 0;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: rgba(14, 18, 27, 0.92);
  display: flex;
  flex-direction: column;
}

.tab-panel[hidden] {
  display: none;
}

.panel-header {
  padding: 14px 16px 10px;
  margin-bottom: 0;
  border-bottom: 1px solid var(--border);
}

.thinking-stream,
.action-log,
.guide-panel {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 14px 16px 16px;
}

.thinking-stream,
.action-log,
.guide-panel,
.inspector-body,
.sidebar {
  scrollbar-width: thin;
  scrollbar-color: var(--border-bright) transparent;
}

.thinking-stream::-webkit-scrollbar,
.action-log::-webkit-scrollbar,
.guide-panel::-webkit-scrollbar,
.inspector-body::-webkit-scrollbar,
.sidebar::-webkit-scrollbar {
  width: 8px;
}

.thinking-stream::-webkit-scrollbar-thumb,
.action-log::-webkit-scrollbar-thumb,
.guide-panel::-webkit-scrollbar-thumb,
.inspector-body::-webkit-scrollbar-thumb,
.sidebar::-webkit-scrollbar-thumb {
  background: var(--border-bright);
  border-radius: 999px;
}

.thinking-placeholder,
.action-placeholder,
.inspector-empty {
  color: var(--text-dim);
  font-style: italic;
}

.thinking-placeholder,
.action-placeholder {
  font-family: var(--text-mono);
  font-size: 12px;
}

.turn-card {
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(25, 31, 44, 0.92);
  overflow: hidden;
}

.turn-card + .turn-card {
  margin-top: 12px;
}

.turn-card.collapsed .turn-body {
  display: none;
}

.turn-summary {
  width: 100%;
  padding: 14px 16px;
  border: 0;
  background: none;
  color: inherit;
  cursor: pointer;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  text-align: left;
}

.turn-summary:hover {
  background: rgba(255, 255, 255, 0.02);
}

.turn-summary-main {
  min-width: 0;
}

.turn-badge {
  display: inline-block;
  margin-bottom: 6px;
  color: var(--text-dim);
  font-family: var(--text-mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.turn-summary-text {
  color: var(--text-primary);
  font-size: 14px;
  line-height: 1.45;
}

.turn-summary-meta {
  margin-top: 6px;
  color: var(--text-secondary);
  font-family: var(--text-mono);
  font-size: 10px;
}

.turn-toggle {
  flex-shrink: 0;
  color: var(--text-dim);
  font-family: var(--text-mono);
  font-size: 12px;
}

.turn-body {
  padding: 0 16px 16px;
  border-top: 1px solid var(--border);
}

.step-card {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(16, 20, 29, 0.84);
  border-left: 3px solid var(--border-bright);
}

.step-card.observe { border-left-color: var(--cyan); }
.step-card.reason { border-left-color: var(--amber); }
.step-card.plan { border-left-color: var(--blue); }
.step-card.act { border-left-color: var(--green); }
.step-card.reflect { border-left-color: #dd98ff; }

.step-card.streaming {
  background: rgba(255, 207, 112, 0.06);
}

.step-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.step-icon {
  flex-shrink: 0;
}

.step-label,
.step-ts {
  font-family: var(--text-mono);
  font-size: 10px;
}

.step-label {
  color: var(--text-secondary);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.step-ts {
  margin-left: auto;
  color: var(--text-dim);
}

.step-body {
  color: var(--text-secondary);
  font-family: var(--text-mono);
  font-size: 12px;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
}

.step-card.streaming .step-body::after {
  content: '▌';
  color: var(--amber);
  animation: blink 0.8s step-start infinite;
}

.action-entry {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 8px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.action-entry:last-child {
  border-bottom: 0;
}

.action-icon {
  padding-top: 2px;
  font-size: 12px;
}

.action-icon.success { color: var(--green); }
.action-icon.failure { color: var(--red); }

.action-text-wrap {
  min-width: 0;
}

.action-text {
  color: var(--text-primary);
  font-size: 13px;
  line-height: 1.45;
}

.action-time {
  margin-top: 4px;
  color: var(--text-dim);
  font-family: var(--text-mono);
  font-size: 10px;
}

.guide-panel {
  display: grid;
  gap: 12px;
  align-content: start;
}

.guide-card {
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(21, 26, 38, 0.96);
}

.guide-card h3 {
  margin: 0 0 10px;
  color: var(--amber);
  font-size: 13px;
}

.guide-card p {
  margin: 0 0 8px;
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.5;
}

.guide-card p:last-child {
  margin-bottom: 0;
}

.sidebar-footer {
  padding: 12px 16px 18px;
  color: var(--text-dim);
  font-size: 11px;
  text-align: center;
  display: none;
}

.opennash-link {
  color: var(--text-dim);
}

.opennash-link strong {
  color: var(--text-secondary);
}

.opennash-link:hover {
  color: var(--green);
  text-decoration: none;
}

.inspector-backdrop {
  position: fixed;
  inset: 0;
  background: var(--bg-overlay);
  z-index: 20;
}

.inspector-sheet {
  position: fixed;
  left: max(16px, env(safe-area-inset-left));
  right: max(16px, env(safe-area-inset-right));
  bottom: max(16px, env(safe-area-inset-bottom));
  z-index: 21;
  max-width: 520px;
  margin: 0 auto;
  border: 1px solid var(--border-bright);
  border-radius: 24px;
  background: rgba(15, 19, 28, 0.97);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.inspector-handle {
  width: 48px;
  height: 5px;
  border-radius: 999px;
  background: var(--border-bright);
  margin: 10px auto 0;
}

.inspector-header {
  padding: 14px 18px 12px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--border);
}

.inspector-eyebrow {
  color: var(--text-dim);
  font-family: var(--text-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.inspector-title {
  margin: 6px 0 4px;
  font-size: 22px;
  line-height: 1.1;
}

.inspector-subtitle {
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.4;
}

.inspector-close {
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-panel-3);
  color: var(--text-primary);
  cursor: pointer;
  font-size: 15px;
}

.inspector-body {
  max-height: min(58vh, 460px);
  overflow: auto;
  padding: 16px 18px 20px;
}

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

.inspector-card {
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(24, 29, 42, 0.95);
}

.inspector-card.full {
  grid-column: 1 / -1;
}

.inspector-label {
  color: var(--text-dim);
  font-family: var(--text-mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.inspector-value {
  margin-top: 6px;
  color: var(--text-primary);
  font-size: 14px;
  line-height: 1.4;
}

.inspector-flags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.flag-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(28, 34, 48, 0.96);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-family: var(--text-mono);
  font-size: 10px;
}

.flag-chip.on {
  border-color: rgba(104, 240, 166, 0.28);
  color: var(--green);
  background: var(--green-glow);
}

@media (max-width: 1180px) {
  :root {
    --sidebar-width: 390px;
  }

  .game-header {
    flex-wrap: wrap;
    padding: 10px 14px;
  }

  .game-hud {
    width: 100%;
    justify-content: flex-start;
  }
}

@media (max-width: 860px) {
  body {
    overflow: auto;
  }

  .app-layout {
    display: flex;
    flex-direction: column;
    min-height: 100svh;
    height: auto;
  }

  .game-panel {
    min-height: 56svh;
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .game-header {
    align-items: flex-start;
  }

  .game-title {
    flex-wrap: wrap;
  }

  .game-hud {
    flex-wrap: wrap;
    gap: 6px 10px;
  }

  .game-footer {
    flex-wrap: wrap;
    min-height: unset;
    justify-content: space-between;
  }

  .game-controls-stack {
    gap: 6px;
  }

  .status-bar {
    width: 100%;
    margin-left: 0;
  }

  .sidebar {
    min-height: 44svh;
  }

  .sidebar-tab-panels {
    min-height: 360px;
  }

  .inspector-sheet {
    left: env(safe-area-inset-left);
    right: env(safe-area-inset-right);
    bottom: 0;
    max-width: none;
    border-radius: 22px 22px 0 0;
  }

  .inspector-body {
    max-height: 52svh;
    padding-bottom: calc(24px + env(safe-area-inset-bottom));
  }
}

@media (max-width: 560px) {
  .game-header,
  .game-footer,
  .sidebar-pinned,
  .sidebar-tabs,
  .sidebar-tab-panels,
  .sidebar-footer {
    padding-left: 12px;
    padding-right: 12px;
  }

  .game-attribution {
    display: none;
  }

  .sidebar-footer {
    display: block;
  }

  .game-hud {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hud-sep {
    display: none;
  }

  .kpi-grid,
  .inspector-grid {
    grid-template-columns: 1fr;
  }

  .metric-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .metric-label {
    flex: none;
  }

  .demand-bar-container {
    width: 100%;
  }

  .turn-summary {
    padding: 12px 14px;
  }

  .turn-summary-text {
    font-size: 13px;
  }

  .step-card {
    padding: 10px 12px;
  }

  .inspector-header {
    padding: 12px 14px 10px;
  }

  .inspector-title {
    font-size: 18px;
  }

  .inspector-body {
    padding: 14px;
  }
}
