@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&family=Noto+Serif+JP:wght@400;700&display=swap');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #080c14;
  font-family: 'Courier New', monospace;
  color: #e0d8c8;
}

#app {
  width: 100vw;
  height: 100vh;
  position: relative;
  overflow: hidden;
}

/* Game is always full screen */
#game-container {
  position: fixed;
  inset: 0;
  background: #080c14;
}

/* ── HTML overlay panels ──────────────────────────────────────────────────── */
.info-panel {
  position: absolute;
  top: 12px;
  left: 12px;
  width: 260px;
  background: rgba(15, 18, 35, 0.96);
  border: 2px solid rgba(232, 201, 126, 0.7);
  border-radius: 10px;
  color: #e0d8c8;
  font-family: 'Courier New', monospace;
  font-size: 12px;
  z-index: 200;
  backdrop-filter: blur(4px);
  animation: fadeIn 0.15s ease-out;
  overflow: hidden;
}
.info-panel.hidden { display: none; }

.panel-titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px 8px;
  background: rgba(15, 52, 96, 0.8);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.panel-titlebar .panel-title {
  font-family: 'Press Start 2P', monospace;
  font-size: 9px;
  color: #e8c97e;
  flex: 1;
}
.panel-titlebar .panel-subtitle {
  font-size: 9px;
  color: #7ec8e3;
  margin: 0 8px;
}
.panel-close {
  background: none;
  border: none;
  color: #555577;
  font-size: 16px;
  cursor: pointer;
  padding: 0 2px;
  line-height: 1;
  flex-shrink: 0;
}
.panel-close:hover { color: #e74c3c; }

.panel-accent-bar {
  height: 3px;
  width: 100%;
}

.panel-body {
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 70vh;
  overflow-y: auto;
}
.panel-body::-webkit-scrollbar { width: 4px; }
.panel-body::-webkit-scrollbar-thumb { background: #0f3460; border-radius: 2px; }

.panel-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 2px 0;
  font-size: 11px;
}
.panel-row .row-label {
  font-family: 'Press Start 2P', monospace;
  font-size: 7px;
  color: #7a8aaa;
  flex-shrink: 0;
  margin-right: 8px;
}
.panel-row .row-value {
  color: #e0d8e8;
  text-align: right;
  font-size: 11px;
}

.panel-section-header {
  font-family: 'Press Start 2P', monospace;
  font-size: 7px;
  color: #444466;
  text-align: center;
  padding: 6px 0 2px;
  letter-spacing: 1px;
}

.cron-view-btn {
  margin-top: 10px;
  width: 100%;
  padding: 6px 10px;
  background: #2c3e50;
  color: #e8d5a3;
  border: 1px solid #e8c97e44;
  border-radius: 4px;
  font-family: 'Press Start 2P', monospace;
  font-size: 8px;
  cursor: pointer;
  text-align: center;
  transition: background 0.2s;
}
.cron-view-btn:hover { background: #3d5166; }

.cron-list {
  margin-top: 8px;
  border-top: 1px solid #ffffff15;
  padding-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.cron-list.hidden { display: none; }

.cron-entry {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 5px 6px;
  background: #ffffff08;
  border-radius: 3px;
  border-left: 2px solid #e8c97e66;
}
.cron-schedule {
  font-family: 'Courier New', monospace;
  font-size: 9px;
  color: #e8c97e;
}
.cron-cmd {
  font-family: 'Courier New', monospace;
  font-size: 9px;
  color: #aaaaaa;
  word-break: break-all;
}

.upgrade-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 6px;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.12s;
  border: 1px solid transparent;
}
.upgrade-row:hover {
  background: rgba(255,255,255,0.06);
  border-color: rgba(232,201,126,0.3);
}
.upgrade-row .upg-level {
  font-family: 'Press Start 2P', monospace;
  font-size: 7px;
  color: #e8c97e;
}
.upgrade-row .upg-meta {
  font-size: 10px;
  color: #9999bb;
}
.upgrade-row .upg-note {
  font-size: 9px;
  color: #7777aa;
  font-style: italic;
  margin-top: 2px;
  padding-left: 4px;
}

/* ── Citizen job title ───────────────────────────────────────────────────── */
.citizen-job {
  font-size: 10px;
  color: #888;
  margin: 2px 0 6px 0;
  letter-spacing: 0.02em;
}

/* ── Citizen profile flavor text ─────────────────────────────────────────── */
.citizen-flavor {
  margin-top: 10px;
  padding: 8px 10px;
  border-left: 2px solid #c9a96e;
  font-size: 11px;
  color: #c9a96e;
  font-style: italic;
  line-height: 1.4;
  background: rgba(201, 169, 110, 0.07);
  border-radius: 0 4px 4px 0;
}

/* ── Upgrade tooltip ─────────────────────────────────────────────────────── */
.upgrade-tooltip {
  position: absolute;
  top: 12px;
  left: 286px; /* right of main panel */
  width: 220px;
  background: rgba(10, 12, 28, 0.97);
  border: 1px solid rgba(232,201,126,0.5);
  border-radius: 8px;
  padding: 10px 12px 12px;
  color: #c8c8e8;
  font-size: 11px;
  z-index: 201;
  animation: fadeIn 0.15s ease-out;
}
.upgrade-tooltip.hidden { display: none; }
.upgrade-tooltip .tooltip-title {
  font-family: 'Press Start 2P', monospace;
  font-size: 8px;
  color: #e8c97e;
  margin-bottom: 6px;
}
.upgrade-tooltip .tooltip-line {
  font-size: 10px;
  color: #9999cc;
  margin-bottom: 3px;
}
.upgrade-tooltip .tooltip-work-label {
  font-family: 'Press Start 2P', monospace;
  font-size: 7px;
  color: #7ec8e3;
  margin-top: 8px;
  margin-bottom: 3px;
}
.upgrade-tooltip .tooltip-note {
  font-size: 10px;
  color: #aaaacc;
  font-style: italic;
  margin-top: 6px;
  padding: 4px 6px;
  border-left: 2px solid #444466;
}
.upgrade-tooltip .tooltip-close {
  position: absolute;
  top: 6px; right: 8px;
  background: none; border: none;
  color: #444466; font-size: 14px; cursor: pointer;
}
.upgrade-tooltip .tooltip-close:hover { color: #e74c3c; }

#game-container canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
  background: #080c14;
  image-rendering: pixelated;
  image-rendering: crisp-edges; /* Firefox */
}

/* ── Sidebar ─────────────────────────────────────────────────────────────── */
/* Hamburger button — always visible over the game */
#menu-toggle {
  position: fixed;
  top: 14px;
  right: 14px;
  z-index: 900;
  background: rgba(15, 52, 96, 0.85);
  border: 1px solid rgba(126, 200, 227, 0.4);
  border-radius: 8px;
  color: #e8d5a3;
  font-size: 20px;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  backdrop-filter: blur(4px);
  transition: background 0.15s, opacity 0.2s;
}
#menu-toggle:hover { background: rgba(26, 42, 110, 0.95); }

/* Backdrop */
#sidebar-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
#sidebar-backdrop.visible {
  opacity: 1;
  pointer-events: auto;
}

