/* ═══════════════════════════════════════════════════
   StadiumAI — Design System
   Aesthetic: Dark industrial · mission-control · sporty
   Fonts: Barlow Condensed (headings) · Space Mono (data) · Barlow (body)
═══════════════════════════════════════════════════ */

/* ── RESET & VARIABLES ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* Core palette */
  --bg-deep:    #080c18;
  --bg-base:    #0d1225;
  --bg-panel:   #111828;
  --bg-raised:  #161e30;
  --bg-hover:   #1c2640;

  /* Accent */
  --accent:         #0a84ff;
  --accent-dim:     rgba(10, 132, 255, 0.15);
  --accent-border:  rgba(10, 132, 255, 0.35);

  /* Status colours */
  --green:    #00d68f;
  --green-dim: rgba(0, 214, 143, 0.12);
  --amber:    #ffb627;
  --amber-dim: rgba(255, 182, 39, 0.12);
  --red:      #ff4b4b;
  --red-dim:  rgba(255, 75, 75, 0.12);

  /* Text */
  --text-primary:   #e8eaf0;
  --text-secondary: #8a91a8;
  --text-muted:     #4a5168;
  --text-accent:    #0a84ff;

  /* Borders */
  --border:       rgba(255,255,255,0.06);
  --border-light: rgba(255,255,255,0.10);

  /* Fonts */
  --font-display: 'Barlow Condensed', sans-serif;
  --font-body:    'Barlow', sans-serif;
  --font-mono:    'Space Mono', monospace;

  /* Sizing */
  --topbar-h:  52px;
  --sidebar-w: 300px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;

  /* Transitions */
  --t-fast: 120ms ease;
  --t-med:  220ms ease;
}

/* ── BASE ── */
html { font-size: 16px; }

body {
  background: var(--bg-deep);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.5;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

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

.skip-link {
  position: absolute;
  top: -40px; left: 12px;
  background: var(--accent);
  color: #fff;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: var(--font-body);
  z-index: 9999;
  text-decoration: none;
  transition: top var(--t-fast);
}
.skip-link:focus { top: 12px; }

*:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 3px;
}

/* ── TOP BAR ── */
.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--topbar-h);
  background: var(--bg-panel);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  z-index: 100;
  gap: 16px;
}

.topbar__left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.topbar__logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: .5px;
  color: var(--text-primary);
}

.topbar__logo svg { color: var(--accent); }

.topbar__venue {
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 300;
}

.topbar__center {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-raised);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  padding: 6px 16px;
  flex-shrink: 0;
}

.topbar__event-label {
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--text-secondary);
}

.topbar__countdown {
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 700;
  color: var(--amber);
  letter-spacing: 1px;
  min-width: 48px;
}

.topbar__right {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-shrink: 0;
}

.status-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 0 rgba(0, 214, 143, 0.4);
  animation: pulse-dot 2s ease infinite;
}

@keyframes pulse-dot {
  0%   { box-shadow: 0 0 0 0   rgba(0,214,143,0.4); }
  70%  { box-shadow: 0 0 0 6px rgba(0,214,143,0); }
  100% { box-shadow: 0 0 0 0   rgba(0,214,143,0); }
}

.status-dot.offline { background: var(--red); animation: none; }

.topbar__status-text {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--green);
}

/* ── APP LAYOUT ── */
.app-layout {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  height: calc(100vh - var(--topbar-h));
  margin-top: var(--topbar-h);
  overflow: hidden;
}

/* ── SIDEBAR ── */
.sidebar {
  background: var(--bg-panel);
  border-right: 1px solid var(--border);
  overflow-y: auto;
  overflow-x: hidden;
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  scrollbar-width: thin;
  scrollbar-color: var(--bg-hover) transparent;
}
.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-thumb { background: var(--bg-hover); border-radius: 4px; }

/* ── PANEL ── */
.panel {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px;
}

.panel__title {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.panel__live-badge {
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--green);
  background: var(--green-dim);
  border: 1px solid rgba(0,214,143,0.2);
  border-radius: 3px;
  padding: 1px 5px;
}

