:root {
  --bg: #070a0f;
  --surface: rgba(10, 15, 23, 0.84);
  --surface-solid: #0c121b;
  --surface-hover: rgba(19, 28, 42, 0.92);
  --border: rgba(240, 168, 70, 0.18);
  --border-subtle: rgba(148, 163, 184, 0.14);
  --text: #e8edf5;
  --text-dim: #8b9bb4;
  --text-muted: #5b6b82;

  --amber: #f0a846;
  --cyan: #38d9c0;
  --emerald: #4ade80;
  --violet: #a78bfa;
  --coral: #fb7185;
  --ice: #7dd3fc;

  --accent: var(--amber);
  --danger: #f43f5e;

  --mono: ui-monospace, 'Berkeley Mono', 'JetBrains Mono', 'SF Mono', Menlo, Consolas, monospace;
  --sans: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Inter, Roboto, sans-serif;

  --radius: 10px;
  --radius-sm: 6px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
}

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

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  touch-action: none;
}

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

#map-canvas {
  display: block;
  width: 100%;
  height: 100%;
  cursor: grab;
  background: var(--bg);
}

#map-canvas:active {
  cursor: grabbing;
}

.crt-vignette {
  pointer-events: none;
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse at center, transparent 52%, rgba(3, 6, 11, 0.62) 100%),
    repeating-linear-gradient(
      to bottom,
      rgba(255, 255, 255, 0.012) 0px,
      rgba(255, 255, 255, 0.012) 1px,
      transparent 1px,
      transparent 3px
    );
  z-index: 2;
}

/* Top HUD */
.hud-top {
  position: fixed;
  top: calc(12px + var(--safe-top));
  left: calc(14px + var(--safe-left));
  right: calc(14px + var(--safe-right));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  z-index: 10;
  pointer-events: none;
}

.hud-brand, .hud-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  pointer-events: auto;
}

.hud-brand {
  padding: 8px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
}

.brand-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 10px var(--amber);
  animation: pulse-dot 2.4s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(0.82); }
}

.brand-title {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.18em;
  color: var(--text);
}

.brand-meta {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-dim);
  font-variant-numeric: tabular-nums;
  padding-left: 8px;
  border-left: 1px solid var(--border-subtle);
}

.roster {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
  max-width: 55vw;
}

.roster-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 10px;
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  color: var(--text);
  font-size: 12px;
  font-family: var(--mono);
  cursor: pointer;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: border-color 0.15s, background 0.15s, transform 0.15s;
}

.roster-pill:hover {
  background: var(--surface-hover);
  border-color: var(--border);
}

.roster-pill.active {
  border-color: var(--pill-color, var(--amber));
  box-shadow: 0 0 14px color-mix(in srgb, var(--pill-color, var(--amber)) 30%, transparent);
}

.roster-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--pill-color, var(--amber));
  box-shadow: 0 0 8px var(--pill-color, var(--amber));
}

.roster-mode {
  font-size: 10px;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  text-transform: uppercase;
}

.btn-hud {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 13px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  cursor: pointer;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
  transition: background 0.15s, border-color 0.15s;
}

.btn-hud:hover {
  background: var(--surface-hover);
  border-color: rgba(240, 168, 70, 0.45);
}

.ios-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 8px var(--cyan);
}

.badge-count {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(56, 217, 192, 0.2);
  color: var(--cyan);
  border: 1px solid rgba(56, 217, 192, 0.45);
}

.dot-stack {
  display: inline-flex;
  align-items: center;
}

.dot-stack .roster-dot {
  margin-left: -3px;
  border: 1px solid #070a0f;
}

.dot-stack .roster-dot:first-child {
  margin-left: 0;
}

/* Floating Directory & Overlap Panels */
.float-panel {
  position: fixed;
  top: calc(64px + var(--safe-top));
  left: calc(14px + var(--safe-left));
  width: min(330px, calc(100vw - 28px));
  max-height: calc(100vh - 180px - var(--safe-top) - var(--safe-bottom));
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 13px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.65);
  z-index: 12;
}

.float-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.float-panel-title {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 700;
}

.float-panel-list {
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding-right: 2px;
}

.dir-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 9px;
  border-radius: var(--radius-sm);
  background: rgba(7, 10, 15, 0.72);
  border: 1px solid var(--border-subtle);
  cursor: pointer;
  transition: border-color 0.15s;
}

.dir-row:hover {
  border-color: var(--border);
}

