/* WisGuard Operations — complements the locally compiled Tailwind bundle.
   Holds what utilities can't: Leaflet dark theme, live status markers,
   skeleton shimmer, scrollbars, and the status color system. */

:root {
  color-scheme: light;
  --canvas: #f7f7f4;
  --canvas-rgb: 247 247 244;
  --panel: #ffffff;
  --panel-rgb: 255 255 255;
  --panel2: #fbfbf8;
  --panel2-rgb: 251 251 248;
  --overlay: #efeee8;
  --overlay-rgb: 239 238 232;
  --ghost: #d7d4c8;
  --ghost-rgb: 215 212 200;
  --ink: #181712;
  --ink-rgb: 24 23 18;
  --muted: #656157;
  --muted-rgb: 101 97 87;
  --brand: #7a560a;
  --brand-rgb: 122 86 10;
  --brand-hover: #624406;
  --brand-hover-rgb: 98 68 6;
  --brand-soft: rgba(166, 120, 18, 0.14);
  --ok: #10b981;
  --ok-rgb: 16 185 129;
  --warn: #f59e0b;
  --warn-rgb: 245 158 11;
  --danger: #ef4444;
  --danger-rgb: 239 68 68;
  --offline: #6b7280;
  --offline-rgb: 107 114 128;
  --info: #3b82f6;
  --info-rgb: 59 130 246;
  --shift-off: #a855f7;
  --soft-shadow: rgba(23, 21, 15, 0.14);
  --strong-shadow: rgba(23, 21, 15, 0.22);
  --modal-scrim: rgba(23, 21, 15, 0.38);
  --map-label-bg: rgba(255, 255, 255, 0.94);
  --map-label-text: #181712;
  --map-label-border: rgba(24, 23, 18, 0.16);
  --map-anchor-border: rgba(24, 23, 18, 0.42);
  --map-marker-halo: rgba(23, 21, 15, 0.25);
  --motion-fast: 140ms;
  --motion-standard: 210ms;
}

* { box-sizing: border-box; }
html[data-theme="black"] {
  color-scheme: dark;
  --canvas: #090a0c;
  --canvas-rgb: 9 10 12;
  --panel: #121519;
  --panel-rgb: 18 21 25;
  --panel2: #16191e;
  --panel2-rgb: 22 25 30;
  --overlay: #1c1f26;
  --overlay-rgb: 28 31 38;
  --ghost: #2d333b;
  --ghost-rgb: 45 51 59;
  --ink: #e5e7eb;
  --ink-rgb: 229 231 235;
  --muted: #9ca3af;
  --muted-rgb: 156 163 175;
  --brand: #2563eb;
  --brand-rgb: 37 99 235;
  --brand-hover: #1d4ed8;
  --brand-hover-rgb: 29 78 216;
  --brand-soft: rgba(37, 99, 235, 0.16);
  --ok: #10b981;
  --ok-rgb: 16 185 129;
  --warn: #f59e0b;
  --warn-rgb: 245 158 11;
  --danger: #ef4444;
  --danger-rgb: 239 68 68;
  --offline: #6b7280;
  --offline-rgb: 107 114 128;
  --info: #3b82f6;
  --info-rgb: 59 130 246;
  --shift-off: #a855f7;
  --soft-shadow: rgba(0, 0, 0, 0.5);
  --strong-shadow: rgba(0, 0, 0, 0.55);
  --modal-scrim: rgba(0, 0, 0, 0.6);
  --map-label-bg: rgba(9, 10, 12, 0.72);
  --map-label-text: #ffffff;
  --map-label-border: rgba(255, 255, 255, 0.12);
  --map-anchor-border: rgba(0, 0, 0, 0.6);
  --map-marker-halo: rgba(0, 0, 0, 0.35);
}
html, body, #app { height: 100%; }
body { margin: 0; }
:lang(th), [lang="th"] { font-family: system-ui, Tahoma, "Noto Sans Thai", sans-serif; line-height: 1.6; }

