:root {
  color-scheme: dark;
  --bg: #07100f;
  --panel: #0c1715;
  --panel-strong: #101f1c;
  --line: rgba(186, 225, 211, 0.12);
  --muted: #8ca39b;
  --text: #eef7f4;
  --green: #4de5a8;
  --amber: #f5b852;
  --red: #ff4d58;
  --red-dark: #7f1820;
  --blue: #69a8ff;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 40% -20%, rgba(42, 112, 88, 0.23), transparent 38%),
    var(--bg);
}

button, select { font: inherit; }
button { color: inherit; }

.auth-gate {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(360px, 1.08fr) minmax(420px, .92fr);
  background: #07100f;
}

.auth-visual {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 42px clamp(34px, 6vw, 88px);
  overflow: hidden;
  border-right: 1px solid var(--line);
  background:
    linear-gradient(120deg, rgba(7,16,15,.55), rgba(7,16,15,.92)),
    repeating-linear-gradient(42deg, transparent 0 68px, rgba(77,229,168,.035) 69px 70px),
    radial-gradient(circle at 68% 35%, rgba(77,229,168,.18), transparent 32%),
    #0b1916;
}

.auth-visual::after {
  content: "";
  position: absolute;
  width: min(48vw, 620px);
  aspect-ratio: 1;
  right: -21%;
  top: 12%;
  border: 1px solid rgba(77,229,168,.12);
  border-radius: 50%;
  box-shadow: 0 0 0 70px rgba(77,229,168,.025), 0 0 0 140px rgba(77,229,168,.018);
}

