:root {
  --bg:#eef2f8;
  --bg-elevated:#f7f9fd;
  --panel:#fbfcff;
  --panel-alt:#f1f4fa;
  --panel-soft:rgba(255,255,255,0.72);
  --panel-strong:rgba(227,233,244,0.88);
  --text:#000000;
  --muted:#000000;
  --accent:#2f6df6;
  --accent-2:rgba(47,109,246,0.18);
  --stroke:rgba(124,140,168,0.18);
  --border-strong:rgba(88,106,140,0.24);
  --shadow:0 18px 42px rgba(17,24,39,0.08);
  --shadow-soft:0 10px 28px rgba(15,23,42,0.07);
  --danger:#d74f45;
  --success:#2fa56f;
  --separator:rgba(96,114,143,0.14);
  --space-1: 6px;
  --space-2: 6px;
  --space-3: 8px;
  --space-4: 10px;
  --space-5: 12px;
  --space-6: 14px;
  --space-7: 18px;
  --radius-control: 12px;
  --radius-card: 18px;
  --radius-panel: 22px;
  --control-height: 38px;
  --control-height-compact: 30px;
  --font-size-body: 13px;
  --font-size-label: 12px;
  --font-size-help: 12px;
  --font-size-title: 22px;
  --safe-top: max(12px, env(safe-area-inset-top));
  --safe-right: max(12px, env(safe-area-inset-right));
  --safe-bottom: max(12px, env(safe-area-inset-bottom));
  --safe-left: max(12px, env(safe-area-inset-left));
  --haven-trial-blue: #1580c9;
  --haven-trial-red: #c91214;
  --haven-trial-white: #ffffff;
  --haven-trial-yellow: #f2c300;
}

body[data-theme="light"] {
  --bg:#eef2f8;
  --bg-elevated:#f7f9fd;
  --panel:#fbfcff;
  --panel-alt:#f1f4fa;
  --panel-soft:rgba(255,255,255,0.72);
  --panel-strong:rgba(227,233,244,0.88);
  --text:#000000;
  --muted:#000000;
  --accent:#2f6df6;
  --accent-2:rgba(47,109,246,0.18);
  --stroke:rgba(124,140,168,0.18);
  --border-strong:rgba(88,106,140,0.24);
  --shadow:0 18px 42px rgba(17,24,39,0.08);
  --shadow-soft:0 10px 28px rgba(15,23,42,0.07);
  --separator:rgba(96,114,143,0.14);
}

body:not([data-theme="light"]) {
  --bg:#0f1723;
  --bg-elevated:#16202c;
  --panel:#172332;
  --panel-alt:#203044;
  --panel-soft:#1b293a;
  --panel-strong:#26384d;
  --text:#f4f7fb;
  --muted:#d4deec;
  --accent:#6ea2ff;
  --accent-2:rgba(110,162,255,0.2);
  --stroke:rgba(168,188,220,0.22);
  --border-strong:rgba(187,206,233,0.3);
  --shadow:0 20px 44px rgba(0,0,0,.34);
  --shadow-soft:0 12px 28px rgba(0,0,0,.26);
  --separator:rgba(190,208,232,0.18);
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  height: 100%;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: var(--font-size-body);
  line-height: 1.35;
}
body {
  height: 100vh;
  overflow: hidden;
  background:
    radial-gradient(circle at top left, rgba(255,255,255,0.55), transparent 32%),
    linear-gradient(180deg, var(--bg-elevated) 0%, var(--bg) 100%);
}

.intro-splash {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 35%, rgba(255,255,255,0.16), transparent 38%),
    linear-gradient(135deg, #050914 0%, #111b2e 48%, #0b1220 100%);
}

body.auth-reveal-active .shell {
  opacity: 0;
  transform: scale(1.015);
  filter: blur(4px);
}

body.auth-reveal-active .shell {
  animation: introShellReveal 2.25s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

.intro-splash.hidden {
  display: none;
}

.intro-splash-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 10px;
  text-align: center;
  color: #f8fbff;
  background:
    radial-gradient(circle at 50% 35%, rgba(56, 189, 248, 0.16), transparent 30%),
    radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.08), transparent 22%),
    linear-gradient(135deg, rgba(5, 9, 20, 0.96) 0%, rgba(17, 27, 46, 0.96) 48%, rgba(11, 18, 32, 0.98) 100%);
}

.intro-splash.auth-loading .intro-splash-fallback {
  background:
    radial-gradient(circle at 50% 35%, rgba(65, 123, 255, 0.18), transparent 28%),
    radial-gradient(circle at 50% 50%, rgba(241, 196, 15, 0.12), transparent 42%),
    radial-gradient(circle at 22% 18%, rgba(255, 255, 255, 0.09), transparent 20%),
    linear-gradient(135deg, rgba(4, 8, 18, 0.98) 0%, rgba(8, 14, 25, 0.98) 45%, rgba(7, 10, 20, 0.99) 100%);
}

.intro-splash-fallback::before {
  content: "";
  position: absolute;
  inset: 12% auto auto 50%;
  width: min(72vw, 720px);
  height: min(72vw, 720px);
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.18), transparent 66%);
  filter: blur(14px);
  animation: introPulse 4.5s ease-in-out infinite;
}

.intro-splash.auth-loading .intro-splash-fallback::before {
  width: min(88vw, 980px);
  height: min(88vw, 980px);
  background:
    radial-gradient(circle, rgba(56, 189, 248, 0.16), transparent 62%),
    radial-gradient(circle, rgba(255, 255, 255, 0.08), transparent 72%);
  filter: blur(18px);
  opacity: 0.8;
}

.intro-splash-fallback > * {
  position: relative;
  z-index: 1;
}

.intro-splash-orbit,
.intro-splash-grid {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.intro-splash-orbit {
  opacity: 0.7;
  background:
    radial-gradient(circle at 50% 50%, rgba(10, 16, 28, 0) 0 18%, rgba(72, 99, 146, 0.16) 19%, transparent 20%),
    radial-gradient(circle at 50% 50%, transparent 0 29%, rgba(255, 255, 255, 0.06) 30%, transparent 31%),
    conic-gradient(from 35deg, rgba(18, 126, 255, 0.2), rgba(201, 18, 20, 0.22), rgba(255, 255, 255, 0.18), rgba(242, 195, 0, 0.2), rgba(18, 126, 255, 0.2));
  mask: radial-gradient(circle at center, transparent 0 38%, #000 39% 61%, transparent 62%);
  animation: introOrbitRotate 18s linear infinite;
}

.intro-splash-grid {
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 72px 72px;
  opacity: 0.18;
  mask-image: radial-gradient(circle at center, black 0 52%, transparent 74%);
}

.intro-splash-card {
  position: relative;
  width: min(92vw, 900px);
  display: grid;
  justify-items: center;
  gap: 20px;
  padding: clamp(22px, 4vw, 38px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 30px;
  background: linear-gradient(180deg, rgba(9, 15, 28, 0.72), rgba(8, 12, 22, 0.48));
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(18px) saturate(135%);
}

.intro-splash[data-auth-stage="settle"] .intro-splash-card {
  transform: translateY(10px) scale(0.975);
  opacity: 0.72;
}

.intro-splash[data-auth-stage="fill"] .intro-splash-card {
  transform: translateY(0) scale(0.995);
  opacity: 0.96;
}

.intro-splash[data-auth-stage="reveal"] .intro-splash-card {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.intro-splash[data-auth-stage="finish"] .intro-splash-card {
  transform: translateY(-2px) scale(1);
  opacity: 1;
}

.intro-splash-logo-wrap {
  position: relative;
  display: grid;
  place-items: center;
  min-height: clamp(120px, 26vw, 240px);
}

.intro-splash-logo {
  position: relative;
  z-index: 2;
  width: min(46vw, 320px);
  max-width: 320px;
  filter: drop-shadow(0 10px 34px rgba(0, 0, 0, 0.55));
  transform: translateZ(0);
  transition: transform 520ms cubic-bezier(0.16, 1, 0.3, 1), filter 520ms ease, opacity 360ms ease;
}

.intro-splash[data-auth-stage="settle"] .intro-splash-logo {
  transform: translateY(18px) scale(0.93);
  opacity: 0.85;
}

.intro-splash[data-auth-stage="fill"] .intro-splash-logo {
  transform: translateY(6px) scale(0.99);
  opacity: 1;
}

.intro-splash[data-auth-stage="reveal"] .intro-splash-logo,
.intro-splash[data-auth-stage="finish"] .intro-splash-logo {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.intro-splash-shield {
  position: absolute;
  inset: 50% auto auto 50%;
  width: clamp(180px, 34vw, 340px);
  height: clamp(220px, 40vw, 380px);
  transform: translate(-50%, -50%);
  filter: drop-shadow(0 0 22px rgba(111, 168, 255, 0.16));
  animation: introShieldPulse 4.5s ease-in-out infinite;
  transition: transform 700ms cubic-bezier(0.16, 1, 0.3, 1), opacity 700ms ease;
}

.intro-splash[data-auth-stage="settle"] .intro-splash-shield {
  transform: translate(-50%, -50%) scale(0.94);
  opacity: 0.82;
}

.intro-splash[data-auth-stage="fill"] .intro-splash-shield {
  transform: translate(-50%, -50%) scale(0.98);
  opacity: 1;
}

.intro-splash-shield::before {
  content: "";
  position: absolute;
  inset: 4% 8% 4% 8%;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 46% 46% 54% 54% / 13% 13% 87% 87%;
  box-shadow: inset 0 0 18px rgba(255, 255, 255, 0.05);
}

.intro-splash-shield-segment,
.intro-splash-shield-core {
  position: absolute;
  display: block;
  border-radius: 22px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.3), 0 0 16px rgba(0,0,0,0.2);
}

.intro-splash-shield-segment-blue {
  inset: 13% 56% 50% 8%;
  background: linear-gradient(145deg, #2fa0ff 0%, #0b74c9 48%, #085799 100%);
  clip-path: polygon(16% 6%, 100% 0%, 68% 100%, 0% 100%);
}

.intro-splash-shield-segment-red {
  inset: 13% 8% 50% 44%;
  background: linear-gradient(145deg, #ff4748 0%, #cb1214 50%, #8e0909 100%);
  clip-path: polygon(0% 0%, 84% 6%, 100% 100%, 34% 100%);
}

.intro-splash-shield-segment-white {
  inset: 50% 44% 13% 8%;
  background: linear-gradient(145deg, #ffffff 0%, #f0f4f8 54%, #cfd8e3 100%);
  clip-path: polygon(0% 0%, 86% 0%, 100% 100%, 20% 100%);
}

.intro-splash-shield-segment-yellow {
  inset: 50% 8% 13% 56%;
  background: linear-gradient(145deg, #ffd43b 0%, #f2c300 56%, #c59400 100%);
  clip-path: polygon(0% 0%, 100% 0%, 66% 100%, 16% 100%);
}

.intro-splash-shield-core {
  inset: 50% auto auto 50%;
  width: 18%;
  height: 18%;
  transform: translate(-50%, -50%);
  border-radius: 30%;
  background:
    radial-gradient(circle at 35% 35%, rgba(255,255,255,0.5), transparent 42%),
    radial-gradient(circle at center, rgba(10, 16, 28, 0.95), rgba(10, 16, 28, 0.98));
  box-shadow: 0 0 24px rgba(255,255,255,0.08);
}

.intro-splash-fallback-badge {
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.16);
  background: rgba(15, 23, 42, 0.58);
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-shadow: 0 0 18px rgba(255,255,255,0.08);
}

.intro-splash-copy-stack {
  display: grid;
  gap: 10px;
  justify-items: center;
}

.intro-splash-fallback-copy {
  max-width: 36ch;
  font-size: clamp(0.98rem, 1.6vw, 1.18rem);
  letter-spacing: 0.02em;
  color: rgba(226, 232, 240, 0.9);
}

.intro-splash-progress-rail {
  width: min(100%, 640px);
}

.intro-splash-progress-track {
  position: relative;
  display: grid;
  grid-template-columns: 1.1fr 1.1fr 1fr 0.8fr;
  gap: 0;
  height: 12px;
  border-radius: 999px;
  padding: 2px;
  background: rgba(255,255,255,0.08);
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.06), 0 0 24px rgba(45, 116, 255, 0.14);
}

.intro-splash-progress-track::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.42), transparent);
  transform: translateX(-100%);
  opacity: 0;
  animation: introShimmer 2.6s ease-in-out infinite;
  transition: transform 1800ms cubic-bezier(0.16, 1, 0.3, 1), opacity 300ms ease;
}

.intro-splash[data-auth-stage="fill"] .intro-splash-progress-track::after {
  opacity: 1;
  transform: translateX(-45%);
}

.intro-splash[data-auth-stage="reveal"] .intro-splash-progress-track::after,
.intro-splash[data-auth-stage="finish"] .intro-splash-progress-track::after {
  opacity: 1;
  transform: translateX(0);
}

.intro-splash[data-auth-stage="settle"] .intro-splash-progress-segment {
  transform: scaleX(0.18);
  transform-origin: left center;
}

.intro-splash[data-auth-stage="fill"] .intro-splash-progress-segment {
  transform: scaleX(0.56);
  transform-origin: left center;
}

.intro-splash[data-auth-stage="reveal"] .intro-splash-progress-segment {
  transform: scaleX(1);
  transform-origin: left center;
}

.intro-splash-progress-segment {
  transition: transform 1500ms cubic-bezier(0.16, 1, 0.3, 1), opacity 300ms ease;
  transform-origin: left center;
}

.intro-splash-progress-segment {
  border-radius: 999px;
}

.intro-splash-progress-segment-blue { background: linear-gradient(90deg, #1b8cf8, #1368c2); }
.intro-splash-progress-segment-red { background: linear-gradient(90deg, #db1d22, #a90e12); }
.intro-splash-progress-segment-white { background: linear-gradient(90deg, #ffffff, #d9e1ea); }
.intro-splash-progress-segment-yellow { background: linear-gradient(90deg, #f7cd1b, #dfad00); }

.intro-splash-status-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.intro-splash-status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.04);
  color: rgba(244, 247, 251, 0.88);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.intro-splash-status-pill-blue { box-shadow: inset 0 0 0 1px rgba(38, 146, 255, 0.12); }
.intro-splash-status-pill-red { box-shadow: inset 0 0 0 1px rgba(231, 56, 63, 0.12); }
.intro-splash-status-pill-white { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08); }
.intro-splash-status-pill-yellow { box-shadow: inset 0 0 0 1px rgba(242, 195, 0, 0.12); }

.intro-splash.auth-loading .intro-splash-fallback-badge {
  font-size: clamp(2.2rem, 4vw, 4.5rem);
  line-height: 0.96;
  letter-spacing: -0.05em;
  text-transform: none;
  padding: 0;
  border: 0;
  background: transparent;
  order: 2;
}

.intro-splash.auth-loading .intro-splash-fallback-copy {
  order: 3;
}

.intro-splash.auth-loading .intro-splash-status-row {
  order: 4;
}

.intro-splash.auth-loading .intro-splash-progress-rail {
  order: 5;
}

@keyframes introPulse {
  0%, 100% { transform: translateX(-50%) scale(0.94); opacity: 0.7; }
  50% { transform: translateX(-50%) scale(1.03); opacity: 1; }
}

@keyframes introOrbitRotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes introShieldPulse {
  0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.78; }
  50% { transform: translate(-50%, -50%) scale(1.02); opacity: 1; }
}

@keyframes introShimmer {
  0% { transform: translateX(0); opacity: 0; }
  20% { opacity: 1; }
  60% { opacity: 1; }
  100% { transform: translateX(420%); opacity: 0; }
}

@keyframes introShellReveal {
  0% { opacity: 0; transform: scale(1.015); filter: blur(4px); }
  35% { opacity: 0.14; }
  70% { opacity: 0.6; filter: blur(1.5px); }
  100% { opacity: 1; transform: scale(1); filter: blur(0); }
}

@media (max-width: 900px) {
  .intro-splash-card {
    gap: 16px;
    padding: 18px 16px 20px;
  }

  .intro-splash-logo {
    width: min(62vw, 280px);
  }

  .intro-splash-shield {
    width: clamp(150px, 48vw, 300px);
    height: clamp(190px, 60vw, 340px);
  }

  .intro-splash-status-row {
    gap: 8px;
  }

  .intro-splash-status-pill {
    font-size: 10px;
    letter-spacing: 0.12em;
  }
}

@media (prefers-reduced-motion: reduce) {
  .intro-splash-fallback::before,
  .intro-splash-orbit,
  .intro-splash-shield,
  .intro-splash-progress-track::after,
  body.auth-reveal-active .shell {
    animation: none !important;
  }
}

html,
body {
  overscroll-behavior: none;
}

.shell { height: 100vh; display: flex; flex-direction: column; overflow: hidden; }
.topbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "trial trial"
    "brand actions";
  align-items: flex-start;
  gap: 10px;
  padding: calc(var(--safe-top) + 2px) calc(var(--safe-right) + 12px) 6px calc(var(--safe-left) + 12px);
  border-bottom: 1px solid var(--separator);
  background: color-mix(in srgb, var(--panel) 74%, transparent);
  backdrop-filter: blur(24px) saturate(155%);
  -webkit-backdrop-filter: blur(24px) saturate(155%);
  position: relative;
  z-index: 7000;
}
.topbar h1 {
  margin: 0;
  font-size: var(--font-size-title);
  line-height: 1.04;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight: 780;
  letter-spacing: -0.045em;
}
.topbar-brand {
  grid-area: brand;
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  align-content: start;
  min-width: 0;
  flex: 1 1 clamp(420px, 52vw, 760px);
}
.brand-logo {
  display: block;
  width: min(360px, 46vw);
  max-height: 75px;
  object-fit: contain;
  object-position: left center;
}

.brand-logo-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.brand-logo-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: 12px;
}

body:not([data-theme="light"]) .topbar-brand,
body:not([data-theme="light"]) .super-admin-topbar-copy {
  align-self: flex-start;
  padding: 10px 12px 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(245, 248, 252, 0.96), rgba(224, 231, 242, 0.92));
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
}

body:not([data-theme="light"]) .brand-logo {
  filter: drop-shadow(0 1px 0 rgba(255, 255, 255, 0.25)) drop-shadow(0 2px 6px rgba(15, 23, 42, 0.18));
}
.eyebrow {
  color: var(--accent);
  font-size: 10px;
  letter-spacing: .14em;
  text-transform: uppercase;
  font-weight: 780;
}
.subtitle {
  margin: 0;
  color: var(--muted);
  max-width: 520px;
  font-size: 12px;
  line-height: 1.28;
}
.topbar-actions {
  grid-area: actions;
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-end;
  width: min(54vw, 720px);
  max-width: 100%;
  min-width: 0;
}
.topbar-action-row {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  justify-content: flex-end;
  flex-wrap: wrap;
  width: 100%;
}
.topbar-action-row-secondary {
  justify-content: flex-end;
}
.topbar-settings {
  position: relative;
  z-index: 7200;
}
.topbar-settings-btn {
  min-width: 44px;
  min-height: 44px;
  padding-inline: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 700;
}
.topbar-icon-btn {
  min-width: 44px;
  min-height: 44px;
  padding-inline: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  font-weight: 700;
}
.media-upload-icon {
  width: 20px;
  height: 20px;
  color: currentColor;
}
.topbar-icon-btn:hover .media-upload-icon {
  filter: drop-shadow(0 0 2px rgba(47, 109, 246, 0.4));
}
.topbar-icon-btn:active .media-upload-icon {
  transform: scale(0.95);
}
.topbar-settings-dropdown {
  position: fixed;
  top: calc(var(--safe-top) + 58px);
  right: calc(var(--safe-right) + 14px);
  width: min(320px, calc(100vw - var(--safe-left) - var(--safe-right) - 28px));
  min-width: min(260px, calc(100vw - var(--safe-left) - var(--safe-right) - 28px));
  display: grid;
  gap: 10px;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid var(--separator);
  background: color-mix(in srgb, var(--panel) 94%, transparent);
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.26);
  backdrop-filter: blur(22px) saturate(150%);
  -webkit-backdrop-filter: blur(22px) saturate(150%);
  z-index: 7600;
}
.topbar-settings-dropdown button {
  width: 100%;
  justify-content: flex-start;
  text-align: left;
}
.feedback-modal-copy {
  margin: 6px 0 0;
  max-width: 48ch;
}
.topbar-settings-field {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: var(--font-size-label);
}
.topbar-settings-field select {
  width: 100%;
}
.status-shell {
  padding: 0;
  margin-top: 8px;
  width: 100%;
  max-width: 100%;
}
.status-bar {
  margin: 0;
  width: 100%;
  max-width: 100%;
  min-height: 38px;
  padding: 7px 12px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 10px;
  font-size: 12px;
  line-height: 1.15;
  color: color-mix(in srgb, var(--text) 74%, var(--muted) 26%);
  border: 1px solid var(--separator);
  border-radius: 14px;
  background: color-mix(in srgb, var(--panel) 82%, transparent);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(18px) saturate(145%);
}
.status-role-pill {
  align-self: flex-start;
  width: fit-content;
  max-width: 100%;
  min-height: 38px;
  padding: 7px 12px;
  display: inline-flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  line-height: 1.15;
  color: var(--text);
  border: 1px solid var(--separator);
  border-radius: 14px;
  background: color-mix(in srgb, var(--panel) 82%, transparent);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(18px) saturate(145%);
  white-space: normal;
  overflow-wrap: anywhere;
}
.status-role-pill strong {
  font-weight: 800;
}

.trial-status-module {
  position: relative;
  grid-area: trial;
  width: 100%;
  display: grid;
  grid-template-columns: max-content minmax(160px, 1fr) minmax(240px, max-content);
  align-items: center;
  gap: 14px;
  padding: 9px 12px;
  border: 1px solid var(--separator);
  border-radius: 16px;
  background:
    linear-gradient(135deg,
      color-mix(in srgb, var(--haven-trial-blue) 14%, transparent),
      color-mix(in srgb, var(--haven-trial-red) 10%, transparent) 48%,
      color-mix(in srgb, var(--haven-trial-yellow) 12%, transparent) 100%),
    color-mix(in srgb, var(--panel) 88%, transparent);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(18px) saturate(145%);
  overflow: hidden;
  isolation: isolate;
}

.trial-status-content {
  display: contents;
}

.trial-status-toggle,
.trial-status-restore {
  border: 1px solid color-mix(in srgb, var(--haven-trial-blue) 24%, var(--separator) 76%);
  background: color-mix(in srgb, var(--panel) 82%, white 18%);
  color: var(--haven-ink);
  box-shadow:
    0 10px 20px rgba(15, 23, 42, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

.trial-status-toggle {
  justify-self: end;
  align-self: start;
  width: 34px;
  min-width: 34px;
  height: 34px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 800;
  transition: transform 180ms ease, box-shadow 180ms ease, filter 180ms ease;
}

.trial-status-toggle:hover,
.trial-status-toggle:focus-visible,
.trial-status-restore:hover,
.trial-status-restore:focus-visible {
  transform: translateY(-2px);
  box-shadow:
    0 18px 32px rgba(15, 23, 42, 0.16),
    0 0 0 5px color-mix(in srgb, var(--haven-trial-blue) 18%, transparent),
    inset 0 1px 0 rgba(255, 255, 255, 0.76);
}

.trial-status-toggle:focus-visible,
.trial-status-restore:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--haven-trial-blue) 42%, white);
  outline-offset: 2px;
}

.trial-status-toggle-icon {
  line-height: 1;
}

.trial-status-restore {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  min-height: 42px;
  padding: 8px 12px;
  border-radius: 14px;
  text-align: left;
}

.trial-status-restore-label {
  font-size: 11px;
  font-weight: 860;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.trial-status-restore-summary {
  font-size: 15px;
  font-weight: 820;
}

.trial-status-module::before,
.trial-status-module::after {
  content: "";
  position: absolute;
  inset: -2px;
  pointer-events: none;
  border-radius: inherit;
}

.trial-status-module::before {
  background:
    radial-gradient(circle at 12% 20%, rgba(8, 127, 202, 0.42), transparent 34%),
    radial-gradient(circle at 86% 24%, rgba(201, 18, 20, 0.34), transparent 30%),
    radial-gradient(circle at 68% 86%, rgba(242, 195, 0, 0.36), transparent 26%);
  opacity: 1;
  filter: blur(16px);
  transform: scale(1.12);
  animation: trialStatusPulse 2.3s cubic-bezier(.16, 1, .3, 1) infinite;
}

.trial-status-module::after {
  inset: 1px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.55),
    inset 0 -18px 28px rgba(8, 127, 202, 0.08);
  mix-blend-mode: soft-light;
  animation: trialStatusRing 2.3s ease-in-out infinite;
}

.trial-status-module > * {
  position: relative;
  z-index: 1;
}

.trial-status-module-collapsed {
  grid-template-columns: 1fr;
  gap: 0;
  padding: 10px 12px;
}

.trial-status-module-collapsed .trial-status-toggle {
  display: none;
}

.trial-status-module-collapsed .trial-status-content {
  display: none;
}

.trial-status-module-collapsed .trial-status-restore {
  display: inline-flex;
}

.trial-status-copy {
  display: flex;
  align-items: baseline;
  gap: 10px;
  white-space: nowrap;
}

.trial-status-eyebrow {
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 800;
  color: color-mix(in srgb, var(--text) 56%, var(--muted) 44%);
}

.trial-status-primary {
  font-size: 18px;
  line-height: 1;
  font-weight: 850;
  color: var(--text);
}

.trial-status-secondary {
  font-size: 12px;
  line-height: 1.2;
  color: color-mix(in srgb, var(--text) 62%, var(--muted) 38%);
}

.trial-status-cta {
  justify-self: end;
  align-self: center;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--haven-trial-blue) 24%, var(--separator) 76%);
  background:
    linear-gradient(135deg,
      color-mix(in srgb, var(--haven-trial-blue) 16%, white),
      color-mix(in srgb, var(--haven-trial-red) 10%, white) 58%,
      color-mix(in srgb, var(--haven-trial-yellow) 16%, white));
  box-shadow:
    0 10px 20px rgba(15, 23, 42, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.55);
  color: var(--haven-ink);
  font-size: 11px;
  font-weight: 860;
  letter-spacing: 0.09em;
  text-decoration: none;
  text-transform: uppercase;
  white-space: nowrap;
  transition: transform 180ms ease, box-shadow 180ms ease, filter 180ms ease;
}

.trial-status-cta::after {
  content: "↗";
  font-size: 0.95em;
  line-height: 1;
  color: var(--haven-blue-dark);
}

.trial-status-cta:hover,
.trial-status-cta:focus-visible {
  transform: translateY(-3px) scale(1.07);
  box-shadow:
    0 20px 36px rgba(15, 23, 42, 0.18),
    0 0 0 6px color-mix(in srgb, var(--haven-trial-blue) 24%, transparent),
    inset 0 1px 0 rgba(255, 255, 255, 0.86);
  filter: saturate(1.18) brightness(1.04);
}

.trial-status-cta:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--haven-trial-blue) 42%, white);
  outline-offset: 2px;
}

.trial-status-track {
  position: relative;
  overflow: hidden;
  width: 100%;
  height: 12px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--text) 10%, var(--separator) 90%);
  background: color-mix(in srgb, var(--panel-strong) 72%, transparent);
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.12);
}

.trial-status-progress {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0%;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  overflow: hidden;
  border-radius: inherit;
  transition: width 220ms ease;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.trial-status-progress::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 0%, rgba(255, 255, 255, 0.62) 40%, transparent 68%);
  opacity: 0.52;
  transform: translateX(-40%);
  animation: trialStatusShimmer 1.9s linear infinite;
  pointer-events: none;
}

.trial-status-stripe {
  min-width: 0;
}

.trial-status-stripe-blue { background: var(--haven-trial-blue); }
.trial-status-stripe-red { background: var(--haven-trial-red); }
.trial-status-stripe-white {
  background: linear-gradient(180deg, #ffffff 0%, #eef2f7 100%);
  box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.75), inset 0 -1px 3px rgba(148, 163, 184, 0.2);
}
.trial-status-stripe-yellow { background: var(--haven-trial-yellow); }

.trial-status-module-urgent .trial-status-primary {
  color: var(--haven-trial-red);
}

.trial-status-module-urgent {
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--haven-trial-red) 42%, transparent),
    0 18px 40px rgba(15, 23, 42, 0.2),
    0 0 0 10px color-mix(in srgb, var(--haven-trial-yellow) 18%, transparent);
  animation: trialStatusUrgentLift 1.2s ease-in-out infinite;
}

.trial-access-code-form {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) max-content;
  align-items: end;
  gap: 8px;
}

.trial-access-code-field {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.trial-access-code-field span {
  font-size: 10px;
  font-weight: 780;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--text) 56%, var(--muted) 44%);
}

.trial-access-code-field input {
  width: 100%;
  min-height: 32px;
  border-radius: 10px;
  border: 1px solid color-mix(in srgb, var(--separator) 78%, var(--accent) 22%);
  padding: 6px 9px;
  background: color-mix(in srgb, var(--panel-alt) 92%, transparent);
  color: var(--text);
  font: inherit;
}

.trial-access-code-form button {
  min-height: 32px;
  padding: 6px 10px;
}

.trial-access-code-message {
  grid-column: 1 / -1;
  min-height: 14px;
  font-size: 11px;
  line-height: 1.25;
  color: color-mix(in srgb, var(--text) 62%, var(--muted) 38%);
}

.trial-access-code-message.trial-access-code-message-error {
  color: var(--haven-trial-red);
}

.trial-access-code-message.trial-access-code-message-success {
  color: color-mix(in srgb, var(--accent) 72%, var(--text));
}

@media (min-width: 1200px) {
  .topbar-brand {
    display: grid;
    grid-template-columns: minmax(0, 1fr) max-content;
    grid-template-areas:
      "logo logo"
      "status role";
    column-gap: 6px;
    row-gap: 8px;
    align-items: start;
    justify-content: start;
    width: min(100%, 760px);
  }

  .brand-logo {
    grid-area: logo;
  }

  .status-shell {
    grid-area: status;
    margin-top: 0;
    width: 100%;
    max-width: 100%;
  }

  .status-role-pill {
    grid-area: role;
    margin-top: 0;
    align-self: start;
    justify-self: start;
  }

}

@media (max-width: 860px) {
  .topbar {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "trial"
      "brand"
      "actions";
  }

  .trial-status-module {
    grid-template-columns: 1fr;
    gap: 7px;
  }

  .trial-status-toggle {
    justify-self: end;
  }

  .trial-status-copy {
    white-space: normal;
  }

  .trial-status-cta {
    justify-self: stretch;
    width: 100%;
    justify-content: center;
  }

  .trial-access-code-form {
    grid-template-columns: minmax(0, 1fr) max-content;
  }

  .topbar-brand,
  .topbar-actions {
    width: 100%;
    max-width: 100%;
  }

  .topbar-actions {
    align-items: stretch;
  }

  .topbar-action-row {
    justify-content: flex-start;
  }
}

@media (max-width: 640px) {
  .trial-status-module {
    gap: 6px;
    padding: 9px 10px 10px;
  }

  .trial-status-toggle {
    width: 32px;
    min-width: 32px;
    height: 32px;
  }

  .trial-status-primary {
    font-size: 16px;
  }

  .trial-status-secondary {
    font-size: 11px;
  }

  .trial-status-cta {
    padding-inline: 10px;
    font-size: 10px;
    letter-spacing: 0.08em;
  }

  .trial-status-track {
    height: 12px;
  }

  .trial-status-restore {
    min-height: 38px;
    padding-inline: 10px;
  }

  .trial-status-restore-summary {
    font-size: 14px;
  }
}

.ended-session-banner {
  z-index: 99;
  min-height: 42px;
  padding: 9px calc(var(--safe-right) + 14px) 9px calc(var(--safe-left) + 14px);
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  color: #fff;
  background: #8f2f29;
  border-bottom: 1px solid rgba(255,255,255,0.24);
  box-shadow: 0 8px 20px rgba(58, 15, 12, 0.22);
  font-size: 13px;
}
.ended-session-banner strong {
  font-weight: 850;
}