/* Sidebar drawer */
.sidebar {
  position: fixed;
  top: 0;
  right: 0;
  width: min(420px, 100vw);
  height: 100vh;
  background: #0a0f1e;
  border-left: 1px solid rgba(140, 180, 220, 0.2);
  display: flex;
  flex-direction: column;
  z-index: 1001;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

.sidebar.open {
  transform: translateX(0);
}

/* Inner content */
#sidebar-inner {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 0;
}

/* Close button inside header */
#sidebar-close {
  background: none;
  border: none;
  color: #7ec8e3;
  font-size: 18px;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  line-height: 1;
  flex-shrink: 0;
  transition: background 0.15s;
}
#sidebar-close:hover { background: rgba(126, 200, 227, 0.15); }

/* Header */
#gazette-header {
  padding: 10px 16px;
  background: linear-gradient(135deg, #0d1a2e 0%, #111927 100%);
  border-bottom: 1px solid rgba(200, 160, 80, 0.3);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
  gap: 6px;
  min-width: 0;
}

#gazette-header h2 {
  font-family: 'Press Start 2P', monospace;
  font-size: 11px;
  color: #c8a050;
  letter-spacing: 1px;
  flex-shrink: 0;
}

#world-clock {
  font-family: 'Press Start 2P', monospace;
  font-size: 9px;
  color: #7ec8e3;
}

/* ── Accordion ───────────────────────────────────────────────────────────── */
.accordion-section {
  display: flex;
  flex-direction: column;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  flex-shrink: 0;
}

.accordion-section.flex-grow {
  flex: 1;
  overflow: hidden;
  min-height: 0;
}

