/* EKEF EL TOUNES, liquid glass system v2, Tunisian identity (brand/BRAND.md) */
:root {
  --ink: #05070D;
  --red: #E70013;
  --ember: #FF5A2A; --ember2: #FFB03A;
  --gold: #FFD36B;
  --pulse: #3DFFA8;
  --t1: #F2F5FA; --t2: #93A1B5; --t3: #55637A;
  --glass-bg: rgba(255,255,255,0.07);
  --glass-brd: rgba(255,255,255,0.14);
  --glass-hi: rgba(255,255,255,0.28);
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; overflow: hidden; }
body {
  background: var(--ink); color: var(--t1);
  font-family: -apple-system, "SF Pro Text", "Segoe UI", Inter, Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
#carte { position: fixed; inset: 0; }
#vignette {
  position: fixed; inset: 0; pointer-events: none; z-index: 5;
  background: radial-gradient(ellipse 66% 60% at 50% 46%, transparent 52%, rgba(5,7,13,0.52) 86%, rgba(5,7,13,0.88) 100%);
}

.glass {
  background: rgba(9,13,21,0.72);
  -webkit-backdrop-filter: blur(16px) saturate(1.25);
  backdrop-filter: blur(16px) saturate(1.25);
  border: 1px solid rgba(255,255,255,0.16);
  box-shadow: 0 24px 80px rgba(0,0,0,0.55), inset 0 0.5px 0 var(--glass-hi);
  border-radius: 20px;
}