.dir-row.active {
  border-color: var(--amber);
}

.dir-row.muted {
  opacity: 0.45;
}

.dir-main {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1;
}

.dir-text {
  min-width: 0;
}

.dir-name {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dir-loc {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.overlap-section-title {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-top: 4px;
}

.overlap-row {
  width: 100%;
  text-align: left;
  padding: 9px 10px;
  border-radius: var(--radius-sm);
  background: rgba(7, 10, 15, 0.76);
  border: 1px solid var(--border-subtle);
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.overlap-row:hover {
  border-color: rgba(56, 217, 192, 0.5);
  background: rgba(16, 26, 40, 0.85);
}

.overlap-row.now {
  border-color: rgba(56, 217, 192, 0.45);
}

.overlap-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
}

.overlap-prob {
  color: var(--cyan);
  font-variant-numeric: tabular-nums;
}

.overlap-meta {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text-dim);
  margin-top: 3px;
}

.timeline-overlap-mark {
  position: absolute;
  top: -3px;
  width: 8px;
  height: 8px;
  margin-left: -4px;
  background: var(--cyan);
  transform: rotate(45deg);
  box-shadow: 0 0 8px var(--cyan);
}

/* Map Controls */
.map-controls {
  position: fixed;
  right: calc(14px + var(--safe-right));
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 6px;
  z-index: 9;
}

.btn-map {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: var(--mono);
  font-size: 16px;
  cursor: pointer;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: border-color 0.15s, background 0.15s;
}

.btn-map:hover {
  background: var(--surface-hover);
  border-color: var(--border);
}

/* Person Detail Card */
.person-card {
  position: fixed;
  top: calc(64px + var(--safe-top));
  left: calc(14px + var(--safe-left));
  width: min(300px, calc(100vw - 28px));
  padding: 13px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.55);
  z-index: 9;
  font-size: 12px;
}

.person-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.person-card-name {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-weight: 700;
  font-size: 13px;
}

.person-card-badge {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 4px;
  background: rgba(240, 168, 70, 0.14);
  color: var(--amber);
  border: 1px solid rgba(240, 168, 70, 0.3);
}

.person-loc-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.person-loc-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-family: var(--mono);
  font-size: 11px;
}

.person-loc-bar {
  height: 3px;
  border-radius: 2px;
  background: rgba(148, 163, 184, 0.15);
  overflow: hidden;
  margin-top: 3px;
}

.person-loc-fill {
  height: 100%;
  border-radius: 2px;
}

/* Empty State Callout */
.empty-callout {
  position: fixed;
  left: 50%;
  bottom: calc(44px + var(--safe-bottom));
  transform: translateX(-50%);
  width: min(400px, calc(100vw - 28px));
  padding: 18px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.65);
  text-align: center;
  z-index: 9;
}

.empty-kicker {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--amber);
  margin-bottom: 8px;
}

.empty-text {
  margin: 0 0 14px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-dim);
}

/* Bottom Timeline Scrubber */
.hud-timeline {
  position: fixed;
  left: 50%;
  bottom: calc(28px + var(--safe-bottom));
  transform: translateX(-50%);
  width: min(680px, calc(100vw - 28px));
  padding: 10px 14px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.6);
  z-index: 9;
}

.timeline-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.timeline-readout {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-now {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  padding: 4px 8px;
  border-radius: 4px;
  border: 1px solid var(--border-subtle);
  background: transparent;
  color: var(--text-dim);
  cursor: pointer;
}

.btn-now.active {
  background: rgba(240, 168, 70, 0.18);
  border-color: var(--amber);
  color: var(--amber);
  box-shadow: 0 0 12px rgba(240, 168, 70, 0.22);
}

.timeline-date {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.timeline-jumps {
  display: flex;
  align-items: center;
  gap: 4px;
}

.btn-jump {
  font-family: var(--mono);
  font-size: 11px;
  padding: 3px 7px;
  border-radius: 4px;
  border: 1px solid var(--border-subtle);
  background: rgba(15, 23, 36, 0.6);
  color: var(--text-dim);
  cursor: pointer;
}

.btn-jump:hover {
  border-color: var(--border);
  color: var(--text);
}

.input-date-mini {
  font-family: var(--mono);
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid var(--border-subtle);
  background: rgba(15, 23, 36, 0.8);
  color: var(--text-dim);
  color-scheme: dark;
}

.timeline-track-wrap {
  position: relative;
  height: 22px;
  display: flex;
  align-items: center;
}

.timeline-ticks {
  position: absolute;
  left: 7px;
  right: 7px;
  top: 50%;
  height: 8px;
  transform: translateY(-50%);
  pointer-events: none;
}

.timeline-tick {
  position: absolute;
  top: 0;
  height: 8px;
  min-width: 4px;
  border-radius: 2px;
  opacity: 0.72;
}

.timeline-slider {
  position: relative;
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
  height: 4px;
  background: rgba(148, 163, 184, 0.22);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}

.timeline-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--amber);
  border: 2px solid #070a0f;
  box-shadow: 0 0 12px var(--amber);
  cursor: pointer;
}

