/* ===== 蹭饭地图 - Global Styles ===== */

:root {
  --bg: #f5f3ef;
  --surface: #ffffff;
  --primary: #d4623a;
  --primary-dark: #b84a2a;
  --primary-light: #fdf0ea;
  --text: #2c2416;
  --text-secondary: #6b5e4a;
  --text-muted: #9b8e7a;
  --border: #e8e0d5;
  --shadow: 0 2px 16px rgba(44, 36, 22, 0.08);
  --shadow-lg: 0 8px 32px rgba(44, 36, 22, 0.12);
  --radius: 12px;
  --radius-sm: 8px;
  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  /* iOS safe-area fallbacks (overridden via meta viewport-fit=cover) */
  --safe-bottom: 0px;
  --safe-top: 0px;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial,
    sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
}

/* ===== Gate Overlay ===== */
.gate-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: linear-gradient(135deg, #f5f3ef 0%, #fdf0ea 50%, #fef5e7 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}
.gate-overlay.dismissed {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.gate-card {
  text-align: center;
  width: 360px;
  max-width: 88vw;
  padding: 40px 32px;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  animation: gateIn 0.5s ease-out;
}
@keyframes gateIn {
  from { opacity: 0; transform: translateY(24px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.gate-emblem {
  height: 80px;
  width: auto;
  border-radius: 50%;
  margin-bottom: 16px;
  box-shadow: 0 2px 16px rgba(212, 98, 58, 0.15);
}

.gate-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}
.gate-sub {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 28px;
}

.gate-form { text-align: left; }
.gate-label {
  display: block;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
  text-align: center;
}
.gate-input {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 16px;
  font-family: inherit;
  color: var(--text);
  text-align: center;
  transition: border-color 0.2s;
  outline: none;
}
.gate-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(212, 98, 58, 0.1);
}
.gate-input.wrong {
  border-color: #d32f2f;
  animation: shake 0.4s ease;
}
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-6px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
}

.gate-error {
  color: #d32f2f;
  font-size: 13px;
  margin-top: 8px;
  text-align: center;
  opacity: 0;
  transition: opacity 0.2s;
}
.gate-error.show { opacity: 1; }

.gate-btn {
  width: 100%;
  margin-top: 16px;
  padding: 12px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.2s, transform 0.15s;
}
.gate-btn:hover { background: var(--primary-dark); transform: translateY(-1px); }
.gate-btn:active { transform: translateY(0); }

/* ===== Header ===== */
.header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0 32px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
}

.header-brand .icon {
  font-size: 26px;
}

.brand-logo {
  height: 30px;
  width: auto;
  border-radius: 4px;
}

.brand-emblem {
  height: 28px;
  width: auto;
  border-radius: 50%;
  /* class emblem is square — round crop looks clean alongside the GTC logo */
}

.header-nav {
  display: flex;
  gap: 8px;
}

.header-nav a {
  text-decoration: none;
  color: var(--text-secondary);
  padding: 8px 18px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  transition: var(--transition);
}

.header-nav a:hover,
.header-nav a.active {
  color: var(--primary);
  background: var(--primary-light);
}

/* ===== Main Content ===== */
.main {
  max-width: 1400px;
  margin: 0 auto;
  padding: 24px 32px;
}

/* ===== Search Bar ===== */
.search-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 0 16px;
  margin-bottom: 16px;
  height: 48px;
  transition: box-shadow 0.2s;
}
.search-bar:focus-within {
  box-shadow: 0 0 0 3px rgba(212, 98, 58, 0.12), var(--shadow);
}
.search-icon {
  font-size: 18px;
  flex-shrink: 0;
  opacity: 0.5;
}
.search-bar input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 15px;
  font-family: inherit;
  color: var(--text);
  background: transparent;
  min-width: 0;
}
.search-bar input::placeholder {
  color: var(--text-muted);
}
.search-clear {
  display: none;
  background: none;
  border: none;
  font-size: 16px;
  cursor: pointer;
  color: var(--text-muted);
  padding: 4px 8px;
  border-radius: 4px;
  flex-shrink: 0;
}
.search-clear:hover {
  color: var(--text);
  background: var(--bg);
}
.search-clear.visible {
  display: inline-flex;
}