/* ---------- cinematic preload ---------- */
#preloader {
  position: fixed; inset: 0; z-index: 100; background: var(--ink);
  display: grid; place-items: center; overflow: hidden;
  transition: opacity 0.9s ease, visibility 0.9s;
}
#preloader.done { opacity: 0; visibility: hidden; }
.pre-flag {
  position: absolute; left: 0; top: 0; bottom: 0; width: 34%;
  background: linear-gradient(105deg, rgba(231,0,19,0.22), transparent 70%);
  transform: translateX(-100%);
  animation: flagin 1.6s 0.2s cubic-bezier(0.3, 0.9, 0.2, 1) forwards;
}
@keyframes flagin { to { transform: none; } }
.pre-core { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.pre-logo {
  width: 96px; height: 96px;
  filter: drop-shadow(0 0 26px rgba(231,0,19,0.45));
  animation: logoignite 1.4s cubic-bezier(0.2, 1.2, 0.3, 1) both;
}
@keyframes logoignite {
  0% { transform: scale(0.4); opacity: 0; filter: drop-shadow(0 0 0 rgba(231,0,19,0)); }
  100% { transform: scale(1); opacity: 1; filter: drop-shadow(0 0 26px rgba(231,0,19,0.45)); }
}
.pre-word { display: flex; gap: 2px; }
.pre-word span {
  font-size: 30px; font-weight: 800; letter-spacing: 0.12em;
  background: linear-gradient(180deg, #fff, #B9C4D6);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  opacity: 0; transform: translateY(14px);
  animation: letterin 0.5s cubic-bezier(0.2, 1.2, 0.3, 1) forwards;
}
.pre-word span.sp { width: 12px; }
.pre-word span:nth-child(1) { animation-delay: 0.55s; } .pre-word span:nth-child(2) { animation-delay: 0.60s; }
.pre-word span:nth-child(3) { animation-delay: 0.65s; } .pre-word span:nth-child(4) { animation-delay: 0.70s; }
.pre-word span:nth-child(5) { animation-delay: 0.75s; } .pre-word span:nth-child(6) { animation-delay: 0.80s; }
.pre-word span:nth-child(8) { animation-delay: 0.90s; } .pre-word span:nth-child(9) { animation-delay: 0.95s; }
.pre-word span:nth-child(10) { animation-delay: 1.00s; } .pre-word span:nth-child(11) { animation-delay: 1.05s; }
.pre-word span:nth-child(12) { animation-delay: 1.10s; } .pre-word span:nth-child(13) { animation-delay: 1.15s; }
@keyframes letterin { to { opacity: 1; transform: none; } }
.pre-flagline { opacity: 0; animation: fadein 0.6s 1.25s forwards; }
.pre-tag { font-size: 15px; color: var(--t2); opacity: 0; animation: fadein 0.6s 1.35s forwards; }
.pre-sub { font-size: 11px; letter-spacing: 0.3em; text-transform: uppercase; color: var(--t3); opacity: 0; animation: fadein 0.6s 1.5s forwards; }
@keyframes fadein { to { opacity: 1; } }

/* ---------- chrome ---------- */
.topbar {
  position: fixed; top: max(14px, env(safe-area-inset-top)); left: 14px;
  display: flex; align-items: center; gap: 10px; padding: 10px 16px 10px 10px;
  z-index: 10; animation: drop 0.7s cubic-bezier(0.2, 1.4, 0.3, 1) both;
}
.mark { width: 34px; height: 34px; }
.flag { border-radius: 3px; box-shadow: 0 2px 10px rgba(0,0,0,0.4); }
.wordmark { display: flex; flex-direction: column; gap: 3px; }
.wordmark strong { font-size: 15px; letter-spacing: 0.14em; }
.chip { font-size: 11px; color: var(--t2); font-variant-numeric: tabular-nums; transition: color 0.6s; }
.chip.ok { color: var(--gold); }
.chip.warn { color: var(--ember2); }

.layerpills {
  position: fixed; top: max(14px, env(safe-area-inset-top)); right: 14px;
  display: flex; gap: 6px; padding: 6px; z-index: 10;
  animation: drop 0.7s 0.08s cubic-bezier(0.2, 1.4, 0.3, 1) both;
}
.pill {
  border: 0; background: transparent; color: var(--t2);
  font: inherit; font-size: 13px; padding: 8px 12px; border-radius: 14px;
  cursor: pointer; transition: all 0.35s;
  display: flex; align-items: center; gap: 7px;
}
.pill .ic { width: 15px; height: 15px; }
.pill.active { background: rgba(255,255,255,0.12); color: var(--t1); }
.pill:disabled { opacity: 0.35; cursor: default; }

.zone {
  position: fixed; left: 14px; bottom: calc(118px + env(safe-area-inset-bottom));
  padding: 14px 18px; z-index: 9; max-width: 300px;
  animation: rise 0.5s cubic-bezier(0.2, 1.4, 0.3, 1) both;
}
.zone h2 { font-size: 17px; margin-bottom: 4px; }
.zone p { font-size: 13px; color: var(--t2); }
.zone .meta { font-size: 11px; color: var(--t3); margin-top: 6px; font-variant-numeric: tabular-nums; }

.fab {
  position: fixed; right: 18px; bottom: calc(24px + env(safe-area-inset-bottom));
  width: 96px; height: 96px; border-radius: 50%;
  display: grid; place-items: center; z-index: 11; cursor: pointer;
  color: var(--t1); font: inherit;
  animation: rise 0.8s 0.15s cubic-bezier(0.2, 1.4, 0.3, 1) both;
}
.fab-ring {
  position: absolute; inset: -3px; border-radius: 50%;
  border: 1.5px solid var(--red);
  opacity: 0.6; animation: breathe 2.8s ease-in-out infinite;
}
.fab-label { font-size: 12.5px; font-weight: 700; text-align: center; line-height: 1.3; }

.sheet {
  position: fixed; left: 50%; bottom: 0; transform: translateX(-50%);
  width: min(480px, 100vw); z-index: 20;
  border-radius: 28px 28px 0 0; padding: 12px 22px calc(20px + env(safe-area-inset-bottom));
  animation: sheetup 0.55s cubic-bezier(0.2, 1.3, 0.3, 1) both;
}
.grab { width: 42px; height: 5px; border-radius: 3px; background: rgba(255,255,255,0.25); margin: 2px auto 14px; }
.sheet h1 { font-size: 24px; text-align: center; margin-bottom: 4px; }
.sheet .meta { text-align: center; color: var(--t2); font-size: 12px; margin-bottom: 18px; }
.pulse-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pulse-btn {
  border: 1px solid var(--glass-brd); border-radius: 18px;
  background: rgba(255,255,255,0.05); color: var(--t1);
  font: inherit; cursor: pointer; padding: 18px 10px;
  display: flex; align-items: center; gap: 12px;
  transition: transform 0.15s, background 0.3s, border-color 0.3s;
  -webkit-tap-highlight-color: transparent;
}
.pulse-btn:active { transform: scale(0.96); }
.pb-icon { width: 26px; height: 26px; flex: none; }
.pb-label { font-size: 14px; font-weight: 600; text-align: left; line-height: 1.3; }
.power-yes .pb-icon { color: var(--gold); }
.power-no .pb-icon { color: var(--red); }
.cell-no .pb-icon { color: var(--ember2); }
.fire-yes .pb-icon { color: var(--ember); }
.power-yes:hover { border-color: var(--gold); background: rgba(255,211,107,0.10); }
.power-no:hover { border-color: var(--red); background: rgba(231,0,19,0.10); }
.cell-no:hover { border-color: var(--ember2); background: rgba(255,176,58,0.10); }
.fire-yes:hover { border-color: var(--ember); background: rgba(255,90,42,0.14); }
.hint { text-align: center; font-size: 11px; color: var(--t3); margin-top: 14px; }
.ghost { display: block; margin: 12px auto 0; background: none; border: 0; color: var(--t2); font: inherit; font-size: 13px; cursor: pointer; padding: 6px 18px; }

.bloom {
  position: fixed; width: 14px; height: 14px; border-radius: 50%;
  background: radial-gradient(circle, var(--gold), transparent 70%);
  z-index: 30; pointer-events: none;
  animation: bloompulse 1.6s ease-out forwards;
}
.toast {
  position: fixed; left: 50%; bottom: calc(28px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  padding: 10px 20px; font-size: 13px; z-index: 40;
  animation: rise 0.4s cubic-bezier(0.2, 1.4, 0.3, 1) both;
}
.hidden { display: none !important; }

/* fires */
.fire-pulse {
  width: 22px; height: 22px; border-radius: 50%;
  background: radial-gradient(circle, var(--ember2) 0%, var(--red) 45%, transparent 72%);
  animation: firebreathe 2.4s ease-in-out infinite;
  box-shadow: 0 0 22px 6px rgba(231,0,19,0.5);
}
.fire-pulse.projected {
  background: transparent;
  border: 2px dashed var(--red);
  box-shadow: none; opacity: 0.7;
}

/* governorate state markers */
.gov-dot { width: 14px; height: 14px; border-radius: 50%; position: relative; }
.gov-dot.bright { background: var(--gold); box-shadow: 0 0 12px 3px rgba(255,211,107,0.5); }
.gov-dot.dim { background: var(--ember2); box-shadow: 0 0 10px 2px rgba(255,176,58,0.45); }
.gov-dot.dark { background: var(--red); box-shadow: 0 0 14px 4px rgba(231,0,19,0.6); }
.gov-dot.dark::after {
  content: ""; position: absolute; inset: -8px; border-radius: 50%;
  border: 2px solid rgba(231,0,19,0.8);
  animation: ringpulse 1.8s cubic-bezier(0.2, 0.6, 0.3, 1) infinite;
}
.gov-dot.dim::after {
  content: ""; position: absolute; inset: -5px; border-radius: 50%;
  border: 1.5px solid rgba(255,176,58,0.4);
  animation: ringpulse 2.6s ease-out infinite;
}
@keyframes ringpulse {
  0% { transform: scale(0.55); opacity: 1; }
  100% { transform: scale(2.1); opacity: 0; }
}
.gov-burst {
  position: absolute; width: 18px; height: 18px; border-radius: 50%;
  border: 2.5px solid var(--red); pointer-events: none; z-index: 8;
  animation: burst 1.4s cubic-bezier(0.1, 0.7, 0.3, 1) forwards;
}
.gov-burst.power-back { border-color: var(--gold); }
@keyframes burst {
  0% { transform: scale(0.4); opacity: 1; }
  100% { transform: scale(7); opacity: 0; }
}

/* sky layer */
.plane-marker { filter: drop-shadow(0 0 6px rgba(255,255,255,0.6)); transition: none; }
.plane-marker svg { display: block; }
.sat-marker {
  width: 7px; height: 7px; border-radius: 50%;
  background: #fff; box-shadow: 0 0 8px 2px rgba(255,255,255,0.8);
}

/* real cut markers (geocoded zone positions) */
.cut-marker {
  border-radius: 50%;
  border: 2px solid var(--red);
  background: rgba(231,0,19,0.28);
  box-shadow: 0 0 14px 3px rgba(231,0,19,0.4), inset 0 0 6px rgba(231,0,19,0.5);
  position: relative;
}
.cut-marker::after {
  content: ""; position: absolute; inset: -6px; border-radius: 50%;
  border: 1.5px solid rgba(231,0,19,0.5);
  animation: ringpulse 2.2s cubic-bezier(0.2, 0.6, 0.3, 1) infinite;
}

/* cuts panel */
#cuts-panel {
  position: fixed; left: 14px; top: 84px; z-index: 9;
  width: 244px; max-height: 46vh; overflow-y: auto;
  padding: 12px 14px; animation: drop 0.7s 0.2s cubic-bezier(0.2, 1.4, 0.3, 1) both;
}
#cuts-panel h2 { font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--t2); margin-bottom: 8px; }
#cuts-panel .cut-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 7px 9px; border-radius: 10px; font-size: 12px; cursor: pointer;
  transition: background 0.25s;
}
#cuts-panel .cut-row:hover { background: rgba(255,255,255,0.07); }
#cuts-panel .cut-row .gov { color: var(--t3); font-size: 10px; }
#cuts-panel .cut-count { color: var(--red); font-weight: 700; font-variant-numeric: tabular-nums; }
#cuts-panel .empty { font-size: 12px; color: var(--t3); padding: 6px 2px; }

@keyframes breathe { 0%,100% { opacity: 0.6; transform: scale(1);} 50% { opacity: 0.2; transform: scale(1.07);} }
@keyframes firebreathe { 0%,100% { transform: scale(1); opacity: 1;} 50% { transform: scale(1.35); opacity: 0.72;} }
@keyframes drop { from { transform: translateY(-18px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes rise { from { transform: translateY(18px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes sheetup { from { transform: translate(-50%, 60%); opacity: 0; } to { transform: translate(-50%, 0); opacity: 1; } }
@keyframes bloompulse { from { transform: scale(1); opacity: 0.9; } to { transform: scale(14); opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01s !important; transition-duration: 0.01s !important; }
  #preloader { display: none; }
}

/* ---------- MUBACHER: live beacons + panel ---------- */
.fab-live {
  position: fixed; right: 24px; bottom: calc(140px + env(safe-area-inset-bottom));
  display: flex; align-items: center; gap: 7px; padding: 10px 14px;
  border-radius: 999px; z-index: 11; cursor: pointer; color: var(--t1); font: inherit;
  animation: rise 0.8s 0.25s cubic-bezier(0.2, 1.4, 0.3, 1) both;
}
.live-dot {
  width: 9px; height: 9px; border-radius: 50%; background: var(--red);
  box-shadow: 0 0 10px 2px rgba(231,0,19,0.7);
  animation: breathe 1.6s ease-in-out infinite;
}
.live-label { font-size: 12px; font-weight: 800; letter-spacing: 0.12em; }
.fab-live.on { border-color: var(--red); box-shadow: 0 0 24px rgba(231,0,19,0.35); }

.mub-beacon { position: relative; width: 18px; height: 18px; cursor: pointer; }
.mub-beacon .core {
  position: absolute; inset: 4px; border-radius: 50%;
  background: var(--red); box-shadow: 0 0 12px 3px rgba(231,0,19,0.8);
}
.mub-beacon .ring {
  position: absolute; inset: 0; border-radius: 50%;
  border: 2px solid rgba(231,0,19,0.75);
  animation: mubring 2s cubic-bezier(0.2, 0.6, 0.3, 1) infinite;
}
.mub-beacon .tag {
  position: absolute; left: 22px; top: -3px; white-space: nowrap;
  font-size: 10.5px; font-weight: 800; letter-spacing: 0.1em; color: #fff;
  background: rgba(231,0,19,0.85); padding: 2px 7px; border-radius: 6px;
}
@keyframes mubring { 0% { transform: scale(0.6); opacity: 1; } 100% { transform: scale(2.6); opacity: 0; } }

.live-panel {
  position: fixed; left: 14px; bottom: calc(18px + env(safe-area-inset-bottom));
  width: min(360px, calc(100vw - 28px)); max-height: 55vh; z-index: 15;
  display: flex; flex-direction: column; padding: 14px 16px; border-radius: 20px;
  animation: panelup 0.45s cubic-bezier(0.2, 1.3, 0.3, 1) both;
}
@keyframes panelup { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
.lp-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.lp-head h2 { font-size: 14px; letter-spacing: 0.08em; flex: 0 0 auto; }
.lp-head .meta { flex: 1; font-size: 11px; color: var(--t3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lp-stream { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 7px; margin-bottom: 10px; }
.lp-msg { font-size: 13.5px; line-height: 1.45; padding: 8px 11px; border-radius: 12px;
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.08); }
.lp-msg .when { display: block; font-size: 10.5px; color: var(--t3); margin-top: 3px; }
.lp-composer .lp-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.lp-chip { font-size: 11.5px; padding: 5px 9px; border-radius: 999px; cursor: pointer;
  background: rgba(255,255,255,0.08); color: var(--t1); border: 1px solid rgba(255,255,255,0.12); }
.lp-inputrow { display: flex; gap: 7px; }
.lp-inputrow input { flex: 1; background: rgba(255,255,255,0.07); border: 1px solid rgba(255,255,255,0.14);
  border-radius: 10px; padding: 9px 11px; color: var(--t1); font: inherit; font-size: 13px; outline: none; }
.lp-send { background: var(--red); color: #fff; border: none; border-radius: 10px;
  padding: 9px 14px; font-weight: 700; cursor: pointer; }
.lp-end { margin-top: 8px; width: 100%; background: none; border: 1px solid rgba(231,0,19,0.5);
  color: var(--red); border-radius: 10px; padding: 8px; font-weight: 700; cursor: pointer; }

/* ---------- declaration markers (public pulse echoes) ---------- */
.decl-marker { width: 10px; height: 10px; border-radius: 50%; transition: opacity 1s; border: 1.5px solid rgba(255,255,255,0.85); }
.decl-marker.power-no { background: var(--red); box-shadow: 0 0 8px 2px rgba(231,0,19,0.6); }
.decl-marker.power-yes { background: var(--pulse); box-shadow: 0 0 8px 2px rgba(61,255,168,0.5); }
.decl-marker.cell-no { background: var(--amber2, #FFB03A); box-shadow: 0 0 8px 2px rgba(255,176,58,0.5); }
.decl-marker.fire-yes { background: var(--ember); box-shadow: 0 0 10px 3px rgba(255,90,42,0.7); }

/* ---------- DIRECT feed ---------- */
.feed {
  position: fixed; right: 14px; top: 84px; z-index: 9; width: 265px;
  padding: 12px 14px; border-radius: 18px; max-height: 34vh; overflow: hidden;
}
.feed h2 { font-size: 12px; letter-spacing: 0.1em; margin-bottom: 8px; }
.feed h2 .meta { font-size: 10px; color: var(--t3); letter-spacing: 0.02em; }
.feed-rows { display: flex; flex-direction: column; gap: 5px; overflow-y: auto; max-height: 26vh; }
.feed-row { font-size: 12px; color: var(--t2); display: flex; gap: 7px; align-items: baseline;
  animation: fadein 0.4s both; }
.feed-row b { color: var(--t1); font-weight: 600; }
.feed-row .when { margin-left: auto; font-size: 10px; color: var(--t3); flex: 0 0 auto; }

/* ---------- onboarding ---------- */
#onboarding { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; }
#onboarding.hidden { display: none; }
.ob-backdrop { position: absolute; inset: 0; background: rgba(3,5,10,0.72); backdrop-filter: blur(8px); }
.ob-card { position: relative; width: min(400px, calc(100vw - 40px)); padding: 28px 26px 22px;
  border-radius: 26px; text-align: center; animation: logoignite 0.7s cubic-bezier(0.2, 1.2, 0.3, 1) both; }
.ob-logo { width: 64px; height: 64px; margin-bottom: 12px; filter: drop-shadow(0 0 18px rgba(231,0,19,0.4)); }
.ob-card h2 { font-size: 17px; letter-spacing: 0.06em; margin-bottom: 10px; }
.ob-card p { font-size: 13.5px; color: var(--t2); line-height: 1.65; min-height: 88px; }
.ob-dots { display: flex; justify-content: center; gap: 6px; margin: 12px 0 16px; }
.ob-dots i { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,0.2); }
.ob-dots i.on { background: var(--red); }
.ob-actions { display: flex; justify-content: space-between; align-items: center; }
.ob-next { background: var(--red); color: #fff; border: none; border-radius: 12px;
  padding: 10px 22px; font-weight: 800; letter-spacing: 0.06em; cursor: pointer; }

.help-btn {
  position: fixed; left: 14px; bottom: calc(18px + env(safe-area-inset-bottom));
  width: 34px; height: 34px; border-radius: 50%; z-index: 10; cursor: pointer;
  color: var(--t2); font-size: 15px; font-weight: 700;
}

/* ---------- mobile: pills scroll under the topbar ---------- */
@media (max-width: 640px) {
  .layerpills { top: calc(max(14px, env(safe-area-inset-top)) + 62px); right: 10px; left: 10px;
    overflow-x: auto; scrollbar-width: none; }
  .layerpills::-webkit-scrollbar { display: none; }
  .feed { top: auto; right: 10px; bottom: calc(150px + env(safe-area-inset-bottom)); width: 210px; max-height: 24vh; }
  .live-panel { max-height: 48vh; }
  .help-btn { bottom: calc(120px + env(safe-area-inset-bottom)); }
}

/* ---------- MapLibre popups: glass, never white slop ---------- */
.maplibregl-popup-content {
  background: rgba(13,18,28,0.94); color: #F2F5FA;
  border: 1px solid rgba(255,255,255,0.14); border-radius: 12px;
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  font: inherit; font-size: 12.5px; line-height: 1.5; padding: 10px 12px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.55); max-width: 260px;
}
.maplibregl-popup-tip { border-top-color: rgba(13,18,28,0.94) !important; }
.maplibregl-popup-anchor-bottom .maplibregl-popup-tip { border-top-color: rgba(13,18,28,0.94) !important; }
.maplibregl-popup-anchor-top .maplibregl-popup-tip { border-bottom-color: rgba(13,18,28,0.94) !important; }
.maplibregl-popup-anchor-left .maplibregl-popup-tip { border-right-color: rgba(13,18,28,0.94) !important; }
.maplibregl-popup-anchor-right .maplibregl-popup-tip { border-left-color: rgba(13,18,28,0.94) !important; }

/* ---------- fires: living flame + wind spread cone ---------- */
.fire-node { position: relative; pointer-events: auto; cursor: pointer; }
.fire-node .flame {
  position: absolute; inset: 22%; border-radius: 50% 50% 50% 50% / 62% 62% 38% 38%;
  background: radial-gradient(circle at 50% 72%, #FFF3B0 0%, #FFB03A 34%, #FF5A2A 62%, rgba(231,0,19,0.0) 100%);
  filter: blur(0.4px);
  animation: flameflicker 0.9s ease-in-out infinite alternate;
  transform-origin: 50% 90%;
}
.fire-node .heat {
  position: absolute; inset: 0; border-radius: 50%;
  box-shadow: 0 0 18px 6px rgba(255,90,42,0.45);
  animation: breathe 1.8s ease-in-out infinite;
}
.fire-node .ember {
  position: absolute; width: 4px; height: 4px; border-radius: 50%;
  background: #FFD36B; box-shadow: 0 0 6px 2px rgba(255,211,107,0.8);
  animation: emberrise 1.6s linear infinite;
}
.fire-node .ember.e1 { left: 38%; animation-delay: 0s; }
.fire-node .ember.e2 { left: 58%; animation-delay: 0.8s; }
@keyframes flameflicker {
  0% { transform: scaleY(1) scaleX(1) rotate(-2deg); }
  50% { transform: scaleY(1.14) scaleX(0.94) rotate(2deg); }
  100% { transform: scaleY(0.96) scaleX(1.05) rotate(-1deg); }
}
@keyframes emberrise {
  0% { transform: translateY(0) scale(1); opacity: 1; }
  100% { transform: translateY(-26px) scale(0.3); opacity: 0; }
}

.spread-cone { position: relative; height: 34px; cursor: pointer; }
.spread-cone .cone-body {
  position: absolute; inset: 0;
  clip-path: polygon(0 32%, 100% 0, 100% 100%, 0 68%);
  background: linear-gradient(90deg, rgba(255,90,42,0.55), rgba(255,90,42,0.18) 55%, transparent);
  animation: conebreathe 2.4s ease-in-out infinite;
}
.spread-cone .cone-ember {
  position: absolute; top: 45%; width: 5px; height: 5px; border-radius: 50%;
  background: #FFB03A; box-shadow: 0 0 6px 2px rgba(255,176,58,0.7);
  animation: coneflow 1.8s linear infinite;
}
.spread-cone .cone-ember.b { animation-delay: 0.9s; }
@keyframes conebreathe { 0%,100% { opacity: 0.85; } 50% { opacity: 0.5; } }
@keyframes coneflow {
  0% { left: 4%; opacity: 1; }
  100% { left: 92%; opacity: 0; }
}

/* ---------- beacon hit area ---------- */
.mub-beacon::before { content: ""; position: absolute; inset: -12px; }

/* ---------- onboarding text fade ---------- */
#ob-title, #ob-text { transition: opacity 0.15s ease; }

/* ---------- DHIWAN panel ---------- */
.dhiwan-panel {
  position: fixed; right: 14px; top: 130px; z-index: 14;
  width: min(340px, calc(100vw - 28px)); max-height: 52vh;
  display: flex; flex-direction: column; padding: 14px 16px; border-radius: 20px;
  animation: panelup 0.45s cubic-bezier(0.2, 1.3, 0.3, 1) both;
}
.dhiwan-panel h2 { font-size: 14px; letter-spacing: 0.1em; }
.dw-room {
  flex: 1; background: rgba(255,255,255,0.07); color: #F2F5FA;
  border: 1px solid rgba(255,255,255,0.14); border-radius: 10px;
  padding: 6px 8px; font: inherit; font-size: 12.5px; outline: none;
}
.dw-room option { background: #0D121C; }
.dw-stream { min-height: 120px; }

/* ---------- map legend ---------- */
.legend {
  position: fixed; left: 50%; bottom: calc(16px + env(safe-area-inset-bottom));
  transform: translateX(-50%); z-index: 8;
  display: flex; gap: 14px; padding: 8px 16px; border-radius: 999px;
  font-size: 10.5px; color: var(--t2); white-space: nowrap;
}
.lg-row { display: flex; align-items: center; gap: 6px; }
.legend span { display: inline-block; width: 12px; height: 12px; flex: 0 0 auto; }
.lg-cut { border: 2px solid var(--red); border-radius: 50%; background: rgba(231,0,19,0.28); }
.lg-line { height: 2px !important; background: rgba(125,249,255,0.55); }
.lg-node { background: #7DF9FF; border-radius: 50%; border: 1px solid rgba(5,7,13,0.9); }
.lg-fire { background: radial-gradient(circle at 50% 70%, #FFF3B0, #FFB03A 45%, #FF5A2A 75%, transparent); border-radius: 50%; }
.lg-live { background: var(--red); border-radius: 50%; box-shadow: 0 0 6px 2px rgba(231,0,19,0.7); }
.lg-decl { background: var(--red); border-radius: 50%; border: 1.5px solid rgba(255,255,255,0.85); }

@media (max-width: 900px) {
  .legend { display: none; }
}
@media (max-width: 640px) {
  .dhiwan-panel { top: auto; bottom: calc(150px + env(safe-area-inset-bottom)); max-height: 44vh; }
}

/* ---------- street seam honest card ---------- */
.street-card {
  position: fixed; left: 50%; top: 96px; transform: translateX(-50%);
  z-index: 30; max-width: min(420px, calc(100vw - 40px));
  padding: 14px 18px; border-radius: 16px; font-size: 12.5px; line-height: 1.6;
  color: var(--t2); animation: drop 0.5s cubic-bezier(0.2, 1.4, 0.3, 1) both;
}
.street-card b { color: var(--t1); }

/* ---------- news ticker (the channel bar, shows everything) ---------- */
.ticker {
  position: fixed; left: 50%; bottom: calc(16px + env(safe-area-inset-bottom));
  transform: translateX(-50%); z-index: 12;
  display: flex; align-items: stretch; width: min(880px, calc(100vw - 230px));
  border-radius: 14px; overflow: hidden;
  background: rgba(10,14,22,0.92); border: 1px solid rgba(255,255,255,0.14);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 16px 50px rgba(0,0,0,0.5);
}
.tk-badge {
  display: flex; align-items: center; background: var(--red); color: #fff;
  font-size: 11px; font-weight: 800; letter-spacing: 0.12em; padding: 0 14px;
  animation: breathe 1.8s ease-in-out infinite; flex: 0 0 auto;
}
.tk-mask { flex: 1; overflow: hidden; display: flex; align-items: center; }
.tk-track { display: inline-flex; gap: 40px; white-space: nowrap; padding: 10px 0;
  animation: tkscroll 45s linear infinite; will-change: transform; }
.ticker:hover .tk-track { animation-play-state: paused; }
@keyframes tkscroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.tk-item { font-size: 12px; color: var(--t2); }
.tk-item b { color: var(--t1); font-weight: 700; }
.tk-item .hot { color: var(--ember); font-weight: 700; }
@media (max-width: 900px) { .ticker { width: calc(100vw - 28px); } }

/* ---------- wind canvas ---------- */
#wind-canvas {
  position: absolute; inset: 0; z-index: 2; pointer-events: none;
}

/* ---------- fire smoke drifting downwind ---------- */
.fire-node .smoke {
  position: absolute; left: 42%; top: 18%; width: 9px; height: 9px; border-radius: 50%;
  background: rgba(165,170,180,0.35); filter: blur(3px);
  animation: smokedrift 3.2s linear infinite;
}
@keyframes smokedrift {
  0% { transform: translate(0, 0) scale(0.6); opacity: 0.55; }
  100% { transform: translate(var(--wx, 14px), var(--wy, -30px)) scale(2.2); opacity: 0; }
}

/* ---------- live video ---------- */
.lp-video {
  width: 100%; max-height: 34vh; border-radius: 12px; margin-bottom: 10px;
  background: #000; border: 1px solid rgba(255,255,255,0.12);
}
.lp-cam {
  margin-top: 8px; width: 100%; background: rgba(255,211,107,0.12);
  border: 1px solid rgba(255,211,107,0.45); color: var(--gold);
  border-radius: 10px; padding: 8px; font-weight: 700; cursor: pointer;
}

/* ---------- accounts ---------- */
.acc-btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px;
  border-radius: 999px; cursor: pointer; color: var(--t1); font: inherit; font-size: 12px;
  background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.14);
  margin-left: 4px; transition: background 0.25s;
}
.acc-btn:hover { background: rgba(255,255,255,0.16); }
.acc-modal { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; }
.acc-modal.hidden, .acc-panel.hidden { display: none; }
.acc-card { position: relative; width: min(380px, calc(100vw - 40px)); padding: 22px;
  border-radius: 22px; display: flex; flex-direction: column; gap: 12px; max-height: 86vh; overflow-y: auto; }
.acc-wide { width: min(480px, calc(100vw - 40px)); }
.acc-brandbar { display: flex; align-items: center; gap: 12px; padding-bottom: 12px;
  border-bottom: 1px solid rgba(255,255,255,0.09); margin-bottom: 2px; }
.acc-brandbar img { width: 42px; height: 42px; filter: drop-shadow(0 0 12px rgba(231,0,19,0.4)); }
.acc-brandbar b { font-size: 13.5px; letter-spacing: 0.14em; display: block; }
.acc-brandbar span { font-size: 11px; color: var(--t3); display: block; margin-top: 2px; }
.acc-tabs { display: flex; gap: 6px; }
.acc-tabs button { flex: 1; padding: 8px; border-radius: 10px; background: rgba(255,255,255,0.06);
  color: var(--t2); border: 1px solid rgba(255,255,255,0.1); cursor: pointer; font: inherit; font-size: 12.5px; }
.acc-tabs button.on { background: rgba(231,0,19,0.18); color: var(--t1); border-color: rgba(231,0,19,0.5); }
.acc-pane { display: flex; flex-direction: column; gap: 10px; }
.acc-pane.hidden { display: none; }
.acc-pane input, .acc-row input[type=text], #fr-q {
  background: rgba(255,255,255,0.07); border: 1px solid rgba(255,255,255,0.14);
  border-radius: 10px; padding: 10px 12px; color: var(--t1); font: inherit; font-size: 13px; outline: none;
}
.acc-go { background: var(--red); color: #fff; border: none; border-radius: 10px;
  padding: 10px; font-weight: 800; cursor: pointer; letter-spacing: 0.04em; }
.acc-mini { background: rgba(255,211,107,0.15); color: var(--gold); border: 1px solid rgba(255,211,107,0.4);
  border-radius: 8px; padding: 4px 10px; font-size: 11.5px; cursor: pointer; }
.acc-err { color: var(--ember); font-size: 12px; min-height: 14px; }
.acc-close { align-self: center; }
.acc-codes { background: rgba(231,0,19,0.08); border: 1px solid rgba(231,0,19,0.3);
  border-radius: 12px; padding: 12px; font-size: 12.5px; display: flex; flex-direction: column; gap: 8px; }
.acc-codes.hidden { display: none; }
.acc-codes #as-codes-list { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.acc-codes code { background: rgba(0,0,0,0.35); padding: 4px 7px; border-radius: 6px; font-size: 11px; }
.acc-head { display: flex; justify-content: space-between; align-items: center; font-size: 16px; }
.acc-sec h3 { font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--t3); margin: 8px 0 6px; }
.acc-row { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--t2); padding: 4px 0; }
.fr-row { justify-content: space-between; }
.hist-stats { font-size: 13px; color: var(--t2); line-height: 1.6; }
.acc-panel { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; }

/* ---------- cut card (built to be screenshotted and shared) ---------- */
.cut-card {
  position: relative; width: min(600px, calc(100vw - 32px)); padding: 34px 36px 22px;
  border-radius: 28px; overflow: hidden;
  background: linear-gradient(135deg, #0A0F18 0%, #1A0A10 100%);
  border: 2px solid rgba(231,0,19,0.55);
  box-shadow: 0 40px 120px rgba(0,0,0,0.7), 0 0 60px rgba(231,0,19,0.15);
  display: flex; flex-direction: column; gap: 10px; z-index: 71;
}
.cc-logo { position: absolute; right: 20px; top: 20px; width: 62px; height: 62px;
  filter: drop-shadow(0 0 18px rgba(231,0,19,0.5)); }
.cc-brand { font-size: 15px; font-weight: 800; letter-spacing: 0.22em; }
.cc-handle { font-size: 13px; color: var(--t2); }
.cc-big span { font-size: 110px; font-weight: 800; color: var(--red); line-height: 1;
  text-shadow: 0 0 50px rgba(231,0,19,0.45); }
.cc-big small { display: block; font-size: 15px; color: var(--t1); font-weight: 600; margin-top: 4px; }
.cc-grid { display: flex; gap: 26px; margin-top: 8px; }
.cc-grid div { display: flex; flex-direction: column; }
.cc-grid b { font-size: 26px; color: var(--gold); }
.cc-grid span { font-size: 11px; color: var(--t3); }
.cc-govs { font-size: 12px; color: var(--t3); }
.cc-foot { margin-top: 10px; font-size: 12px; color: var(--t3); }
.cc-actions { display: flex; gap: 10px; margin-top: 6px; }

/* ---------- flight card ---------- */
.flight-card { display: flex; flex-direction: column; gap: 6px; min-width: 240px; }
.fc-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.fc-head b { font-size: 15px; }
.fc-head span { font-size: 11px; color: var(--t3); }
.fc-route { font-size: 13px; color: var(--gold); font-weight: 600; }
.fc-meta { font-size: 11.5px; color: var(--t2); }
.fc-img { width: 100%; border-radius: 8px; margin-top: 4px; }
.fc-credit { font-size: 10px; color: var(--t3); }

/* ---------- friend chat ---------- */
.chat-panel {
  position: fixed; right: 14px; bottom: calc(80px + env(safe-area-inset-bottom));
  width: min(320px, calc(100vw - 28px)); max-height: 46vh; z-index: 16;
  display: flex; flex-direction: column; padding: 12px 14px; border-radius: 18px;
  animation: panelup 0.4s cubic-bezier(0.2, 1.3, 0.3, 1) both;
}
.chat-panel.hidden { display: none; }
.lp-msg.mine { background: rgba(231,0,19,0.14); border-color: rgba(231,0,19,0.3); align-self: flex-end; }

/* ---------- embedded camera player ---------- */
.cam-card { display: flex; flex-direction: column; gap: 6px; min-width: 300px; }
.cam-src { font-size: 11px; color: var(--t3); }
.cam-frame { width: 100%; aspect-ratio: 16/9; border: 0; border-radius: 10px; background: #000; }
.cam-link { color: #5EEAD4; font-size: 12px; }
.maplibregl-popup-close-button { color: #F2F5FA; font-size: 14px; padding: 4px 8px; }

/* ---------- tablet (iPad, small laptops) ---------- */
@media (max-width: 1024px) {
  .topbar { padding: 8px 12px 8px 8px; gap: 7px; }
  .wordmark strong { font-size: 13px; }
  .acc-btn { padding: 4px 9px; font-size: 11px; }
  .layerpills { top: calc(max(14px, env(safe-area-inset-top)) + 58px);
    right: 10px; left: 10px; overflow-x: auto; scrollbar-width: none; }
  .layerpills::-webkit-scrollbar { display: none; }
  #cuts-panel { top: 116px; width: 200px; }
  .feed { width: 220px; }
  .ticker { width: calc(100vw - 28px); }
}

/* ---------- iPhone and small phones ---------- */
@media (max-width: 640px) {
  .topbar { left: 10px; top: max(10px, env(safe-area-inset-top)); padding: 7px 10px 7px 7px; }
  .topbar img:not(.mark) { display: none; }
  .mark { width: 28px; height: 28px; }
  .wordmark strong { font-size: 11.5px; letter-spacing: 0.1em; }
  .wordmark .chip { font-size: 10px; }
  .acc-btn { padding: 4px 8px; font-size: 11px; gap: 4px; }
  .layerpills { top: calc(max(10px, env(safe-area-inset-top)) + 52px); gap: 4px; padding: 5px; }
  .pill { font-size: 11px; padding: 6px 9px; gap: 5px; }
  #cuts-panel { top: 108px; left: 10px; width: 178px; max-height: 36vh; }
  .feed { display: none; }
  .fab { width: 84px; height: 84px; right: 14px; }
  .fab-live { right: 18px; bottom: calc(124px + env(safe-area-inset-bottom)); }
  .ticker { width: calc(100vw - 16px); bottom: calc(8px + env(safe-area-inset-bottom)); }
  .zone { left: 10px; right: 92px; width: auto; max-width: none;
    bottom: calc(110px + env(safe-area-inset-bottom)); padding: 10px 14px; }
  .zone h2 { font-size: 15px; margin-bottom: 2px; }
  .zone p { font-size: 12px; line-height: 1.45; }
  .zone .meta { font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .help-btn { display: none; }
}

/* ---------- small tablets and large phones: pills wrap, never clip ---------- */
@media (max-width: 768px) {
  .layerpills { flex-wrap: wrap; max-width: calc(100vw - 20px); }
  #cuts-panel h2 { font-size: 10px; line-height: 1.5; }
}

/* ---------- dhiwan panel: clear layout, explanation, live state ---------- */
.dhiwan-panel { width: min(400px, calc(100vw - 28px)); }
.dw-status { display: flex; align-items: center; gap: 7px; font-size: 11px; color: var(--t3); margin-bottom: 8px; }
.dw-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--pulse); box-shadow: 0 0 8px 2px rgba(61,255,168,0.5); }
.dw-dot.off { background: var(--ember); box-shadow: 0 0 8px 2px rgba(255,90,42,0.5); }
.dw-explain { font-size: 12px; color: var(--t2); line-height: 1.6; margin-bottom: 10px;
  padding: 9px 11px; background: rgba(255,255,255,0.05); border-radius: 10px; }
.dw-meta { font-size: 11px; color: var(--t3); margin-bottom: 6px; }

/* ---------- systems drawer (proof of life) ---------- */
.sys-drawer {
  position: fixed; top: calc(max(14px, env(safe-area-inset-top)) + 62px); left: 14px; z-index: 13;
  width: min(320px, calc(100vw - 28px)); max-height: 60vh; overflow-y: auto;
  padding: 14px 16px; border-radius: 18px;
  animation: panelup 0.4s cubic-bezier(0.2, 1.3, 0.3, 1) both;
}
.sys-drawer.hidden { display: none; }
.sys-drawer h2 { font-size: 12px; letter-spacing: 0.1em; margin-bottom: 10px; }
.sys-row { display: flex; align-items: center; gap: 9px; padding: 6px 0; font-size: 12.5px;
  color: var(--t2); border-top: 1px solid rgba(255,255,255,0.05); }
.sys-row b { color: var(--t1); font-weight: 600; }
.sys-dot { width: 8px; height: 8px; border-radius: 50%; flex: 0 0 auto; }
.sys-dot.ok { background: var(--pulse); box-shadow: 0 0 8px 2px rgba(61,255,168,0.45); }
.sys-dot.warn { background: var(--amber2, #FFB03A); box-shadow: 0 0 8px 2px rgba(255,176,58,0.45); }
.sys-dot.off { background: var(--ember); box-shadow: 0 0 8px 2px rgba(255,90,42,0.45); }
.sys-row .meta { margin-left: auto; font-size: 10.5px; color: var(--t3); text-align: right; }

/* ---------- small screens: FAB clear of the ticker, feed hidden, cuts below pills ---------- */
@media (max-width: 1024px) {
  .feed { display: none; }
}
@media (max-width: 768px) {
  #cuts-panel { top: 172px; }
}
@media (max-width: 640px) {
  .ticker { left: 8px; right: auto; transform: none; width: calc(100vw - 128px); }
  .fab { right: 10px; bottom: calc(20px + env(safe-area-inset-bottom)); }
  .fab-live { right: 14px; bottom: calc(128px + env(safe-area-inset-bottom)); }
}

/* ---------- tablet: ticker leaves the FAB its space too ---------- */
@media (max-width: 1024px) and (min-width: 641px) {
  .ticker { left: 8px; right: auto; transform: none; width: calc(100vw - 150px); }
}


/* ---------- legal links ---------- */
.legal-links {
  position: fixed; left: 14px; bottom: calc(60px + env(safe-area-inset-bottom));
  display: flex; gap: 12px; padding: 6px 12px; border-radius: 999px; z-index: 10;
}
.legal-links a { color: var(--t3); font-size: 11px; text-decoration: none; }
.legal-links a:hover { color: var(--t1); }
@media (max-width: 640px) { .legal-links { display: none; } }

/* ---------- live panel: viewers, comments, cam controls ---------- */
.lp-viewers { font-size: 11px; color: var(--gold); margin-bottom: 8px; font-variant-numeric: tabular-nums; }
.lp-comments { max-height: 22vh; border-top: 1px solid rgba(255,255,255,0.08); padding-top: 8px; margin-bottom: 8px; }
.lp-handle { color: var(--gold); font-weight: 700; }
.lp-camrow { display: flex; flex-wrap: wrap; gap: 6px; }
.lp-camrow .lp-cam { flex: 1 1 100%; }
.lp-mini {
  background: rgba(255,255,255,0.08); color: var(--t2);
  border: 1px solid rgba(255,255,255,0.14); border-radius: 8px;
  padding: 6px 10px; font-size: 11.5px; cursor: pointer;
}
.lp-mini.hidden { display: none; }

/* ---------- cuts panel: single-line rows, pinned counts, collapsible ---------- */
#cuts-panel .cut-row { display: flex; align-items: center; gap: 8px; padding: 7px 9px; }
#cuts-panel .cut-name { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap; font-size: 12.5px; color: var(--t1); }
#cuts-panel .cut-gov { flex: 0 0 auto; font-size: 10px; color: var(--t3); }
#cuts-panel .cut-count { flex: 0 0 34px; text-align: right; color: var(--red); font-weight: 700;
  font-variant-numeric: tabular-nums; }
#cuts-panel .cuts-fold { font-size: 10px; color: var(--t3); font-weight: 400; letter-spacing: 0; }
#cuts-panel.collapsed { padding: 8px 12px; cursor: pointer; width: auto; }
#cuts-panel .cuts-chip { font-size: 12px; font-weight: 700; white-space: nowrap; }
#cuts-panel .cuts-chip .meta { font-weight: 400; font-size: 10px; color: var(--t3); }
#cuts-panel h2 { cursor: pointer; }


/* ---------- topbar research link ---------- */
.toplink { color: var(--t2); font-size: 11.5px; text-decoration: none; padding: 5px 10px;
  border-radius: 999px; border: 1px solid rgba(255,255,255,0.12); white-space: nowrap; }
.toplink:hover { color: var(--t1); border-color: rgba(255,255,255,0.3); }
/* Mobile portrait: États et rapports stays VISIBLE (visitors could not find
   it in portrait, Commander order 2026-07-28). The status chip yields space. */
@media (max-width: 640px) {
  .toplink { display: inline-block; font-size: 10.5px; padding: 4px 8px; }
  #status-chip { display: none; }
}


/* ---------- toplink hardened states + legal caps ---------- */
.toplink:link, .toplink:visited, .toplink:hover, .toplink:active {
  color: var(--t2) !important; text-decoration: none !important;
}
.toplink:hover { color: var(--t1) !important; }

/* ---------- water markers ---------- */
.water-marker {
  width: 9px; height: 9px; border-radius: 50%;
  background: rgba(20,184,166,0.95);
  box-shadow: 0 0 8px 2px rgba(20,184,166,0.55);
  border: 1.5px solid rgba(255,255,255,0.85);
}
.water-marker.leak { background: rgba(94,234,212,0.9); box-shadow: 0 0 8px 2px rgba(94,234,212,0.5); }
.pulse-btn.water-no { color: rgba(45,212,191,0.95); }

/* ---------- recovery probe prompt ---------- */
.recovery-prompt {
  position: fixed; left: 50%; bottom: 92px; transform: translateX(-50%);
  z-index: 60; width: min(400px, calc(100vw - 32px));
  padding: 16px 18px; border-radius: 18px;
  background: rgba(10, 14, 24, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(18px) saturate(1.4);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.5);
  animation: rp-in 0.35s cubic-bezier(0.2, 0.9, 0.3, 1.2);
}
@keyframes rp-in { from { opacity: 0; transform: translate(-50%, 16px); } to { opacity: 1; transform: translate(-50%, 0); } }
.recovery-prompt .rp-title { font-size: 13px; font-weight: 700; color: var(--t1); margin-bottom: 6px; }
.recovery-prompt .rp-text { font-size: 12.5px; color: var(--t2); line-height: 1.5; }
.recovery-prompt .rp-text b { color: var(--t1); }
.recovery-prompt .rp-actions { display: flex; gap: 10px; margin-top: 12px; }
.recovery-prompt .rp-btn {
  flex: 1; padding: 10px 12px; border-radius: 12px; font-size: 12.5px; font-weight: 700;
  cursor: pointer; border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.06); color: var(--t1);
  transition: transform 0.15s, background 0.15s;
}
.recovery-prompt .rp-btn:hover { transform: translateY(-1px); background: rgba(255, 255, 255, 0.12); }
.recovery-prompt .rp-btn.rp-yes { background: rgba(52, 211, 153, 0.18); border-color: rgba(52, 211, 153, 0.5); color: #7ef0c0; }
.recovery-prompt .rp-btn.rp-yes:hover { background: rgba(52, 211, 153, 0.3); }
.recovery-prompt .rp-note { margin-top: 10px; font-size: 10.5px; color: var(--t3); line-height: 1.4; }
@media (max-width: 640px) { .recovery-prompt { bottom: 120px; } }

/* ---------- me marker (exact live position) ---------- */
.me-marker { position: relative; width: 18px; height: 18px; }
.me-marker i { position: absolute; inset: 4px; border-radius: 50%;
  background: #4da3ff; border: 2.5px solid #fff; box-shadow: 0 0 10px 2px rgba(77,163,255,0.8); }
.me-marker::before { content: ""; position: absolute; inset: -6px; border-radius: 50%;
  border: 2px solid rgba(77,163,255,0.6); animation: me-ping 2s ease-out infinite; }
@keyframes me-ping { 0% { transform: scale(0.5); opacity: 1; } 100% { transform: scale(2.2); opacity: 0; } }

/* ---------- account-first nudge ---------- */
.acc-nudge {
  position: fixed; left: 50%; bottom: 92px; transform: translateX(-50%);
  z-index: 61; width: min(420px, calc(100vw - 32px));
  padding: 18px 20px; border-radius: 20px;
  background: rgba(10, 14, 24, 0.86); border: 1px solid rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(20px) saturate(1.4); -webkit-backdrop-filter: blur(20px) saturate(1.4);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.55);
  animation: rp-in 0.4s cubic-bezier(0.2, 0.9, 0.3, 1.2);
}
.acc-nudge .an-title { font-size: 15px; font-weight: 800; color: var(--t1); margin-bottom: 6px; letter-spacing: 0.02em; }
.acc-nudge .an-text { font-size: 12.5px; color: var(--t2); line-height: 1.55; }
.acc-nudge .an-actions { display: flex; gap: 10px; margin-top: 12px; }
.an-btn { flex: 1; padding: 11px 12px; border-radius: 12px; font-size: 12.5px; font-weight: 700;
  cursor: pointer; border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.06); color: var(--t1); transition: transform 0.15s, background 0.15s; }
.an-btn:hover { transform: translateY(-1px); }
.an-btn.an-yes { background: linear-gradient(135deg, rgba(231,0,19,0.28), rgba(231,0,19,0.14));
  border-color: rgba(231,0,19,0.55); color: #ff8a95; }
.an-btn.an-yes:hover { background: rgba(231,0,19,0.36); }
.acc-nudge .an-note { margin-top: 10px; font-size: 10.5px; color: var(--t3); }
@media (max-width: 640px) { .acc-nudge { bottom: 118px; } }

/* ---------- PWA install card ---------- */
.install-card {
  position: fixed; left: 50%; bottom: 92px; transform: translateX(-50%);
  z-index: 61; width: min(430px, calc(100vw - 32px));
  display: flex; gap: 14px; align-items: center;
  padding: 16px 18px; border-radius: 20px;
  background: rgba(10, 14, 24, 0.86); border: 1px solid rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(20px) saturate(1.4); -webkit-backdrop-filter: blur(20px) saturate(1.4);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.55);
  animation: rp-in 0.4s cubic-bezier(0.2, 0.9, 0.3, 1.2);
}
.install-card .ic-anim { flex: 0 0 54px; height: 84px; display: grid; place-items: center; }
.install-card .ic-phone { width: 40px; height: 74px; border-radius: 9px;
  border: 2px solid rgba(255,255,255,0.35); position: relative; display: block; }
.install-card .ic-phone i { position: absolute; left: 50%; bottom: 4px; width: 10px; height: 2px;
  background: rgba(255,255,255,0.4); transform: translateX(-50%); border-radius: 2px; }
.ic-anim.share .ic-phone::after { content: ""; position: absolute; left: 50%; bottom: 16px;
  width: 14px; height: 14px; transform: translateX(-50%);
  border: 2px solid #4da3ff; border-radius: 3px; border-top: none;
  animation: ic-tap 1.8s ease-in-out infinite; }
.ic-anim.menu .ic-phone::after { content: "⋮"; position: absolute; right: 3px; top: 2px;
  color: #4da3ff; font-size: 14px; font-weight: 800; animation: ic-tap 1.8s ease-in-out infinite; }
.ic-anim.safari .ic-phone::after { content: ""; position: absolute; left: 50%; top: 30%;
  width: 18px; height: 18px; transform: translateX(-50%);
  border: 2px solid #4da3ff; border-radius: 50%; animation: ic-tap 1.8s ease-in-out infinite; }
@keyframes ic-tap { 0%, 100% { opacity: 0.35; transform: translateX(-50%) scale(0.92); }
  50% { opacity: 1; transform: translateX(-50%) scale(1.08); } }
.ic-anim.menu .ic-phone::after { transform: none; }
@keyframes none {}
.install-card .ic-title { font-size: 14px; font-weight: 800; color: var(--t1); margin-bottom: 6px; }
.install-card .ic-steps { margin: 0 0 10px 16px; padding: 0; font-size: 12px; color: var(--t2); line-height: 1.6; }
.install-card .ic-skip { background: none; border: none; color: var(--t3); font-size: 11px;
  cursor: pointer; text-decoration: underline; padding: 0; }
.install-card .ic-native { margin: 0 0 8px; }
@media (max-width: 640px) { .install-card { bottom: 118px; } }

/* ---------- SOS authorities ---------- */
.sos-btn { color: #ff5b66; font-size: 12px; font-weight: 800; text-decoration: none;
  padding: 5px 12px; border-radius: 999px; border: 1.5px solid rgba(231,0,19,0.6);
  background: rgba(231,0,19,0.14); white-space: nowrap; letter-spacing: 0.06em;
  animation: sos-breathe 2.6s ease-in-out infinite; }
.sos-btn:hover { background: rgba(231,0,19,0.28); color: #ff8a95; }
@keyframes sos-breathe { 0%, 100% { box-shadow: 0 0 0 0 rgba(231,0,19,0.35); }
  50% { box-shadow: 0 0 14px 2px rgba(231,0,19,0.3); } }
.sos-modal { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; }
.sos-card { width: min(480px, calc(100vw - 32px)); max-height: 82vh; overflow-y: auto;
  padding: 20px; border-radius: 22px; background: rgba(10, 14, 24, 0.92);
  border: 1px solid rgba(255,255,255,0.16); backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px); box-shadow: 0 24px 70px rgba(0,0,0,0.6); }
.sos-title { font-size: 16px; font-weight: 800; color: #ff8a95; letter-spacing: 0.04em; margin-bottom: 6px; }
.sos-sub { font-size: 11.5px; color: var(--t2); line-height: 1.5; margin-bottom: 14px; }
.sos-row { display: flex; align-items: center; gap: 14px; padding: 11px 12px; margin-bottom: 8px;
  border-radius: 14px; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.09);
  text-decoration: none; transition: transform 0.15s, background 0.15s; }
.sos-row:hover { transform: translateY(-1px); background: rgba(255,255,255,0.1); }
.sos-row b { flex: 0 0 76px; font-size: 17px; color: #ff8a95; font-variant-numeric: tabular-nums; }
.sos-row span { display: flex; flex-direction: column; }
.sos-row strong { font-size: 13px; color: var(--t1); }
.sos-row em { font-style: normal; font-size: 11px; color: var(--t3); }
.sos-row.sos-form b { color: #4da3ff; font-size: 13px; }
.sos-close { width: 100%; margin-top: 6px; }

/* ---------- consent row: equal aligned buttons (was a broken ghost in flex) ---------- */
.acc-row #geo-yes, .acc-row #geo-no { flex: 1; margin: 0; padding: 12px;
  border-radius: 12px; font-weight: 700; font-size: 13px; text-align: center; }
.acc-row #geo-no { display: block; border: 1px solid rgba(255,255,255,0.16);
  background: rgba(255,255,255,0.06); color: var(--t1); cursor: pointer; }
.acc-row #geo-no:hover { background: rgba(255,255,255,0.12); }

/* ---------- stories: camera signalement ---------- */
.story-fab {
  position: fixed; right: 18px; bottom: 168px; z-index: 55;
  width: 52px; height: 52px; border-radius: 50%;
  display: grid; place-items: center; cursor: pointer;
  background: rgba(10, 14, 24, 0.82); border: 1.5px solid rgba(255,255,255,0.22);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.45);
  color: var(--t1); transition: transform 0.15s, border-color 0.15s;
}
.story-fab svg { width: 24px; height: 24px; }
.story-fab:hover { transform: scale(1.07); border-color: rgba(255,255,255,0.5); }
@media (max-width: 640px) { .story-fab { bottom: 196px; right: 14px; } }

.story-marker { width: 26px; height: 26px; cursor: pointer;
  color: rgb(var(--srgb, 255,255,255));
  filter: drop-shadow(0 0 6px rgba(var(--srgb, 255,255,255), 0.65)); }
.story-marker svg { width: 100%; height: 100%; }
.story-marker::after { content: ""; position: absolute; inset: -4px; border-radius: 50%;
  border: 1.5px solid rgba(var(--srgb, 255,255,255), 0.5);
  animation: me-ping 2.4s ease-out infinite; }
.story-marker { position: relative; }

.story-pop img { width: 100%; border-radius: 10px; display: block; margin-bottom: 8px; }
.story-pop .sp-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.story-pop .sp-head b { font-size: 13px; }
.story-pop .sp-head span { font-size: 10.5px; color: #8a93a6; }
.story-pop .sp-cap { font-size: 12.5px; margin-top: 6px; line-height: 1.45; }
.story-pop .sp-meta { font-size: 10px; color: #8a93a6; margin-top: 6px; }

.story-modal { position: fixed; inset: 0; z-index: 72; display: grid; place-items: center; }
.story-card { width: min(460px, calc(100vw - 28px)); max-height: 88vh; overflow-y: auto;
  padding: 20px; border-radius: 22px; background: rgba(10, 14, 24, 0.94);
  border: 1px solid rgba(255,255,255,0.16); backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px); box-shadow: 0 24px 70px rgba(0,0,0,0.6); }
.story-card .sc-title { font-size: 16px; font-weight: 800; color: var(--t1); margin-bottom: 4px; }
.story-card .sc-sub { font-size: 11.5px; color: var(--t2); line-height: 1.5; margin-bottom: 12px; }
.story-card .sc-shot { width: 100%; aspect-ratio: 4/3; border-radius: 14px;
  border: 1.5px dashed rgba(255,255,255,0.25); display: grid; place-items: center;
  color: var(--t3); font-size: 13px; cursor: pointer; overflow: hidden;
  background: rgba(255,255,255,0.04); transition: border-color 0.2s; }
.story-card .sc-shot:hover { border-color: rgba(255,255,255,0.5); }
.story-card .sc-shot img { width: 100%; height: 100%; object-fit: cover; }
.story-card .sc-kinds { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0; }
.sc-kind { padding: 7px 11px; border-radius: 999px; font-size: 11.5px; font-weight: 700;
  cursor: pointer; border: 1px solid rgba(var(--srgb), 0.4); color: rgb(var(--srgb));
  background: rgba(var(--srgb), 0.08); transition: background 0.15s; }
.sc-kind.on { background: rgba(var(--srgb), 0.28); border-color: rgba(var(--srgb), 0.9);
  box-shadow: 0 0 10px rgba(var(--srgb), 0.3); }
.story-card #sc-caption { width: 100%; padding: 11px 12px; border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.14); background: rgba(255,255,255,0.05);
  color: var(--t1); font: inherit; font-size: 13px; }
.story-card .sc-foot { display: flex; align-items: center; gap: 10px; margin-top: 12px; }
.story-card .sc-foot span { flex: 1; font-size: 10.5px; color: var(--t3); }
.story-card .sc-foot .an-btn { flex: 0 0 auto; padding: 10px 18px; }
.story-card .sc-foot .an-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.story-card .sc-err { color: #ff8a95; font-size: 11.5px; margin-top: 8px; min-height: 14px; }

/* ---------- topbar: never wider than the screen (mobile overflow fix) ---------- */
.topbar { max-width: calc(100vw - 28px); }
@media (max-width: 640px) {
  .topbar { right: 10px; flex-wrap: wrap; row-gap: 4px; }
  .topbar .wordmark { flex: 1 1 auto; min-width: 0; }
  .topbar .wordmark strong { font-size: 11px; letter-spacing: 0.08em; }
  .topbar .toplink { order: 4; }
  .topbar .sos-btn { order: 3; padding: 4px 10px; font-size: 11px; }
  .topbar .acc-btn { order: 5; }
}

/* ---------- zone card: closable + swipe-to-dismiss ---------- */
#zone-card .zone-close { position: absolute; top: 8px; right: 10px;
  background: none; border: none; color: var(--t3); font-size: 16px;
  cursor: pointer; padding: 4px; line-height: 1; }
#zone-card .zone-close:hover { color: var(--t1); }
#zone-card { touch-action: pan-y; transition: transform 0.25s ease, opacity 0.25s ease; }
#zone-card.swiping { transition: none; }

/* ---------- recenter FAB ---------- */
.recenter-fab {
  position: fixed; right: 18px; bottom: 104px; z-index: 55;
  width: 52px; height: 52px; border-radius: 50%;
  display: grid; place-items: center; cursor: pointer;
  background: rgba(10, 14, 24, 0.82); border: 1.5px solid rgba(255,255,255,0.22);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.45);
  color: var(--t1); transition: transform 0.15s, border-color 0.15s;
}
.recenter-fab svg { width: 24px; height: 24px; }
.recenter-fab:hover { transform: scale(1.07); border-color: rgba(255,255,255,0.5); }
@media (max-width: 640px) { .recenter-fab { bottom: 136px; right: 14px; } }

/* ---------- me marker: white-gold (palette disambiguation) ---------- */
.me-marker i { background: #ffffff; border: 2.5px solid var(--gold);
  box-shadow: 0 0 12px 3px rgba(255,211,107,0.85); }
.me-marker::before { border-color: rgba(255,211,107,0.65); }

/* ---------- power infra nodes: violet, never confused with water ---------- */

/* ---------- illustrated onboarding scenes ---------- */
#ob-scene { height: 130px; display: grid; place-items: center; margin-bottom: 6px;
  transition: opacity 0.18s; }
.ob-svg { width: 220px; height: 130px; }
.ob-pin { animation: ob-pop 2.2s ease-in-out infinite; transform-origin: center; transform-box: fill-box; }
.ob-pin.p2 { animation-delay: 0.5s; }
.ob-pin.p3 { animation-delay: 1s; }
@keyframes ob-pop { 0%, 100% { transform: scale(1); opacity: 0.85; } 50% { transform: scale(1.35); opacity: 1; } }
.ob-ring { animation: ob-ping 2s ease-out infinite; transform-origin: center; transform-box: fill-box; }
@keyframes ob-ping { 0% { transform: scale(0.6); opacity: 1; } 100% { transform: scale(2.4); opacity: 0; } }
.ob-bolt { animation: ob-bolt 1.6s ease-in-out infinite; transform-origin: center; transform-box: fill-box; }
@keyframes ob-bolt { 0%, 100% { opacity: 0.75; transform: scale(1); } 50% { opacity: 1; transform: scale(1.08); filter: drop-shadow(0 0 8px rgba(255,211,107,0.8)); } }
.ob-drop { animation: ob-drop 2.4s ease-in-out infinite; transform-origin: center top; transform-box: fill-box; }
@keyframes ob-drop { 0% { transform: translateY(-6px); opacity: 0.6; } 40% { transform: translateY(0); opacity: 1; } 100% { transform: translateY(0); opacity: 0.9; } }
.ob-flame { animation: ob-flame 1.1s ease-in-out infinite; transform-origin: center bottom; transform-box: fill-box; }
@keyframes ob-flame { 0%, 100% { transform: scaleY(1) scaleX(1); } 35% { transform: scaleY(1.06) scaleX(0.97); } 70% { transform: scaleY(0.96) scaleX(1.03); } }
.ob-wind { animation: ob-wind 2.6s linear infinite; stroke-dasharray: 60 20; }
@keyframes ob-wind { 0% { stroke-dashoffset: 80; opacity: 0.5; } 100% { stroke-dashoffset: 0; opacity: 1; } }
.ob-plane { animation: ob-plane 4s ease-in-out infinite; transform-origin: center; transform-box: fill-box; }
@keyframes ob-plane { 0%, 100% { transform: translate(0, 0) rotate(0deg); } 50% { transform: translate(16px, -8px) rotate(8deg); } }
.ob-orbit { animation: ob-orbit 3.4s linear infinite; stroke-dasharray: 4 6; }
@keyframes ob-orbit { to { stroke-dashoffset: -40; } }
.ob-fab-pulse { animation: ob-fab 2s ease-in-out infinite; transform-origin: center; transform-box: fill-box; }
@keyframes ob-fab { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.1); } }
.ob-check { stroke-dasharray: 50; stroke-dashoffset: 50; animation: ob-check 2.4s ease-in-out infinite; }
@keyframes ob-check { 30% { stroke-dashoffset: 50; } 70%, 100% { stroke-dashoffset: 0; } }
#ob-title { transition: opacity 0.18s; }
#ob-text { transition: opacity 0.18s; }

/* ---------- map style switcher ---------- */
.ms-bar { position: fixed; left: 14px; bottom: 56px; z-index: 55;
  display: flex; gap: 4px; padding: 4px; border-radius: 999px; }
.ms-btn { padding: 6px 11px; border-radius: 999px; font-size: 11px; font-weight: 700;
  cursor: pointer; border: 1px solid transparent; background: none; color: var(--t2);
  transition: background 0.15s, color 0.15s; }
.ms-btn:hover { color: var(--t1); }
.ms-btn.on { background: rgba(255,255,255,0.12); color: var(--t1); border-color: rgba(255,255,255,0.2); }
.ms-btn.ms-sun.on { color: var(--gold); border-color: rgba(255,211,107,0.4); }
@media (max-width: 640px) { .ms-bar { bottom: 96px; left: 10px; } .ms-btn { padding: 5px 8px; font-size: 10px; } }

/* ---------- 2FA settings ---------- */
.tfa-secret { display: block; padding: 10px 12px; border-radius: 10px;
  background: rgba(255,211,107,0.08); border: 1px solid rgba(255,211,107,0.35);
  color: var(--gold); font-size: 15px; letter-spacing: 0.14em; text-align: center;
  user-select: all; margin: 6px 0; }
#tfa-start { color: var(--gold); }

/* ---------- chrome superposition fix (real-device proven 2026-07-28) ---------- */
@media (max-width: 400px) {
  .topbar .wordmark strong { font-size: 10px; letter-spacing: 0.06em; }
  .topbar .toplink { font-size: 10px; padding: 4px 7px; }
  .topbar .sos-btn { font-size: 10px; padding: 4px 8px; }
  .topbar .acc-btn { font-size: 10px; padding: 4px 7px; }
}
/* the pills top is MEASURED by layoutChrome(), the CSS value is fallback only */
@media (max-width: 640px) {
  .layerpills { left: 10px; right: 10px; }
}
/* map attribution: compact info button, never over the ticker */
.maplibregl-ctrl-attrib { font-size: 10px; opacity: 0.75; }
@media (max-width: 640px) {
  .maplibregl-ctrl-attrib { right: auto; left: 10px; bottom: 34px; }
}

/* attribution container: above the ticker, left side, clear of the FABs */
@media (max-width: 640px) {
  .maplibregl-ctrl-bottom-right { left: 10px !important; right: auto !important;
    bottom: 40px !important; }
  .maplibregl-ctrl-bottom-left { display: none; }
}

/* attribution: one-line strip above the ticker, never wrapping, never
   colliding (real-device geometry: ticker top -44px, FAB x 336 at 430px) */
.maplibregl-ctrl-attrib {
  max-width: 58vw; white-space: nowrap; overflow: hidden;
  text-overflow: ellipsis; font-size: 9px !important; line-height: 1.6;
  padding: 2px 8px !important; border-radius: 8px;
  background: rgba(10,14,24,0.72) !important; color: #8a93a6;
}
.maplibregl-ctrl-attrib a { color: #8a93a6; }
@media (max-width: 640px) {
  .maplibregl-ctrl-bottom-right { left: 10px !important; right: auto !important;
    bottom: 48px !important; width: auto !important; }
}
@media (min-width: 641px) {
  .maplibregl-ctrl-bottom-right { bottom: 48px !important; right: 10px !important; }
}

/* ---------- social: badges, profile stats, notifications ---------- */
.sp-badge { font-size: 9.5px; font-weight: 800; padding: 2px 8px; border-radius: 999px;
  letter-spacing: 0.04em; }
.sp-badge.sp-resolved { background: rgba(52,211,153,0.16); color: #7ef0c0;
  border: 1px solid rgba(52,211,153,0.4); }
.sp-badge.sp-pending { background: rgba(255,176,58,0.14); color: #ffb03a;
  border: 1px solid rgba(255,176,58,0.4); }
.sp-handle { color: #4da3ff; font-size: 12px; font-weight: 700; text-decoration: none; }
.sp-handle:hover { text-decoration: underline; }
.sp-resolve { width: 100%; margin-top: 8px; padding: 8px; font-size: 12px; }
.story-marker.resolved { opacity: 0.45; filter: grayscale(0.5); }
.story-marker.resolved::after { display: none; }
.prof-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 14px 0; }
.prof-stats > div { text-align: center; padding: 10px 4px; border-radius: 12px;
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.09); }
.prof-stats b { display: block; font-size: 18px; color: var(--t1); font-variant-numeric: tabular-nums; }
.prof-stats span { font-size: 10px; color: var(--t3); }
.pf-follow { width: 100%; margin-top: 4px; }
.acc-badge { position: absolute; top: -5px; right: -5px; min-width: 17px; height: 17px;
  padding: 0 4px; border-radius: 999px; background: #E70013; color: #fff;
  font-size: 10px; font-weight: 800; display: grid; place-items: center;
  box-shadow: 0 0 8px rgba(231,0,19,0.6); }
.acc-btn { position: relative; }
.notif-list { max-height: 180px; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; }
.notif-row { display: flex; justify-content: space-between; align-items: baseline; gap: 10px;
  padding: 8px 10px; border-radius: 10px; background: rgba(255,255,255,0.04);
  font-size: 12px; color: var(--t2); }
.notif-row.unread { background: rgba(231,0,19,0.08); border-left: 2px solid #E70013; color: var(--t1); }
.notif-row em { font-style: normal; font-size: 10px; color: var(--t3); white-space: nowrap; }
.notif-row b { color: var(--t1); }

/* ---------- FAB stack: one vertical axis + hidden under the pulse sheet ---------- */
/* one axis for the whole FAB stack: the pulse-fab center line is the
   reference (desktop 96px at right:18 -> axis 66; mobile 84px at right:10
   -> axis 52), the 52px FABs center on it exactly */
.story-fab { right: 40px; bottom: 224px; }
.recenter-fab { right: 40px; bottom: 148px; }
@media (max-width: 640px) {
  .story-fab { right: 26px; bottom: 228px; }
  .recenter-fab { right: 26px; bottom: 156px; }
}
/* when the pulse sheet is open, every floating control disappears behind it */
body.sheet-open .story-fab,
body.sheet-open .recenter-fab,
body.sheet-open .ms-bar { display: none !important; }
#pulse-sheet { z-index: 80; }

/* ---------- Le Fil: unified signalement feed ---------- */
.fil-row { display: flex; gap: 10px; padding: 9px 8px; border-radius: 12px;
  background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.06);
  margin-bottom: 6px; }
.fil-thumb { width: 46px; height: 46px; border-radius: 10px; object-fit: cover;
  flex: 0 0 46px; }
.fil-thumb.fil-text-ic { display: grid; place-items: center; font-size: 22px;
  color: rgb(var(--srgb, 255,255,255)); background: rgba(var(--srgb, 159,179,200), 0.12);
  border: 1px solid rgba(var(--srgb, 159,179,200), 0.35); }
.fil-body { flex: 1; min-width: 0; }
.fil-top { display: flex; align-items: baseline; gap: 7px; }
.fil-kind { font-size: 9.5px; font-weight: 800; padding: 1.5px 7px; border-radius: 999px;
  color: rgb(var(--srgb)); background: rgba(var(--srgb), 0.12);
  border: 1px solid rgba(var(--srgb), 0.35); letter-spacing: 0.03em; }
.fil-handle { font-size: 11.5px; font-weight: 700; color: #4da3ff; text-decoration: none; }
.fil-time { margin-left: auto; font-size: 10px; color: var(--t3); }
.fil-text { font-size: 12px; color: var(--t1); line-height: 1.45; margin-top: 4px;
  word-wrap: break-word; }
.fil-actions { display: flex; align-items: center; gap: 6px; margin-top: 7px; }
.fil-act { padding: 4px 9px; border-radius: 999px; font-size: 10.5px; font-weight: 700;
  cursor: pointer; border: 1px solid rgba(255,255,255,0.16);
  background: rgba(255,255,255,0.05); color: var(--t2); transition: background 0.15s; }
.fil-act:hover { background: rgba(255,255,255,0.12); color: var(--t1); }
.fil-act.on { background: rgba(52,211,153,0.16); color: #7ef0c0;
  border-color: rgba(52,211,153,0.45); }
.fil-gov { margin-left: auto; font-size: 10px; color: var(--t3); }

/* ---------- post markers on the map ---------- */
.post-marker { position: relative; width: 22px; height: 22px; border-radius: 6px;
  display: grid; place-items: center; cursor: pointer;
  font-size: 15px; font-weight: 800; color: #05070D;
  background: rgb(var(--srgb, 159,179,200));
  box-shadow: 0 0 8px 2px rgba(var(--srgb, 159,179,200), 0.6); }

/* ---------- composer tabs ---------- */
.sc-tabs { display: flex; gap: 6px; margin-bottom: 12px; }
.sc-tab { flex: 1; padding: 9px; border-radius: 11px; font-size: 12.5px; font-weight: 700;
  cursor: pointer; border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.05); color: var(--t2); transition: all 0.15s; }
.sc-tab.on { background: rgba(231,0,19,0.16); color: #ff8a95; border-color: rgba(231,0,19,0.5); }
.story-card #sc-text { width: 100%; padding: 12px; border-radius: 12px; resize: none;
  border: 1px solid rgba(255,255,255,0.14); background: rgba(255,255,255,0.05);
  color: var(--t1); font: inherit; font-size: 13px; line-height: 1.5; }

/* ---------- votes + issue thread ---------- */
.fil-score { font-size: 12px; font-weight: 800; color: var(--t1);
  font-variant-numeric: tabular-nums; min-width: 18px; text-align: center; }
.fil-up.on { background: rgba(52,211,153,0.2); color: #7ef0c0; border-color: rgba(52,211,153,0.5); }
.fil-down.on { background: rgba(231,0,19,0.18); color: #ff8a95; border-color: rgba(231,0,19,0.5); }
.th-photo { width: 100%; border-radius: 12px; margin: 8px 0; }
.th-timeline { margin-top: 12px; display: flex; flex-direction: column; gap: 8px;
  border-left: 2px solid rgba(255,255,255,0.12); padding-left: 12px; }
.th-row { background: rgba(255,255,255,0.04); border-radius: 10px; padding: 8px 10px; }
.th-row .fil-handle { font-size: 11.5px; }
.th-row .fil-time { margin-left: 8px; }
.th-row.th-resolved { border: 1px solid rgba(52,211,153,0.4); color: #7ef0c0; }
.story-card #th-text { width: 100%; margin-top: 12px; padding: 11px 12px; border-radius: 12px;
  resize: none; border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.05); color: var(--t1); font: inherit; font-size: 13px; }
.th-send { width: 100%; margin-top: 8px; }

/* ---------- research + transparence: mobile-adapted, no sideways scroll ---------- */
@media (max-width: 768px) {
  .wrap table, .wrap thead, .wrap tbody, .wrap tr, .wrap td, .wrap th { display: block; }
  .wrap thead { display: none; }
  .wrap table { width: 100%; }
  .wrap tr { border: 1px solid rgba(255,255,255,0.1); border-radius: 12px;
    margin-bottom: 8px; padding: 8px 10px; background: rgba(255,255,255,0.03); }
  .wrap td { padding: 3px 0; border-top: none !important; font-size: 12.5px; }
  .wrap td:first-child { font-weight: 700; color: var(--t1); }
  .wrap .panel { padding: 14px; }
  .wrap .scroll { max-height: none; overflow-y: visible; }
}

/* ---------- user management + resend note ---------- */
.acc-note { font-size: 11.5px; color: var(--t2); line-height: 1.55;
  background: rgba(255,211,107,0.07); border: 1px solid rgba(255,211,107,0.25);
  border-radius: 10px; padding: 8px 10px; margin: 8px 0; }
.act-danger { border-color: rgba(231,0,19,0.45) !important;
  background: rgba(231,0,19,0.1) !important; color: #ff8a95 !important; }
.act-danger:hover { background: rgba(231,0,19,0.22) !important; }
.um-actions { display: flex; flex-wrap: wrap; gap: 5px; }
.um-actions .act { font-size: 10.5px; padding: 4px 9px; }
@media (max-width: 768px) {
  #accounts .um-actions { gap: 4px; }
  .wrap td .um-actions { margin-top: 6px; }
}

/* ---------- feedback (Avis) button: lives in the topbar ---------- */
.fb-btn { display: inline-flex; align-items: center; gap: 5px; padding: 5px 10px;
  border-radius: 999px; font-size: 11px; font-weight: 700; cursor: pointer;
  color: var(--gold); border: 1px solid rgba(255,211,107,0.35);
  background: rgba(255,211,107,0.08); order: 2; }
.fb-btn:hover { background: rgba(255,211,107,0.18); }
.fb-btn svg { flex: 0 0 auto; }
@media (max-width: 640px) {
  .fb-btn span { display: none; }
  .fb-btn { padding: 5px 8px; }
}
/* star rating inside the Avis modal */
.fb-stars { display: flex; gap: 4px; margin: 4px 0 10px; }
.fb-star { font-size: 26px; background: none; border: none; cursor: pointer;
  color: rgba(255,255,255,0.2); transition: color 0.12s, transform 0.12s; padding: 0 2px; }
.fb-star:hover { transform: scale(1.15); }
.fb-star.on { color: var(--gold); text-shadow: 0 0 10px rgba(255,211,107,0.5); }
.story-card #fb-text { width: 100%; margin: 10px 0; padding: 12px; border-radius: 12px;
  resize: none; border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.05); color: var(--t1); font: inherit; font-size: 13px; }

/* ---------- composer premium + in-app camera ---------- */
.sc-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 10px; }
.sc-head .zone-close { position: static; font-size: 20px; }
.sc-shot { position: relative; width: 100%; aspect-ratio: 4/3; border-radius: 16px;
  border: none; background: rgba(255,255,255,0.03); overflow: hidden; cursor: pointer; }
.sc-shot-idle { position: absolute; inset: 0; display: flex; flex-direction: column;
  gap: 10px; align-items: center; justify-content: center; color: var(--t2); }
.sc-shot-idle svg { width: 40px; height: 40px; color: rgba(255,255,255,0.35); }
.sc-shot-idle span { font-size: 13px; }
.sc-shot img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sc-retake { position: absolute; bottom: 10px; right: 10px; padding: 7px 14px;
  border-radius: 999px; border: 1px solid rgba(255,255,255,0.3); font-size: 11.5px;
  font-weight: 700; color: var(--t1); background: rgba(5,7,13,0.7); cursor: pointer;
  backdrop-filter: blur(8px); }
.sc-viewfinder { position: relative; width: 100%; aspect-ratio: 4/3; border-radius: 16px;
  overflow: hidden; background: #000; }
.sc-viewfinder video { width: 100%; height: 100%; object-fit: cover; }
.sc-vf-controls { position: absolute; bottom: 12px; left: 0; right: 0;
  display: flex; justify-content: center; align-items: center; gap: 26px; }
.sc-shutter { width: 58px; height: 58px; border-radius: 50%; border: 4px solid #fff;
  background: rgba(255,255,255,0.25); cursor: pointer; transition: transform 0.1s; }
.sc-shutter:active { transform: scale(0.9); background: #fff; }
.sc-vf-btn { width: 40px; height: 40px; border-radius: 50%; border: none;
  background: rgba(5,7,13,0.65); color: #fff; font-size: 15px; font-weight: 700;
  cursor: pointer; backdrop-filter: blur(8px); }
/* kind chips: neutral glass, one colored dot, no rainbow borders */
.sc-kind { display: inline-flex; align-items: center; gap: 6px; padding: 7px 11px;
  border-radius: 999px; font-size: 11.5px; font-weight: 700; cursor: pointer;
  border: 1px solid rgba(255,255,255,0.12); color: var(--t2);
  background: rgba(255,255,255,0.04); transition: all 0.15s; }
.sc-kind .sc-dot { width: 7px; height: 7px; border-radius: 50%;
  background: rgb(var(--srgb)); box-shadow: 0 0 6px rgba(var(--srgb), 0.7); }
.sc-kind.on { background: rgba(255,255,255,0.1); color: var(--t1);
  border-color: rgba(var(--srgb), 0.6); }
.sc-pos-ok { color: #7ef0c0; font-size: 10.5px; font-weight: 700; }
.sc-pos-ok::before { content: "✓ "; }

/* ---------- Le Fil: Instagram-grade cards, hoods, search ---------- */
.fil-header { margin-bottom: 10px; }
.fil-title { font-size: 13px; font-weight: 800; letter-spacing: 0.06em; margin-bottom: 8px; }
.fil-title .meta { font-weight: 400; font-size: 10px; letter-spacing: 0; }
.fil-scopes { display: flex; gap: 4px; margin-bottom: 8px; }
.fil-scope { flex: 1; padding: 6px 8px; border-radius: 999px; font-size: 10.5px;
  font-weight: 700; cursor: pointer; border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.04); color: var(--t2); transition: all 0.15s; }
.fil-scope.on { background: rgba(255,255,255,0.12); color: var(--t1);
  border-color: rgba(255,255,255,0.3); }
#fil-search { width: 100%; padding: 9px 12px; border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.12); background: rgba(255,255,255,0.05);
  color: var(--t1); font: inherit; font-size: 12px; }
.fil-aresult { display: flex; justify-content: space-between; align-items: baseline;
  width: 100%; padding: 8px 10px; margin-top: 5px; border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.1); background: rgba(255,255,255,0.05);
  color: var(--t1); font-size: 12px; cursor: pointer; text-align: left; }
.fil-aresult:hover { background: rgba(255,255,255,0.1); }
.fil-aresult span { font-size: 10px; color: var(--t3); }
.fil-hood { font-size: 10px; font-weight: 800; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--t3); margin: 12px 2px 6px; }
.fil-card { border-radius: 16px; overflow: hidden; margin-bottom: 10px;
  background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08); }
.fil-card-top { display: flex; align-items: baseline; gap: 7px; padding: 10px 12px 8px; }
.fil-photo { width: 100%; display: block; max-height: 320px; object-fit: cover; }
.fil-card .fil-actions { padding: 8px 12px 4px; margin-top: 0; }
.fil-card .fil-text { padding: 0 12px 10px; margin-top: 4px; }
.fil-cap-h { font-size: 12px; }

/* ---------- account panel: hero + card sections ---------- */
.ap-hero { display: flex; align-items: center; gap: 12px; padding: 6px 2px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.09); margin-bottom: 12px; }
.ap-avatar { width: 46px; height: 46px; border-radius: 50%; flex: 0 0 46px;
  display: grid; place-items: center; font-size: 16px; font-weight: 800; color: #fff;
  background: linear-gradient(135deg, rgba(231,0,19,0.65), rgba(255,122,42,0.55));
  box-shadow: 0 4px 16px rgba(231,0,19,0.35); }
.ap-id { flex: 1; min-width: 0; }
.ap-id b { display: block; font-size: 16px; color: var(--t1); }
.ap-id span { font-size: 10.5px; color: var(--t3); }
.acc-panel .acc-sec { background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.07); border-radius: 14px;
  padding: 12px 14px; margin-bottom: 10px; }
.acc-panel .acc-sec h3 { font-size: 11px; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--t3); margin-bottom: 8px; }
.acc-panel .acc-card { max-height: 86vh; overflow-y: auto; }