.layout { flex: 1; display: flex; min-height: 0; overflow: hidden; }
.landing {
  position: relative;
  width: 100%;
  padding: 18px calc(var(--safe-right) + 18px) calc(var(--safe-bottom) + 18px) calc(var(--safe-left) + 18px);
  overflow: hidden;
}
.landing-launch-qr {
  position: fixed;
  right: calc(var(--safe-right) + 22px);
  bottom: calc(var(--safe-bottom) + 22px);
  z-index: 220;
  width: 312px;
  border-radius: 14px;
  border: 1px solid var(--separator);
  background: color-mix(in srgb, var(--panel) 90%, transparent);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(14px) saturate(135%);
  padding: 10px;
  display: grid;
  gap: 8px;
}
.landing-launch-qr-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}
.landing-launch-qr-title {
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
}
.landing-launch-qr-hide {
  width: 22px;
  height: 22px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid var(--separator);
  background: var(--panel);
  color: var(--muted);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.landing-launch-qr-hide:hover {
  background: var(--panel-alt);
  color: var(--text);
}
.landing-launch-qr-show {
  position: fixed;
  right: calc(var(--safe-right) + 22px);
  bottom: calc(var(--safe-bottom) + 22px);
  z-index: 220;
  padding: 8px 12px;
  border-radius: 12px;
  border: 1px solid var(--separator);
  background: color-mix(in srgb, var(--panel) 90%, transparent);
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(14px) saturate(135%);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.landing-launch-qr-show:hover {
  background: var(--panel);
}
.landing-launch-qr-image {
  width: 100%;
  border-radius: 8px;
  border: 1px solid var(--separator);
  background: #fff;
}
.landing-launch-qr-link {
  font-size: 10px;
  line-height: 1.25;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.map-launch-qr,
.map-launch-qr-show {
  z-index: 5000;
}
.map-launch-qr {
  position: fixed;
  inset: 0;
  width: 100vw;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(15, 23, 42, 0.35);
  border: 0;
  border-radius: 0;
  box-shadow: none;
  backdrop-filter: blur(6px);
}
.map-launch-qr-card {
  width: min(92vw, 520px);
  max-height: 90vh;
  overflow: auto;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid var(--separator);
  background: color-mix(in srgb, var(--panel) 94%, transparent);
  box-shadow: var(--shadow);
}
.map-launch-qr .landing-launch-qr-image {
  width: 100%;
  max-width: 420px;
  height: auto;
  margin: 0 auto;
}
.map-launch-qr .landing-launch-qr-header {
  position: relative;
  z-index: 2;
}
.map-launch-qr .landing-launch-qr-hide {
  position: relative;
  z-index: 3;
  touch-action: manipulation;
}
.landing-shell {
  height: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-5);
  min-height: 0;
}
.landing-panel {
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  overflow-x: hidden;
  overflow-y: auto;
  padding-right: 4px;
  padding-bottom: var(--space-3);
}
.landing-panel-commander {
  display: flex;
  align-content: start;
}
.landing-panel-join {
  display: grid;
  grid-template-rows: auto auto auto;
  align-content: start;
}
.landing-panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-4);
}
.workspace-header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-2);
  flex-wrap: wrap;
}
.signed-out-auth-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}
.signed-out-auth-actions .secondary {
  min-width: 0;
}
.signed-out-auth-actions button {
  min-height: 52px;
  padding-inline: 28px;
  border-radius: 16px;
  font-size: 15px;
  font-weight: 780;
}
.signed-out-auth-actions #signUpTabBtn {
  background: rgba(255, 255, 255, 0.9);
  border-color: #e1b800;
  color: #151515;
  box-shadow: 0 10px 24px rgba(225, 184, 0, 0.13);
}
.signed-out-auth-actions #signUpTabBtn:hover,
.signed-out-auth-actions #signUpTabBtn:focus-visible {
  background: #fff9dc;
  border-color: #c9a400;
}
.signed-out-auth-actions #videoPlaylistBtn {
  min-height: 52px;
  padding-inline: 28px;
  border-radius: 16px;
  font-size: 15px;
  font-weight: 780;
  background: transparent;
  border: 2px solid #c40d12;
  color: #c40d12;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  cursor: pointer;
  white-space: nowrap;
  animation: havenDemoPulse 3s ease-in-out infinite;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.signed-out-auth-actions #videoPlaylistBtn .video-playlist-btn-logo {
  display: block;
  height: clamp(28px, 3.2vw, 36px);
  width: auto;
  flex: 0 0 auto;
  object-fit: contain;
}
.signed-out-auth-actions #videoPlaylistBtn .video-playlist-btn-text {
  display: inline-block;
  font-size: clamp(28px, 3.2vw, 36px);
  line-height: 1;
  font-weight: 700;
  letter-spacing: -0.03em;
}
.signed-out-auth-actions #videoPlaylistBtn:hover,
.signed-out-auth-actions #videoPlaylistBtn:focus-visible {
  background: rgba(196, 13, 18, 0.08);
  color: #a20a0e;
  transform: translateY(-1px);
  box-shadow: 0 0 0 1px rgba(162, 10, 14, 0.15), 0 0 16px rgba(162, 10, 14, 0.2);
}
@keyframes havenDemoPulse {
  0% {
    border-color: #0b84c6;
    box-shadow: 0 0 0 rgba(11,132,198,0);
  }
  25% {
    border-color: #c81010;
    box-shadow: 0 0 12px rgba(200,16,16,0.35);
  }
  50% {
    border-color: #f2c400;
    box-shadow: 0 0 12px rgba(242,196,0,0.35);
  }
  75% {
    border-color: #ffffff;
    box-shadow: 0 0 12px rgba(255,255,255,0.45);
  }
  100% {
    border-color: #0b84c6;
    box-shadow: 0 0 0 rgba(11,132,198,0);
  }
}
@media (prefers-reduced-motion: reduce) {
  .signed-out-auth-actions #videoPlaylistBtn {
    animation: none;
  }
}
.signed-out-welcome {
  --haven-blue: #087fca;
  --haven-blue-dark: #075f9b;
  --haven-red: #c40d12;
  --haven-yellow: #f0c400;
  --haven-ink: #111318;
  position: relative;
  display: grid;
  grid-template-rows: auto auto auto;
  align-content: center;
  gap: clamp(28px, 4vh, 48px);
  flex: 1 1 auto;
  min-height: 620px;
  padding: clamp(38px, 6vw, 82px) clamp(24px, 6vw, 88px) 34px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--separator) 82%, var(--haven-blue) 18%);
  border-radius: calc(var(--radius-card) + 4px);
  background:
    radial-gradient(circle at 10% 10%, rgba(8, 127, 202, 0.09), transparent 28%),
    radial-gradient(circle at 90% 20%, rgba(196, 13, 18, 0.055), transparent 24%),
    radial-gradient(circle at 78% 90%, rgba(240, 196, 0, 0.08), transparent 24%),
    linear-gradient(180deg, rgba(255,255,255,0.96), color-mix(in srgb, var(--panel-alt) 72%, white 28%));
  box-shadow: 0 24px 60px rgba(12, 18, 28, 0.08), inset 0 1px 0 rgba(255,255,255,0.8);
}
.signed-out-brand-stripe {
  position: absolute;
  top: 0;
  left: 50%;
  display: grid;
  grid-template-columns: 1fr 1fr .8fr 1fr;
  width: min(420px, 52vw);
  height: 5px;
  transform: translateX(-50%);
  overflow: hidden;
  border-radius: 0 0 999px 999px;
}
.signed-out-brand-stripe span {
  display: block;
}
.brand-stripe-blue { background: var(--haven-blue); }
.brand-stripe-red { background: var(--haven-red); }
.brand-stripe-white {
  background: #f8f8f8;
  box-shadow: inset 0 0 0 1px #d9dde4;
}
.brand-stripe-yellow { background: var(--haven-yellow); }
.landing-language-row {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin: 8px auto -4px;
}
.landing-language-label {
  color: color-mix(in srgb, var(--haven-ink) 70%, white);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.landing-language-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px;
  border: 1px solid color-mix(in srgb, var(--haven-blue) 18%, #d9e4f1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 10px 24px rgba(12, 18, 28, 0.06);
}
.landing-language-btn {
  border: 0;
  border-radius: 999px;
  padding: 9px 14px;
  background: transparent;
  color: #4c5563;
  font-size: 13px;
  font-weight: 760;
  line-height: 1;
  cursor: pointer;
  transition: background 140ms ease, color 140ms ease, box-shadow 140ms ease;
}
.landing-language-btn:hover,
.landing-language-btn:focus-visible {
  background: rgba(8, 127, 202, 0.1);
  color: var(--haven-blue-dark);
  outline: none;
}
.landing-language-btn.is-active {
  background: linear-gradient(135deg, var(--haven-blue), color-mix(in srgb, var(--haven-blue) 72%, white));
  color: #fff;
  box-shadow: 0 8px 18px rgba(8, 127, 202, 0.24);
}
.signed-out-hero {
  position: relative;
  z-index: 1;
  max-width: 850px;
  margin: 0 auto;
  text-align: center;
}
.signed-out-eyebrow {
  margin-bottom: 12px;
  color: var(--haven-blue-dark);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.signed-out-hero h1 {
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
  color: var(--haven-ink);
  font-size: clamp(38px, 5.2vw, 68px);
  line-height: 0.98;
  letter-spacing: -0.055em;
}
.signed-out-title-line {
  display: block;
}
.signed-out-hero > p {
  max-width: 680px;
  margin: 20px auto 26px;
  color: color-mix(in srgb, var(--haven-ink) 70%, white);
  font-size: clamp(16px, 1.5vw, 20px);
  line-height: 1.55;
}
.signed-out-tagline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 28px;
  padding: 10px 16px;
  border: 1px solid color-mix(in srgb, var(--haven-blue) 20%, white);
  border-radius: 999px;
  background: color-mix(in srgb, var(--haven-blue) 7%, white);
  color: var(--haven-blue-dark);
  font-size: 12px;
  font-weight: 820;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.trial-success-banner {
  display: grid;
  gap: 10px;
  width: min(760px, 100%);
  margin: 0 auto 4px;
  padding: 22px 24px 20px;
  border: 1px solid color-mix(in srgb, var(--haven-blue) 26%, #dfe7f3);
  border-radius: 24px;
  background:
    radial-gradient(circle at 12% 0%, rgba(8, 127, 202, 0.18), transparent 30%),
    linear-gradient(180deg, rgba(255,255,255,0.98), rgba(243,247,252,0.92));
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
  text-align: left;
  animation: trialSuccessPop .28s ease-out both;
}
.trial-success-banner-eyebrow {
  color: var(--haven-blue-dark);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.trial-success-banner-title {
  color: var(--haven-ink);
  font-size: clamp(22px, 2.8vw, 32px);
  line-height: 1;
  font-weight: 840;
  letter-spacing: -0.045em;
}
.trial-success-banner p {
  margin: 0;
  max-width: 58ch;
  color: color-mix(in srgb, var(--haven-ink) 82%, white);
  font-size: clamp(14px, 1.3vw, 17px);
  line-height: 1.55;
}
.trial-success-banner-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding-top: 2px;
  color: var(--haven-blue-dark);
  font-size: 12px;
  font-weight: 820;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.trial-success-banner-actions strong {
  color: var(--haven-ink);
}
.trial-success-banner-arrow {
  color: var(--haven-blue);
}
@keyframes trialSuccessPop {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes trialStatusPulse {
  0%, 100% {
    opacity: 0.88;
    transform: scale(1.06);
  }
  50% {
    opacity: 1;
    transform: scale(1.18);
  }
}

@keyframes trialStatusRing {
  0%, 100% {
    opacity: 0.9;
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.55),
      inset 0 -18px 28px rgba(8, 127, 202, 0.08);
  }
  50% {
    opacity: 1;
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.75),
      inset 0 -22px 34px rgba(201, 18, 20, 0.14);
  }
}

@keyframes trialStatusShimmer {
  0% {
    transform: translateX(-88%);
  }
  100% {
    transform: translateX(148%);
  }
}

@keyframes trialStatusUrgentLift {
  0%, 100% {
    transform: translateY(0);
    box-shadow:
      0 0 0 1px color-mix(in srgb, var(--haven-trial-red) 42%, transparent),
      0 16px 34px rgba(15, 23, 42, 0.18),
      0 0 0 10px color-mix(in srgb, var(--haven-trial-yellow) 18%, transparent);
  }
  50% {
    transform: translateY(-4px);
    box-shadow:
      0 0 0 1px color-mix(in srgb, var(--haven-trial-red) 56%, transparent),
      0 22px 48px rgba(15, 23, 42, 0.26),
      0 0 0 14px color-mix(in srgb, var(--haven-trial-blue) 20%, transparent);
  }
}

@media (prefers-reduced-motion: reduce) {
  .trial-status-module::before,
  .trial-status-progress::after,
  .trial-status-module-urgent {
    animation: none !important;
  }
}
.signed-out-feature-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
}
.signed-out-feature-card {
  position: relative;
  min-width: 0;
  padding: 24px;
  overflow: hidden;
  border: 1px solid #dde3ec;
  border-radius: 20px;
  background: rgba(255,255,255,0.82);
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.065);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.signed-out-feature-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: currentColor;
}
.signed-out-feature-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.1);
}
.feature-card-blue { color: var(--haven-blue); }
.feature-card-red { color: var(--haven-red); }
.feature-card-yellow { color: #b99300; }
.signed-out-feature-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin-bottom: 18px;
  border-radius: 13px;
  background: color-mix(in srgb, currentColor 10%, white);
}
.signed-out-feature-icon svg {
  width: 23px;
  height: 23px;
}
.signed-out-feature-card h2 {
  margin: 0 0 8px;
  color: var(--haven-ink);
  font-size: 18px;
  letter-spacing: -0.02em;
}
.signed-out-feature-card p {
  margin: 0;
  color: #596273;
  font-size: 14px;
  line-height: 1.55;
}
.signed-out-workflow {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(8px, 1.5vw, 18px);
  max-width: 1100px;
  margin: -12px auto 0;
  color: #5d6572;
  font-size: 11px;
  font-weight: 820;
  letter-spacing: 0.09em;
  text-align: center;
  text-transform: uppercase;
}
.signed-out-workflow span:not(.workflow-arrow) {
  white-space: nowrap;
}
.workflow-arrow {
  color: var(--haven-yellow);
  font-size: 18px;
  line-height: 1;
}
@media (max-width: 960px) {
  .signed-out-welcome {
    align-content: start;
    min-height: auto;
    padding-inline: clamp(20px, 5vw, 44px);
  }
  .landing-language-row {
    margin-top: 14px;
  }
  .signed-out-feature-grid {
    grid-template-columns: 1fr;
    max-width: 720px;
  }
  .signed-out-feature-card {
    display: grid;
    grid-template-columns: auto 1fr;
    column-gap: 16px;
    align-items: start;
  }
  .signed-out-feature-icon {
    grid-row: 1 / span 2;
    margin-bottom: 0;
  }
  .signed-out-workflow {
    flex-wrap: wrap;
    max-width: 680px;
    line-height: 1.6;
  }
}
.landing-card {
  position: relative;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--separator) 82%, var(--accent) 18%);
  background:
    radial-gradient(circle at top right, color-mix(in srgb, var(--accent) 14%, transparent) 0%, transparent 34%),
    radial-gradient(circle at left bottom, color-mix(in srgb, var(--accent-2) 30%, transparent) 0%, transparent 28%),
    color-mix(in srgb, var(--panel) 84%, transparent);
  border-radius: var(--radius-card);
  padding: 18px;
  box-shadow: 0 18px 40px rgba(12, 18, 28, 0.09), inset 0 1px 0 rgba(255,255,255,0.28);
  backdrop-filter: blur(22px) saturate(160%);
}
.landing-card.auth-card-trial {
  border-color: color-mix(in srgb, var(--accent) 40%, var(--separator));
  background:
    radial-gradient(circle at top right, color-mix(in srgb, var(--accent) 22%, transparent) 0%, transparent 34%),
    radial-gradient(circle at left bottom, color-mix(in srgb, var(--accent-2) 36%, transparent) 0%, transparent 28%),
    linear-gradient(180deg, color-mix(in srgb, var(--panel) 84%, transparent), color-mix(in srgb, var(--panel-alt) 82%, transparent));
}
.landing-card.auth-card-signin {
  border-color: color-mix(in srgb, var(--separator) 82%, var(--accent) 12%);
}
.workspace-shell {
  display: flex;
  flex-direction: column;
  width: 100%;
}
.workspace-tabs {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin-bottom: 20px;
  padding: 6px;
  border-radius: 18px;
  background: #f3f6fb;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
}
.workspace-tabs::-webkit-scrollbar {
  display: none;
}
.workspace-tabs .landing-card {
  display: block;
  border: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  padding: 0;
}
.workspace-tabs .tab-button {
  flex: 0 0 auto;
  width: auto;
  border: 1px solid #d8e0ee;
  border-radius: 999px;
  padding: 14px 24px;
  background: #ffffff;
  font-size: 16px;
  font-weight: 700;
  color: #172033;
  cursor: pointer;
  white-space: nowrap;
  transition: background 150ms ease, border-color 150ms ease, color 150ms ease, transform 120ms ease;
}
.workspace-tabs .tab-button .toggle-symbol {
  display: none;
}
.workspace-tabs .tab-button:hover {
  transform: translateY(-1px);
}
.workspace-tabs .tab-button.active,
.workspace-tabs .tab-button[aria-selected="true"] {
  background: #dbe8ff;
  border-color: #8fb2ff;
  color: #10203f;
}
.workspace-tab-panels {
  width: 100%;
  display: block;
}
.workspace-tab-panels .landing-card {
  border: 1px solid var(--separator);
  background: color-mix(in srgb, var(--panel) 82%, transparent);
  border-radius: var(--radius-card);
  padding: 12px;
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(20px) saturate(150%);
}
.workspace-tab-panels .landing-card-toggle {
  display: none;
}
.workspace-tab-panels .landing-card-body {
  display: grid;
  width: 100%;
  margin-top: 0;
  max-height: none;
  opacity: 1;
  transform: none;
  pointer-events: auto;
}
.landing-card-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: 4px 6px;
  border: 0;
  background: transparent;
  color: var(--text);
  text-align: left;
  font-size: 15px;
  font-weight: 720;
  border-radius: calc(var(--radius-control) + 2px);
  transition: background .2s ease, box-shadow .22s ease, color .2s ease;
}
.landing-card-toggle:hover {
  transform: none;
  background: color-mix(in srgb, var(--accent) 10%, transparent);
}
.landing-card-toggle.landing-card-toggle-expanded {
  background: color-mix(in srgb, var(--accent) 13%, transparent);
}
.landing-card-toggle .toggle-symbol {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--panel-alt) 92%, transparent);
  border: 1px solid var(--separator);
  color: var(--muted);
  font-size: 16px;
  line-height: 1;
  transition: transform .2s ease, background .2s ease, border-color .2s ease, color .2s ease;
}
.landing-card-toggle.landing-card-toggle-expanded .toggle-symbol {
  background: color-mix(in srgb, var(--accent) 15%, var(--panel) 85%);
  border-color: color-mix(in srgb, var(--accent) 28%, transparent);
  color: var(--accent);
}
.landing-card-toggle.landing-card-toggle-recent {
  animation: landingToggleFlash .9s ease;
}
.landing-card-body {
  display: grid;
  gap: var(--space-2);
  margin-top: var(--space-2);
  overflow: hidden;
  max-height: var(--landing-section-max-height, 1200px);
  opacity: 1;
  transform: translateY(0);
  transition: max-height .24s ease, opacity .18s ease, transform .24s ease, margin-top .24s ease;
}
.landing-card-body.landing-card-body-collapsed {
  max-height: 0;
  margin-top: 0;
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
}
.landing-card-body.landing-card-body-no-motion {
  transition: none;
}
@keyframes landingToggleFlash {
  0% {
    background: rgba(243, 198, 19, 0.04);
    box-shadow: 0 0 0 0 rgba(243, 198, 19, 0);
  }
  40% {
    background: rgba(243, 198, 19, 0.16);
    box-shadow: 0 0 0 3px rgba(243, 198, 19, 0.18);
  }
  100% {
    background: rgba(243, 198, 19, 0.08);
    box-shadow: 0 0 0 0 rgba(243, 198, 19, 0);
  }
}
.super-admin-workspace {
  position: fixed;
  inset: 0;
  z-index: 3150;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  background: linear-gradient(180deg, color-mix(in srgb, var(--bg-elevated) 96%, transparent), color-mix(in srgb, var(--bg) 98%, transparent));
}
.super-admin-topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-5) var(--space-6);
  border-bottom: 1px solid var(--stroke);
  background: color-mix(in srgb, var(--panel) 76%, transparent);
  backdrop-filter: blur(22px) saturate(150%);
}
.super-admin-topbar-copy h2 {
  margin: 0;
  font-size: var(--font-size-title);
  line-height: 1.08;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight: 760;
  letter-spacing: -0.04em;
}
.super-admin-topbar-copy p {
  margin: 4px 0 0;
  max-width: 760px;
  color: var(--muted);
  font-size: var(--font-size-help);
  line-height: 1.35;
}
.super-admin-topbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  justify-content: flex-end;
}
.super-admin-body {
  min-height: 0;
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: var(--space-5);
  padding: var(--space-5) var(--space-6) 20px;
}
.super-admin-nav {
  display: grid;
  align-content: start;
  gap: var(--space-2);
}
.super-admin-nav button.active {
  background: var(--accent);
  color: #121212;
  border-color: transparent;
}
.super-admin-content {
  min-width: 0;
  min-height: 0;
  overflow: auto;
  display: grid;
  gap: var(--space-5);
}
.super-admin-panel {
  display: grid;
  gap: var(--space-5);
  align-content: start;
}
.super-admin-workspace input,
.super-admin-workspace select,
.super-admin-workspace textarea {
  min-height: var(--control-height);
  font-size: var(--font-size-body);
}
.super-admin-stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-3);
}
.super-admin-form-grid,
.super-admin-inline-grid {
  display: grid;
  gap: var(--space-2);
}
.super-admin-form-grid {
  grid-template-columns: repeat(12, minmax(0, 1fr));
  align-items: end;
}
.super-admin-inline-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.super-admin-form-grid > * {
  min-width: 0;
}
.super-admin-field-primary {
  grid-column: span 4;
}
.super-admin-field-secondary {
  grid-column: span 4;
}
.super-admin-field-wide {
  grid-column: span 3;
}
.super-admin-field-medium {
  grid-column: span 2;
}
.super-admin-form-grid .super-admin-field-secondary {
  grid-column: span 4;
}
.super-admin-form-grid .super-admin-field-wide {
  grid-column: span 12;
}
.super-admin-field-compact,
.super-admin-field-method {
  grid-column: span 2;
}
.super-admin-field-method {
  min-height: var(--control-height);
  align-self: end;
}
.super-admin-organization-fields {
  grid-template-columns: repeat(12, minmax(0, 1fr));
  align-items: start;
}
.super-admin-organization-fields > * {
  min-width: 0;
}
.super-admin-organization-fields .field-block {
  min-width: 0;
}
.super-admin-organization-fields .super-admin-field-wide {
  grid-column: span 4;
}
.super-admin-organization-fields .super-admin-field-secondary {
  grid-column: span 3;
}
.super-admin-organization-fields .super-admin-field-compact {
  grid-column: span 2;
}
.super-admin-filter-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-2);
  margin-bottom: var(--space-3);
}
.super-admin-standing-target-list {
  display: grid;
  gap: var(--space-2);
  max-height: 240px;
  overflow: auto;
  padding: var(--space-3);
  border: 1px solid var(--stroke);
  border-radius: var(--radius-card);
  background: var(--panel-soft);
}
.super-admin-standing-target-list .inline-checkbox {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  min-width: 0;
}
.super-admin-organization-card {
  gap: var(--space-4);
}
.super-admin-organization-card > .muted {
  line-height: 1.25;
}
.super-admin-department-editor-card {
  position: relative;
  border-color: color-mix(in srgb, var(--dept-accent, var(--accent)) 32%, var(--separator));
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--dept-accent, var(--accent)) 10%, transparent), transparent 26%),
    color-mix(in srgb, var(--panel) 82%, transparent);
  box-shadow:
    inset 6px 0 0 var(--dept-accent, var(--accent)),
    var(--shadow-soft);
}
.super-admin-department-editor-card::after {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 2px;
  background: linear-gradient(90deg, var(--dept-accent, var(--accent)), transparent);
  border-radius: 18px 18px 0 0;
  pointer-events: none;
}
.super-admin-department-header {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-3);
  margin: -2px -2px 0;
  padding: 12px 12px 12px 16px;
  border: 1px solid color-mix(in srgb, var(--dept-accent, var(--accent)) 24%, var(--separator));
  border-radius: var(--radius-card);
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--dept-accent, var(--accent)) 18%, transparent), transparent 58%),
    color-mix(in srgb, var(--panel-soft) 78%, transparent);
  overflow: hidden;
}
.super-admin-department-header::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 6px;
  background: var(--dept-accent, var(--accent));
}
.super-admin-department-title {
  display: grid;
  gap: 3px;
  min-width: 0;
}
.super-admin-license-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid var(--separator);
  border-radius: 999px;
  background: color-mix(in srgb, var(--panel-soft) 84%, transparent);
  color: var(--text);
  font-size: 12px;
  font-weight: 760;
  white-space: nowrap;
}
.super-admin-license-badge.active {
  border-color: color-mix(in srgb, #17805d 54%, var(--separator));
  background: color-mix(in srgb, #17805d 14%, var(--panel-soft));
  color: color-mix(in srgb, #0f513d 82%, var(--text));
}
.super-admin-license-badge.trial {
  border-color: color-mix(in srgb, var(--accent) 46%, var(--separator));
  background: color-mix(in srgb, var(--accent) 16%, var(--panel-soft));
}
.super-admin-license-badge.suspended {
  border-color: color-mix(in srgb, #9a6a13 46%, var(--separator));
  background: color-mix(in srgb, #9a6a13 14%, var(--panel-soft));
}
.super-admin-department-band {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-2);
}
.super-admin-band-item {
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid color-mix(in srgb, var(--dept-accent, var(--accent)) 18%, var(--separator));
  border-radius: var(--radius-card);
  background: color-mix(in srgb, var(--dept-accent, var(--accent)) 7%, var(--panel));
}
.super-admin-band-item .label {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.2;
}
.super-admin-band-item .value {
  margin-top: 2px;
  color: var(--text);
  font-weight: 760;
  line-height: 1.2;
}
.super-admin-personnel-section {
  display: grid;
  gap: var(--space-2);
  padding: 10px;
  border: 1px solid color-mix(in srgb, var(--dept-accent, var(--accent)) 22%, var(--separator));
  border-radius: var(--radius-card);
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--dept-accent, var(--accent)) 8%, transparent), transparent 120px),
    color-mix(in srgb, var(--panel-soft) 76%, transparent);
}
.super-admin-personnel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
}
.super-admin-personnel-heading h4 {
  margin: 0;
  font-size: 14px;
  line-height: 1.2;
}
.super-admin-section-tag {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--dept-accent, var(--accent)) 14%, var(--panel));
  color: var(--text);
  font-size: 11px;
  font-weight: 760;
  white-space: nowrap;
}
.super-admin-personnel-row {
  display: grid;
  grid-template-columns: minmax(190px, 1fr) minmax(240px, 1.3fr) auto auto minmax(110px, 0.5fr);
  gap: var(--space-2);
  align-items: end;
  padding: 9px;
  border: 1px solid var(--stroke);
  border-radius: var(--radius-card);
  background: color-mix(in srgb, var(--panel) 82%, transparent);
}
.super-admin-personnel-row .field-block {
  margin: 0;
}
.super-admin-personnel-options,
.super-admin-personnel-actions {
  min-height: var(--control-height);
  align-items: center;
  gap: var(--space-2);
  white-space: nowrap;
}
.super-admin-personnel-status {
  min-height: var(--control-height);
  display: inline-flex;
  align-items: center;
}
.super-admin-personnel-empty {
  padding: 10px;
  border: 1px dashed color-mix(in srgb, var(--dept-accent, var(--accent)) 28%, var(--separator));
  border-radius: var(--radius-card);
}
.super-admin-save-status {
  min-height: var(--control-height);
  align-self: center;
  display: inline-flex;
  align-items: center;
  padding: 0 2px;
}
.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}
.super-admin-member-fields {
  grid-template-columns:
    minmax(260px, 1.15fr)
    minmax(260px, 1.15fr)
    auto;
  align-items: center;
}
.super-admin-member-options {
  min-height: var(--control-height);
  align-items: center;
  gap: var(--space-3);
  white-space: nowrap;
}
.super-admin-member-options .inline-checkbox {
  min-height: var(--control-height);
  display: inline-flex;
  align-items: center;
}
.super-admin-member-options .inline-checkbox input {
  transform: translateY(-0.5px);
}
.super-admin-organization-actions {
  min-height: var(--control-height);
  align-items: center;
  gap: var(--space-3);
}
.super-admin-roster-import {
  display: grid;
  grid-template-columns:
    minmax(210px, 1.25fr)
    minmax(230px, 1.15fr)
    auto
    auto
    minmax(220px, 1fr);
  gap: var(--space-2);
  align-items: center;
  padding: 10px;
  border: 1px solid var(--separator);
  border-radius: var(--radius-card);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--panel-alt) 92%, transparent), color-mix(in srgb, var(--panel) 88%, transparent));
}
.super-admin-roster-import-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.super-admin-roster-import-copy strong {
  color: var(--text);
  font-size: 13px;
  line-height: 1.15;
}
.super-admin-roster-import-copy span,
.super-admin-roster-file-name {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.25;
}
.super-admin-roster-file-picker {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  min-width: 0;
}
.super-admin-roster-file-btn {
  white-space: nowrap;
}
.super-admin-roster-file-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
@media (min-width: 1280px) {
  .super-admin-organization-card {
    padding: 12px 14px;
    gap: 10px;
  }
  .super-admin-organization-fields {
    column-gap: 10px;
    row-gap: 6px;
  }
  .super-admin-member-fields {
    column-gap: 10px;
    grid-template-columns:
      minmax(300px, 1.2fr)
      minmax(300px, 1.2fr)
      auto;
  }
  .super-admin-organization-actions {
    gap: 10px;
  }
  .super-admin-roster-import {
    column-gap: 10px;
  }
}
@media (max-width: 1180px) {
  .super-admin-department-band,
  .super-admin-personnel-row {
    grid-template-columns: 1fr;
    align-items: stretch;
  }
  .super-admin-personnel-options,
  .super-admin-personnel-actions {
    min-height: 0;
    flex-wrap: wrap;
    white-space: normal;
  }
  .super-admin-personnel-status {
    min-height: 0;
  }
}
.super-admin-session-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-3);
}
.super-admin-session-card {
  display: grid;
  gap: var(--space-3);
}
.super-admin-session-badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.super-admin-session-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border: 1px solid var(--stroke);
  background: var(--panel-soft);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.super-admin-session-badge.active {
  background: rgba(99,193,116,0.18);
  border-color: rgba(99,193,116,0.48);
}
.super-admin-session-badge.ended,
.super-admin-session-badge.expired {
  background: rgba(244,114,182,0.14);
  border-color: rgba(244,114,182,0.36);
}
.super-admin-session-meta {
  display: grid;
  gap: 6px;
}
.super-admin-session-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}
.super-admin-quick-action-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--space-2);
  align-items: start;
}
.super-admin-quick-action-copy {
  display: grid;
  grid-template-columns: minmax(220px, 1.3fr) minmax(180px, 1fr) minmax(220px, 1.5fr);
  grid-template-areas:
    "label key activity"
    "role role role";
  gap: 6px 20px;
  min-width: 0;
}
.super-admin-quick-action-row .row {
  justify-content: flex-end;
}
.super-admin-quick-action-field {
  min-width: 0;
}
.super-admin-quick-action-label {
  grid-area: label;
}
.super-admin-quick-action-key {
  grid-area: key;
}
.super-admin-quick-action-activity {
  grid-area: activity;
}
.super-admin-quick-action-role {
  grid-area: role;
}
.super-admin-quick-action-copy .muted {
  margin-top: 4px;
  line-height: 1.3;
}
.super-admin-icon-preview {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 16px 0;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--panel);
}
.super-admin-icon-preview-image {
  display: grid;
  width: 88px;
  height: 88px;
  flex: 0 0 88px;
  place-items: center;
  border-radius: 10px;
  background: repeating-conic-gradient(#dfe5ec 0 25%, #f7f9fb 0 50%) 50% / 16px 16px;
}
.super-admin-icon-preview-image img {
  max-width: 72px;
  max-height: 72px;
  object-fit: contain;
}
.super-admin-validation-warnings {
  color: #8a5a00;
  line-height: 1.5;
}
@media (max-width: 900px) {
  .super-admin-quick-action-row {
    grid-template-columns: 1fr;
  }
  .super-admin-quick-action-copy {
    grid-template-columns: 1fr;
    grid-template-areas:
      "label"
      "key"
      "activity"
      "role";
  }
  .super-admin-quick-action-row .row {
    justify-content: flex-start;
  }
}
.super-admin-session-modal-card {
  width: min(760px, 100%);
}
.super-admin-session-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3);
}
.super-admin-session-detail-grid .field-block {
  margin: 0;
}
.super-admin-session-detail-value {
  display: block;
  margin-top: 6px;
  color: var(--text);
  word-break: break-word;
}
.ics202-workspace {
  position: fixed;
  inset: 0;
  z-index: 7800;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  background: linear-gradient(180deg, color-mix(in srgb, var(--bg-elevated) 96%, transparent), color-mix(in srgb, var(--bg) 98%, transparent));
}
.ics202-topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-5) var(--space-6);
  border-bottom: 1px solid var(--stroke);
  background: color-mix(in srgb, var(--panel) 76%, transparent);
  backdrop-filter: blur(22px) saturate(150%);
}
.ics202-topbar-copy h2 {
  margin: 0;
  font-size: var(--font-size-title);
  line-height: 1.08;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight: 760;
  letter-spacing: -0.04em;
}
.ics202-topbar-copy p {
  margin: 4px 0 0;
  max-width: 720px;
  color: var(--muted);
  font-size: var(--font-size-help);
  line-height: 1.35;
}
#icsFormsWorkspace {
  --ics-forms-display-font: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --ics-forms-copy-size: var(--font-size-help);
}
#icsFormsWorkspace .ics202-body,
#icsFormsWorkspace button,
#icsFormsWorkspace input,
#icsFormsWorkspace select,
#icsFormsWorkspace textarea {
  font-family: var(--ics-forms-display-font);
}
#icsFormsWorkspace .ics202-card h3,
#icsFormsWorkspace .tech-ref-panel h4,
#icsFormsWorkspace .tech-ref-section-title h4 {
  font-family: var(--ics-forms-display-font);
  font-size: clamp(17px, 1.35vw, 19px);
  font-weight: 760;
  line-height: 1.15;
  letter-spacing: -0.025em;
}
#icsFormsWorkspace .ics202-card p,
#icsFormsWorkspace .ics202-card .muted,
#icsFormsWorkspace .ics202-card .hint,
#icsFormsWorkspace .field-block,
#icsFormsWorkspace .ics202-field,
#icsFormsWorkspace .ics214-entry-row,
#icsFormsWorkspace .panel.compact {
  font-size: var(--ics-forms-copy-size);
  line-height: 1.35;
}
#icsFormsWorkspace .field-block > span,
#icsFormsWorkspace .ics202-field > span,
#icsFormsWorkspace .tech-ref-read-label {
  font-family: var(--ics-forms-display-font);
  font-size: var(--ics-forms-copy-size);
  font-weight: 700;
  line-height: 1.35;
}
#icsFormsWorkspace button {
  font-size: var(--ics-forms-copy-size);
  font-weight: 700;
}
#icsFormsWorkspace .muted,
#icsFormsWorkspace .hint,
#icsFormsWorkspace label,
#icsFormsWorkspace .ics202-field > span {
  color: var(--text);
}
.ics202-topbar-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: var(--space-2);
}
.ics202-body {
  min-height: 0;
  overflow: auto;
  padding: var(--space-5) var(--space-6) 20px;
}
.ics202-shell {
  display: grid;
  gap: var(--space-5);
}
.ics202-banner {
  padding: var(--space-4) var(--space-5);
  border-radius: var(--radius-card);
  border: 1px solid rgba(243,198,19,0.28);
  background: rgba(243,198,19,0.08);
}
.ics202-banner strong {
  display: block;
  margin-bottom: var(--space-2);
  color: var(--accent);
}
.ics202-warning-list {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: var(--space-1);
  color: var(--text);
}
.ics202-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(320px, 0.9fr);
  gap: var(--space-5);
  align-items: start;
}
.ics202-main,
.ics202-side {
  display: grid;
  gap: var(--space-5);
}
.ics202-card {
  border: 1px solid var(--stroke);
  border-radius: var(--radius-panel);
  background: var(--panel-soft);
  padding: var(--space-5);
  box-shadow: var(--shadow);
}
.ics202-card h3,
.landing-panel-header h2,
.landing-card-header h3,
.panel h3,
.modal-header h2 {
  font-family: "Depressionist 3 Revisited","Times New Roman",serif;
  letter-spacing: 0.02em;
}
.landing-panel-header h2 {
  margin: 0 0 var(--space-2);
}
.map-style-tray-header strong,
.weather-panel-header strong {
  font-family: "Depressionist 3 Revisited","Times New Roman",serif;
  letter-spacing: 0.02em;
  font-size: 1rem;
}
.weather-panel {
  border: 1px solid var(--stroke);
  box-shadow: var(--shadow);
}
body[data-theme="light"] .ics202-topbar {
  background: linear-gradient(180deg,#f6f8fb,#eef2f7);
}
.ics214-entry-list {
  display: grid;
  gap: 4px;
  margin-top: var(--space-3);
}
.ics214-entry-row {
  display: grid;
  grid-template-columns: 148px minmax(160px, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 5px 8px;
  border: 1px solid var(--separator);
  border-radius: 14px;
  background: color-mix(in srgb, var(--panel) 72%, transparent);
}
.ics214-entry-time {
  display: flex;
  align-items: baseline;
  gap: 5px;
  min-width: 0;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.ics214-entry-time strong {
  font-weight: 760;
}
.ics214-entry-time span {
  color: var(--muted);
}
.ics214-entry-note {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ics214-entry-actions {
  display: flex;
  align-items: center;
  gap: 5px;
}
.ics214-entry-actions button {
  min-height: 30px;
  padding: 4px 8px;
  border-radius: 10px;
}
.tech-ref-card {
  border-color: rgba(31, 41, 55, 0.14);
  --tech-ref-field-min: 210px;
  --tech-ref-touch-target: 44px;
}
.tech-ref-panel {
  margin-top: 12px;
  padding: clamp(12px, 1.8vw, 18px);
  border: 1px solid rgba(31, 41, 55, 0.14);
  border-left: 8px solid #64748b;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
  color: #000;
}
.tech-ref-panel p,
.tech-ref-panel label,
.tech-ref-panel .muted,
.tech-ref-panel .field-block > span,
.tech-ref-panel .tech-ref-read-grid span,
.tech-ref-panel .tech-ref-read-row span,
.tech-ref-panel .tech-ref-read-grid strong,
.tech-ref-panel .tech-ref-read-row strong {
  color: #000;
}
.tech-ref-panel h4 {
  margin: 0 0 10px;
  font-size: clamp(0.95rem, 1.5vw, 1.08rem);
  letter-spacing: -0.01em;
}
.tech-ref-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.tech-ref-section-title h4 {
  margin: 0;
}
.tech-ref-section-toggle {
  display: inline-flex;
  min-width: 52px;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  border: 2px solid #1d4ed8;
  border-radius: 10px;
  background: #fff;
  color: #1d4ed8;
  font-size: 1.7rem;
  font-weight: 900;
  line-height: 1;
  touch-action: manipulation;
}
.tech-ref-section-toggle:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.35);
  outline-offset: 2px;
}
.tech-ref-panel.is-collapsed {
  padding-bottom: 12px;
}
.tech-ref-panel.is-collapsed > :not(.tech-ref-section-title):not(.tech-ref-section-header) {
  display: none !important;
}
.tech-ref-panel.is-collapsed .tech-ref-section-title {
  margin-bottom: 0;
}
.tech-ref-grid,
.tech-ref-read-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(var(--tech-ref-field-min), 1fr));
  gap: clamp(10px, 1.4vw, 14px);
  min-width: 0;
}
.tech-ref-grid-action {
  display: flex;
  align-items: end;
}
.tech-ref-grid-action button {
  width: 100%;
  min-height: var(--tech-ref-touch-target);
}
.tech-ref-card .field-block {
  min-width: 0;
}
.tech-ref-card .field-block input,
.tech-ref-card .field-block select,
.tech-ref-card .field-block textarea {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  min-height: var(--tech-ref-touch-target);
  border-radius: 14px;
  font-size: 1rem;
}
.tech-ref-card .field-block input,
.tech-ref-card .field-block select {
  height: var(--tech-ref-touch-target);
}
.tech-ref-card .field-block textarea {
  resize: vertical;
  line-height: 1.35;
}
.tech-ref-placards-layout {
  display: grid;
  grid-template-columns: minmax(280px, 520px) minmax(280px, 340px);
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
  width: min(100%, 980px);
  margin-top: 18px;
}
.tech-ref-placards-layout-view {
  grid-template-columns: minmax(280px, 520px) minmax(190px, 240px);
}
.tech-ref-placards-layout-view .nfpa-704-diamond {
  width: min(100%, 150px);
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.18);
}
.tech-ref-placards-layout-view .nfpa-704-quadrant {
  font-size: clamp(1.4rem, 3vw, 2.2rem);
}
.tech-ref-placards-layout-view .nfpa-704-wrap {
  gap: 8px;
}
.tech-ref-placards-layout-view .nfpa-704-key {
  gap: 6px 10px;
  font-size: 0.7rem;
}
.nfpa-704-wrap {
  display: grid;
  grid-template-rows: auto auto;
  justify-items: center;
  gap: 18px;
  width: 100%;
  min-width: 0;
  justify-self: start;
}
.nfpa-704-diamond {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: min(100%, 270px);
  aspect-ratio: 1;
  overflow: hidden;
  border: 4px solid #050505;
  background: #050505;
  box-shadow: 0 16px 32px rgba(15, 23, 42, 0.2);
  transform: rotate(45deg) scale(0.72);
  transform-origin: center;
  margin: 0;
}
.nfpa-704-quadrant {
  display: grid;
  place-items: center;
  min-width: 0;
  border: 2px solid #050505;
  font-size: clamp(2.3rem, 6vw, 4.2rem);
  font-weight: 950;
  line-height: 1;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.24);
}
.nfpa-704-quadrant > * {
  transform: rotate(-45deg);
}
.nfpa-704-red {
  order: 1;
  background: #e5232f;
  color: #fff;
}
.nfpa-704-blue {
  order: 3;
  background: #1769d2;
  color: #fff;
}
.nfpa-704-yellow {
  order: 2;
  background: #ffd51f;
  color: #050505;
}
.nfpa-704-white {
  order: 4;
  background: #fff;
  color: #050505;
  text-shadow: none;
}
.nfpa-704-control {
  display: block;
  width: 88%;
}
.nfpa-704-control select {
  width: 100%;
  min-height: 56px;
  padding: 6px 28px 6px 10px;
  border: 2px solid rgba(0, 0, 0, 0.72);
  border-radius: 12px;
  background-color: rgba(255, 255, 255, 0.94);
  color: #050505;
  font: inherit;
  font-size: 2rem;
  font-weight: 950;
  text-align: center;
  text-align-last: center;
  cursor: pointer;
}
.nfpa-704-special-control {
  width: 116%;
}
.nfpa-704-special-control select {
  font-size: 0.9rem;
  font-weight: 850;
}
.nfpa-704-water-symbol {
  text-decoration: line-through;
  text-decoration-thickness: 0.12em;
}
.nfpa-704-key {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 14px;
  width: 100%;
  margin-top: 4px;
  color: #334155;
  font-size: 0.78rem;
  font-weight: 800;
}
.nfpa-704-key span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.nfpa-704-key i {
  width: 10px;
  height: 10px;
  border: 1px solid rgba(0, 0, 0, 0.55);
  border-radius: 2px;
}
.nfpa-key-blue { background: #1769d2; }
.nfpa-key-red { background: #e5232f; }
.nfpa-key-yellow { background: #ffd51f; }
.nfpa-key-white { background: #fff; }
.tech-ref-placard-fields {
  display: grid;
  align-content: center;
  gap: 16px;
  min-width: 0;
}
.tech-ref-placard-fields > .row {
  margin: 0;
}
.nfpa-704-guidance {
  margin: 0;
  line-height: 1.5;
}
.tech-ref-smart-field {
  align-content: start;
}
.tech-ref-smart-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px;
  align-items: center;
}
.tech-ref-info-btn {
  min-height: var(--tech-ref-touch-target);
  padding-inline: 12px;
  border-radius: 14px;
  border: 1px solid rgba(29, 78, 216, 0.22);
  background: linear-gradient(180deg, rgba(239, 246, 255, 0.96), rgba(219, 234, 254, 0.9));
  color: #1e3a8a;
  font-weight: 800;
}
.tech-ref-info-btn[aria-expanded="true"] {
  background: linear-gradient(180deg, #1d4ed8, #1e40af);
  color: #fff;
}
.tech-ref-field-hint {
  display: grid;
  gap: 8px;
  margin-top: 8px;
  padding: 10px 12px;
  border: 1px solid rgba(30, 64, 175, 0.2);
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(239, 246, 255, 0.98), rgba(255, 255, 255, 0.9));
  color: #1f2937;
  font-size: 0.88rem;
  line-height: 1.35;
}
.tech-ref-field-hint-title {
  font-weight: 850;
}
.tech-ref-field-hint-title.danger {
  color: #991b1b;
}
.tech-ref-field-hint-title.caution,
.tech-ref-field-hint-title.warning {
  color: #92400e;
}
.tech-ref-field-hint-title.neutral {
  color: #1e3a8a;
}
.tech-ref-field-hint ul {
  display: grid;
  gap: 5px;
  margin: 0;
  padding-left: 18px;
}
.tech-ref-check {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  min-height: var(--tech-ref-touch-target);
  padding: 8px 12px;
  border: 1px solid rgba(31, 41, 55, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  font-weight: 700;
  touch-action: manipulation;
}
.tech-ref-grid > .tech-ref-check {
  align-self: end;
  height: var(--tech-ref-touch-target);
}
.tech-ref-check input {
  width: 18px;
  min-width: 18px;
  height: 18px;
  min-height: 18px;
  flex: 0 0 18px;
  accent-color: #1d4ed8;
}
.tech-ref-radio-field {
  align-self: end;
  grid-column: span 2;
}
.tech-ref-radio-group {
  display: grid;
  grid-template-columns: repeat(3, minmax(124px, 1fr));
  gap: 10px;
  min-width: 0;
}
.tech-ref-radio-pill {
  justify-content: center;
  width: 100%;
  min-width: 0;
  height: var(--tech-ref-touch-target);
  padding-inline: 12px;
}
.tech-ref-radio-pill input {
  width: 18px;
  min-width: 18px;
  height: 18px;
  min-height: 18px;
}
.tech-ref-read-grid > div,
.tech-ref-read-row {
  display: grid;
  gap: 3px;
  padding: 10px;
  border: 1px solid rgba(31, 41, 55, 0.12);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.68);
}
.tech-ref-read-grid strong,
.tech-ref-read-row strong {
  color: #111827;
}
.tech-ref-read-grid span,
.tech-ref-read-row span {
  color: #000;
}
.tech-ref-blue {
  border-left-color: #2563eb;
  background: linear-gradient(90deg, rgba(37, 99, 235, 0.14), rgba(255, 255, 255, 0.76));
}
.tech-ref-green {
  border-left-color: #2f6f3e;
  background: linear-gradient(90deg, rgba(47, 111, 62, 0.16), rgba(255, 255, 255, 0.76));
}
.tech-ref-magenta {
  border-left-color: #be185d;
  background: linear-gradient(90deg, rgba(190, 24, 93, 0.15), rgba(255, 255, 255, 0.76));
}
.tech-ref-radioactive {
  border-left-color: #eab308;
  background: linear-gradient(90deg, rgba(234, 179, 8, 0.2), rgba(255, 255, 255, 0.78));
}
.tech-ref-monitors {
  border-left-color: #b45309;
  background: linear-gradient(90deg, rgba(180, 83, 9, 0.12), rgba(255, 255, 255, 0.78));
}
.tech-ref-aegl {
  border-left-color: #c2410c;
  background: linear-gradient(90deg, rgba(194, 65, 12, 0.16), rgba(255, 255, 255, 0.78));
}
.tech-ref-cpc {
  border-left-color: #1d4ed8;
  background: linear-gradient(90deg, rgba(29, 78, 216, 0.14), rgba(255, 255, 255, 0.78));
}
.tech-ref-weather {
  border-left-color: #84cc16;
  background: linear-gradient(90deg, rgba(132, 204, 22, 0.16), rgba(255, 255, 255, 0.78));
}
.tech-ref-decon {
  border-left-color: #60a5fa;
  background: linear-gradient(90deg, rgba(96, 165, 250, 0.16), rgba(255, 255, 255, 0.78));
}
.tech-ref-chemical-header {
  align-items: center;
  margin-bottom: 10px;
}
.tech-ref-chemical-header .tech-ref-section-title {
  flex: 1 1 auto;
  margin-bottom: 0;
}
.tech-ref-add-chemical-btn {
  min-height: var(--tech-ref-touch-target);
  padding-inline: 14px;
  border-radius: 999px;
  border: 1px dashed rgba(31, 41, 55, 0.22);
  background: rgba(255, 255, 255, 0.76);
  font-weight: 800;
}
.tech-ref-chemical-inventory {
  border-left-color: #7c3aed;
}
.tech-ref-inventory-actions {
  width: 80px;
  text-align: center;
}
.tech-ref-search,
.tech-ref-sort {
  padding: 8px 12px;
  border: 1px solid rgba(31, 41, 55, 0.22);
  border-radius: 8px;
  background: #fff;
  font-size: 0.95rem;
}
.tech-ref-search {
  flex: 1 1 min(100%, 250px);
  min-width: 120px;
}
.tech-ref-inventory-table-wrapper {
  overflow-x: auto;
  border: 1px solid rgba(31, 41, 55, 0.14);
  border-radius: 10px;
  margin-top: 12px;
}
.tech-ref-inventory-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.tech-ref-inventory-table thead {
  background: rgba(31, 41, 55, 0.06);
  border-bottom: 2px solid rgba(31, 41, 55, 0.14);
}
.tech-ref-inventory-table th {
  padding: 10px 8px;
  text-align: left;
  font-weight: 700;
  color: #000;
}
.tech-ref-inventory-table td {
  padding: 10px 8px;
  border-bottom: 1px solid rgba(31, 41, 55, 0.08);
}
.tech-ref-inventory-row {
  background: #fff;
}
.tech-ref-inventory-row:hover {
  background: rgba(31, 41, 55, 0.03);
}
.tech-ref-inventory-toggle {
  width: 28px;
  text-align: center;
}
.tech-ref-inventory-toggle button {
  min-width: 32px;
  min-height: 32px;
  padding: 2px 4px;
  border: 1px solid rgba(37, 99, 235, 0.24);
  border-radius: 8px;
  background: #fff;
  color: #1d4ed8;
  cursor: pointer;
  font-weight: 800;
}
.tech-ref-inventory-seq { width: 40px; font-weight: 600; }
.tech-ref-inventory-name { min-width: 120px; }
.tech-ref-inventory-container { min-width: 100px; }
.tech-ref-inventory-un { width: 80px; }
.tech-ref-inventory-dot { width: 80px; }
.tech-ref-inventory-nfpa { min-width: 140px; white-space: nowrap; }
.tech-ref-inventory-evac { width: 80px; text-align: right; }
.tech-ref-inventory-state { width: 80px; }
.tech-ref-inventory-hasdetail { width: 50px; text-align: center; }
.tech-ref-inventory-detail-row {
  background: rgba(124, 58, 237, 0.04);
}
.tech-ref-chemical-detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
  gap: clamp(18px, 3vw, 34px);
  align-items: start;
}
.tech-ref-chemical-nfpa {
  display: grid;
  justify-items: center;
  min-width: 0;
}
.tech-ref-chemical-nfpa .tech-ref-detail-divider {
  justify-self: stretch;
  width: 100%;
  margin-top: 0;
}
.tech-ref-chemical-nfpa .nfpa-704-wrap {
  justify-self: center;
}
.tech-ref-detail-section {
  padding: 14px;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 8px;
  margin: 10px 0;
}
.tech-ref-detail-divider {
  margin: 14px 0 10px 0;
  padding: 6px 0;
  border-top: 1px solid rgba(31, 41, 55, 0.14);
  font-weight: 600;
  font-size: 0.9rem;
}
.tech-ref-detail-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}
.tech-ref-row-actions {
  display: flex;
  gap: 6px;
  align-items: center;
  justify-content: center;
}
.tech-ref-row-detail-badge {
  font-size: 0.9rem;
  color: #2563eb;
  font-weight: 600;
}
.tech-ref-row-actions button {
  min-width: 32px;
  min-height: 32px;
  padding: 4px 6px;
  border: 1px solid rgba(31, 41, 55, 0.14);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  font-weight: 700;
  color: #2563eb;
  font-size: 1.1rem;
  line-height: 1;
}
.tech-ref-row-actions button:hover,
.tech-ref-row-actions button:focus-visible,
.tech-ref-inventory-toggle button:hover,
.tech-ref-inventory-toggle button:focus-visible {
  border-color: rgba(37, 99, 235, 0.5);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
  outline: none;
}
.tech-ref-row-remove-btn {
  color: #b91c1c;
}
.tech-ref-row-remove-btn:hover,
.tech-ref-row-remove-btn:focus-visible {
  border-color: rgba(185, 28, 28, 0.5);
  box-shadow: 0 0 0 3px rgba(185, 28, 28, 0.12);
}
@media (min-width: 1180px) {
  .tech-ref-card {
    --tech-ref-field-min: 190px;
  }
  .tech-ref-chemical .field-block-wide {
    grid-column: span 2;
  }
}
@media (max-width: 960px) {
  .tech-ref-card {
    --tech-ref-field-min: 220px;
  }
  .tech-ref-card > .row:first-child {
    align-items: stretch;
  }
  .tech-ref-card > .row:first-child > .row {
    position: sticky;
    top: 10px;
    z-index: 4;
    padding: 8px;
    border: 1px solid rgba(31, 41, 55, 0.12);
    border-radius: 16px;
    background: color-mix(in srgb, var(--panel) 88%, transparent);
    backdrop-filter: blur(14px);
  }
}
@media (max-width: 640px) {
  .tech-ref-card {
    --tech-ref-field-min: min(100%, 18rem);
    margin-inline: calc(var(--space-2) * -1);
    padding: var(--space-4);
    border-radius: 18px;
    overflow: hidden;
  }
  .tech-ref-card h3,
  .tech-ref-card h4,
  .tech-ref-card p,
  .tech-ref-card label span,
  .tech-ref-read-grid span {
    overflow-wrap: anywhere;
  }
  .tech-ref-grid,
  .tech-ref-read-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .tech-ref-placards-layout,
  .tech-ref-placards-layout-view {
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
    gap: 18px;
  }
  .tech-ref-placards-layout .nfpa-704-wrap {
    justify-self: center;
  }
  .tech-ref-placards-layout-view .nfpa-704-diamond {
    width: min(100%, 140px);
  }
  .nfpa-704-diamond {
    width: min(100%, 250px);
  }
  .tech-ref-panel {
    position: relative;
    min-width: 0;
    padding: 14px;
    border-left-width: 0;
    border-top: 8px solid #64748b;
  }
  .tech-ref-section-header {
    align-items: center;
    gap: 10px;
  }
  .tech-ref-section-title {
    min-width: 0;
    margin-bottom: 12px;
  }
  .tech-ref-section-header .tech-ref-section-title {
    margin-bottom: 0;
  }
  .tech-ref-section-toggle {
    flex: 0 0 auto;
  }
  .tech-ref-panel > .row:not(.row--space-between) {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
    gap: 10px;
  }
  .tech-ref-chemical-detail-layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .tech-ref-blue { border-top-color: #2563eb; }
  .tech-ref-green { border-top-color: #2f6f3e; }
  .tech-ref-magenta { border-top-color: #be185d; }
  .tech-ref-radioactive { border-top-color: #eab308; }
  .tech-ref-monitors { border-top-color: #b45309; }
  .tech-ref-aegl { border-top-color: #c2410c; }
  .tech-ref-cpc { border-top-color: #1d4ed8; }
  .tech-ref-weather { border-top-color: #84cc16; }
  .tech-ref-decon { border-top-color: #60a5fa; }
  .tech-ref-check {
    width: 100%;
    justify-content: flex-start;
    border-radius: 16px;
    box-sizing: border-box;
    white-space: normal;
  }
  .tech-ref-radio-field {
    grid-column: auto;
  }
  .tech-ref-radio-pill {
    width: 100%;
  }
  .tech-ref-card > .row:first-child {
    display: grid;
    gap: 12px;
  }
  .tech-ref-card > .row:first-child > .row {
    top: 6px;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }
  .tech-ref-card > .row:first-child button {
    width: 100%;
    min-width: 0;
  }
  .tech-ref-smart-control {
    grid-template-columns: minmax(0, 1fr);
  }
  .tech-ref-info-btn {
    width: 100%;
  }
}
@media (min-width: 440px) and (max-width: 640px) {
  .tech-ref-card > .row:first-child > .row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.command-structure-workspace {
  position: fixed;
  inset: 0;
  z-index: 3200;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  background: linear-gradient(180deg, color-mix(in srgb, var(--bg-elevated) 96%, transparent), color-mix(in srgb, var(--bg) 98%, transparent));
}
.command-structure-topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-5) var(--space-6);
  border-bottom: 1px solid var(--separator);
  background: color-mix(in srgb, var(--panel) 76%, transparent);
  backdrop-filter: blur(22px) saturate(150%);
}
.command-structure-topbar-copy h2 {
  margin: 0;
  font-size: var(--font-size-title);
  line-height: 1.08;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight: 760;
  letter-spacing: -0.04em;
}
.command-structure-topbar-copy p {
  margin: 4px 0 0;
  max-width: 760px;
  color: var(--muted);
  font-size: var(--font-size-help);
  line-height: 1.4;
}
.command-structure-topbar-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: var(--space-2);
}
.command-structure-body {
  min-height: 0;
  overflow: auto;
  padding: var(--space-5) var(--space-6) 24px;
}
.command-structure-shell {
  display: grid;
  gap: var(--space-4);
}
.command-structure-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-3);
}
.command-structure-summary-row {
  display: grid;
  gap: 4px;
}
.command-structure-summary-label {
  color: var(--muted);
  font-size: var(--font-size-label);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.command-structure-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-4);
  align-items: start;
}
.command-structure-workspace.panel-open .command-structure-grid {
  grid-template-columns: minmax(0, 1.6fr) minmax(300px, 0.75fr);
}
.command-structure-chart-card,
.command-structure-role-panel {
  border: 1px solid var(--stroke);
  background: var(--panel-soft);
  padding: var(--space-4);
  box-shadow: var(--shadow);
}
.command-structure-chart-card,
.command-structure-role-panel,
.command-structure-summary {
  border-radius: 0;
}
.command-structure-card-header {
  display: flex;
  justify-content: space-between;
  gap: var(--space-3);
  align-items: flex-start;
  margin-bottom: var(--space-3);
}
.command-structure-card-header h3 {
  margin: 0 0 4px;
  font-family: "Depressionist 3 Revisited","Times New Roman",serif;
  letter-spacing: 0.02em;
}
.command-structure-chart-scroll {
  overflow: auto;
  padding-bottom: var(--space-2);
}
.command-structure-chart {
  position: relative;
  width: 2320px;
  min-height: 1320px;
  margin: 0 auto;
  background:
    linear-gradient(to bottom, rgba(255,255,255,0.03), rgba(255,255,255,0.01)),
    repeating-linear-gradient(to bottom, transparent 0, transparent 39px, rgba(255,255,255,0.025) 40px),
    repeating-linear-gradient(to right, transparent 0, transparent 39px, rgba(255,255,255,0.025) 40px);
  border: 1px solid var(--stroke);
}
body[data-theme="light"] .command-structure-chart {
  background:
    linear-gradient(to bottom, rgba(255,255,255,0.9), rgba(249,250,252,0.92)),
    repeating-linear-gradient(to bottom, transparent 0, transparent 39px, rgba(15,23,42,0.04) 40px),
    repeating-linear-gradient(to right, transparent 0, transparent 39px, rgba(15,23,42,0.04) 40px);
}
.command-structure-connectors {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.command-structure-connectors path {
  fill: none;
  stroke: rgba(201,209,220,0.9);
  stroke-width: 2;
  stroke-linejoin: miter;
  stroke-linecap: square;
}
body[data-theme="light"] .command-structure-connectors path {
  stroke: rgba(31,41,55,0.72);
}
.command-structure-node {
  position: absolute;
  display: grid;
  align-content: center;
  gap: 6px;
  padding: 10px 12px;
  border: 2px solid #0f172a;
  border-radius: 0;
  background: #ffffff;
  color: #0f172a;
  text-align: center;
  box-shadow: none;
}
.command-structure-node:hover {
  transform: none;
}
.command-structure-node.empty {
  background: #ffffff;
}
.command-structure-node.assigned {
  background: #d8f0d2;
}
.command-structure-node.current-user {
  border-color: #2563eb;
  box-shadow: inset 0 0 0 1px rgba(37,99,235,0.25);
}
.command-structure-node.selected {
  outline: 3px solid rgba(243,198,19,0.45);
  outline-offset: 2px;
}
.command-structure-node-label {
  display: block;
  font-size: 0.84rem;
  line-height: 1.04;
  font-weight: 800;
}
.command-structure-node-assignee {
  display: block;
  font-size: 0.72rem;
  line-height: 1.15;
  color: #334155;
}
.command-structure-role-panel {
  display: grid;
  gap: var(--space-3);
  position: sticky;
  top: 0;
}
.command-structure-role-header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;
  justify-content: flex-end;
}
.command-structure-role-empty,
.command-structure-role-editor {
  display: grid;
  gap: var(--space-3);
}
.command-structure-role-empty h3,
.command-structure-role-editor h3 {
  margin: 0;
  font-family: "Depressionist 3 Revisited","Times New Roman",serif;
}
.command-structure-status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid var(--stroke);
  background: #ffffff;
  color: #0f172a;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.command-structure-status-badge.assigned {
  background: #d8f0d2;
}
.command-structure-field {
  display: grid;
  gap: var(--space-1);
}
.command-structure-field > span {
  color: var(--muted);
  font-size: var(--font-size-label);
}
.command-structure-role-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}
body[data-theme="light"] .command-structure-node {
  color: #0f172a;
}
body[data-theme="light"] .weather-panel,
body[data-theme="light"] .map-layers-tray,
body[data-theme="light"] .draw-controls,
body[data-theme="light"] .leaflet-control-layers,
body[data-theme="light"] .cost-marker,
body[data-theme="light"] .toast {
  background: rgba(255,255,255,0.96);
}
body[data-theme="light"] .map-style-launcher,
body[data-theme="light"] .map-layers-launcher,
body[data-theme="light"] .map-focus-launcher,
body[data-theme="light"] .map-weather-launcher {
  background: rgba(255,255,255,0.96);
}
body[data-theme="light"] .isolation-suggestions {
  background: rgba(255,255,255,0.98);
}
body[data-theme="light"] .map-style-card-chip {
  color: #111;
}
body[data-theme="light"] .map-sidebar-toggle {
  color: #101418;
}
.ics202-card h3 {
  margin: 0 0 var(--space-2);
}
.ics202-card .hint {
  margin: 0 0 var(--space-3);
  color: var(--muted);
  font-size: var(--font-size-help);
  line-height: 1.45;
}
.ics202-field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3);
}
.ics202-field-grid.single {
  grid-template-columns: minmax(0, 1fr);
}
.ics202-field {
  display: grid;
  gap: var(--space-1);
}
.ics202-field > span {
  color: var(--muted);
  font-size: var(--font-size-label);
}
.ics202-field textarea {
  min-height: 96px;
  resize: vertical;
}
.ics202-toggle-row,
.ics202-objective-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  align-items: center;
}
.ics202-toggle-row label,
.ics202-checklist label {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--text);
  font-size: 13px;
}
.ics202-toggle-row input,
.ics202-checklist input[type="checkbox"] {
  width: auto;
  margin: 0;
}
.ics202-objective-toolbar select {
  min-width: 200px;
  width: auto;
}
.ics202-objectives-list {
  display: grid;
  gap: var(--space-2);
  margin-top: var(--space-3);
}
.ics202-objective-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: var(--space-2);
  align-items: start;
  padding: var(--space-3);
  border: 1px solid var(--stroke);
  border-radius: var(--radius-card);
  background: var(--panel-soft);
}
.ics202-objective-item.dragging {
  opacity: 0.6;
}
.ics202-objective-item.drag-over {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(243,198,19,0.18);
}
.ics202-objective-index {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(243,198,19,0.12);
  border: 1px solid rgba(243,198,19,0.24);
  color: var(--accent);
  font-weight: 800;
}
.ics202-objective-item textarea {
  min-height: 64px;
  resize: vertical;
}
.ics202-objective-actions {
  display: grid;
  gap: var(--space-1);
}
.ics202-objective-actions button {
  min-width: 40px;
  min-height: var(--control-height);
  padding-inline: var(--space-2);
}
.ics202-checklist {
  display: grid;
  gap: var(--space-2);
}
.ics202-summary-list {
  display: grid;
  gap: var(--space-2);
}
.ics202-summary-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-3);
  padding-bottom: var(--space-2);
  border-bottom: 1px solid var(--stroke);
}
.ics202-summary-row:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}
.ics202-summary-row .label {
  color: var(--muted);
}
.ics202-summary-row .value {
  text-align: right;
  font-weight: 600;
}
.ics202-print-root {
  position: fixed;
  left: -10000px;
  top: 0;
  width: 7.5in;
  padding: 0;
  background: #fff;
  color: #000;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 10pt;
  line-height: 1.2;
}
.map-print-root {
  position: fixed;
  left: -10000px;
  top: 0;
  width: 7.5in;
  padding: 0;
  background: #fff;
  color: #000;
  font-family: Arial, Helvetica, sans-serif;
}
.map-print-sheet {
  width: 7.5in;
  margin: 0 auto;
  color: #000;
  background: #fff;
}
.map-print-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-end;
  border-bottom: 2px solid #000;
  padding-bottom: 6px;
  margin-bottom: 8px;
}
.map-print-title {
  font-size: 14pt;
  font-weight: 700;
}
.map-print-meta {
  text-align: right;
  font-size: 9pt;
  line-height: 1.3;
}
.map-print-frame {
  border: 1px solid #000;
  padding: 8px;
}
.map-print-frame img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid #000;
}
.map-print-footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 8px;
  font-size: 9pt;
}
.ics202-print-container {
  width: 7.5in;
  margin: 0 auto;
  color: #000;
  background: #fff;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 10pt;
  line-height: 1.2;
}
.ics202-print-header-table,
.ics202-print-table,
.ics202-print-footer-table,
.ics202-print-inner-table,
.ics202-print-objectives-table,
.ics202-print-attachments-table,
.ics202-print-signature-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}
.ics202-print-header-table {
  margin-bottom: 6px;
  border-bottom: 2px solid #000;
}
.ics202-print-header-left {
  width: 70%;
  font-size: 14pt;
  font-weight: 700;
  text-align: left;
  padding: 0 0 4px;
}
.ics202-print-header-right {
  width: 30%;
  text-align: right;
  font-size: 9pt;
  padding: 0 0 4px;
  vertical-align: bottom;
}
.ics202-print-table {
  border: 1px solid #000;
  margin-bottom: 0;
}
.ics202-print-table + .ics202-print-table {
  border-top: 0;
}
.ics202-print-table td {
  border: 1px solid #000;
  padding: 4px;
  vertical-align: top;
}
.ics202-print-half-cell {
  width: 50%;
}
.ics202-print-label {
  font-weight: 700;
  font-size: 9pt;
  margin-bottom: 2px;
  text-align: left;
}
.ics202-print-subsection-label {
  border-top: 1px solid #000;
  margin: 0;
  padding-top: 4px;
}
.ics202-print-field-box {
  min-height: 18px;
  width: 100%;
  text-align: left;
}
.ics202-print-field-tall {
  min-height: 24px;
}
.ics202-print-inner-table td {
  border: 1px solid #000;
  padding: 4px;
}
.ics202-print-objectives-table td {
  border: 0;
  padding: 0;
  vertical-align: top;
}
.ics202-print-objective-number {
  width: 20px;
  padding: 0 4px 4px 0;
}
.ics202-print-objective-text {
  height: 18px;
  line-height: 18px;
  border-bottom: 1px solid #000;
  padding-left: 2px;
}
.ics202-print-section4-cell {
  height: 1.6in;
  padding: 0 !important;
}
.ics202-print-section4-cell .ics202-print-label {
  padding: 4px;
  margin: 0;
}
.ics202-print-section4-top,
.ics202-print-section4-bottom {
  padding: 4px;
  text-align: left;
}
.ics202-print-section4-top {
  min-height: 0.84in;
  border-bottom: 1px solid #000;
}
.ics202-print-section4-bottom {
  min-height: 0.56in;
}
.ics202-print-site-safety-cell {
  height: 0.6in;
}
.ics202-print-site-safety-row {
  display: table;
  width: 100%;
}
.ics202-print-site-safety-row > span {
  display: table-cell;
  vertical-align: middle;
  text-align: left;
}
.ics202-print-site-safety-row > span:nth-child(1),
.ics202-print-site-safety-row > span:nth-child(2) {
  width: 0.9in;
}
.ics202-print-site-safety-location {
  width: auto;
}
.ics202-print-checkbox {
  display: inline-block;
  width: 12px;
  height: 12px;
  border: 1px solid #000;
  margin-left: 4px;
  vertical-align: middle;
}
.ics202-print-checkbox.checked::after {
  content: "X";
  display: block;
  text-align: center;
  font-size: 10px;
  line-height: 12px;
}
.ics202-print-attachments-table td {
  width: 50%;
  border: 0;
  padding: 2px 0;
  vertical-align: top;
}
.ics202-print-other-attachments {
  margin-top: 6px;
  border-top: 1px solid #000;
  padding-top: 4px;
  min-height: 18px;
}
.ics202-print-signature-cell {
  height: 0.7in;
}
.ics202-print-signature-table td {
  border: 1px solid #000;
  padding: 4px;
  vertical-align: top;
}
.ics202-print-signature-name {
  width: 35%;
}
.ics202-print-signature-position {
  width: 35%;
}
.ics202-print-signature-signature {
  width: 30%;
}
.ics202-print-footer-table {
  margin-top: 6px;
  font-size: 9pt;
}
.ics202-print-footer-left {
  text-align: left;
}
.ics202-print-footer-right {
  text-align: right;
}
.account-summary {
  display: grid;
  gap: 6px;
  padding: var(--space-4);
  border-radius: calc(var(--radius-card) + 2px);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--accent) 10%, transparent), transparent 45%),
    color-mix(in srgb, var(--panel-alt) 80%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 20%, var(--separator));
  margin-bottom: 14px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.18);
}
.account-summary-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}
.trial-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 10px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 16%, var(--panel));
  color: color-mix(in srgb, var(--accent) 72%, var(--text));
  border: 1px solid color-mix(in srgb, var(--accent) 24%, transparent);
  font-size: 12px;
  font-weight: 760;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  white-space: nowrap;
}
.trial-mode-details {
  display: grid;
  gap: 6px;
  margin-top: 4px;
  padding: 0;
  border: 0;
  background: transparent;
}
.trial-mode-label {
  font-size: 11px;
  font-weight: 780;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--accent) 78%, var(--text));
}
.trial-mode-copy {
  color: var(--text);
  line-height: 1.45;
}
.trial-mode-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid color-mix(in srgb, var(--accent) 20%, var(--separator));
  background: color-mix(in srgb, var(--panel-alt) 76%, transparent);
}
.trial-mode-metric {
  display: grid;
  gap: 4px;
  padding: 0;
  border-radius: 0;
  background: transparent;
  border: 0;
}
.trial-mode-metric-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}
.trial-modal {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: grid;
  place-items: stretch center;
  padding: clamp(12px, 2vw, 24px);
}
.trial-modal.hidden {
  display: none;
}
.trial-modal-backdrop {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 24% 12%, color-mix(in srgb, var(--accent) 28%, transparent), transparent 32%),
    linear-gradient(135deg, rgba(12, 18, 32, 0.78), rgba(20, 28, 42, 0.62));
  backdrop-filter: blur(18px) saturate(1.08);
}
.trial-modal-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 0;
  width: min(760px, 100%);
  height: min(82dvh, calc(100dvh - 72px));
  max-height: min(82dvh, calc(100dvh - 72px));
  overflow: hidden;
  overflow-x: hidden;
  overscroll-behavior: contain;
  border-radius: calc(var(--radius-card) + 8px);
  border: 1px solid color-mix(in srgb, var(--accent) 30%, rgba(255,255,255,0.18));
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--panel) 96%, white 4%), color-mix(in srgb, var(--panel-alt) 92%, var(--accent) 8%)),
    var(--panel);
  box-shadow:
    0 34px 90px rgba(2, 8, 23, 0.38),
    inset 0 1px 0 rgba(255,255,255,0.26);
  padding: clamp(18px, 3vw, 28px);
  animation: trialModalIn .22s ease-out both;
}
.sign-in-modal-panel {
  width: min(620px, 100%);
}
.auth-modal-submit-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}
.trial-modal-header {
  flex: 0 0 auto;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-4);
  margin: 0 0 14px;
  padding: 0 0 10px;
  background: linear-gradient(145deg, color-mix(in srgb, var(--panel) 96%, white 4%), color-mix(in srgb, var(--panel-alt) 92%, var(--accent) 8%));
  border-radius: calc(var(--radius-card) + 8px) calc(var(--radius-card) + 8px) 0 0;
  backdrop-filter: blur(12px) saturate(140%);
}
.trial-modal-panel > .trial-signup-grid {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  align-content: start;
  padding-right: 4px;
  padding-bottom: 18px;
  scroll-padding-top: 4px;
  scroll-padding-bottom: 18px;
  scrollbar-gutter: stable;
}
.trial-modal-header h3 {
  margin: 4px 0 8px;
  font-size: clamp(24px, 3.4vw, 34px);
  letter-spacing: -0.04em;
}
.trial-modal-close {
  flex: 0 0 auto;
}
.trial-signup-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 14px;
  align-items: start;
}
.trial-signup-grid .auth-validation-message,
.trial-signup-grid .auth-inline-actions {
  grid-column: 1 / -1;
  margin-top: 2px;
}
.trial-signup-grid .auth-field {
  align-content: start;
}
.trial-signup-grid .auth-field > span {
  min-height: 1.4em;
  display: flex;
  align-items: flex-end;
}
.trial-signup-grid .auth-field input,
.trial-signup-grid .auth-field select {
  min-height: 44px;
  height: 44px;
}
.trial-signup-grid .auth-field textarea {
  min-height: 68px;
  resize: vertical;
}
.trial-signup-grid #trialCompanyField,
.trial-signup-grid #trialEmailField,
.trial-signup-grid #trialIntendedUseField,
.trial-signup-grid #trialNotesField {
  grid-column: 1 / -1;
}
.trial-share-copy {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border-radius: 16px;
  background: color-mix(in srgb, var(--panel-alt) 84%, transparent);
  border: 1px solid color-mix(in srgb, var(--separator) 82%, var(--accent) 18%);
}
.trial-share-copy strong {
  font-size: 13px;
  letter-spacing: 0.02em;
}
.terms-gate-panel {
  width: min(680px, 100%);
  background:
    linear-gradient(155deg, rgba(243, 247, 251, 0.98), rgba(226, 233, 239, 0.94)),
    repeating-linear-gradient(135deg, rgba(8, 127, 202, 0.06) 0 14px, rgba(255,255,255,0) 14px 28px);
}
.terms-gate-header {
  margin-bottom: 18px;
}
.terms-gate-form {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  align-content: start;
  padding-right: 4px;
  padding-bottom: 12px;
}
.terms-gate-copy {
  display: grid;
  gap: 12px;
  padding: 18px;
  border-radius: 18px;
  border: 1px solid color-mix(in srgb, var(--separator) 72%, var(--accent) 28%);
  background: linear-gradient(180deg, rgba(255,255,255,0.88), rgba(240, 244, 248, 0.9));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.8),
    0 12px 28px rgba(15, 23, 42, 0.08);
}
.terms-gate-copy p {
  margin: 0;
  color: color-mix(in srgb, var(--text) 82%, #102033 18%);
  font-size: 14px;
  line-height: 1.6;
}
.terms-gate-link {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  gap: 8px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: color-mix(in srgb, #087fca 76%, var(--text));
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}
.terms-gate-link::after {
  content: "↗";
  font-size: 13px;
}
.terms-gate-checkbox {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 12px;
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px solid color-mix(in srgb, var(--separator) 76%, var(--accent) 24%);
  background: color-mix(in srgb, rgba(255,255,255,0.88) 92%, var(--panel-alt) 8%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.72);
}
.terms-gate-checkbox input {
  width: 20px;
  height: 20px;
  margin: 2px 0 0;
  accent-color: var(--accent);
}
.terms-gate-checkbox span {
  color: color-mix(in srgb, var(--text) 86%, #0f172a 14%);
  font-size: 14px;
  font-style: normal;
  font-weight: 700;
  line-height: 1.5;
  margin: 0;
}
.terms-gate-checkbox.auth-field-invalid {
  border-color: color-mix(in srgb, var(--danger) 72%, var(--separator));
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--danger) 12%, transparent);
}
.terms-gate-form .auth-inline-actions {
  margin-top: 2px;
}
.terms-gate-form .primary[disabled] {
  opacity: 0.58;
}
body.trial-modal-open {
  overflow: hidden !important;
}
body.trial-modal-open .shell,
body.trial-modal-open .app {
  overflow: hidden !important;
  height: 100dvh;
}
@keyframes trialModalIn {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
.landing-card.locked {
  opacity: 0.72;
}
.landing-card.locked input,
.landing-card.locked select,
.landing-card.locked button.primary {
  opacity: 0.7;
}
.landing-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: 16px;
}
.landing-card-header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;
  justify-content: flex-end;
}
.landing-card-header h3,
.landing-note h3 {
  margin: 0 0 6px;
}
.landing-session-list {
  min-height: 0;
  max-height: 280px;
  overflow: auto;
  padding-right: 4px;
}
.auth-grid,
.join-grid,
.create-session-grid {
  display: grid;
  gap: var(--space-3);
}
.auth-field {
  display: grid;
  gap: 6px;
  color: color-mix(in srgb, var(--text) 72%, var(--muted) 28%);
  font-size: 12px;
  font-weight: 600;
}
.auth-field > span {
  display: block;
  color: color-mix(in srgb, var(--muted) 88%, var(--text) 12%);
  font-size: 12px;
  font-style: italic;
  font-weight: 400;
  line-height: 1.45;
  margin-bottom: 2px;
}
.required-field-indicator {
  display: inline;
  margin-right: 4px;
  color: color-mix(in srgb, var(--danger) 78%, var(--text));
  font-size: 13px;
  font-style: normal;
  font-weight: 800;
  line-height: 1;
}
.password-field {
  position: relative;
  display: grid;
}
.password-field input {
  padding-right: 52px;
}
.auth-grid input {
  border-color: color-mix(in srgb, var(--separator) 88%, var(--accent) 12%);
  background: color-mix(in srgb, var(--bg) 82%, var(--panel) 18%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.16);
}
.auth-grid input.hidden {
  display: none;
}
.auth-grid input:focus {
  border-color: color-mix(in srgb, var(--accent) 48%, var(--separator));
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 16%, transparent);
}
.auth-field-invalid > span {
  color: var(--danger);
}
.auth-field-invalid input {
  border-color: color-mix(in srgb, var(--danger) 72%, var(--separator));
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--danger) 12%, transparent);
}
.feedback-field-invalid {
  color: var(--danger);
}
.feedback-field-invalid input,
.feedback-field-invalid textarea {
  border-color: color-mix(in srgb, var(--danger) 72%, var(--separator));
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--danger) 12%, transparent);
}
.auth-validation-message {
  padding: 9px 11px;
  border-radius: 12px;
  border: 1px solid color-mix(in srgb, var(--danger) 34%, var(--separator));
  background: color-mix(in srgb, var(--danger) 10%, var(--panel));
  color: color-mix(in srgb, var(--danger) 82%, var(--text));
  font-weight: 680;
  line-height: 1.35;
}
.password-toggle {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  min-width: 38px;
  width: 38px;
  height: 30px;
  padding: 0;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  background: transparent;
  box-shadow: none;
}
.password-toggle:hover {
  color: var(--text);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  transform: translateY(-50%);
}
.password-toggle-icon {
  width: 18px;
  height: 18px;
}
.auth-inline-actions {
  display: flex;
  justify-content: flex-start;
}
.auth-inline-actions-spread {
  justify-content: space-between;
  align-items: center;
  gap: var(--space-2);
}
.landing-card .primary {
  min-width: 120px;
  box-shadow: 0 10px 22px color-mix(in srgb, var(--accent) 20%, transparent);
}
.landing-card .secondary {
  border-color: color-mix(in srgb, var(--separator) 88%, var(--accent) 12%);
}