/* ---------- Scrollbars ---------- */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--ghost); border-radius: 6px; border: 2px solid var(--canvas); }
::-webkit-scrollbar-thumb:hover { background: var(--muted); }

/* ---------- Status color system ---------- */
.s-ok      { color: var(--ok); }
.s-warn    { color: var(--warn); }
.s-danger  { color: var(--danger); }
.s-offline { color: var(--offline); }
.s-info    { color: var(--info); }

/* Status chip: low-opacity tinted bg + solid text + 1px border (per DESIGN.md) */
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: 9999px;
  font-size: 11px; font-weight: 700; letter-spacing: 0.03em; text-transform: uppercase; border: 1px solid transparent; white-space: nowrap; }
.chip .dot { width: 7px; height: 7px; border-radius: 9999px; background: currentColor; }
.chip-ok      { color: var(--ok);      background: rgba(16,185,129,.13);  border-color: rgba(16,185,129,.35); }
.chip-warn    { color: var(--warn);    background: rgba(245,158,11,.13);  border-color: rgba(245,158,11,.35); }
.chip-danger  { color: var(--danger);  background: rgba(239,68,68,.14);   border-color: rgba(239,68,68,.4); }
.chip-offline { color: var(--offline); background: rgba(107,114,128,.15); border-color: rgba(107,114,128,.35); }
.chip-info    { color: var(--info);    background: rgba(59,130,246,.13);  border-color: rgba(59,130,246,.35); }
.chip-purple  { color: var(--shift-off); background: rgba(168,85,247,.13); border-color: rgba(168,85,247,.35); }
.s-purple  { color: var(--shift-off); }

.data-mono { font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; }

/* ---------- Sidebar nav ---------- */
.nav-item { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 6px;
  color: var(--muted); font-size: 14px; font-weight: 500; position: relative; cursor: pointer;
  border: 1px solid transparent; transition: background var(--motion-fast), color var(--motion-fast); width: 100%; text-align: left; }
.nav-item:hover { background: var(--overlay); color: var(--ink); }
.nav-item.active { background: var(--brand-soft); color: var(--brand); }
.nav-item.active::before { content: ""; position: absolute; left: -3px; top: 6px; bottom: 6px; width: 3px;
  border-radius: 3px; background: var(--brand); }
.nav-item svg { width: 18px; height: 18px; flex-shrink: 0; }
.nav-item[disabled] { opacity: .35; cursor: not-allowed; }
.nav-item[disabled]:hover { background: transparent; color: var(--muted); }

/* ---------- Tables ---------- */
.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.data-table thead th { text-align: left; padding: 10px 14px; font-size: 11px; font-weight: 700;
  letter-spacing: .05em; text-transform: uppercase; color: var(--muted); border-bottom: 1px solid var(--ghost); white-space: nowrap; }
.data-table tbody td { padding: 11px 14px; border-bottom: 1px solid var(--ghost); vertical-align: middle; }
.data-table tbody tr { transition: background .12s; }
.data-table tbody tr:hover { background: var(--overlay); }
.data-table tbody tr.selected { background: var(--overlay); box-shadow: inset 3px 0 0 var(--brand); }
.data-table .row-click { cursor: pointer; }

/* ---------- Buttons / inputs (page content) ---------- */
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 6px;
  font-size: 13px; font-weight: 600; cursor: pointer; border: 1px solid var(--ghost); background: transparent;
  color: var(--ink); transition: background var(--motion-fast), border-color var(--motion-fast), color var(--motion-fast), opacity var(--motion-fast); white-space: nowrap; }
.btn:hover { border-color: var(--muted); background: var(--overlay); }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-hover); border-color: var(--brand-hover); }
.btn-danger { color: var(--danger); border-color: rgba(239,68,68,.4); }
.btn-danger:hover { background: rgba(239,68,68,.12); border-color: var(--danger); }
.btn[disabled] { opacity: .4; cursor: not-allowed; }
.btn-sm { padding: 5px 10px; font-size: 12px; }