.search-all {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  background: var(--primary-light);
  color: var(--primary);
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: var(--transition);
  white-space: nowrap;
}
.search-all:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.search-all.off {
  background: transparent;
  color: var(--text-muted);
  border-color: var(--border);
}
.search-all.off:hover {
  background: var(--bg);
  color: var(--text-secondary);
}

/* Rotation slider for label angle */
.rotation-group {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  margin-left: 2px;
  padding: 0 4px;
}
.rotation-icon {
  font-size: 14px;
  opacity: 0.5;
  flex-shrink: 0;
}
.rotation-group input[type="range"] {
  width: 56px;
  height: 4px;
  -webkit-appearance: none;
  appearance: none;
  background: var(--border);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
  flex-shrink: 0;
}
.rotation-group input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--primary);
  border: 2px solid #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,0.15);
  cursor: pointer;
  transition: transform 0.15s;
}
.rotation-group input[type="range"]::-webkit-slider-thumb:active {
  transform: scale(1.2);
}
.rotation-group input[type="range"]::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--primary);
  border: 2px solid #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,0.15);
  cursor: pointer;
}
.rotation-val {
  font-size: 11px;
  color: var(--text-muted);
  min-width: 24px;
  text-align: center;
  flex-shrink: 0;
}

/* ===== Map Page Layout ===== */
.map-layout {
  display: flex;
  gap: 24px;
  height: calc(100vh - 140px);
  min-height: 600px;
}

.map-container {
  flex: 1;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  position: relative;
  touch-action: manipulation; /* prevent double-tap zoom */
}

.map-container .chart {
  width: 100%;
  height: 100%;
}

/* ===== Side Panel ===== */
.side-panel {
  width: 380px;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: var(--transition);
}

.side-panel.empty {
  display: flex;
  align-items: center;
  justify-content: center;
}

.panel-header {
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.panel-header h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
}

.panel-header .badge {
  background: var(--primary-light);
  color: var(--primary);
  font-size: 13px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 20px;
}

.panel-close {
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: var(--text-muted);
  padding: 4px;
  border-radius: 4px;
  transition: var(--transition);
}

.panel-close:hover {
  color: var(--text);
  background: var(--bg);
}

.panel-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px 16px;
}

.panel-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--text-muted);
  text-align: center;
  padding: 32px;
}

.panel-empty .hint-icon {
  font-size: 64px;
  margin-bottom: 16px;
  opacity: 0.6;
}

.panel-empty p {
  font-size: 15px;
  line-height: 1.8;
}

/* Province group (show-all view) */
.province-group {
  margin-bottom: 4px;
}
.province-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px 8px;
  position: sticky;
  top: 0;
  background: var(--surface);
  z-index: 1;
}
.province-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--primary);
}
.province-count {
  font-size: 12px;
  color: var(--text-muted);
  background: var(--bg);
  padding: 2px 10px;
  border-radius: 10px;
}

/* Person Card */
.person-card {
  padding: 16px 20px;
  margin: 8px 0;
  background: var(--bg);
  border-radius: var(--radius-sm);
  transition: var(--transition);
  border-left: 3px solid transparent;
}

.person-card:hover {
  border-left-color: var(--primary);
  background: #fdf7f3;
  transform: translateX(4px);
}

.person-card .name {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}

.person-card .info {
  font-size: 13px;
  color: var(--text-secondary);
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.person-card .info span {
  display: flex;
  align-items: center;
  gap: 4px;
}

.person-card .info .label {
  color: var(--text-muted);
}

/* Search result highlight */
.search-highlight {
  background: #fde4c8;
  color: #b84a2a;
  border-radius: 2px;
  padding: 0 1px;
}

/* ===== Stats Bar ===== */
.stats-bar {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  flex: 1;
  background: var(--surface);
  border-radius: var(--radius);
  padding: 20px 24px;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 16px;
}

.stat-card .stat-icon {
  font-size: 32px;
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-light);
  border-radius: var(--radius-sm);
}

.stat-card .stat-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
}

.stat-card .stat-label {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ===== Admin Page ===== */
.admin-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}

.admin-toolbar .left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(212, 98, 58, 0.3);
}

.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
}

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

.btn-danger {
  background: #fff;
  color: #d32f2f;
  border: 1px solid #f5c6cb;
}

.btn-danger:hover {
  background: #fff5f5;
  border-color: #d32f2f;
}