/* ── SECTION PICKER ── */
.section-picker {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.select-input {
  width: 100%;
  background: var(--bg-panel);
  border: 1px solid var(--border-light);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 14px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%238a91a8' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
  transition: border-color var(--t-fast);
}
.select-input:focus { border-color: var(--accent); }
.select-input option { background: var(--bg-panel); }

/* ── BUTTONS ── */
.btn {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .5px;
  padding: 9px 16px;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition: all var(--t-fast);
  width: 100%;
}

.btn--primary {
  background: var(--accent);
  color: #fff;
}
.btn--primary:hover { background: #2691ff; }
.btn--primary:active { transform: scale(0.98); }

/* ── SECTION BADGE ── */
.section-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--accent-dim);
  border: 1px solid var(--accent-border);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-accent);
  margin-top: 10px;
}

.section-badge__icon { font-size: 12px; }

/* ── CROWD ZONES ── */
.crowd-zones {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.crowd-zone {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  transition: border-color var(--t-fast);
}

.crowd-zone__name { color: var(--text-secondary); font-weight: 400; }

.crowd-zone__bar-wrap {
  flex: 1;
  height: 4px;
  background: var(--bg-hover);
  border-radius: 2px;
  margin: 0 10px;
  overflow: hidden;
}

.crowd-zone__bar {
  height: 100%;
  border-radius: 2px;
  transition: width 0.6s ease;
}

.crowd-zone__pct {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  min-width: 36px;
  text-align: right;
}

/* Crowd level colours */
.level-low  .crowd-zone__bar { background: var(--green); }
.level-low  .crowd-zone__pct { color: var(--green); }
.level-mid  .crowd-zone__bar { background: var(--amber); }
.level-mid  .crowd-zone__pct { color: var(--amber); }
.level-high .crowd-zone__bar { background: var(--red); }
.level-high .crowd-zone__pct { color: var(--red); }

/* ── WAIT TIMES LIST ── */
.best-stall-banner {
  background: var(--green-dim);
  border: 1px solid rgba(0,214,143,0.2);
  border-radius: var(--radius-sm);
  padding: 7px 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  font-size: 12px;
}

.best-stall-banner__label { color: var(--green); font-weight: 500; }
.best-stall-banner__value { color: var(--text-primary); font-family: var(--font-mono); font-size: 11px; }

.wait-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.wait-item {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  transition: border-color var(--t-fast);
}
.wait-item:hover { border-color: var(--border-light); }

.wait-item__name { color: var(--text-secondary); }
.wait-item__time {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  min-width: 38px;
  text-align: right;
}

.wait-item__dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

.wait-low  .wait-item__time { color: var(--green); }
.wait-low  .wait-item__dot  { background: var(--green); }
.wait-mid  .wait-item__time { color: var(--amber); }
.wait-mid  .wait-item__dot  { background: var(--amber); }
.wait-high .wait-item__time { color: var(--red); }
.wait-high .wait-item__dot  { background: var(--red); }

/* ── QUICK ACTIONS ── */
.quick-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.quick-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 12px 8px;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 12px;
  cursor: pointer;
  transition: all var(--t-fast);
}
.quick-btn:hover {
  background: var(--bg-hover);
  border-color: var(--accent-border);
  color: var(--text-primary);
}
.quick-btn:active { transform: scale(0.97); }

.quick-btn__icon {
  font-size: 16px;
  color: var(--accent);
  line-height: 1;
}

/* ── MAP AREA ── */
.map-area {
  position: relative;
  background: var(--bg-deep);
  overflow: hidden;
}

.venue-map {
  width: 100%;
  height: 100%;
}

.map-loading {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  background: var(--bg-base);
  color: var(--text-secondary);
  font-size: 14px;
  z-index: 2;
  transition: opacity var(--t-med);
}

.map-loading.hidden { opacity: 0; pointer-events: none; }

.map-loading__spinner {
  width: 32px; height: 32px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* ── MAP CONTROLS ── */
.map-controls {
  position: absolute;
  top: 16px;
  right: 16px;
  display: flex;
  gap: 6px;
  z-index: 10;
}

.map-ctrl-btn {
  background: var(--bg-panel);
  border: 1px solid var(--border-light);
  color: var(--text-secondary);
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .5px;
  padding: 7px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--t-fast);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.map-ctrl-btn:hover { background: var(--bg-hover); color: var(--text-primary); }
.map-ctrl-btn.active {
  background: var(--accent-dim);
  border-color: var(--accent-border);
  color: var(--accent);
}

/* ── ROUTE BANNER ── */
.route-banner {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-panel);
  border: 1px solid var(--accent-border);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  font-size: 14px;
  color: var(--text-primary);
  max-width: 480px;
  width: calc(100% - 32px);
  z-index: 10;
  backdrop-filter: blur(12px);
  animation: slide-up 0.2s ease;
}

