:root {
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #ffffff;
  background: #0a0a0a;
  --card: #111111;
  --card2: #181818;
  --line: #333333;
  --muted: #bdbdbd;
  --accent: #ffd400;
  --accent2: #ffffff;
  --danger: #ff3b30;
  --ok: #22c55e;
  --bt: #38bdf8;
  --bg: #0a0a0a;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100vh; background: #0a0a0a; color: #fff; }
body {
  background: radial-gradient(circle at 50% -10%, #242424 0, #0a0a0a 38%, #050505 100%);
  overflow-x: hidden;
}
.hidden { display: none !important; }
.eyebrow, .label { font-size: 11px; letter-spacing: .14em; color: var(--muted); text-transform: uppercase; }
.muted { color: var(--muted); font-size: 12px; }

.pill {
  font-size: 11px;
  border: 1px solid #3a3a3a;
  padding: 6px 10px;
  border-radius: 999px;
  color: var(--accent);
  background: #101010;
  white-space: nowrap;
}
.pill-soft { background: #151515; }
.pill-btn { cursor: pointer; font-weight: 700; }
.pill-accent { background: var(--accent); color: #050505; border-color: var(--accent); }
.pill.ok { color: #050505; background: var(--ok); border-color: var(--ok); }
.pill.bt-pill { color: var(--bt); border-color: #1f4f66; background: #091720; }
.pill.bt-pill.active { color: #050505; background: var(--bt); border-color: var(--bt); }
.pill.warn { color: #fff; background: var(--danger); border-color: var(--danger); }

/* Landing */
.landing { position: relative; min-height: 100vh; display: none; overflow: hidden; background: linear-gradient(180deg, #050505 0, #0a0a0a 100%); }
.landing.active { display: grid; place-items: center; padding: 28px 18px; }
.landing-bg { position: absolute; inset: 0; overflow: hidden; }
.orb, .road { position: absolute; display: block; }
.orb { border-radius: 50%; opacity: .12; background: #ffd400; animation: float 10s ease-in-out infinite; }
.orb-1 { width: 220px; height: 220px; top: 8%; left: -40px; }
.orb-2 { width: 170px; height: 170px; right: -35px; top: 22%; animation-duration: 13s; }
.orb-3 { width: 240px; height: 240px; bottom: -30px; left: 15%; background: #fff; opacity: .055; animation-duration: 16s; }
.road { width: 140vw; height: 84px; left: -20vw; background: repeating-linear-gradient(135deg, #ffd400 0 26px, #090909 26px 52px); opacity: .12; transform: rotate(-12deg); }
.road-1 { bottom: 18%; animation: drift 14s linear infinite; }
.road-2 { bottom: 6%; opacity: .08; animation: drift 18s linear infinite reverse; }

.landing-card {
  position: relative;
  z-index: 2;
  width: min(100%, 460px);
  padding: 28px 22px;
  border-radius: 28px;
  background: rgba(12, 12, 12, .94);
  border: 1px solid #353535;
  box-shadow: 0 28px 80px #000b;
  backdrop-filter: blur(18px);
  transform-style: preserve-3d;
  transition: transform .2s ease;
}
.app-mark {
  width: 72px; height: 72px; border-radius: 22px;
  background: var(--accent); color: #050505;
  display: grid; place-items: center;
  font-weight: 900; font-size: 28px; letter-spacing: .05em;
  box-shadow: 0 12px 30px #ffd4002e;
}
.landing-card h1 { margin: 8px 0 12px; font-size: 32px; line-height: 1.05; }
.landing-card p { color: #e7e7e7; line-height: 1.6; margin: 0 0 16px; }
.landing-badges { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.landing-badges span { font-size: 12px; padding: 8px 11px; border-radius: 999px; background: #111; border: 1px solid #343434; color: #fff; }
.landing-input-wrap { display: block; margin-bottom: 14px; }
.landing-input-wrap span { display: block; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.landing-btn {
  width: 100%; border: 0; border-radius: 18px; padding: 16px;
  background: var(--accent); color: #050505; font-weight: 800; font-size: 16px;
  box-shadow: 0 14px 30px #ffd40025; cursor: pointer;
}
.landing-note { display: block; margin-top: 12px; color: #aaa; text-align: center; }

/* App shell */
.app-shell {
  max-width: 840px;
  margin: auto;
  min-height: 100vh;
  padding: env(safe-area-inset-top) 16px calc(96px + env(safe-area-inset-bottom));
}
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 18px 2px 14px; flex-wrap: wrap; }
.topbar h1 { font-size: 20px; margin: 3px 0; }
.topbar-pills { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }

.view { display: none; }
.view.active { display: block; }

.hero-card, .panel, .settings-card, .summary-card, .trip-card {
  background: linear-gradient(145deg, var(--card2), var(--card));
  border: 1px solid #303030;
  border-radius: 22px;
  padding: 18px;
  box-shadow: 0 14px 34px #0008;
}
.hero-card { border-color: #383838; }
.status-row, .panel-head, .section-head, .stats-line, .range-labels, .row-setting, .subsection-head, .history-actions {
  display: flex; justify-content: space-between; gap: 12px; align-items: center;
}
.status-row strong { display: block; font-size: 24px; margin-top: 5px; }
.status-dot { width: 15px; height: 15px; border-radius: 50%; background: #696969; box-shadow: 0 0 0 7px #ffffff0d; }
.status-dot.active { background: var(--accent); box-shadow: 0 0 0 7px #ffd40022, 0 0 18px #ffd40055; }

.metric-grid, .summary-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 18px; }
.metric, .summary-card { background: #090909; border: 1px solid #2d2d2d; border-radius: 15px; padding: 12px; }
.metric span, .summary-card span { display: block; color: #aaa; font-size: 12px; }
.metric b, .summary-card b { display: block; margin-top: 5px; font-size: 17px; color: #fff; }
.summary-grid { margin-bottom: 14px; }
.route-state { margin-top: 12px; border: 1px solid var(--accent); color: var(--accent); background: #171500; padding: 10px 12px; border-radius: 12px; font-size: 13px; }

/* Action grid */
.action-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 14px 0; }
.moto-actions-grid { grid-template-columns: repeat(2, 1fr); }
.moto-actions-grid #monitorBtn,
.moto-actions-grid #stopBtn { grid-column: 1 / -1; }
.main-action {
  border: 0; border-radius: 20px; padding: 16px; text-align: left; color: #fff;
  display: flex; gap: 12px; align-items: center; min-height: 82px; cursor: pointer;
}
.main-action .icon { font-size: 24px; line-height: 1; }
.main-action b, .main-action small { display: block; }
.main-action small { opacity: .85; margin-top: 4px; line-height: 1.3; }
.monitor { background: var(--accent); color: #050505; }
.stop { background: #f5f5f5; color: #080808; }
.moto-btn { background: #1e1e1e; border: 1px solid #444; color: #fff; }
.sos-btn { background: #3b0d0a; border: 1px solid var(--danger); color: #ffd9d6; }

.panel { margin-top: 14px; }
.panel.compact small, .settings-card small { color: var(--muted); line-height: 1.45; }
.panel h2, .panel h3, .section-head h2 { margin: 3px 0; font-size: 18px; }
.panel h3 { font-size: 16px; }
.subsection-head { margin: 18px 4px 10px; }
.subsection-head h3 { margin: 0; font-size: 16px; }

.progress-line, .sensor-bar, .vu-bar { height: 9px; background: #050505; border: 1px solid #242424; border-radius: 99px; overflow: hidden; margin: 12px 0; }
.progress-line > div { height: 100%; width: 35%; background: linear-gradient(90deg, transparent, var(--accent), transparent); animation: pulse 2s infinite; }
.sensor-bar > div, .vu-bar > div { height: 100%; width: 0; background: var(--accent); transition: width .07s; }

.secondary-btn, .icon-btn, .trip-actions button, .small-action-btn {
  background: #f5f5f5; color: #080808; border: 1px solid #fff;
  border-radius: 13px; padding: 12px; font-weight: 700; cursor: pointer;
}
.secondary-btn { width: 100%; }
.small-btn { margin: 0; }
.small-action-btn { padding: 8px 14px; border-radius: 10px; font-size: 13px; }
.small-action-btn.connected { background: var(--ok); border-color: var(--ok); color: #050505; }
.icon-btn { width: 40px; height: 40px; padding: 0; font-size: 20px; border-radius: 12px; }

.alert-card {
  display: flex; align-items: center; gap: 12px; margin: 14px 0;
  background: var(--accent); border: 1px solid var(--accent); color: #050505;
  border-radius: 18px; padding: 14px;
}
.alert-icon { width: 36px; height: 36px; border-radius: 50%; background: #050505; color: var(--accent); display: grid; place-items: center; font-weight: 900; flex-shrink: 0; }
.alert-card span { display: block; color: #191919; font-size: 13px; margin-top: 3px; }

/* SOS banners */
.sos-banner {
  background: #3d0907; border: 2px solid var(--danger); border-radius: 18px;
  padding: 12px 14px; margin-bottom: 12px;
  display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
}
.sos-banner.own { background: #2c1500; border-color: var(--accent); }
.sos-banner-main { display: flex; align-items: center; gap: 10px; }
.sos-badge { background: var(--danger); color: #fff; font-weight: 900; font-size: 12px; padding: 5px 8px; border-radius: 8px; }
.sos-banner.own .sos-badge { background: var(--accent); color: #050505; }
.sos-banner-main strong, .sos-banner-main small { display: block; }
.sos-banner-main small { color: #ffd4d0; margin-top: 2px; }
.sos-banner-actions { display: flex; gap: 8px; }
.sos-banner-actions button { border: 0; border-radius: 10px; padding: 8px 12px; font-weight: 700; cursor: pointer; background: #fff; color: #050505; }
.sos-banner-actions button.ghost { background: #1c1c1c; color: #fff; border: 1px solid #444; }
.sos-banner-actions button.safe { background: var(--ok); color: #050505; }

/* Inputs & forms */
input[type="text"], input[type="url"], select {
  width: 100%;
  background: #090909;
  color: #fff;
  border: 1px solid #383838;
  border-radius: 12px;
  padding: 11px 12px;
  font-size: 14px;
  outline: none;
}
input[type="text"]:focus, input[type="url"]:focus, select:focus { border-color: var(--accent); }
.inline-form { display: flex; gap: 8px; margin-top: 12px; }
.inline-form input { flex: 1; }
.inline-btn { width: auto; white-space: nowrap; padding: 11px 14px; }
.field-group { margin-top: 10px; }
.field-group label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 6px; font-weight: 600; }
.profile-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 6px; }

/* Radio & PTT */
.channel-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-top: 12px; }
.channel-chip {
  background: #0b0b0b; border: 1px solid #353535; color: #fff;
  border-radius: 14px; padding: 10px 12px; text-align: left; cursor: pointer;
}
.channel-chip b, .channel-chip span { display: block; }
.channel-chip b { color: var(--accent); font-size: 14px; }
.channel-chip span { font-size: 12px; color: var(--muted); margin-top: 2px; }
.channel-chip.active { background: #1d1900; border-color: var(--accent); }

.ptt-stage { text-align: center; }
.ptt-status-row { display: flex; justify-content: space-between; align-items: center; text-align: left; margin-bottom: 14px; }
.ptt-status-row strong { display: block; font-size: 16px; margin-top: 3px; }
.ptt-big-btn {
  position: relative;
  width: min(100%, 260px);
  height: 220px;
  margin: 4px auto 12px;
  border-radius: 36px;
  border: 3px solid var(--accent);
  background: linear-gradient(155deg, #221d00, #0d0d0d);
  color: #fff;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  cursor: pointer;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  box-shadow: 0 18px 40px #000a;
}
.ptt-big-btn .ptt-icon { font-size: 40px; }
.ptt-big-btn b { font-size: 16px; letter-spacing: .04em; color: var(--accent); }
.ptt-big-btn small { font-size: 12px; color: var(--muted); }
.ptt-big-btn.tx {
  border-color: var(--danger);
  background: linear-gradient(155deg, #4f100b, #1d0604);
  box-shadow: 0 0 0 8px #ff3b3030, 0 18px 40px #000b;
}
.ptt-big-btn.tx b { color: #fff; }
.ptt-big-btn.rx {
  border-color: var(--ok);
  background: linear-gradient(155deg, #0c331b, #07190e);
  box-shadow: 0 0 0 8px #22c55e28, 0 18px 40px #000b;
}
.ptt-big-btn.rx b { color: var(--ok); }
.vu-wrap { text-align: left; margin-top: 4px; }
.ptt-quick-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 8px; flex-wrap: wrap; }
.toggle-chip { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); cursor: pointer; }
.toggle-chip input { width: 20px; height: 20px; }
.sos-mini-btn { background: #3b0d0a; border: 1px solid var(--danger); color: #ffd9d6; border-radius: 12px; padding: 9px 14px; font-weight: 700; cursor: pointer; }

.bt-btn-row { margin-top: 12px; margin-bottom: 6px; }
.bt-toggle-row { margin-top: 10px; padding-top: 10px; border-top: 1px solid #2b2b2b; }

/* Maps & legends */
.live-map-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin: 18px 0 10px; }
.live-map-head h3 { margin: 3px 0 0; font-size: 16px; }
.monitor-live-map { height: 275px; border-radius: 18px; overflow: hidden; border: 1px solid #353535; background: #101010; }
.map { height: 58vh; min-height: 380px; border-radius: 20px; overflow: hidden; border: 1px solid #353535; background: #101010; }
.map-legend, .live-map-legend { display: flex; gap: 12px; flex-wrap: wrap; color: var(--muted); font-size: 11px; margin-top: 9px; }
.map-legend i, .live-map-legend i { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 5px; }
.map-legend .route, .route-dot { background: #ffd400; }
.map-legend .event, .event-dot { background: #fff; border: 1px solid #111; }
.map-legend .group, .group-dot { background: var(--bt); }
.map-legend .peer, .peer-dot { background: var(--ok); }
.map-legend .sos, .sos-dot { background: var(--danger); }
.map-legend .live, .live-dot { background: #ffd400; border: 2px solid #fff; }

/* History & settings */
.section-head { margin: 4px 2px 14px; }
.trip-list { display: grid; gap: 12px; }
.trip-card h3 { margin: 0 0 5px; display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.trip-meta { display: flex; flex-wrap: wrap; gap: 8px; color: var(--muted); font-size: 12px; }
.trip-actions { display: flex; gap: 8px; margin-top: 12px; }
.trip-actions button { flex: 1; padding: 9px; border-radius: 10px; }
.trip-actions .delete { text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 3px; }
.empty { text-align: center; color: var(--muted); padding: 24px 15px; border: 1px dashed var(--line); border-radius: 18px; }
.history-actions { margin-bottom: 14px; }
.history-actions .secondary-btn { flex: 1; }

.settings-card { margin-bottom: 12px; }
.settings-card label { display: block; font-weight: 700; }
.settings-card input[type=range] { width: 100%; margin: 14px 0 8px; accent-color: var(--accent); }
.range-labels { color: var(--muted); font-size: 11px; }
.row-setting > div { flex: 1; }
.row-setting input { width: 24px; height: 24px; accent-color: var(--accent); }
.preset-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 10px 0 8px; }
.preset-grid.levels-grid { grid-template-columns: repeat(2, 1fr); }
@media (min-width: 560px) {
  .preset-grid.levels-grid { grid-template-columns: repeat(4, 1fr); }
}
.preset-btn {
  background: #0b0b0b; border: 1px solid #363636; color: #fff;
  padding: 11px 8px; border-radius: 12px; font-weight: 700; cursor: pointer;
}
.preset-btn.active { background: var(--accent); color: #050505; border-color: var(--accent); }

/* Bottom nav (5 items) */
.bottom-nav {
  position: fixed; left: 50%; bottom: 0; transform: translateX(-50%);
  width: min(840px, 100%);
  padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
  background: #050505f5; backdrop-filter: blur(16px);
  display: grid; grid-template-columns: repeat(5, 1fr);
  border-top: 1px solid #292929; z-index: 1000;
}
.bottom-nav button { border: 0; background: transparent; color: #888; padding: 6px 2px; font-size: 11px; cursor: pointer; }
.bottom-nav button span { display: block; font-size: 18px; margin-bottom: 2px; }
.bottom-nav button.active { color: var(--accent); }

/* Modo Moto Overlay (para guantes) */
.moto-overlay {
  position: fixed; inset: 0; z-index: 2000;
  background: #050505;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: calc(14px + env(safe-area-inset-top)) 14px calc(16px + env(safe-area-inset-bottom));
  gap: 12px;
}
.moto-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.moto-speed-box { display: flex; align-items: baseline; gap: 6px; }
.moto-speed-box b { font-size: 46px; line-height: 1; color: var(--accent); }
.moto-speed-box span { font-size: 14px; color: var(--muted); font-weight: 700; }
.moto-badges { display: flex; gap: 6px; flex-wrap: wrap; flex: 1; }
.moto-exit-btn {
  background: #1d1d1d; color: #fff; border: 1px solid #444;
  border-radius: 14px; padding: 12px 16px; font-weight: 800; font-size: 14px; cursor: pointer;
}
.moto-center { flex: 1; display: flex; }
.moto-ptt-btn {
  width: 100%; height: 100%; min-height: 220px;
  border-radius: 28px; border: 4px solid var(--accent);
  background: linear-gradient(160deg, #1b1700, #0b0b0b);
  color: #fff; padding: 20px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  touch-action: none; user-select: none; -webkit-user-select: none; cursor: pointer;
}
.moto-ptt-btn.tx { border-color: var(--danger); background: linear-gradient(160deg, #52100a, #180402); }
.moto-ptt-btn.rx { border-color: var(--ok); background: linear-gradient(160deg, #0b331b, #05160c); }
.moto-ptt-status { font-size: 13px; letter-spacing: .12em; color: var(--muted); font-weight: 700; }
.moto-ptt-btn b { font-size: 24px; color: var(--accent); text-align: center; }
.moto-ptt-btn.tx b { color: #fff; }
.moto-ptt-btn.rx b { color: var(--ok); }
.moto-ptt-btn small { font-size: 14px; color: #d4d4d4; text-align: center; }
.moto-vu { width: min(80%, 320px); height: 12px; background: #000; border: 1px solid #333; border-radius: 999px; overflow: hidden; margin-top: 8px; }
.moto-vu > div { height: 100%; width: 0; background: var(--accent); transition: width .07s; }

.moto-bottom { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.moto-big-action {
  min-height: 92px; border-radius: 22px; border: 0; padding: 14px;
  display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; gap: 4px;
  cursor: pointer;
}
.moto-big-action b { font-size: 17px; }
.moto-big-action small { font-size: 13px; opacity: .85; }
.moto-big-action.ride { background: var(--accent); color: #050505; }
.moto-big-action.ride.active { background: #f5f5f5; color: #050505; }
.moto-big-action.sos { background: var(--danger); color: #fff; }

/* Modals */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 3000;
  background: rgba(0, 0, 0, .86);
  display: grid; place-items: center; padding: 18px;
}
.modal-backdrop.sos-critical { background: rgba(70, 5, 5, .95); }
.modal-card {
  width: min(100%, 440px);
  background: #121212; border: 1px solid #3a3a3a; border-radius: 26px; padding: 22px;
}
.modal-card h2 { margin: 6px 0 14px; font-size: 22px; }
.sos-options { display: grid; gap: 10px; }
.sos-option {
  border-radius: 16px; border: 1px solid #444; background: #1a1a1a; color: #fff;
  padding: 16px; text-align: left; cursor: pointer;
}
.sos-option b, .sos-option small { display: block; }
.sos-option small { color: var(--muted); margin-top: 3px; }
.sos-option.emergency { background: #4a0e0a; border-color: var(--danger); }
.sos-option.breakdown { background: #2c1e00; border-color: var(--accent); }
.sos-option.cancel { text-align: center; background: #242424; }
.panel-head-pills { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.modal-lead { color: var(--muted); font-size: 13px; margin: -6px 0 14px; line-height: 1.45; }
.level-option { transition: border-color .15s ease, background .15s ease; }
.level-option.active { border-color: var(--accent); background: #241f00; box-shadow: 0 0 0 1px var(--accent) inset; }
.level-option-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.level-option.active .level-option-head b { color: var(--accent); }
.voice-prompt-box {
  background: #0b0b0b; border: 1px solid #353535; border-radius: 16px;
  padding: 12px; margin-bottom: 12px;
}
.voice-prompt-box.listening {
  border-color: var(--accent); background: #1c1800; box-shadow: 0 0 0 2px #ffd40024;
}
.voice-prompt-top { display: flex; align-items: center; gap: 8px; }
.voice-prompt-top strong { flex: 1; font-size: 13px; color: #fff; }
.voice-mic-dot { width: 10px; height: 10px; border-radius: 50%; background: #666; flex-shrink: 0; }
.voice-prompt-box.listening .voice-mic-dot {
  background: var(--accent); box-shadow: 0 0 0 5px #ffd40033; animation: pulseDot 1.1s ease-in-out infinite;
}
.voice-retry-btn {
  background: #242424; color: #fff; border: 1px solid #444; border-radius: 10px;
  padding: 6px 10px; font-size: 11px; font-weight: 700; cursor: pointer; white-space: nowrap;
}
.voice-transcript { display: block; color: var(--accent); font-size: 12px; margin-top: 6px; min-height: 15px; }
.cmd-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-top: 12px; }
.cmd-chip {
  background: #0b0b0b; border: 1px solid #353535; color: #fff;
  border-radius: 14px; padding: 12px; text-align: left; cursor: pointer;
}
.cmd-chip b, .cmd-chip small { display: block; }
.cmd-chip b { font-size: 14px; color: var(--accent); }
.cmd-chip small { font-size: 11px; color: var(--muted); margin-top: 2px; }
.cmd-chip.danger { border-color: #6b1d18; background: #260a08; }
.cmd-chip.danger b { color: #ff8d85; }
.accent-btn { background: var(--accent); border-color: var(--accent); color: #050505; }
.copilot-card {
  margin-top: 12px; background: #171500; border: 1px solid var(--accent);
  border-radius: 14px; padding: 12px;
}
.copilot-card strong { display: block; color: var(--accent); font-size: 14px; }
.copilot-card small { display: block; color: #f5f5f5; font-size: 13px; margin-top: 4px; line-height: 1.45; }
.ride-group-actions { margin-top: 12px; margin-bottom: 8px; }
.ride-group-actions button { flex: 1; }
.moto-top-actions { display: flex; align-items: center; gap: 8px; }
.moto-voice-btn { border-color: var(--accent); color: var(--accent); background: #1b1700; }
.moto-voice-btn.listening { background: var(--accent); color: #050505; box-shadow: 0 0 0 4px #ffd40033; }
.group-code-banner {
  margin-top: 12px;
  background: linear-gradient(135deg, #241f00, #121000);
  border: 2px solid var(--accent);
  border-radius: 18px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  box-shadow: 0 0 0 3px #ffd40018;
}
.group-code-banner small { display: block; color: #e8e8e8; font-size: 12px; margin-top: 3px; }
.group-code-big {
  font-size: 38px;
  font-weight: 900;
  color: var(--accent);
  letter-spacing: .08em;
  line-height: 1;
  flex-shrink: 0;
}
.pill.group-highlight {
  background: var(--accent);
  color: #050505;
  border-color: var(--accent);
  font-weight: 900;
  font-size: 13px;
}
.code-2digit-input {
  width: 100%; background: #070707; border: 2px solid var(--accent); border-radius: 18px;
  color: var(--accent); font-size: 46px; font-weight: 900; text-align: center;
  letter-spacing: .24em; padding: 14px; outline: none;
}
.join-group-error { display: block; min-height: 18px; color: #ff8d85; font-size: 13px; margin: 8px 0 12px; }
@keyframes pulseDot { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.3); } }

.sos-countdown-card { text-align: center; border-color: var(--danger); }
.countdown-number { font-size: 74px; font-weight: 900; color: var(--danger); line-height: 1; margin: 10px 0; }
.countdown-safe-btn {
  width: 100%; border: 0; border-radius: 18px; padding: 20px;
  background: var(--ok); color: #050505; font-size: 18px; font-weight: 900;
  margin-top: 12px; cursor: pointer;
}
.countdown-send-btn {
  width: 100%; border: 1px solid var(--danger); border-radius: 14px; padding: 13px;
  background: transparent; color: #ffd4d0; font-weight: 700; margin-top: 10px; cursor: pointer;
}

@keyframes pulse { 0% { transform: translateX(-150%); } 100% { transform: translateX(300%); } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-18px); } }
@keyframes drift { 0% { transform: translateX(0) rotate(-12deg); } 100% { transform: translateX(-10%) rotate(-12deg); } }

@media (max-width: 520px) {
  .topbar h1 { font-size: 18px; }
  .profile-grid { grid-template-columns: 1fr; }
  .monitor-live-map { height: 245px; }
  .map { height: 54vh; }
  .landing-card h1 { font-size: 28px; }
}