.btn-sm {
  padding: 6px 14px;
  font-size: 13px;
}

.btn-ghost {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 6px 10px;
  cursor: pointer;
  font-size: 13px;
  border-radius: 4px;
  transition: var(--transition);
}

.btn-ghost:hover {
  color: var(--primary);
  background: var(--primary-light);
}

/* Select */
.select-filter {
  padding: 10px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--text);
  background: var(--surface);
  cursor: pointer;
  font-family: inherit;
  min-width: 160px;
  transition: var(--transition);
}

.select-filter:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(212, 98, 58, 0.1);
}

/* Table */
.table-wrapper {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

table {
  width: 100%;
  border-collapse: collapse;
}

thead {
  background: var(--bg);
}

th {
  padding: 14px 20px;
  text-align: left;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

td {
  padding: 14px 20px;
  font-size: 14px;
  border-top: 1px solid var(--border);
}

tbody tr {
  transition: var(--transition);
}

tbody tr:hover {
  background: #fdf7f3;
}

.actions-cell {
  display: flex;
  gap: 4px;
}

/* ===== Modal ===== */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(44, 36, 22, 0.4);
  backdrop-filter: blur(4px);
  z-index: 200;
  align-items: center;
  justify-content: center;
}

.modal-overlay.open {
  display: flex;
}

.modal {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  width: 480px;
  max-width: 90vw;
  max-height: 90vh;
  overflow-y: auto;
  animation: modalIn 0.25s ease-out;
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-header h3 {
  font-size: 18px;
  font-weight: 600;
}

.modal-body {
  padding: 24px;
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* Form */
.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: inherit;
  color: var(--text);
  background: var(--surface);
  transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(212, 98, 58, 0.1);
}

/* Toast */
.toast-container {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  color: #fff;
  animation: toastIn 0.3s ease-out;
  box-shadow: var(--shadow-lg);
}

.toast.success {
  background: #2e7d32;
}

.toast.error {
  background: #c62828;
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateX(40px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Empty state for table */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-muted);
}

.empty-state .empty-icon {
  font-size: 48px;
  margin-bottom: 12px;
  opacity: 0.6;
}

/* ===== Page Title ===== */
.page-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}

.page-subtitle {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 20px;
}

/* ===== Footer ===== */
.footer {
  text-align: center;
  padding: 16px;
  padding-bottom: calc(16px + var(--safe-bottom));
  color: var(--text-muted);
  font-size: 13px;
}

.footer-emblem {
  display: block;
  height: 32px;
  width: auto;
  margin: 0 auto 8px;
  opacity: 0.45;
}

/* ===== Responsive ===== */

/* Tablet & below (≤900px) */
@media (max-width: 900px) {
  .main {
    padding: 16px 16px;
  }

  .map-layout {
    flex-direction: column;
    height: auto;
  }
  .map-container {
    flex: none;
    height: min(420px, 55vh);
  }
  .side-panel {
    flex: none;
    width: 100%;
    max-height: 360px;
  }
  .stats-bar {
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 16px;
  }
  .stat-card {
    min-width: 140px;
    flex: 1 1 auto;
  }
  .admin-toolbar {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* Phone (≤640px) */
@media (max-width: 640px) {
  /* ---- Safe-area aware variables ---- */
  :root {
    --safe-bottom: env(safe-area-inset-bottom, 0px);
    --safe-top: env(safe-area-inset-top, 0px);
  }

  /* Header */
  .header {
    padding: 0 12px;
    padding-top: var(--safe-top);
    height: calc(50px + var(--safe-top));
  }
  .header-brand {
    font-size: 15px;
    gap: 5px;
    min-width: 0;         /* allow shrink */
  }
  .brand-logo {
    height: 22px;
    flex-shrink: 0;
  }
  .brand-emblem {
    height: 20px;
    flex-shrink: 0;
  }
  .header-nav a {
    font-size: 11px;
    padding: 5px 6px;
    white-space: nowrap;
  }
  .header-nav {
    gap: 1px;
  }

  /* Main */
  .main {
    padding: 12px;
  }

  /* Search */
  .search-bar {
    height: 42px;
    padding: 0 12px;
    margin-bottom: 10px;
    border-radius: var(--radius-sm);
  }
  .search-bar input {
    font-size: 16px; /* prevent iOS auto-zoom */
  }
  .search-all {
    padding: 6px 10px;
    font-size: 13px;
  }
  .rotation-group input[type="range"] {
    width: 40px;
  }
  .rotation-val {
    display: none;
  }

  /* Stats */
  .stats-bar {
    gap: 8px;
  }
  .stat-card {
    padding: 12px 14px;
    gap: 10px;
    min-width: 0;
  }
  .stat-card .stat-icon {
    font-size: 24px;
    width: 40px;
    height: 40px;
  }
  .stat-card .stat-value {
    font-size: 22px;
  }
  .stat-card .stat-label {
    font-size: 11px;
  }

  /* Map */
  .map-container {
    flex: none;
    height: min(340px, 45vh);
    border-radius: var(--radius-sm);
  }

  /* Panel stays in normal flow (column below map), always visible.
     Tablet rules (≤900px) already set flex-direction: column +
     width: 100% + max-height: 360px — no bottom-sheet overlay needed. */

  /* Footer */
  .footer {
    font-size: 11px;
    padding: 12px 8px;
    padding-bottom: calc(20px + var(--safe-bottom));
  }

  /* Admin table → horizontal scroll */
  .table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  table {
    min-width: 620px;
  }
  th, td {
    padding: 10px 12px;
    font-size: 13px;
  }

  /* Admin toolbar */
  .admin-toolbar .left {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    width: 100%;
  }
  .select-filter {
    min-width: 0;
    width: 100%;
  }

  /* Page title */
  .page-title {
    font-size: 20px;
  }
  .page-subtitle {
    font-size: 12px;
    margin-bottom: 14px;
  }

  /* Modal → bottom sheet style on phone */
  .modal {
    width: 100%;
    max-width: 100vw;
    max-height: 85vh;
    border-radius: 16px 16px 0 0;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding-bottom: var(--safe-bottom);
    animation: modalUp 0.3s ease-out;
  }
  @keyframes modalUp {
    from { transform: translateY(100%); }
    to   { transform: translateY(0); }
  }
  .modal-header { padding: 16px 20px; }
  .modal-body   { padding: 20px; }
  .modal-footer { padding: 12px 20px; }

  /* Form inputs: 16px to prevent iOS auto-zoom */
  .form-group input,
  .form-group select {
    font-size: 16px;
    padding: 12px 14px;
  }
  .form-group label {
    font-size: 14px;
  }

  /* Buttons: larger touch targets */
  .btn {
    padding: 12px 20px;
    font-size: 15px;
    min-height: 44px;
  }
  .btn-sm {
    padding: 8px 12px;
    font-size: 13px;
    min-height: 36px;
  }

  /* Toast: bottom-center with safe area */
  .toast-container {
    top: auto;
    bottom: calc(24px + var(--safe-bottom));
    right: 16px;
    left: 16px;
    align-items: center;
  }
  .toast {
    font-size: 13px;
    padding: 10px 18px;
    text-align: center;
  }

  /* Login page */
  .login-card {
    padding: 32px 24px;
    margin: 16px;
  }
  .login-emblem {
    height: 56px;
  }
  .footer-emblem {
    height: 24px;
  }

  /* Person cards */
  .person-card {
    padding: 14px 16px;
  }
  .person-card .name {
    font-size: 15px;
  }
  .person-card .info {
    font-size: 12px;
    gap: 12px;
  }
}

/* Extra-small (≤360px: iPhone SE 1st-gen, tiny Androids) */
@media (max-width: 360px) {
  .header {
    padding: 0 8px;
  }
  .header-brand {
    font-size: 13px;
    gap: 4px;
  }
  .brand-logo {
    height: 18px;
  }
  .brand-emblem {
    height: 16px;
  }
  .header-nav a {
    font-size: 10px;
    padding: 4px 5px;
  }

  .stat-card {
    padding: 10px 10px;
    gap: 8px;
  }
  .stat-card .stat-icon {
    font-size: 20px;
    width: 34px;
    height: 34px;
  }
  .stat-card .stat-value {
    font-size: 18px;
  }

  .map-container {
    flex: none;
    height: min(280px, 40vh);
  }
  .person-card {
    padding: 12px 14px;
  }
  .person-card .name { font-size: 14px; }
  .person-card .info { font-size: 11px; gap: 8px; }

  .page-title { font-size: 18px; }
  .rotation-group { display: none; }
}
