/* ============================================================
   Fbenz — design system (reference: Fineapp).
   Clean rounded cards · racing red accent · deep-navy dark + light.
   ============================================================ */
:root{
  --red:#E8132B; --red-2:#F0203A; --red-soft:rgba(232,19,43,.14);
  /* status semantics (distinct from brand red; always paired with icon+label) */
  --st-yes:#1FBF75; --st-queue:#F5921B; --st-low:#F4C732; --st-no:#FF3B5C; --st-nodata:#8A8FA8;
  --st-yes-bg:rgba(31,191,117,.16); --st-queue-bg:rgba(245,146,27,.16);
  --st-low-bg:rgba(244,199,50,.18); --st-no-bg:rgba(255,59,92,.16); --st-nodata-bg:rgba(138,143,168,.16);
  --r:18px; --r-sm:12px; --r-lg:24px; --r-pill:999px;
  --f:"Manrope",system-ui,-apple-system,Segoe UI,Roboto,sans-serif;
  --sheet-max:520px; --panel-w:392px;
  --ease:cubic-bezier(.22,.61,.36,1);
  --safe-b:env(safe-area-inset-bottom,0px);
}
html[data-theme="dark"]{
  --bg:#101225; --surface:#181A30; --surface-2:#1F2240; --surface-3:#262A4D;
  --text:#EEF0F8; --text-2:#A4A9C6; --text-3:#71769A;
  --line:rgba(255,255,255,.08); --line-2:rgba(255,255,255,.13);
  --btn-fill:#F4F5FB; --btn-fill-text:#15172A;
  --shadow:0 18px 50px rgba(0,0,0,.45); --shadow-sm:0 6px 20px rgba(0,0,0,.35);
  --glow:radial-gradient(120% 90% at 100% 0%, rgba(232,19,43,.14), transparent 55%);
  /* darken the light "voyager" tiles into a clean dark map (no dark_all tile-edge banding) */
  --tile-filter:invert(1) hue-rotate(180deg) brightness(.92) contrast(.9) saturate(.85);
}
html[data-theme="light"]{
  --bg:#EEF0F5; --surface:#FFFFFF; --surface-2:#F5F6FA; --surface-3:#EBEDF3;
  --text:#181B2B; --text-2:#5A5F76; --text-3:#9499AE;
  --line:rgba(20,22,45,.09); --line-2:rgba(20,22,45,.14);
  --btn-fill:#23263C; --btn-fill-text:#FFFFFF;
  --shadow:0 18px 50px rgba(60,64,90,.20); --shadow-sm:0 6px 18px rgba(60,64,90,.14);
  --glow:radial-gradient(120% 90% at 100% 0%, rgba(232,19,43,.07), transparent 55%);
  --tile-filter:none;
  /* darker status hues for WCAG-AA contrast on the light surface */
  --st-yes:#0d8a4f; --st-queue:#b1620a; --st-low:#8a6d00; --st-no:#c41f37; --st-nodata:#565b73;
}
*{box-sizing:border-box}
html,body{height:100%;margin:0}
body{
  font-family:var(--f); background:var(--bg); color:var(--text);
  overflow:hidden; -webkit-font-smoothing:antialiased; text-rendering:optimizeLegibility;
  font-size:15px; line-height:1.45;
}
button{font-family:inherit;cursor:pointer;color:inherit;border:0;background:none}
a{color:inherit;text-decoration:none}
:focus-visible{outline:2.5px solid var(--red);outline-offset:2px;border-radius:8px}
::-webkit-scrollbar{width:8px;height:8px}
::-webkit-scrollbar-thumb{background:var(--line-2);border-radius:8px}

/* ---------------- MAP ---------------- */
#map{position:fixed;inset:0;z-index:1;background:var(--bg)}
.leaflet-container{background:var(--bg);font-family:var(--f)}
.leaflet-tile-pane{filter:var(--tile-filter)}
.leaflet-control-zoom{display:none}
.leaflet-control-attribution{
  background:transparent!important;color:var(--text-3)!important;font-size:10px;
  padding:2px 6px;backdrop-filter:blur(4px);
}
.leaflet-control-attribution a{color:var(--text-3)!important}