.auth-brand, .auth-promise, .auth-disclaimer { position: relative; z-index: 1; }
.auth-promise { max-width: 620px; margin: auto 0; padding: 64px 0; }
.auth-promise h1 { max-width: 610px; margin: 0 0 19px; font-size: clamp(38px, 4.7vw, 68px); line-height: .99; letter-spacing: -.045em; }
.auth-promise p { max-width: 520px; font-size: 15px; }
.auth-promise ul { display: grid; gap: 13px; margin: 30px 0 0; padding: 0; list-style: none; }
.auth-promise li { display: flex; align-items: center; gap: 13px; color: #c9d9d3; font-size: 12px; }
.auth-promise li i { width: 28px; height: 28px; display: grid; place-items: center; border: 1px solid rgba(77,229,168,.24); border-radius: 50%; color: var(--green); font: 800 8px/1 ui-monospace, monospace; }
.auth-disclaimer { max-width: 540px; color: #70877f; font-size: 9px; line-height: 1.5; }

.auth-card-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 34px;
  background: radial-gradient(circle at 50% 20%, rgba(42,112,88,.14), transparent 40%);
}

.auth-card {
  width: min(100%, 430px);
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(12,23,21,.86);
  box-shadow: 0 28px 90px rgba(0,0,0,.26);
}

.auth-card > p { margin-bottom: 22px; font-size: 12px; }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin-bottom: 22px; padding: 4px; border-radius: 10px; background: rgba(255,255,255,.035); }
.auth-tabs button { min-height: 38px; border: 0; border-radius: 7px; cursor: pointer; color: var(--muted); background: transparent; font-size: 10px; font-weight: 900; }
.auth-tabs button.active { color: var(--text); background: #182a26; box-shadow: 0 3px 12px rgba(0,0,0,.2); }
.auth-form { display: grid; gap: 14px; }
.auth-form label { display: grid; gap: 6px; color: #b3c6bf; font-size: 10px; font-weight: 800; }
.auth-form input:not([type="checkbox"]) { width: 100%; height: 45px; padding: 0 12px; outline: 0; border: 1px solid var(--line); border-radius: 9px; color: var(--text); background: #091311; }
.password-field { position: relative; display: block; }
.password-field input { padding-right: 45px !important; }
.password-field button { position: absolute; top: 50%; right: 5px; width: 36px; height: 36px; padding: 0; border: 0; border-radius: 7px; transform: translateY(-50%); cursor: pointer; color: var(--muted); background: transparent; font-size: 16px; }
.password-field button:hover { color: var(--green); background: rgba(77,229,168,.07); }
.auth-form input:focus { border-color: rgba(77,229,168,.65); box-shadow: 0 0 0 3px rgba(77,229,168,.08); }
.terms-check { grid-template-columns: 18px 1fr; align-items: start; font-weight: 500 !important; line-height: 1.45; }
.terms-check input { margin: 2px 0 0; accent-color: var(--green); }
.auth-primary { width: 100%; min-height: 46px; margin-top: 4px; border: 0; border-radius: 9px; cursor: pointer; color: #03110c; background: var(--green); font-size: 10px; font-weight: 950; letter-spacing: .045em; box-shadow: 0 8px 22px rgba(77,229,168,.13); }
.auth-primary:hover { filter: brightness(1.06); }
.auth-primary:disabled { opacity: .55; cursor: wait; }
.form-error { min-height: 17px; margin-top: 10px; color: #ff8990; font-size: 10px; line-height: 1.4; }
.simulation-hint { display: block; color: #6e8880; font: 9px/1.5 ui-monospace, monospace; }

.billing-card { text-align: center; }
.billing-icon { width: 48px; height: 48px; display: grid; place-items: center; margin: 0 auto 18px; border: 1px solid rgba(77,229,168,.25); border-radius: 50%; color: var(--green); background: rgba(77,229,168,.08); font-weight: 900; }
.price-block { display: grid; gap: 4px; margin: 22px 0; padding: 19px; border: 1px solid rgba(77,229,168,.18); border-radius: 12px; background: rgba(77,229,168,.045); }
.price-block small { color: var(--green); font-size: 8px; font-weight: 900; letter-spacing: .1em; }
.price-block strong { font-size: 26px; }
.price-block span { color: var(--muted); font-size: 9px; }
.billing-features { display: grid; gap: 9px; margin: 0 0 22px; padding: 0; list-style: none; text-align: left; color: #b8cac4; font-size: 10px; }
.billing-features li::before { content: "✓"; margin-right: 9px; color: var(--green); font-weight: 900; }
.text-button { display: block; margin: 12px auto 0; padding: 2px; border: 0; cursor: pointer; color: var(--muted); background: none; font-size: 9px; text-decoration: underline; text-underline-offset: 3px; }
.forgot-button { margin-top: 0; }
.reset-eyebrow { margin-top: 30px; }
.reset-login-link { width: max-content; }

.account-control { display: flex; align-items: center; gap: 9px; padding-left: 13px; border-left: 1px solid var(--line); }
.account-control span { font-size: 10px; font-weight: 900; letter-spacing: .06em; }
.account-control button { padding: 7px 9px; border: 1px solid var(--line); border-radius: 7px; cursor: pointer; color: var(--muted); background: rgba(255,255,255,.025); font-size: 9px; }

.simulation-strip {
  height: 27px;
  display: grid;
  place-items: center;
  color: #271b00;
  background: repeating-linear-gradient(135deg, #f7c453 0 12px, #e9ad2e 12px 24px);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.18em;
}

.topbar {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 12px 22px;
  border-bottom: 1px solid var(--line);
  background: rgba(7, 16, 15, 0.9);
  backdrop-filter: blur(16px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  width: 39px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border: 1px solid rgba(77, 229, 168, 0.45);
  border-radius: 11px;
  color: var(--green);
  background: rgba(77, 229, 168, 0.08);
  font: 800 20px/1 Georgia, serif;
}

.brand strong, .brand small { display: block; }
.brand strong { font-size: 13px; letter-spacing: 0.08em; }
.brand small { margin-top: 2px; color: var(--muted); font-size: 11px; }

.topbar-actions { display: flex; align-items: center; gap: 18px; }
.group-switcher { display: flex; align-items: center; gap: 7px; }
.group-switcher label { color: var(--muted); font-size: 9px; font-weight: 800; text-transform: uppercase; }
.group-switcher select { max-width: 190px; }
.group-switcher button { padding: 7px 9px; border: 1px solid var(--line); border-radius: 7px; cursor: pointer; color: var(--muted); background: rgba(255,255,255,.025); font-size: 9px; }

.group-onboarding { min-height: calc(100vh - 99px); display: grid; place-items: center; padding: 25px; }
.group-onboarding-card { width: min(100%, 520px); padding: 28px; border: 1px solid var(--line); border-radius: 16px; background: var(--panel); box-shadow: 0 24px 70px rgba(0,0,0,.3); }
.group-onboarding-card h1 { margin-bottom: 8px; font-size: 28px; }
.inline-form { display: flex; align-items: stretch; gap: 8px; }
.inline-form input { flex: 1; min-width: 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; outline: 0; color: var(--text); background: #091311; }
.inline-form .auth-primary { width: auto; min-width: 150px; margin: 0; }
.or-divider { display: flex; align-items: center; gap: 12px; margin: 18px 0; color: var(--muted); font-size: 9px; text-transform: uppercase; }
.or-divider::before, .or-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.connection {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
}

.connection i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 10px currentColor;
}

.connection.online i { background: var(--green); }
.connection.offline i { background: var(--red); }

.identity-control span {
  display: block;
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

select {
  min-width: 132px;
  padding: 7px 28px 7px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  background: var(--panel-strong);
}

.shell {
  min-height: calc(100vh - 99px);
  display: grid;
  grid-template-columns: 286px minmax(390px, 1fr) 326px;
}

.panel { background: rgba(12, 23, 21, 0.86); }
.team-panel { border-right: 1px solid var(--line); }
.action-panel { border-left: 1px solid var(--line); padding: 22px; }
.team-panel { padding: 22px 18px; }

.panel-heading, .readiness-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.eyebrow {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.13em;
}

h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 0; font-size: 22px; }
h2 { margin-bottom: 8px; font-size: 21px; }
p { color: var(--muted); line-height: 1.5; }

.status-pill, .time-chip {
  padding: 6px 9px;
  border: 1px solid rgba(77, 229, 168, 0.25);
  border-radius: 999px;
  color: var(--green);
  background: rgba(77, 229, 168, 0.07);
  font-size: 10px;
  font-weight: 800;
}

.session-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 19px 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.025);
}

.session-card small, .session-card strong { display: block; }
.session-card small { margin-bottom: 3px; color: var(--muted); font-size: 10px; }
.session-card strong { font-size: 12px; }

.button, .icon-button, .incident-actions button {
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.04);
}

.button { padding: 8px 10px; font-size: 10px; font-weight: 800; }
.button:hover, .icon-button:hover, .incident-actions button:hover { border-color: rgba(77, 229, 168, 0.45); }

.member-list { display: grid; gap: 7px; }

.member {
  display: grid;
  grid-template-columns: 34px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid transparent;
  border-radius: 11px;
}

.member.current { border-color: var(--line); background: rgba(255, 255, 255, 0.025); }
.member-avatar { position: relative; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 9px; background: #152824; font-size: 11px; font-weight: 900; }
.member-avatar::after { content: ""; position: absolute; right: -2px; bottom: -2px; width: 8px; height: 8px; border: 2px solid var(--panel); border-radius: 50%; background: var(--green); }
.member.offline { opacity: 0.48; }
.member.offline .member-avatar::after { background: var(--muted); }
.member-copy strong, .member-copy small { display: block; }
.member-copy strong { font-size: 11px; letter-spacing: 0.04em; }
.member-copy small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.member-meta { text-align: right; color: var(--muted); font-size: 9px; }
.member-meta strong { display: block; margin-bottom: 3px; color: var(--text); font-size: 10px; }

.map-section { position: relative; min-width: 0; display: flex; flex-direction: column; }
.map-toolbar { min-height: 66px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 13px 19px; border-bottom: 1px solid var(--line); }
.map-toolbar strong { font-size: 13px; }
.map-actions { display: flex; align-items: center; gap: 9px; }
.icon-button { width: 34px; height: 34px; color: var(--green); font-size: 19px; }

.map {
  position: relative;
  flex: 1;
  min-height: 540px;
  overflow: hidden;
  background:
    linear-gradient(25deg, transparent 48%, rgba(126, 168, 153, 0.06) 49%, rgba(126, 168, 153, 0.06) 51%, transparent 52%),
    linear-gradient(115deg, transparent 48%, rgba(126, 168, 153, 0.06) 49%, rgba(126, 168, 153, 0.06) 51%, transparent 52%),
    #091513;
  background-size: 150px 190px, 190px 130px;
}

.map::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(circle, transparent 30%, rgba(5, 12, 11, 0.52) 100%); }
.map-grid { position: absolute; inset: 0; opacity: 0.18; background-image: linear-gradient(rgba(120, 164, 148, .2) 1px, transparent 1px), linear-gradient(90deg, rgba(120, 164, 148, .2) 1px, transparent 1px); background-size: 32px 32px; }
.map-rings { position: absolute; left: 50%; top: 49%; width: 390px; height: 390px; transform: translate(-50%, -50%); border: 1px solid rgba(77, 229, 168, 0.06); border-radius: 50%; box-shadow: 0 0 0 90px rgba(77, 229, 168, 0.025), 0 0 0 180px rgba(77, 229, 168, 0.016); }
.street { position: absolute; z-index: 1; color: rgba(170, 198, 188, 0.25); font-size: 8px; letter-spacing: .15em; }
.street-a { top: 24%; left: 10%; transform: rotate(25deg); }
.street-b { right: 13%; bottom: 24%; transform: rotate(-33deg); }
.street-c { top: 15%; right: 24%; transform: rotate(77deg); }

.map-marker { position: absolute; z-index: 3; transform: translate(-50%, -50%); transition: left .5s ease, top .5s ease; }
.marker-pin { width: 34px; height: 34px; display: grid; place-items: center; border: 2px solid #10251f; border-radius: 50% 50% 50% 5px; transform: rotate(-45deg); color: #04120d; background: var(--green); box-shadow: 0 0 0 5px rgba(77, 229, 168, 0.12), 0 7px 20px rgba(0,0,0,.35); }
.marker-pin b { transform: rotate(45deg); font-size: 9px; }
.map-marker.emergency .marker-pin { background: var(--red); box-shadow: 0 0 0 7px rgba(255, 77, 88, 0.15), 0 0 32px rgba(255, 77, 88, 0.5); animation: pulse 1.2s infinite; }
.map-marker.en_route .marker-pin { background: var(--amber); }
.marker-label { position: absolute; left: 50%; top: 42px; transform: translateX(-50%); padding: 4px 7px; border: 1px solid var(--line); border-radius: 5px; white-space: nowrap; color: var(--text); background: rgba(7, 16, 15, .9); font-size: 8px; font-weight: 800; }

@keyframes pulse { 50% { box-shadow: 0 0 0 15px rgba(255, 77, 88, 0), 0 0 44px rgba(255, 77, 88, .72); } }

.map-legend { position: absolute; z-index: 4; left: 18px; bottom: 17px; display: flex; flex-wrap: wrap; gap: 13px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; color: var(--muted); background: rgba(7, 16, 15, .86); font-size: 8px; }
.map-legend span { display: flex; align-items: center; gap: 5px; }
.legend-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--green); }
.legend-dot.en-route { background: var(--amber); }
.legend-dot.emergency { background: var(--red); }

.desktop-sos { text-align: center; }
.desktop-sos p { margin-bottom: 20px; font-size: 12px; }

.sos-button {
  position: relative;
  width: 166px;
  aspect-ratio: 1;
  overflow: hidden;
  border: 12px solid #182320;
  border-radius: 50%;
  cursor: pointer;
  color: white;
  background: linear-gradient(145deg, #ff5964, #a91621);
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.16), 0 10px 32px rgba(0,0,0,.32), 0 0 0 1px rgba(255,77,88,.25);
  user-select: none;
  touch-action: none;
}

.sos-button:active { transform: scale(.98); }
.sos-progress { position: absolute; inset: 0; transform: translateY(100%); background: rgba(72, 0, 5, .55); }
.sos-button.holding .sos-progress { transform: translateY(0); transition: transform 1.5s linear; }
.sos-content { position: relative; z-index: 1; display: grid; gap: 5px; }
.sos-content b { font-size: 34px; letter-spacing: .08em; }
.sos-content small { font-size: 9px; font-weight: 800; }
.sos-note { display: block; margin-top: 16px; color: var(--muted); font-size: 9px; line-height: 1.5; }

.incident-panel:not(:empty) { margin-bottom: 18px; }
.incident-card { position: relative; overflow: hidden; padding: 17px; border: 1px solid rgba(255, 77, 88, .42); border-radius: 14px; background: linear-gradient(145deg, rgba(127, 24, 32, .31), rgba(23, 16, 16, .5)); }
.incident-card::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 3px; background: var(--red); }
.incident-alert { display: flex; align-items: center; justify-content: space-between; color: var(--red); font-size: 10px; font-weight: 900; letter-spacing: .09em; }
.incident-card h2 { margin: 13px 0 4px; }
.incident-role-copy { margin: 7px 0 0; color: var(--muted); font-size: 10px; line-height: 1.5; }
.incident-location { color: var(--muted); font: 10px/1.5 ui-monospace, SFMono-Regular, Consolas, monospace; }
.response-list { display: grid; gap: 6px; margin: 14px 0; }
.response-item { display: flex; justify-content: space-between; padding: 7px 8px; border-radius: 7px; background: rgba(255,255,255,.035); font-size: 9px; }
.response-item span:last-child { color: var(--amber); font-weight: 800; }
.incident-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.incident-actions button, .route-link { min-height: 38px; padding: 8px; font-size: 9px; font-weight: 900; text-decoration: none; }
.incident-actions .primary { border-color: rgba(245,184,82,.4); color: #231800; background: var(--amber); }
.route-link { display: grid; place-items: center; grid-column: span 2; border-radius: 8px; color: #04120d; background: var(--green); }
.resolve-button { grid-column: span 2; }
.requester-actions { grid-template-columns: 1fr; }
.requester-actions .resolve-button { grid-column: auto; min-height: 44px; border-color: rgba(255,77,88,.55); color: #fff; background: rgba(145,28,36,.5); }

.readiness-card { margin-top: 25px; padding-top: 19px; border-top: 1px solid var(--line); }
.score { color: var(--green); font-size: 11px; font-weight: 900; }
.check-list { display: grid; gap: 10px; margin: 12px 0 0; padding: 0; list-style: none; color: var(--muted); font-size: 10px; }
.check-list li { display: flex; align-items: center; gap: 8px; }
.check-list i { width: 18px; height: 18px; display: grid; place-items: center; border-radius: 50%; color: var(--amber); background: rgba(245,184,82,.1); font-style: normal; font-weight: 900; }
.check-list .ok i { color: var(--green); background: rgba(77,229,168,.1); }
.alert-permission-check { flex-wrap: wrap; }
.alert-permission-check span { flex: 1; min-width: 150px; }
.alert-permission-check button { margin-left: 26px; padding: 6px 9px; border: 1px solid rgba(245,184,82,.35); border-radius: 6px; color: var(--amber); background: rgba(245,184,82,.08); font-size: 8px; font-weight: 900; cursor: pointer; }
.alert-permission-check.ok button { color: var(--green); border-color: rgba(77,229,168,.3); background: rgba(77,229,168,.07); }

.mobile-sos { display: none; }
.group-dialog { width: min(94vw, 680px); max-height: 88vh; padding: 0; border: 1px solid var(--line); border-radius: 16px; color: var(--text); background: var(--panel); box-shadow: 0 25px 100px rgba(0,0,0,.75); }
.group-dialog::backdrop { background: rgba(0,0,0,.72); backdrop-filter: blur(3px); }
.group-dialog-content { position: relative; padding: 26px; }
.dialog-close { position: absolute; top: 12px; right: 12px; width: 35px; height: 35px; border: 0; border-radius: 8px; cursor: pointer; color: var(--muted); background: rgba(255,255,255,.04); font-size: 20px; }
.group-dialog h3 { margin: 22px 0 10px; font-size: 13px; }
.join-group-details { margin: 15px 0; padding: 11px; border: 1px solid var(--line); border-radius: 9px; }
.join-group-details summary { cursor: pointer; color: var(--muted); font-size: 10px; font-weight: 800; }
.join-group-details .inline-form { margin-top: 10px; }
.generated-group-invite { display: flex; gap: 8px; margin-top: 10px; padding: 10px; border: 1px solid rgba(77,229,168,.25); border-radius: 9px; background: rgba(77,229,168,.05); }
.generated-group-invite code { flex: 1; overflow: auto; padding: 7px; color: var(--green); font-weight: 800; }
.group-member-list { display: grid; gap: 7px; max-height: 300px; overflow: auto; }
.group-member { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px; border: 1px solid var(--line); border-radius: 9px; }
.group-member-copy { display: grid; gap: 3px; min-width: 0; }
.group-member-copy b { font-size: 11px; }
.group-member-copy span { overflow: hidden; text-overflow: ellipsis; color: var(--muted); font-size: 9px; }
.group-member-actions { display: flex; gap: 5px; }
.group-member-actions button { padding: 6px 8px; border: 1px solid var(--line); border-radius: 6px; cursor: pointer; color: var(--muted); background: transparent; font-size: 8px; }
.toast { position: fixed; z-index: 20; left: 50%; bottom: 24px; max-width: min(420px, calc(100% - 32px)); padding: 11px 15px; border: 1px solid var(--line); border-radius: 9px; opacity: 0; pointer-events: none; transform: translate(-50%, 14px); color: var(--text); background: #152522; box-shadow: 0 12px 40px rgba(0,0,0,.4); font-size: 11px; transition: .25s ease; }
.toast.visible { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 1050px) {
  .shell { grid-template-columns: 230px minmax(370px, 1fr); }
  .action-panel { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; gap: 22px; border-top: 1px solid var(--line); border-left: 0; }
  .readiness-card { margin-top: 0; padding: 0; border: 0; }
}

@media (max-width: 720px) {
  .auth-gate { display: flex; flex-direction: column; }
  .auth-card-wrap { order: 1; min-height: 100vh; padding: 22px 14px; }
  .auth-visual { order: 2; min-height: auto; padding: 25px 20px 29px; border-top: 1px solid var(--line); border-right: 0; }
  .auth-promise { padding: 56px 0 25px; }
  .auth-promise h1 { font-size: 37px; }
  .auth-promise p { font-size: 12px; }
  .auth-promise ul { margin-top: 22px; }
  .auth-disclaimer { display: none; }
  .auth-card { padding: 23px 20px; }
  .simulation-strip { padding: 0 8px; text-align: center; font-size: 8px; letter-spacing: .08em; }
  .topbar { gap: 6px; padding: 11px 10px; }
  .topbar-actions { gap: 6px; }
  .connection { display: none; }
  .group-switcher label, .group-switcher button { display: none; }
  .group-switcher select { min-width: 105px; max-width: 125px; }
  .identity-control span { display: none; }
  .account-control { gap: 0; padding-left: 0; border-left: 0; }
  .account-control span { display: none; }
  .shell { display: flex; min-height: calc(100vh - 99px); flex-direction: column; }
  .team-panel { order: 2; border-top: 1px solid var(--line); border-right: 0; }
  .map-section { order: 1; }
  .action-panel { order: 3; display: block; }
  .incident-active .action-panel { order: 1; }
  .incident-active .map-section { order: 2; }
  .incident-active .team-panel { order: 3; }
  .map { min-height: 54vh; }
  .desktop-sos { display: none; }
  .mobile-sos { position: absolute; z-index: 6; right: 14px; bottom: 15px; display: grid; justify-items: center; }
  .mobile-sos p { margin-bottom: 5px; padding: 4px 7px; border-radius: 6px; color: #fff; background: rgba(7,16,15,.85); font-size: 8px; }
  .mobile-sos .sos-button { width: 86px; border-width: 7px; }
  .mobile-sos .sos-content b { font-size: 21px; }
  .mobile-sos .sos-content small { display: none; }
  .map-legend { right: 112px; gap: 7px; }
  .action-panel { padding: 16px; }
  .readiness-card { margin-top: 18px; padding-top: 17px; border-top: 1px solid var(--line); }
  .inline-form { flex-direction: column; }
  .inline-form .auth-primary { width: 100%; }
  .group-onboarding { min-height: calc(100vh - 92px); padding: 14px; }
  .group-onboarding-card { padding: 21px; }
  .group-dialog-content { padding: 22px 16px; }
}