.accordion-header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  background: #0d1525;
  border: none;
  color: #c0b8a8;
  cursor: pointer;
  font-family: 'Press Start 2P', monospace;
  font-size: 8px;
  text-align: left;
  width: 100%;
  transition: background 0.15s;
  flex-shrink: 0;
}
.accordion-header:hover { background: rgba(140, 180, 220, 0.08); }

.acc-icon { font-size: 12px; }
.acc-title { flex: 1; }
.acc-count {
  font-size: 7px;
  background: rgba(126,200,227,0.15);
  color: #7ec8e3;
  border-radius: 8px;
  padding: 1px 6px;
  min-width: 18px;
  text-align: center;
}
.acc-chevron { font-size: 10px; color: #555; }

.accordion-body {
  overflow: hidden;
  transition: max-height 0.2s ease, opacity 0.2s ease;
  max-height: 600px;
  opacity: 1;
}

.accordion-body.flex-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  max-height: none;
}

.accordion-body.collapsed {
  max-height: 0 !important;
  opacity: 0;
}

/* Agent Roster inside accordion */
#agent-roster {
  padding: 8px 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 24px;
}

.roster-agent {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 10px;
  background: rgba(255,255,255,0.05);
}

.roster-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.roster-agent.offline {
  opacity: 0.4;
}

.roster-agent.offline .roster-dot {
  background: #555 !important;
}

/* --- Gazette Feed --- */
#gazette-feed {
  flex: 1;
  overflow-y: auto;
  padding: 8px 12px;
  min-height: 0;
}

#gazette-feed::-webkit-scrollbar {
  width: 6px;
}

#gazette-feed::-webkit-scrollbar-track {
  background: #16213e;
}

#gazette-feed::-webkit-scrollbar-thumb {
  background: #0f3460;
  border-radius: 3px;
}

.gazette-entry {
  padding: 8px 10px;
  margin-bottom: 6px;
  border-radius: 4px;
  background: rgba(255,255,255,0.03);
  border-left: 3px solid #333;
  animation: fadeIn 0.3s ease-in;
  font-size: 13px;
  line-height: 1.4;
}

.gazette-entry .entry-icon {
  margin-right: 4px;
}

.gazette-entry .entry-agent {
  font-weight: bold;
}

.gazette-entry .entry-time {
  float: right;
  font-size: 10px;
  color: #666;
}

.gazette-entry .entry-content {
  color: #c8c0b0;
}

/* Entry type colors */
.gazette-entry[data-type="agent:speak"] {
  border-left-color: #e8d5a3;
}
.gazette-entry[data-type="agent:joined"] {
  border-left-color: #27ae60;
}
.gazette-entry[data-type="agent:online"] {
  border-left-color: #3498db;
}
.gazette-entry[data-type="agent:offline"] {
  border-left-color: #7f8c8d;
}
.gazette-entry[data-type="agent:move"] {
  border-left-color: #8e7cc3;
}
.gazette-entry[data-type="agent:action"] {
  border-left-color: #e67e22;
}
.gazette-entry[data-type="time:tick"] {
  border-left-color: #7ec8e3;
  opacity: 0.6;
  font-size: 11px;
}
.gazette-entry[data-type="world:event"] {
  border-left-color: #f39c12;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* --- Chat bubble style for agent:speak --- */
.chat-bubble {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
}

.chat-bubble .entry-content.chat-message {
  width: 100%;
  margin-top: 2px;
  padding: 4px 8px;
  background: rgba(255,255,255,0.06);
  border-radius: 0 8px 8px 8px;
  color: #e0d8c8;
}

.agent-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  vertical-align: middle;
}

.entry-emoji {
  font-size: 14px;
  vertical-align: middle;
}

/* --- Night banner --- */
.night-banner {
  text-align: center;
  padding: 12px 16px;
  margin-bottom: 8px;
  background: rgba(20,20,50,0.5);
  border-radius: 6px;
  color: #7ec8e3;
  font-size: 13px;
  letter-spacing: 1px;
  animation: fadeIn 0.5s ease-in;
}

/* --- Roster count --- */
.roster-count {
  font-size: 10px;
  color: #7ec8e3;
  padding: 2px 8px;
  border-radius: 10px;
  background: rgba(126,200,227,0.1);
}

/* --- Building panel --- */
.building-panel {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 240px;
  background: rgba(22, 33, 62, 0.95);
  border: 2px solid #0f3460;
  border-radius: 8px;
  z-index: 100;
  color: #e0d8c8;
  font-size: 12px;
  overflow: hidden;
  animation: fadeIn 0.2s ease-in;
}