.landing-card.auth-card-trial .landing-card-header-actions .primary {
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 92%, white), color-mix(in srgb, var(--accent) 74%, black));
  box-shadow: 0 12px 28px color-mix(in srgb, var(--accent) 28%, transparent);
}
.auth-recovery-copy {
  display: grid;
  gap: 4px;
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--separator);
  border-radius: var(--radius-control);
  background: color-mix(in srgb, var(--panel-alt) 72%, transparent);
}
.auth-link-btn {
  min-height: auto;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--accent);
  box-shadow: none;
  font-weight: 650;
}
.auth-link-btn:hover {
  background: transparent;
  color: var(--text);
}
.auth-link-btn:disabled {
  color: var(--muted);
  opacity: 0.65;
}
.create-session-grid,
.join-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.create-session-grid {
  align-items: start;
}
.join-grid > :first-child,
.join-grid > :nth-child(2) {
  grid-column: span 2;
}
.field-block {
  display: grid;
  gap: var(--space-1);
  min-width: 0;
}
.field-block-incident,
.field-block-role {
  min-width: 0;
}
.create-session-grid .field-block,
.create-session-grid .field-block input {
  min-width: 0;
}
.create-session-grid #incidentNameInput,
.create-session-grid #initialIncidentCommanderRoleInput {
  width: 162px;
  height: 50px;
}
.create-session-grid input[type="datetime-local"] {
  max-width: 100%;
  min-width: 0;
  font-size: 13px;
  padding-inline: 10px;
}
.create-session-grid #opStartInput,
.create-session-grid #opEndInput {
  width: 50%;
}
.create-session-grid input[type="datetime-local"]::-webkit-date-and-time-value {
  text-align: left;
}
.create-session-grid input[type="datetime-local"]::-webkit-datetime-edit {
  font-size: inherit;
}
.landing-note {
  margin-top: auto;
}
.inline-note {
  margin: 0;
  color: color-mix(in srgb, var(--accent) 72%, var(--text) 28%);
  font-size: var(--font-size-help);
  font-weight: 600;
}
.focus-setup-block {
  display: grid;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-card);
  border: 1px solid var(--separator);
  background: color-mix(in srgb, var(--panel-alt) 78%, transparent);
}
.focus-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.focus-badge.pending {
  background: color-mix(in srgb, var(--accent) 12%, var(--panel) 88%);
  color: var(--accent);
  border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent);
}
.focus-badge.set {
  background: color-mix(in srgb, var(--success) 14%, var(--panel) 86%);
  color: var(--success);
  border: 1px solid color-mix(in srgb, var(--success) 24%, transparent);
}
.focus-prompt {
  margin: 0;
  color: var(--muted);
  font-size: var(--font-size-help);
  line-height: 1.45;
}
.department-admin-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-2);
}
.department-admin-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  align-items: center;
}
.department-admin-tabs .secondary {
  min-height: 36px;
}
.department-admin-tabs .secondary.active {
  color: var(--text);
  border-color: color-mix(in srgb, var(--accent) 54%, var(--separator));
  background: color-mix(in srgb, var(--accent) 16%, var(--panel));
}
.department-admin-tab-panel {
  display: block;
}
.department-admin-tab-panel.hidden {
  display: none !important;
}
.department-admin-kpi {
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-card);
  border: 1px solid var(--separator);
  background: color-mix(in srgb, var(--panel) 80%, transparent);
}
.department-admin-kpi .label {
  margin-bottom: 4px;
}
.department-admin-kpi .value {
  font-weight: 700;
  color: var(--text);
}
.department-admin-form {
  padding: var(--space-3);
  border-radius: var(--radius-card);
  border: 1px solid var(--separator);
  background: color-mix(in srgb, var(--panel) 78%, transparent);
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.department-admin-section-title {
  position: relative;
  z-index: 1;
  margin: 0;
  padding-left: 12px;
  font-size: 14px;
  color: var(--text);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.department-admin-section-title::before {
  content: "";
  position: absolute;
  left: 0;
  top: 2px;
  bottom: 2px;
  width: 4px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--department-section-start, var(--accent)), var(--department-section-end, color-mix(in srgb, var(--accent) 45%, transparent)));
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--department-section-start, var(--accent)) 18%, transparent);
}
.department-admin-form::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at top right, var(--department-section-glow, rgba(47,109,246,0.16)) 0%, transparent 42%),
    linear-gradient(180deg, color-mix(in srgb, var(--department-section-tint, rgba(47,109,246,0.08)) 60%, transparent), transparent 72%);
  opacity: 0.92;
}
.department-admin-form:nth-of-type(1) {
  --department-section-start: #2f6df6;
  --department-section-end: #7fb0ff;
  --department-section-glow: rgba(47, 109, 246, 0.16);
  --department-section-tint: rgba(47, 109, 246, 0.08);
}
.department-admin-form:nth-of-type(2) {
  --department-section-start: #0f9d58;
  --department-section-end: #88d8a7;
  --department-section-glow: rgba(15, 157, 88, 0.16);
  --department-section-tint: rgba(15, 157, 88, 0.08);
}
.department-admin-form:nth-of-type(3) {
  --department-section-start: #d97706;
  --department-section-end: #f5c26b;
  --department-section-glow: rgba(217, 119, 6, 0.16);
  --department-section-tint: rgba(217, 119, 6, 0.08);
}
.department-admin-section-station {
  --department-section-start: #2f6df6;
  --department-section-end: #7fb0ff;
  --department-section-glow: rgba(47, 109, 246, 0.16);
  --department-section-tint: rgba(47, 109, 246, 0.08);
}
.department-admin-section-collaboration {
  --department-section-start: #0f9d58;
  --department-section-end: #88d8a7;
  --department-section-glow: rgba(15, 157, 88, 0.16);
  --department-section-tint: rgba(15, 157, 88, 0.08);
}
.department-admin-section-users {
  --department-section-start: #d97706;
  --department-section-end: #f5c26b;
  --department-section-glow: rgba(217, 119, 6, 0.16);
  --department-section-tint: rgba(217, 119, 6, 0.08);
}
.department-admin-section-consumables {
  --department-section-start: #0891b2;
  --department-section-end: #67e8f9;
  --department-section-glow: rgba(8, 145, 178, 0.16);
  --department-section-tint: rgba(8, 145, 178, 0.08);
}
.department-admin-section-equipment {
  --department-section-start: #7c3aed;
  --department-section-end: #c4b5fd;
  --department-section-glow: rgba(124, 58, 237, 0.16);
  --department-section-tint: rgba(124, 58, 237, 0.08);
}
.department-admin-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-2);
}
.department-resource-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-2);
}
.department-resource-description-field {
  grid-column: 1 / -1;
}
.department-consumables-list {
  display: grid;
  gap: var(--space-2);
}
.department-consumable-card.inactive,
.department-equipment-card.inactive {
  opacity: 0.72;
}
.department-consumable-description,
.department-equipment-description {
  margin-top: 4px;
}
.station-location-method {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}
.department-admin-station-meta {
  display: flex;
  justify-content: space-between;
  gap: var(--space-2);
  align-items: center;
  flex-wrap: wrap;
}
.department-admin-options {
  justify-content: flex-start;
  gap: var(--space-3);
  flex-wrap: wrap;
}
.department-collaboration-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--space-3);
}
.department-collaboration-column {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  min-width: 0;
  padding: var(--space-3);
  border: 1px solid var(--separator);
  border-radius: var(--radius-card);
  background: color-mix(in srgb, var(--panel) 86%, transparent);
}
.department-collaboration-column::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, var(--collab-band, rgba(47,109,246,0.10)), transparent 54%);
}
.department-collaboration-column:nth-of-type(1) {
  --collab-band: rgba(15, 157, 88, 0.12);
}
.department-collaboration-column:nth-of-type(2) {
  --collab-band: rgba(47, 109, 246, 0.12);
}
.department-collaboration-header {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
}
.department-collaboration-header h5 {
  margin: 0;
  font-size: 13px;
  letter-spacing: 0;
  color: var(--text);
}
.department-collaboration-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  max-height: 280px;
  overflow: auto;
  padding-right: 2px;
}
.department-collaboration-card {
  gap: var(--space-2);
}
.department-collaboration-check,
.department-collaboration-option {
  align-items: flex-start;
  min-width: 0;
}
.department-collaboration-option {
  padding: 10px 12px;
  border: 1px solid var(--separator);
  border-radius: var(--radius-card);
  background: color-mix(in srgb, var(--panel) 72%, transparent);
}
.department-collaboration-check span,
.department-collaboration-option span {
  min-width: 0;
  overflow-wrap: anywhere;
}
.department-collaboration-search {
  margin: 0;
}
.department-collaboration-empty {
  padding: var(--space-3);
  border: 1px dashed var(--separator);
  border-radius: var(--radius-card);
}
.department-collaboration-badge {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 4px 9px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--success) 44%, transparent);
  background: color-mix(in srgb, var(--success) 12%, transparent);
  color: var(--success);
  font-size: 12px;
  font-weight: 700;
}
.department-admin-member {
  gap: var(--space-2);
}
.department-admin-member-actions {
  justify-content: flex-start;
  flex-wrap: wrap;
}
.focus-callout {
  margin-top: 12px;
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-card);
  border: 1px solid color-mix(in srgb, var(--accent) 18%, transparent);
  background: color-mix(in srgb, var(--accent) 10%, var(--panel) 90%);
  color: var(--muted);
  font-size: var(--font-size-help);
  line-height: 1.45;
}
.incident-focus-lock .sidebar button:not(#setIncidentFocusBtn):not(#addressIncidentFocusBtn):not(#closeAddressIncidentFocusBtn):not(#submitAddressIncidentFocusBtn),
.incident-focus-lock .sidebar input:not(#addressIncidentFocusInput),
.incident-focus-lock .sidebar select,
.incident-focus-lock .sidebar textarea,
.incident-focus-lock .map-style-dock button,
.incident-focus-lock .topbar-actions button:not(#setIncidentFocusBtn):not(#addressIncidentFocusBtn):not(#mobileSetIncidentFocusBtn):not(#mobileAddressIncidentFocusBtn):not(#closeAddressIncidentFocusBtn):not(#submitAddressIncidentFocusBtn) {
  pointer-events: none;
}
.incident-focus-lock .sidebar,
.incident-focus-lock .map-style-dock,
.incident-focus-lock #rightSidebarCollapseBtn {
  opacity: 0.46;
}
.incident-focus-lock #setIncidentFocusBtn.attention {
  animation: focus-btn-pulse 1.6s ease-out infinite;
}
@keyframes focus-btn-pulse {
  0%   { box-shadow: 0 0 0 2px rgba(255,45,45,0.96), 0 0 0 2px rgba(255,45,45,0.96); }
  60%  { box-shadow: 0 0 0 2px rgba(255,45,45,0.96), 0 0 0 10px rgba(255,45,45,0.0); }
  100% { box-shadow: 0 0 0 2px rgba(255,45,45,0.96), 0 0 0 10px rgba(255,45,45,0.0); }
}
.map-stage.focus-placement-active #map,
.map-stage.focus-placement-active .leaflet-container,
.map-stage.focus-placement-active .leaflet-container *,
.map-stage.focus-placement-active .leaflet-interactive {
  cursor: crosshair !important;
}
.initial-focus-overlay {
  position: absolute;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  z-index: 950;
  display: flex;
  justify-content: center;
  padding: 0 16px;
  pointer-events: none;
}
.initial-focus-overlay.hidden {
  display: none;
}
.initial-focus-overlay-card {
  position: relative;
  pointer-events: auto;
  width: min(560px, calc(100vw - 32px));
  padding: 18px 20px;
  border-radius: 24px;
  border: 1px solid color-mix(in srgb, var(--accent) 26%, transparent);
  background:
    radial-gradient(circle at top, color-mix(in srgb, var(--accent) 18%, transparent), transparent 60%),
    color-mix(in srgb, var(--panel) 94%, transparent);
  backdrop-filter: blur(18px) saturate(135%);
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.22);
  text-align: center;
}
.initial-focus-overlay-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 999px;
  background: color-mix(in srgb, var(--panel) 82%, white);
  color: var(--text);
  font-size: 1.3rem;
  line-height: 1;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.14);
}
.initial-focus-overlay-close:hover {
  background: color-mix(in srgb, var(--accent) 14%, var(--panel));
}
.initial-focus-overlay-close.hidden {
  display: none;
}
.initial-focus-overlay-kicker {
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--muted);
  margin-bottom: 8px;
}
.initial-focus-overlay-title {
  font-size: clamp(1.1rem, 2vw, 1.45rem);
  font-weight: 800;
  margin-bottom: 8px;
}
.initial-focus-overlay-body {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}
.mobile-focus-action-group {
  display: none;
  gap: 8px;
  flex-wrap: wrap;
  width: 100%;
}
.mobile-focus-action-group button {
  flex: 1 1 0;
  min-width: 0;
  white-space: nowrap;
}
.app {
  flex: 1;
  display: grid;
  grid-template-columns: clamp(340px, 28vw, 440px) minmax(0, 1fr) clamp(280px, 22vw, 320px);
  gap: 16px;
  padding: 16px calc(var(--safe-right) + 18px) calc(var(--safe-bottom) + 18px) calc(var(--safe-left) + 18px);
  min-height: 0;
  overflow: hidden;
}
.app.guided-collapsed {
  grid-template-columns: clamp(340px, 28vw, 440px) minmax(0, 1fr) clamp(220px, 18vw, 260px);
}
.app.right-sidebar-collapsed,
.app.guided-collapsed.right-sidebar-collapsed {
  grid-template-columns: clamp(340px, 28vw, 440px) minmax(0, 1fr) 0;
}
.shell.viewer-mode .topbar-actions,
.shell.viewer-mode .sidebar.left,
.shell.viewer-mode #quickFlowPanel {
  display: none;
}
.shell.viewer-mode .app,
.shell.viewer-mode .app.guided-collapsed {
  grid-template-columns: minmax(0, 1fr) 320px;
}
.shell.viewer-mode .sidebar.right {
  overflow: hidden;
}