@keyframes slide-up {
  from { transform: translateX(-50%) translateY(12px); opacity: 0; }
  to   { transform: translateX(-50%) translateY(0); opacity: 1; }
}

.route-banner__icon { color: var(--accent); font-size: 16px; }

.route-banner__close {
  margin-left: auto;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 14px;
  padding: 2px 6px;
  border-radius: 4px;
  line-height: 1;
  transition: color var(--t-fast);
}
.route-banner__close:hover { color: var(--text-primary); }

/* ── LOADING SKELETONS ── */
.loading-skeleton {
  background: linear-gradient(90deg, var(--bg-hover) 25%, var(--bg-raised) 50%, var(--bg-hover) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s ease infinite;
  border-radius: var(--radius-sm);
  height: 36px;
}

@keyframes shimmer {
  from { background-position: 200% 0; }
  to   { background-position: -200% 0; }
}

/* ── CHAT WIDGET ── */
.chat-widget {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
}

.chat-fab {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 28px;
  padding: 10px 18px 10px 14px;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .3px;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(10,132,255,0.4);
  transition: all var(--t-fast);
  position: relative;
}
.chat-fab:hover { background: #2691ff; transform: translateY(-1px); box-shadow: 0 6px 24px rgba(10,132,255,0.5); }
.chat-fab:active { transform: scale(0.97); }

.chat-fab__badge {
  position: absolute;
  top: -4px; right: -4px;
  width: 12px; height: 12px;
  background: var(--red);
  border-radius: 50%;
  border: 2px solid var(--bg-deep);
  font-size: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ── CHAT PANEL ── */
.chat-panel {
  width: 360px;
  max-width: calc(100vw - 32px);
  height: 500px;
  max-height: calc(100vh - 120px);
  background: var(--bg-panel);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 8px 40px rgba(0,0,0,0.6);
  animation: panel-in 0.2s ease;
}

@keyframes panel-in {
  from { opacity: 0; transform: translateY(12px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

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

.chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.chat-header__info { display: flex; align-items: center; gap: 10px; }

.chat-header__avatar {
  width: 34px; height: 34px;
  background: var(--accent-dim);
  border: 1px solid var(--accent-border);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
}

.chat-header__name { font-size: 14px; font-weight: 500; color: var(--text-primary); }
.chat-header__sub  { font-size: 11px; color: var(--text-muted); margin-top: 1px; }

.chat-header__close {
  background: none; border: none;
  color: var(--text-muted);
  font-size: 16px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: all var(--t-fast);
}
.chat-header__close:hover { color: var(--text-primary); background: var(--bg-hover); }

/* ── MESSAGES ── */
.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  scrollbar-width: thin;
  scrollbar-color: var(--bg-hover) transparent;
}
.chat-messages::-webkit-scrollbar { width: 3px; }
.chat-messages::-webkit-scrollbar-thumb { background: var(--bg-hover); border-radius: 3px; }

.msg {
  display: flex;
  gap: 8px;
  animation: msg-in 0.15s ease;
}

@keyframes msg-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.msg--user { flex-direction: row-reverse; }

.msg__bubble {
  max-width: 80%;
  padding: 9px 13px;
  border-radius: 14px;
  font-size: 13px;
  line-height: 1.55;
}

.msg--ai .msg__bubble {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  color: var(--text-primary);
  border-bottom-left-radius: 4px;
}

.msg--user .msg__bubble {
  background: var(--accent);
  color: #fff;
  border-bottom-right-radius: 4px;
}

.msg--ai .msg__avatar {
  width: 24px; height: 24px;
  background: var(--accent-dim);
  border: 1px solid var(--accent-border);
  border-radius: 7px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono);
  font-size: 8px;
  color: var(--accent);
  flex-shrink: 0;
  margin-top: 2px;
}

/* Typing indicator */
.typing-indicator {
  display: flex;
  gap: 4px;
  padding: 10px 14px;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: 14px;
  border-bottom-left-radius: 4px;
  width: fit-content;
}

.typing-indicator span {
  width: 5px; height: 5px;
  background: var(--text-muted);
  border-radius: 50%;
  animation: bounce 1.2s ease infinite;
}
.typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.4s; }

@keyframes bounce {
  0%, 80%, 100% { transform: translateY(0); }
  40%           { transform: translateY(-5px); }
}

/* ── CHIP SUGGESTIONS ── */
.chat-chips {
  display: flex;
  gap: 6px;
  padding: 8px 12px;
  overflow-x: auto;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
  scrollbar-width: none;
}
.chat-chips::-webkit-scrollbar { display: none; }

.chip {
  white-space: nowrap;
  padding: 5px 11px;
  background: var(--bg-raised);
  border: 1px solid var(--border-light);
  border-radius: 20px;
  color: var(--text-secondary);
  font-size: 12px;
  font-family: var(--font-body);
  cursor: pointer;
  transition: all var(--t-fast);
  flex-shrink: 0;
}
.chip:hover {
  background: var(--accent-dim);
  border-color: var(--accent-border);
  color: var(--text-accent);
}

/* ── CHAT INPUT ── */
.chat-input-area {
  display: flex;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}

.chat-input {
  flex: 1;
  background: var(--bg-raised);
  border: 1px solid var(--border-light);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 13px;
  padding: 9px 13px;
  border-radius: 8px;
  transition: border-color var(--t-fast);
}
.chat-input::placeholder { color: var(--text-muted); }
.chat-input:focus { border-color: var(--accent); }

.chat-send-btn {
  width: 36px; height: 36px;
  background: var(--accent);
  border: none;
  border-radius: 8px;
  color: #fff;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all var(--t-fast);
  flex-shrink: 0;
}
.chat-send-btn:hover { background: #2691ff; }
.chat-send-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* ── TOAST NOTIFICATIONS ── */
.toast-container {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  background: var(--bg-raised);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 10px 16px;
  font-size: 13px;
  color: var(--text-primary);
  min-width: 240px;
  max-width: 380px;
  text-align: center;
  animation: toast-in 0.25s ease;
  pointer-events: auto;
}

.toast--error { border-color: rgba(255,75,75,0.3); background: var(--red-dim); color: var(--red); }
.toast--success { border-color: rgba(0,214,143,0.3); background: var(--green-dim); color: var(--green); }

@keyframes toast-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── LANGUAGE BAR (Google Cloud Translation API) ── */
.chat-lang-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-top: 1px solid var(--border);
  background: var(--bg-base);
  flex-shrink: 0;
}

.chat-lang-bar__label {
  font-size: 14px;
  line-height: 1;
  color: var(--text-muted);
  flex-shrink: 0;
}

.chat-lang-select {
  flex: 1;
  background: var(--bg-raised);
  border: 1px solid var(--border-light);
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 12px;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  transition: border-color var(--t-fast);
}
.chat-lang-select:focus { border-color: var(--accent); outline: none; }
.chat-lang-select option { background: var(--bg-panel); }

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  :root { --sidebar-w: 260px; }

  .topbar__center { display: none; }

  .app-layout {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
    overflow: auto;
  }

  .sidebar {
    overflow: visible;
    height: auto;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }

  .map-area { min-height: 50vh; }

  .chat-widget { bottom: 16px; right: 16px; }
  .chat-panel  { width: calc(100vw - 32px); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ── HIGH CONTRAST MODE ── */
@media (forced-colors: active) {
  .btn, .quick-btn, .chip, .chat-fab, .map-ctrl-btn {
    border: 2px solid ButtonText !important;
  }
  .crowd-zone__bar {
    background: Highlight !important;
  }
  .status-dot {
    background: ButtonText !important;
    border: 1px solid ButtonText;
  }
}

/* ── PRINT STYLES ── */
@media print {
  .topbar, .sidebar, .map-controls, .chat-widget, .toast-container { display: none !important; }
  .app-layout { display: block; margin: 0; }
  .map-area { height: 100vh; width: 100%; }
}