.timeline-slider::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--amber);
  border: 2px solid #070a0f;
  box-shadow: 0 0 12px var(--amber);
  cursor: pointer;
}

/* Attribution & Coords */
.hud-attrib {
  position: fixed;
  right: calc(12px + var(--safe-right));
  bottom: calc(6px + var(--safe-bottom));
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 5px;
  z-index: 8;
  font-variant-numeric: tabular-nums;
}

.hud-attrib a {
  color: var(--text-muted);
  text-decoration: none;
}

.hud-attrib a:hover {
  color: var(--text-dim);
}

/* Toasts */
.toast-stack {
  position: fixed;
  top: calc(64px + var(--safe-top));
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 40;
  pointer-events: none;
}

.toast {
  padding: 9px 14px;
  background: rgba(12, 18, 27, 0.95);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  animation: toast-in 0.2s ease-out;
}

.toast.error {
  border-color: rgba(244, 63, 94, 0.5);
  color: #fda4af;
}

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

/* Slide-Over Settings Drawer */
.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(3, 6, 11, 0.65);
  backdrop-filter: blur(4px);
  z-index: 20;
}

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(440px, 100vw);
  background: var(--surface-solid);
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  z-index: 25;
  box-shadow: -20px 0 60px rgba(0, 0, 0, 0.75);
  padding-top: var(--safe-top);
  padding-bottom: var(--safe-bottom);
  touch-action: pan-y;
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px 12px;
  border-bottom: 1px solid var(--border-subtle);
}

.drawer-kicker {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--amber);
}

.drawer-title {
  margin: 2px 0 0;
  font-size: 17px;
  font-weight: 600;
}

.btn-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  background: transparent;
  color: var(--text-dim);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.btn-icon:hover {
  color: var(--text);
  border-color: var(--border);
}

.drawer-tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(7, 10, 15, 0.55);
}

.tab-btn {
  padding: 11px 6px;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-dim);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
}

.tab-btn.active {
  color: var(--amber);
  border-bottom-color: var(--amber);
}

.drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 18px 28px;
  -webkit-overflow-scrolling: touch;
}

.tab-panel {
  display: none;
  flex-direction: column;
  gap: 16px;
}

.tab-panel.active {
  display: flex;
}

.panel-group {
  background: rgba(15, 22, 34, 0.65);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  padding: 14px;
}

.panel-group h3 {
  margin: 0 0 6px;
  font-size: 13px;
  font-family: var(--mono);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text);
}

.hint {
  margin: 0 0 10px;
  font-size: 12px;
  line-height: 1.45;
  color: var(--text-dim);
}

.field-label {
  display: block;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-dim);
  margin-bottom: 5px;
}

.input {
  width: 100%;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  background: rgba(7, 10, 15, 0.9);
  color: var(--text);
  font-family: var(--sans);
  font-size: 13px;
  color-scheme: dark;
}

.input:focus {
  outline: none;
  border-color: var(--amber);
}

.range-input {
  width: 100%;
  accent-color: var(--amber);
  margin-top: 6px;
}

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

.mt-xs { margin-top: 6px; }
.mt-sm { margin-top: 10px; }

.swatch-row {
  display: flex;
  gap: 8px;
}

.swatch {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
}

.swatch[data-color="amber"] { background: var(--amber); }
.swatch[data-color="cyan"] { background: var(--cyan); }
.swatch[data-color="emerald"] { background: var(--emerald); }
.swatch[data-color="violet"] { background: var(--violet); }
.swatch[data-color="coral"] { background: var(--coral); }
.swatch[data-color="ice"] { background: var(--ice); }

.swatch.active {
  border-color: #fff;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.4);
}

/* Search dropdown */
.place-search-wrap {
  position: relative;
}