.sidebar { display: flex; flex-direction: column; gap: 12px; min-width: 0; min-height: 0; overflow: auto; overflow-x: hidden; }
.sidebar { gap: 14px; }
.sidebar.right {
  transition: opacity .2s ease, transform .2s ease;
}
.app.right-sidebar-collapsed .sidebar.right {
  opacity: 0;
  pointer-events: none;
  overflow: hidden;
  transform: translateX(16px);
}
.map-stage { position: relative; min-height: 0; display: flex; }
#map {
  flex: 1;
  min-height: 0;
  border: 1px solid var(--separator);
  border-radius: 30px;
  overflow: hidden;
  box-shadow: var(--shadow);
  touch-action: none;
  overscroll-behavior: none;
}
#map .leaflet-container,
#map .leaflet-pane,
#map .leaflet-map-pane {
  overscroll-behavior: none;
}
.map-stage.entry-team-air-active #map {
  border-color: rgba(215, 79, 69, 0.88);
}
.map-stage.entry-team-air-alert #map {
  animation: entry-team-air-border-pulse 1.1s ease-in-out infinite;
  box-shadow: 0 0 0 6px rgba(215, 79, 69, 0.24), 0 0 0 12px rgba(215, 79, 69, 0.12), var(--shadow);
}
.map-stage.entry-team-air-alert-10 #map {
  animation: entry-team-air-border-pulse-10 1.1s ease-in-out infinite;
  box-shadow: 0 0 0 6px rgba(215, 79, 69, 0.18), 0 0 0 12px rgba(215, 79, 69, 0.08), var(--shadow);
}
.entry-team-air-timer {
  position: absolute;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  z-index: 1100;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(124, 140, 168, 0.22);
  background: color-mix(in srgb, var(--panel) 88%, transparent);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px) saturate(140%);
}
.entry-team-air-timer.entry-team-air-alert {
  border-color: rgba(215, 79, 69, 0.6);
  color: #d74f45;
}
.entry-team-air-timer.entry-team-air-alert-10 {
  border-color: rgba(215, 79, 69, 0.72);
  color: #d74f45;
}
.entry-team-air-timer.entry-team-air-acknowledged {
  border-color: rgba(215, 79, 69, 0.34);
}
.entry-team-air-timer.hidden {
  display: none;
}
.entry-team-air-timer button {
  min-height: 30px;
}
.map-stage.drag-active #map {
  border-color: color-mix(in srgb, var(--accent) 52%, transparent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 16%, transparent), var(--shadow);
}

@media (max-width: 1180px) {
  .app,
  .app.guided-collapsed,
  .app.right-sidebar-collapsed,
  .app.guided-collapsed.right-sidebar-collapsed {
    grid-template-columns: minmax(320px, 38vw) minmax(0, 1fr) 0;
  }

  .sidebar.right {
    opacity: 0;
    pointer-events: none;
    overflow: hidden;
    transform: translateX(16px);
  }
}

@media (max-width: 980px) {
  .app,
  .app.guided-collapsed,
  .app.right-sidebar-collapsed,
  .app.guided-collapsed.right-sidebar-collapsed {
    grid-template-columns: minmax(0, 1fr);
  }

  .sidebar.left {
    position: absolute;
    top: 16px;
    left: calc(var(--safe-left) + 16px);
    z-index: 1700;
    width: min(420px, calc(100vw - var(--safe-left) - var(--safe-right) - 32px));
    max-height: calc(100% - 32px);
    padding-right: 2px;
  }

  .map-stage {
    grid-column: 1;
  }
}
@keyframes entry-team-air-border-pulse {
  0%, 100% {
    box-shadow: 0 0 0 6px rgba(215, 79, 69, 0.32), 0 0 0 12px rgba(215, 79, 69, 0.1), var(--shadow);
  }
  50% {
    box-shadow: 0 0 0 8px rgba(215, 79, 69, 0.52), 0 0 0 16px rgba(215, 79, 69, 0.18), var(--shadow);
  }
}
@keyframes entry-team-air-border-pulse-10 {
  0%, 100% {
    box-shadow: 0 0 0 6px rgba(215, 79, 69, 0.22), 0 0 0 12px rgba(215, 79, 69, 0.08), var(--shadow);
  }
  50% {
    box-shadow: 0 0 0 8px rgba(215, 79, 69, 0.42), 0 0 0 16px rgba(215, 79, 69, 0.14), var(--shadow);
  }
}
.media-placement-banner {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  background: rgba(217, 119, 6, 0.95);
  border: 1px solid rgba(217, 119, 6, 0.5);
  border-radius: 12px;
  padding: 12px 16px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(10px);
  pointer-events: auto;
}
.media-placement-banner.hidden {
  display: none;
}
.media-placement-banner-content {
  display: flex;
  align-items: center;
  gap: 12px;
  color: white;
  font-size: 14px;
  font-weight: 500;
}
.media-placement-banner-icon {
  font-size: 18px;
}
.media-placement-banner-text {
  flex: 1;
  white-space: nowrap;
}
.media-placement-banner-text kbd {
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 4px;
  padding: 2px 6px;
  font-family: monospace;
  font-size: 12px;
}
#mediaPlacementCancelBtn {
  padding: 6px 12px;
  font-size: 12px;
  white-space: nowrap;
}
.map-note-editor {
  position: absolute;
  z-index: 1450;
  width: min(340px, calc(100% - 24px));
  pointer-events: auto;
}
.map-note-editor-card {
  display: grid;
  gap: var(--space-3);
  padding: 16px;
  background: color-mix(in srgb, var(--panel) 88%, transparent);
  border: 1px solid var(--separator);
  border-radius: 24px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px) saturate(150%);
}
.map-note-editor-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-3);
}
.map-note-editor-close {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  padding: 0;
  font-size: 22px;
  line-height: 1;
  background: color-mix(in srgb, var(--panel-alt) 86%, transparent);
  color: var(--muted);
  border: 1px solid var(--separator);
}
.map-note-editor .field-block {
  margin: 0;
}
.map-note-editor .field-block textarea {
  min-height: 88px;
}
.map-note-editor .row {
  justify-content: flex-end;
}
.map-style-dock {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 1200;
  display: grid;
  gap: 10px;
  justify-items: end;
  pointer-events: none;
}
.map-style-launcher,
.map-layers-launcher,
.map-forms-launcher,
.map-weather-launcher,
.map-media-launcher,
.map-focus-launcher,
.map-locate-launcher,
.map-task-dock-btn,
.map-fullscreen-toggle,
.map-launch-qr-show {
  position: relative;
  width: 52px;
  height: 52px;
  padding: 0;
  border-radius: 18px;
  background: color-mix(in srgb, var(--panel) 88%, transparent);
  border: 1px solid var(--separator);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(18px) saturate(150%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
  cursor: pointer;
}
.map-dock-tooltip::after {
  content: attr(data-tooltip);
  position: absolute;
  right: calc(100% + 10px);
  top: 50%;
  transform: translateY(-50%) scale(0.96);
  opacity: 0;
  pointer-events: none;
  background: color-mix(in srgb, var(--panel) 78%, black 22%);
  color: var(--text);
  border: 1px solid var(--separator);
  border-radius: 12px;
  padding: 8px 12px;
  box-shadow: var(--shadow-soft);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  line-height: 1.2;
  transition: opacity 0.16s ease, transform 0.16s ease;
  z-index: 2;
}
.map-dock-label {
  display: none;
}
.map-dock-tooltip:hover::after,
.map-dock-tooltip:focus-visible::after {
  opacity: 1;
  transform: translateY(-50%) scale(1);
}
.map-weather-launcher[aria-expanded="true"]::after {
  display: none;
}
.map-style-launcher {
  color: var(--accent);
  font-size: 22px;
  font-weight: 700;
}
.map-layers-launcher {
  color: #66d9c4;
  font-size: 22px;
  font-weight: 800;
}
.map-forms-launcher {
  color: color-mix(in srgb, var(--text) 76%, var(--muted) 24%);
  gap: 0;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.01em;
}
.map-weather-launcher {
  color: var(--success);
  border-color: color-mix(in srgb, var(--success) 18%, transparent);
  gap: 0;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.02em;
}
.map-media-launcher {
  color: #ef7d4a;
  border-color: color-mix(in srgb, #ef7d4a 20%, transparent);
  gap: 0;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.01em;
}
.map-weather-launcher-icon {
  width: 28px;
  height: 28px;
  display: block;
  line-height: 1;
  transform: rotate(var(--weather-wind-direction, 0deg));
  transition: transform 0.3s ease;
}
.map-media-launcher-icon {
  width: 24px;
  height: 24px;
  display: block;
  line-height: 1;
}
.weather-modal {
  position: absolute;
  inset: 0;
  z-index: 1600;
  display: grid;
  place-items: center;
  padding: 20px;
  border-radius: 30px;
  background: rgba(15, 23, 42, 0.3);
  backdrop-filter: blur(3px);
  pointer-events: auto;
}
.weather-panel {
  width: min(480px, calc(100% - 24px));
  max-height: calc(100% - 24px);
  overflow: auto;
  padding: 16px;
  border-radius: 24px;
  border: 1px solid var(--separator);
  background: color-mix(in srgb, var(--panel) 88%, transparent);
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px) saturate(150%);
  color: var(--text);
  pointer-events: auto;
  position: relative;
}
.weather-panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-2);
}
.weather-panel-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}
.weather-panel-subtitle {
  margin-top: 4px;
  color: var(--muted);
  font-size: var(--font-size-help);
  line-height: 1.35;
}
.weather-refresh-btn {
  min-width: 72px;
  min-height: var(--control-height-compact);
  padding: 6px 10px;
  border-radius: 12px;
  border: 1px solid var(--separator);
  background: color-mix(in srgb, var(--panel-alt) 86%, transparent);
  color: var(--accent);
  font-size: var(--font-size-help);
  font-weight: 650;
}
.weather-close-btn {
  width: var(--control-height-compact);
  min-width: var(--control-height-compact);
  height: var(--control-height-compact);
  padding: 0;
  border-radius: 12px;
  border: 1px solid var(--separator);
  background: color-mix(in srgb, var(--panel-alt) 86%, transparent);
  color: var(--muted);
  font-size: 24px;
  line-height: 1;
}
.weather-summary {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.weather-mode-toggle {
  display: inline-flex;
  gap: 6px;
  margin-top: 10px;
}
.weather-mode-btn {
  min-height: 30px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--separator);
  background: color-mix(in srgb, var(--panel-alt) 84%, transparent);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}