.input, .field input, .field select {
  width: 100%; background: var(--canvas); border: 1px solid var(--ghost); border-radius: 6px;
  padding: 9px 11px; font-size: 13px; color: var(--ink); outline: none; transition: border-color .15s; font-family: inherit; }
.input:focus, .field input:focus, .field select:focus { border-color: var(--brand); }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > span { font-size: 12px; font-weight: 600; color: var(--muted); }

/* ---------- Cards ---------- */
.card { background: var(--panel2); border: 1px solid var(--ghost); border-radius: 8px; }
.kpi-card { background: var(--panel2); border: 1px solid var(--ghost); border-radius: 8px; padding: 14px 16px; }
.kpi-card .kpi-value { font-size: 30px; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
.kpi-card .kpi-label { font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }

/* ---------- Skeleton shimmer ---------- */
.skeleton { position: relative; overflow: hidden; background: var(--overlay); border-radius: 6px; }
.skeleton::after { content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.06), transparent); transform: translateX(-100%);
  animation: shimmer 1.3s infinite; }
@keyframes shimmer { 100% { transform: translateX(100%); } }

/* ---------- Leaflet dark ---------- */
.leaflet-container { background: #e8ebe7; font-family: system-ui, Tahoma, "Noto Sans Thai", sans-serif; }
/* Dark-mode map: invert light raster tiles. Markers live in marker-pane, unaffected. */
.leaflet-tile-pane { filter: none; }
html[data-theme="black"] .leaflet-container { background: #0b0e12; }
html[data-theme="black"] .leaflet-tile-pane { filter: invert(1) hue-rotate(180deg) brightness(0.86) contrast(0.92) saturate(0.55); }
.leaflet-bar { border: 1px solid var(--ghost) !important; box-shadow: none !important; }
.leaflet-bar a { background: var(--panel2) !important; color: var(--ink) !important; border-bottom: 1px solid var(--ghost) !important; }
.leaflet-bar a:hover { background: var(--overlay) !important; }
.leaflet-control-attribution { background: rgba(var(--panel2-rgb),.82) !important; color: var(--muted) !important; }
.leaflet-control-attribution a { color: var(--brand) !important; }
.leaflet-popup-content-wrapper, .leaflet-popup-tip { background: var(--overlay); color: var(--ink); border: 1px solid var(--ghost); box-shadow: 0 8px 30px var(--strong-shadow); }
.leaflet-popup-content { margin: 12px 14px; font-size: 12px; }

/* ---------- Photo guard markers (photo + name above exact GPS point) ---------- */
.guard-photo-marker { display: flex; flex-direction: column; align-items: center; pointer-events: auto; }
.gpm-photo { width: 34px; height: 34px; border-radius: 9999px; object-fit: cover; display: grid; place-items: center;
  background: var(--overlay); color: #fff; font: 700 12px system-ui, Tahoma, "Noto Sans Thai", sans-serif;
  border: 3px solid var(--offline); box-shadow: 0 2px 8px var(--strong-shadow); overflow: hidden; }
.gpm-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gpm-ring-green  { border-color: var(--ok); }
.gpm-ring-yellow { border-color: var(--warn); }
.gpm-ring-red    { border-color: var(--danger); animation: gpm-pulse 1.6s infinite; }
.gpm-ring-purple { border-color: var(--shift-off); }
.gpm-ring-gray   { border-color: var(--offline); }
@keyframes gpm-pulse { 0%,100% { box-shadow: 0 2px 8px var(--strong-shadow); } 50% { box-shadow: 0 0 0 6px rgba(239,68,68,.25); } }
.gpm-label { margin-top: 1px; max-width: 96px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font: 600 10px system-ui,Tahoma,"Noto Sans Thai",sans-serif; color: var(--map-label-text); background: var(--map-label-bg);
  padding: 1px 7px; border-radius: 8px; border: 1px solid var(--map-label-border); }
.gpm-anchor { width: 7px; height: 7px; border-radius: 9999px; background: #fff; border: 2px solid var(--map-anchor-border); margin-top: 1px; }

/* ---------- Map markers ---------- */
.guard-marker { display: grid; place-items: center; }
.guard-dot { position: relative; width: 18px; height: 18px; border-radius: 9999px; border: 2px solid rgba(255,255,255,.85);
  box-shadow: 0 0 0 4px var(--map-marker-halo); display: grid; place-items: center; }
.guard-green  .guard-dot { background: var(--ok); }
.guard-yellow .guard-dot { background: var(--warn); }
.guard-red    .guard-dot { background: var(--danger); }
.guard-gray   .guard-dot { background: var(--offline); }
.guard-purple .guard-dot { background: var(--shift-off); }
.guard-green  .guard-dot { animation: pulse-ok 2s infinite; }
@keyframes pulse-ok { 0% { box-shadow: 0 0 0 0 rgba(16,185,129,.5), 0 0 0 4px var(--map-marker-halo); } 70% { box-shadow: 0 0 0 10px rgba(16,185,129,0), 0 0 0 4px var(--map-marker-halo); } 100% { box-shadow: 0 0 0 0 rgba(16,185,129,0), 0 0 0 4px var(--map-marker-halo); } }
.guard-arrow { position: absolute; top: -9px; left: 50%; width: 8px; height: 8px; margin-left: -4px;
  background: rgba(255,255,255,.95); clip-path: polygon(50% 0, 100% 100%, 0 100%); transform-origin: 50% 17px; }

.site-center-icon span { display: block; width: 14px; height: 14px; border-radius: 9999px; background: #14b8a6; border: 2px solid #0f766e; box-shadow: 0 0 12px rgba(20,184,166,.6); }
.viewer-icon span { display: block; width: 14px; height: 14px; border-radius: 9999px; background: var(--info); border: 3px solid rgba(59,130,246,.35); }

.checkpoint-marker { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 6px;
  font: 700 12px ui-monospace, "SFMono-Regular", Consolas, monospace; color: #fff; border: 1px solid rgba(255,255,255,.3); }
.checkpoint-pending { background: rgba(107,114,128,.85); }
.checkpoint-reached { background: rgba(16,185,129,.9); }
.checkpoint-marker.selected { outline: 2px solid var(--brand); outline-offset: 2px; }

.checkin-photo { display: block; margin-top: 6px; max-width: 180px; border-radius: 6px; border: 1px solid var(--ghost); }
[data-protected-image][aria-disabled="true"] { pointer-events: none; opacity: .6; }
.popup-card .popup-profile { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.popup-avatar { width: 34px; height: 34px; border-radius: 9999px; background: var(--brand); color: #fff; display: grid; place-items: center; font-weight: 700; }
.popup-card dl { display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; margin: 0; font-size: 11px; }
.popup-card dt { color: var(--muted); }
.popup-card dd { margin: 0; font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; }

.usage-meter {
  width: 100%;
  height: 4px;
  margin-bottom: 5px;
  overflow: hidden;
  background: var(--overlay);
  border-radius: 2px;
}
.usage-meter > span {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--brand);
  border-radius: inherit;
  transform-origin: left center;
  transition: transform var(--motion-standard) var(--ease-out);
}
.wg-modal-panel {
  overscroll-behavior: contain;
  box-shadow: 0 20px 64px var(--soft-shadow);
}
.modal-scrim { background: var(--modal-scrim); }

/* ---------- Language toggle ---------- */
.lang-btn, .theme-btn { color: var(--muted); transition: color .15s; }
.lang-btn.active, .theme-btn.active { color: var(--ink); }

/* ---------- Login ---------- */
#login-screen { isolation: isolate; overflow: hidden; }
#login-screen::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background: url("/assets/operations-training.jpg") center / cover no-repeat;
  opacity: .18;
}
#login-screen::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(var(--canvas-rgb), .72);
}
html[data-theme="black"] #login-screen::before { opacity: .24; }
html[data-theme="black"] #login-screen::after { background: rgba(var(--canvas-rgb), .76); }
#login-form {
  background: rgba(var(--panel2-rgb), .95);
  box-shadow: 0 18px 56px rgba(0,0,0,.16);
  backdrop-filter: blur(10px);
}
.mobile-only,
.mobile-bottom-nav,
.mobile-nav-backdrop { display: none; }

/* ---------- Toast ---------- */
.toast { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 8px;
  background: var(--overlay); border: 1px solid var(--ghost); color: var(--ink); font-size: 13px;
  box-shadow: 0 10px 30px rgba(0,0,0,.5); animation: toast-in .2s ease; max-width: 360px; }
.toast-error { border-color: rgba(239,68,68,.5); }
.toast-ok { border-color: rgba(16,185,129,.5); }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 1024px) {
  #app { min-height: 100dvh; height: 100dvh; }
  #app > aside { width: 220px; }
  #page-content .card { max-width: 100%; }
  .kpi-card .kpi-value { font-size: 24px; }
  #map, #sites-map, #cp-map { min-height: 300px; }
}

@media (max-width: 768px) {
  html, body { height: 100%; }
  body.mobile-nav-open { overflow: hidden; }
  #app {
    height: 100dvh;
    min-height: 100dvh;
    display: flex;
    overflow: hidden;
  }
  #app.hidden { display: none; }
  #app > aside {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    z-index: 1600;
    width: min(86vw, 320px);
    max-height: none;
    transform: translateX(-105%);
    transition: transform .22s ease, box-shadow .22s ease;
    overflow-y: auto;
    border-right: 1px solid var(--ghost);
    border-bottom: 0;
    box-shadow: none;
  }
  body.mobile-nav-open #app > aside {
    transform: translateX(0);
    box-shadow: 24px 0 60px rgba(0,0,0,.48);
  }
  .mobile-nav-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1500;
    display: block;
    pointer-events: none;
    background: rgba(0,0,0,.52);
    opacity: 0;
    transition: opacity .18s ease;
  }
  body.mobile-nav-open .mobile-nav-backdrop { opacity: 1; pointer-events: auto; }
  .mobile-only { display: inline-flex; }
  #nav { display: flex; flex-direction: column; gap: 4px; }
  .nav-item { min-height: 44px; padding: 10px 12px; font-size: 14px; }
  .mobile-bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1200;
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(0, 1fr);
    gap: 2px;
    padding: 6px max(6px, env(safe-area-inset-left)) calc(6px + env(safe-area-inset-bottom)) max(6px, env(safe-area-inset-right));
    border-top: 1px solid var(--ghost);
    background: color-mix(in srgb, var(--panel) 92%, transparent);
    backdrop-filter: blur(14px);
  }
  .mobile-nav-item {
    min-width: 0;
    min-height: 52px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    border: 1px solid transparent;
    border-radius: 8px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
    line-height: 1.1;
    text-align: center;
  }
  .mobile-nav-item span { max-width: 100%; overflow-wrap: anywhere; }
  .mobile-nav-item.active { color: #fff; background: rgba(37,99,235,.18); border-color: rgba(37,99,235,.35); }
  main { min-width: 0; }
  header { min-height: 56px; height: auto; padding: 8px 12px; gap: 10px; }
  header h1 { min-width: 0; font-size: 16px; line-height: 1.2; overflow-wrap: anywhere; }
  #server-status { display: none; }
  #app > .flex-1 { width: 100%; min-width: 0; }
  #dashboard-view { flex-direction: column; padding-bottom: calc(66px + env(safe-area-inset-bottom)); }
  #dashboard-view > .flex-1.min-h-0.flex { flex-direction: column; }
  #kpi-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding: 10px; }
  .kpi-card { padding: 10px; min-width: 0; }
  .kpi-card .kpi-label { overflow-wrap: anywhere; letter-spacing: 0; }
  #map { position: relative; min-height: min(64dvh, 520px); }
  .map-controls {
    left: 10px;
    right: 10px;
    top: 10px;
    align-items: stretch;
  }
  .map-controls > div { flex-wrap: wrap; justify-content: flex-end; }
  .map-controls select { min-height: 44px; width: 100%; }
  .map-controls .btn { min-height: 40px; flex: 1 1 auto; }
  #drawer { display: none !important; }
  #page-view { padding-bottom: calc(74px + env(safe-area-inset-bottom)); }
  #page-content { padding: 14px; padding-bottom: 22px; }
  #page-content form.card,
  #report-filters { grid-template-columns: 1fr !important; }
  .btn { justify-content: center; min-height: 44px; white-space: normal; }
  .chip { max-width: 100%; white-space: normal; text-align: left; }
  .card { border-radius: 8px; }
  .data-table-card { border: 0; background: transparent; }
  .data-table-wrap { overflow: visible; }
  .data-table { min-width: 0 !important; border-collapse: separate; border-spacing: 0; font-size: 13px; }
  .data-table thead { display: none; }
  .data-table tbody,
  .data-table tr,
  .data-table td { display: block; width: 100%; }
  .data-table tbody tr {
    margin-bottom: 10px;
    border: 1px solid var(--ghost);
    border-radius: 8px;
    background: var(--panel2);
    overflow: hidden;
  }
  .data-table tbody tr:hover { background: var(--panel2); }
  .data-table tbody td {
    display: grid;
    grid-template-columns: minmax(7.5rem, 38%) minmax(0, 1fr);
    gap: 10px;
    align-items: start;
    padding: 10px 12px;
    border-bottom: 1px solid var(--ghost);
    overflow-wrap: anywhere;
  }
  .data-table tbody td:last-child { border-bottom: 0; }
  .data-table tbody td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0;
  }
  .data-table tbody td[colspan] {
    display: block;
    text-align: center;
  }
  .data-table tbody td[colspan]::before { content: ""; }
  #wg-modal { align-items: flex-end; padding: 0; }
  #wg-modal form.card {
    max-width: none;
    width: 100%;
    max-height: min(88dvh, 760px);
    border-radius: 12px 12px 0 0;
    padding-bottom: calc(20px + env(safe-area-inset-bottom));
  }
  #toast-host { left: 12px; right: 12px; bottom: calc(76px + env(safe-area-inset-bottom)); }
  .toast { width: 100%; max-width: none; }
  .leaflet-popup-content { max-width: min(72vw, 280px); overflow-wrap: anywhere; }
  .leaflet-control-attribution { font-size: 9px !important; max-width: 140px; line-height: 1.15; opacity: .72; }
}

@media (max-width: 480px) {
  .data-table { font-size: 12px; }
  .data-table thead th,
  .data-table tbody td { padding: 9px 10px; }
  #map, #sites-map, #cp-map { min-height: 300px; }
  .mobile-nav-item { font-size: 10px; }
  #wg-modal { align-items: flex-end; padding: 0; }
  .wg-modal-panel {
    width: 100%;
    max-width: none;
    max-height: min(88dvh, 760px);
    border-radius: 8px 8px 0 0;
    padding-bottom: max(20px, env(safe-area-inset-bottom));
  }
}

@media (prefers-reduced-motion: reduce) {
  html:focus-within { scroll-behavior: auto; }
  .skeleton::after,
  .gpm-ring-red,
  .guard-green .guard-dot { animation: none !important; }
  .leaflet-zoom-animated,
  .leaflet-pan-anim .leaflet-tile,
  .leaflet-marker-icon,
  .leaflet-popup { transition: none !important; }
}

/* Note: `.hidden` is provided by Tailwind. Do not redefine it here with !important —
   that would override responsive utilities like `xl:flex` on the detail drawer. */