.search-results {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  margin-top: 4px;
  background: #0e1622;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  max-height: 210px;
  overflow-y: auto;
  z-index: 30;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.7);
}

.search-item {
  width: 100%;
  text-align: left;
  padding: 8px 10px;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text);
  font-size: 12px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.search-item:hover {
  background: rgba(240, 168, 70, 0.12);
}

.search-item-coords {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text-muted);
  white-space: nowrap;
}

/* Steady-state & trip items */
.steady-list, .trip-list, .link-list, .follow-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
}

.item-card {
  padding: 10px;
  background: rgba(7, 10, 15, 0.72);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
}

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

.item-title {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
}

.item-sub {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-dim);
  margin-top: 3px;
}

.weight-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
}

.weight-pct {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--amber);
  min-width: 42px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* Buttons */
.btn-primary {
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(240, 168, 70, 0.6);
  background: rgba(240, 168, 70, 0.16);
  color: var(--amber);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.15s;
}

.btn-primary:hover {
  background: rgba(240, 168, 70, 0.26);
}

.btn-secondary {
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  background: rgba(15, 23, 36, 0.9);
  color: var(--text);
  font-family: var(--mono);
  font-size: 11px;
  cursor: pointer;
}

.btn-secondary:hover {
  border-color: var(--border);
}

.btn-danger-ghost {
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(244, 63, 94, 0.35);
  background: transparent;
  color: #fda4af;
  font-family: var(--mono);
  font-size: 11px;
  cursor: pointer;
}

.btn-danger-ghost:hover {
  background: rgba(244, 63, 94, 0.14);
}

.btn-mini {
  padding: 4px 8px;
  border-radius: 4px;
  border: 1px solid var(--border-subtle);
  background: rgba(15, 23, 36, 0.9);
  color: var(--text);
  font-family: var(--mono);
  font-size: 11px;
  cursor: pointer;
}

.btn-mini:hover {
  border-color: var(--amber);
  color: var(--amber);
}

.btn-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.full { width: 100%; }

/* Toggle row */
.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  cursor: pointer;
}

.toggle-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--amber);
}

/* Privacy banner & copy box */
.privacy-banner {
  padding: 12px 14px;
  border-radius: var(--radius);
  background: rgba(56, 217, 192, 0.08);
  border: 1px solid rgba(56, 217, 192, 0.25);
}

.privacy-title {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--cyan);
  margin-bottom: 4px;
}

.privacy-banner p {
  margin: 0;
  font-size: 12px;
  line-height: 1.45;
  color: var(--text-dim);
}

.gps-status-box {
  padding: 9px 11px;
  border-radius: var(--radius-sm);
  background: rgba(7, 10, 15, 0.8);
  border: 1px solid var(--border-subtle);
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-dim);
}

.gps-status-box.live {
  border-color: rgba(74, 222, 128, 0.35);
  color: var(--emerald);
}

.copy-box {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  background: rgba(7, 10, 15, 0.95);
  border: 1px solid var(--border-subtle);
}

.copy-box code {
  flex: 1;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--amber);
  word-break: break-all;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 6px;
}

.tag {
  font-family: var(--mono);
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(148, 163, 184, 0.12);
  color: var(--text-dim);
}

/* Tucked iOS Notice */
.ios-notice {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  background: rgba(10, 16, 26, 0.6);
  padding: 10px 12px;
  font-size: 12px;
}

.ios-notice.ios-highlight {
  border-color: rgba(56, 217, 192, 0.4);
  background: rgba(56, 217, 192, 0.06);
}

.ios-notice summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-dim);
  list-style: none;
}

.ios-notice summary::-webkit-details-marker {
  display: none;
}

.pill-mini {
  font-size: 9px;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(56, 217, 192, 0.15);
  color: var(--cyan);
}

.ios-notice-body {
  margin-top: 10px;
  color: var(--text-dim);
  line-height: 1.45;
}

.ios-notice-body p {
  margin: 0 0 8px;
}

.session-tools {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.restore-box {
  margin-top: 8px;
}

.empty-mini {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-muted);
  padding: 6px 0;
}

.hidden {
  display: none !important;
}

@media (max-width: 640px) {
  .brand-meta {
    display: none;
  }
  .btn-hud span {
    display: none;
  }
  .roster {
    max-width: 60vw;
  }
  .grid-2 {
    grid-template-columns: 1fr;
  }
  .person-card {
    top: calc(58px + var(--safe-top));
  }
}