.weather-mode-btn.active {
  color: var(--text);
  border-color: color-mix(in srgb, var(--success) 30%, var(--separator) 70%);
  background: color-mix(in srgb, var(--success) 14%, var(--panel-alt) 86%);
}
.weather-meta {
  margin-top: 6px;
  font-size: var(--font-size-help);
  line-height: 1.4;
}
.weather-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-2);
  margin-top: var(--space-3);
}
.weather-metric {
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-card);
  border: 1px solid var(--separator);
  background: color-mix(in srgb, var(--panel-alt) 72%, transparent);
}
.weather-metric-label {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.weather-metric-value {
  margin-top: 6px;
  font-size: 16px;
  font-weight: 700;
}
.map-focus-launcher {
  color: var(--accent);
  font-size: 22px;
  font-weight: 700;
}
.map-locate-launcher {
  color: color-mix(in srgb, var(--text) 76%, var(--muted) 24%);
  font-size: 22px;
  font-weight: 700;
}
.map-focus-launcher-icon {
  line-height: 1;
}
.map-locate-launcher-icon {
  line-height: 1;
}
.map-style-launcher-icon {
  line-height: 1;
}
.map-layers-launcher-icon {
  line-height: 1;
}
.map-forms-launcher-icon {
  width: 24px;
  height: 24px;
  display: block;
  line-height: 1;
}
.map-task-dock-btn {
  color: var(--accent);
  font-size: 19px;
  font-weight: 900;
}
.map-task-dock-icon {
  line-height: 1;
}
.map-task-dock-count {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: #ef4444;
  color: #fff;
  border: 1px solid rgba(255,255,255,0.78);
  font-size: 10px;
  font-weight: 900;
}
.map-style-tray {
  width: min(420px, calc(100vw - 72px));
  padding: 16px;
  border-radius: 24px;
  border: 1px solid var(--separator);
  background: color-mix(in srgb, var(--panel) 88%, transparent);
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px) saturate(150%);
  pointer-events: auto;
}
.map-layers-tray {
  width: min(360px, calc(100vw - 72px));
  padding: 16px;
  border-radius: 24px;
  border: 1px solid var(--separator);
  background: color-mix(in srgb, var(--panel) 88%, transparent);
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px) saturate(150%);
  pointer-events: auto;
}
.task-alert {
  position: absolute;
  inset: 0;
  z-index: 1700;
  display: grid;
  place-items: center;
  padding: 18px;
  pointer-events: none;
}
.task-alert-card {
  width: min(440px, calc(100vw - 36px));
  display: grid;
  gap: 10px;
  padding: 18px;
  border: 1px solid rgba(255,255,255,0.22);
  border-radius: 14px;
  background: color-mix(in srgb, var(--panel) 94%, transparent);
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px) saturate(150%);
  pointer-events: auto;
}
.task-alert-kicker {
  color: var(--accent);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0;
}
.task-alert-card h2 {
  margin: 0;
  font-size: 22px;
}
.task-alert-meta,
.task-alert-body {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}
.task-alert-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.task-drawer {
  position: absolute;
  top: 68px;
  right: 14px;
  z-index: 1650;
  width: min(380px, calc(100vw - 28px));
  max-height: min(72dvh, 620px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--separator);
  border-radius: 14px;
  background: color-mix(in srgb, var(--panel) 94%, transparent);
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px) saturate(150%);
}
.task-drawer-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.task-drawer-body {
  min-height: 0;
  overflow: auto;
  display: grid;
  gap: 12px;
}
.session-checklist-drawer {
  position: fixed;
  top: var(--session-checklist-drawer-top, calc(var(--safe-top) + 128px));
  bottom: calc(var(--safe-bottom) + 14px);
  right: 14px;
  z-index: 7300;
  width: min(920px, calc(100vw - 28px));
  max-height: none;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--separator);
  border-radius: 14px;
  background: color-mix(in srgb, var(--panel) 95%, transparent);
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px) saturate(150%);
}
.session-checklist-drawer-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.session-checklist-drawer-kicker,
.session-checklists-nav-title {
  color: var(--accent);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .02em;
  text-transform: uppercase;
}
.session-checklist-drawer-header h2 {
  margin: 2px 0 4px;
  font-size: 19px;
}
.session-checklist-drawer-header p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.3;
}
.session-checklist-drawer-body {
  min-height: 0;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(220px, 260px) minmax(0, 1fr);
  gap: 10px;
}
.session-checklists-nav,
.session-checklists-detail {
  min-height: 0;
  overflow: auto;
  padding: 10px;
  border: 1px solid var(--separator);
  border-radius: 12px;
  background: color-mix(in srgb, var(--panel-alt) 82%, transparent);
}
.session-checklists-nav-list {
  display: grid;
  gap: 6px;
  margin-top: 8px;
}
.session-checklist-nav-btn {
  width: 100%;
  text-align: left;
  display: grid;
  gap: 2px;
  padding: 8px 10px;
}
.session-checklist-nav-btn strong {
  font-size: 12px;
}
.session-checklist-nav-btn span {
  color: var(--muted);
  font-size: 11px;
}
.session-checklist-nav-btn.is-active {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--separator));
}
.session-checklist-detail-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}
.session-checklist-detail-header h3 {
  margin: 0;
  font-size: 18px;
}
.session-checklist-progress {
  color: var(--muted);
  font-size: 11px;
}
.session-checklist-section {
  display: grid;
  gap: 8px;
  margin-bottom: 10px;
  padding: 10px;
  border: 1px solid var(--separator);
  border-radius: 12px;
  background: color-mix(in srgb, var(--panel) 88%, transparent);
}
.session-checklist-section h4 {
  margin: 0;
  font-size: 13px;
}
.session-checklist-items {
  display: grid;
  gap: 8px;
}
.session-checklist-item {
  display: grid;
  gap: 6px;
  padding: 8px;
  border: 1px solid var(--separator);
  border-radius: 10px;
  background: color-mix(in srgb, var(--panel-alt) 86%, transparent);
}
.session-checklist-item.is-complete {
  border-color: color-mix(in srgb, var(--accent) 30%, var(--separator));
}
.session-checklist-item-row {
  display: grid;
  grid-template-columns: minmax(180px, 1.35fr) minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
}
.session-checklist-item-row.has-inline-input {
  grid-template-columns: minmax(120px, 180px) minmax(0, 1.25fr) auto;
}
.session-checklist-inline-input {
  display: grid;
  gap: 3px;
  min-width: 0;
  align-content: start;
}
.session-checklist-inline-input span {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
}
.session-checklist-inline-input input,
.session-checklist-inline-input select {
  min-height: 34px;
  padding: 8px 10px;
}
.session-checklist-complete-wrap {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  min-width: 0;
}
.session-checklist-item-row input[type="checkbox"] {
  width: 14px;
  height: 14px;
  margin-top: 3px;
  margin-left: 2px;
  flex: 0 0 auto;
}
.session-checklist-item-label {
  display: block;
  font-weight: 700;
  line-height: 1.25;
  overflow-wrap: anywhere;
}
.session-checklist-item-label.critical {
  color: var(--danger);
}
.session-checklist-note-toggle {
  flex: 0 0 auto;
  min-width: 34px;
  min-height: 34px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 12px;
  line-height: 1;
}
.session-checklist-inputs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 6px;
}
.session-checklist-inputs label {
  display: grid;
  gap: 3px;
  font-size: 11px;
}
.session-checklist-inputs input,
.session-checklist-inputs select,
.session-checklist-notes {
  width: 100%;
}
.session-checklist-inputs input,
.session-checklist-inputs select {
  min-height: 32px;
  padding: 7px 9px;
}
.session-checklist-notes {
  min-height: 52px;
}
.session-checklist-table {
  margin-top: 8px;
  display: grid;
  gap: 6px;
}
.session-checklist-table-grid {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
}
.session-checklist-table-grid th,
.session-checklist-table-grid td {
  padding: 6px;
  border: 1px solid var(--separator);
  vertical-align: top;
}
.session-checklist-table-grid th {
  text-align: left;
  background: color-mix(in srgb, var(--panel) 86%, transparent);
}
.session-checklist-table-note {
  color: var(--muted);
  font-size: 11px;
}
.task-section {
  display: grid;
  gap: 8px;
}
.task-section-title {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}
.task-card {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--separator);
  border-radius: 8px;
  background: color-mix(in srgb, var(--panel-alt) 80%, transparent);
}
.task-card-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-weight: 800;
}
.task-priority {
  border-radius: 999px;
  padding: 3px 7px;
  background: rgba(59,130,246,0.16);
  color: var(--text);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}
.task-priority.urgent,
.task-priority.high {
  background: rgba(239,68,68,0.2);
  color: #fecaca;
}
.task-card p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}
.task-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.map-style-tray-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-2);
}
.map-style-close {
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: 999px;
  background: color-mix(in srgb, var(--panel-alt) 86%, transparent);
  color: var(--muted);
  border-color: var(--separator);
}
.map-style-tray-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3);
}
.map-layer-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: var(--space-3);
}
.map-layer-presets button {
  min-height: 32px;
  padding: 6px 10px;
  border-radius: 12px;
  border: 1px solid var(--separator);
  background: color-mix(in srgb, var(--panel-alt) 86%, transparent);
  color: var(--text);
  font-size: var(--font-size-help);
  font-weight: 700;
}
.map-layers-list {
  display: grid;
  gap: 8px;
}
.map-layer-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--separator);
  border-radius: var(--radius-card);
  background: color-mix(in srgb, var(--panel) 76%, transparent);
}
.map-layer-row input {
  width: 18px;
  height: 18px;
}
.map-layer-row strong,
.map-layer-row span {
  min-width: 0;
}
.map-layer-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.map-layer-copy span {
  color: var(--muted);
  font-size: var(--font-size-help);
  line-height: 1.25;
}
.map-layer-count {
  min-width: 28px;
  padding: 4px 8px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 18%, transparent);
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}
.map-style-card {
  display: grid;
  gap: var(--space-2);
  padding: var(--space-3);
  border-radius: 20px;
  border: 1px solid var(--separator);
  background: color-mix(in srgb, var(--panel) 76%, transparent);
  text-align: left;
  color: var(--text);
}
.map-style-card.active {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 16%, transparent);
}
.map-style-card-preview {
  position: relative;
  overflow: hidden;
  height: 80px;
  border-radius: 16px;
  border: 1px solid var(--stroke);
  background-size: cover;
  background-position: center;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.35),
    inset 0 -1px 0 rgba(0,0,0,0.06);
}
.map-style-card-preview::before,
.map-style-card-preview::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.9;
}
.map-style-card[data-style="road"] .map-style-card-preview {
  background:
    radial-gradient(130px 52px at 18% 90%, #d6ead6 0%, #d6ead600 70%),
    radial-gradient(130px 56px at 92% 14%, #d7e5f4 0%, #d7e5f400 68%),
    linear-gradient(135deg, #eef3ec 0%, #f4f1e7 54%, #dce8f4 100%);
}
.map-style-card[data-style="road"] .map-style-card-preview::before {
  background:
    linear-gradient(112deg, transparent 10%, rgba(255,255,255,0.95) 10.8%, rgba(255,255,255,0.95) 13.7%, transparent 14.5%),
    linear-gradient(18deg, transparent 32%, rgba(255,255,255,0.9) 32.6%, rgba(255,255,255,0.9) 35.8%, transparent 36.5%),
    linear-gradient(160deg, transparent 62%, rgba(245,220,150,0.95) 62.7%, rgba(245,220,150,0.95) 64.4%, transparent 65.1%);
}
.map-style-card[data-style="road"] .map-style-card-preview::after {
  opacity: 0.72;
  background:
    radial-gradient(3px 3px at 22% 34%, rgba(120,170,115,0.6), transparent 86%),
    radial-gradient(3px 3px at 72% 74%, rgba(115,160,108,0.55), transparent 86%),
    radial-gradient(2px 2px at 58% 20%, rgba(115,160,108,0.4), transparent 86%);
}
.map-style-card[data-style="satellite"] .map-style-card-preview {
  background:
    radial-gradient(140px 64px at 24% 84%, #3f5f43 0%, #3f5f4300 72%),
    radial-gradient(120px 56px at 88% 22%, #8a775d 0%, #8a775d00 70%),
    linear-gradient(137deg, #4f694f 0%, #768c64 30%, #6f5c49 58%, #97a388 100%);
}
.map-style-card[data-style="satellite"] .map-style-card-preview::before {
  opacity: 0.45;
  mix-blend-mode: multiply;
  background:
    repeating-linear-gradient(44deg, rgba(28,37,25,0.23) 0 3px, rgba(0,0,0,0) 3px 8px),
    repeating-linear-gradient(-36deg, rgba(100,75,48,0.18) 0 2px, rgba(0,0,0,0) 2px 7px);
}
.map-style-card[data-style="satellite"] .map-style-card-preview::after {
  opacity: 0.26;
  background: linear-gradient(145deg, rgba(255,255,255,0.5), rgba(255,255,255,0));
}
.map-style-card[data-style="hybrid"] .map-style-card-preview {
  background:
    radial-gradient(130px 64px at 24% 84%, #3f5f43 0%, #3f5f4300 72%),
    radial-gradient(120px 56px at 88% 22%, #8a775d 0%, #8a775d00 70%),
    linear-gradient(137deg, #4f694f 0%, #768c64 30%, #6f5c49 58%, #97a388 100%);
}
.map-style-card[data-style="hybrid"] .map-style-card-preview::before {
  opacity: 0.95;
  background:
    linear-gradient(112deg, transparent 10%, rgba(255,255,255,0.92) 10.8%, rgba(255,255,255,0.92) 13.2%, transparent 14%),
    linear-gradient(18deg, transparent 32%, rgba(255,255,255,0.86) 32.6%, rgba(255,255,255,0.86) 35.2%, transparent 35.9%),
    linear-gradient(160deg, transparent 62%, rgba(246,226,156,0.88) 62.7%, rgba(246,226,156,0.88) 64.1%, transparent 64.8%);
}
.map-style-card[data-style="hybrid"] .map-style-card-preview::after {
  opacity: 0.8;
  background:
    radial-gradient(4px 4px at 24% 33%, rgba(255,255,255,0.95), transparent 86%),
    radial-gradient(4px 4px at 70% 65%, rgba(255,255,255,0.95), transparent 86%),
    radial-gradient(3px 3px at 52% 19%, rgba(255,255,255,0.95), transparent 86%);
}
.map-style-card[data-style="topo"] .map-style-card-preview {
  background:
    radial-gradient(130px 52px at 20% 84%, #d6e2bf 0%, #d6e2bf00 72%),
    radial-gradient(120px 52px at 84% 14%, #c8d9b9 0%, #c8d9b900 72%),
    linear-gradient(135deg, #e7ecd3 0%, #f3eed8 44%, #d8e6ca 76%, #c5dcb8 100%);
}
.map-style-card[data-style="topo"] .map-style-card-preview::before {
  opacity: 0.62;
  background:
    repeating-radial-gradient(circle at 20% 76%, rgba(116,134,102,0.3) 0 1.4px, rgba(0,0,0,0) 1.4px 5px),
    repeating-radial-gradient(circle at 74% 22%, rgba(128,146,110,0.3) 0 1.4px, rgba(0,0,0,0) 1.4px 5px);
}
.map-style-card[data-style="topo"] .map-style-card-preview::after {
  opacity: 0.18;
  background: linear-gradient(145deg, rgba(255,255,255,0.7), rgba(255,255,255,0.04));
}
.map-style-card-chip {
  justify-self: start;
  min-width: 42px;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  color: #14191f;
  border: 1px solid rgba(0,0,0,0.18);
}
.map-style-card-label {
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.1;
}
.map-style-card-kind {
  font-size: 0.82rem;
  color: var(--muted);
}

.mobile-landscape-drawer {
  position: absolute;
  top: 10px;
  bottom: 10px;
  right: 10px;
  width: min(320px, 38vw);
  z-index: 1205;
  display: flex;
  flex-direction: column;
  border-radius: 18px;
  border: 1px solid var(--separator);
  background: color-mix(in srgb, var(--panel) 92%, transparent);
  backdrop-filter: blur(16px) saturate(145%);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}
.mobile-landscape-tabs {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr)) auto;
  gap: 6px;
  align-items: center;
  padding: 8px;
  border-bottom: 1px solid var(--separator);
  background: color-mix(in srgb, var(--panel-alt) 82%, transparent);
}
.mobile-landscape-tab,
.mobile-landscape-drawer-toggle {
  min-height: 36px;
  border-radius: 12px;
  border: 1px solid var(--separator);
  background: color-mix(in srgb, var(--panel) 84%, transparent);
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
  padding: 0 8px;
}
.mobile-landscape-tab.is-active {
  border-color: color-mix(in srgb, var(--accent) 46%, transparent);
  background: color-mix(in srgb, var(--accent) 16%, var(--panel) 84%);
}
.mobile-landscape-drawer-toggle {
  min-width: 34px;
  padding: 0;
  font-size: 16px;
}
.mobile-landscape-drawer-body {
  min-height: 0;
  flex: 1;
  overflow: auto;
  padding: 8px;
  display: grid;
  gap: 8px;
}

.panel {
  background: color-mix(in srgb, var(--panel) 82%, transparent);
  border: 1px solid var(--separator);
  border-radius: var(--radius-panel);
  padding: 12px;
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(20px) saturate(150%);
  min-width: 0;
  max-width: 100%;
}
.panel.compact { padding: 10px; }
.panel.compact.collapsed {
  padding-bottom: var(--space-2);
}
.panel h2, .panel h3 { margin: 0 0 var(--space-2); }
.panel-section-toggle {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 0;
  background: transparent;
  border: 0;
  color: var(--text);
  font-size: 0.92rem;
  font-weight: 700;
  text-align: left;
}
.panel-section-toggle span:first-child {
  min-width: 0;
  overflow-wrap: anywhere;
}
.panel-section-toggle:hover {
  transform: none;
}
.panel-section-body {
  display: grid;
  gap: 6px;
  margin-top: 6px;
  min-width: 0;
}
.panel.compact.section-collapsed .panel-section-body {
  display: none;
}
.incident-overview-body {
  gap: 0;
}
.panel-subsection {
  display: grid;
  gap: 6px;
  padding: 6px 0;
  border-top: 1px solid var(--separator);
  min-width: 0;
}
.panel-subsection:first-child {
  padding-top: 0;
  border-top: 0;
}
.panel-subsection.section-collapsed .panel-section-body {
  display: none;
}
.panel-subsection .panel-section-toggle {
  font-size: 0.88rem;
}
.panel-subsection .panel-section-body {
  margin-top: 6px;
}
.muted { color: var(--muted); }
.stack { display: grid; gap: 6px; }
.row { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.row--end { justify-content: flex-end; }
.row--space-between { justify-content: space-between; align-items: center; }

input, select, button, textarea {
  font: inherit;
}
input, select, textarea {
  width: 100%;
  min-height: var(--control-height);
  padding: 8px 11px;
  border-radius: 12px;
  border: 1px solid var(--separator);
  background: color-mix(in srgb, var(--panel-alt) 92%, transparent);
  color: var(--text);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.24);
}
body[data-theme="light"] input::placeholder,
body[data-theme="light"] select::placeholder,
body[data-theme="light"] textarea::placeholder,
body[data-theme="light"] .palette-search-input::placeholder {
  color: #000;
  opacity: 1;
}
body:not([data-theme="light"]) input,
body:not([data-theme="light"]) select,
body:not([data-theme="light"]) textarea {
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
}
body:not([data-theme="light"]) input::placeholder,
body:not([data-theme="light"]) select::placeholder,
body:not([data-theme="light"]) textarea::placeholder,
body:not([data-theme="light"]) .palette-search-input::placeholder {
  color: color-mix(in srgb, var(--muted) 84%, var(--text) 16%);
  opacity: 1;
}
label { display: grid; gap: var(--space-1); color: var(--muted); font-size: var(--font-size-label); }
body:not([data-theme="light"]) label,
body:not([data-theme="light"]) .muted,
body:not([data-theme="light"]) .subtitle,
body:not([data-theme="light"]) .topbar-settings-field,
body:not([data-theme="light"]) .command-structure-summary-label,
body:not([data-theme="light"]) .weather-metric-label,
body:not([data-theme="light"]) .map-style-card-kind,
body:not([data-theme="light"]) .hazmat-class-symbol,
body:not([data-theme="light"]) .session-card .muted,
body:not([data-theme="light"]) .object-template .muted,
body:not([data-theme="light"]) .ics202-card .hint,
body:not([data-theme="light"]) .tech-ref-field-hint {
  color: color-mix(in srgb, var(--text) 72%, var(--muted) 28%);
}
.inline-checkbox {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--text);
  font-size: 13px;
}
.inline-checkbox input {
  width: auto;
  margin: 0;
}
input:disabled,
select:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

button {
  border: 1px solid transparent;
  min-height: var(--control-height);
  width: auto;
  max-width: 100%;
  border-radius: 12px;
  padding: 7px 10px;
  cursor: pointer;
  transition: transform .08s ease, opacity .2s ease, background .2s ease, box-shadow .2s ease, border-color .2s ease;
  font-weight: 650;
}
button:hover { transform: translateY(-1px); }
button:disabled { cursor: not-allowed; opacity: .55; transform: none; }
button.primary {
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 86%, #ffffff 14%), var(--accent));
  color: #ffffff;
  font-weight: 720;
  box-shadow: 0 12px 24px color-mix(in srgb, var(--accent) 28%, transparent);
}
button.secondary {
  background: color-mix(in srgb, var(--panel) 82%, transparent);
  color: var(--accent);
  border-color: var(--separator);
}
button.danger { background: color-mix(in srgb, var(--danger) 12%, var(--panel) 88%); color: var(--danger); border-color: color-mix(in srgb, var(--danger) 24%, transparent); }
body[data-theme="light"] button.danger {
  background: color-mix(in srgb, var(--danger) 11%, var(--panel) 89%);
  color: #b23831;
  border-color: color-mix(in srgb, var(--danger) 24%, transparent);
}
body[data-theme="light"] button.danger:hover {
  background: color-mix(in srgb, var(--danger) 16%, var(--panel) 84%);
}
button.topbar-alert-btn {
  background: linear-gradient(180deg, color-mix(in srgb, var(--danger) 82%, #ffffff 18%) 0%, var(--danger) 100%);
  color: #fff7f7;
  border-color: color-mix(in srgb, var(--danger) 26%, transparent);
  font-weight: 800;
  box-shadow: 0 12px 26px color-mix(in srgb, var(--danger) 28%, transparent);
}
.topbar .primary,
.topbar .secondary,
.topbar .danger {
  min-height: 44px;
  padding: 7px 12px;
  border-radius: 12px;
  font-size: 12px;
  line-height: 1.1;
  white-space: nowrap;
}
.tech-ref-identification-actions {
  margin-top: var(--space-2);
}
.tech-ref-identification-actions button {
  min-width: 112px;
}
.topbar .topbar-icon-btn,
.topbar .topbar-settings-btn {
  width: 44px;
  min-height: 44px;
  font-size: 20px;
}
button.topbar-alert-btn:hover {
  background: linear-gradient(180deg, color-mix(in srgb, var(--danger) 74%, #ffffff 26%) 0%, color-mix(in srgb, var(--danger) 92%, #7f1d1d 8%) 100%);
  box-shadow: 0 14px 30px color-mix(in srgb, var(--danger) 34%, transparent);
}
#deleteObjectBtn {
  background: linear-gradient(180deg, color-mix(in srgb, var(--danger) 82%, #ffffff 18%) 0%, var(--danger) 100%);
  color: #fff7f7;
  border-color: color-mix(in srgb, var(--danger) 26%, transparent);
  font-weight: 800;
  box-shadow: 0 12px 26px color-mix(in srgb, var(--danger) 28%, transparent);
}
#deleteObjectBtn:hover:not(:disabled),
#deleteObjectBtn:focus-visible:not(:disabled) {
  background: linear-gradient(180deg, color-mix(in srgb, var(--danger) 74%, #ffffff 26%) 0%, color-mix(in srgb, var(--danger) 92%, #7f1d1d 8%) 100%);
  box-shadow: 0 14px 30px color-mix(in srgb, var(--danger) 34%, transparent);
  color: #ffffff;
}
.modal {
  position: fixed;
  inset: 0;
  background: rgba(15,23,42,0.28);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(18px, var(--safe-top)) max(18px, var(--safe-right)) max(18px, var(--safe-bottom)) max(18px, var(--safe-left));
  z-index: 6100;
  backdrop-filter: blur(16px) saturate(130%);
}
.modal-card {
  width: min(420px, 100%);
  background: color-mix(in srgb, var(--panel) 90%, transparent);
  border: 1px solid var(--separator);
  border-radius: var(--radius-panel);
  padding: 18px;
  box-shadow: var(--shadow);
  display: grid;
  gap: var(--space-4);
  backdrop-filter: blur(22px) saturate(155%);
}
.save-confirmation-modal-card {
  width: min(460px, 100%);
  text-align: center;
}
.save-confirmation-icon {
  width: 72px;
  height: 72px;
  margin: 2px auto 0;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: color-mix(in srgb, var(--success) 14%, var(--panel) 86%);
  color: var(--success);
  font-size: 34px;
  font-weight: 800;
  border: 1px solid color-mix(in srgb, var(--success) 24%, var(--separator));
  box-shadow: 0 14px 30px color-mix(in srgb, var(--success) 16%, transparent);
}
.save-confirmation-copy {
  display: grid;
  gap: 6px;
  justify-items: center;
}
.save-confirmation-copy strong {
  font-size: 17px;
  line-height: 1.2;
}
.save-confirmation-copy .muted {
  max-width: 32ch;
}
.modal-actions {
  display: flex;
  justify-content: center;
}
.export-modal-card {
  width: min(460px, 100%);
}
.quick-actions-modal-card {
  width: min(1040px, calc(100vw - 36px));
  max-height: min(88dvh, 820px);
}
.assign-task-modal-card,
.complete-task-modal-card {
  width: min(560px, 100%);
}
.entry-team-ppe-card {
  width: min(520px, 100%);
}
.entry-team-ppe-form {
  display: grid;
  gap: var(--space-3);
}
.entry-team-ppe-options {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  border: 0;
}
.entry-team-ppe-options legend {
  margin-bottom: 4px;
  font-size: 13px;
  font-weight: 700;
}
.entry-team-ppe-options label {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 9px 11px;
  border: 1px solid var(--separator);
  border-radius: 9px;
  background: color-mix(in srgb, var(--panel-alt) 78%, transparent);
  cursor: pointer;
}
.entry-team-ppe-options input {
  width: auto;
  min-width: 18px;
  height: 18px;
  margin: 0;
  flex: 0 0 auto;
}
.entry-team-ppe-options span {
  min-width: 0;
  flex: 1 1 auto;
  text-align: left;
}
.air-monitor-reading-card {
  width: min(520px, 100%);
}
.quick-actions-modal-body {
  overflow: auto;
  display: grid;
  gap: var(--space-3);
  padding-right: 4px;
  padding-bottom: 2px;
}
.quick-actions-modal-section {
  display: grid;
  gap: var(--space-2);
}
.quick-actions-modal-buttons {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(108px, 1fr));
  gap: 8px;
}
.quick-actions-inline-buttons {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(108px, 1fr));
  gap: 6px;
  width: 100%;
}
.quick-actions-inline-buttons button,
.quick-action-modal-btn {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  text-align: left;
}
.quick-action-badge {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
}
.quick-action-copy {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 2px;
}
.quick-action-label,
.quick-action-completion {
  min-width: 0;
  line-height: 1.05;
}
.quick-action-completion {
  font-size: 10px;
  font-weight: 700;
  color: var(--success);
}
.quick-action-completed {
  border-color: color-mix(in srgb, var(--success) 42%, var(--separator));
  background: color-mix(in srgb, var(--success) 10%, var(--panel));
  color: color-mix(in srgb, var(--text) 76%, var(--muted));
  opacity: 0.82;
}
.quick-action-badge {
  padding: 2px 5px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--success) 16%, transparent);
  color: var(--success);
  font-size: 9px;
  font-weight: 800;
  line-height: 1;
  text-transform: uppercase;
}
.quick-action-pending {
  opacity: 0.72;
}
.quick-action-pending .quick-action-badge::after {
  content: "Saving";
  font-size: 9px;
  font-weight: 800;
  line-height: 1;
  text-transform: uppercase;
  color: var(--muted);
}
.quick-action-modal-btn {
  min-height: 34px;
  padding: 6px 8px;
  font-size: 11px;
  line-height: 1.15;
  white-space: normal;
  text-wrap: balance;
}
.assign-task-form {
  display: grid;
  gap: var(--space-3);
}
.segmented-control {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.segmented-control label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--separator);
  border-radius: 8px;
  background: color-mix(in srgb, var(--panel-alt) 78%, transparent);
  font-size: 12px;
  font-weight: 700;
}
.assign-task-grid {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: var(--space-3);
}
.task-complete-summary {
  padding: 10px;
  border: 1px solid var(--separator);
  border-radius: 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
  background: color-mix(in srgb, var(--panel-alt) 78%, transparent);
}
.field-help {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}
.air-monitor-reading-form {
  display: grid;
  gap: var(--space-3);
}
.air-monitor-reading-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3);
}
.air-monitor-reading-grid .field-block {
  min-width: 0;
}
@media (max-width: 540px) {
  .quick-actions-modal-card {
    width: min(94vw, 680px);
    max-height: min(90dvh, 860px);
    padding: 14px;
  }
  .assign-task-grid,
  .segmented-control {
    grid-template-columns: 1fr;
  }
  .task-drawer {
    top: 58px;
    right: 10px;
    left: 10px;
    width: auto;
    max-height: 68dvh;
  }
  .session-checklist-drawer {
    top: var(--session-checklist-drawer-top, calc(var(--safe-top) + 92px));
    bottom: calc(var(--safe-bottom) + 10px);
    right: 10px;
    left: 10px;
    width: auto;
    max-height: none;
  }
  .session-checklist-drawer-body {
    grid-template-columns: 1fr;
  }
  .session-checklists-nav {
    max-height: 32dvh;
  }
  .session-checklists-detail {
    overflow: visible;
  }
  .session-checklist-detail-header {
    align-items: flex-start;
  }
  .session-checklist-item-row {
    grid-template-columns: 1fr;
  }
  .session-checklist-item-row.has-inline-input {
    grid-template-columns: 1fr;
  }
  .session-checklist-complete-wrap {
    grid-template-columns: 20px minmax(0, 1fr);
  }
  .session-checklist-note-toggle {
    justify-self: start;
  }
  .session-checklist-inputs {
    grid-template-columns: 1fr;
  }
  .quick-actions-modal-body {
    max-height: calc(90dvh - 104px);
    overflow: auto;
  }
  .quick-actions-modal-buttons {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }
  .quick-actions-inline-buttons {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .quick-action-modal-btn {
    min-height: 32px;
    padding: 5px 6px;
    font-size: 10px;
  }
  .air-monitor-reading-card {
    width: min(94vw, 520px);
  }
  .air-monitor-reading-grid {
    grid-template-columns: 1fr;
  }
}
.add-to-cost-modal-card {
  width: min(760px, 100%);
}
.import-shape-modal-card {
  width: min(640px, 100%);
}
.import-shape-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-3);
}
.import-shape-grid .field-block {
  margin: 0;
}
.import-shape-summary-strong {
  color: var(--text);
  font-weight: 700;
}
.add-to-cost-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3);
}
.add-to-cost-grid .field-block-wide {
  grid-column: 1 / -1;
}
.add-to-cost-grid .field-block textarea {
  min-height: 88px;
}
.feedback-form-grid {
  display: grid;
  gap: var(--space-3);
}
.feedback-modal-card {
  width: min(560px, 100%);
}
.feedback-form-grid textarea {
  min-height: 140px;
  resize: vertical;
}
.feedback-validation-message.feedback-validation-success {
  border-color: color-mix(in srgb, var(--success) 34%, var(--separator));
  background: color-mix(in srgb, var(--success) 12%, var(--panel));
  color: color-mix(in srgb, var(--success) 82%, var(--text));
}
.feedback-modal-actions {
  margin-top: var(--space-1);
}
body.feedback-modal-open {
  overflow: hidden;
}
.add-to-cost-meta-strong {
  color: var(--text);
  font-weight: 700;
}
.guide-popup {
  position: fixed;
  z-index: 1200;
  min-width: 300px;
  max-width: min(420px, 92vw);
  max-height: calc(100vh - var(--safe-top) - var(--safe-bottom) - 24px);
  border-radius: 16px;
  border: 1px solid rgba(196, 155, 0, 0.35);
  background: color-mix(in srgb, var(--panel) 96%, #fff 4%);
  color: var(--text);
  padding: var(--space-4);
  box-shadow: 0 20px 48px rgba(15, 23, 42, 0.22);
  display: none;
  overflow-y: auto;
}
.guide-popup.visible {
  display: block;
}
.guide-popup .title {
  margin: 0 0 6px;
  color: var(--accent-strong);
  font-size: 20px;
  font-weight: 800;
  line-height: 1.15;
}
.guide-popup .body {
  font-size: 14px;
  line-height: 1.45;
}
.guide-popup .meta {
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
}
.guide-popup .controls {
  margin-top: 12px;
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}
.guide-highlight {
  position: relative;
  z-index: 1100 !important;
  border-radius: 12px;
  box-shadow:
    0 0 0 4px rgba(214, 167, 0, 0.95),
    0 0 0 10px rgba(214, 167, 0, 0.14),
    0 12px 28px rgba(214, 167, 0, 0.2) !important;
  animation: guidePulse 1.1s ease-in-out infinite;
}
@keyframes guidePulse {
  0% {
    box-shadow:
      0 0 0 4px rgba(214, 167, 0, 0.95),
      0 0 0 10px rgba(214, 167, 0, 0.14),
      0 12px 28px rgba(214, 167, 0, 0.2);
  }
  70% {
    box-shadow:
      0 0 0 4px rgba(214, 167, 0, 0.95),
      0 0 0 18px rgba(214, 167, 0, 0),
      0 16px 32px rgba(214, 167, 0, 0.12);
  }
  100% {
    box-shadow:
      0 0 0 4px rgba(214, 167, 0, 0.95),
      0 0 0 10px rgba(214, 167, 0, 0.06),
      0 12px 28px rgba(214, 167, 0, 0.16);
  }
}
@media (prefers-reduced-motion: reduce) {
  .guide-highlight {
    animation: none;
  }
  .landing-card-toggle,
  .landing-card-toggle .toggle-symbol,
  .landing-card-body {
    transition: none;
  }
  .landing-card-toggle.landing-card-toggle-recent {
    animation: none;
    background: rgba(243, 198, 19, 0.14);
    box-shadow: 0 0 0 2px rgba(243, 198, 19, 0.16);
  }
}
.isolation-modal-card {
  width: min(720px, 100%);
}
.isolation-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3);
}
.isolation-field {
  display: grid;
  gap: var(--space-1);
}
.isolation-search-shell {
  position: relative;
}
.isolation-suggestions {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 8;
  display: grid;
  gap: var(--space-1);
  max-height: 220px;
  overflow-y: auto;
  padding: var(--space-2);
  border: 1px solid var(--stroke);
  border-radius: var(--radius-card);
  background: rgba(10,10,10,0.98);
  box-shadow: var(--shadow);
}
.isolation-suggestion {
  width: 100%;
  text-align: left;
  border-radius: var(--radius-control);
  border: 1px solid var(--stroke);
  background: var(--panel-soft);
  color: var(--text);
  padding: 9px 11px;
}
.isolation-suggestion strong,
.isolation-suggestion span {
  display: block;
}
.isolation-suggestion span {
  color: var(--muted);
  font-size: 0.9rem;
  margin-top: 3px;
}
.isolation-suggestion:hover,
.isolation-suggestion:focus-visible {
  border-color: rgba(243, 198, 19, 0.75);
  background: rgba(243, 198, 19, 0.12);
}
.isolation-label {
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 800;
}
.toggle-row {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: var(--space-3);
  align-items: start;
}
.toggle-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 3px;
}
.toggle-row span {
  display: grid;
  gap: 4px;
}
.isolation-field.hidden {
  display: none;
}
.isolation-scenario-guidance {
  background-color: var(--surface-secondary);
  border-left: 3px solid var(--accent);
  padding: var(--space-2) var(--space-3);
  margin: var(--space-2) 0;
  border-radius: 4px;
  font-size: 13px;
  line-height: 1.5;
}
.isolation-scenario-guidance.hidden {
  display: none;
}
.isolation-scenario-item {
  margin-bottom: var(--space-2);
}
.isolation-scenario-item:last-child {
  margin-bottom: 0;
}
.isolation-scenario-condition {
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}
.isolation-scenario-detail {
  margin-left: var(--space-2);
  color: var(--text-secondary);
}
.isolation-scenario-detail strong {
  color: var(--text-primary);
}
@media (max-width: 720px) {
  .isolation-grid {
    grid-template-columns: 1fr;
  }
}
.export-option-group {
  display: grid;
  gap: var(--space-2);
}
.export-option-group-title {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
}
.export-option-btn {
  width: 100%;
  justify-content: center;
}
.export-modal-note {
  border-top: 1px solid var(--stroke);
  padding-top: var(--space-3);
}
.ics207-preview-modal-card {
  width: min(1180px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  overflow: auto;
}
.ics207-preview-layout {
  display: grid;
  grid-template-columns: minmax(300px, 340px) minmax(0, 1fr);
  gap: var(--space-4);
}
.ics207-preview-controls,
.ics207-preview-grid {
  display: grid;
  gap: var(--space-3);
}
.ics207-preview-actions {
  justify-content: flex-start;
}
.ics207-preview-validation {
  padding: 12px;
  border: 1px solid var(--stroke);
  background: rgba(255,255,255,0.03);
}
.ics207-validation-list {
  margin: 0;
  padding-left: 18px;
}
.ics207-validation-list li.error {
  color: #ef4444;
}
.ics207-validation-list li.warning {
  color: #f59e0b;
}
.ics207-validation-success {
  color: #22c55e;
  font-weight: 700;
}
.ics207-preview-canvas {
  overflow: auto;
  border: 1px solid var(--stroke);
  background: rgba(15,23,42,0.18);
  padding: 12px;
}
.ics207-preview-frame {
  min-width: 820px;
}
.ics207-print-root {
  position: absolute;
  left: -99999px;
  top: -99999px;
  width: 792px;
  background: #fff;
}
.ics207-sheet {
  width: 792px;
  min-height: 612px;
  background: #fff;
  color: #111827;
  font-family: "Helvetica Neue", Arial, sans-serif;
}
.ics207-sheet-header {
  padding: 12px 18px 2px;
}
.ics207-sheet-title {
  margin-bottom: 8px;
  font-size: 18px;
  font-weight: 700;
  text-align: center;
}
.ics207-meta-row {
  display: flex;
  gap: 16px;
  align-items: baseline;
  font-size: 11px;
  margin-bottom: 4px;
}
.ics207-template {
  position: relative;
  width: 792px;
  height: 530px;
}
.ics207-template-connectors {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.ics207-template-connectors path {
  fill: none;
  stroke: #111827;
  stroke-width: 2;
  stroke-linecap: square;
  stroke-linejoin: miter;
}
.ics207-slot {
  position: absolute;
  border: 1px solid #111827;
  background: #fff;
  padding: 6px 8px 4px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-align: center;
}
.ics207-slot-label {
  font-size: 9px;
  line-height: 1.1;
  font-weight: 700;
}
.ics207-slot-name {
  min-height: 14px;
  font-size: 10px;
  line-height: 1.15;
}
.ics207-footer {
  margin-top: 8px;
  padding: 0 18px 12px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 10px;
}
.ics207-prepared-by {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding-bottom: 12px;
  border-bottom: 1px solid var(--separator);
}
.modal-header h2 {
  margin: 0;
  font-size: 1.12rem;
  letter-spacing: -0.02em;
}
body.save-confirmation-modal-open {
  overflow: hidden;
}
.qr-image {
  width: min(280px, 100%);
  aspect-ratio: 1 / 1;
  margin: 0 auto;
  border-radius: 18px;
  background: #fff;
  padding: 10px;
}
.attachment-modal-card {
  width: min(1100px, 96vw);
}
.attachment-preview-img {
  width: 100%;
  max-height: min(66vh, 640px);
  object-fit: contain;
  border: 1px solid var(--stroke);
  border-radius: 14px;
  background: #0b1220;
}
body[data-theme="light"] .attachment-preview-img {
  background: #f2f4f8;
}
.attachment-preview-video {
  width: 100%;
  max-height: min(66vh, 640px);
  border: 1px solid var(--stroke);
  border-radius: 14px;
  background: #0b1220;
}
body[data-theme="light"] .attachment-preview-video {
  background: #f2f4f8;
}
.hidden {
  display: none !important;
}
.attachment-toolbar {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
}
.attachment-direction-card {
  width: min(460px, 92vw);
}
.attachment-direction-copy {
  margin: 0 0 var(--space-3);
}
.attachment-direction-layout {
  display: grid;
  gap: var(--space-3);
  justify-items: center;
  margin-bottom: var(--space-3);
}
.attachment-direction-compass {
  position: relative;
  width: 220px;
  height: 220px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid var(--separator);
  background:
    radial-gradient(circle at center, color-mix(in srgb, var(--panel) 88%, white 12%) 0 28px, transparent 29px),
    radial-gradient(circle at center, transparent 0 86px, color-mix(in srgb, var(--separator) 72%, transparent) 87px 88px, transparent 89px),
    linear-gradient(180deg, color-mix(in srgb, var(--panel-alt) 94%, transparent), color-mix(in srgb, var(--panel) 88%, transparent));
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}
.attachment-direction-compass::before,
.attachment-direction-compass::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  background: color-mix(in srgb, var(--separator) 84%, transparent);
  transform: translate(-50%, -50%);
}
.attachment-direction-compass::before {
  width: 2px;
  height: 166px;
}
.attachment-direction-compass::after {
  width: 166px;
  height: 2px;
}
.attachment-direction-ring {
  position: absolute;
  inset: 16px;
  border-radius: 999px;
  border: 1px dashed color-mix(in srgb, var(--separator) 82%, transparent);
}
.attachment-direction-label {
  position: absolute;
  font-size: 13px;
  font-weight: 800;
  color: var(--muted);
}
.attachment-direction-label-n { top: 16px; left: 50%; transform: translateX(-50%); }
.attachment-direction-label-e { right: 18px; top: 50%; transform: translateY(-50%); }
.attachment-direction-label-s { bottom: 16px; left: 50%; transform: translateX(-50%); }
.attachment-direction-label-w { left: 18px; top: 50%; transform: translateY(-50%); }
.attachment-direction-needle {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 0;
  height: 0;
  transform: translate(-50%, -50%) rotate(var(--attachment-direction-preview, 0deg));
  transform-origin: center;
}
.attachment-direction-needle::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -74px;
  width: 4px;
  height: 68px;
  transform: translateX(-50%);
  border-radius: 999px;
  background: rgba(17, 24, 39, 0.92);
  box-shadow: 0 0 0 2px rgba(255,255,255,0.92);
}
.attachment-direction-needle-tip {
  position: absolute;
  left: 50%;
  top: -88px;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 9px solid transparent;
  border-right: 9px solid transparent;
  border-bottom: 16px solid rgba(17, 24, 39, 0.96);
  filter: drop-shadow(0 0 0 2px rgba(255,255,255,0.94));
}
.attachment-direction-center {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 16px;
  height: 16px;
  transform: translate(-50%, -50%);
  border-radius: 999px;
  background: rgba(17, 24, 39, 0.95);
  box-shadow: 0 0 0 4px rgba(255,255,255,0.92);
}
.attachment-direction-meta {
  display: grid;
  gap: 6px;
  text-align: center;
}
.attachment-direction-meta strong {
  font-size: 17px;
}
.icon-marker-shell {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
}
.attachment-pin-shell {
  filter: drop-shadow(0 9px 18px rgba(15, 23, 42, 0.24));
}
.attachment-pin-direction {
  position: absolute;
  inset: -4px;
  pointer-events: none;
  transform: rotate(var(--attachment-direction, 0deg));
}
.attachment-pin-direction::before {
  content: none;
}
.attachment-pin-direction::after {
  content: "";
  position: absolute;
  left: 50%;
  top: -7px;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-bottom: 8px solid rgba(17, 24, 39, 0.94);
  filter: drop-shadow(0 0 0 2px rgba(255, 255, 255, 0.95));
}
#attachmentDeleteBtn {
  background: linear-gradient(180deg, #7f1d1d, #991b1b);
  border-color: #b91c1c;
  color: #fff4f4;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.12);
}
#attachmentDeleteBtn:hover:not(:disabled),
#attachmentDeleteBtn:focus-visible:not(:disabled) {
  background: linear-gradient(180deg, #991b1b, #b91c1c);
  border-color: #dc2626;
  color: #ffffff;
}
#attachmentDeleteBtn:disabled {
  background: rgba(153,27,27,0.18);
  border-color: rgba(185,28,28,0.3);
  color: rgba(127,29,29,0.55);
}

.segmented {
  display: inline-flex;
  gap: var(--space-1);
  padding: 4px;
  border-radius: 16px;
  background: color-mix(in srgb, var(--panel-alt) 92%, transparent);
  border: 1px solid var(--separator);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.24);
}
.landing .segmented {
  flex-shrink: 0;
}
.segmented button {
  background: transparent;
  color: var(--muted);
  border: 0;
  min-height: var(--control-height-compact);
  padding: 6px 12px;
  border-radius: 12px;
  font-weight: 650;
  transition: background .18s ease, color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.segmented button.active {
  background: color-mix(in srgb, var(--panel) 94%, transparent);
  color: var(--text);
  box-shadow: 0 4px 12px rgba(15,23,42,0.08);
}
.segmented button#signUpTabBtn.active {
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 22%, var(--panel)), color-mix(in srgb, var(--accent) 10%, var(--panel)));
  color: color-mix(in srgb, var(--accent) 78%, var(--text));
  box-shadow: 0 6px 16px color-mix(in srgb, var(--accent) 18%, transparent);
}