.building-panel.hidden {
  display: none;
}

.building-panel .panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  background: #0f3460;
  font-family: 'Press Start 2P', monospace;
  font-size: 10px;
  color: #e8d5a3;
  gap: 8px;
}

.building-panel .panel-header button {
  background: none;
  border: none;
  color: #888;
  cursor: pointer;
  font-size: 14px;
  padding: 0 4px;
}

.building-panel .panel-header button:hover {
  color: #e74c3c;
}

.building-panel .panel-section {
  padding: 8px 12px;
  border-top: 1px solid rgba(255,255,255,0.05);
}

.building-panel .panel-section h4 {
  font-size: 9px;
  font-family: 'Press Start 2P', monospace;
  color: #7ec8e3;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.panel-worker {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-right: 8px;
  margin-bottom: 4px;
  font-size: 11px;
}

.panel-empty {
  color: #555;
  font-style: italic;
  font-size: 11px;
}

.panel-upgrade {
  font-size: 11px;
  padding: 2px 0;
  color: #c8c0b0;
}

.panel-upgrade .panel-time {
  color: #666;
  font-size: 9px;
  float: right;
}

/* --- Gazette entry colors for new types --- */
.gazette-entry[data-type="agent:work"] {
  border-left-color: #e67e22;
}
.gazette-entry[data-type="building:upgraded"] {
  border-left-color: #f1c40f;
  background: rgba(241, 196, 15, 0.05);
}

/* --- Empty state --- */
.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: #555;
  font-style: italic;
}

/* Daily stats row — Forge build */
.world-stats {
  display: flex;
  gap: 10px;
  padding: 5px 0 8px 0;
  font-size: 10px;
  font-family: 'Courier New', monospace;
  color: #7a9ab0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  margin-bottom: 4px;
}
.world-stats .stat {
  background: rgba(255,255,255,0.04);
  border-radius: 4px;
  padding: 2px 8px;
  white-space: nowrap;
}

/* ── Roadmap Panel ────────────────────────────────────────────────────────── */
.roadmap-panel {
  width: 300px;
  max-height: 480px;
  top: 12px;
  left: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.roadmap-panel .panel-body.roadmap-body {
  overflow-y: auto;
  max-height: 400px;
  padding: 4px 0 8px 0;
}

.roadmap-loading {
  color: #7a9ab0;
  font-size: 11px;
  padding: 12px 14px;
  font-family: 'Courier New', monospace;
}

.roadmap-group {
  margin-bottom: 6px;
}

.roadmap-group-header {
  font-family: 'Press Start 2P', monospace;
  font-size: 7px;
  letter-spacing: 0.5px;
  padding: 5px 14px 4px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  margin-bottom: 2px;
}

.roadmap-status-active  { color: #7ec8e3; }
.roadmap-status-idea    { color: #e8c97e; }
.roadmap-status-done    { color: #6aaa7a; opacity: 0.75; }

.roadmap-item {
  padding: 6px 14px 5px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}

.roadmap-item-title {
  font-family: 'Courier New', monospace;
  font-size: 11px;
  color: #e8d5a3;
  line-height: 1.4;
  margin-bottom: 3px;
}

.roadmap-item-meta {
  display: flex;
  gap: 8px;
  align-items: center;
}

.roadmap-tag {
  font-family: 'Courier New', monospace;
  font-size: 9px;
  background: rgba(255,255,255,0.07);
  color: #a0b8c8;
  border-radius: 3px;
  padding: 1px 5px;
}

.roadmap-agents {
  font-family: 'Courier New', monospace;
  font-size: 9px;
  color: #7a9ab0;
}

/* Roadmap button in gazette-header */
#gazette-header-controls {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  overflow: hidden;
}

#connection-status, #viewer-count {
  white-space: nowrap;
  flex-shrink: 1;
  min-width: 0;
}

/* World Stats accordion content */
.stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 0;
  font-size: 11px;
  color: #ccc;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.stat-row:last-child { border-bottom: none; }
.stat-label { color: #aaa; }
.stat-val { color: #e8d5a3; font-weight: bold; }

#roadmap-btn {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(232,197,126,0.3);
  border-radius: 5px;
  color: #e8d5a3;
  font-size: 13px;
  padding: 2px 6px;
  cursor: pointer;
  line-height: 1;
  transition: background 0.15s;
}

#roadmap-btn:hover {
  background: rgba(232,197,126,0.18);
}

/* ── Town Pulse ─────────────────────────────────────────────────────────── */
.pulse-row {
  padding: 3px 0;
  font-size: 12px;
  color: #ddd;
}

.pulse-highlight {
  margin-top: 6px;
  padding: 5px;
  background: rgba(255,215,0,0.1);
  border-left: 2px solid gold;
  font-size: 11px;
  color: #ffd700;
  font-style: italic;
}

/* Zoom controls */
#zoom-controls {
  position: fixed;
  bottom: 54px;
  left: 16px;
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
#zoom-controls button {
  width: 32px;
  height: 32px;
  background: rgba(20,20,20,0.82);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 6px;
  color: #e8d5a3;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}
#zoom-controls button:hover { background: rgba(40,40,40,0.95); }

/* ── Mobile — responsive layout, touch targets, safe areas ─────────────── */
@media (max-width: 768px) {
  .sidebar {
    width: 100vw;
  }

  /* Touch-friendly zoom controls */
  #zoom-controls {
    bottom: max(12px, env(safe-area-inset-bottom));
    right: max(12px, env(safe-area-inset-right));
    left: auto;
    top: auto;
  }
  #zoom-controls button {
    width: 44px;
    height: 44px;
    font-size: 20px;
  }

  /* Safe area for hamburger on notch phones */
  #menu-toggle {
    top: max(8px, env(safe-area-inset-top));
    right: max(8px, env(safe-area-inset-right));
  }

  /* Info panels — fit mobile viewport */
  .info-panel {
    width: calc(100vw - 24px);
    max-width: 360px;
    max-height: 60vh;
    left: 12px !important;
    right: 12px !important;
    bottom: max(70px, calc(70px + env(safe-area-inset-bottom)));
    top: auto !important;
    transform: none !important;
    font-size: 10px;
  }

  /* Upgrade tooltip repositioned for mobile */
  .upgrade-tooltip {
    left: 12px !important;
    top: auto !important;
    bottom: max(70px, calc(70px + env(safe-area-inset-bottom)));
    width: calc(100vw - 24px);
    max-width: 360px;
  }

  .noticeboard-panel {
    width: calc(100vw - 24px) !important;
    max-width: 360px;
    max-height: 60vh;
  }
}