/* marker pin (status colored) */
.pin{
  width:30px;height:30px;border-radius:50% 50% 50% 0;transform:rotate(-45deg);
  display:grid;place-items:center;border:2.5px solid #fff;
  box-shadow:0 4px 10px rgba(0,0,0,.4);
}
.pin svg{width:15px;height:15px;transform:rotate(45deg);fill:#fff}
.pin.s-yes{background:var(--st-yes)} .pin.s-queue{background:var(--st-queue)}
.pin.s-low{background:var(--st-low)} .pin.s-no{background:var(--st-no)}
.pin.s-nodata{background:var(--st-nodata)}
.pin.s-low svg{fill:#3a2f00}
/* user "you are here" dot */
.user-dot{width:16px;height:16px;border-radius:50%;background:#2b8cff;border:3px solid #fff;
  box-shadow:0 0 0 1.5px rgba(43,140,255,.5),0 2px 7px rgba(0,0,0,.45);position:relative}
.user-dot::before{content:"";position:absolute;left:50%;top:50%;width:16px;height:16px;
  margin:-8px 0 0 -8px;border-radius:50%;background:rgba(43,140,255,.45);
  animation:userPulse 2.2s ease-out infinite}
@keyframes userPulse{0%{transform:scale(1);opacity:.7}100%{transform:scale(3);opacity:0}}
/* cluster bubble */
.cl{
  width:40px;height:40px;border-radius:50%;display:grid;place-items:center;
  font-weight:800;font-size:14px;color:#fff;border:3px solid rgba(255,255,255,.85);
  background:#3a3f63;box-shadow:0 6px 16px rgba(0,0,0,.4)}
.cl.big{width:50px;height:50px;font-size:16px}
/* cluster tinted by best status inside (visible when zoomed out) */
.cl.s-yes{background:var(--st-yes)} .cl.s-queue{background:var(--st-queue)}
.cl.s-low{background:var(--st-low);color:#3a2f00} .cl.s-no{background:var(--st-no)}

/* ===== FBENZ MARKER SYSTEM — "Living-Drop" (brand coin + status halo) =====
   brand = the COIN's fill (static). status = animated HALO + a static ring baked into the
   coin's box-shadow (so status reads even paused / reduced-motion / mid-pan). */
.leaflet-div-icon{background:transparent;border:0}
.fmk{position:relative;width:36px;height:36px;--sc:var(--st-nodata)}
.fmk i{position:absolute;top:50%;left:50%;border-radius:50%}
.fmk-coin{width:26px;height:26px;margin:-13px 0 0 -13px;display:grid;place-items:center;
  background:var(--bc,#3a3f63);color:var(--bf,#fff);font:800 12.5px/1 var(--f);letter-spacing:-.3px;
  box-shadow:0 0 0 2px #fff,0 0 0 4.5px var(--sc),0 3px 8px rgba(0,0,0,.45);z-index:3;user-select:none}
.fmk-coin svg{display:block;width:15px;height:15px}
.fmk-halo{width:26px;height:26px;margin:-13px 0 0 -13px;box-shadow:0 0 0 3px var(--sc);
  opacity:0;z-index:1;pointer-events:none}
.fmk.s-yes{--sc:var(--st-yes)} .fmk.s-queue{--sc:var(--st-queue)} .fmk.s-low{--sc:var(--st-low)}
.fmk.s-no{--sc:var(--st-no)} .fmk.s-nodata{--sc:var(--st-nodata)}
.fmk.s-nodata .fmk-coin{box-shadow:0 0 0 2px #fff,0 0 0 4px var(--sc),0 3px 8px rgba(0,0,0,.45)}
.fmk.b-generic{--bc:var(--surface-3);--bf:var(--text-2)}
.fmk-drop{width:17px;height:17px}.fmk-drop .body{fill:var(--red)}.fmk-drop .hl{fill:#fff}
/* gold ring = "this АЗС has the fuel you filtered for" */
.fmk.match .fmk-coin{box-shadow:0 0 0 2px #fff,0 0 0 4.5px var(--sc),0 0 0 7px #FFC83A,0 4px 9px rgba(0,0,0,.5)}
.fmk.is-active{z-index:1000}
.fmk.is-active .fmk-coin{transform:scale(1.1);transition:transform .14s var(--ease)}

/* ----- alive sonar halo: animate ONLY transform+opacity (GPU); runs only while map idle ----- */
.fmk.s-yes   .fmk-halo{animation:fb-sonar   2.6s var(--ease)  var(--d,0s) infinite}
.fmk.s-low   .fmk-halo{animation:fb-sonar   3.3s var(--ease)  var(--d,0s) infinite}
.fmk.s-queue .fmk-halo{animation:fb-shimmer 2.1s ease-in-out  var(--d,0s) infinite}
.fmk.s-no    .fmk-halo{animation:fb-sonar   1.25s var(--ease) var(--d,0s) infinite}
.fmk.s-nodata .fmk-halo{animation:none;opacity:0}
.fmk-halo{animation-play-state:paused}
.leaflet-container.fb-live .fmk-halo{animation-play-state:running}
.leaflet-dragging .fmk-halo,.leaflet-zoom-anim .fmk-halo{animation-play-state:paused}
@keyframes fb-sonar{0%{transform:scale(1);opacity:.5}70%{opacity:0}100%{transform:scale(2.1);opacity:0}}
@keyframes fb-shimmer{0%,100%{transform:scale(1);opacity:.18}50%{transform:scale(1.22);opacity:.48}}
/* "1 голос засчитан" — a real one-shot spring+ping, not a checkmark */
.fmk.fb-just .fmk-coin{animation:fb-pop .6s var(--ease)}
.fmk.fb-just .fmk-halo{animation:fb-ping .66s var(--ease);animation-play-state:running!important}
@keyframes fb-pop{0%{transform:scale(.5)}55%{transform:scale(1.16)}100%{transform:scale(1)}}
@keyframes fb-ping{0%{transform:scale(1);opacity:.85}100%{transform:scale(2.5);opacity:0}}
@media (prefers-reduced-motion:reduce){
  .fmk-halo{animation:none!important;opacity:0!important}
  .fmk:not(.s-nodata) .fmk-coin{box-shadow:0 0 0 2px #fff,0 0 0 5px var(--sc),0 0 9px -1px var(--sc),0 3px 8px rgba(0,0,0,.45)}
  .fmk.fb-just .fmk-coin{animation:none!important}
}

/* ---------------- TOP BAR ---------------- */
.topbar{
  position:fixed;z-index:20;top:0;left:0;right:0;height:64px;
  display:flex;align-items:center;gap:10px;padding:10px 14px;
  pointer-events:none;
}
.topbar>*{pointer-events:auto}
.brand{display:flex;align-items:center;gap:9px;
  background:var(--surface);border:1px solid var(--line);border-radius:var(--r-pill);
  padding:8px 15px 8px 12px;box-shadow:var(--shadow-sm);color:var(--text)}
.brand-mark{width:30px;height:24px}
.brand-word{font-weight:800;font-size:19px;letter-spacing:-.5px}
.brand-word b{color:var(--red);font-weight:800}
.fbenz-logo{height:30px;width:auto;display:block}
.city-btn{display:inline-flex;align-items:center;gap:5px;
  background:var(--surface);border:1px solid var(--line);border-radius:var(--r-pill);
  padding:9px 12px;font-weight:700;font-size:14px;box-shadow:var(--shadow-sm);max-width:42vw}
.city-btn .ic{width:17px;height:17px;fill:var(--red);flex:0 0 auto}
.city-btn .ic-chev{width:16px;height:16px;fill:var(--text-3);flex:0 0 auto}
.city-btn #cityName{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.top-actions{margin-left:auto;display:flex;gap:8px}
.icon-btn{width:44px;height:44px;border-radius:50%;display:grid;place-items:center;
  background:var(--surface);border:1px solid var(--line);box-shadow:var(--shadow-sm)}
.icon-btn svg{width:21px;height:21px;fill:var(--text)}
.icon-btn.add-desktop svg{fill:var(--red)}
.icon-btn .ic-sun{display:none;stroke:var(--text);fill:none;stroke-width:2;stroke-linecap:round}
html[data-theme="light"] .icon-btn .ic-moon{display:none}
html[data-theme="light"] .icon-btn .ic-sun{display:block}

/* ---------------- LIST PANEL ---------------- */
.panel{
  position:fixed;z-index:15;background:var(--surface);
  display:flex;flex-direction:column;background-image:var(--glow);
}
.panel-grip{display:none}
.panel-head{padding:12px 16px 4px;flex:0 0 auto}
.summary{display:flex;gap:8px;overflow-x:auto;scrollbar-width:none;padding-bottom:10px}
.summary::-webkit-scrollbar{display:none}
.chip{display:inline-flex;align-items:center;gap:7px;flex:0 0 auto;
  background:var(--surface-2);border:1px solid var(--line);border-radius:var(--r-pill);
  padding:7px 13px;font-weight:700;font-size:13px}
.chip .dot{width:9px;height:9px;border-radius:50%}
.chip b{font-weight:800}
.filter{display:flex;gap:7px;flex-wrap:wrap;padding-bottom:12px;border-bottom:1px solid var(--line)}
.pill{background:var(--surface-2);border:1px solid var(--line);border-radius:var(--r-pill);
  padding:7px 14px;font-weight:700;font-size:13px;color:var(--text-2);transition:.15s}
.pill[aria-pressed="true"]{background:var(--red);border-color:var(--red);color:#fff}
.list{flex:1;overflow-y:auto;padding:12px 16px calc(20px + var(--safe-b));display:flex;flex-direction:column;gap:12px}

/* station card (Fineapp) */
.card{background:var(--surface-2);border:1px solid var(--line);border-radius:var(--r);
  padding:14px;transition:transform .12s var(--ease),box-shadow .15s;cursor:pointer}
.card:hover{transform:translateY(-2px);box-shadow:var(--shadow-sm)}
.card:active{transform:scale(.99)}
.card-top{display:flex;align-items:flex-start;gap:11px}
.logo{width:42px;height:42px;border-radius:12px;flex:0 0 auto;display:grid;place-items:center;
  font-weight:800;font-size:15px;color:#fff;letter-spacing:-.5px;position:relative;overflow:hidden}
/* real brand logo over the monogram/short (coin + square tiles); white disc keeps it legible.
   NB: <img> is a replaced element — `inset` alone won't stretch it, so width/height are explicit. */
.blogo{position:absolute;top:11%;left:11%;width:78%;height:78%;border-radius:50%;
  background:#fff;object-fit:contain;padding:11%;box-shadow:0 0 0 1px rgba(0,0,0,.06)}
.card-name{flex:1;min-width:0}
.card-name h3{margin:0;font-size:15.5px;font-weight:800;letter-spacing:-.2px;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.card-name .addr{color:var(--text-3);font-size:12.5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-top:1px}
.badge{display:inline-flex;align-items:center;gap:5px;flex:0 0 auto;
  border-radius:var(--r-pill);padding:5px 10px;font-weight:800;font-size:12px}
.badge svg{width:13px;height:13px}
.badge.s-yes{color:var(--st-yes);background:var(--st-yes-bg)}
.badge.s-queue{color:var(--st-queue);background:var(--st-queue-bg)}
.badge.s-low{color:#9a7b06;background:var(--st-low-bg)}
.badge.s-no{color:var(--st-no);background:var(--st-no-bg)}
.badge.s-nodata{color:var(--st-nodata);background:var(--st-nodata-bg)}
.fuels{display:flex;gap:6px;flex-wrap:wrap;margin:12px 0 0}
.fuel{font-weight:800;font-size:11.5px;padding:4px 9px;border-radius:8px;
  background:var(--surface-3);color:var(--text-2);border:1px solid var(--line)}
.fuel.on{background:var(--st-yes-bg);color:var(--st-yes);border-color:transparent}
.fuel.no{background:var(--st-no-bg);color:var(--st-no);border-color:transparent;text-decoration:line-through;text-decoration-thickness:1.5px}
.card-foot{display:flex;align-items:center;gap:8px;margin-top:13px}
.meta{display:flex;align-items:center;gap:5px;color:var(--text-3);font-size:12px;font-weight:600}
.meta .km{color:var(--text);font-weight:800}
.card-foot .spacer{flex:1}
.mini-btn{display:inline-flex;align-items:center;gap:5px;border-radius:var(--r-pill);
  padding:8px 13px;font-weight:800;font-size:12.5px;background:var(--surface-3);border:1px solid var(--line)}
.mini-btn svg{width:14px;height:14px;fill:currentColor}
.mini-btn.red{background:var(--red);color:#fff;border-color:var(--red)}

/* ---------------- FAB + TABBAR ---------------- */
.fab{position:fixed;z-index:16;width:50px;height:50px;border-radius:16px;
  background:var(--surface);border:1px solid var(--line);box-shadow:var(--shadow);
  display:grid;place-items:center}
.fab svg{width:23px;height:23px;fill:var(--red)}
.fab.on svg{fill:#fff}.fab.on{background:var(--red);border-color:var(--red)}
.tabbar{display:none}

/* ---------------- SHEETS / MODALS ---------------- */
.backdrop{position:fixed;inset:0;z-index:30;background:rgba(8,9,20,.55);
  backdrop-filter:blur(3px);animation:fade .2s}
@keyframes fade{from{opacity:0}}
.sheet{position:fixed;z-index:31;background:var(--surface);background-image:var(--glow);
  box-shadow:var(--shadow);display:flex;flex-direction:column;
  left:50%;bottom:0;width:100%;max-width:var(--sheet-max);transform:translateX(-50%);
  border-radius:var(--r-lg) var(--r-lg) 0 0;max-height:88vh;
  padding-bottom:var(--safe-b);animation:slideUp .28s var(--ease)}
@keyframes slideUp{from{transform:translate(-50%,100%)}to{transform:translate(-50%,0)}}
.sheet-grip{width:42px;height:5px;border-radius:3px;background:var(--line-2);margin:10px auto 4px;flex:0 0 auto}
.sheet-body{overflow-y:auto;padding:6px 20px 22px}
.sheet h2{font-size:20px;font-weight:800;letter-spacing:-.4px;margin:.2em 0 .1em}
.sheet .sub{color:var(--text-3);font-size:13px;margin:0 0 4px}
.sheet-close{position:absolute;top:12px;right:14px;width:34px;height:34px;border-radius:50%;
  background:var(--surface-2);display:grid;place-items:center}
.sheet-close svg{width:18px;height:18px;fill:var(--text-2)}

/* station detail */
.st-head{display:flex;align-items:flex-start;gap:13px;padding-top:8px}
.st-head .logo{width:50px;height:50px;font-size:17px}
.st-title h2{margin:0}
.st-row{display:flex;gap:8px;flex-wrap:wrap;align-items:center;margin:14px 0}
.st-stat{display:flex;align-items:center;gap:8px;background:var(--surface-2);
  border:1px solid var(--line);border-radius:var(--r);padding:12px 14px;flex:1;min-width:130px}
.st-stat .n{font-size:19px;font-weight:800;line-height:1}
.st-stat .l{color:var(--text-3);font-size:11.5px;font-weight:600}
.section-label{font-size:11.5px;font-weight:800;letter-spacing:1.2px;text-transform:uppercase;
  color:var(--text-3);margin:18px 0 9px}

/* buttons */
.btn{display:flex;align-items:center;justify-content:center;gap:8px;width:100%;
  border-radius:14px;padding:15px;font-weight:800;font-size:15px;transition:.15s}
.btn svg{width:19px;height:19px;fill:currentColor}
.btn-red{background:var(--red);color:#fff}
.btn-red:active{background:var(--red-2)}
.btn-fill{background:var(--btn-fill);color:var(--btn-fill-text)}
.btn-ghost{background:var(--surface-2);color:var(--text);border:1px solid var(--line)}
.btn-row{display:flex;gap:10px;margin-top:10px}
.btn-row .btn{margin:0}

/* vote: status grid + fuel select */
.status-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.status-opt{display:flex;align-items:center;gap:11px;background:var(--surface-2);
  border:2px solid var(--line);border-radius:var(--r);padding:14px;font-weight:800;font-size:15px;transition:.12s}
.status-opt .si{width:34px;height:34px;border-radius:10px;display:grid;place-items:center;flex:0 0 auto}
.status-opt .si svg{width:18px;height:18px;fill:#fff}
.status-opt[aria-pressed="true"]{border-color:currentColor;transform:translateY(-1px)}
.status-opt.s-yes[aria-pressed="true"]{color:var(--st-yes)} .status-opt.s-yes .si{background:var(--st-yes)}
.status-opt.s-queue[aria-pressed="true"]{color:var(--st-queue)} .status-opt.s-queue .si{background:var(--st-queue)}
.status-opt.s-low[aria-pressed="true"]{color:#9a7b06} .status-opt.s-low .si{background:var(--st-low)}
.status-opt.s-low .si svg{fill:#3a2f00}
.status-opt.s-no[aria-pressed="true"]{color:var(--st-no)} .status-opt.s-no .si{background:var(--st-no)}
.fuel-select{display:flex;gap:8px;flex-wrap:wrap}
.fuel-opt{font-weight:800;font-size:14px;padding:11px 16px;border-radius:12px;
  background:var(--surface-2);border:2px solid var(--line);color:var(--text-2)}
.fuel-opt[aria-pressed="true"]{background:var(--st-yes-bg);border-color:var(--st-yes);color:var(--st-yes)}
/* per-fuel vote marks (Есть/Нет per grade) */
.fmarks{display:flex;flex-direction:column;gap:8px}
.fmark{display:flex;align-items:center;gap:12px;background:var(--surface-2);border:1px solid var(--line);
  border-radius:var(--r);padding:8px 8px 8px 16px}
.fmark-label{font-weight:800;font-size:16px;flex:1}
.fmark-btns{display:flex;gap:6px}
.fm-btn{font-weight:800;font-size:13.5px;padding:9px 16px;border-radius:10px;
  background:var(--surface-3);border:2px solid var(--line);color:var(--text-2);transition:.12s}
.fm-btn.fm-yes[aria-pressed="true"]{background:var(--st-yes);border-color:var(--st-yes);color:#fff}
.fm-btn.fm-no[aria-pressed="true"]{background:var(--st-no);border-color:var(--st-no);color:#fff}
.cond-row{display:flex;gap:10px}
.cond{font-weight:800;font-size:14px;padding:11px 18px;border-radius:12px;
  background:var(--surface-2);border:2px solid var(--line);color:var(--text-2)}
.cond[aria-pressed="true"]{border-color:var(--st-queue);color:var(--st-queue);background:var(--st-queue-bg)}

/* search sheet */
.sheet-search{top:0;bottom:auto;border-radius:0 0 var(--r-lg) var(--r-lg);max-height:80vh;
  animation:slideDown .26s var(--ease)}
@keyframes slideDown{from{transform:translate(-50%,-100%)}to{transform:translate(-50%,0)}}
.search-field{display:flex;align-items:center;gap:10px;background:var(--surface-2);
  border:1px solid var(--line);border-radius:14px;padding:13px 15px;margin:6px 0 4px}
.search-field svg{width:20px;height:20px;fill:var(--text-3);flex:0 0 auto}
.search-field input{flex:1;border:0;background:none;color:var(--text);font-size:16px;font-family:inherit;outline:none}
.res{display:flex;flex-direction:column;gap:2px;margin-top:8px}
.res-item{display:flex;align-items:center;gap:12px;padding:13px 8px;border-radius:12px;border-bottom:1px solid var(--line)}
.res-item:hover{background:var(--surface-2)}
.res-item .logo{width:38px;height:38px;font-size:14px}
.res-item .ri-main{flex:1;min-width:0}
.res-item h4{margin:0;font-size:15px;font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.res-item .ri-sub{color:var(--text-3);font-size:12.5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

/* me sheet */
.me-link{display:flex;align-items:center;gap:13px;padding:15px 6px;border-bottom:1px solid var(--line);font-weight:700}
.me-link svg{width:22px;height:22px;fill:var(--red);flex:0 0 auto}
.me-link .arr{margin-left:auto;fill:var(--text-3);width:18px;height:18px}
.me-link small{display:block;color:var(--text-3);font-weight:500;font-size:12.5px}

/* profile + Telegram login (me sheet) */
.profile-card{display:flex;align-items:center;gap:13px;background:var(--surface-2);border:1px solid var(--line);
  border-radius:var(--r);padding:14px;margin:6px 0 4px}
.profile-card.guest{flex-direction:column;align-items:stretch;text-align:center;gap:12px}
.pf-av{width:48px;height:48px;border-radius:50%;flex:0 0 auto;display:grid;place-items:center;overflow:hidden;
  background:var(--red);color:#fff;font-weight:800;font-size:20px}
.pf-av img{width:100%;height:100%;object-fit:cover}
.pf-main{flex:1;min-width:0}
.pf-name{font-weight:800;font-size:16px;display:flex;align-items:center;gap:8px;flex-wrap:wrap;justify-content:center}
.profile-card:not(.guest) .pf-name{justify-content:flex-start}
.pf-stats{color:var(--text-3);font-size:12.5px;margin-top:2px;font-weight:600}
.vbadge{font-size:11px;font-weight:800;color:var(--st-yes);background:var(--st-yes-bg);
  border-radius:var(--r-pill);padding:3px 9px}
.tg-login{display:flex;justify-content:center;min-height:42px}
/* feedback */
.fb-area{width:100%;min-height:110px;resize:vertical;background:var(--surface-2);border:1px solid var(--line);
  border-radius:14px;padding:13px 15px;color:var(--text);font-family:inherit;font-size:15px;outline:none}
.fb-area:focus-visible{outline:2.5px solid var(--red);outline-offset:2px}

/* geo prime */
.geo-prime{position:fixed;inset:0;z-index:40;display:grid;place-items:end center;
  background:linear-gradient(0deg,rgba(8,9,20,.75),rgba(8,9,20,.35));backdrop-filter:blur(2px)}
.geo-card{background:var(--surface);background-image:var(--glow);width:100%;max-width:var(--sheet-max);
  border-radius:var(--r-lg) var(--r-lg) 0 0;padding:30px 24px calc(26px + var(--safe-b));text-align:center;
  box-shadow:var(--shadow);animation:slideUp .3s var(--ease)}
.geo-emoji{font-size:46px}
.geo-card h2{font-size:23px;font-weight:800;letter-spacing:-.5px;margin:10px 0 6px}
.geo-card p{color:var(--text-2);font-size:14.5px;margin:0 auto 20px;max-width:330px}
.geo-card .btn{margin-top:10px}

/* toast */
.toast{position:fixed;z-index:50;left:50%;bottom:calc(26px + var(--safe-b));transform:translateX(-50%);
  background:#1b1d2e;color:#fff;border:1px solid rgba(255,255,255,.12);
  padding:13px 18px;border-radius:14px;font-weight:700;font-size:14px;max-width:90vw;text-align:center;
  box-shadow:var(--shadow);animation:toastIn .25s var(--ease)}
.toast.err{background:#3a1420;border-color:rgba(255,59,92,.4)}
.toast.ok{background:#0f2e22;border-color:rgba(31,191,117,.4)}
@keyframes toastIn{from{opacity:0;transform:translate(-50%,12px)}}

/* station detail: address + copy */
.addr-row{display:flex;align-items:center;gap:6px}
.addr-text{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.copy-addr{flex:0 0 auto;width:26px;height:26px;border-radius:8px;display:grid;place-items:center;
  background:var(--surface-2);border:1px solid var(--line)}
.copy-addr svg{width:14px;height:14px;fill:var(--text-3)}
.copy-addr:active{background:var(--surface-3)}
/* "не подтверждено" warning + confirm */
.pending-warn{display:flex;align-items:center;gap:10px;background:var(--st-no-bg);
  border:1px solid var(--st-no);border-radius:var(--r);padding:11px 13px;margin:14px 0 0}
.pending-warn>svg{width:22px;height:22px;fill:var(--st-no);flex:0 0 auto}
.pending-warn .pw-text{flex:1;font-size:13px;font-weight:600;line-height:1.35}
.pending-warn .pw-btn{flex:0 0 auto;background:var(--st-no);color:#fff;font-weight:800;font-size:12.5px;
  padding:9px 14px;border-radius:var(--r-pill)}
.btn.ranout{color:var(--st-no)}.btn.ranout svg{fill:var(--st-no)}
/* maintenance banner (set from /admin) */
.maint-banner{position:fixed;z-index:45;left:0;right:0;top:0;background:var(--st-queue);color:#1a1200;
  font-weight:800;font-size:13.5px;text-align:center;padding:9px 16px;line-height:1.3;
  box-shadow:0 4px 14px rgba(0,0,0,.25)}
.maint-banner svg{width:16px;height:16px;fill:#1a1200;vertical-align:-3px;margin-right:6px}
body.has-maint .topbar{top:40px}
@media (min-width:1024px){body.has-maint .panel{padding-top:108px}}

/* add-station pick mode */
.pick-mode{position:fixed;inset:0;z-index:28;pointer-events:none}
.pick-cross{position:absolute;left:50%;top:50%;transform:translate(-50%,-100%);z-index:2}
.pick-cross svg{width:46px;height:46px;fill:var(--red);filter:drop-shadow(0 6px 10px rgba(0,0,0,.5))}
.pick-cross::after{content:"";position:absolute;left:50%;bottom:-3px;transform:translateX(-50%);
  width:10px;height:5px;border-radius:50%;background:rgba(0,0,0,.35)}
.pick-bar{position:absolute;left:50%;bottom:calc(24px + var(--safe-b));transform:translateX(-50%);
  width:calc(100% - 32px);max-width:var(--sheet-max);pointer-events:auto;
  background:var(--surface);border:1px solid var(--line);border-radius:var(--r);
  box-shadow:var(--shadow);padding:14px 16px;text-align:center}
.pick-bar>span{display:block;font-weight:700;font-size:14px;margin-bottom:10px}
.pick-btns{display:flex;gap:10px}
.pick-btns .btn{margin:0}
@media (min-width:1024px){.pick-mode{left:var(--panel-w)}.pick-cross{left:calc(50% + var(--panel-w)/2)}}

.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
[hidden]{display:none!important}

/* ============================================================
   RESPONSIVE
   ============================================================ */
/* DESKTOP: left sidebar + right map */
@media (min-width:1024px){
  .panel{left:0;top:0;bottom:0;width:var(--panel-w);border-right:1px solid var(--line);
    box-shadow:var(--shadow);padding-top:76px}
  #map{left:var(--panel-w)}
  .topbar{left:0;width:100%;padding-right:24px}      /* full width so actions have room */
  .topbar .top-actions{margin-left:auto}
  .city-btn{max-width:150px}
  .fab{right:24px;bottom:24px}
  .tabbar{display:none}
  /* sheets become centered modals over the WHOLE screen (not just the map area) */
  .sheet,.sheet-search{
    left:50%;
    top:50%;bottom:auto;transform:translate(-50%,-50%);
    border-radius:var(--r-lg);max-height:86vh;animation:modalIn .24s var(--ease);
  }
  .sheet .sheet-grip{display:none}
  .panel-foot{display:block}
}
@keyframes modalIn{from{opacity:0;transform:translate(-50%,-46%)}}

/* sidebar footer: contacts + ad (desktop only) */
.panel-foot{display:none;flex:0 0 auto;border-top:1px solid var(--line);
  padding:12px 16px calc(14px + var(--safe-b));background:var(--surface)}
.ad-slot{border:1.5px dashed var(--line-2);border-radius:var(--r-sm);padding:14px;text-align:center;
  color:var(--text-3);font-weight:700;font-size:12.5px;margin-bottom:10px;background:var(--surface-2)}
.ad-slot small{display:block;font-weight:600;font-size:11px;margin-top:2px;opacity:.8}
.foot-links{display:flex;gap:14px;flex-wrap:wrap;font-weight:700;font-size:13px}
.foot-links a{color:var(--text-2)}.foot-links a:hover{color:var(--red)}
.foot-copy{color:var(--text-3);font-size:11.5px;margin-top:9px}
/* footer is desktop-only — this wins over the base display:none above (source order) */
@media (min-width:1024px){.panel-foot{display:block}}
html[data-theme="light"] .badge.s-low{color:#6a5c00}
.search-field input:focus-visible{outline:2.5px solid var(--red);outline-offset:2px;border-radius:8px}

/* MOBILE: full map + floating panel(bottom sheet) + tab bar */
@media (max-width:1023px){
  .panel{left:0;right:0;bottom:0;height:46vh;border-radius:var(--r-lg) var(--r-lg) 0 0;
    box-shadow:0 -10px 40px rgba(0,0,0,.4);transition:height .3s var(--ease),transform .3s var(--ease);
    transform:translateY(calc(100% - 132px))}
  body[data-view="list"] .panel{transform:translateY(0);height:84vh}
  .panel-grip{display:block;width:100%;padding:11px 0 4px;background:none}
  .panel-grip span{display:block;width:42px;height:5px;border-radius:3px;background:var(--line-2);margin:0 auto}
  .panel-head{padding-top:2px}
  #map{bottom:0}
  .fab{right:16px;bottom:calc(150px + var(--safe-b))}
  body[data-view="list"] .fab{opacity:0;pointer-events:none}
  .tabbar{display:flex;position:fixed;z-index:25;left:0;right:0;bottom:0;
    background:var(--surface);border-top:1px solid var(--line);
    padding:8px 6px calc(8px + var(--safe-b));justify-content:space-around;box-shadow:0 -6px 24px rgba(0,0,0,.18)}
  .tab{display:flex;flex-direction:column;align-items:center;gap:3px;color:var(--text-3);
    font-size:10.5px;font-weight:700;flex:1;padding:3px}
  .tab svg{width:24px;height:24px;fill:currentColor}
  .tab[aria-current="true"]{color:var(--text)}
  .tab.tab-add svg{fill:var(--red)}
  .tab.tab-add[aria-current="true"]{color:var(--red)}
  .panel{padding-bottom:78px}
  body[data-view="list"] .panel{padding-bottom:calc(70px + var(--safe-b))}
  .status-grid{grid-template-columns:1fr 1fr}
}
@media (max-width:1023px){.add-desktop{display:none}}
@media (max-width:380px){.brand-word{display:none}.city-btn{max-width:38vw}}

@media (prefers-reduced-motion:reduce){
  *{animation-duration:.01ms!important;transition-duration:.01ms!important}
}