.session-list, .participant-list, .guided-steps, .palette-list {
  display: grid;
  gap: 8px;
}

.session-card, .participant-card, .guided-step, .palette-group, .object-template {
  border: 1px solid var(--separator);
  background: color-mix(in srgb, var(--panel) 82%, transparent);
  border-radius: 18px;
  box-shadow: var(--shadow-soft);
}

.session-card, .participant-card, .guided-step, .palette-group {
  padding: 10px;
}
.participant-card.personnel-sharing-active {
  border-color: color-mix(in srgb, var(--success) 48%, var(--separator));
}
.participant-card.personnel-sharing-stale {
  border-color: color-mix(in srgb, #f59e0b 48%, var(--separator));
}
.participant-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}
.participant-card-actions button {
  min-height: 32px;
  padding: 6px 10px;
  border-radius: 12px;
  font-size: var(--font-size-help);
}
.personnel-marker {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 2px solid #ffffff;
  border-radius: 999px;
  background: #2563eb;
  color: #ffffff;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.28);
}
.personnel-marker-icon {
  width: 22px;
  height: 22px;
  display: block;
  color: inherit;
}
.personnel-marker.stale {
  background: #f59e0b;
}
.personnel-marker.self {
  background: #16a34a;
}
.personnel-marker-label {
  position: absolute;
  left: 50%;
  top: 36px;
  transform: translateX(-50%);
  max-width: 120px;
  padding: 3px 7px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--panel) 92%, transparent);
  color: var(--text);
  border: 1px solid var(--separator);
  box-shadow: var(--shadow-soft);
  font-size: 11px;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.palette-group {
  padding: 6px 10px;
}
.session-card {
  display: grid;
  gap: var(--space-2);
  min-width: 0;
}
.session-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-2);
  min-width: 0;
}
.session-card-content {
  display: grid;
  gap: 4px;
  min-width: 0;
  flex: 1 1 auto;
}
.session-card-actions {
  flex: 0 0 auto;
  justify-content: flex-end;
  align-items: flex-start;
}
.session-card strong,
.session-card .muted {
  min-width: 0;
  overflow-wrap: anywhere;
}

.palette-group-toggle {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 28px;
  padding: 0;
  background: transparent;
  border: 0;
  color: var(--accent);
  font-weight: 700;
  font-size: 0.92rem;
  line-height: 1.15;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.palette-group-toggle:hover {
  transform: none;
}

.toggle-symbol {
  display: inline-flex;
  width: 18px;
  height: 18px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--panel-strong);
  color: var(--text);
  flex-shrink: 0;
  font-size: 14px;
}

.template-grid {
  display: grid;
  gap: var(--space-2);
}
.hazmat-tier-grid {
  gap: 6px;
}
.hazmat-class-row {
  display: grid;
  gap: 6px;
}
.hazmat-class-toggle {
  width: 100%;
  min-height: 36px;
  padding: 6px 8px;
  border: 1px solid var(--stroke);
  border-radius: var(--radius-card);
  background: color-mix(in srgb, var(--panel) 90%, transparent);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-align: left;
}
.hazmat-class-title {
  font-weight: 700;
  font-size: 0.9rem;
  line-height: 1.2;
}
.hazmat-class-symbol {
  width: 20px;
  text-align: center;
  font-weight: 700;
  color: var(--muted);
}
.palette-search-row {
  display: flex;
  gap: var(--space-2);
  align-items: center;
  margin-bottom: var(--space-2);
}
.palette-search-input {
  width: 100%;
  min-width: 0;
  min-height: var(--control-height);
  padding: 9px 11px;
  border-radius: var(--radius-card);
  border: 1px solid var(--stroke);
  background: var(--panel-alt);
  color: var(--text);
  font-size: 14px;
}
.palette-search-input::placeholder {
  color: var(--muted);
}
.palette-search-clear {
  flex-shrink: 0;
  min-width: 60px;
}
.palette-search-empty {
  padding: var(--space-4);
  border-radius: var(--radius-card);
  border: 1px dashed var(--stroke);
  background: var(--panel-soft);
  line-height: 1.45;
}
.palette-empty {
  padding: 8px 4px 2px;
}
.drag-hint {
  margin-bottom: var(--space-2);
  font-size: 12px;
}
.object-template {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-2);
  width: 100%;
  min-width: 0;
  padding: 6px 8px;
  color: var(--text);
  text-align: left;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.object-template > span {
  min-width: 0;
}
.object-template * {
  user-select: none;
  -webkit-user-select: none;
}
.object-template strong {
  display: block;
  color: var(--text);
  font-size: 0.86rem;
  line-height: 1.08;
  overflow-wrap: anywhere;
}
.object-template.icon-template {
  justify-content: flex-start;
  align-items: center;
}
.object-template.cost-template {
  align-items: center;
}
.cost-template-copy {
  min-width: 0;
}
.object-template-title {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.object-template-title > span:last-child {
  min-width: 0;
}
.object-template-origin-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  font-size: 0.9rem;
  line-height: 1;
}
.object-template-meta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  flex: 0 0 auto;
}
.object-template-origin-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 22px;
  padding: 0 7px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--stroke));
  background: color-mix(in srgb, var(--panel-strong) 76%, var(--accent) 24%);
  color: var(--text);
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.06em;
}
.object-template-icon-wrap {
  width: 34px;
  height: 34px;
  border-radius: 14px;
  border: 1px solid var(--stroke);
  background: var(--panel-strong);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.object-template-icon {
  width: 22px;
  height: 22px;
  object-fit: contain;
}
.object-template .muted {
  color: #c1cfde;
  font-size: 0.74rem;
  line-height: 1.1;
  margin-top: 1px;
  overflow-wrap: anywhere;
}
.object-template.cost-template .muted {
  color: inherit;
  font-weight: 600;
}
body[data-theme="light"] .object-template .muted {
  color: #000;
}
.object-template[draggable="true"] {
  cursor: grab;
}
.object-template.dragging {
  opacity: 0.55;
}
.object-template.active {
  border-color: var(--accent);
  background: rgba(243,198,19,0.12);
}
.cost-summary-body {
  display: grid;
  gap: var(--space-2);
}
.playback-panel-copy {
  line-height: 1.45;
  font-size: var(--font-size-help);
}
.playback-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-3);
  margin: 14px 0 10px;
}
.playback-actions button {
  min-height: 46px;
  width: 100%;
  padding-inline: 14px;
  white-space: normal;
  line-height: 1.15;
  text-align: center;
}
.playback-actions #loadPlaybackBtn {
  box-shadow: 0 16px 30px color-mix(in srgb, var(--accent) 22%, transparent);
}
.playback-actions #exitPlaybackBtn {
  color: color-mix(in srgb, var(--text) 72%, var(--accent) 28%);
}
.playback-actions #exportTrainingScenarioBtn {
  color: color-mix(in srgb, var(--text) 76%, var(--accent) 24%);
}
.playback-controls {
  display: grid;
  gap: var(--space-4);
  margin-top: 12px;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid var(--separator);
  background: linear-gradient(180deg, color-mix(in srgb, var(--panel) 88%, transparent), color-mix(in srgb, var(--panel-alt) 94%, transparent));
  box-shadow: var(--shadow-soft);
}
.playback-controls-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: end;
  gap: var(--space-3);
}
.playback-controls-row > button,
.playback-controls-row > label {
  min-width: 0;
  width: 100%;
}
.playback-speed-field {
  grid-column: 1 / -1;
}
.playback-speed-field span {
  display: block;
  margin-bottom: 6px;
}
.playback-speed-field select {
  width: 100%;
  min-width: 0;
}
.playback-slider {
  width: 100%;
  margin: 2px 0 0;
}
.playback-meta {
  min-height: 32px;
  color: var(--muted);
  font-size: var(--font-size-help);
  line-height: 1.45;
  padding-top: 2px;
}
.cost-summary-row {
  display: flex;
  justify-content: space-between;
  gap: var(--space-2);
  align-items: center;
  padding: 7px 9px;
  border-radius: var(--radius-control);
  background: var(--panel-soft);
  border: 1px solid var(--stroke);
}
.cost-summary-row.total {
  border-color: var(--border-strong);
  background: rgba(255,212,0,0.08);
}
.cost-summary-foot {
  font-size: 12px;
}

.meta-list {
  display: grid;
  gap: var(--space-1);
  min-width: 0;
}
.meta-row {
  display: grid;
  grid-template-columns: minmax(86px, 36%) minmax(0, 1fr);
  gap: var(--space-2);
  align-items: flex-start;
  min-width: 0;
}
.meta-row .label {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.meta-row .value {
  text-align: right;
  font-size: 13px;
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.selected-map-detail-card {
  display: grid;
  gap: 10px;
}
.selected-map-detail-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}
.selected-map-detail-toggle {
  appearance: none;
  border: 1px solid var(--stroke);
  background: rgba(255,255,255,0.06);
  color: var(--text);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.selected-map-detail-toggle:hover,
.selected-map-detail-toggle:focus-visible {
  border-color: var(--accent);
  outline: none;
}
.selected-map-detail-title {
  margin-top: 8px;
}
.selected-map-detail-expanded {
  display: grid;
  gap: 12px;
  min-height: 0;
  overflow-y: auto;
  padding-right: 4px;
  padding-top: 4px;
  border-top: 1px solid var(--stroke);
  scrollbar-gutter: stable;
}
.selected-object-actions {
  display: grid;
  gap: 10px;
}
.selected-object-actions-row {
  flex-wrap: wrap;
}
.pin-quick-tray {
  display: flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  max-width: 100%;
  padding: 8px;
  border-radius: 18px;
  border: 1px solid color-mix(in srgb, var(--stroke) 70%, transparent);
  background: linear-gradient(180deg, color-mix(in srgb, var(--panel) 94%, white 6%), var(--panel-soft));
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.12);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.pin-chip {
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 0.78rem;
  letter-spacing: 0.01em;
  white-space: nowrap;
}
.pin-chip:hover,
.pin-chip:focus-visible {
  transform: translateY(-1px);
}
.pin-quick-tray .pin-chip:nth-child(1) {
  border-color: color-mix(in srgb, var(--accent) 55%, var(--stroke));
}
.pin-quick-tray .pin-chip:nth-child(2) {
  border-color: color-mix(in srgb, #ff9f1c 65%, var(--stroke));
}
.pin-quick-tray .pin-chip:nth-child(3) {
  border-color: color-mix(in srgb, #4c6ef5 65%, var(--stroke));
}
.pin-quick-tray .pin-chip:nth-child(4) {
  border-color: color-mix(in srgb, #12b886 65%, var(--stroke));
}

@media (max-width: 1024px) {
  #selectedItemPanel {
    padding: 10px;
  }

  #selectedItemPanel .meta-list {
    gap: 6px;
  }

  #selectedItemPanel .meta-row {
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
  }

  #selectedItemPanel .meta-row .value {
    max-width: none;
    text-align: left;
    word-break: break-word;
  }

  #selectedItemPanel .row,
  #selectedItemPanel .stack {
    gap: 8px;
  }
}

@media (max-width: 640px) {
  #selectedItemPanel {
    padding: 8px;
    border-radius: 16px;
  }

  #selectedItemPanel .panel-section-toggle {
    min-height: 40px;
    padding-block: 8px;
  }

  #selectedItemPanel .selected-object-actions,
  #selectedItemPanel #selectedObjectActions {
    gap: 6px;
  }

  #selectedItemPanel .selected-object-actions button,
  #selectedItemPanel #selectedObjectActions button {
    min-height: 36px;
  }

  .selected-map-detail-header {
    gap: 8px;
  }

  .selected-map-detail-toggle {
    min-height: 36px;
  }
}
.cost-marker {
  min-width: 88px;
  max-width: 140px;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 6px 9px;
  border-radius: var(--radius-card);
  border: 1px solid var(--stroke);
  background: rgba(10,10,10,0.96);
  color: var(--text);
  box-shadow: var(--shadow);
}
.cost-marker.equipment {
  border-color: rgba(13,110,253,0.35);
}
.cost-marker.consumable {
  border-color: rgba(243,198,19,0.35);
}
.cost-marker-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 26px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--accent);
  color: #101418;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
}
.cost-marker.equipment .cost-marker-badge {
  background: #7cb2ff;
}
.cost-marker-body {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.cost-marker-body strong,
.cost-marker-body span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cost-marker-body strong {
  font-size: 10px;
}
.cost-marker-body span {
  color: var(--muted);
  font-size: 9px;
}
.map-note-marker {
  position: relative;
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 12px;
  border: 1px solid rgba(0,0,0,0.22);
  background: linear-gradient(180deg, #fff2a6, #ffe16a);
  color: #1b1600;
  box-shadow: 0 10px 18px rgba(0,0,0,0.25);
  display: flex;
  align-items: center;
  justify-content: center;
}
.map-note-marker.is-selected {
  width: auto;
  min-width: 56px;
  max-width: 92px;
  min-height: 44px;
  padding: 7px 8px 7px 10px;
  display: grid;
  gap: 2px;
  justify-content: initial;
}
.map-note-marker-corner {
  position: absolute;
  top: 0;
  right: 0;
  width: 0;
  height: 0;
  border-top: 14px solid rgba(255,255,255,0.88);
  border-left: 14px solid transparent;
}
.map-note-marker-glyph {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: rgba(27,22,0,0.72);
}
.map-note-marker-glyph svg {
  width: 18px;
  height: 18px;
  display: block;
}
.map-note-marker-glyph path {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.map-note-marker-label {
  display: none;
  font-size: 12px;
  line-height: 1.15;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.map-note-marker.is-selected .map-note-marker-label {
  display: block;
}
.map-note-important {
  background: linear-gradient(180deg, #ffd98a, #ffbe55);
}
.map-note-urgent {
  background: linear-gradient(180deg, #ffb4a8, #ff8875);
}
.selected-map-detail-card {
  position: fixed;
  left: 16px;
  bottom: 16px;
  z-index: 2600;
  width: min(680px, calc(100vw - 32px));
  max-width: calc(100vw - 32px);
  max-height: min(720px, calc(100dvh - var(--safe-top) - var(--safe-bottom) - 32px));
  padding: 15px 50px 15px 16px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.94);
  color: #111827;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(14px) saturate(145%);
  -webkit-backdrop-filter: blur(14px) saturate(145%);
  white-space: normal;
  overflow: hidden;
  overflow-wrap: anywhere;
  word-break: normal;
  grid-template-rows: auto auto minmax(0, 1fr);
}
.selected-map-detail-title {
  margin-bottom: 5px;
  font-size: 15px;
  line-height: 1.3;
  font-weight: 800;
}
.selected-map-detail-meta {
  font-size: 13px;
  line-height: 1.4;
  color: #374151;
}
.selected-map-detail-body {
  display: grid;
  gap: 4px;
  min-height: 0;
}
.selected-map-detail-appearance {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(17, 24, 39, 0.08);
  display: grid;
  gap: 12px;
}
.selected-map-detail-section-title {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #6b7280;
}
.selected-map-detail-control {
  display: grid;
  gap: 8px;
}
.selected-map-detail-control-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.selected-map-detail-control-row input[type="range"] {
  flex: 1;
  accent-color: #0f172a;
}
.selected-map-detail-control-value {
  min-width: 52px;
  text-align: right;
  font-size: 12px;
  font-weight: 700;
  color: #374151;
}
.selected-map-detail-nudge {
  width: 32px;
  height: 32px;
  min-width: 32px;
  min-height: 32px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid rgba(17, 24, 39, 0.12);
  background: rgba(255, 255, 255, 0.88);
  color: #111827;
  font-size: 18px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.selected-map-detail-nudge:hover {
  transform: none;
  background: rgba(17, 24, 39, 0.06);
}
.selected-map-detail-swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.selected-map-detail-swatch {
  width: 26px;
  height: 26px;
  padding: 0;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.72);
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.18);
}
.selected-map-detail-swatch.is-active {
  outline: 2px solid rgba(15, 23, 42, 0.65);
  outline-offset: 2px;
}
.selected-map-detail-swatch:hover {
  transform: translateY(-1px);
}
.selected-map-detail-meta + .selected-map-detail-meta {
  margin-top: 2px;
}
.selected-map-detail-close {
  position: absolute;
  top: 9px;
  right: 10px;
  width: 28px;
  height: 28px;
  min-width: 28px;
  min-height: 28px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.07);
  color: #374151;
  font-size: 20px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.selected-map-detail-close:hover {
  transform: none;
  background: rgba(15, 23, 42, 0.12);
}
body[data-theme="dark"] .selected-map-detail-card {
  background: rgba(248, 250, 252, 0.94);
  border-color: rgba(255, 255, 255, 0.2);
  color: #111827;
}
@media (max-width: 1024px) {
  .selected-map-detail-card {
    position: fixed;
    left: calc(var(--safe-left) + 16px);
    right: calc(var(--safe-right) + 16px);
    bottom: calc(var(--safe-bottom) + 136px);
    width: auto;
    max-width: none;
    padding: 14px 48px 14px 16px;
    z-index: 2600;
    max-height: calc(100dvh - var(--safe-top) - var(--safe-bottom) - 168px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-gutter: stable;
  }

  .selected-map-detail-expanded {
    padding-right: 2px;
  }

  .selected-map-detail-card::-webkit-scrollbar {
    width: 10px;
  }

  .selected-map-detail-card::-webkit-scrollbar-thumb {
    border-radius: 999px;
    border: 2px solid rgba(255, 255, 255, 0.72);
    background: rgba(71, 85, 105, 0.42);
  }

  .selected-map-detail-card::-webkit-scrollbar-track {
    background: transparent;
  }

  .selected-map-detail-card.is-geometry-editing {
    display: none;
  }
}
@media (prefers-color-scheme: dark) {
  body:not([data-theme="light"]) .selected-map-detail-section-title {
    color: #9ca3af;
  }
}
body[data-theme="dark"] .selected-map-detail-appearance {
  border-top-color: rgba(255, 255, 255, 0.12);
}
body[data-theme="dark"] .selected-map-detail-nudge {
  background: rgba(255, 255, 255, 0.92);
}
.field-block textarea {
  resize: vertical;
  min-height: 76px;
}

.draw-controls {
  position: absolute;
  left: 12px;
  bottom: 12px;
  z-index: 550;
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3);
  border-radius: var(--radius-card);
  background: color-mix(in srgb, var(--panel) 88%, transparent);
  border: 1px solid var(--separator);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(18px) saturate(150%);
}
.map-sidebar-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  top: 50%;
  right: clamp(-58px, calc(-38px - env(safe-area-inset-right)), -28px);
  transform: translateY(-50%);
  width: 38px;
  height: 76px;
  border-radius: 999px;
  border: 1px solid var(--separator);
  background: color-mix(in srgb, var(--panel) 92%, transparent);
  color: var(--accent);
  font-size: 24px;
  font-weight: 800;
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(18px) saturate(150%);
  z-index: 1200;
}
.map-sidebar-toggle:hover {
  transform: translateY(-50%);
}
.app.right-sidebar-collapsed .map-sidebar-toggle {
  right: clamp(-58px, calc(-38px - env(safe-area-inset-right)), -28px);
}
.app.right-sidebar-collapsed .map-sidebar-toggle .toggle-chevron {
  display: inline-block;
  transform: rotate(180deg);
}

.map-fullscreen-toggle {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  border: 1px solid var(--separator);
  background: color-mix(in srgb, var(--panel) 88%, transparent);
  color: var(--accent);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(18px) saturate(150%);
  z-index: 1200;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 19px;
  font-weight: 900;
}
.map-fullscreen-toggle:hover {
  transform: none;
}
.map-fullscreen-toggle.is-active {
  color: var(--success);
}
.map-fullscreen-toggle-icon {
  line-height: 1;
}

@media (min-width: 1025px) {
  .map-fullscreen-toggle,
  .map-launch-qr-show {
    position: static;
    left: auto;
    right: auto;
    top: auto;
    bottom: auto;
  }
}

.shell.map-expanded-mode .topbar,
.shell.map-expanded-mode .sidebar.left,
.shell.map-expanded-mode .sidebar.right,
.shell.map-expanded-mode .task-drawer,
.shell.map-expanded-mode .task-alert,
.shell.map-expanded-mode .mobile-landscape-drawer {
  display: none !important;
}
.shell.map-expanded-mode .layout {
  overflow: hidden;
}
.shell.map-expanded-mode .app {
  grid-template-columns: 0 1fr 0;
  gap: 0;
  padding: 0;
  min-height: calc(100vh - var(--topbar-height, 0px));
}
.shell.map-expanded-mode .map-stage {
  position: fixed;
  inset: 0;
  z-index: 2000;
}
.shell.map-expanded-mode #map {
  border-radius: 0;
  border: 0;
  box-shadow: none;
}
.shell.map-expanded-mode .map-fullscreen-toggle {
  z-index: 2105;
}

.shell.map-expanded-mode .map-sidebar-toggle {
  right: calc(14px + env(safe-area-inset-right));
}

@media (max-width: 1024px) {
  .shell.map-expanded-mode .map-fullscreen-toggle {
    position: relative;
    z-index: 2105;
  }
}

.guided-collapsed-content {
  display: none;
}

.panel.compact.collapsed .guided-collapsed-content {
  display: block;
}

.panel.compact.collapsed #startGuidedSetupBtn,
.panel.compact.collapsed #guidedSteps {
  display: none !important;
}

.leaflet-control-layers {
  background: rgba(10,10,10,0.94);
  color: var(--text);
  border: 1px solid var(--stroke);
  touch-action: manipulation;
}

.leaflet-control-layers-expanded {
  padding: 10px 12px;
}

.hidden { display: none !important; }

@media (max-width: 960px) {
  .ics202-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .ics202-field-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .ics202-topbar {
    flex-direction: column;
  }
  .ics202-topbar-actions {
    justify-content: flex-start;
  }
  .super-admin-body {
    grid-template-columns: minmax(0, 1fr);
  }
  .super-admin-nav {
    grid-auto-flow: column;
    grid-auto-columns: minmax(120px, 1fr);
    overflow: auto;
  }
  .super-admin-stat-grid,
  .super-admin-form-grid,
  .super-admin-inline-grid,
  .super-admin-filter-row,
  .super-admin-roster-import {
    grid-template-columns: minmax(0, 1fr);
  }
  .super-admin-form-grid > * {
    grid-column: auto;
  }
  .super-admin-roster-file-picker {
    grid-template-columns: minmax(0, 1fr);
  }
  .super-admin-roster-file-name {
    white-space: normal;
  }
  .super-admin-session-detail-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .import-shape-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 640px) {
  .ics214-entry-row {
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
    gap: 4px;
  }
  .ics214-entry-actions {
    justify-content: flex-start;
  }
}

@media print {
  @page {
    size: letter portrait;
    margin: 0.5in;
  }
  /* Live map print mode — renders the Leaflet map directly (no canvas capture) */
  body.print-map-live {
    margin: 0;
    background: #fff;
  }
  body.print-map-live .shell > *:not(.layout),
  body.print-map-live .modal {
    display: none !important;
  }
  body.print-map-live .layout {
    display: block !important;
    height: auto;
    overflow: visible;
  }
  body.print-map-live #landingView,
  body.print-map-live #appView > .sidebar {
    display: none !important;
  }
  body.print-map-live #appView {
    display: block !important;
    padding: 0;
    background: #fff;
  }
  body.print-map-live #mapStage {
    display: block !important;
    position: fixed;
    inset: 0;
    padding: 0;
    width: 100%;
    height: 100%;
  }
  body.print-map-live #mapStage > *:not(#map) {
    display: none !important;
  }
  body.print-map-live #map {
    width: 100% !important;
    height: 100% !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    border: none !important;
  }
  body.print-map .shell > *:not(.layout),
  body.print-map .modal,
  body.print-map #landingView,
  body.print-map #ics202Workspace,
  body.print-map #ics202PrintRoot {
    display: none !important;
  }
  body.print-map .shell {
    display: block;
    height: auto;
    overflow: visible;
  }
  body.print-map .shell .layout {
    display: block;
    overflow: visible;
  }
  body.print-map .shell #appView {
    display: block !important;
    background: #fff;
    width: auto;
    padding: 0;
  }
  body.print-map .shell #appView > *:not(#mapPrintRoot) {
    display: none !important;
  }
  body.print-map .shell #mapPrintRoot {
    position: static;
    left: auto;
    top: auto;
    width: 7.5in;
    padding: 0;
    display: block !important;
  }
  body.print-map {
    margin: 0;
    background: #fff;
  }
  body.print-ics202 .shell > *:not(#ics202Workspace) {
    display: none !important;
  }
  body.print-ics202 .shell {
    display: block;
    height: auto;
    overflow: visible;
  }
  body.print-ics202 .shell #ics202Workspace {
    position: static;
    inset: auto;
    display: block;
    background: #fff;
  }
  body.print-ics202 .shell #ics202Workspace .ics202-topbar,
  body.print-ics202 .shell #ics202Workspace .ics202-body {
    display: none !important;
  }
  body.print-ics202 .shell #ics202PrintRoot {
    position: static;
    left: auto;
    top: auto;
    width: 7.5in;
    padding: 0;
    display: block !important;
  }
  body.print-ics202 {
    margin: 0;
  }
  body.print-ics202 input,
  body.print-ics202 textarea {
    border: none;
    outline: none;
  }
  body.print-ics207 .shell > *:not(#appView),
  body.print-ics207 .modal,
  body.print-ics207 #landingView,
  body.print-ics207 #ics202Workspace,
  body.print-ics207 #commandStructureWorkspace,
  body.print-ics207 #ics202PrintRoot,
  body.print-ics207 #mapPrintRoot {
    display: none !important;
  }
  body.print-ics207 .shell,
  body.print-ics207 .shell #appView {
    display: block !important;
    height: auto;
    overflow: visible;
    background: #fff;
    padding: 0;
  }
  body.print-ics207 .shell #appView > * {
    display: none !important;
  }
  body.print-ics207 #ics207PrintRoot {
    position: static;
    left: auto;
    top: auto;
    width: 10in;
    padding: 0;
    display: block !important;
  }
  body.print-ics207 {
    margin: 0;
    background: #fff;
  }
  body.print-ics214 .shell > *:not(.layout),
  body.print-ics214 .modal,
  body.print-ics214 .shell .layout > *:not(#ics214PrintRoot) {
    display: none !important;
  }
  body.print-ics214 .shell,
  body.print-ics214 .shell .layout {
    display: block !important;
    height: auto;
    overflow: visible;
    background: #fff;
    padding: 0;
  }
  body.print-ics214 #ics214PrintRoot {
    position: static;
    left: auto;
    top: auto;
    display: block !important;
    width: 7.5in;
  }
  body.print-ics214 .ics214-print-page {
    width: 7.5in;
    min-height: auto;
    padding: 0.25in 0 0.15in;
    margin: 0;
  }
  body.print-tech-ref .shell > *:not(.layout),
  body.print-tech-ref .modal,
  body.print-tech-ref .shell .layout > *:not(#hazmatTechRefPrintRoot) {
    display: none !important;
  }
  body.print-tech-ref .shell,
  body.print-tech-ref .shell .layout {
    display: block !important;
    height: auto;
    overflow: visible;
    background: #fff;
    padding: 0;
  }
  body.print-tech-ref #hazmatTechRefPrintRoot {
    position: static;
    left: auto;
    top: auto;
    display: block !important;
    width: 7.5in;
  }
  body.print-tech-ref .tech-ref-print-page {
    width: 7.5in;
    min-height: auto;
    padding: 0;
  }
  body.print-tech-ref {
    margin: 0;
    background: #fff;
  }
}