/* ── Notice Board Panel ──────────────────────────────────────────────────── */
.noticeboard-panel {
  width: 300px;
  max-height: 70vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.noticeboard-panel .panel-body {
  overflow-y: auto;
  max-height: 55vh;
}
.noticeboard-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 4px 0;
}
.notice-card {
  padding: 8px 10px;
  border-radius: 6px;
  border-left: 3px solid #c9a96e;
  background: rgba(201, 169, 110, 0.08);
  transition: opacity 0.3s;
}
.notice-fresh {
  border-left-color: #c9a96e;
  background: rgba(201, 169, 110, 0.10);
}
.notice-aging {
  border-left-color: #b8a060;
  background: rgba(184, 160, 96, 0.06);
  opacity: 0.85;
}
.notice-yellowed {
  border-left-color: #8a7a4a;
  background: rgba(138, 122, 74, 0.05);
  opacity: 0.6;
}
.notice-announcement {
  border-left-color: #e67e22;
  background: rgba(230, 126, 34, 0.12);
}
.notice-announcement .notice-author {
  color: #e67e22;
}
.notice-header {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  margin-bottom: 4px;
}
.notice-icon { font-size: 12px; }
.notice-author {
  color: #c9a96e;
  font-weight: bold;
}
.notice-age {
  margin-left: auto;
  color: #666;
  font-size: 9px;
}
.notice-message {
  color: #d8d0c0;
  font-size: 11px;
  line-height: 1.5;
  word-break: break-word;
}

/* ── District Navigation ──────────────────────────────────────────────────── */
#district-nav {
  position: fixed;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  z-index: 1000;
  flex-wrap: wrap;
  justify-content: center;
}

.dist-btn {
  background: rgba(10, 15, 30, 0.82);
  color: #c9a84c;
  border: 1px solid rgba(201, 168, 76, 0.4);
  border-radius: 6px;
  padding: 5px 9px;
  font-size: 10px;
  font-family: 'Press Start 2P', monospace;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, border-color 0.15s;
}

.dist-btn:hover {
  background: rgba(30, 40, 70, 0.92);
  border-color: #c9a84c;
}

.dist-btn.active {
  background: rgba(201, 168, 76, 0.25);
  border-color: #c9a84c;
}