.tech-ref-print-page {
  box-sizing: border-box;
  width: 8.5in;
  min-height: 11in;
  padding: 0.38in 0.45in 0.3in;
  background: #fff;
  color: #000;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 9.5pt;
  line-height: 1.2;
}
.tech-ref-print-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 10px;
  border-bottom: 3px solid #000;
}
.tech-ref-print-header h1 {
  margin: 0;
  font-size: 18pt;
  letter-spacing: 0;
}
.tech-ref-print-header p,
.tech-ref-print-meta {
  margin: 3px 0 0;
  color: #111;
  font-size: 8.5pt;
}
.tech-ref-print-section {
  margin-top: 9px;
  break-inside: avoid;
  page-break-inside: avoid;
}
.tech-ref-print-section h2 {
  margin: 0;
  padding: 4px 6px;
  border: 1px solid #000;
  background: #d9d9d9;
  color: #000;
  font-size: 10pt;
  text-transform: uppercase;
  letter-spacing: 0;
}
.tech-ref-print-chemicals {
  border-left: 1px solid #000;
}
.tech-ref-print-chemical {
  break-inside: avoid;
  page-break-inside: avoid;
}
.tech-ref-print-chemical + .tech-ref-print-chemical {
  margin-top: 7px;
}
.tech-ref-print-subhead {
  padding: 3px 6px;
  border-right: 1px solid #000;
  border-bottom: 1px solid #000;
  background: #f2f2f2;
  color: #000;
  font-size: 8pt;
  font-weight: 700;
  text-transform: uppercase;
}
.tech-ref-print-empty {
  min-height: 28px;
  padding: 6px;
  border-right: 1px solid #000;
  border-bottom: 1px solid #000;
  color: #000;
}
.tech-ref-print-table {
  width: 100%;
  border-collapse: collapse;
  margin: 6px 0;
  font-size: 8pt;
  color: #000;
}
.tech-ref-print-table th {
  padding: 3px 4px;
  border: 1px solid #000;
  background: #f2f2f2;
  font-weight: 700;
  text-align: left;
}
.tech-ref-print-table td {
  padding: 3px 4px;
  border: 1px solid #000;
}
.tech-ref-print-table tr:nth-child(2n) {
  background: #fafafa;
}
.tech-ref-print-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-left: 1px solid #000;
}
.tech-ref-print-chemicals .tech-ref-print-grid {
  border-left: 0;
}
.tech-ref-print-field {
  box-sizing: border-box;
  display: block;
  min-height: 38px;
  margin: 0;
  padding: 4px 6px;
  border: 0;
  border-right: 1px solid #000;
  border-bottom: 1px solid #000;
  overflow-wrap: anywhere;
}
.tech-ref-print-field.wide {
  grid-column: 1 / -1;
}
.tech-ref-print-label,
.tech-ref-print-value {
  display: block;
}
.tech-ref-print-label {
  margin-bottom: 3px;
  color: #000;
  font-size: 7.5pt;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0;
}
.tech-ref-print-value {
  min-height: 12px;
  color: #000;
  white-space: pre-wrap;
}
.tech-ref-print-textarea .tech-ref-print-value {
  min-height: 34px;
}
.tech-ref-print-check-group {
  min-width: 0;
}
.tech-ref-print-check-group .tech-ref-print-label {
  padding: 0;
}
.tech-ref-print-check-options {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  align-items: center;
}
.tech-ref-print-check-option {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #000;
  white-space: nowrap;
}
.tech-ref-print-checkbox {
  box-sizing: border-box;
  position: relative;
  display: inline-block;
  width: 10px;
  height: 10px;
  border: 1px solid #000;
  background: #fff;
  flex: 0 0 auto;
}
.tech-ref-print-checkbox.checked::after {
  content: "";
  position: absolute;
  left: 2px;
  top: 0;
  width: 4px;
  height: 7px;
  border: solid #000;
  border-width: 0 2px 2px 0;
  transform: rotate(42deg);
}
.tech-ref-print-footer {
  margin-top: 10px;
  padding-top: 6px;
  border-top: 1px solid #000;
  color: #111;
  font-size: 8pt;
  text-align: right;
}

.ics214-print-page {
  box-sizing: border-box;
  width: 8.5in;
  min-height: 11in;
  page-break-after: always;
  padding: 0.56in 0.5in 0.35in;
  margin: 0 0 8px;
  background: #fff;
  color: #000;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 9pt;
  line-height: 1.15;
}
.ics214-print-page table {
  border-collapse: collapse;
  table-layout: fixed;
  width: 100%;
}
.ics214-print-field-table td,
.ics214-print-table th,
.ics214-print-table td,
.ics214-print-prepared-table td {
  border: 1px solid #000;
}
.ics214-print-title {
  text-align: center;
  font-size: 15pt;
  font-weight: 700;
  line-height: 1;
  margin: 0 0 0.08in;
}
.ics214-print-field-table {
  margin-bottom: -1px;
}
.ics214-print-field-table td {
  height: 0.38in;
  padding: 4px 6px 3px;
  vertical-align: top;
}
.ics214-print-field-half {
  width: 50%;
}
.ics214-print-third {
  width: 33.333%;
}
.ics214-print-label {
  display: inline;
  font-weight: 700;
}
.ics214-print-normal {
  font-weight: 400;
}
.ics214-print-value {
  min-height: 0.16in;
  padding-top: 1px;
  font-size: 10pt;
}
.ics214-print-period-grid {
  display: inline-grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px 12px;
  width: calc(100% - 1.55in);
  padding-left: 8px;
  font-size: 8.5pt;
  vertical-align: top;
}
.ics214-print-section {
  border: 1px solid #000;
  margin-bottom: -1px;
  padding: 4px 0 0;
}
.ics214-print-section > .ics214-print-label {
  display: block;
  padding: 0 6px;
}
.ics214-print-resource-table,
.ics214-print-activity-table {
  margin-top: 3px;
}
.ics214-print-table th {
  height: 0.2in;
  padding: 2px 4px;
  text-align: center;
  vertical-align: middle;
  font-weight: 400;
}
.ics214-print-activity-table th {
  text-align: left;
}
.ics214-print-activity-table th.ics214-print-date-cell {
  text-align: center;
}
.ics214-print-table td {
  padding: 2px 4px;
  vertical-align: top;
}
.ics214-print-resource-table td {
  height: 0.195in;
}
.ics214-print-activity-section {
  padding-bottom: 0;
}
.ics214-print-date-cell {
  width: 1.38in;
}
.ics214-print-activity-row td {
  height: 0.23in;
}
.ics214-print-prepared-table {
  margin-bottom: 0;
}
.ics214-print-prepared-table td {
  height: 0.22in;
  padding: 3px 7px;
  vertical-align: middle;
}
.ics214-print-page-cell {
  width: 40%;
}
.ics214-print-line {
  display: inline-block;
  min-width: 1.35in;
  padding: 0 4px;
  border-bottom: 1px solid #000;
  line-height: 1.05;
}

.leaflet-popup-content-wrapper, .leaflet-popup-tip {
  background: var(--panel);
  color: var(--text);
}

.map-badge {
  min-width: 18px;
  height: 18px;
  padding: 0 6px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: #081018;
  background: var(--accent);
  border: 1px solid rgba(0,0,0,0.24);
}

.point-marker {
  position: relative;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.75);
  box-shadow: 0 4px 10px rgba(0,0,0,0.25);
}
.point-marker-focus::after {
  content: "";
  position: absolute;
  inset: -8px;
  border-radius: 999px;
  border: 2px solid color-mix(in srgb, currentColor 50%, transparent);
  opacity: 0.6;
  animation: incident-focus-pulse 1.9s ease-out infinite;
}
.point-marker-focus-triangle {
  position: relative;
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 6px 12px rgba(0,0,0,0.35));
}
.point-marker-focus-triangle::before {
  content: "";
  width: 0;
  height: 0;
  border-left: 15px solid transparent;
  border-right: 15px solid transparent;
  border-bottom: 26px solid #ff2d2d;
}
.point-marker-focus-triangle::after {
  content: "";
  position: absolute;
  inset: -8px;
  border-radius: 999px;
  border: 2px solid color-mix(in srgb, #ff2d2d 60%, transparent);
  opacity: 0.6;
  animation: incident-focus-pulse 1.9s ease-out infinite;
}
.point-marker-focus-triangle-inner {
  position: absolute;
  top: 8px;
  font-size: 13px;
  line-height: 1;
  font-weight: 900;
  color: #081018;
  text-shadow: 0 1px 0 rgba(255,255,255,0.4);
  pointer-events: none;
}
.point-marker-labeled {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-width: 2px;
}
.point-marker-labeled span {
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.02em;
  color: #081018;
  text-transform: uppercase;
}
@keyframes incident-focus-pulse {
  0% {
    transform: scale(0.84);
    opacity: 0.65;
  }
  70% {
    transform: scale(1.38);
    opacity: 0;
  }
  100% {
    transform: scale(1.38);
    opacity: 0;
  }
}
.geometry-handle {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent);
  border: 3px solid rgba(10,10,10,0.92);
  box-shadow: 0 8px 18px rgba(0,0,0,0.28);
}
.geometry-handle-rotate {
  background: #ff8f00;
  border-style: dashed;
}
body[data-theme="light"] .geometry-handle {
  border-color: rgba(243,245,248,0.96);
}
.measurement-endpoint-icon {
  background: transparent;
  border: none;
}
.measurement-endpoint-handle {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--measurement-color, var(--accent));
  border: 2px solid rgba(255,255,255,0.92);
  box-shadow: 0 6px 14px rgba(0,0,0,0.28);
}
.measurement-distance-icon {
  background: transparent;
  border: none;
  pointer-events: none;
  overflow: visible;
}
.measurement-distance-label {
  transform: translate(-50%, -130%);
  width: max-content;
  max-width: 180px;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,0.18);
  background: rgba(10,10,10,0.9);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  box-shadow: 0 6px 16px rgba(0,0,0,0.24);
  white-space: nowrap;
}
.decon-edit-metrics-label {
  transform: translate(-50%, -50%);
  width: max-content;
  max-width: 220px;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,0.18);
  background: rgba(10,10,10,0.9);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.1;
  box-shadow: 0 8px 18px rgba(0,0,0,0.3);
  pointer-events: none;
}
body[data-theme="light"] .decon-edit-metrics-label {
  background: rgba(247,249,252,0.95);
  color: #111827;
  border-color: rgba(17,24,39,0.2);
}
body[data-theme="light"] .measurement-distance-label {
  background: rgba(255,255,255,0.96);
  color: #101418;
  border-color: rgba(0,0,0,0.14);
}
.point-marker-icon {
  width: 34px;
  height: 34px;
  object-fit: contain;
  filter: drop-shadow(0 4px 10px rgba(0,0,0,0.25));
}
.icon-marker-shell {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.icon-marker-tint {
  display: inline-block;
  background: var(--icon-tint-color, #f3c613);
  filter: drop-shadow(0 4px 10px rgba(0,0,0,0.25));
  mask-image: var(--icon-mask-src);
  mask-repeat: no-repeat;
  mask-position: center;
  mask-size: contain;
  -webkit-mask-image: var(--icon-mask-src);
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-position: center;
  -webkit-mask-size: contain;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 900;
  background: rgba(15,24,34,0.96);
  border: 1px solid var(--stroke);
  border-radius: 12px;
  padding: 10px 12px;
  box-shadow: 0 12px 24px rgba(0,0,0,0.24);
}

@media (max-width: 1200px) {
  .landing {
    overflow: auto;
  }
  .landing-shell {
    height: auto;
    grid-template-columns: 1fr;
    padding-bottom: 210px;
  }
  .landing-launch-qr {
    width: min(336px, calc(100vw - 32px));
    right: calc(var(--safe-right) + 12px);
    bottom: calc(var(--safe-bottom) + 12px);
  }
  .landing-panel-commander,
  .landing-panel-join {
    display: flex;
    overflow: visible;
    padding-right: 0;
    padding-bottom: 0;
  }
  .create-session-grid,
  .join-grid,
  .department-admin-summary,
  .department-admin-grid,
  .department-resource-form,
  .department-collaboration-layout {
    grid-template-columns: 1fr;
  }
  .create-session-grid > :first-child,
  .join-grid > :first-child,
  .join-grid > :nth-child(2) {
    grid-column: auto;
  }
  .landing-session-list {
    max-height: 320px;
  }
  .app {
    grid-template-columns: 280px minmax(0, 1fr);
  }
  .app.guided-collapsed {
    grid-template-columns: 280px minmax(0, 1fr);
  }
  .sidebar.right {
    grid-column: 1 / -1;
    flex-direction: row;
    flex-wrap: wrap;
  }
  .app.right-sidebar-collapsed .sidebar.right {
    display: none;
  }
  .sidebar.right > .panel {
    flex: 1 1 320px;
  }
  .map-style-tray-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .playback-controls {
    padding: 12px;
  }
  .playback-controls-row {
    align-items: stretch;
  }
  .command-structure-summary,
  .command-structure-grid,
  .command-structure-workspace.panel-open .command-structure-grid {
    grid-template-columns: 1fr;
  }
  .command-structure-role-panel {
    position: static;
  }
}

@media (max-width: 900px) {
  .ended-session-banner {
    align-items: flex-start;
    flex-direction: column;
    gap: 2px;
  }
  .topbar {
    padding-top: calc(var(--safe-top) + 2px);
  }
  .topbar,
  .topbar-actions,
  .topbar-action-row,
  .topbar-action-row-secondary {
    align-items: stretch;
  }
  .topbar-actions {
    min-width: 0;
  }
  .status-shell {
    width: 100%;
    margin-top: 6px;
  }
  .add-to-cost-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .layout { display: block; }
  .landing-panel-header,
  .landing-card-header {
    flex-direction: column;
  }
  .trial-modal {
    padding: 12px;
    align-items: end;
  }
  #commanderAuthCard,
  #trialSignupModal {
    align-items: start;
  }
  .trial-modal-panel {
    width: 100%;
    max-height: calc(100vh - 24px);
    border-radius: 24px 24px 16px 16px;
    padding: 20px;
  }
  .trial-modal-header {
    flex-direction: column;
    margin: -20px -20px 18px;
    padding: 20px 20px 14px;
    border-radius: 24px 24px 0 0;
  }
  .trial-signup-grid,
  .trial-mode-metrics {
    grid-template-columns: 1fr;
  }
  .trial-signup-grid #trialCompanyField,
  .trial-signup-grid #trialEmailField,
  .trial-signup-grid #trialIntendedUseField,
  .trial-signup-grid #trialNotesField {
    grid-column: auto;
  }
  .trial-signup-grid .auth-field > span {
    min-height: 0;
  }
  .terms-gate-copy,
  .terms-gate-checkbox {
    padding-inline: 14px;
  }
  .app {
    display: flex;
    flex-direction: column;
    overflow: auto;
    padding: 14px calc(var(--safe-right) + 14px) calc(var(--safe-bottom) + 16px) calc(var(--safe-left) + 14px);
  }
  .landing-launch-qr {
    position: static;
    right: auto;
    bottom: auto;
    width: min(640px, calc(100vw - 32px));
    margin: 10px auto 0;
  }
  .map-launch-qr {
    inset: 0;
    width: 100vw;
    max-height: none;
    margin: 0;
    padding: 12px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .map-launch-qr-card {
    width: min(94vw, 420px);
    max-height: 88vh;
    padding: 12px;
  }
  .map-launch-qr .landing-launch-qr-title {
    font-size: 11px;
  }
  .map-launch-qr .landing-launch-qr-image {
    max-height: 56vh;
    object-fit: contain;
  }
  .map-launch-qr .landing-launch-qr-link {
    font-size: 9px;
  }
  .map-launch-qr-show {
    right: calc(var(--safe-right) + 10px);
    bottom: calc(var(--safe-bottom) + 78px);
    font-size: 11px;
    padding: 7px 10px;
    z-index: 1650;
  }
  .session-card-top {
    flex-direction: column;
    align-items: stretch;
  }
  .session-card-content {
    width: 100%;
  }
  .session-card-content strong {
    overflow-wrap: break-word;
    word-break: normal;
  }
  .session-card-actions {
    width: 100%;
    justify-content: flex-start;
    gap: 8px;
  }
  .session-card-actions button {
    flex: 1 1 140px;
  }
  .map-stage { min-height: 56vh; }
  #map { min-height: 56vh; }
  .entry-team-air-timer {
    position: fixed;
    left: 50%;
    top: calc(var(--safe-top) + 12px);
    bottom: auto;
    z-index: 1700;
    width: calc(100vw - var(--safe-left) - var(--safe-right) - 24px);
    max-width: 320px;
    justify-content: center;
    flex-wrap: wrap;
    row-gap: 8px;
    padding: 9px 12px;
    text-align: center;
  }
  .entry-team-air-timer span {
    flex: 1 1 100%;
    min-width: 0;
    font-weight: 800;
    line-height: 1.15;
    white-space: normal;
    overflow-wrap: anywhere;
  }
  .entry-team-air-timer button {
    flex: 0 1 auto;
    min-height: 32px;
    padding: 6px 10px;
  }
  .map-style-dock {
    position: fixed;
    left: calc(var(--safe-left) + 10px);
    right: calc(var(--safe-right) + 10px);
    top: auto;
    bottom: calc(var(--safe-bottom) + 10px);
    z-index: 1600;
    display: flex;
    flex-direction: row;
    align-items: stretch;
    gap: 8px;
    pointer-events: auto;
    padding: 10px;
    border-radius: 24px;
    background: color-mix(in srgb, var(--panel) 84%, transparent);
    border: 1px solid var(--separator);
    box-shadow: var(--shadow);
    backdrop-filter: blur(22px) saturate(155%);
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
  }
  .draw-controls {
    position: fixed;
    left: calc(var(--safe-left) + 12px);
    right: calc(var(--safe-right) + 12px);
    bottom: calc(var(--safe-bottom) + 142px);
    z-index: 1700;
    width: auto;
    max-width: none;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px;
  }

  .draw-controls button {
    min-height: 44px;
    flex: 1 1 128px;
  }
  .map-style-dock::-webkit-scrollbar {
    display: none;
  }
  .map-style-dock > button,
  .map-style-dock > .map-dock-tooltip {
    flex: 0 0 auto;
    width: 88px;
  }
  .map-dock-tooltip {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-width: 88px;
    position: relative;
    padding: 10px 8px 12px;
    overflow: hidden;
  }
  .map-dock-tooltip:hover,
  .map-dock-tooltip:active,
  .map-dock-tooltip:focus,
  .map-dock-tooltip:focus-visible {
    transform: none;
  }
  .map-dock-tooltip::after {
    content: none;
  }
  .map-dock-label {
    display: block;
    position: static;
    transform: none;
    opacity: 1;
    pointer-events: none;
    margin-top: 0;
    padding: 0 2px;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    line-height: 1.1;
    text-align: center;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
    width: 100%;
    max-width: 100%;
    min-height: 24px;
    transition: none;
  }
  .map-style-launcher,
  .map-layers-launcher,
  .map-forms-launcher,
  .map-weather-launcher,
  .map-media-launcher,
  .map-focus-launcher,
  .map-locate-launcher,
  .map-task-dock-btn,
  .map-fullscreen-toggle,
  .map-launch-qr-show {
    width: 88px;
    height: auto;
    min-height: 94px;
    padding: 10px 8px 12px;
    border-radius: 16px;
    font-size: 18px;
  }
  .map-fullscreen-toggle,
  .map-launch-qr-show {
    inset: auto;
    z-index: auto;
  }
  .map-task-dock-btn {
    position: relative;
  }
  .map-task-dock-count {
    top: 4px;
    right: 4px;
  }
  .map-style-dock > section {
    flex: 0 0 auto;
    width: min(300px, 82vw);
  }
  .map-weather-launcher-icon {
    width: 22px;
    height: 22px;
  }
  .map-media-launcher-icon {
    width: 22px;
    height: 22px;
  }
  .map-forms-launcher-icon {
    width: 22px;
    height: 22px;
  }
  .map-style-tray,
  .map-layers-tray {
    position: fixed !important;
    left: 50% !important;
    top: 50% !important;
    right: auto !important;
    bottom: auto !important;
    transform: translate(-50%, -50%) !important;
    width: min(92vw, 420px) !important;
    max-width: none !important;
    z-index: 1800 !important;
  }
  .weather-modal {
    padding: 12px;
    border-radius: 20px;
  }
  .weather-panel {
    width: min(100%, 480px);
    max-height: calc(100% - 12px);
  }
  .map-style-tray,
  .map-layers-tray {
    max-height: min(70dvh, 560px) !important;
    overflow: auto !important;
    padding-bottom: 14px !important;
  }
  .weather-panel.mobile-sheet-open,
  .map-style-tray.mobile-sheet-open,
  .map-layers-tray.mobile-sheet-open {
    box-shadow: var(--shadow) !important;
  }
  .map-style-tray-grid {
    grid-template-columns: 1fr;
  }
  .command-structure-topbar,
  .command-structure-card-header {
    flex-direction: column;
  }
  .command-structure-body {
    padding-inline: var(--space-4);
  }
  body { overflow: auto; }
  .shell { height: auto; min-height: 100vh; }
}

@media (max-width: 900px) and (orientation: portrait) {
  .map-style-tray,
  .map-layers-tray {
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
  }
  .map-style-tray-grid {
    padding-right: 2px;
  }
  .map-layers-list {
    max-height: min(42dvh, 380px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding-right: 2px;
  }
}

@media (max-width: 1024px) and (orientation: landscape) and (min-height: 541px) {
  .shell {
    height: 100dvh !important;
    min-height: 100dvh !important;
    overflow: hidden !important;
  }

  .layout {
    display: flex !important;
    flex-direction: column;
    flex: 1;
    min-height: 0 !important;
    overflow: hidden;
  }

  #appView.app:not(.hidden) {
    flex: 1;
    min-height: 0;
    overflow: hidden !important;
    padding: 0 !important;
    display: flex !important;
    flex-direction: column !important;
  }

  #appView .map-stage {
    flex: 1 !important;
    min-height: 0 !important;
    height: auto !important;
  }

  #appView #map {
    flex: 1 !important;
    min-height: 0 !important;
    height: 100% !important;
  }

  .map-stage,
  #map {
    min-height: 0;
  }

  .selected-map-detail-card {
    display: block;
    position: fixed;
    left: calc(var(--safe-left) + 16px);
    right: auto;
    bottom: calc(var(--safe-bottom) + 16px);
    width: min(760px, calc(100vw - 32px));
    max-width: calc(100vw - 32px);
    z-index: 2600;
  }
}

@media (orientation: landscape) and (max-width: 1024px) and (max-height: 540px) {
  .selected-map-detail-card {
    left: calc(var(--safe-left) + 12px);
    right: auto;
    bottom: calc(var(--safe-bottom) + 12px);
    width: min(760px, calc(100vw - 24px));
    max-height: min(42dvh, 170px);
    overflow-y: auto;
  }

  body.mobile-landscape-active .topbar {
    gap: 8px;
    padding: calc(var(--safe-top) + 2px) calc(var(--safe-right) + 8px) 6px calc(var(--safe-left) + 8px);
  }
  body.mobile-landscape-active .topbar h1 {
    font-size: clamp(1.35rem, 3vw, 2rem);
  }
  body.mobile-landscape-active .subtitle {
    display: none;
  }
  body.mobile-landscape-active .topbar-actions {
    gap: 4px;
    min-width: min(60%, 680px);
  }
  body.mobile-landscape-active .topbar-action-row {
    gap: 6px;
  }
  body.mobile-landscape-active .topbar .secondary,
  body.mobile-landscape-active .topbar .danger {
    min-height: 38px;
    padding: 8px 12px;
    font-size: 0.96rem;
  }
  .shell {
    height: 100dvh;
    min-height: 100dvh;
    overflow: hidden;
  }
  .app.mobile-landscape {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(250px, 34vw);
    gap: 8px;
    padding: 8px calc(var(--safe-right) + 8px) calc(var(--safe-bottom) + 8px) calc(var(--safe-left) + 8px);
    height: calc(100dvh - 78px);
    overflow: hidden;
  }
  .app.mobile-landscape.mobile-landscape-drawer-collapsed {
    grid-template-columns: minmax(0, 1fr);
  }
  .app.mobile-landscape .sidebar.left,
  .app.mobile-landscape .sidebar.right {
    display: none !important;
  }
  .app.mobile-landscape .map-stage {
    min-height: 0;
    height: 100%;
  }
  .app.mobile-landscape #map {
    min-height: 0;
    height: 100%;
    border-radius: 18px;
  }
  .app.mobile-landscape .map-style-dock {
    top: 10px;
    right: 10px;
    gap: 6px;
  }
  .app.mobile-landscape .map-style-launcher,
  .app.mobile-landscape .map-layers-launcher,
  .app.mobile-landscape .map-weather-launcher,
  .app.mobile-landscape .map-media-launcher,
  .app.mobile-landscape .map-focus-launcher,
  .app.mobile-landscape .map-locate-launcher {
    width: 42px;
    height: 42px;
    border-radius: 14px;
  }
  .app.mobile-landscape .map-style-tray,
  .app.mobile-landscape .map-layers-tray {
    width: min(220px, calc(100vw - 110px));
    max-height: min(56dvh, 250px);
    overflow: auto;
    padding: 8px;
    border-radius: 12px;
  }
  .app.mobile-landscape .weather-modal {
    padding: 8px;
  }
  .app.mobile-landscape .weather-panel {
    width: min(420px, calc(100% - 16px));
    max-height: calc(100% - 16px);
    padding: 12px;
    border-radius: 16px;
  }
  .app.mobile-landscape .map-style-tray,
  .app.mobile-landscape .map-layers-tray {
    position: fixed;
    top: 50%;
    right: 58px;
    transform: translateY(-50%);
    z-index: 1350;
  }
  .app.mobile-landscape .map-style-tray-header {
    margin-bottom: 6px;
  }
  .app.mobile-landscape .map-style-tray-grid {
    gap: 8px;
  }
  .app.mobile-landscape .map-style-close {
    width: 26px;
    height: 26px;
  }
  .app.mobile-landscape .map-style-tray-header strong {
    font-size: 0.92rem;
  }
  .app.mobile-landscape .panel {
    padding: 8px;
    border-radius: 16px;
  }
  .app.mobile-landscape .panel.compact {
    padding: 8px;
  }
  .app.mobile-landscape .mobile-landscape-drawer {
    width: auto;
    position: static;
    top: auto;
    bottom: auto;
    right: auto;
    height: 100%;
    min-height: 0;
  }
  .app.mobile-landscape.mobile-landscape-drawer-collapsed .mobile-landscape-drawer {
    display: none;
  }
  .app.mobile-landscape .map-sidebar-toggle {
    left: 50%;
    right: auto;
    top: auto;
    bottom: calc(var(--safe-bottom) + 12px);
    width: 34px;
    height: 56px;
    font-size: 20px;
    transform: translateX(-50%);
  }
  .app.mobile-landscape .map-sidebar-toggle:hover {
    transform: translateX(-50%);
  }
}

@media (orientation: landscape) and (max-height: 900px) {
  .map-style-tray,
  .map-layers-tray {
    position: fixed;
    top: 50%;
    right: 74px;
    transform: translateY(-50%);
    width: min(240px, calc(100vw - 96px));
    max-height: min(62dvh, 320px);
    padding: 8px;
    border-radius: 12px;
    overflow: auto;
    z-index: 1350;
  }
  .map-style-tray-header {
    margin-bottom: 6px;
  }
  .map-style-tray-header strong {
    font-size: 0.95rem;
  }
  .map-style-tray-grid {
    gap: 8px;
  }
  .map-style-close {
    width: 26px;
    height: 26px;
  }
  .map-layer-presets {
    gap: 6px;
    margin-bottom: 6px;
  }
  .map-layer-presets button {
    min-height: 28px;
    padding: 4px 8px;
    font-size: 11px;
    border-radius: 10px;
  }
  .map-layers-list {
    max-height: min(42dvh, 210px);
    overflow: auto;
    padding-right: 2px;
    gap: 6px;
  }
  .map-layer-row {
    gap: 8px;
    padding: 7px 8px;
    border-radius: 10px;
  }
  .map-layer-row input {
    width: 16px;
    height: 16px;
  }
  .map-layer-copy span {
    font-size: 11px;
    line-height: 1.2;
  }
}

/* === Hamburger Menu Button === */
.topbar-hamburger {
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
  font-size: 24px;
  line-height: 1;
  align-items: center;
  justify-content: center;
}

.topbar-hamburger .menu-icon,
.topbar-hamburger .menu-label {
  display: none;
}

body.mobile-mode-active .topbar-hamburger {
  display: inline-flex;
}

/* === Mobile Drawer === */
.mobile-drawer {
  position: fixed;
  top: 0;
  left: 0;
  width: min(760px, calc(100vw - 32px));
  height: 100dvh;
  background:
    radial-gradient(circle at 20% 0%, rgba(47, 109, 246, 0.08), transparent 28%),
    linear-gradient(180deg, rgba(255,255,255,0.98), rgba(246, 249, 255, 0.97));
  z-index: 4000;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.18);
  transform: translateX(-100%);
  transition: transform 0.3s ease, width 0.2s ease;
  border-right: 1px solid rgba(148, 163, 184, 0.16);
}

body.mobile-drawer-open .mobile-drawer {
  transform: translateX(0);
}

.mobile-drawer-header {
  display: flex;
  justify-content: flex-end;
  padding: calc(var(--safe-top) + 14px) 18px 10px 18px;
  border-bottom: 0;
  flex-shrink: 0;
}

.mobile-drawer-close {
  width: 72px;
  height: 72px;
  padding: 0;
  font-size: 46px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.05);
  border-color: transparent;
  color: #111111;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.9);
  align-self: flex-end;
}

.mobile-drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 6px 20px calc(var(--safe-bottom) + 18px) 20px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.mobile-drawer-intro {
  display: grid;
  gap: 10px;
  padding: 20px 18px 18px;
  margin-bottom: 2px;
  border: 1px solid rgba(203, 213, 225, 0.85);
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(250, 252, 255, 0.98), rgba(243, 247, 254, 0.98));
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.06);
}

.mobile-drawer-eyebrow {
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #2458ea;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.mobile-drawer-intro h2 {
  margin: 0;
  font-size: clamp(30px, 6.2vw, 42px);
  line-height: 0.98;
  letter-spacing: -0.06em;
  color: #101114;
  max-width: 11ch;
}

.mobile-drawer-intro p {
  margin: 0;
  color: #515865;
  font-size: 19px;
  line-height: 1.42;
  max-width: 17ch;
}

.mobile-drawer-help-text {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 6px;
  align-items: baseline;
}

.mobile-drawer-role-status {
  color: #111111;
}

.mobile-drawer-role-status strong {
  font-weight: 800;
}

.mobile-drawer-fast-actions {
  display: grid;
  gap: 8px;
}

.mobile-drawer-section {
  border: 1px solid rgba(216, 223, 234, 0.92);
  border-radius: 26px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.98), rgba(248,250,253,0.98));
  padding: 14px 14px 12px;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.92) inset,
    0 12px 26px rgba(15, 23, 42, 0.05);
}

.mobile-drawer-section-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 3px 2px 14px;
  margin-bottom: 14px;
  border-bottom: 1px solid rgba(223, 229, 238, 0.95);
}

.mobile-drawer-section.has-description .mobile-drawer-section-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.mobile-drawer-section-title {
  margin: 0;
  padding: 3px 0 2px;
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #1f3fd7;
}

.mobile-drawer-section-copy {
  grid-column: 1 / -1;
  margin: 6px 0 0;
  padding-top: 8px;
  border-top: 1px solid rgba(223, 229, 238, 0.95);
  color: #5a6475;
  font-size: 14px;
  line-height: 1.35;
}

.mobile-drawer-section-toggle {
  min-height: 34px;
  min-width: 34px;
  width: 34px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  line-height: 1;
  align-self: start;
}

.mobile-drawer-section-body {
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.mobile-drawer-section .secondary,
.mobile-drawer-section .primary,
.mobile-drawer-section .danger {
  width: 100%;
  justify-content: center;
  min-height: 58px;
  font-size: 18px;
  border-radius: 18px;
  box-shadow: none;
}

.mobile-drawer-section > .mobile-drawer-section-body > * + * {
  margin-top: 0;
}

.mobile-drawer-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 3999;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.mobile-drawer .mobile-drawer-section:nth-of-type(1) .mobile-drawer-section-title {
  color: #2f5eea;
}

.mobile-drawer .mobile-drawer-section:nth-of-type(2) .mobile-drawer-section-title {
  color: #4e9a41;
}

.mobile-drawer .mobile-drawer-section:nth-of-type(3) .mobile-drawer-section-title {
  color: #6b3fcf;
}

.mobile-drawer .mobile-drawer-section:nth-of-type(4) .mobile-drawer-section-title {
  color: #0f8a90;
}

.mobile-drawer .mobile-drawer-section:nth-of-type(5) .mobile-drawer-section-title {
  color: #2f5eea;
}

.mobile-drawer .mobile-drawer-section:nth-of-type(6) .mobile-drawer-section-title {
  color: #2157d6;
}

.mobile-drawer .primary {
  background: linear-gradient(135deg, #3f7cff, #2f63f1);
  border-color: transparent;
  color: #ffffff;
  box-shadow: 0 14px 26px rgba(47, 99, 241, 0.22);
}

.mobile-drawer .primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 30px rgba(47, 99, 241, 0.28);
}

.mobile-drawer .secondary {
  background: #ffffff;
  border-color: rgba(214, 222, 234, 0.95);
  color: #19306d;
}

.mobile-drawer .danger {
  background: #ffffff;
  border-color: rgba(214, 222, 234, 0.95);
  color: #cb4335;
}

.mobile-drawer .secondary:hover,
.mobile-drawer .danger:hover {
  background: #f7faff;
}

body.mobile-drawer-open .mobile-drawer-backdrop {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}

body.mobile-drawer-open .map-style-dock {
  pointer-events: none;
}

body.mobile-drawer-open .map-style-dock > * {
  pointer-events: none;
}

/* Belt-and-suspenders: ensure drawer is fully removed from interaction on desktop */
@media (min-width: 1025px) {
  .mobile-drawer,
  .mobile-drawer-backdrop {
    display: none !important;
  }
}

@media (min-width: 1025px) and (max-width: 1366px) and (pointer: coarse) {
  body.mobile-mode-active .topbar-hamburger {
    min-width: 72px;
    width: auto;
    height: 56px;
    padding: 8px 12px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 18px;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.16);
    color: #111827;
    font-weight: 700;
    letter-spacing: 0;
    text-shadow: none;
  }

  body.mobile-mode-active .topbar-hamburger .menu-icon,
  body.mobile-mode-active .topbar-hamburger .menu-label {
    display: block;
  }

  body.mobile-mode-active .topbar-hamburger .menu-icon {
    font-size: 22px;
    line-height: 1;
    color: #2563eb;
  }

  body.mobile-mode-active .topbar-hamburger .menu-label {
    font-size: 12px;
    line-height: 1;
    color: #111827;
  }

  body.mobile-mode-active .mobile-drawer {
    display: flex !important;
  }

  body.mobile-mode-active .mobile-drawer-backdrop {
    display: block !important;
  }
}

/* === Mobile Mode (covers iPhone portrait/landscape and small tablets) === */
@media (max-width: 1024px) {
  /* Show hamburger button on mobile */
  .topbar-hamburger {
    display: inline-flex;
  }

  /* Hide sidebars - map is the main feature */
  #appView .sidebar.left,
  #appView .sidebar.right {
    display: none !important;
  }

  /* Lock body to viewport height so map can fill it */
  body {
    overflow: hidden !important;
  }

  .shell {
    height: 100dvh !important;
    min-height: 0 !important;
    overflow: hidden !important;
    display: flex;
    flex-direction: column;
  }

  .topbar {
    flex-shrink: 0;
    padding: calc(var(--safe-top) + 8px) calc(var(--safe-right) + 8px) 8px calc(var(--safe-left) + 8px);
    gap: 8px;
  }

  .topbar h1,
  .topbar .subtitle {
    display: none;
  }

  .topbar-brand {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    width: 100%;
  }

  .topbar-copy {
    margin: 0;
  }

  .topbar .eyebrow {
    font-size: 0.72rem;
  }

  .brand-logo {
    width: min(220px, 52vw);
    max-height: 42px;
  }

  .topbar-actions {
    margin-left: 0;
    width: 100%;
    align-items: flex-end;
  }

  .topbar-action-row > .mobile-focus-action-group:not(.hidden) {
    display: flex !important;
  }

  .topbar-action-row-secondary {
    display: none !important;
  }

  .layout {
    display: flex !important;
    flex-direction: column;
    flex: 1;
    min-height: 0 !important;
    overflow: hidden;
    overscroll-behavior: none;
  }

  .topbar-hamburger {
    min-width: 72px;
    width: auto;
    height: 56px;
    padding: 8px 12px;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 18px;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.16);
    color: #111827;
    font-weight: 700;
    letter-spacing: 0;
    text-shadow: none;
  }

  .topbar-hamburger .menu-icon {
    display: block;
    font-size: 22px;
    line-height: 1;
    color: #2563eb;
  }

  .topbar-hamburger .menu-label {
    display: block;
    font-size: 12px;
    line-height: 1;
    color: #111827;
  }

  .mobile-focus-action-group {
    width: calc(100vw - (var(--safe-left) + var(--safe-right) + 32px));
    margin-left: auto;
  }
  .mobile-focus-action-group button {
    height: 42px;
    padding-inline: 12px;
    font-size: 12px;
  }

  /* Landing view still scrolls internally */
  #landingView {
    overflow-y: auto;
    overflow-x: hidden;
    flex: 1;
    min-height: 0;
  }

  /* App view: map fills the available space (only when visible) */
  #appView.app:not(.hidden) {
    flex: 1;
    min-height: 0;
    overflow: hidden !important;
    padding: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    overscroll-behavior: none;
  }

  #appView .map-stage {
    flex: 1 !important;
    min-height: 0 !important;
    height: auto !important;
    width: 100%;
    border-radius: 0;
    overscroll-behavior: none;
  }

  #appView #map {
    height: 100% !important;
    min-height: 0 !important;
    width: 100%;
    border-radius: 0;
    touch-action: none;
    overscroll-behavior: none;
  }

  #appView #map .leaflet-container,
  #appView #map .leaflet-pane,
  #appView #map .leaflet-map-pane {
    overscroll-behavior: none;
  }

  /* Hide the existing mobile-landscape tabbed drawer - we use the hamburger drawer instead */
  .mobile-landscape-drawer {
    display: none !important;
  }

  /* Hide right sidebar collapse toggle (no sidebars on mobile) */
  .map-sidebar-toggle {
    display: none !important;
  }
}

/* === Mobile Landscape: 2-column layout (buttons left 25% | map right 75%) === */
@media (max-width: 1024px) and (orientation: landscape) {
  /* Shell becomes a 2-column grid */
  .shell {
    display: grid !important;
    grid-template-columns: minmax(200px, 25%) minmax(0, 1fr);
    grid-template-rows: 100dvh;
    height: 100dvh !important;
  }

  /* Topbar becomes the left sidebar with stacked controls */
  .topbar {
    grid-column: 1;
    grid-row: 1;
    flex-direction: column !important;
    align-items: stretch !important;
    overflow-y: auto;
    padding: calc(var(--safe-top) + 8px) 8px calc(var(--safe-bottom) + 8px) calc(var(--safe-left) + 8px);
    border-right: 1px solid var(--separator);
    gap: 8px;
    height: 100dvh;
  }

  /* Compact the brand area */
  .topbar-brand {
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
  }

  .topbar .subtitle {
    display: none;
  }

  .topbar .eyebrow {
    font-size: 0.65rem;
  }

  .brand-logo {
    width: 100%;
    max-height: 44px;
  }

  .topbar h1 {
    font-size: 1.05rem;
    line-height: 1.15;
  }

  .topbar-copy {
    margin: 0;
  }

  .status-shell {
    width: 100%;
    margin: 0;
    order: 2;
  }

  /* Stack action rows vertically */
  .topbar-actions {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 6px;
    min-width: 0;
  }

  .topbar-action-row,
  .topbar-action-row-secondary {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 6px;
    flex-wrap: nowrap;
  }

  /* Each control fills the column width */
  .topbar .primary,
  .topbar .secondary,
  .topbar .danger {
    width: 100%;
    justify-content: center;
    min-height: 36px;
    padding: 6px 8px;
    font-size: 0.9rem;
  }

  /* Settings dropdown anchors inline within the left column */
  .topbar-settings {
    width: 100%;
  }

  .topbar-settings-btn {
    width: 100%;
  }

  .topbar-icon-btn {
    width: 100%;
  }

  /* Layout (and map view) takes the right column */
  .layout {
    grid-column: 2;
    grid-row: 1;
    height: 100dvh !important;
  }

  #appView.app:not(.hidden) {
    height: 100dvh;
  }

  /* Drawer slides over the whole shell when open (covers both columns) */
  .mobile-drawer {
    width: min(760px, calc(100vw - 32px));
  }
}

@media (max-width: 640px) {
  .topbar {
    padding: calc(var(--safe-top) + 6px) calc(var(--safe-right) + 8px) 8px calc(var(--safe-left) + 8px);
  }

  .topbar-brand {
    gap: 6px;
  }

  .brand-logo {
    width: min(200px, 58vw);
    max-height: 40px;
  }

  .status-shell {
    margin-top: 4px;
  }

  .status-bar,
  .status-role-pill {
    width: 100%;
    max-width: 100%;
  }

  .status-bar {
    padding: 12px 14px;
    border-radius: 18px;
    font-size: 12px;
  }

  .status-role-pill {
    padding: 10px 14px;
    border-radius: 18px;
    line-height: 1.25;
  }

  .topbar-actions {
    gap: 8px;
  }

  .topbar-action-row {
    gap: 8px;
  }

  .topbar-action-row-secondary {
    display: none !important;
  }

  .topbar-action-row > .secondary:not(.topbar-hamburger):not(.topbar-settings-btn):not(.primary) {
    display: none !important;
  }

  .topbar-hamburger {
    min-width: 76px;
    height: 54px;
    padding: 7px 11px;
    border-radius: 16px;
  }

  .landing {
    overflow-x: hidden;
  }

  .landing-shell {
    gap: 12px;
  }

  .landing-panel {
    padding-right: 0;
    padding-bottom: 0;
    gap: 12px;
  }

  .landing-panel-header,
  .landing-card-header {
    gap: 10px;
  }

  .signed-out-auth-actions {
    width: 100%;
    justify-content: stretch;
  }

  .signed-out-auth-actions button {
    flex: 1 1 50%;
  }
  .signed-out-auth-actions #videoPlaylistBtn {
    justify-content: center;
  }
  .signed-out-auth-actions #videoPlaylistBtn .video-playlist-btn-logo {
    height: clamp(24px, 6vw, 28px);
  }
  .signed-out-auth-actions #videoPlaylistBtn .video-playlist-btn-text {
    font-size: clamp(24px, 6vw, 28px);
  }

  .signed-out-welcome {
    gap: 26px;
    padding: 42px 16px 24px;
    border-radius: 20px;
  }
  .landing-language-toggle {
    width: 100%;
    justify-content: center;
  }
  .landing-language-btn {
    flex: 1 1 0;
    min-width: 0;
    padding-inline: 10px;
    font-size: 12px;
  }

  .signed-out-brand-stripe {
    width: 62vw;
  }

  .signed-out-hero h1 {
    font-size: clamp(36px, 12vw, 52px);
  }

  .signed-out-hero > p {
    margin-top: 16px;
    font-size: 16px;
  }

  .signed-out-tagline {
    margin-bottom: 22px;
  }

  .signed-out-feature-card {
    padding: 20px;
  }

  .signed-out-workflow {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3px;
    margin-top: -4px;
  }

  .signed-out-workflow .workflow-arrow {
    transform: rotate(90deg);
  }

  .landing-panel-header h2 {
    font-size: 25px;
    line-height: 1.05;
  }

  .landing-card {
    padding: 11px;
    border-radius: 20px;
  }

  .workspace-shell {
    gap: 12px;
  }

  .workspace-tabs {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    margin-bottom: 0;
    padding: 8px;
    border-radius: 20px;
  }

  .workspace-tabs .tab-button {
    width: 100%;
    justify-content: space-between;
    padding: 13px 14px;
    font-size: 14px;
    white-space: normal;
    text-align: left;
  }

  .workspace-tab-panels .landing-card {
    padding: 11px;
  }

  .workspace-tab-panels .landing-card-body {
    gap: 10px;
  }

  .landing-card-toggle {
    min-height: 44px;
    padding: 10px 12px;
    font-size: 14px;
  }

  .landing-card-toggle .toggle-symbol {
    width: 22px;
    height: 22px;
  }

  .landing-card-header-actions {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }

  .landing-card-header-actions .primary,
  .landing-card-header-actions .secondary {
    flex: 1 1 140px;
  }

  .auth-grid,
  .create-session-grid,
  .join-grid,
  .department-admin-summary,
  .department-admin-grid,
  .department-resource-form {
    grid-template-columns: 1fr;
  }

  .create-session-grid > *,
  .join-grid > *,
  .department-admin-grid > *,
  .department-resource-form > * {
    min-width: 0;
  }

  .landing-session-list {
    max-height: 260px;
  }

  .session-card-actions button {
    flex: 1 1 100%;
  }

  .auth-inline-actions {
    flex-direction: column;
    align-items: stretch;
  }

.auth-inline-actions .secondary,
.auth-inline-actions .primary {
  width: 100%;
}

.account-summary,
.landing-note,
.session-card,
  .join-card,
  .department-admin-summary,
  .create-session-card {
    min-width: 0;
  }

  .panel,
  .landing-card,
  .workspace-tabs,
  .workspace-tab-panels .landing-card {
    box-sizing: border-box;
  }
}

@media (max-width: 640px) and (orientation: portrait) {
  .shell {
    height: 100dvh !important;
  }

  .landing-shell {
    padding-bottom: calc(var(--safe-bottom) + 90px);
  }

  .landing-panel-commander {
    gap: 12px;
  }

  .landing-panel-header {
    align-items: stretch;
  }

  .workspace-header-actions {
    justify-content: stretch;
  }

  .workspace-header-actions button {
    flex: 1 1 auto;
  }

  .landing-panel-header .segmented {
    width: 100%;
  }

  .landing-panel-header .segmented button {
    flex: 1 1 50%;
  }

  .signed-out-auth-actions {
    flex-direction: column;
  }

  .signed-out-auth-actions button {
    width: 100%;
    flex-basis: auto;
  }
  .signed-out-auth-actions #videoPlaylistBtn {
    justify-content: center;
  }

  .workspace-tabs .tab-button {
    min-height: 46px;
  }

  .workspace-tab-panels .landing-card,
  .landing-card-body {
    overflow-x: hidden;
  }
}

.hazard-center-icon {
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
#centerHazardBtn .point-marker-focus-triangle {
  margin: 0;
  filter: none;
  transform: scale(0.85);
}
#centerHazardBtn .point-marker-focus-triangle-inner {
  font-size: 15px;
}
#centerHazardBtn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.mobile-drawer-section-header-hidden {
  display: none;
}
/* Directional route indicators */
.route-direction-marker {
  position: relative;
  width: 24px;
  height: 24px;
  background: transparent;
  border: 0;
}

.route-direction-chevron {
  position: absolute;
  left: 50%;
  top: 50%;
  display: block;
  width: 0;
  height: 0;
  border-top: 7px solid transparent;
  border-bottom: 7px solid transparent;
  border-left: 14px solid var(--route-color);
  border-left-color: color-mix(in srgb, var(--route-color) 90%, #ffffff 10%);
  box-sizing: border-box;
  transform: translate(-50%, -50%) rotate(var(--route-angle));
  transform-origin: center center;
  opacity: 0.98;
  filter:
    drop-shadow(0 0 1px rgba(255, 255, 255, 0.9))
    drop-shadow(0 0 1px rgba(0, 0, 0, 0.75));
}

.route-direction-chevron.is-animated {
  animation: route-direction-pulse 1.4s ease-in-out infinite;
  animation-delay: var(--route-delay, 0s);
}

@keyframes route-direction-pulse {
  0% { opacity: 0.5; transform: translate(-50%, -50%) rotate(var(--route-angle)) scale(0.92); }
  50% { opacity: 0.98; transform: translate(-50%, -50%) rotate(var(--route-angle)) scale(1.02); }
  100% { opacity: 0.5; transform: translate(-50%, -50%) rotate(var(--route-angle)) scale(0.92); }
}

@media (prefers-reduced-motion: reduce) {
  .route-direction-chevron.is-animated {
    animation: none;
  }
}

/* Geometry-based route arrows (Access/Exit only) */
.route-direction-geometry-arrow {
  stroke-linecap: round;
  stroke-linejoin: round;
  transform-box: fill-box;
  transform-origin: center center;
  stroke-opacity: 0.95;
  opacity: 0.95;
  animation: route-direction-geometry-pulse 1.9s ease-out infinite;
}

.route-direction-geometry-arrow-0 { animation-delay: 0s; }
.route-direction-geometry-arrow-1 { animation-delay: 0.28s; }
.route-direction-geometry-arrow-2 { animation-delay: 0.56s; }
.route-direction-geometry-arrow-3 { animation-delay: 0.84s; }
.route-direction-geometry-arrow-seg-0 { animation-duration: 1.75s; }
.route-direction-geometry-arrow-seg-1 { animation-duration: 1.9s; }
.route-direction-geometry-arrow-seg-2 { animation-duration: 2.05s; }

@keyframes route-direction-geometry-pulse {
  0% {
    transform: scale(0.84);
    stroke-opacity: 0.65;
    opacity: 0.65;
  }
  70% {
    transform: scale(1.38);
    stroke-opacity: 0;
    opacity: 0;
  }
  100% {
    transform: scale(1.38);
    stroke-opacity: 0;
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .route-direction-geometry-arrow {
    animation: none;
    stroke-opacity: 0.95;
  }
}

.directional-route-dashflow-line {
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dashoffset: 0;
  animation: directional-route-dashflow-forward 1.05s linear infinite;
  filter:
    drop-shadow(0 0 1px rgba(255, 255, 255, 0.9))
    drop-shadow(0 0 2px rgba(0, 0, 0, 0.45));
}

.directional-route-dashflow-line-forward {
  animation-name: directional-route-dashflow-forward;
}

.directional-route-dashflow-line-reverse {
  animation-name: directional-route-dashflow-reverse;
}

@keyframes directional-route-dashflow-forward {
  to {
    stroke-dashoffset: -34px;
  }
}

@keyframes directional-route-dashflow-reverse {
  to {
    stroke-dashoffset: 34px;
  }
}

.attention-needed-spotlight {
  pointer-events: none;
}

.attention-needed-fill {
  animation: attention-needed-fill-pulse 1.8s ease-in-out infinite;
  filter:
    drop-shadow(0 0 3px rgba(255, 193, 7, 0.9))
    drop-shadow(0 0 8px rgba(255, 193, 7, 0.55));
}

.attention-needed-perimeter {
  pointer-events: none;
  stroke-dashoffset: 0;
  animation: attention-needed-perimeter-flow 1.15s linear infinite;
  filter:
    drop-shadow(0 0 2px rgba(255, 255, 255, 0.95))
    drop-shadow(0 0 6px rgba(255, 193, 7, 0.9));
}

/* Damming and Diking lines should read as active water-control work. */
.damming-diking-base {
  pointer-events: none;
}

.damming-diking-glow {
  pointer-events: none;
  animation: damming-diking-glow 1.35s ease-in-out infinite;
  stroke-dasharray: 10 12;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter:
    drop-shadow(0 0 2px rgba(255, 255, 255, 0.88))
    drop-shadow(0 0 7px rgba(255, 31, 31, 0.9))
    drop-shadow(0 0 16px rgba(255, 31, 31, 0.42));
}

@keyframes attention-needed-fill-pulse {
  0%, 100% {
    fill-opacity: 0.14;
    stroke-opacity: 0.78;
  }
  50% {
    fill-opacity: 0.34;
    stroke-opacity: 1;
  }
}

@keyframes attention-needed-perimeter-flow {
  to {
    stroke-dashoffset: -48;
  }
}

@keyframes damming-diking-glow {
  0%, 100% {
    opacity: 0.58;
    stroke-dashoffset: 0;
    stroke-width: 8px;
  }
  50% {
    opacity: 1;
    stroke-dashoffset: -44;
    stroke-width: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .directional-route-dashflow-line,
  .attention-needed-spotlight {
    animation: none;
  }

  .attention-needed-fill,
  .attention-needed-perimeter {
    animation: none;
  }

  .attention-needed-spotlight {
    fill-opacity: 0.22;
  }

  .damming-diking-glow {
    animation: none;
    opacity: 0.96;
  }

  .attention-needed-fill {
    fill-opacity: 0.24;
    stroke-opacity: 1;
  }
}
.crosshair-target-icon {
  filter:
    drop-shadow(1px 0 0 rgba(0, 0, 0, 0.95))
    drop-shadow(-1px 0 0 rgba(0, 0, 0, 0.95))
    drop-shadow(0 1px 0 rgba(0, 0, 0, 0.95))
    drop-shadow(0 -1px 0 rgba(0, 0, 0, 0.95));
}

.password-toggle,
.password-toggle:hover,
.password-toggle:focus,
.password-toggle:active {
  transform: translateY(-50%) !important;
}

/* Dark mode hardening: keep app surfaces opaque and text readable. */
body:not([data-theme="light"]) {
  background:
    radial-gradient(circle at top left, rgba(110, 162, 255, 0.12), transparent 32%),
    linear-gradient(180deg, var(--bg-elevated) 0%, var(--bg) 100%);
  color: var(--text);
}

body:not([data-theme="light"]) .topbar,
body:not([data-theme="light"]) .status-bar,
body:not([data-theme="light"]) .status-role-pill,
body:not([data-theme="light"]) .topbar-settings-dropdown,
body:not([data-theme="light"]) .panel,
body:not([data-theme="light"]) .workspace-tab-panels .landing-card,
body:not([data-theme="light"]) .ics202-card,
body:not([data-theme="light"]) .super-admin-standing-target-list,
body:not([data-theme="light"]) .map-style-card,
body:not([data-theme="light"]) .map-layer-row,
body:not([data-theme="light"]) .mobile-landscape-drawer,
body:not([data-theme="light"]) .guide-popup,
body:not([data-theme="light"]) .weather-panel,
body:not([data-theme="light"]) .task-drawer,
body:not([data-theme="light"]) .session-checklist-drawer,
body:not([data-theme="light"]) .map-style-tray,
body:not([data-theme="light"]) .tool-palette,
body:not([data-theme="light"]) .object-editor,
body:not([data-theme="light"]) .modal-card,
body:not([data-theme="light"]) .trial-modal-panel {
  background: var(--panel);
  color: var(--text);
  border-color: var(--separator);
  box-shadow: var(--shadow);
}

body:not([data-theme="light"]) .modal {
  background: rgba(2, 6, 13, 0.72);
  backdrop-filter: blur(8px) saturate(120%);
  -webkit-backdrop-filter: blur(8px) saturate(120%);
}

body:not([data-theme="light"]) .trial-modal-backdrop,
body:not([data-theme="light"]) .mobile-drawer-backdrop {
  background: rgba(2, 6, 13, 0.74);
}

body:not([data-theme="light"]) .modal-card,
body:not([data-theme="light"]) .trial-modal-panel {
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

body:not([data-theme="light"]) .modal-header,
body:not([data-theme="light"]) .trial-modal-header,
body:not([data-theme="light"]) .modal-card h2,
body:not([data-theme="light"]) .modal-card h3,
body:not([data-theme="light"]) .trial-modal-panel h2,
body:not([data-theme="light"]) .trial-modal-panel h3,
body:not([data-theme="light"]) .panel h2,
body:not([data-theme="light"]) .panel h3,
body:not([data-theme="light"]) .landing-card-toggle,
body:not([data-theme="light"]) .workspace-tabs .tab-button,
body:not([data-theme="light"]) .field-block strong,
body:not([data-theme="light"]) .super-admin-session-detail-value {
  color: var(--text);
}

body:not([data-theme="light"]) input,
body:not([data-theme="light"]) select,
body:not([data-theme="light"]) textarea,
body:not([data-theme="light"]) .trial-access-code-field input,
body:not([data-theme="light"]) .segmented-control label,
body:not([data-theme="light"]) .entry-team-ppe-options label,
body:not([data-theme="light"]) .task-complete-summary {
  background: var(--panel-alt);
  color: var(--text);
  border-color: var(--border-strong);
}

body:not([data-theme="light"]) input:-webkit-autofill,
body:not([data-theme="light"]) input:-webkit-autofill:hover,
body:not([data-theme="light"]) input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--text);
  box-shadow: 0 0 0 1000px var(--panel-alt) inset;
  caret-color: var(--text);
}

body:not([data-theme="light"]) button.secondary,
body:not([data-theme="light"]) .map-layer-presets button,
body:not([data-theme="light"]) .map-style-close,
body:not([data-theme="light"]) .mobile-landscape-tab,
body:not([data-theme="light"]) .mobile-landscape-drawer-toggle,
body:not([data-theme="light"]) .workspace-tabs .tab-button {
  background: var(--panel-alt);
  color: var(--text);
  border-color: var(--border-strong);
}

body:not([data-theme="light"]) button.secondary:hover,
body:not([data-theme="light"]) .workspace-tabs .tab-button.active,
body:not([data-theme="light"]) .workspace-tabs .tab-button[aria-selected="true"],
body:not([data-theme="light"]) .mobile-landscape-tab.is-active {
  background: color-mix(in srgb, var(--accent) 22%, var(--panel-alt) 78%);
  color: #ffffff;
  border-color: color-mix(in srgb, var(--accent) 54%, var(--border-strong) 46%);
}

body:not([data-theme="light"]) .mobile-drawer {
  background: var(--panel);
  color: var(--text);
  border-right-color: var(--separator);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.46);
}

body:not([data-theme="light"]) .mobile-drawer-intro,
body:not([data-theme="light"]) .mobile-drawer-section {
  background: var(--panel-alt);
  color: var(--text);
  border-color: var(--border-strong);
  box-shadow: none;
}

body:not([data-theme="light"]) .mobile-drawer-close,
body:not([data-theme="light"]) .mobile-drawer .secondary,
body:not([data-theme="light"]) .mobile-drawer .danger {
  background: var(--panel);
  color: var(--text);
  border-color: var(--border-strong);
  box-shadow: none;
}

body:not([data-theme="light"]) .mobile-drawer-intro h2,
body:not([data-theme="light"]) .mobile-drawer-intro p,
body:not([data-theme="light"]) .mobile-drawer-role-status,
body:not([data-theme="light"]) .mobile-drawer-section-copy,
body:not([data-theme="light"]) .mobile-drawer-section-title {
  color: var(--text);
}

body:not([data-theme="light"]) .leaflet-popup-content-wrapper,
body:not([data-theme="light"]) .leaflet-popup-tip {
  background: var(--panel);
  color: var(--text);
  border: 1px solid var(--separator);
  box-shadow: var(--shadow);
}

body:not([data-theme="light"]) .leaflet-container,
body:not([data-theme="light"]) .leaflet-control,
body:not([data-theme="light"]) .leaflet-control a {
  color: var(--text);
}

body:not([data-theme="light"]) .leaflet-control,
body:not([data-theme="light"]) .leaflet-control-layers,
body:not([data-theme="light"]) .leaflet-bar a {
  background: var(--panel);
  border-color: var(--separator);
}

body:not([data-theme="light"]) .signed-out-welcome {
  --haven-ink: var(--text);
  background:
    radial-gradient(circle at 10% 10%, rgba(110, 162, 255, 0.18), transparent 28%),
    radial-gradient(circle at 90% 20%, rgba(255, 111, 111, 0.12), transparent 24%),
    radial-gradient(circle at 78% 90%, rgba(242, 195, 0, 0.14), transparent 24%),
    linear-gradient(180deg, var(--panel), var(--bg-elevated));
  border-color: var(--separator);
  box-shadow: var(--shadow);
}

body:not([data-theme="light"]) .landing-language-label,
body:not([data-theme="light"]) .signed-out-hero > p,
body:not([data-theme="light"]) .signed-out-workflow,
body:not([data-theme="light"]) .signed-out-feature-card p {
  color: var(--muted);
}

body:not([data-theme="light"]) .signed-out-eyebrow,
body:not([data-theme="light"]) .signed-out-tagline,
body:not([data-theme="light"]) .video-playlist-btn-text {
  color: var(--accent);
}

body:not([data-theme="light"]) .landing-language-toggle,
body:not([data-theme="light"]) .signed-out-feature-card,
body:not([data-theme="light"]) .trial-success-banner {
  background: var(--panel-alt);
  color: var(--text);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-soft);
}

body:not([data-theme="light"]) .landing-language-btn {
  color: var(--muted);
}

body:not([data-theme="light"]) .landing-language-btn:hover,
body:not([data-theme="light"]) .landing-language-btn:focus-visible {
  background: color-mix(in srgb, var(--accent) 18%, var(--panel) 82%);
  color: #ffffff;
}

body:not([data-theme="light"]) .landing-language-btn.is-active {
  background: var(--accent);
  color: #081018;
}

body:not([data-theme="light"]) .signed-out-hero h1,
body:not([data-theme="light"]) .signed-out-feature-card h2,
body:not([data-theme="light"]) .trial-success-banner-title,
body:not([data-theme="light"]) .trial-success-banner-actions strong {
  color: var(--text);
}

body:not([data-theme="light"]) .signed-out-tagline {
  background: color-mix(in srgb, var(--accent) 14%, var(--panel-alt) 86%);
  border-color: color-mix(in srgb, var(--accent) 36%, var(--border-strong) 64%);
}

body:not([data-theme="light"]) .signed-out-feature-icon {
  background: color-mix(in srgb, currentColor 18%, var(--panel) 82%);
}

body:not([data-theme="light"]) .mobile-drawer .mobile-drawer-section-title {
  color: var(--text);
}

body:not([data-theme="light"]) .mobile-drawer .mobile-drawer-section:nth-of-type(n) .mobile-drawer-section-title {
  color: var(--text);
}
