/* ══════════════════════════════════════════════════════════════════
   STREETO — underground street racing design system
   Dark asphalt, neon accents, hazard stripes, condensed type.
   ══════════════════════════════════════════════════════════════════ */

/* ── tokens ─────────────────────────────────────────────────────── */
:root {
  --bg: #07080b;
  --bg-2: #0b0d12;
  --panel: #11141a;
  --panel-2: #151922;
  --panel-3: #1a1f2a;
  --line: #242a36;
  --line-soft: #1a1f28;

  /* floating surfaces: dropdowns, popovers, modals.
     `color-scheme: dark` keeps native widgets (select menus, date
     pickers, scrollbars) dark instead of the OS default white. */
  --overlay: #12151c;
  /* dimmed backdrop behind a modal or a full-screen menu. */
  --scrim: rgba(6, 7, 9, 0.82);
  /* What the browser draws for native widgets (date picker, select list,
     scrollbars) has to follow the theme too. */
  --native-scheme: dark;
  color-scheme: dark;

  --text: #e9edf5;
  --text-dim: #aab3c4;
  --muted: #858fa3;
  --dim: #5d6678;

  --neon: #1fe0ff;
  --neon-deep: #0a9cc4;
  --neon-2: #ff2d78;
  --neon-3: #b6ff3c;
  --amber: #ffb020;
  --danger: #ff4d5e;

  --radius: 16px;
  --radius-sm: 10px;
  --radius-lg: 22px;

  --shadow: 0 24px 60px -28px rgba(0, 0, 0, 0.95);
  --shadow-sm: 0 10px 30px -18px rgba(0, 0, 0, 0.9);
  --glow: 0 0 0 1px rgba(var(--neon-rgb), 0.28), 0 0 26px -6px rgba(var(--neon-rgb), 0.45);
  --glow-pink: 0 0 0 1px rgba(var(--neon-2-rgb), 0.3), 0 0 26px -6px rgba(var(--neon-2-rgb), 0.45);

  --font-head: "Oswald", "Noto Sans Georgian", "Arial Narrow", "Haettenschweiler", Impact, system-ui, sans-serif;
  --font-body: "Inter", "Noto Sans Georgian", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Consolas, "Noto Sans Georgian", monospace;

  --shell: 1280px;
  --topbar: 66px;
  --bottomnav: 66px;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);

  /* ── theme primitives ───────────────────────────────────────────
     rgb triplets so every alpha variant - rgba(var(--neon-rgb), .2) -
     can be re-tinted per theme. --veil and --panel-scrim describe the
     tint direction of the translucent overlays: on the dark themes
     they lighten / darken toward black, on the light theme the other
     way round. */
  --veil: 255, 255, 255;
  --panel-scrim: 8, 10, 14;
  --neon-rgb: 31, 224, 255;
  --neon-2-rgb: 255, 45, 120;
  --neon-3-rgb: 182, 255, 60;
  --amber-rgb: 255, 176, 32;
  --danger-rgb: 255, 77, 94;
  --ok-rgb: 120, 230, 130;

  --accent-a: #2fe9ff;
  --accent-b: #0fb8dd;
  --accent-c: #0893b8;
  --accent-soft: #dffbff;
  --on-accent: #04141a;
  --inset: #0a0c11;
  --inset-2: #120a11;
  --line-strong: #333c4b;
  --danger-soft: #ff8a96;
  --amber-soft: #ffd48a;
  --ok-soft: #9fe8a0;
  --neon-3-soft: #d8ffa4;

}

/* ══════════════════════════════════════════════════════════════════
   THEMES  -  chosen per member in Settings, applied via
   <html data-theme="…">. "street" is the default and lives in :root,
   so it needs no override block. Each block only re-declares tokens;
   the tokenized rules below inherit automatically.
   ══════════════════════════════════════════════════════════════════ */

/* ── Black & Gold ──────────────────────────────────────────────── */
[data-theme="gold"] {
  color-scheme: dark;

  --bg: #0a0806;
  --bg-2: #100d08;
  --panel: #17130c;
  --panel-2: #1c170e;
  --panel-3: #241d12;
  --line: #2e2618;
  --line-soft: #1f1a10;
  --overlay: #18130b;
  --scrim: rgba(10, 8, 5, 0.84);
  --native-scheme: dark;
  --line-strong: #433a24;
  --inset: #0e0b07;
  --inset-2: #17100a;

  --text: #f3ead4;
  --text-dim: #cec09e;
  --muted: #ab9d7d;
  --dim: #7e7257;

  --veil: 255, 242, 208;
  --panel-scrim: 14, 11, 7;

  --neon: #f2c14e;
  --neon-deep: #a97c1f;
  --neon-rgb: 242, 193, 78;
  --neon-2: #e0a94a;
  --neon-2-rgb: 224, 169, 74;
  --neon-3: #f7e08a;
  --neon-3-rgb: 247, 224, 138;
  --amber: #e0b25c;
  --amber-rgb: 224, 178, 92;
  --danger: #ff5d6a;
  --danger-rgb: 255, 93, 106;

  --accent-a: #f7dd8a;
  --accent-b: #e8c160;
  --accent-c: #c99a35;
  --accent-soft: #ffefc4;
  --on-accent: #1a1306;
  --danger-soft: #ff9aa4;
  --amber-soft: #ffd894;
  --ok-soft: #b6ecb8;
  --neon-3-soft: #f5e4a4;
}

/* ── Underground ───────────────────────────────────────────────── */
[data-theme="underground"] {
  color-scheme: dark;

  --bg: #060506;
  --bg-2: #0b0709;
  --panel: #100b0d;
  --panel-2: #171013;
  --panel-3: #1d1418;
  --line: #351923;
  --line-soft: #27141a;
  --line-strong: #51212e;
  --overlay: #120c0f;
  --scrim: rgba(6, 5, 6, 0.88);
  --native-scheme: dark;
  --inset: #0b0809;
  --inset-2: #160b0e;

  --text: #f7eef0;
  --text-dim: #cfc0c4;
  --muted: #9c888e;
  --dim: #715f65;

  --veil: 255, 220, 226;
  --panel-scrim: 13, 9, 11;

  --neon: #ff3b4d;
  --neon-deep: #a30e22;
  --neon-rgb: 255, 59, 77;
  --neon-2: #b3122a;
  --neon-2-rgb: 179, 18, 42;
  --neon-3: #d7a14d;
  --neon-3-rgb: 215, 161, 77;
  --amber: #d7a14d;
  --amber-rgb: 215, 161, 77;
  --danger: #ff4d5e;
  --danger-rgb: 255, 77, 94;
  --ok-rgb: 120, 230, 130;

  --accent-a: #ff5b69;
  --accent-b: #ff3b4d;
  --accent-c: #a30e22;
  --accent-soft: #ffd6da;
  --on-accent: #190407;
  --danger-soft: #ff8d97;
  --amber-soft: #f0c98e;
  --ok-soft: #9fe8a0;
  --neon-3-soft: #f0c98e;

  --shadow: 0 24px 60px -28px rgba(0, 0, 0, 0.95);
  --shadow-sm: 0 10px 30px -18px rgba(0, 0, 0, 0.9);
  --glow: 0 0 0 1px rgba(255, 59, 77, 0.28), 0 0 26px -6px rgba(255, 59, 77, 0.45);
  --glow-pink: 0 0 0 1px rgba(179, 18, 42, 0.3), 0 0 26px -6px rgba(179, 18, 42, 0.45);
}
[data-theme="underground"] .topbar {
  background: rgba(10, 7, 9, 0.88);
}
[data-theme="underground"] .footer {
  background: linear-gradient(180deg, transparent, rgba(30, 4, 9, 0.35));
}

/* ── White & Gold ──────────────────────────────────────────────── */
[data-theme="light"] {
  color-scheme: light;

  --bg: #f7f5ef;
  --bg-2: #eeeae0;
  --panel: #ffffff;
  --panel-2: #fbf9f4;
  --panel-3: #f2eee4;
  --line: #e4ded1;
  --line-soft: #ece7db;
  --overlay: #ffffff;
  /* A light theme dims the page with a warm, lighter scrim so the panel
     keeps its ivory background instead of sitting on a black sheet. */
  --scrim: rgba(58, 46, 18, 0.38);
  --native-scheme: light;
  --line-strong: #cdc4b0;
  --inset: #f2eee3;
  --inset-2: #f0eae4;

  --text: #221d12;
  --text-dim: #4a442f;
  --muted: #6e6650;
  --dim: #8b8270;

  --veil: 28, 22, 8;
  --panel-scrim: 255, 253, 248;

  --neon: #8a6508;
  --neon-deep: #6f5006;
  --neon-rgb: 138, 101, 8;
  --neon-2: #a8402f;
  --neon-2-rgb: 168, 64, 47;
  --neon-3: #55680f;
  --neon-3-rgb: 85, 104, 15;
  --amber: #9a6606;
  --amber-rgb: 154, 102, 6;
  --danger: #c8222f;
  --danger-rgb: 200, 34, 47;
  --ok-rgb: 28, 122, 55;

  --accent-a: #b8860b;
  --accent-b: #946a09;
  --accent-c: #775204;
  --accent-soft: #6b4e05;
  --on-accent: #ffffff;
  --danger-soft: #a01f2c;
  --amber-soft: #7a5606;
  --ok-soft: #1c7a37;
  --neon-3-soft: #55610f;

  --shadow: 0 24px 60px -30px rgba(70, 56, 18, 0.4);
  --shadow-sm: 0 10px 30px -18px rgba(70, 56, 18, 0.32);
}


/* ── reset ──────────────────────────────────────────────────────── */
*,
*::before,
*::after { box-sizing: border-box; }

* { margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--topbar) + 16px);
  /* Safety net: translated / long text must never create a sideways scrollbar.
     Individual components still wrap or ellipsize on their own. */
  overflow-x: hidden;
}

body {
  min-height: 100dvh;
  background:
    radial-gradient(1100px 700px at 78% -12%, rgba(var(--neon-rgb), 0.09), transparent 62%),
    radial-gradient(900px 600px at 8% 8%, rgba(var(--neon-2-rgb), 0.075), transparent 60%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 45%, var(--bg) 100%);
  background-attachment: fixed;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  /* Break very long unbroken strings instead of letting them push the page. */
  overflow-wrap: break-word;
}

/* film grain + scanlines, purely decorative */
.noise,
.scanlines {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}
.noise {
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='0.6'/%3E%3C/svg%3E");
}
.scanlines {
  opacity: 0.22;
  background: repeating-linear-gradient(
    180deg,
    rgba(var(--veil), 0.022) 0 1px,
    transparent 1px 3px
  );
  mix-blend-mode: overlay;
}

img, svg, video { display: block; max-width: 100%; }
img, video { height: auto; }

a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; }
ul, ol { list-style: none; padding: 0; }
fieldset { border: 0; padding: 0; }
summary { cursor: pointer; }
[hidden] { display: none !important; }

::selection { background: rgba(var(--neon-rgb), 0.28); color: var(--text); }

:focus-visible {
  outline: 2px solid var(--neon);
  outline-offset: 2px;
  border-radius: 4px;
}

/* thin neon scrollbar */
* { scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-thumb {
  background: var(--line-strong);
  border-radius: 99px;
  border: 3px solid transparent;
  background-clip: content-box;
}
*::-webkit-scrollbar-thumb:hover { background: var(--line-strong); background-clip: content-box; }

/* ── typography ─────────────────────────────────────────────────── */
h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 700;
  line-height: 1.03;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}

.display {
  font-family: var(--font-head);
  text-transform: uppercase;
  letter-spacing: 0.005em;
  font-size: clamp(2rem, 4.4vw, 3rem);
  line-height: 0.95;
}
.display--xl { font-size: clamp(2.5rem, 6vw, 4.4rem); }
.display--xxl { font-size: clamp(3rem, 9vw, 6.6rem); letter-spacing: -0.01em; }

.glow {
  color: var(--text);
  text-shadow: 0 0 18px rgba(var(--neon-rgb), 0.65), 0 0 60px rgba(var(--neon-rgb), 0.35);
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--neon);
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.lede { color: var(--text-dim); font-size: 1.02rem; max-width: 62ch; }
.lede--lg { font-size: 1.12rem; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.link { color: var(--neon); text-decoration: underline; text-decoration-color: rgba(var(--neon-rgb), 0.35); text-underline-offset: 2px; }
.link:hover { text-decoration-color: var(--neon); }

.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;
}

.skip-link {
  position: fixed; top: -100px; left: 12px; z-index: 200;
  background: var(--neon); color: var(--on-accent); font-weight: 700;
  padding: 10px 16px; border-radius: 0 0 10px 10px;
}
.skip-link:focus { top: 0; }

.icon { flex: 0 0 auto; }
.icon--rot270 { transform: rotate(-90deg); }

.dot { color: var(--dim); }

/* ── shell ──────────────────────────────────────────────────────── */
.layout-shell {
  display: flex;
  gap: 20px;
  max-width: 1440px;
  margin: 0 auto;
  padding: 26px 22px 90px;
  align-items: flex-start;
}
.layout-sidebar {
  position: sticky;
  top: calc(var(--topbar) + 20px);
  width: 220px;
  flex: 0 0 220px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-self: flex-start;
}
.sticky-groups {
  position: sticky;
  top: calc(var(--topbar) + 20px);
}
.layout-sidebar .nav-card {
  position: sticky;
  top: calc(var(--topbar) + 20px);
}
.shell {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
  flex: 1;
  min-width: 0;
}
.shell--wide { max-width: 1440px; }

.single { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 18px; }
.single--narrow { max-width: 720px; }

/* ── buttons ────────────────────────────────────────────────────── */
.btn {
  --btn-bg: transparent;
  --btn-fg: var(--text);
  --btn-bd: var(--line);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--btn-bd);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-family: var(--font-head);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
  transition: transform 0.16s var(--ease), box-shadow 0.2s, background 0.2s, border-color 0.2s, color 0.2s;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn svg { stroke-width: 1.9; }

.btn--primary {
  --btn-bg: linear-gradient(135deg, var(--accent-a) 0%, var(--accent-b) 55%, var(--accent-c) 100%);
  --btn-fg: var(--on-accent);
  --btn-bd: rgba(var(--neon-rgb), 0.55);
  box-shadow: 0 8px 26px -10px rgba(var(--neon-rgb), 0.65);
  font-weight: 700;
}
.btn--primary:hover { box-shadow: 0 12px 34px -10px rgba(var(--neon-rgb), 0.85); }

.btn--ghost { --btn-bg: rgba(var(--veil), 0.035); --btn-bd: var(--line); }
.btn--ghost:hover { --btn-bd: var(--line-strong); background: rgba(var(--veil), 0.06); }

.btn--outline { --btn-bd: rgba(var(--neon-rgb), 0.42); --btn-fg: var(--neon); background: rgba(var(--neon-rgb), 0.06); }
.btn--outline:hover { background: rgba(var(--neon-rgb), 0.12); box-shadow: var(--glow); }

.btn--danger { --btn-bg: rgba(var(--danger-rgb), 0.12); --btn-bd: rgba(var(--danger-rgb), 0.45); --btn-fg: var(--danger-soft); }
.btn--danger:hover { background: rgba(var(--danger-rgb), 0.2); }

.btn--sm { height: 28px; padding: 0 11px; font-size: 10.5px; letter-spacing: 0.05em; gap: 5px; }
.btn--lg { height: 40px; padding: 0 20px; font-size: 13px; }
.btn--block { width: 100%; }
.btn--icon { width: 34px; padding: 0; }
.btn--icon.btn--sm { width: 28px; }

.btn.is-on { --btn-bd: rgba(var(--neon-3-rgb), 0.5); --btn-fg: var(--neon-3); background: rgba(var(--neon-3-rgb), 0.08); }
.btn.is-disabled { opacity: 0.45; pointer-events: none; }

.btnrow { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 10px; }

.iconbtn {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(var(--veil), 0.03);
  color: var(--text-dim);
  transition: all 0.18s var(--ease);
}
.iconbtn:hover { color: var(--text); border-color: var(--line-strong); background: rgba(var(--veil), 0.07); }
.iconbtn--ghost { border-color: transparent; background: transparent; width: 30px; height: 30px; }
.iconbtn--ghost:hover { background: rgba(var(--veil), 0.07); }
.iconbtn--danger:hover { color: var(--danger-soft); background: rgba(var(--danger-rgb), 0.12); border-color: rgba(var(--danger-rgb), 0.4); }
.iconbtn.is-active { color: var(--neon); border-color: rgba(var(--neon-rgb), 0.45); }

/* ── polls ───────────────────────────────────────────────────── */
.poll { margin-top: 8px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: rgba(var(--panel-scrim), 0.6); }
.poll__q { margin: 0 0 8px; font-size: 14px; }
.poll__opt { margin-bottom: 6px; }
.poll__vote { margin: 0; }
.poll__btn {
  position: relative;
  width: 100%;
  text-align: left;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: rgba(var(--veil), 0.03);
  color: var(--text);
  font-size: 13px;
  overflow: hidden;
  cursor: pointer;
}
.poll__btn.is-voted { border-color: var(--neon); background: rgba(var(--neon-rgb), 0.08); }
.poll__bar { position: absolute; left: 0; top: 0; bottom: 0; background: rgba(var(--neon-rgb), 0.12); z-index: 0; pointer-events: none; }
.poll__label { position: relative; z-index: 1; }
.poll__count { position: relative; z-index: 1; float: right; font-size: 11.5px; color: var(--dim); }
.pollbox { margin-top: 8px; padding: 12px; border: 1px dashed var(--line); border-radius: 10px; background: rgba(var(--panel-scrim), 0.4); }
.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 99px;
  border: 1px solid var(--line);
  background: rgba(var(--veil), 0.04);
  color: var(--text-dim);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
}
.tag--tiny { font-size: 9.5px; padding: 1px 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 45%; flex-shrink: 0; }
.tag--ghost { border-color: transparent; background: transparent; color: var(--dim); }
.tag--type { color: var(--neon); border-color: rgba(var(--neon-rgb), 0.28); background: rgba(var(--neon-rgb), 0.07); }
.tag--open { color: var(--ok-soft); border-color: rgba(var(--ok-rgb), 0.3); background: rgba(var(--ok-rgb), 0.08); }
.tag--private { color: var(--amber); border-color: rgba(var(--amber-rgb), 0.32); background: rgba(var(--amber-rgb), 0.08); }
.tag--invite { color: var(--neon-2); border-color: rgba(var(--neon-2-rgb), 0.35); background: rgba(var(--neon-2-rgb), 0.1); }
.tag--pending { color: var(--amber); border-color: rgba(var(--amber-rgb), 0.35); background: rgba(var(--amber-rgb), 0.08); }
.tag--group { color: var(--neon); border-color: rgba(var(--neon-rgb), 0.3); background: rgba(var(--neon-rgb), 0.07); }
.tag--group:hover { background: rgba(var(--neon-rgb), 0.14); color: var(--text); }
.tagcloud { display: flex; flex-wrap: wrap; gap: 6px; }

/* ── modal-styled select (replaces native system dropdown) ───────── */
.selectmodal { position: relative; display: inline-flex; }
.selectmodal__trigger { width: 100%; justify-content: space-between; gap: 8px; text-transform: none; letter-spacing: 0.01em; font-size: 13px; font-weight: 500; }
.selectmodal__trigger svg { flex: 0 0 auto; }
.selectmodal__dialog {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(4, 6, 9, 0.72);
  backdrop-filter: blur(4px);
  animation: fade 0.16s var(--ease);
}
.selectmodal__dialog[hidden] { display: none; }
.selectmodal__panel {
  width: min(420px, 100%);
  max-height: min(70vh, 560px);
  display: flex;
  flex-direction: column;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--overlay);
  box-shadow: var(--shadow);
}
.selectmodal__head { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px 8px; }
.selectmodal__head strong { font-family: var(--font-head); font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-dim); }
.selectmodal__close { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; color: var(--text-dim); background: transparent; border: 1px solid transparent; cursor: pointer; }
.selectmodal__close:hover { color: var(--text); background: rgba(var(--veil), 0.06); }
.selectmodal__list { overflow-y: auto; display: flex; flex-direction: column; gap: 2px; padding: 0 4px 8px; }
.selectmodal__opt {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left;
  padding: 11px 14px; border-radius: 10px; border: 1px solid transparent;
  background: transparent; color: var(--text); font-size: 14px; cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.selectmodal__opt:hover { background: rgba(var(--veil), 0.05); }
.selectmodal__opt.is-active { background: rgba(var(--neon-rgb), 0.09); border-color: rgba(var(--neon-rgb), 0.28); color: var(--neon); }
.selectmodal__opt.is-active::after { content: ''; margin-left: auto; width: 6px; height: 6px; border-radius: 50%; background: var(--neon); box-shadow: 0 0 8px var(--neon); }
.selectmodal__opt small { margin-left: auto; font-size: 11px; color: var(--dim); }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 8px;
  border: 1px solid var(--line-soft);
  background: rgba(var(--veil), 0.03);
  font-size: 12px;
  color: var(--text-dim);
}
.chip--ghost { border-color: transparent; background: transparent; color: var(--dim); }

.pip {
  display: inline-grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 99px;
  background: var(--neon-2);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  box-shadow: 0 0 12px -2px rgba(var(--neon-2-rgb), 0.7);
}
.pip--dot { position: absolute; top: -4px; right: -4px; }
.pip--solid { background: var(--neon); color: var(--on-accent); box-shadow: none; }

.avatar {
  --size: 44px;
  width: var(--size);
  height: var(--size);
  border-radius: 50%;
  object-fit: cover;
  flex: 0 0 auto;
  background: var(--panel-3);
  border: 1px solid rgba(var(--veil), 0.09);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.3);
}
.avatar--gen {
  display: inline-grid;
  place-items: center;
  font-family: var(--font-head);
  font-size: calc(var(--size) * 0.36);
  font-weight: 700;
  letter-spacing: 0.02em;
  color: hsl(var(--h, 190) 90% 78%);
  background:
    radial-gradient(circle at 30% 20%, hsl(var(--h, 190) 80% 26%), transparent 70%),
    linear-gradient(140deg, hsl(var(--h, 190) 55% 15%), var(--panel));
  border-color: hsl(var(--h, 190) 70% 40% / 0.55);
}
/* The mobile activity row turns its text span into a flex child; the
   generated initials avatar is also a span and must stay a square with
   its initials centred. */
.row__id > span.avatar {
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  align-items: center;
  justify-items: center;
  line-height: 1;
}
.avatar--xs { --size: 26px; }
.avatar--sm { --size: 36px; }
.avatar--md { --size: 46px; }
.avatar--lg { --size: 76px; }
.avatar--xl { --size: 104px; border-width: 3px; border-color: var(--bg); box-shadow: 0 0 0 2px rgba(var(--neon-rgb), 0.5), 0 0 30px -8px rgba(var(--neon-rgb), 0.6); }
.avatar--xxl { --size: 130px; }

/* avatar online indicator — add .avatar--online to wrapper */
.avatar--online { position: relative; display: inline-flex; }
.avatar--online::after {
  content: '';
  position: absolute;
  bottom: -1px;
  right: -1px;
  width: 28%;
  height: 28%;
  min-width: 8px;
  min-height: 8px;
  border-radius: 50%;
  background: var(--neon-3);
  border: 2px solid var(--bg);
  box-shadow: 0 0 0 2px var(--bg);
}

/* ── skeleton loaders ───────────────────────────────────────────── */
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
.skeleton {
  background: linear-gradient(90deg, var(--panel-2) 25%, var(--panel) 50%, var(--panel-2) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s ease-in-out infinite;
  border-radius: 6px;
}
.skeleton--card { border-radius: 14px; }
.skeleton--avatar { border-radius: 50%; }
.skeleton--text { height: 1em; border-radius: 4px; margin: 4px 0; }
.skeleton--text:last-child { width: 60%; }
.skeleton--btn { height: 34px; border-radius: 999px; width: 120px; }
.skeleton--card-header { height: 16px; width: 40%; margin-bottom: 12px; }
.skeleton--card-body { height: 14px; width: 100%; margin: 6px 0; }
.skeleton--card-body:last-child { width: 70%; }
.skeleton--meetup-face { width: 22px; height: 22px; border-radius: 50%; }
.skeleton--build-cover { aspect-ratio: 16/10; border-radius: 12px 12px 0 0; }

/* ── cards ──────────────────────────────────────────────────────── */
.card {
  position: relative;
  background: linear-gradient(180deg, rgba(var(--panel-scrim), 0.92), rgba(var(--panel-scrim), 0.94));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 24px; /* default card padding */
}
.card--form { display: flex; flex-direction: column; gap: 14px; }
/* The submit button of a form inside a card is wide. The pill-shaped
   search bars keep their own button, so they are left out. */
.card--form form:not(.searchbig) > .btn,
.card--danger form:not(.searchbig) > .btn { width: 100%; margin-top: 24px; }
.card--form h2, .card__title {
  font-family: var(--font-head);
  font-size: 20px;
  letter-spacing: 0.04em;
  margin-bottom: 2px;
}
.card--danger { border-color: rgba(var(--danger-rgb), 0.28); display: flex; flex-direction: column; gap: 12px; }
.card--danger .card__title { color: var(--danger-soft); }

.mini { padding: 16px; }
.mini__title {
  font-size: 13px;
  letter-spacing: 0.14em;
  color: var(--text-dim);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 7px;
}
.mini__list { display: flex; flex-direction: column; gap: 2px; }
.mini__list a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 8px;
  border-radius: 8px;
  font-size: 13px;
  color: var(--text-dim);
  transition: background 0.15s, color 0.15s;
  min-width: 0;
}
.mini__list a:hover { background: rgba(var(--veil), 0.05); color: var(--text); }
.mini__list a .tag { margin-left: auto; flex-shrink: 0; max-width: 45%; }
.mini__more {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 10px;
  font-size: 11.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--neon);
  font-weight: 600;
}
.mini__person { display: flex; align-items: center; gap: 10px; padding: 6px 0; }
.mini__person + .mini__person { border-top: 1px solid var(--line-soft); }
.mini__person-text { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.25; }
.mini__person-text strong { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini__person-text span { font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini__rules { display: flex; flex-direction: column; gap: 8px; font-size: 12.5px; color: var(--text-dim); }
.mini__rules li { padding-left: 14px; position: relative; }
.mini__rules li::before {
  content: ""; position: absolute; left: 0; top: 8px;
  width: 5px; height: 5px; border-radius: 50%; background: var(--neon-2);
}
.mini--theme { border-color: rgba(var(--neon-2-rgb), 0.22); background: linear-gradient(160deg, rgba(var(--neon-2-rgb), 0.08), rgba(var(--panel-scrim), 0.95) 55%); }
.mini__meetup { display: flex; gap: 10px; align-items: center; padding: 8px 0; }
.mini__meetup + .mini__meetup { border-top: 1px solid var(--line-soft); }
.mini__meetup-when {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--neon);
  border: 1px solid rgba(var(--neon-rgb), 0.28);
  border-radius: 6px;
  padding: 4px 6px;
  white-space: nowrap;
}
.mini__meetup-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.mini__meetup-text strong { font-size: 12.5px; }
.mini__meetup-text span { font-size: 11px; }

/* ── top bar ────────────────────────────────────────────────────── */
.topbar {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(var(--panel-scrim), 0.82);
  backdrop-filter: blur(18px) saturate(1.3);
  border-bottom: 1px solid var(--line-soft);
}
.topbar__inner {
  max-width: var(--shell);
  margin: 0 auto;
  min-height: var(--topbar);
  padding: 9px 22px;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 10px 16px;
}


.brand { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }
.brand__logo {
  display: block;
  height: 32px;
  width: auto;
  filter: drop-shadow(0 0 16px rgba(var(--neon-rgb), 0.35));
}
.brand__mark {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border-radius: 11px;
  color: var(--on-accent);
  background: linear-gradient(140deg, var(--neon) 0%, var(--accent-b) 60%, var(--neon-3) 140%);
  box-shadow: 0 0 22px -6px rgba(var(--neon-rgb), 0.8), inset 0 1px 0 rgba(var(--veil), 0.4);
}
.brand__text { display: flex; flex-direction: column; line-height: 1; }
.brand__text strong {
  font-family: var(--font-head);
  font-size: 22px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-shadow: 0 0 22px rgba(var(--neon-rgb), 0.45);
}
.brand__text small {
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--dim);
  margin-top: 3px;
}

.searchbar {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1 1 160px;
  min-width: 140px;
  max-width: 320px;
  padding: 0 18px;
  height: 42px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(var(--panel-scrim), 0.75);
  color: var(--dim);
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.searchbar:focus-within {
  border-color: rgba(var(--neon-rgb), 0.5);
  box-shadow: 0 0 0 3px rgba(var(--neon-rgb), 0.1);
  background: rgba(var(--neon-rgb), 0.04);
  color: var(--neon);
}
.searchbar input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  background: none;
  outline: none;
  box-shadow: none;
  padding: 0;
  font-size: 14px;
  color: var(--text);
}
.searchbar input::placeholder { color: var(--dim); }

.mainnav { display: flex; align-items: center; gap: 2px; }
.mainnav__link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border-radius: 9px;
  font-family: var(--font-head);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
  transition: color 0.18s, background 0.18s;
}
.mainnav__link:hover { color: var(--text); background: rgba(var(--veil), 0.05); }
.mainnav__link.is-active { color: var(--neon); background: rgba(var(--neon-rgb), 0.08); }
.mainnav__link.is-active::after {
  content: "";
  position: absolute;
  left: 12px; right: 12px; bottom: -1px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--neon), transparent);
  box-shadow: 0 0 10px var(--neon);
}
.mainnav__link .pip { position: absolute; top: 1px; right: 4px; }

.topbar__end { display: flex; align-items: center; gap: 10px; margin-left: auto; flex: 0 0 auto; min-width: 0; }
.topbar__right { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; min-width: 0; }
.topbar__right .iconbtn { position: relative; }
.topbar__right .avatar--sm { flex-shrink: 0; }
.topbar__cta { display: flex; align-items: center; gap: 8px; margin-left: auto; }

/* dropdown menu */
.menu { position: relative; }
.menu--end .menu__panel { right: 0; left: auto; }
.menu__trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 8px 4px 4px;
  border-radius: 99px;
  border: 1px solid transparent;
  color: var(--text-dim);
  transition: background 0.18s, border-color 0.18s;
}
.menu__trigger:hover { background: rgba(var(--veil), 0.05); border-color: var(--line); }
.menu__handle { font-size: 12.5px; max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu__panel {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  z-index: 80;
  min-width: 240px;
  padding: 8px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--overlay);
  box-shadow: var(--shadow);
  animation: pop 0.14s var(--ease);
}
@keyframes pop { from { opacity: 0; transform: translateY(-6px) scale(0.98); } }
.menu__head { display: flex; gap: 10px; align-items: center; padding: 8px 8px 12px; border-bottom: 1px solid var(--line-soft); margin-bottom: 6px; }
.menu__head div { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
.menu__head strong { font-size: 13.5px; }
.menu__head span { font-size: 11.5px; }
.menu__item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 10px;
  border-radius: 8px;
  font-size: 13px;
  color: var(--text-dim);
  text-align: left;
  transition: background 0.15s, color 0.15s;
}
.menu__item:hover { background: rgba(var(--veil), 0.06); color: var(--text); }
.menu__item--danger { color: var(--danger-soft); }
.menu__item--danger:hover { background: rgba(var(--danger-rgb), 0.12); color: var(--danger-soft); }
.menu__item .pip { margin-left: auto; }
.menu__form { margin: 0; }

/* bottom nav (mobile) */
.bottomnav { display: none; }

.appmenu__trigger {
  display: none;
  position: fixed;
  bottom: 16px; left: 16px;
  z-index: 70;
  width: 52px;
  height: 52px;
  display: none;
  grid-template-columns: 1fr;
  place-items: center;
  border-radius: 50%;
  color: var(--on-accent);
  background: linear-gradient(140deg, var(--neon), var(--accent-c));
  box-shadow: 0 10px 30px -8px rgba(var(--neon-rgb), 0.7), inset 0 1px 0 rgba(var(--veil), 0.35);
  border: none;
}
.appmenu__trigger:hover { opacity: 0.9; }



.appmenu {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 80;
  background: rgba(var(--panel-scrim), 0.96);
  backdrop-filter: blur(24px);
  border-top: 1px solid var(--line);
  border-radius: 20px 20px 0 0;
  padding: 16px 20px calc(16px + env(safe-area-inset-bottom, 0px));
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 80vh;
  overflow-y: auto;
  transform: translateY(100%);
  transition: transform 0.3s ease;
}
.appmenu.is-open { transform: translateY(0); }
.appmenu__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.appmenu__head strong { font-family: var(--font-head); font-size: 16px; letter-spacing: 0.04em; text-transform: uppercase; }
.appmenu__link {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px;
  border-radius: 10px;
  color: var(--text-dim);
  font-size: 14px;
  font-weight: 500;
}
.appmenu__link:hover { background: rgba(var(--veil), 0.05); color: var(--text); }
.appmenu__link.is-active { background: rgba(var(--neon-rgb), 0.1); color: var(--neon); }
.appmenu__link .pip { margin-left: auto; }
.appmenu__backdrop {
  position: fixed; inset: 0;
  z-index: 75;
  background: var(--scrim);
  backdrop-filter: blur(4px);
}
.bottomnav__link {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  flex: 1;
  min-width: 0;
  color: var(--dim);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
}
.bottomnav__link.is-active { color: var(--neon); }
.bottomnav__link.is-active::before {
  content: "";
  position: absolute;
  top: 0; left: 50%; transform: translateX(-50%);
  width: 28px; height: 2px;
  background: var(--neon);
  box-shadow: 0 0 12px var(--neon);
  border-radius: 0 0 3px 3px;
}
.bottomnav__link .pip { position: absolute; top: 8px; right: 26%; }

/* ── footer ─────────────────────────────────────────────────────── */
.footer {
  position: relative;
  z-index: 2;
  border-top: 1px solid var(--line-soft);
  padding: 26px 22px 96px;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.4));
}
.footer__inner {
  max-width: var(--shell);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 26px;
  font-size: 12px;
  color: var(--dim);
}
.footer__brand {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-head);
  letter-spacing: 0.18em;
  color: var(--text-dim);
}
.footer__logo { display: block; height: 20px; width: auto; opacity: 0.85; }
.footer__links { display: flex; gap: 16px; margin-left: 0; }
.footer__links a:hover { color: var(--neon); }
.footer__versions {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--dim);
  white-space: nowrap;
}
.footer__versions b { color: var(--text-dim); font-weight: 600; }
.footer__dot { opacity: 0.4; }

/* App update banner (shown inside the Android shell when a newer APK exists). */
.update-banner {
  position: fixed;
  top: calc(var(--topbar) + 12px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 90;
  display: flex;
  align-items: center;
  gap: 10px;
  width: min(720px, calc(100vw - 24px));
  padding: 10px 10px 10px 14px;
  border: 1px solid rgba(var(--neon-rgb), 0.38);
  border-radius: 14px;
  background: rgba(7, 8, 11, 0.95);
  box-shadow: 0 14px 44px rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(12px);
}
.update-banner[hidden] { display: none; }
body.has-open-modal .update-banner { display: none; }
.update-banner__text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}
.update-banner__text strong {
  font-family: var(--font-head);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--neon);
}
.update-banner__text span { font-size: 13px; color: var(--text-dim); }
.update-banner__close {
  display: inline-flex;
  padding: 6px;
  border-radius: 8px;
  color: var(--dim);
}
.update-banner__close:hover { color: var(--text); background: rgba(var(--veil), 0.08); }

/* One-time post-login nudge for users who have not enabled notifications. */
.notif-prompt {
  position: fixed;
  left: 50%;
  bottom: calc(88px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  z-index: 85;
  display: flex;
  align-items: center;
  gap: 12px;
  width: min(620px, calc(100vw - 24px));
  padding: 12px 14px;
  border: 1px solid rgba(var(--neon-rgb), 0.3);
  border-radius: 14px;
  background: rgba(7, 8, 11, 0.96);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(12px);
}
.notif-prompt[hidden] { display: none; }
.notif-prompt__text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}
.notif-prompt__text strong {
  font-family: var(--font-head);
  font-size: 13px;
  letter-spacing: 0.06em;
  color: var(--text);
}
.notif-prompt__text span { font-size: 12px; color: var(--text-dim); line-height: 1.45; }
.notif-prompt__actions { display: flex; gap: 8px; flex: 0 0 auto; }
@media (max-width: 620px) {
  .notif-prompt {
    bottom: calc(82px + env(safe-area-inset-bottom, 0px));
    flex-wrap: wrap;
  }
  .notif-prompt__text { flex-basis: 100%; }
  .notif-prompt__actions { width: 100%; }
  .notif-prompt__actions .btn { flex: 1; }
}
@media (min-width: 861px) {
  /* Keep the first card clear of the fixed update banner. */
  body.has-update-banner .layout-shell { padding-top: 96px; }
}

/* Release notes in Settings → App & updates → Changes. */
.changelog {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 14px;
}
.changelog__entry {
  padding: 13px 15px;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: rgba(var(--veil), 0.03);
}
.changelog__entry.is-installed { border-color: rgba(var(--neon-rgb), 0.24); }
.changelog__entry.is-new {
  border-color: rgba(var(--neon-rgb), 0.42);
  box-shadow: var(--glow);
}
.changelog__head {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 7px;
}
.changelog__version {
  font-family: var(--font-head);
  font-size: 15px;
  letter-spacing: 0.05em;
  color: var(--text);
}
.changelog__date {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--dim);
  white-space: nowrap;
}
.changelog__state {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 3px 7px;
  border-radius: 999px;
  background: rgba(var(--neon-rgb), 0.13);
  color: var(--neon);
}
.changelog__list {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding-left: 16px;
  list-style: disc;
  color: var(--text-dim);
  font-size: 13px;
  line-height: 1.5;
}
.changelog__list li::marker { color: var(--neon); }

/* ── flashes & alerts ───────────────────────────────────────────── */
.flashes { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; }
.flash {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(var(--veil), 0.04);
  font-size: 13.5px;
  animation: slidein 0.3s var(--ease);
}
@keyframes slidein { from { opacity: 0; transform: translateY(-8px); } }
.flash svg { margin-top: 1px; }
.flash span { flex: 1; }
.flash__close { color: var(--dim); padding: 2px; border-radius: 5px; }
.flash__close:hover { color: var(--text); background: rgba(var(--veil), 0.08); }
.flash--success { border-color: rgba(var(--neon-3-rgb), 0.35); background: rgba(var(--neon-3-rgb), 0.07); color: var(--neon-3-soft); }
.flash--error { border-color: rgba(var(--danger-rgb), 0.4); background: rgba(var(--danger-rgb), 0.09); color: var(--danger-soft); }
.flash--warning { border-color: rgba(var(--amber-rgb), 0.4); background: rgba(var(--amber-rgb), 0.09); color: var(--amber-soft); }
.flash--info { border-color: rgba(var(--neon-rgb), 0.35); background: rgba(var(--neon-rgb), 0.07); color: var(--accent-soft); }

.alert { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 10px; font-size: 13px; }
.alert--error { border: 1px solid rgba(var(--danger-rgb), 0.4); background: rgba(var(--danger-rgb), 0.09); color: var(--danger-soft); }

/* ── forms ──────────────────────────────────────────────────────── */
.field { display: flex; flex-direction: column; gap: 6px; }
.field--tight { margin-top: 12px; }
.field__label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.field__hint { display: block; font-size: 11.5px; color: var(--dim); line-height: 1.4; }
.field__error { font-size: 12px; color: var(--danger-soft); }
.field__note { font-size: 11.5px; color: var(--neon-3); min-height: 0; }
.field--bad input, .field--bad textarea, .field--bad select { border-color: rgba(var(--danger-rgb), 0.55); }

input[type="text"], input[type="email"], input[type="password"], input[type="search"],
input[type="number"], input[type="datetime-local"], input[type="url"],
select {
  width: 100%;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(var(--panel-scrim), 0.75);
  color: var(--text);
  font-size: 14px;
  line-height: 20px;
  transition: border-color 0.18s, box-shadow 0.18s, background 0.18s;
  appearance: none;
}
textarea {
  width: 100%;
  padding: 11px 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(var(--panel-scrim), 0.75);
  color: var(--text);
  font-size: 14px;
  transition: border-color 0.18s, box-shadow 0.18s, background 0.18s;
  appearance: none;
  resize: vertical;
  min-height: 76px;
  line-height: 1.5;
}
input::placeholder, textarea::placeholder { color: var(--dim); }
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: rgba(var(--neon-rgb), 0.55);
  box-shadow: 0 0 0 3px rgba(var(--neon-rgb), 0.1);
  /* background-color, not the shorthand - the shorthand would wipe the
     select's arrow image while the box is focused. */
  background-color: rgba(var(--neon-rgb), 0.03);
}
select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23858fa3' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
}
/* The option list is drawn by the OS, so it needs its own dark theme
   or it opens as a white sheet in the middle of the app. */
select option, select optgroup { background-color: var(--overlay); color: var(--text); }
select optgroup { font-weight: 700; }
/* Date and time pickers are drawn by the browser, so they keep the native
   look - but the scheme has to follow the theme, or the field stays a black
   box on the light theme. */
input[type="date"], input[type="time"], input[type="month"], input[type="week"] {
  width: 100%;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(var(--panel-scrim), 0.75);
  color: var(--text);
  font-size: 14px;
  line-height: 20px;
  color-scheme: var(--native-scheme);
  transition: border-color 0.18s, box-shadow 0.18s, background 0.18s;
}
input[type="file"] {
  width: 100%;
  max-width: 100%;
  height: 42px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(var(--panel-scrim), 0.75);
  font-size: 12.5px;
  color: var(--muted);
  /* The native control draws its own button and centres it; making it a
     flex box pushed the button over the rounded edge. A long file name
     is cut off instead. */
  display: block;
  line-height: 40px;
  white-space: nowrap;
  overflow: hidden;
}
input[type="file"]::file-selector-button {
  flex: 0 0 auto;
  max-width: 100%;
  margin-right: 10px;
  /* Its own height: the button took the line height of the field and
     grew over the top and the bottom of the box. */
  height: 30px;
  line-height: 28px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(var(--veil), 0.06);
  color: var(--text);
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
input[type="file"]::file-selector-button:hover {
  background: rgba(var(--veil), 0.12);
  border-color: var(--neon-3);
}
  color: var(--text-dim);
  font-size: 11px;
  font-family: var(--font-head);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
}
input[type="datetime-local"] { color-scheme: var(--native-scheme); height: 42px; }

/* The search bar and the address picker are their own pill. The field
   inside must draw no box of its own, otherwise it reads as a pill
   nested inside a pill. This block sits *after* the base input rule so
   it wins on equal specificity. */
.searchbar input,
.searchbar input[type="search"],
.searchbig input,
.searchbig input[type="search"],
.mapbox__input input,
.mapbox__input input[type="text"] {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  background: none;
  box-shadow: none;
  border-radius: 0;
  padding: 0;
  outline: none;
  color: var(--text);
  font-size: 14px;
}

.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.field__pw { position: relative; display: block; }
.field__pw input { padding-right: 44px; }
.field__eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); padding: 6px; color: var(--dim); border-radius: 6px; }
.field__eye:hover { color: var(--neon); }

.meter { display: flex; gap: 4px; margin: 2px 0; }
.meter i { flex: 1; height: 4px; border-radius: 99px; background: var(--line); transition: background 0.25s; }
.meter[data-score="1"] i:nth-child(-n+1) { background: var(--danger); }
.meter[data-score="2"] i:nth-child(-n+2) { background: var(--amber); }
.meter[data-score="3"] i:nth-child(-n+3) { background: var(--neon); }
.meter[data-score="4"] i { background: var(--neon-3); }

/* privacy radio cards */
.radiocards { display: flex; flex-direction: column; gap: 8px; margin-top: 6px; }
.radiocard {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 13px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(var(--veil), 0.02);
  cursor: pointer;
  transition: border-color 0.18s, background 0.18s, box-shadow 0.18s;
}
.radiocard input { position: absolute; opacity: 0; pointer-events: none; }
.radiocard__icon {
  display: grid; place-items: center;
  width: 34px; height: 34px; border-radius: 9px;
  background: rgba(var(--veil), 0.04);
  border: 1px solid var(--line);
  color: var(--muted);
}
.radiocard__text { display: flex; flex-direction: column; gap: 2px; }
.radiocard__text strong { font-family: var(--font-head); font-size: 14px; letter-spacing: 0.04em; text-transform: uppercase; }
.radiocard__text span { font-size: 12px; line-height: 1.45; }
.radiocard:hover { border-color: var(--line-strong); }
.radiocard:has(input:checked) {
  border-color: rgba(var(--neon-rgb), 0.5);
  background: rgba(var(--neon-rgb), 0.06);
  box-shadow: 0 0 0 1px rgba(var(--neon-rgb), 0.15), 0 0 24px -14px rgba(var(--neon-rgb), 0.7);
}
.radiocard:has(input:checked) .radiocard__icon { color: var(--neon); border-color: rgba(var(--neon-rgb), 0.45); background: rgba(var(--neon-rgb), 0.1); }

/* The page-level search is the same pill as every form input, just
   wider, so the top bar and the in-page search read as one control. */
.searchbig {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 42px;
  padding: 0 6px 0 18px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(var(--panel-scrim), 0.75);
  color: var(--dim);
  margin-bottom: 18px;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.searchbig:focus-within {
  border-color: rgba(var(--neon-rgb), 0.5);
  box-shadow: 0 0 0 3px rgba(var(--neon-rgb), 0.1);
  background: rgba(var(--neon-rgb), 0.04);
  color: var(--neon);
}
.searchbig > svg { flex: 0 0 auto; }
.searchbig input { flex: 1; min-width: 0; height: 100%; border: 0; background: none; box-shadow: none; padding: 0; font-size: 14px; }
.searchbig input:focus { box-shadow: none; }

.inlineform { display: flex; gap: 8px; }
.inlineform input { flex: 1; min-width: 0; }
.dangerrow { margin-top: 18px; padding-top: 14px; border-top: 1px solid rgba(var(--danger-rgb), 0.25); }
.kv { display: grid; grid-template-columns: 130px 1fr; gap: 8px 14px; font-size: 13px; }
.kv span { color: var(--dim); }
.avatarrow { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }

/* The picture that has just been chosen is shown before it is saved. */
.avatarrow__pic { position: relative; display: inline-flex; border-radius: 50%; }
.avatarrow__pic.is-preview::after {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2px dashed rgba(var(--neon-rgb), 0.8);
  pointer-events: none;
}
.avatarrow__note { width: 100%; color: var(--neon); }
.logopreview {
  display: block;
  width: 92px;
  height: 92px;
  margin-top: 8px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px dashed var(--line);
  background: var(--inset);
}
.logopreview img { display: block; width: 100%; height: 100%; object-fit: cover; }
.grouphead__cover.is-preview { outline: 2px dashed rgba(var(--neon-rgb), 0.8); outline-offset: -4px; }

/* ── page furniture ─────────────────────────────────────────────── */
.pagehead {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 20px;
}
.pagehead .lede { margin-top: 6px; }
/* Owner actions sit in the top-right corner, side by side even when one of
   them is a POST form (Edit | Delete). */
.pagehead__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  align-self: flex-start;
}
.pagehead__actions form { margin: 0; }
.pagehead__actions .btn { white-space: nowrap; }

.section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  letter-spacing: 0.14em;
  color: var(--text-dim);
  margin-bottom: 12px;
}
.section-title::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--line), transparent);
}
.strip { margin-top: 30px; }

/* The head of a strip: the title with its line, and the link on the right. */
.strip__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}
.strip__head .section-title { margin-bottom: 0; flex: 1; min-width: 0; }
.strip__head .link { flex: 0 0 auto; }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.cards > * { min-width: 0; }
.cards--persons { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.cards--wide { grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); }

.rows { display: flex; flex-direction: column; gap: 6px; }
.row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: 12px;
  border: 1px solid var(--line-soft);
  background: rgba(var(--veil), 0.02);
}
.row:hover { border-color: var(--line); }
.row__id { display: flex; align-items: center; gap: 11px; min-width: 0; flex: 1; }
.row__id > span { min-width: 0; }
/* A search result row carries a post excerpt under its author line. */
.row__snippet {
  display: block;
  margin-top: 2px;
  color: var(--text-dim);
  overflow-wrap: anywhere;
}
.row__actions { display: flex; gap: 8px; align-items: center; }
.row__actions form { margin: 0; }
.row--activity.is-fresh { border-color: rgba(var(--neon-rgb), 0.3); background: rgba(var(--neon-rgb), 0.04); }
/* Action button of a row (shared spots / pins): tall enough for Georgian
   copy, never squeezed by the title. */
.row > .btn { flex-shrink: 0; height: auto; min-height: 40px; min-width: 84px; padding: 8px 14px; font-size: 12px; }

.faces { display: flex; gap: 12px; flex-wrap: wrap; }
.faces--grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 10px; }
.faces__item { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--text-dim); }
.faces__item:hover { color: var(--text); }
.faces--grid .faces__item { flex-direction: column; gap: 5px; text-align: center; }
.faces--grid .faces__item span { font-size: 11px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.pager { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 26px 0 6px; }
.pager__page { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; }

.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
  padding: 56px 28px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  background: radial-gradient(circle at 50% 0%, rgba(var(--neon-rgb), 0.06), transparent 60%);
}
.empty__mark {
  display: grid; place-items: center;
  width: 72px; height: 72px; border-radius: 50%;
  border: 1px solid var(--line);
  background: radial-gradient(circle at 30% 30%, rgba(var(--neon-rgb), 0.12), transparent 70%);
  color: var(--neon);
  margin-bottom: 6px;
  box-shadow: 0 0 24px -8px rgba(var(--neon-rgb), 0.4);
}
.empty__title { font-size: 19px; letter-spacing: 0.03em; }
.empty__text { color: var(--muted); font-size: 14px; max-width: 46ch; line-height: 1.5; }
.empty__action { margin-top: 10px; }
.empty__action .btn { min-width: 160px; }

/* ── first-visit onboarding tooltip ─────────────────────────────── */
.onboarding {
  position: fixed;
  z-index: 200;
  bottom: 90px;
  right: 18px;
  max-width: 360px;
  padding: 16px 18px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--overlay);
  box-shadow: var(--shadow);
  animation: slideUp 0.3s var(--ease);
}
.onboarding[hidden] { display: none; }
.onboarding__text { font-size: 13.5px; color: var(--text-dim); line-height: 1.55; }
.onboarding__text strong { color: var(--text); }
.onboarding__actions { display: flex; gap: 8px; margin-top: 14px; }
.onboarding__actions .btn { flex: 1; }
@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── admin font picker ───────────────────────────────────────────── */
.font-admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 16px;
  margin-top: 16px;
}
.font-admin-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: var(--panel);
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
  cursor: pointer;
}
.font-admin-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.font-admin-card.is-current {
  border-color: var(--neon);
  box-shadow: 0 0 0 2px rgba(var(--neon-rgb), 0.2);
}
.font-admin-preview {
  padding: 16px;
  border-bottom: 1px solid var(--line-soft);
  background: rgba(var(--veil), 0.02);
}
.preview-title {
  font-size: clamp(1.3rem, 2.5vw, 1.6rem);
  margin: 0 0 10px;
  letter-spacing: -0.01em;
  font-weight: 700;
}
.preview-body {
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-dim);
  margin: 0 0 12px;
}
.preview-ui {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.font-admin-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: rgba(var(--veil), 0.01);
}
.font-admin-info strong {
  font-family: var(--font-head);
  font-size: 12.5px;
}
.font-admin-info .muted {
  display: block;
  font-size: 11px;
  margin-top: 2px;
}
.font-admin-card .btn {
  font-size: 11px;
  padding: 5px 10px;
}

/* ── toast (reused) ──────────────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  padding: 12px 20px;
  background: var(--neon-3);
  color: var(--on-accent);
  border-radius: 8px;
  font-weight: 600;
  font-size: 13px;
  box-shadow: var(--shadow);
  animation: slideUp 0.3s var(--ease);
  z-index: 1000;
}
.toast[hidden] { display: none; }
@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── custom font upload (admin appearance) ───────────────────────── */
.custom-font-upload {
  margin-top: 24px;
  padding: 16px;
  border: 1px dashed var(--line);
  border-radius: 12px;
  background: rgba(var(--veil), 0.02);
}
.custom-font-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.custom-font-form .field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.custom-font-form .field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.custom-font-form .field__label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.custom-font-form input[type="file"] {
  display: block;
  width: 100%;
  padding: 8px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--text);
}
.custom-font-form input[type="text"],
.custom-font-form select {
  width: 100%;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(var(--panel-scrim), 0.75);
  color: var(--text);
  font-size: 14px;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.custom-font-form select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23858fa3' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
}
.custom-font-form button[type="submit"] {
  margin-top: 8px;
  width: 100%;
}

.custom-font-list {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--line-soft);
}
.custom-font-list h4 {
  font-family: var(--font-head);
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin: 0 0 12px;
}
.custom-font-item {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(var(--veil), 0.02);
  margin-bottom: 8px;
}
.custom-font-name {
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 500;
  flex: 1;
}
.custom-font-sample {
  flex-basis: 100%;
  order: 3;
  font-size: 15px;
  line-height: 1.3;
  color: var(--text-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.custom-font-meta {
  font-size: 11px;
  color: var(--dim);
  white-space: nowrap;
}
.custom-font-item form {
  margin: 0;
}
.custom-font-item .btn {
  padding: 4px 8px;
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.backlink {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.backlink:hover { color: var(--neon); }

.feedtabs {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 18px 0 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line-soft);
  overflow-x: auto;
}
.feedtabs__tab {
  padding: 7px 14px;
  border-radius: 99px;
  font-family: var(--font-head);
  font-size: 12.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
  border: 1px solid transparent;
}
.feedtabs__tab:hover { color: var(--text); background: rgba(var(--veil), 0.04); }
.feedtabs__tab.is-active {
  color: var(--neon);
  border-color: rgba(var(--neon-rgb), 0.3);
  background: rgba(var(--neon-rgb), 0.08);
}
.feedtabs__count { margin-left: auto; font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase; white-space: nowrap; }

.feedtabs__count { margin-left: auto; font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase; white-space: nowrap; }

/* The tabs on the Find drivers page: friends / all / suggested. */
/* The tabs on the Find drivers page: friends / all / suggested. */
.peopletabs { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.peopletabs__tab {
  display: inline-flex; align-items: center; gap: 7px;
  height: 36px; padding: 0 16px;
  border-radius: 9px;
  font-size: 12px;
  font-family: var(--font-head);
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  background: rgba(var(--veil), 0.03);
  border: 1px solid var(--line);
  border-radius: 9px;
  cursor: pointer; transition: color 0.15s, background 0.15s, border-color 0.15s, box-shadow 0.15s;
}
.peopletabs__tab:hover { color: var(--text); border-color: var(--line-strong); background: rgba(var(--veil), 0.05); }
.peopletabs__tab.is-active {
  color: var(--on-accent);
  background: linear-gradient(135deg, var(--neon), var(--neon-deep));
  border-color: transparent;
  box-shadow: 0 0 20px -6px rgba(var(--neon-rgb), 0.7);
}
.peopletabs__tab .pip { font-size: 10px; }

.peopletabs__tab {
  display: inline-flex; align-items: center; gap: 7px;
  height: 36px; padding: 0 14px;
  border: 1px solid var(--line); border-radius: 999px;
  background: rgba(var(--veil), 0.03);
  color: var(--muted);
  font-family: var(--font-head); font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase;
  cursor: pointer; transition: color 0.15s, background 0.15s, border-color 0.15s;
}
.peopletabs__tab:hover { color: var(--text); border-color: var(--line-strong); background: rgba(var(--veil), 0.05); }
.peopletabs__tab.is-active { color: var(--neon); border-color: rgba(var(--neon-rgb), 0.3); background: rgba(var(--neon-rgb), 0.1); }
.peopletabs__tab .pip { font-size: 10px; }


/* ── wall layout ────────────────────────────────────────────────── */
.wall-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 20px;
  align-items: start;
}
.wall-side { position: sticky; top: calc(var(--topbar) + 20px); display: flex; flex-direction: column; gap: 14px; }
.wall-main { min-width: 0; display: flex; flex-direction: column; }

.profile-card { overflow: hidden; }
.nav-card { padding: 4px; position: sticky; top: calc(var(--topbar) + 20px); }
.sidenav { display: flex; flex-direction: column; gap: 2px; }
.sidenav__link { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 8px; color: var(--text-dim); font-size: 14px; font-weight: 500; transition: background 0.15s, color 0.15s; }
.sidenav__link:hover { background: rgba(var(--veil), 0.05); color: var(--text); }
.sidenav__link.is-active { background: rgba(var(--neon-rgb), 0.1); color: var(--neon); }
.sticky-groups { position: sticky; top: calc(var(--topbar) + 20px); }
.profile-card__body { display: flex; flex-direction: column; align-items: flex-start; gap: 5px; padding: 16px; }
.profile-card__name { font-family: var(--font-head); font-size: 18px; letter-spacing: 0.03em; text-transform: uppercase; margin-top: 4px; }
.profile-card__stats {
  display: flex; gap: 16px; width: 100%;
  margin: 10px 0 4px; padding: 10px 0;
  border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft);
}
.profile-card__stats span { display: flex; flex-direction: column; line-height: 1.1; }
.profile-card__stats strong { font-family: var(--font-head); font-size: 17px; }
.profile-card__stats small { font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--dim); }
.profile-card__links { display: flex; flex-direction: column; gap: 1px; width: 100%; }
.profile-card__links a {
  display: flex; align-items: center; gap: 9px;
  padding: 8px 6px; border-radius: 8px;
  font-size: 13px; color: var(--text-dim);
}
.profile-card__links a:hover { background: rgba(var(--veil), 0.05); color: var(--text); }
.profile-card__links .pip { margin-left: auto; }

/* ── composer ───────────────────────────────────────────────────── */
.composer {
  padding: 16px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(var(--panel-scrim), 0.9), rgba(var(--panel-scrim), 0.95));
  box-shadow: var(--shadow-sm);
  margin-bottom: 4px;
}
.composer:focus-within { border-color: rgba(var(--neon-rgb), 0.35); box-shadow: 0 0 0 1px rgba(var(--neon-rgb), 0.12), var(--shadow-sm); }
.composer__top { display: flex; gap: 12px; align-items: flex-start; }
.composer textarea {
  flex: 1;
  min-height: 54px;
  border: 0;
  background: none;
  padding: 8px 2px;
  font-size: 15px;
  line-height: 1.5;
  box-shadow: none;
}
.composer textarea:focus { box-shadow: none; background: none; }
.composer__scope {
  display: flex;
  align-items: center;
  gap: 5px;
  margin: 2px 0 0 56px;
  font-size: 11px;
  color: var(--dim);
}
.composer__scope strong { color: var(--text-dim); font-weight: 600; }
.composer__preview { margin: 12px 0 0 56px; }
.composer__preview img, .composer__preview video {
  max-height: 320px;
  width: auto;
  border-radius: 10px;
  border: 1px solid var(--line);
}
.composer__preview .filebox {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 10px;
  border: 1px dashed var(--line); font-size: 12.5px; color: var(--muted);
}
.composer__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line-soft);
}
.composer__tools { display: flex; gap: 4px; flex-wrap: wrap; }
.composer__send { display: flex; align-items: center; gap: 10px; }
.composer__hint { margin-top: 8px; font-size: 12px; }
.composer__hint:empty { display: none; }
.composer.pin-mode .toolbtn[data-pin-toggle] { color: var(--neon); background: rgba(var(--neon-rgb), 0.1); }
.toolbtn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.03em;
  transition: background 0.16s, color 0.16s;
}
.toolbtn:hover { background: rgba(var(--veil), 0.06); color: var(--text); }
.toolbtn.is-on { color: var(--neon); background: rgba(var(--neon-rgb), 0.1); }
.toolbtn--sos { color: var(--danger-soft); }
.toolbtn--sos:hover, .toolbtn--sos.is-on { background: rgba(var(--danger-rgb), 0.12); color: var(--danger-soft); }
.toolbtn--icon { padding: 0; width: 30px; }
/* The size switch: a small picture that loads fast, or the full size. */
.quality {
  display: inline-flex; align-items: center; gap: 2px;
  height: 30px; padding: 2px;
  border: 1px solid var(--line); border-radius: 999px;
  background: rgba(var(--veil), 0.03);
}
.quality[hidden] { display: none; }
.quality__btn {
  height: 24px; padding: 0 10px;
  border: 0; border-radius: 999px;
  background: transparent;
  color: var(--dim);
  font-family: var(--font-head); font-size: 10px; letter-spacing: 0.08em;
  cursor: pointer; transition: color 0.15s, background 0.15s;
}
.quality__btn:hover { color: var(--text); }
.quality__btn.is-on { color: var(--neon); background: rgba(var(--neon-rgb), 0.12); }
.quality--tiny { height: 24px; padding: 1px; }
.quality--tiny .quality__btn { height: 20px; padding: 0 8px; font-size: 9.5px; }

.counter { font-family: var(--font-mono); font-size: 10px; color: var(--dim); transition: color 0.15s; }
.counter--warn { color: var(--amber); }
.counter--danger { color: var(--danger); }

/* ── posts ──────────────────────────────────────────────────────── */
.post {
  padding: 16px;
  margin-top: 14px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(var(--panel-scrim), 0.9), rgba(var(--panel-scrim), 0.94));
  box-shadow: var(--shadow-sm);
}
.post:target { border-color: rgba(var(--neon-rgb), 0.5); box-shadow: var(--glow); }
.post--sos { border-color: rgba(var(--danger-rgb), 0.45); box-shadow: 0 0 0 1px rgba(var(--danger-rgb), 0.15), 0 0 30px -18px rgba(var(--danger-rgb), 0.8); }
.post--sos::before {
  content: "";
  position: absolute;
}
.post__head { display: flex; align-items: flex-start; gap: 11px; }
.post__avatar { flex: 0 0 auto; }
.post__who { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.post__name { font-family: var(--font-head); font-size: 15px; letter-spacing: 0.03em; text-transform: uppercase; }
.post__name:hover { color: var(--neon); }
.post__meta { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; font-size: 11.5px; color: var(--dim); }
.post__meta time { color: var(--muted); }
.post__body { margin: 12px 0 0 55px; font-size: 14.5px; line-height: 1.6; overflow-wrap: anywhere; }
.post__body .link { word-break: break-word; }
.post__media { display: block; margin: 12px 0 0 55px; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: var(--bg); }
.post__media img { width: 100%; max-height: 560px; object-fit: contain; cursor: zoom-in; }
.post__media video { width: 100%; max-height: 560px; background: #000; }
.post__media--video { background: #000; }

/* One video card: generated poster + custom play cover; native controls take
   over once playback starts. */
.video-player {
  position: relative;
  display: block;
  width: 100%;
  overflow: hidden;
  background: #000;
  border-radius: inherit;
}
.video-player video {
  display: block;
  width: 100%;
  max-height: 560px;
  background: #000;
}
.video-player__play {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 2;
  transform: translate(-50%, -50%);
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(var(--neon-rgb), 0.6);
  background: rgba(7, 8, 11, 0.76);
  color: #fff;
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.45), 0 0 24px -8px rgba(var(--neon-rgb), 0.55);
  backdrop-filter: blur(6px);
  transition: opacity 0.18s ease, transform 0.18s ease, background 0.18s ease;
}
.video-player__play:hover { background: rgba(7, 8, 11, 0.9); transform: translate(-50%, -50%) scale(1.05); }
.video-player__play svg { fill: currentColor; stroke: none; }
.video-player__playicon { display: grid; place-items: center; margin-left: 3px; }
.video-player.is-playing .video-player__play { opacity: 0; visibility: hidden; pointer-events: none; }
.video-player__duration {
  position: absolute;
  top: 9px;
  right: 9px;
  z-index: 2;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(7, 8, 11, 0.78);
  border: 1px solid rgba(var(--veil), 0.12);
  color: #eef4fb;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.03em;
  pointer-events: none;
}
.msg__video video, .comment__media .video-player video { max-height: 320px; }
.comment__media .video-player { border-radius: 9px; }

.post__stats { display: flex; align-items: center; gap: 4px; margin: 12px 0 0 55px; padding-top: 10px; border-top: 1px solid var(--line-soft); }
.stat {
  display: inline-flex; align-items: center; gap: 6px;
  flex: 0 0 auto;
  padding: 5px 10px; border-radius: 8px;
  font-family: var(--font-mono); font-size: 11.5px;
  color: var(--muted);
  transition: background 0.15s, color 0.15s;
}
.stat:hover { background: rgba(var(--veil), 0.06); color: var(--text); }
.stat--like.is-on { color: var(--neon-2); background: rgba(var(--neon-2-rgb), 0.09); }
.stat--like.is-on svg { fill: rgba(var(--neon-2-rgb), 0.35); }
.stat[disabled] { opacity: 0.6; cursor: default; }
.stat.is-bump svg { animation: bump 0.35s var(--ease); }
@keyframes bump { 50% { transform: scale(1.35); } }

.sos {
  display: flex; align-items: center; gap: 11px;
  margin: 12px 0 0 55px; padding: 11px 14px;
  border-radius: 10px;
  border: 1px solid rgba(var(--danger-rgb), 0.45);
  background: repeating-linear-gradient(135deg, rgba(255, 45, 68, 0.16) 0 12px, rgba(255, 45, 68, 0.06) 12px 24px);
  color: var(--danger-soft);
}
.sos strong { display: block; font-family: var(--font-head); font-size: 13px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--danger-soft); }
.sos span { font-size: 12px; }
.sos svg { color: var(--danger); animation: pulse 2s infinite; }
@keyframes pulse { 50% { opacity: 0.45; } }

.pin { margin: 12px 0 0 55px; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); }
.pin__map { height: 190px; background: var(--inset); }
.pin__info { display: flex; align-items: center; gap: 9px; padding: 9px 12px; background: rgba(var(--veil), 0.03); font-size: 12px; }
.pin__info > div { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.pin__info strong { font-size: 12.5px; }
.pin__info span { font-size: 11px; }
.pin__link { font-family: var(--font-mono); font-size: 10.5px; color: var(--neon); white-space: nowrap; }
.pin--inline {
  display: flex; align-items: center; gap: 7px;
  margin-top: 10px; padding: 7px 11px;
  border-radius: 8px; border: 1px dashed var(--line);
  font-size: 11.5px; color: var(--muted);
}
.pin--inline svg { color: var(--neon); }

.comments { margin: 10px 0 0 55px; padding-top: 10px; border-top: 1px solid var(--line-soft); }
.comments__list { display: flex; flex-direction: column; gap: 9px; }
.comments__loading { font-size: 12px; padding: 4px 0; }
.comments__form { display: flex; align-items: center; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
/* The field takes the room, the send button keeps its round shape. */
.comments__form input { flex: 1 1 auto; min-width: 0; border-radius: 99px; padding: 8px 14px; font-size: 13px; }
.comments__form .btn { flex: 0 0 auto; border-radius: 50%; width: 34px; height: 34px; padding: 0; }
.comments__form .comment__mediaopts,
.comment__replyform .comment__mediaopts {
  flex: 0 0 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  order: -1;
  scroll-margin-bottom: calc(var(--ui-tabbar) + 20px);
}
.comment__mediaopts[hidden] { display: none; }
.comment__preview { display: flex; align-items: center; min-width: 0; }
.comment__preview img,
.comment__preview video {
  display: block;
  width: 76px;
  height: 54px;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 9px;
}
.comment__preview .filebox {
  display: block;
  max-width: 210px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 7px 10px;
  border: 1px dashed var(--line);
  border-radius: 9px;
  font-size: 11px;
  color: var(--muted);
}
.comments__login { font-size: 12.5px; color: var(--dim); margin-top: 8px; }

.comment { display: flex; gap: 8px; align-items: flex-start; position: relative; }
/* The commenter's picture must keep its round shape. The line-height
   is only zeroed on the image - on the generated initials it would push
   the letters out of the circle. */
.comment__avatar { flex: 0 0 auto; display: block; }
.comment__avatar img { display: block; line-height: 0; }
.comment__bubble {
  background: rgba(var(--veil), 0.045);
  border: 1px solid var(--line-soft);
  border-radius: 4px 12px 12px 12px;
  padding: 7px 11px;
  max-width: 100%;
  min-width: 0;
}
.comment__who { display: flex; align-items: baseline; gap: 8px; font-size: 12px; }
.comment__who time { font-size: 10.5px; color: var(--dim); }
.comment__body { font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; }
.comment__del { opacity: 0; transition: opacity 0.15s; }
.comment:hover .comment__del, .comment:focus-within .comment__del { opacity: 1; }

/* ── maps ───────────────────────────────────────────────────────── */
.mapbox { display: flex; flex-direction: column; gap: 10px; }
.mapbox__search { display: flex; flex-direction: column; gap: 8px; }
.mapbox__input {
  display: flex; align-items: center; gap: 8px;
  height: 42px;
  padding: 0 6px 0 16px;
  border-radius: 999px; border: 1px solid var(--line);
  background: rgba(var(--panel-scrim), 0.75);
  color: var(--dim);
}
.mapbox__input:focus-within { border-color: rgba(var(--neon-rgb), 0.5); box-shadow: 0 0 0 3px rgba(var(--neon-rgb), 0.09); }
.mapbox__input input { flex: 1; min-width: 0; height: 100%; border: 0; background: none; box-shadow: none; padding: 0; font-size: 13.5px; color: var(--text); }
.mapbox__input input:focus { box-shadow: none; }
.mapbox__results {
  display: flex; flex-direction: column;
  border: 1px solid var(--line); border-radius: 10px;
  overflow: hidden; background: var(--overlay);
  max-height: 220px; overflow-y: auto;
}
.mapbox__results li button {
  display: flex; flex-direction: column; gap: 2px;
  width: 100%; text-align: left;
  padding: 9px 12px;
  border-bottom: 1px solid var(--line-soft);
  font-size: 12.5px;
  color: var(--text-dim);
}
.mapbox__results li:last-child button { border-bottom: 0; }
.mapbox__results li button:hover { background: rgba(var(--neon-rgb), 0.08); color: var(--text); }
.mapbox__results strong { font-size: 12.5px; color: var(--text); }
.mapbox__results span { font-size: 11px; color: var(--dim); }
.mapbox__status { font-size: 11.5px; min-height: 16px; }
.mapbox__status.is-ok { color: var(--neon-3); }
.mapbox__status.is-bad { color: var(--danger-soft); }
.mapbox__map {
  height: 300px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--inset);
  z-index: 0;
}
.mapbox__actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.mapbox__chosen { font-size: 11.5px; color: var(--neon); font-family: var(--font-mono); }
.mapcard { overflow: hidden; }
.mapcard__map { height: 320px; background: var(--inset); }
.mapcard__foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px; flex-wrap: wrap; }
.mapcard__foot span { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text-dim); }

/* MapLibre dark treatment - the basemap style is already dark, so this
   only has to match the controls to the app. */
.maplibregl-map { background: var(--inset); font-family: var(--font-body); }
.maplibregl-ctrl-attrib {
  background: rgba(var(--panel-scrim), 0.8) !important;
  border-radius: 6px;
  font-size: 9px !important;
}
.maplibregl-ctrl-attrib a { color: var(--muted) !important; }
.maplibregl-ctrl-attrib-inner { color: var(--dim) !important; }
.maplibregl-ctrl-group {
  background: var(--panel) !important;
  border: 1px solid var(--line) !important;
  border-radius: 8px !important;
  box-shadow: var(--shadow-sm) !important;
}
.maplibregl-ctrl-group button { filter: invert(1) grayscale(1) brightness(1.4); }
.maplibregl-ctrl-group button:hover { background: var(--panel-3) !important; }
.maplibregl-ctrl-group button + button { border-top: 1px solid var(--line) !important; }
/* The location label that sits above a pin. MapLibre v4 has no
   "content-wrapper" element - the tip and the content are direct children
   of .maplibregl-popup - and the vendor stylesheet paints the content
   white, which left the place name invisible on the dark map. */
.maplibregl-popup {
  filter: drop-shadow(0 10px 26px rgba(0, 0, 0, 0.65));
}
.maplibregl-popup-content {
  background: var(--panel) !important;
  color: var(--text) !important;
  border: 1px solid var(--line-strong) !important;
  border-radius: var(--radius-sm) !important;
  padding: 8px 12px !important;
  margin: 0 !important;
  font-family: var(--font-body) !important;
  font-size: 12.5px !important;
  font-weight: 600 !important;
  line-height: 1.35 !important;
  letter-spacing: 0.01em;
  max-width: 250px !important;
  white-space: normal !important;
  overflow-wrap: anywhere;
  text-align: left !important;
}
.maplibregl-popup-content a { color: var(--neon) !important; }
/* The tip is a CSS triangle made of borders - one coloured side shows. */
.maplibregl-popup-anchor-bottom .maplibregl-popup-tip { border-top-color: var(--panel) !important; }
.maplibregl-popup-anchor-top .maplibregl-popup-tip { border-bottom-color: var(--panel) !important; }
.maplibregl-popup-anchor-left .maplibregl-popup-tip { border-right-color: var(--panel) !important; }
.maplibregl-popup-anchor-right .maplibregl-popup-tip { border-left-color: var(--panel) !important; }
.maplibregl-popup-close-button { color: var(--muted) !important; }
.maplibregl-canvas { outline: none; }

/* The author's avatar, used as the marker itself. The street name
   already lives in the card header and footer, so the pin shows who is
   there. */
.mappin-wrap {
  position: relative;
  display: block;
  width: 44px;
  padding-bottom: 9px;
}
.mappin-avatar {
  position: relative;
  display: block;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--panel-3);
  border: 2px solid var(--neon);
  box-shadow:
    0 8px 20px -6px rgba(0, 0, 0, 0.85),
    0 0 18px -6px rgba(var(--neon-rgb), 0.55);
}
.mappin-avatar img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}
/* The little tail that points down at the spot. */
.mappin-avatar::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: -9px;
  transform: translateX(-50%);
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 9px solid var(--neon);
  filter: drop-shadow(0 3px 2px rgba(0, 0, 0, 0.5));
}
/* No uploaded picture - the same generated initials badge used
   everywhere else in the app. */
.mappin-avatar--gen {
  display: grid;
  place-items: center;
  font-family: var(--font-head);
  font-size: 15px;
  font-weight: 700;
  color: hsl(var(--h, 190) 90% 78%);
  background:
    radial-gradient(circle at 30% 20%, hsl(var(--h, 190) 80% 26%), transparent 70%),
    linear-gradient(140deg, hsl(var(--h, 190) 55% 15%), var(--panel));
  border-color: hsl(var(--h, 190) 70% 55%);
}

/* ── person / group / meetup cards ───────────────────────────────── */
.person { padding: 14px; display: flex; flex-direction: column; gap: 12px; }
/* The earned provider badge on the settings page. */
.provider-earned { margin: 0 0 4px; display: flex; align-items: center; gap: 8px; }

.person__id { display: flex; gap: 12px; align-items: flex-start; min-width: 0; }

/* Online marker next to the avatar. */
.person__avatar { position: relative; display: inline-block; flex: 0 0 auto; }

.person__text { display: flex; flex-direction: column; gap: 2px; min-width: 0; line-height: 1.3; }
.person__text strong { font-family: var(--font-head); font-size: 15px; letter-spacing: 0.03em; text-transform: uppercase; }
.person__text > .muted { font-size: 11.5px; }
.person__car, .person__city { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; color: var(--text-dim); }
.person__car svg, .person__city svg { color: var(--neon); }
.person__foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 10px; border-top: 1px solid var(--line-soft); flex-wrap: wrap; }
.person__foot .muted { font-size: 11px; }
.person__actions { display: flex; align-items: center; gap: 6px; margin-left: auto; flex-wrap: wrap; min-width: 0; }
.person__actions form { margin: 0; }

.crew { overflow: hidden; display: flex; flex-direction: column; }
.group__cover { display: block; height: 96px; position: relative; overflow: hidden; background: var(--bg-2); }
.group__cover img { width: 100%; height: 100%; object-fit: cover; }
.group__cover-gen {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  color: hsl(var(--h, 190) 90% 75%);
  background:
    repeating-linear-gradient(120deg, transparent 0 16px, rgba(var(--veil), 0.04) 16px 17px),
    radial-gradient(circle at 30% 10%, hsl(var(--h, 190) 80% 28% / 0.9), transparent 68%),
    linear-gradient(140deg, var(--inset), var(--inset-2));
}
.group__body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.group__head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.group__name { font-family: var(--font-head); font-size: 16px; letter-spacing: 0.03em; text-transform: uppercase; }
.group__name:hover { color: var(--neon); }
.group__desc { font-size: 12.5px; color: var(--muted); line-height: 1.45; }
.group__meta { display: flex; gap: 14px; font-size: 11.5px; }
.group__meta span { display: inline-flex; align-items: center; gap: 5px; }
.group__foot { margin-top: auto; padding-top: 10px; display: flex; }
.group__foot form { margin: 0; }

.meetup { display: flex; gap: 14px; padding: 14px; }
.meetup--past { opacity: 0.62; }
.meetup__when {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  width: 64px; flex: 0 0 64px; padding: 8px 0;
  border-radius: 10px;
  border: 1px solid rgba(var(--neon-rgb), 0.25);
  background: linear-gradient(160deg, rgba(var(--neon-rgb), 0.12), rgba(var(--neon-rgb), 0.02));
  line-height: 1;
}
.meetup__day { font-family: var(--font-head); font-size: 26px; color: var(--text); }
.meetup__month { font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 0.14em; color: var(--neon); margin-top: 3px; }
.meetup__time { font-family: var(--font-mono); font-size: 9.5px; color: var(--muted); margin-top: 6px; }
.meetup__body { display: flex; flex-direction: column; gap: 5px; min-width: 0; flex: 1; }
.meetup__head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.meetup__title { font-family: var(--font-head); font-size: 16px; letter-spacing: 0.03em; text-transform: uppercase; }
.meetup__title:hover { color: var(--neon); }
.meetup__meta { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 11.5px; }
.meetup__meta span { display: inline-flex; align-items: center; gap: 4px; }
.meetup__desc { font-size: 12.5px; color: var(--muted); line-height: 1.45; }
.meetup__foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 6px; flex-wrap: wrap; }
.meetup__host { display: inline-flex; align-items: center; gap: 7px; font-size: 11.5px; }

/* ── meetup page ────────────────────────────────────────────────── */
.meetuphero { padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.meetuphero__top { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.meetuphero__title { font-size: clamp(1.7rem, 4vw, 2.6rem); letter-spacing: 0.01em; }
.meetuphero__facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.fact {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 11px 13px; border-radius: 11px;
  border: 1px solid var(--line-soft);
  background: rgba(var(--veil), 0.025);
}
.fact__icon {
  display: grid; place-items: center;
  width: 34px; height: 34px; flex: 0 0 34px;
  border-radius: 9px;
  border: 1px solid rgba(var(--neon-rgb), 0.22);
  background: rgba(var(--neon-rgb), 0.07);
  color: var(--neon);
}
.fact div { display: flex; flex-direction: column; min-width: 0; line-height: 1.35; }
.fact strong { font-size: 13px; font-weight: 600; }
.fact span { font-size: 11.5px; }
.meetuphero__desc { color: var(--text-dim); font-size: 14px; line-height: 1.6; white-space: pre-line; }
.meetuphero__actions { display: flex; flex-wrap: wrap; gap: 9px; align-items: center; }
.meetuphero__actions form { margin: 0; }
.meetuphero__host {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
  padding-top: 12px; border-top: 1px solid var(--line-soft);
}
.meetuphero__host a { display: inline-flex; align-items: center; gap: 9px; font-size: 12.5px; }
.meetuphero__group {
  display: inline-flex; align-items: center; gap: 6px;
  margin-right: auto;
  padding: 3px 10px;
  border-radius: 99px;
  border: 1px solid rgba(var(--neon-rgb), 0.3);
  background: rgba(var(--neon-rgb), 0.07);
  color: var(--neon);
  font-size: 11.5px;
  letter-spacing: 0.02em;
}
.meetuphero__group:hover { background: rgba(var(--neon-rgb), 0.14); color: var(--text); }

/* ── groups ─────────────────────────────────────────────────────── */
.grouphead { overflow: hidden; }
.grouphead__cover { height: 118px; position: relative; overflow: hidden; background: var(--bg-2); }
.grouphead__cover img { width: 100%; height: 100%; object-fit: cover; }
.grouphead__gen {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  color: hsl(var(--h, 190) 90% 75%);
  background:
    repeating-linear-gradient(120deg, transparent 0 18px, rgba(var(--veil), 0.045) 18px 19px),
    radial-gradient(circle at 25% 0%, hsl(var(--h, 190) 80% 30% / 0.9), transparent 65%),
    linear-gradient(140deg, var(--inset), var(--inset-2));
}
.grouphead__body { padding: 16px; display: flex; flex-direction: column; gap: 8px; }
.grouphead__name { font-size: clamp(1.5rem, 4vw, 2.1rem); }
.grouphead__meta { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 12px; }
.grouphead__desc { color: var(--text-dim); font-size: 13.5px; line-height: 1.55; }
.grouphead__actions { display: flex; gap: 9px; flex-wrap: wrap; align-items: center; margin-top: 4px; }
.grouphead__actions form { margin: 0; }

.locked { padding: 40px 24px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.locked__mark {
  display: grid; place-items: center;
  width: 74px; height: 74px; border-radius: 50%;
  border: 1px solid rgba(var(--neon-2-rgb), 0.35);
  background: rgba(var(--neon-2-rgb), 0.08);
  color: var(--neon-2);
  box-shadow: var(--glow-pink);
  margin-bottom: 4px;
}
.locked .lede { margin: 0 auto; }

.drawer { padding: 16px; }
.drawer__summary {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--font-head); font-size: 14px;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--text-dim);
  list-style: none;
}
.drawer__summary::-webkit-details-marker { display: none; }
.drawer[open] .drawer__summary { margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid var(--line-soft); }
.drawer .mini__title { margin-top: 18px; }

/* ── fines (protocols.ge results) ───────────────────────────────── */
.fines-card__head {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.fines-card__title {
  font-family: var(--font-head);
  font-size: 16px;
  margin: 0;
}
.fines-card__sep {
  color: var(--dim);
  opacity: 0.55;
  user-select: none;
}
.fines-card__plate,
.fines-card__passport {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.fines-card__check { margin: 0; display: inline-flex; }
.fines-card__status { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; }
@media (max-width: 560px) {
  /* The header wraps on phones; gaps read better than dangling pipes. */
  .fines-card__sep { display: none; }
  .fines-card__head { gap: 8px 12px; }
}

.fines { display: flex; flex-direction: column; gap: 10px; }
.fine {
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  padding: 12px 14px;
  background: var(--panel-2, var(--inset));
}
.fine__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.fine__state {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--dim);
  border: 1px solid var(--line-soft);
  background: rgba(var(--veil), 0.05);
  border-radius: 999px;
  padding: 2px 9px;
}
.fine__state--due {
  color: var(--danger-soft);
  border-color: rgba(var(--danger-rgb), 0.4);
  background: rgba(var(--danger-rgb), 0.1);
}
.fine__amount { color: var(--danger-soft); font-weight: 700; }
.fine__amount--paid { color: var(--dim); font-weight: 600; }
.fine__actions { display: flex; justify-content: flex-start; margin-top: 10px; }
.fine__actions .btn { white-space: nowrap; }

/* Bank chooser opened from a payable fine. */
.pay-dialog__body { gap: 12px; }
.pay-dialog__summary { display: flex; flex-direction: column; gap: 2px; }
.pay-dialog__amount {
  font-family: var(--font-head);
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.01em;
}
.pay-dialog__hint { display: flex; align-items: flex-start; gap: 7px; margin: 0; line-height: 1.5; }
.pay-dialog__hint .icon { flex: none; margin-top: 2px; color: var(--accent-a); }
.pay-dialog__banks { display: grid; grid-template-columns: 1fr; gap: 8px; }
.pay-bank {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(var(--veil), 0.03);
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.pay-bank:hover:not(:disabled) { border-color: var(--accent-a); background: rgba(var(--veil), 0.07); }
.pay-bank:disabled { opacity: 0.55; cursor: progress; }
.pay-bank__mark {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 30px;
  border-radius: 7px;
  font-family: var(--font-head);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.02em;
}
.pay-bank__mark--tbc { background: #0a5bd8; color: #fff; }
.pay-bank__mark--bog { background: #f36c21; color: #fff; }
.pay-bank__mark--liberty { background: #14346b; color: #fff; }
.pay-bank__name { font-size: 12px; font-weight: 700; line-height: 1.35; }
.pay-dialog__status { min-height: 16px; margin: 10px 0 0; font-size: 12px; color: var(--dim); }
.pay-dialog__status:empty { min-height: 0; margin: 0; }
.pay-dialog__status--error { color: var(--danger-soft); }
@media (max-width: 520px) {
  .fine__actions .btn { width: 100%; justify-content: center; }
}

/* ── My Ride: vehicle identity + two-pane layout ────────────────── */
.garage-vehicle {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 20px;
  padding: 16px;
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  background: rgba(var(--veil), 0.02);
}
.garage-id { display: flex; align-items: center; gap: 14px; min-width: 0; }
.garage-id__photo {
  position: relative;
  flex: none;
  display: block;
  width: 84px;
  height: 64px;
  border-radius: 10px;
  overflow: hidden;
  background: rgba(var(--veil), 0.05);
}
.garage-id__photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.garage-id__photo-edit {
  position: absolute;
  right: 4px;
  bottom: 4px;
  width: 24px;
  height: 24px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  cursor: pointer;
  z-index: 2;
  transition: background 0.15s, color 0.15s, opacity 0.15s;
}
.garage-id__photo-edit:hover,
.garage-id__photo-edit:focus-visible {
  background: var(--accent-a);
  color: var(--on-accent);
  border-color: transparent;
}
.garage-id__photo-edit:disabled { opacity: 0.6; cursor: progress; }
.garage-id__gen {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: hsl(var(--h, 200) 70% 62%);
}
.garage-id__body { min-width: 0; }
.garage-id__name { font-family: var(--font-head); font-size: 19px; margin: 0; }
.garage-id__sub { margin: 2px 0 0; font-size: 12px; }
.garage-id__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 6px; }
.spec--link { color: var(--accent-a); text-decoration: none; }

/* Annual technical inspection (pti.ge) badge, shared by My Ride and Builds. */
.pti-badge {
  --pti-color: var(--dim);
  --pti-bg: rgba(var(--veil), 0.04);
  --pti-line: var(--line-soft);
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  max-width: 100%;
  padding: 3px 8px;
  border: 1px solid var(--pti-line);
  border-radius: 999px;
  background: var(--pti-bg);
  color: var(--pti-color);
  font-size: 11px;
  line-height: 1.35;
  white-space: nowrap;
}
.pti-badge .icon { flex: 0 0 auto; }
.pti-badge__label {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.pti-badge__sep { color: var(--dim); font-size: 10px; }
.pti-badge__date { font-weight: 650; }
.pti-badge--valid {
  --pti-color: #6ee87a;
  --pti-bg: rgba(var(--ok-rgb), 0.12);
  --pti-line: rgba(var(--ok-rgb), 0.45);
}
.pti-badge--expired {
  --pti-color: #ff5f6d;
  --pti-bg: rgba(var(--danger-rgb), 0.14);
  --pti-line: rgba(var(--danger-rgb), 0.5);
}
.pti-badge--unknown {
  --pti-color: var(--dim);
  --pti-bg: rgba(var(--veil), 0.04);
}
.pti-badge__external {
  display: inline-flex;
  align-items: center;
  margin-left: 1px;
  color: inherit;
  opacity: 0.7;
}
.pti-badge__external:hover { opacity: 1; }
.pti-badge--compact {
  padding: 2px 7px;
  gap: 4px;
  font-size: 10.5px;
}
.pti-badge--compact .pti-badge__date { font-weight: 700; }
.pagehead__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 8px; }
.spec--link:hover { text-decoration: underline; }

/* Drag handle (header) for carousel swipe */
.garage-vehicle__drag-handle {
  cursor: grab;
  padding: 12px 12px 8px;
  margin: -16px -16px 8px;
  border-radius: 14px 14px 0 0;
  background: linear-gradient(180deg, rgba(var(--veil), 0.08), rgba(var(--veil), 0.02));
  border-bottom: 1px solid var(--line-soft);
  touch-action: pan-x; /* Allow horizontal pan for carousel */
}
.garage-vehicle__drag-handle:active { cursor: grabbing; }
.garage-vehicle__drag-handle:hover { background: linear-gradient(180deg, rgba(var(--veil), 0.12), rgba(var(--veil), 0.04)); }

.garage-vehicle__content {
  padding-top: 4px;
}

/* Drag handle (header) for carousel swipe - responsive */
@media (max-width: 640px) {
  .garage-vehicle__drag-handle {
    padding: 10px 10px 6px;
    margin: -12px -12px 6px;
  }
}
@media (max-width: 480px) {
  .garage-vehicle__drag-handle {
    padding: 8px 8px 4px;
    margin: -10px -10px 4px;
  }
}

.garage-vehicle__grid {
  display: grid;
  grid-template-columns: minmax(420px, 1.5fr) minmax(220px, 0.5fr);
  gap: 16px;
  align-items: start;
}
.garage-pane {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: rgba(var(--veil), 0.02);
}
.garage-pane__title {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 10px;
  font-family: var(--font-head);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--dim);
}
/* The build editor has two tabs: the car and its story. */
/* The list of drivers: the whole network, one row each. */
.driverlist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.driverlist__row {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  transition: background 0.15s;
}
.driverlist__row:hover { background: rgba(var(--veil), 0.04); }
.driverlist__name { display: flex; flex-direction: row; align-items: baseline; gap: 4px; min-width: 0; flex: 1 1 auto; }
.driverlist__name strong { font-size: 13.5px; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: calc(100% - 40px); }
.driverlist__name .muted.small { flex-shrink: 0; }
@media (max-width: 620px) {
  .driverlist__meta { display: none; }
}

.edittabs {
  display: flex; gap: 4px;
  margin-bottom: 14px; padding: 4px;
  border: 1px solid var(--line); border-radius: 999px;
  background: rgba(var(--veil), 0.03);
  width: fit-content; max-width: 100%;
}
.edittabs__tab {
  display: inline-flex; align-items: center; gap: 7px;
  height: 32px; padding: 0 14px;
  border: 0; border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-family: var(--font-head); font-size: 11.5px; letter-spacing: 0.06em; text-transform: uppercase;
  cursor: pointer; transition: color 0.15s, background 0.15s;
}
.edittabs__tab:hover { color: var(--text); }
.edittabs__tab.is-on { color: var(--neon); background: rgba(var(--neon-rgb), 0.12); }
.edittabs__tab .pip { font-size: 9px; }
[data-edit-panel][hidden] { display: none; }

/* The build timeline: the history behind a build. */
.build-timeline .section-title { align-items: center; }
.timeline { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.timeline__row {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 10px 0;
  border-top: 1px solid var(--line-soft);
}
.timeline__row:first-child { border-top: 0; padding-top: 4px; }
.timeline__photo {
  flex: 0 0 auto; width: 120px; height: 86px;
  border-radius: 10px; overflow: hidden;
  border: 1px solid var(--line-soft); background: var(--inset);
}
.timeline__photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.timeline__body { min-width: 0; flex: 1 1 auto; display: flex; flex-direction: column; gap: 3px; }
.timeline__head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.timeline__head strong { font-size: 14px; color: var(--text); }
.timeline__meta { font-size: 11.5px; }
.timeline__text { margin: 2px 0 0; font-size: 13px; color: var(--text-dim); }
.timeline__tools { display: flex; align-items: center; gap: 6px; margin-top: 6px; }
.timeline--manage .timeline__row { align-items: flex-start; }
.timeline-form { margin-top: 16px; }
.timeline-form .card__title { display: flex; align-items: center; gap: 8px; }
.timeline-form__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-top: 14px; }
.timeline-form__wide { grid-column: 1 / -1; }
/* The button sits clear of the last field - its glow was reaching
   up over the box above it. */
.timeline-form .btnrow { margin-top: 10px; }

.garage-pane--maint { position: sticky; top: 84px; }

/* Build link picker inside the add form */
.build-link { display: flex; flex-direction: column; gap: 8px; }
.build-link select { width: 100%; }
.build-link__sync {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--dim);
  cursor: pointer;
}
.build-link__sync input { width: auto; }

/* Certificate pane responsive — no horizontal scroll */
@media (max-width: 900px) {
  .garage-vehicle__grid {
    grid-template-columns: minmax(0, 1fr);
    overflow-x: visible;
  }
  .garage-pane--maint { position: static; }
}
@media (max-width: 600px) {
  .garage-vehicle__grid { gap: 12px; }
  .garage-pane { padding: 10px; }
  .garage-id { align-items: flex-start; }
  .garage-id__photo { width: 64px; height: 52px; }
  .garage-vehicle { padding: 12px; }
}
@media (max-width: 480px) {
  .garage-id__photo { width: 56px; height: 48px; }
  .garage-vehicle { padding: 10px; }
  .garage-pane { padding: 8px; }
}

/* ── registration certificate card (landscape, responsive) ─────── */
.cert-block { margin: 0 0 20px; }
.cert-tabs { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; flex-wrap: wrap; }
.cert-tab {
  font: inherit;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 5px 13px;
  border-radius: 999px;
  border: 1px solid var(--line-soft);
  background: transparent;
  color: var(--dim);
  cursor: pointer;
  transition: color 0.15s, background 0.15s, border-color 0.15s;
}
.cert-tab:hover { color: var(--text); border-color: var(--line); }
.cert-tab.is-active { color: var(--text); background: rgba(var(--veil), 0.1); border-color: var(--line); }
.cert-tabs__label { margin-left: auto; font-size: 11px; color: var(--dim); }

.regcert {
  --cert-navy: #1e3a78;
  --cert-ink: #17315e;
  --cert-line: rgba(30, 58, 120, 0.16);
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 20px 22px 16px;
  border-radius: 14px;
  color: var(--cert-ink);
  background:
    radial-gradient(90% 120% at 8% -20%, rgba(255, 255, 255, 0.98), transparent 55%),
    radial-gradient(80% 110% at 100% 0%, rgba(205, 238, 255, 0.95), transparent 62%),
    linear-gradient(150deg, #eef8fd 0%, #dcecf7 48%, #e3f6e9 100%);
  border: 1px solid rgba(30, 58, 120, 0.28);
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.3);
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  transition: transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.cert-tab:hover { color: var(--text); border-color: var(--line); }
.cert-tab.is-active { color: var(--text); background: rgba(var(--veil), 0.1); border-color: var(--line); }
/* Scan controls are labels so iOS can open the camera as a native gesture. */
label.cert-tab,
label.cert-scan-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}
.cert-tabs__label { margin-left: auto; font-size: 11px; color: var(--dim); }
.cert-tab--edit {
  margin-left: auto;
  padding: 5px 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: var(--dim);
}
.cert-tab--edit:hover { color: var(--accent-a); background: rgba(var(--accent-a-rgb), 0.1); }
.cert-edit-icon, .cert-edit-check { display: inline-flex; align-items: center; }
.cert-edit-check, .cert-edit-spinner { display: none; }
.cert-edit-spinner {
  width: 13px;
  height: 13px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}
.cert-block[data-edit-mode="true"] .cert-tab--edit {
  color: var(--accent-a);
  background: rgba(var(--accent-a-rgb), 0.12);
}
.cert-block[data-edit-mode="true"] .cert-edit-icon { display: none; }
.cert-block[data-edit-mode="true"] .cert-edit-check { display: inline-flex; }
.cert-tab--edit.is-saving .cert-edit-check { display: none; }
.cert-tab--edit.is-saving .cert-edit-spinner { display: inline-block; }

/* Inline edit mode */
.cert-block[data-edit-mode="true"] .regcert__value { display: none; }
.cert-block[data-edit-mode="true"] .regcert__edit-input { display: inline-block; width: 100%; min-width: 120px; padding: 2px 6px; font: inherit; font-size: 13px; font-weight: 600; color: var(--cert-ink); background: rgba(255,255,255,0.9); border: 1px solid var(--cert-line); border-radius: 4px; box-sizing: border-box; }
.cert-block[data-edit-mode="true"] .regcert__edit-input:focus { outline: none; border-color: var(--cert-navy); box-shadow: 0 0 0 2px rgba(30,58,120,0.2); }
.cert-block[data-edit-mode="true"] .cert-tabs { margin-bottom: 4px; }
.cert-block[data-edit-mode="true"] .cert-tab:not(.cert-tab--edit) { opacity: 0.6; pointer-events: none; }

/* Ensure the value wrapper fills available space in the grid cell */
.regcert__value-wrap { display: inline-block; width: 100%; min-width: 120px; }

@media (max-width: 640px) {
  .cert-block[data-edit-mode="true"] .regcert__edit-input { min-width: 100px; font-size: 12px; }
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ── Modal ───────────────────────────────────────────────────────── */
.modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(12px, 2vw);
  padding-top: calc(var(--topbar) + max(12px, 2vw));
}
.modal[hidden] { display: none; }
.modal__overlay {
  position: absolute;
  inset: 0;
  background: var(--scrim);
  animation: fadeIn 0.15s ease;
}
.modal__panel {
  position: relative;
  width: 100%;
  max-width: 640px;
  max-height: calc(100vh - var(--topbar) - max(24px, 4vh));
  overflow-y: auto;
  background: var(--overlay);
  color: var(--text);
  border: 1px solid var(--line-soft);
  border-radius: 16px;
  box-shadow: var(--shadow);
  animation: slideUp 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
@media (max-width: 640px) {
  .modal {
    align-items: flex-start;
    padding-top: calc(var(--topbar) + max(8px, 1.5vh));
    padding-left: max(8px, 2vw);
    padding-right: max(8px, 2vw);
    padding-bottom: max(16px, 3vh);
  }
  .modal__panel {
    max-height: calc(100vh - var(--topbar) - max(24px, 4vh));
    border-radius: 12px;
  }
}
@media (max-width: 480px) {
  .modal {
    padding-top: calc(var(--topbar) + max(4px, 1vh));
    padding-left: max(6px, 1.5vw);
    padding-right: max(6px, 1.5vw);
    padding-bottom: max(12px, 2vh);
  }
  .modal__panel {
    border-radius: 8px;
  }
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }

.modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line-soft);
}
.modal__header h2 {
  margin: 0;
  font-family: var(--font-head);
  font-size: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.modal__close {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: transparent;
  color: var(--dim);
}
.modal__close:hover { background: rgba(var(--veil), 0.1); color: var(--text); }
.modal__body { padding: 20px; }
.modal__footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 16px 20px;
  border-top: 1px solid var(--line-soft);
}

/* Add-vehicle form: fixed header + footer, only the fields scroll. */
.modal__panel--form {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 780px;
  max-height: calc(100vh - var(--topbar) - max(24px, 4vh));
  max-height: calc(100dvh - var(--topbar) - max(24px, 4vh));
  overflow: hidden;
}
.modal__panel--form .modal__header { flex: 0 0 auto; }
.modal__panel--form .modal__form {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  margin-top: 0;
  gap: 0;
}
.modal__scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 18px 20px 8px;
}
.modal__panel--form .modal__footer {
  flex: 0 0 auto;
  margin: 0;
  background: var(--overlay);
  padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
}

/* ── My Ride horizontal carousel ───────────────────────────────── */
.garage-carousel {
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding: 8px 4px 16px;
  margin: 0 -16px 16px;
  scrollbar-width: thin;
}
.garage-carousel:focus { outline: none; }
.garage-carousel__track {
  display: flex;
  flex-wrap: nowrap;
  gap: 16px;
  padding: 4px 16px;
}
.garage-vehicle {
  flex: 0 0 720px; /* fixed width per card */
  scroll-snap-align: start;
  position: relative;
}

/* Delete button in top corner */
.garage-vehicle__delete {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 10;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.15s, transform 0.15s;
}
.garage-vehicle:hover .garage-vehicle__delete,
.garage-vehicle:focus-within .garage-vehicle__delete {
  opacity: 1;
  transform: translateY(0);
}
.garage-vehicle__delete .btn {
  padding: 6px;
  background: rgba(0,0,0,0.3);
  color: var(--text);
  border-color: transparent;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.garage-vehicle__delete .btn:hover {
  background: var(--danger);
  color: #fff;
  border-color: var(--danger);
}

/* Odometer icon */
.odometer-icon {
  display: inline-block;
  vertical-align: middle;
  margin-right: 4px;
  image-rendering: crisp-edges;
}

/* Click-to-edit odometer reading in My Ride */
.odometer {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 12px;
}
.odometer__display {
  display: inline-flex;
  align-items: baseline;
  gap: 3px;
  padding: 0;
  border: 0;
  border-bottom: 1px dashed transparent;
  background: none;
  color: inherit;
  font: inherit;
  cursor: text;
}
.odometer__display:hover,
.odometer__display:focus-visible { border-bottom-color: currentColor; }
.odometer__input {
  width: 96px;
  padding: 2px 6px;
  font-size: 12px;
  line-height: 1.3;
}

/* Linked build badge - green check */
.linked-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #16a34a;
  color: #fff;
  margin-right: 4px;
  flex-shrink: 0;
}
.linked-badge svg { width: 12px; height: 12px; }
.spec--link { display: inline-flex; align-items: center; text-decoration: none; color: var(--accent-a); }
.spec--link:hover { text-decoration: underline; }

/* Carousel scrollbar */
.garage-carousel::-webkit-scrollbar { height: 6px; }
.garage-carousel::-webkit-scrollbar-track { background: transparent; }
.garage-carousel::-webkit-scrollbar-thumb {
  background: var(--line);
  border-radius: 3px;
}
.garage-carousel::-webkit-scrollbar-thumb:hover { background: var(--dim); }

@media (max-width: 640px) {
  .garage-vehicle { flex: 0 0 100%; min-width: 280px; }
  .garage-carousel { margin: 0 -12px 12px; padding: 4px 4px 12px; }
  .garage-carousel__track { padding: 4px 12px; gap: 12px; }
  .garage-vehicle__delete { opacity: 1; transform: none; }
}

.regcert {
  --cert-navy: #1e3a78;
  --cert-ink: #17315e;
  --cert-line: rgba(30, 58, 120, 0.16);
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 20px 22px 16px;
  border-radius: 14px;
  color: var(--cert-ink);
  background:
    radial-gradient(90% 120% at 8% -20%, rgba(255, 255, 255, 0.98), transparent 55%),
    radial-gradient(80% 110% at 100% 0%, rgba(205, 238, 255, 0.95), transparent 62%),
    linear-gradient(150deg, #eef8fd 0%, #dcecf7 48%, #e3f6e9 100%);
  border: 1px solid rgba(30, 58, 120, 0.28);
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.3);
}
.regcert::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    repeating-linear-gradient(112deg, rgba(30, 58, 120, 0.05) 0 1px, transparent 1px 10px),
    repeating-linear-gradient(-112deg, rgba(30, 58, 120, 0.035) 0 1px, transparent 1px 13px);
}
.regcert::after {
  content: '';
  position: absolute;
  z-index: -1;
  width: 340px;
  height: 240px;
  right: -70px;
  top: -80px;
  transform: rotate(-8deg);
  background:
    linear-gradient(transparent 44%, rgba(198, 28, 38, 0.1) 44% 56%, transparent 56%),
    linear-gradient(90deg, transparent 44%, rgba(198, 28, 38, 0.1) 44% 56%, transparent 56%);
}
.regcert__head { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; }
.regcert__ge {
  flex: none;
  font-family: var(--font-head);
  font-size: clamp(24px, 6vw, 34px);
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.04em;
  color: transparent;
  -webkit-text-stroke: 1.5px var(--cert-navy);
}
.regcert__title { margin-left: auto; display: flex; flex-direction: column; align-items: flex-end; text-align: right; line-height: 1.18; }
.regcert__title-ka { font-size: clamp(13px, 3.4vw, 16px); font-weight: 800; color: var(--cert-navy); }
.regcert__title-en { font-size: clamp(10px, 2.6vw, 12px); font-weight: 800; letter-spacing: 0.05em; color: var(--cert-navy); }
.regcert__country { margin-top: 2px; font-size: 10px; letter-spacing: 0.2em; color: rgba(23, 49, 94, 0.7); }
.regcert__rows { display: flex; flex-direction: column; }
.regcert__row {
  display: grid;
  grid-template-columns: 56px minmax(110px, 1fr) minmax(0, 1.5fr);
  gap: 10px;
  align-items: baseline;
  padding: 4px 0;
  border-bottom: 1px solid var(--cert-line);
}
.regcert__row:last-child { border-bottom: 0; }
.regcert__code { font-family: var(--font-mono); font-size: 12px; font-weight: 700; color: var(--cert-navy); }
.regcert__value { font-size: 13px; font-weight: 600; color: var(--cert-ink); word-break: break-word; }
.regcert__label { font-size: 10px; line-height: 1.3; text-align: right; color: rgba(23, 49, 94, 0.66); }
.regcert__foot {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px solid var(--cert-line);
}
.regcert__passport { font-family: var(--font-mono); font-size: 12px; font-weight: 700; letter-spacing: 0.1em; }
.regcert__issuer { font-size: 9.5px; line-height: 1.35; text-align: right; color: rgba(23, 49, 94, 0.7); }

/* Compact certificate used as the technical-passport badge in Fines. */
.regcert--badge {
  width: 100%;
  max-width: 430px;
  min-width: 0;
  margin-top: 12px;
  padding: 12px 14px 10px;
  border-radius: 10px;
  box-sizing: border-box;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.3);
}
.regcert--badge .regcert__head { gap: 8px; margin-bottom: 8px; }
.regcert--badge .regcert__ge { font-size: 24px; -webkit-text-stroke-width: 1.2px; }
.regcert--badge .regcert__title-ka { font-size: 12px; }
.regcert--badge .regcert__title-en { font-size: 9px; letter-spacing: 0.04em; }
.regcert--badge .regcert__country { font-size: 8px; letter-spacing: 0.12em; }
.regcert--badge .regcert__row {
  grid-template-columns: 42px minmax(70px, 1fr) minmax(0, 1.1fr);
  gap: 8px;
  padding: 3px 0;
}
.regcert--badge .regcert__code { font-size: 10px; }
.regcert--badge .regcert__value-wrap { display: block; width: 100%; min-width: 0; }
.regcert--badge .regcert__value {
  display: block;
  font-size: 10.5px;
  white-space: normal;
  overflow: visible;
  overflow-wrap: anywhere;
  text-overflow: clip;
}
.regcert--badge .regcert__value--wrap { white-space: normal; overflow: visible; }
.regcert--badge .regcert__label { font-size: 8px; }
.regcert--badge .regcert__foot {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: end;
  margin-top: 8px;
  padding-top: 7px;
  gap: 8px;
}
.cert-badge__passport { display: flex; flex-direction: column; }
.cert-badge__passport .regcert__passport { font-size: 13px; }
.cert-badge__passport-label { font-size: 7.5px; line-height: 1.2; color: rgba(23, 49, 94, 0.7); }
.cert-badge__issuer { font-size: 7.5px; }
.cert-badge__seal {
  flex: none;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #b99a4f;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fbf0ce, #d8bd7e 65%, #b99a4f);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.45);
  color: #8a6a2a;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.04em;
}
@media (max-width: 520px) {
  .regcert--badge .regcert__row { grid-template-columns: 38px minmax(60px, 1fr) minmax(0, 1fr); }
}

.cert-edit { margin-top: 8px; }
.cert-edit > summary {
  cursor: pointer;
  font-size: 12px;
  color: var(--dim);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 0;
  list-style: none;
}
.cert-edit > summary::-webkit-details-marker { display: none; }
.cert-edit > summary:hover { color: var(--text); }
.cert-form { margin-top: 12px; display: flex; flex-direction: column; gap: 12px; }
.cert-fields { padding: 12px 14px; border: 1px solid var(--line-soft); border-radius: 10px; background: rgba(var(--veil), 0.03); }
.cert-fields > summary { cursor: pointer; font-size: 13px; font-weight: 600; display: flex; align-items: center; gap: 6px; list-style: none; }
.cert-fields > summary::-webkit-details-marker { display: none; }
.cert-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; }
.cert-grid__title { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--dim); margin: 12px 0 8px; }
.cert-grid label { display: flex; flex-direction: column; gap: 3px; font-size: 11px; color: var(--dim); }
.cert-grid label b { color: var(--accent-a); font-weight: 700; }
.cert-grid input { width: 100%; padding: 7px 9px; font-size: 13px; }

/* Add-vehicle form: 3 columns on desktop, 2 on tablets, 1 on phones. */
.cert-form .cert-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  align-items: start;
}
.cert-form .cert-grid--scan {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
}
.cert-scan-btn {
  height: 38px;
  white-space: nowrap;
}
.cert-scan-hint {
  margin: 7px 0 0;
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--dim);
}
.cert-photo { margin-top: 18px; }
.cert-photo input[type="file"] {
  width: 100%;
  max-width: 100%;
  padding: 10px 12px;
  border: 1px dashed var(--line-soft);
  border-radius: 10px;
  background: rgba(var(--veil), 0.04);
  color: var(--dim);
  font-size: 12.5px;
  display: block;
  line-height: 30px;
  white-space: nowrap;
  overflow: hidden;
}
.cert-photo input[type="file"]::file-selector-button {
  margin-right: 10px;
  height: 30px;
  line-height: 28px;
  padding: 0 10px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: rgba(var(--veil), 0.08);
  color: var(--text);
  cursor: pointer;
}

@media (max-width: 900px) {
  .cert-form .cert-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cert-form .cert-grid--scan { grid-template-columns: minmax(0, 1fr) auto; }
}
@media (max-width: 560px) {
  .cert-form .cert-grid { grid-template-columns: 1fr; }
  .cert-form .cert-grid--scan { grid-template-columns: 1fr; }
  .cert-scan-btn { width: 100%; justify-content: center; }
}

@media (max-width: 640px) {
  .regcert { padding: 16px 14px 13px; }
  .regcert__row { grid-template-columns: 46px minmax(0, 1fr); gap: 4px 10px; padding: 5px 0; }
  .regcert__label { grid-column: 1 / -1; padding-left: 56px; text-align: left; }
  .regcert__foot { align-items: flex-start; }
  .regcert__issuer { text-align: left; }
  .cert-tabs__label { display: none; }

  /* Modal responsive. Do not reset the top padding here: the add-vehicle
     modal must start below the iOS status bar, not under it. */
  .modal {
    padding-top: calc(var(--ui-safe-top) + max(8px, 1.5vh));
    padding-left: max(8px, 2vw);
    padding-right: max(8px, 2vw);
    padding-bottom: calc(var(--ui-safe-bottom) + max(12px, 2vh));
  }
  .modal__panel { max-width: 100%; max-height: 100%; border-radius: 12px; }
  .modal__header { padding: 12px 16px; }
  .modal__header h2 { font-size: 16px; }
  .modal__body { padding: 16px; }
  .modal__footer { padding: 12px 16px; gap: 8px; }
  .cert-grid { grid-template-columns: 1fr; gap: 8px; }
  .cert-grid__title { margin: 8px 0 4px; }
  .cert-grid label { font-size: 12px; }
  .cert-grid input { padding: 10px 12px; font-size: 14px; }
}

@media (max-width: 640px) {
  /* Add-vehicle modal: fill the available viewport, keep the footer reachable.
     The modal container already subtracts the safe areas, so 100% is the
     correct ceiling for phones and installed iOS PWAs. */
  #add-vehicle-modal .modal__panel--form {
    max-height: 100%;
  }
  .modal__scroll { padding: 14px 14px 6px; }
  .modal__panel--form .modal__footer {
    padding: 12px 14px;
  }
  .modal__panel--form .modal__footer .btn { flex: 1 1 0; }
  /* 16px stops iOS Safari from zooming when a field is focused. */
  .modal__panel--form input:not([type="checkbox"]):not([type="file"]),
  .modal__panel--form select { font-size: 16px; }
  .modal__panel--form .cert-grid input { padding: 10px 12px; }
}

/* ── profile ────────────────────────────────────────────────────── */
.profile { display: flex; flex-direction: column; gap: 18px; }
.profile__header { overflow: hidden; }
.profile__body { display: flex; justify-content: center; gap: 16px; padding: 22px 20px 0; flex-wrap: wrap; }
.profile__id { display: flex; flex-direction: column; gap: 3px; padding-bottom: 4px; flex: 1; min-width: 200px; }
.profile__name { font-size: clamp(1.4rem, 3.4vw, 2rem); }
.profile__handle { font-family: var(--font-mono); font-size: 12px; }
.profile__chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.profile__actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding-bottom: 6px; }
.profile__actions form { margin: 0; }
.profile__bio { padding: 14px 20px 0; color: var(--text-dim); font-size: 14px; line-height: 1.55; white-space: pre-line; }
.profile__stats {
  display: flex; gap: 26px; flex-wrap: wrap;
  padding: 14px 20px 18px; margin-top: 14px;
  border-top: 1px solid var(--line-soft);
}
.profile__stats span { display: flex; flex-direction: column; line-height: 1.1; }
.profile__stats strong { font-family: var(--font-head); font-size: 20px; }
.profile__stats small { font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--dim); }
.profile__grid { display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: 20px; align-items: start; }
.profile__main { min-width: 0; }
.profile__side { display: flex; flex-direction: column; gap: 12px; position: sticky; top: calc(var(--topbar) + 20px); }

/* ── chat ───────────────────────────────────────────────────────── */
.chatlayout {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 16px;
  align-items: stretch;
  height: calc(100dvh - var(--topbar) - 140px);
  min-height: 520px;
}
.chatlayout--inbox { grid-template-columns: minmax(0, 1fr) 320px; height: auto; }
.inbox { overflow: hidden; display: flex; flex-direction: column; min-height: 0; }
.inbox__list { display: flex; flex-direction: column; overflow-y: auto; flex: 1; }
.inbox__item {
  display: flex; align-items: center; gap: 11px;
  padding: 13px 14px;
  border-bottom: 1px solid var(--line-soft);
  transition: background 0.15s;
}
.inbox__item:hover { background: rgba(var(--veil), 0.035); }
.inbox__item.is-active { background: rgba(var(--neon-rgb), 0.07); box-shadow: inset 3px 0 0 var(--neon); }
.inbox__item.is-unread { background: rgba(var(--neon-2-rgb), 0.04); }
.inbox__text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.inbox__top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.inbox__top strong { font-size: 13.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inbox__top time { font-size: 10px; font-family: var(--font-mono); flex: 0 0 auto; }
.inbox__preview { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inbox__item.is-unread .inbox__preview { color: var(--text-dim); }
.chatlayout__side { display: flex; flex-direction: column; gap: 12px; }
.chatlayout__list { display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.chatlayout__list-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--line-soft); }

.chatpanel {
  display: flex;
  flex-direction: column;
  min-height: 0;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(var(--panel-scrim), 0.92), rgba(var(--panel-scrim), 0.96));
  overflow: hidden;
}
.chatpanel__head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 14px; border-bottom: 1px solid var(--line);
  background: rgba(var(--veil), 0.02);
}
.chatpanel__who { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 0 1 auto; }
.chatpanel__who div { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.chatpanel__who strong { font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chatpanel__who span { font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chatpanel__actions { display: flex; align-items: center; gap: 6px; }
.chatpanel__feed {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  scroll-behavior: smooth;
}
.chatpanel__empty { margin: auto; text-align: center; font-size: 13px; max-width: 36ch; }
.chatpanel__meta { padding: 0 16px 6px; }
.chatpanel__form {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 12px;
  border-top: 1px solid var(--line);
  background: rgba(var(--veil), 0.02);
}
.chatpanel__form input[type="text"] { flex: 1; border-radius: 99px; padding: 10px 16px; font-size: 13.5px; }
.chatpanel__form .btn { border-radius: 50%; width: 42px; height: 42px; padding: 0; flex: 0 0 auto; }
.chatpanel__attach { padding: 0 16px 8px; }
.chatpanel__attach:empty { display: none; }

.msg { display: flex; gap: 8px; align-items: center; max-width: 78%; }
/* The avatar must never be squeezed by a long bubble - without this it
   was squashed into an oval next to the sender's name. The line-height
   is only zeroed on the image, or the generated initials would fall out
   of their circle. */
.msg__avatar { flex: 0 0 auto; display: block; }
.msg__avatar img { display: block; line-height: 0; }
.msg--mine { align-self: flex-end; flex-direction: row-reverse; }
.msg__stack { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.msg--mine .msg__stack { align-items: flex-end; }
.msg__bubble {
  padding: 9px 13px;
  border-radius: 14px 14px 14px 4px;
  border: 1px solid var(--line);
  background: rgba(var(--veil), 0.055);
  font-size: 13.5px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.msg--mine .msg__bubble {
  border-radius: 14px 14px 4px 14px;
  background: linear-gradient(135deg, rgba(var(--neon-rgb), 0.16), rgba(var(--neon-rgb), 0.08));
  border-color: rgba(var(--neon-rgb), 0.32);
  color: var(--accent-soft);
}
.msg__text { white-space: normal; }
.msg__bubble img, .msg__bubble video { border-radius: 9px; max-height: 320px; margin-top: 4px; }
.msg__time { font-size: 9.5px; font-family: var(--font-mono); color: var(--dim); padding: 0 3px; }
.msg__delete { margin-left: 4px; flex: 0 0 auto; align-self: center; }
.msg__delete-btn { width: 20px; height: 20px; padding: 0; display: grid; place-items: center; border-radius: 50%; background: rgba(var(--danger-rgb), 0.1); border: 1px solid rgba(var(--danger-rgb), 0.3); color: var(--danger-soft); cursor: pointer; }
.msg__delete-btn:hover { background: rgba(var(--danger-rgb), 0.2); }
.msg--search-hit { background: rgba(var(--neon-rgb), 0.2); border-radius: 8px; transition: background 0.3s; animation: searchHitPulse 1.5s ease; }
@keyframes searchHitPulse { 0% { background: rgba(var(--neon-rgb), 0.4); } 100% { background: rgba(var(--neon-rgb), 0.2); } }

/* ── chat mention autocomplete ───────────────────────────────────── */
.chatpanel__mention-panel { position: absolute; bottom: calc(100% + 4px); left: 0; right: 0; background: var(--overlay); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); max-height: 240px; overflow-y: auto; z-index: 50; padding: 4px; }
.chatpanel__mention-panel[hidden] { display: none !important; }
.chatpanel__mention-item { display: flex; align-items: center; gap: 8px; width: 100%; padding: 6px 8px; border-radius: 8px; background: transparent; border: none; color: var(--text); cursor: pointer; font-size: 13px; text-align: left; }
.chatpanel__mention-item:hover { background: rgba(var(--neon-rgb), 0.08); }
.chatpanel__mention-avatar { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; }
.chatpanel__mention-name { font-family: var(--font-mono); font-weight: 600; color: var(--neon); }
.chatpanel__mention-display { color: var(--dim); font-size: 12px; margin-left: 4px; }
.msg__delete { margin-left: 4px; flex: 0 0 auto; align-self: center; }
.msg__delete-btn { width: 20px; height: 20px; padding: 0; display: grid; place-items: center; border-radius: 50%; background: rgba(var(--danger-rgb), 0.1); border: 1px solid rgba(var(--danger-rgb), 0.3); color: var(--danger-soft); cursor: pointer; }
.msg__delete-btn:hover { background: rgba(var(--danger-rgb), 0.2); }
.msg--search-hit { background: rgba(var(--neon-rgb), 0.2); border-radius: 8px; transition: background 0.3s; animation: searchHitPulse 1.5s ease; }
@keyframes searchHitPulse { 0% { background: rgba(var(--neon-rgb), 0.4); } 100% { background: rgba(var(--neon-rgb), 0.2); } }

/* chat search */
.chatpanel__search { position: relative; display: inline-flex; align-items: center; gap: 0; flex: 0 0 auto; height: 42px; border-radius: 999px; border: 1px solid var(--line); background: rgba(var(--panel-scrim), 0.75); overflow: hidden; transition: border-color 0.2s, box-shadow 0.2s, background 0.2s; }
.chatpanel__search-input { width: 160px; height: 100%; padding: 0 14px; border: none; background: transparent; color: var(--text); font-size: 13px; outline: none; border-radius: 0; }
.chatpanel__search-input:focus { border-color: transparent; box-shadow: none; }
.chatpanel__search-next-btn { padding: 0 14px; border: none; border-left: 1px solid var(--line); background: rgba(var(--veil), 0.06); color: var(--text-dim); cursor: pointer; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; height: 100%; border-radius: 0 999px 999px 0; }
.chatpanel__search-next-btn:hover { background: rgba(var(--veil), 0.12); color: var(--neon); border-color: var(--line); }
.chatpanel__search-next-btn[hidden] { display: none !important; }
.chatpanel__search-count { font-size: 11px; color: var(--dim); min-width: 36px; text-align: center; padding: 0 6px; border-left: 1px solid var(--line); height: 100%; display: flex; align-items: center; justify-content: center; }

/* ── auth pages ─────────────────────────────────────────────────── */
.auth {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
  margin: 10px auto;
  max-width: 1040px;
}
.auth__art {
  position: relative;
  padding: 46px 42px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background:
    repeating-linear-gradient(115deg, transparent 0 26px, rgba(var(--veil), 0.028) 26px 27px),
    radial-gradient(circle at 15% 5%, rgba(var(--neon-rgb), 0.22), transparent 55%),
    radial-gradient(circle at 90% 95%, rgba(var(--neon-2-rgb), 0.22), transparent 55%),
    linear-gradient(150deg, var(--inset), var(--inset-2));
  min-height: 460px;
}
.auth__art-inner { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 16px; }
.auth__logo {
  display: block;
  align-self: flex-start; /* a column flex parent would otherwise stretch it */
  height: 40px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  filter: drop-shadow(0 0 20px rgba(var(--neon-rgb), 0.4));
}
.auth__stripes {
  position: absolute; left: 0; right: 0; bottom: 0; height: 6px;
  background: repeating-linear-gradient(45deg, var(--amber) 0 14px, var(--bg) 14px 28px);
  opacity: 0.6;
}
.ticks { display: flex; flex-direction: column; gap: 10px; margin-top: 6px; }
.ticks li { display: flex; align-items: center; gap: 9px; font-size: 13px; color: var(--text-dim); }
.ticks svg { color: var(--neon); flex: 0 0 auto; }
.auth__panel { padding: 32px; display: flex; align-items: center; background: linear-gradient(180deg, var(--panel), var(--inset)); }
.auth__panel .card { width: 100%; border: 0; background: none; box-shadow: none; padding: 0; gap: 15px; }

/* The Android build sits under the login card. */
.auth__stack { width: 100%; display: flex; flex-direction: column; }
.auth__android { margin-top: 18px; display: flex; flex-direction: column; gap: 8px; }
.auth__or { height: 1px; background: var(--line-soft); margin: 0 0 14px; }
.auth__android .btn { justify-content: center; gap: 8px; }
.auth__android-note { text-align: center; }

/* ── welcome / marketing ────────────────────────────────────────── */
.hero {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--line);
  padding: clamp(30px, 6vw, 72px);
  background: var(--bg);
  margin-bottom: 30px;
}
.hero__bg {
  position: absolute; inset: 0;
  background:
    repeating-linear-gradient(115deg, transparent 0 34px, rgba(var(--veil), 0.022) 34px 35px),
    radial-gradient(700px 420px at 78% 12%, rgba(var(--neon-rgb), 0.3), transparent 62%),
    radial-gradient(620px 420px at 8% 95%, rgba(var(--neon-2-rgb), 0.26), transparent 62%),
    radial-gradient(480px 300px at 50% -10%, rgba(var(--neon-3-rgb), 0.1), transparent 70%),
    linear-gradient(150deg, var(--inset), var(--inset-2) 75%, var(--bg));
}
.hero__bg::after {
  content: "";
  position: absolute; inset: 0;
  background-image: linear-gradient(90deg, rgba(var(--veil), 0.03) 1px, transparent 1px),
                    linear-gradient(rgba(var(--veil), 0.03) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(circle at 50% 40%, #000, transparent 78%);
}
.hero__inner { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 18px; max-width: 780px; }
.hero__logo {
  display: block;
  align-self: flex-start; /* keep the aspect ratio inside the column flex */
  height: 52px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  filter: drop-shadow(0 0 26px rgba(var(--neon-rgb), 0.45));
}
.hero__stats {
  display: flex; gap: 26px; flex-wrap: wrap;
  margin-top: 8px; padding-top: 18px;
  border-top: 1px solid rgba(var(--veil), 0.09);
  font-size: 11.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted);
}
.hero__stats strong { display: block; font-family: var(--font-head); font-size: 24px; letter-spacing: 0.02em; color: var(--text); }

.featuregrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; }
.feature { padding: 20px; display: flex; flex-direction: column; gap: 8px; }
.feature__icon {
  display: grid; place-items: center;
  width: 42px; height: 42px; border-radius: 11px;
  border: 1px solid rgba(var(--neon-rgb), 0.28);
  background: rgba(var(--neon-rgb), 0.08);
  color: var(--neon);
  margin-bottom: 4px;
}
.feature h2 { font-size: 17px; letter-spacing: 0.05em; }
.feature p { font-size: 13px; color: var(--muted); line-height: 1.55; }
.strip__title { font-size: 18px; letter-spacing: 0.08em; margin-bottom: 12px; }
.cta {
  margin-top: 34px; padding: 44px 26px; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(var(--neon-rgb), 0.22);
  background:
    radial-gradient(circle at 50% 0%, rgba(var(--neon-rgb), 0.16), transparent 62%),
    linear-gradient(180deg, var(--panel), var(--inset));
}
.page-welcome .footer, .page-about .footer { padding-bottom: 40px; }

/* ── prose ──────────────────────────────────────────────────────── */
.prose { display: flex; flex-direction: column; gap: 10px; }
.prose h2 {
  display: flex; align-items: center; gap: 9px;
  font-size: 17px; letter-spacing: 0.05em; margin-top: 22px; color: var(--text);
}
.prose h2 svg { color: var(--neon); }
.prose p, .prose li { color: var(--text-dim); font-size: 14px; line-height: 1.65; }
.prose ul { display: flex; flex-direction: column; gap: 7px; padding-left: 2px; }
.prose li { padding-left: 16px; position: relative; }
.prose li::before { content: "—"; position: absolute; left: 0; color: var(--neon); }
.prose strong { color: var(--text); }
.prose em { color: var(--neon-3); font-style: normal; }

/* ── error page ─────────────────────────────────────────────────── */
.page-error { min-height: 54vh; display: grid; place-items: center; }
.page-error__panel {
  text-align: center; display: flex; flex-direction: column; align-items: center; gap: 14px;
  padding: 46px 26px; max-width: 620px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(var(--danger-rgb), 0.25);
  background:
    repeating-linear-gradient(135deg, rgba(var(--danger-rgb), 0.05) 0 16px, transparent 16px 32px),
    linear-gradient(180deg, var(--panel-2), var(--inset));
}
.page-error .lede { text-align: center; }

/* ── lightbox ───────────────────────────────────────────────────── */
.lightbox {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(4, 6, 9, 0.94);
  backdrop-filter: blur(6px);
  display: grid; place-items: center;
  padding: 24px;
  animation: fade 0.18s var(--ease);
}
@keyframes fade { from { opacity: 0; } }
.lightbox img { max-width: 100%; max-height: 88vh; border-radius: 12px; border: 1px solid var(--line); }
.lightbox__close {
  position: absolute; top: 18px; right: 18px;
  width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center;
  color: var(--text); background: rgba(var(--veil), 0.08);
  border: 1px solid var(--line);
}
.lightbox__close:hover { background: rgba(var(--veil), 0.16); }

/* ── chat: global channel ───────────────────────────────────────── */
.inbox__global {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--line-soft);
  background: linear-gradient(90deg, rgba(var(--neon-rgb), 0.08), rgba(var(--neon-3-rgb), 0.03));
  position: relative;
}
.inbox__global:hover { background: linear-gradient(90deg, rgba(var(--neon-rgb), 0.14), rgba(var(--neon-3-rgb), 0.05)); }
.inbox__global.is-unread { box-shadow: inset 3px 0 0 var(--neon); }
.inbox__global-mark {
  display: grid; place-items: center;
  width: 42px; height: 42px; flex: 0 0 auto;
  border-radius: 12px;
  color: var(--on-accent);
  background: linear-gradient(140deg, var(--neon) 0%, var(--accent-b) 60%, var(--neon-3) 150%);
  box-shadow: 0 0 20px -6px rgba(var(--neon-rgb), 0.8);
}
.inbox__global-mark--sm { width: 34px; height: 34px; border-radius: 10px; }
.inbox__heading {
  padding: 12px 16px 6px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}
.inbox__empty { padding: 8px 6px 4px; }
.chatpanel__who--static { cursor: default; }
.menu__note { padding: 10px 12px; font-size: 12px; color: var(--muted); max-width: 240px; line-height: 1.5; }

/* ── builds: hall of fame ───────────────────────────────────────── */
.fame { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; margin-bottom: 8px; }
.fame__card {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px;
  border-color: rgba(var(--neon-rgb), 0.2);
  background: var(--panel);
}
.fame__card:hover { border-color: rgba(var(--neon-rgb), 0.45); }
.fame__kind {
  position: absolute;
  top: 8px; left: 8px;
  display: inline-flex; align-items: center; gap: 5px;
  font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--neon);
  background: var(--panel);
  padding: 2px 6px;
  border-radius: 4px;
}
.fame__card { position: relative; }
.fame__media { width: 68px; height: 50px; flex: 0 0 auto; border-radius: 10px; overflow: hidden; background: var(--inset); display: block; }
.fame__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.fame__text { display: flex; flex-direction: column; gap: 2px; min-width: 0; padding-top: 12px; }
.fame__text strong { font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fame__text span { font-size: 11px; }

/* ── builds: gallery + layout ───────────────────────────────────── */
.build-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; align-items: start; }
.build-layout__side { display: flex; flex-direction: column; gap: 14px; position: sticky; top: calc(var(--topbar) + 20px); }
.feedtabs__spacer { flex: 1; }
.feedtabs__tab--sm { font-size: 11px; padding: 6px 11px; text-transform: none; letter-spacing: 0.04em; }

@media (max-width: 620px) {
  /* Service filters have four items; wrap them instead of hiding the last
     one off the right edge of the screen. */
  .feedtabs--wrap { flex-wrap: wrap; overflow-x: visible; }
  .feedtabs--wrap .feedtabs__spacer { display: none; }
}

.cards--builds { grid-template-columns: repeat(auto-fill, minmax(228px, 1fr)); }
.build-card { display: flex; flex-direction: column; overflow: hidden; }
.build-card__media-wrap { position: relative; }
.build-card__media { display: block; aspect-ratio: 16 / 10; background: var(--inset); }
.build-card__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* My Ride: the vehicle photo is the whole car, so fit it inside the frame
   instead of cropping it like a build cover. */
.build-card__media.garage-media img { object-fit: contain; }
.build-card__gen {
  display: grid; place-items: center;
  width: 100%; height: 100%;
  color: hsl(var(--h, 190) 90% 75%);
  background:
    radial-gradient(circle at 30% 10%, hsl(var(--h, 190) 80% 28% / 0.9), transparent 68%),
    linear-gradient(140deg, hsl(var(--h, 190) 45% 13%), var(--inset));
}
.build-card__badges { position: absolute; top: 9px; left: 9px; display: flex; gap: 6px; flex-wrap: wrap; }
.build-card__body { padding: 13px 14px 12px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.build-card__title { font-family: var(--font-head); font-size: 14.5px; letter-spacing: 0.03em; }
.build-card__title:hover { color: var(--neon); }
.build-card__sub { font-size: 11.5px; }
.build-card__specs { display: flex; gap: 8px; flex-wrap: wrap; font-size: 11px; color: var(--muted); }
.build-card__specs .spec { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 99px; border: 1px solid var(--line); background: rgba(var(--veil), 0.03); font-size: 10.5px; font-weight: 500; }
.build-card__specs .spec svg { flex: 0 0 auto; }
.build-card__foot {
  display: flex; align-items: center;
  gap: 8px;
  margin-top: auto; padding-top: 6px;
  /* The name takes the room in the middle, the buttons sit at the
     edges - so a long name is never cut off by the vote button. */
  justify-content: flex-start;
}
.build-card__owner {
  display: flex; align-items: center; gap: 7px;
  font-size: 11.5px;
  min-width: 0; flex: 1 1 auto;
  overflow: hidden;
  margin-right: auto;
}
.build-card__owner > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.build-card__vote { margin: 0; flex: 0 0 auto; }
.build-card__vote .btn { display: inline-flex; align-items: center; gap: 4px; padding: 5px 10px; font-size: 11px; }
.build-card__vote .btn.is-on { color: var(--neon-3); border-color: var(--neon-3); background: rgba(var(--neon-3-rgb), 0.1); }
.build-card__vote .vote-check { margin-left: 2px; color: var(--neon-3); }

/* blur-up image loading - disabled to fix broken covers */
.build-card__media img {
  filter: none;
}
.tag--hot { color: var(--neon-3); border-color: rgba(var(--neon-3-rgb), 0.35); background: rgba(var(--neon-3-rgb), 0.08); }
.tag--sale { color: var(--amber); border-color: rgba(var(--amber-rgb), 0.4); background: rgba(var(--amber-rgb), 0.1); }

/* The build badges float on top of a photo, so they get a solid fill and a
   drop shadow instead of a translucent tint - the old glassy pills washed
   out against bright cars (and vanished entirely on the light theme). */
.build-card__badges .tag {
  border-color: transparent;
  color: var(--on-accent);
  background: var(--neon-3);
  box-shadow: 0 1px 7px rgba(0, 0, 0, 0.32);
}
.build-card__badges .tag--sale { background: var(--amber); }
.build-card__badges .tag--invite { background: var(--neon-2); }
.build-card__price { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; margin: 2px 0 0; }
.build-card__price strong { font-family: var(--font-head); font-size: 19px; letter-spacing: 0.02em; color: var(--neon-3); }

.standings { display: flex; flex-direction: column; gap: 4px; margin: 4px 0 0; padding: 0; list-style: none; }
.standings__row { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 9px; font-size: 12.5px; }
.standings__row.is-self { background: rgba(var(--neon-rgb), 0.08); box-shadow: inset 2px 0 0 var(--neon); }
.standings__rank { font-family: var(--font-mono); font-size: 11px; color: var(--muted); width: 16px; flex: 0 0 auto; }
.standings__name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.standings__votes { font-family: var(--font-mono); font-size: 11.5px; color: var(--neon); flex: 0 0 auto; }

/* ── build page ─────────────────────────────────────────────────── */
.build-view { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; align-items: start; }
.build-view__main { display: flex; flex-direction: column; gap: 16px; }
.build-view__side { display: flex; flex-direction: column; gap: 14px; }
.gallery { padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.gallery__stage { border-radius: 12px; overflow: hidden; background: var(--bg); border: 1px solid var(--line-soft); }
.gallery__slide { display: none; margin: 0; }
.gallery__slide.is-active { display: block; }
.gallery__slide img, .gallery__slide video { display: block; width: 100%; max-height: 62vh; object-fit: contain; background: var(--bg); visibility: visible; opacity: 1; }
.gallery__thumbs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; }
.gallery__thumb {
  width: 76px; height: 56px; flex: 0 0 auto; padding: 0;
  border-radius: 9px; overflow: hidden;
  border: 1px solid var(--line); background: var(--bg-2); cursor: pointer;
}
.gallery__thumb.is-active { border-color: var(--neon); box-shadow: 0 0 0 2px rgba(var(--neon-rgb), 0.2); }
.gallery__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; visibility: visible; opacity: 1; }
.gallery__thumb-video { display: grid; place-items: center; height: 100%; color: var(--muted); }
.gallery__empty { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 46px 20px; color: var(--muted); }
.gallery__empty .build-card__gen { width: 96px; height: 72px; border-radius: 14px; }

.build-note { padding: 16px 18px; }
.build-note p { font-size: 14px; line-height: 1.6; color: var(--text-dim); }

.sale-card { padding: 16px; display: flex; flex-direction: column; gap: 10px; border-color: rgba(var(--amber-rgb), 0.3); }
.sale-card__price { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin: 0; }
.sale-card__price strong { font-family: var(--font-head); font-size: 30px; letter-spacing: 0.02em; color: var(--neon-3); line-height: 1; }
.sale-card__actions { display: flex; flex-direction: column; gap: 8px; }
.vote-card { padding: 16px; display: flex; flex-direction: column; gap: 8px; border-color: rgba(var(--neon-rgb), 0.25); }
.vote-card__count { display: flex; align-items: baseline; gap: 7px; }
.vote-card__count strong { font-family: var(--font-head); font-size: 30px; color: var(--neon); text-shadow: 0 0 22px rgba(var(--neon-rgb), 0.4); line-height: 1; }

.watch-card { padding: 16px; display: flex; flex-direction: column; gap: 8px; border-color: rgba(var(--neon-3-rgb), 0.28); }
.watch-card .btn.is-on { color: var(--neon-3); border-color: var(--neon-3); background: rgba(var(--neon-3-rgb), 0.1); }

/* Watch button on build cards */
.build-card__watch { position: absolute; top: 9px; right: 9px; z-index: 2; }
.build-card__watch .btn { width: 32px; height: 32px; padding: 0; display: grid; place-items: center; border-radius: 99px; background: rgba(0, 0, 0, 0.45); border-color: transparent; color: #fff; box-shadow: 0 1px 7px rgba(0, 0, 0, 0.32); }
.build-card__watch .btn:hover { background: rgba(0, 0, 0, 0.7); }
.build-card__watch .btn.is-on { background: var(--neon-3); color: var(--on-accent); border-color: transparent; box-shadow: 0 1px 7px rgba(0, 0, 0, 0.32); }
.build-card__watch .btn.is-on:hover { background: var(--neon-3); filter: brightness(1.1); }

.specs { display: flex; flex-direction: column; gap: 2px; }
.specs__row { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px dashed var(--line-soft); font-size: 12.5px; }
.specs__row:last-child { border-bottom: 0; }
.specs__row dt { color: var(--muted); }
.specs__row dd { margin: 0; text-align: right; }

.awards { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.award {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 12px; border-radius: 99px;
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase;
  border: 1px solid rgba(var(--neon-3-rgb), 0.4); color: var(--neon-3); background: rgba(var(--neon-3-rgb), 0.07);
}
.award--year { border-color: rgba(var(--amber-rgb), 0.5); color: var(--amber); background: rgba(var(--amber-rgb), 0.08); }
.award--month { border-color: rgba(var(--neon-rgb), 0.45); color: var(--neon); background: rgba(var(--neon-rgb), 0.07); }

/* ── build form ─────────────────────────────────────────────────── */
.narrow { max-width: 760px; margin: 0 auto; }
.field-grid { display: grid; gap: 12px; }
.field-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.field-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.field--radio { border: 0; padding: 0; margin: 0 0 14px; }
.field--radio legend { margin-bottom: 8px; }
.choice { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); margin-bottom: 8px; cursor: pointer; }
.choice:has(input:checked) { border-color: rgba(var(--neon-rgb), 0.5); background: rgba(var(--neon-rgb), 0.05); }
.choice input { margin-top: 3px; }
.choice span { display: flex; flex-direction: column; gap: 2px; }
.choice small { color: var(--muted); font-size: 12px; }
/* The price fields stay hidden until "for sale" is ticked. Pure CSS so
   it works without JavaScript. */
.build-sale__price { display: none; margin-top: 8px; }
.build-sale:has(input:checked) .build-sale__price { display: block; }
.media-preview { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; margin: -4px 0 14px; }
.media-preview img, .media-preview video { width: 100%; height: 76px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); display: block; }
.media-manage { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; }
.media-manage__item { position: relative; margin: 0; }
.media-manage__item img, .media-manage__item video { width: 100%; height: 84px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); display: block; }
.media-manage__x {
  position: absolute; top: 5px; right: 5px;
  width: 26px; height: 26px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(4, 6, 9, 0.8); border: 1px solid var(--line); color: var(--text);
}
.media-manage__x:hover { background: rgba(var(--danger-rgb), 0.4); }

/* ── responsive ─────────────────────────────────────────────────── */
@media (max-width: 1240px) {
  .wall-grid { grid-template-columns: minmax(0, 1fr); }
  .wall-side--right { display: none; }
}

/* The wordmark nav keeps the compact icon-only look on every screen so the
   labels never push the page wider than the viewport. */
.mainnav__link span:not(.pip) { display: none; }
.mainnav__link { padding: 9px 11px; }

@media (max-width: 1080px) {
  .layout-shell { padding: 18px 16px 96px; }
  .profile__grid { grid-template-columns: minmax(0, 1fr) 260px; }
  .chatlayout { grid-template-columns: 280px minmax(0, 1fr); }
  .menu__handle { display: none; }
  .build-layout, .build-view { grid-template-columns: minmax(0, 1fr) 270px; }
}

@media (max-width: 980px) {
  .topbar__inner { gap: 8px 12px; padding: 9px 16px; flex-wrap: nowrap; }
  .searchbar { order: 0; flex: 1 1 140px; min-width: 120px; max-width: 260px; }
  .mainnav { display: none; }
  .topbar__end { margin-left: auto; }
  .topbar__cta { margin-left: auto; }
  .shell { padding: 18px 16px 96px; }
  .wall-grid { grid-template-columns: minmax(0, 1fr); }
  .wall-side--left { display: none; }
  .profile__grid { grid-template-columns: minmax(0, 1fr); }
  .profile__side { position: static; }
  .pagehead { align-items: flex-start; }
  .pagehead__actions { width: 100%; justify-content: flex-end; }
  .build-layout, .build-view { grid-template-columns: minmax(0, 1fr); }
  .build-layout__side { position: static; }
}

@media (max-width: 860px) {
  :root { --topbar: 60px; }
  body { padding-bottom: 0; }
  .appmenu__trigger { display: grid; }
  .layout-sidebar { display: none; }
  .layout-shell { padding: 18px 8px 96px; }
  .shell { padding-bottom: 40px; }
  /* Keep the footer links clear of the fixed menu and chat buttons. */
  .footer { padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px)); }
  .footer__versions { margin-left: 0; width: 100%; }
  .update-banner { top: auto; bottom: 14px; }
  .brand__text strong { font-size: 19px; }
  .brand__logo { height: 28px; }
  .auth { grid-template-columns: 1fr; }
  .auth__art { min-height: 0; padding: 30px 24px; }
  .auth__art-inner { gap: 12px; }
  .auth__panel { padding: 22px; }
  .chatlayout { grid-template-columns: 1fr; height: auto; }
  .chatlayout__list { display: none; }
  .chatlayout--inbox { grid-template-columns: 1fr; }
  .chatpanel { height: calc(100dvh - var(--topbar) - 150px); min-height: 420px; }
  .post__body, .post__media, .post__stats, .comments, .sos, .pin { margin-left: 0; }
  .composer__scope { margin-left: 0; }
  .composer__preview { margin-left: 0; }
  .single, .single--narrow { gap: 14px; }
}

@media (max-width: 620px) {
  body { font-size: 14.5px; }
  /* A little more room around the cards, so the page background still
     shows on the sides. */
  .shell { padding: 14px 4px 40px; }
  .topbar__inner { flex-wrap: wrap; padding: 9px 12px; }
  .searchbar { order: 3; flex: 1 1 100%; max-width: none; }
  .post { padding: 13px; border-radius: 14px; }
  .composer { padding: 13px; }
  .field-row { grid-template-columns: 1fr; }
  .kv { grid-template-columns: 1fr; gap: 2px 0; }
  .kv span { margin-top: 8px; }
  .profile__body { padding: 0 14px; align-items: flex-start; }
  .profile__stats { padding: 12px 14px 16px; gap: 18px; }
  .profile__actions { width: 100%; }
  .meetup { flex-direction: column; }
  .meetup__when { flex-direction: row; width: 100%; gap: 8px; padding: 7px 10px; }
  .meetup__day { font-size: 20px; }
  .meetup__month, .meetup__time { margin: 0; }
  .cards { grid-template-columns: 1fr; }
  .cards--wide { grid-template-columns: 1fr; }
  .field-grid--2, .field-grid--3 { grid-template-columns: 1fr; }
  .pagehead h1, .display { font-size: clamp(1.7rem, 8vw, 2.4rem); }
  .display--xxl { font-size: clamp(2.2rem, 12vw, 3.6rem); }
  .auth__art { padding: 24px 18px; }
  .auth__panel { padding: 16px; }
  .hero { padding: 26px 18px; }
  .hero__stats { gap: 18px; }
  .hero__stats strong { font-size: 20px; }
  .searchbig { padding: 0 5px 0 14px; }
  .searchbig .btn { padding: 0 12px; font-size: 11px; }
  .stat__label { display: none; }
  .stat { padding: 8px 10px; }
  .post__stats { gap: 2px; }
  /* The chat header gets crowded on a phone: the name keeps its own
     line instead of being squeezed into a column of letters. */
  .chatpanel__head { flex-wrap: wrap; }
  .chatpanel__who { flex: 1 1 100%; }
  .chatpanel__actions { flex: 1 1 100%; flex-wrap: wrap; }
  .chatpanel__search { flex: 1 1 180px; }
  .chatpanel__search-input { flex: 1 1 auto; width: auto; min-width: 0; }
  .comments__form .btn { width: 34px; height: 34px; }
  .feedtabs { margin: 14px 0 10px; }
  .mapbox__map { height: 240px; }
  .mapcard__map { height: 240px; }
  .mapbox__actions .btn { flex: 1; }
  .mapbox__chosen { flex-basis: 100%; }
  .mini { padding: 14px; }
  .menu__panel { min-width: 210px; }
  .flashes { margin-bottom: 12px; }
  .grouphead__cover { height: 90px; }
  .page-error__panel { padding: 30px 18px; }
  .btnrow .btn { flex: 1 1 auto; }
}

@media (max-width: 400px) {
  .brand__text small { display: none; }
  .brand__logo { height: 25px; }
  .topbar__right { gap: 6px; }
  .iconbtn { width: 36px; height: 36px; }
  .meetuphero__facts { grid-template-columns: 1fr; }
  .empty { padding: 32px 14px; }
  .shell { padding: 12px 4px 36px; }
}

/* The technical inspection badge swaps its long label for the short one
   on a phone, where the full wording ran off the card. */
@media (max-width: 620px) {
}

/* ── language switcher ──────────────────────────────────────────── */
.langswitch {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(var(--veil), 0.04);
}
.langswitch__opt {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  padding: 4px 8px;
  border-radius: 999px;
  font-family: var(--font-head);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  line-height: 1.1;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.16s var(--ease), background 0.16s var(--ease);
}
.langswitch__opt:hover { color: var(--text); background: rgba(var(--veil), 0.07); }
.langswitch__opt.is-active {
  color: var(--on-accent);
  background: linear-gradient(180deg, var(--accent-a), var(--neon));
  box-shadow: 0 0 14px -3px rgba(var(--neon-rgb), 0.75);
}
/* The Underground page and theme use one solid red pill for the active
   language and currency choices, instead of the global gradient. */
[data-theme="underground"] .langswitch,
body.page-underground .langswitch {
  border-color: rgba(255, 59, 77, 0.35);
  background: rgba(255, 59, 77, 0.06);
}
[data-theme="underground"] .langswitch__opt.is-active,
[data-theme="underground"] .langswitch__opt.is-active:hover,
body.page-underground .langswitch__opt.is-active,
body.page-underground .langswitch__opt.is-active:hover {
  color: var(--on-accent);
  background: #ff3b4d;
  background-image: none;
  box-shadow: 0 0 14px -3px rgba(255, 59, 77, 0.75);
}

/* ── checkbox row (auth forms) ──────────────────────────────────── */
.check {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 2px 0 4px;
  font-size: 13px;
  color: var(--text-dim);
  cursor: pointer;
  user-select: none;
}
.check input { flex: 0 0 auto; width: 16px; height: 16px; accent-color: var(--neon); cursor: pointer; }
.check:hover { color: var(--text); }

/* ── live search dropdown ───────────────────────────────────────── */
.searchlive {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  z-index: 90;
  min-width: 290px;
  max-height: min(72vh, 520px);
  overflow-y: auto;
  padding: 8px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--overlay);
  box-shadow: var(--shadow);
  animation: pop 0.14s var(--ease);
}
.searchlive[hidden] { display: none; }
.searchlive__group + .searchlive__group { margin-top: 4px; padding-top: 6px; border-top: 1px solid var(--line-soft); }
.searchlive__title {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--dim);
}
.searchlive__item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  color: var(--text-dim);
  transition: background 0.14s, color 0.14s;
}
.searchlive__item:hover, .searchlive__item.is-active { background: rgba(var(--neon-rgb), 0.09); color: var(--text); }
.searchlive__thumb {
  width: 34px; height: 34px;
  flex: 0 0 auto;
  border-radius: 9px;
  object-fit: cover;
  background: var(--panel-3);
  border: 1px solid var(--line-soft);
  display: grid; place-items: center;
  color: var(--neon);
}
.searchlive__text { display: flex; flex-direction: column; min-width: 0; line-height: 1.28; flex: 1; }
.searchlive__text strong, .searchlive__text span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.searchlive__text strong { font-size: 13.5px; font-weight: 600; }
.searchlive__text span { font-size: 11.5px; color: var(--muted); }
.searchlive__hint, .searchlive__empty { padding: 12px 10px; font-size: 12.5px; color: var(--muted); }
.searchlive__all {
  display: block;
  margin-top: 4px;
  padding: 10px;
  border-top: 1px solid var(--line-soft);
  font-size: 12.5px;
  color: var(--neon);
}
.searchlive__all:hover { background: rgba(var(--neon-rgb), 0.08); }

/* ── admin console ──────────────────────────────────────────────── */
.chip--admin { color: var(--neon-3); border-color: rgba(var(--neon-3-rgb), 0.35); background: rgba(var(--neon-3-rgb), 0.08); }
.chip--provider { color: var(--amber); border-color: rgba(var(--amber-rgb), 0.35); background: rgba(var(--amber-rgb), 0.08); }

.adminstats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(104px, 1fr));
  gap: 10px;
  margin: 18px 0 20px;
}
.adminstats__cell {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 13px 15px;
  border-radius: 13px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(var(--veil), 0.03), rgba(var(--veil), 0.01));
}
.adminstats__cell strong { font-family: var(--font-head); font-size: 21px; letter-spacing: 0.02em; }
.adminstats__cell small { font-size: 10px; letter-spacing: 0.13em; text-transform: uppercase; color: var(--dim); }

.adminpanel { padding: 6px 16px 10px; }
.adminfilter { margin: 10px 0; }

/* ── admin console: translations ──────────────────────────────── */
.tr__hint { margin: 4px 0 12px; }
.tr__summary {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 14px;
  max-width: 100%;
  margin-top: 12px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(var(--veil), 0.035);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
}
.tr__summary strong { color: var(--text); font-size: 13px; }
.tr__summary-sep { color: var(--dim); }
.tr__summary .tr__missing { color: var(--amber); font-weight: 700; }
.tr__summary .tr__missing strong { color: inherit; }
.tr__missing { color: var(--amber); font-weight: 700; }
.tr__switch { margin: 0 0 12px; }
.tr__auto-option {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  cursor: pointer;
  user-select: none;
}
.tr__auto-option input { width: 16px; height: 16px; accent-color: var(--neon); }

/* The three views of the dictionary: the site, the manual, the leftovers. */
.tr__scopes { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; }
.tr__scope {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 99px;
  background: rgba(var(--veil), 0.03);
  color: var(--text-dim);
  font-size: 12.5px;
  font-weight: 600;
  text-decoration: none;
}
.tr__scope:hover { color: var(--text); border-color: var(--line-strong); }
.tr__scope.is-active { color: var(--neon); border-color: rgba(var(--neon-rgb), 0.4); background: rgba(var(--neon-rgb), 0.08); }
.tr__scope span {
  min-width: 20px;
  padding: 1px 6px;
  border-radius: 99px;
  background: rgba(var(--veil), 0.08);
  font-family: var(--font-mono);
  font-size: 10.5px;
  text-align: center;
}
.tr__scope--warn { color: var(--on-accent); background: var(--amber); }

.tr__note {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin: 0 0 12px;
  padding: 10px 12px;
  border: 1px solid rgba(var(--amber-rgb), 0.3);
  border-radius: var(--radius-sm);
  background: rgba(var(--amber-rgb), 0.07);
  font-size: 12.5px;
  color: var(--text-dim);
}
.tr__note p { margin: 0; }
.trrow--missing .trrow__en { border-color: rgba(var(--amber-rgb), 0.35); }
.trrow--missing .trrow__input { border-color: rgba(var(--amber-rgb), 0.35); }
.trlist { border-top: 1px solid var(--line-soft); }
.trrow {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
  padding: 11px 0;
  border-bottom: 1px solid var(--line-soft);
}
.trrow:last-child { border-bottom: 0; }
.trrow__en {
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--text-dim);
  max-height: 8.6em;
  overflow: auto;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  background: var(--inset);
  border: 1px solid var(--line-soft);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.trrow__ka { min-width: 0; }
.trrow__input {
  width: 100%;
  min-height: 3.2em;
  resize: vertical;
  font-family: var(--font-body);
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--text);
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--panel-2, var(--inset));
}
.trrow__input:focus { border-color: rgba(var(--neon-rgb), 0.5); outline: none; }
.trrow__act { display: flex; align-items: center; gap: 8px; padding-top: 2px; }
.trrow__state {
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--dim);
  min-width: 4.5em;
  text-align: right;
}
.trrow__state.is-ok { color: var(--ok, #78e682); }
.trrow__state.is-bad { color: var(--danger); }
.trrow__warn {
  margin-top: 6px;
  font-size: 11.5px;
  line-height: 1.4;
  color: var(--amber);
}
.trrow__warn.is-bad { color: var(--danger); }

/* ── admin console: the manual editor ─────────────────────────── */
.howlist { display: flex; flex-direction: column; gap: 14px; }
.howsec { padding: 14px 16px 16px; }
.howsec--new { border-style: dashed; }
.howsec__head {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line-soft);
}
.howsec__title { display: flex; align-items: center; gap: 8px; min-width: 0; }
.howsec__icon {
  width: 108px;
  flex: 0 0 auto;
  font-size: 12px;
  padding: 7px 9px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--inset);
  color: var(--text-dim);
}
.howsec__en {
  flex: 1 1 auto;
  min-width: 0;
  font-family: var(--font-head);
  font-size: 15px;
  letter-spacing: 0.02em;
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--inset);
  color: var(--text);
}
.howsec__ka-input {
  width: 100%;
  font-size: 13px;
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--inset);
  color: var(--text);
}
.howsec__en:focus, .howsec__ka-input:focus, .howsec__icon:focus {
  border-color: rgba(var(--neon-rgb), 0.5);
  outline: none;
}
.howsec__act { display: flex; align-items: center; gap: 6px; }
.howsec__blocks { display: flex; flex-direction: column; gap: 8px; padding: 12px 0; }
.howblock {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr) minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
}
.howblock textarea {
  width: 100%;
  min-height: 3.4em;
  resize: vertical;
  font-family: var(--font-body);
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--text);
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--inset);
}
.howblock textarea:focus { border-color: rgba(var(--neon-rgb), 0.5); outline: none; }
.howblock__kind select {
  width: 100%;
  font-size: 12px;
  padding: 8px 8px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--inset);
  color: var(--text);
}
.howblock__act { display: flex; align-items: center; gap: 5px; }
.howsec__foot { border-top: 1px solid var(--line-soft); padding-top: 12px; }
.howsec__foot .inlineform { margin: 0; }
.howsec__foot input[type="text"] { flex: 1 1 auto; min-width: 0; }
.howsec__kind { flex: 0 0 auto; }

@media (max-width: 900px) {
  .trrow { grid-template-columns: 1fr; }
  .trrow__act { justify-content: flex-start; }
  .trrow__state { text-align: left; }
  .howsec__head, .howblock { grid-template-columns: 1fr; }
  .howsec__icon { width: 100%; }
}

.adminrow {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 13px 0;
  border-bottom: 1px solid var(--line-soft);
}
.adminrow:last-child { border-bottom: 0; }
.adminrow__who { display: flex; align-items: center; gap: 10px; flex: 1 1 220px; min-width: 0; }
.adminrow__who div { display: flex; flex-direction: column; min-width: 0; line-height: 1.28; }
.adminrow__who strong { font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adminrow__who span { font-size: 11.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adminrow__meta { display: flex; gap: 16px; flex: 0 0 auto; }
.adminrow__meta span { display: flex; flex-direction: column; font-size: 9.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--dim); }
.adminrow__meta b { font-family: var(--font-head); font-size: 14px; color: var(--text); letter-spacing: 0; }
.adminrow__actions { display: flex; align-items: center; gap: 6px; margin-left: auto; flex-wrap: wrap; }
.adminrow__actions form { margin: 0; }
.adminrow__text { flex: 1 1 100%; font-size: 13px; color: var(--text-dim); }
.admincols { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; }

/* ── form grids ───────────────────────────────────────────────────── */
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 22px; padding: 24px; }
.form-grid .field { display: flex; flex-direction: column; gap: 10px; }
.form-grid .field--full { grid-column: 1 / -1; }
.form-grid .field--submit { align-self: end; }
.form-grid label { font-size: 13px; font-weight: 500; color: var(--text-dim); margin-bottom: 3px; }
.form-grid input[type="text"],
.form-grid input[type="url"],
.form-grid input[type="number"],
.form-grid input[type="email"],
.form-grid input[type="password"],
.form-grid select,
.form-grid textarea { width: 100%; padding: 12px 16px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); color: var(--text); font-size: 14.5px; font-family: inherit; transition: border-color 0.15s, box-shadow 0.15s; }
.form-grid input:focus,
.form-grid select:focus,
.form-grid textarea:focus { outline: none; border-color: var(--neon); box-shadow: 0 0 0 3px rgba(var(--neon-rgb), 0.15); }
.form-grid input[type="file"] { 
  padding: 10px 14px; 
  background: transparent; 
  border: 1px dashed var(--line); 
  border-radius: 10px; 
  cursor: pointer;
  height: auto;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.form-grid input[type="file"]:hover { border-color: var(--neon-3); }
.form-grid .muted.small { font-size: 12px; color: var(--dim); margin-top: 4px; }
.form-grid .modal__actions { display: flex; gap: 16px; justify-content: flex-end; margin-top: 12px; padding: 0 24px 20px; flex-wrap: wrap; }

/* Compact form grid for add partner (fewer fields) */
.form-grid--compact { max-width: 420px; margin: 0 auto; }
.form-grid--compact .field { max-width: 100%; }

/* ── modals ─────────────────────────────────────────────────────── */
/* `.dialog` is the one modal surface in the app: the admin backup
   console and the yes/no confirmations both use it, so they always
   match. Native <dialog> handles focus trapping and Escape. */
dialog { color-scheme: var(--native-scheme); }
.dialog {
  width: min(720px, calc(100vw - 28px));
  max-height: calc(100dvh - 52px);
  padding: 0;
  margin: auto;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--overlay);
  color: var(--text);
  box-shadow: var(--shadow);
}
.dialog::backdrop { background: var(--scrim); backdrop-filter: blur(3px); }
.dialog__head { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.dialog__head h2 { flex: 1; font-family: var(--font-head); font-size: 17px; letter-spacing: 0.04em; }
.dialog__body { display: flex; flex-direction: column; gap: 14px; padding: 16px; overflow-y: auto; max-height: min(68vh, 560px); }
.dialog__foot { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--line); }

/* yes/no confirmation, opened from [data-confirm] submit buttons */
.dialog--sm { width: min(430px, calc(100vw - 32px)); }
.dialog--confirm .dialog__body { padding: 18px 16px 4px; font-size: 14px; line-height: 1.55; color: var(--text-dim); }
.dialog--confirm .dialog__foot { border-top: 0; padding: 12px 16px 16px; }
.dialog--confirm .dialog__foot .btn { min-width: 96px; }
.backuplist { display: flex; flex-direction: column; }
.backuprow { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 11px 0; border-bottom: 1px solid var(--line-soft); }
.backuprow:last-child { border-bottom: 0; }
.backuprow__info { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1 1 210px; }
.backuprow__info strong { font-family: var(--font-mono); font-size: 11.5px; overflow-wrap: anywhere; }
.backuprow__info span { font-size: 11.5px; color: var(--dim); }
.backuprow__actions { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.backuprow__actions form { margin: 0; }
.note { font-size: 12.5px; color: var(--muted); line-height: 1.5; }
.note--warn { color: var(--amber); }
.note code { font-family: var(--font-mono); font-size: 11.5px; color: var(--text-dim); overflow-wrap: anywhere; }

/* ── audience tags + inline select ──────────────────────────────── */
.tag--friends { color: var(--neon-2); border-color: rgba(var(--neon-2-rgb), 0.35); background: rgba(var(--neon-2-rgb), 0.08); }
.meetup__hidden { color: var(--dim); }
.meetup__faces { display: flex; align-items: center; gap: -4px; margin-top: 4px; }
.meetup__face { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; border: 2px solid var(--panel); margin-left: -6px; background: var(--panel-3); }
.meetup__face:first-child { margin-left: 0; }
.meetup__face-more { margin-left: 4px; font-size: 10.5px; color: var(--dim); font-family: var(--font-mono); }

.selectbare { display: inline-flex; align-items: center; gap: 6px; }
.selectbare select {
  width: auto;
  height: 30px;
  padding: 0 24px 0 10px;
  border-radius: 999px;
  border-color: var(--line);
  background-color: rgba(var(--veil), 0.05);
  background-position: right 8px center;
  color: var(--text);
  font-family: var(--font-head);
  font-size: 11px;
  line-height: 1.5;
  letter-spacing: 0.04em;
  cursor: pointer;
}

/* ── floating chat box ──────────────────────────────────────────── */
.chatdock {
  /* --kb is how much of the bottom the phone keyboard covers, --vvh the
     height that is really visible. Both come from the visual viewport. */
  --kb: 0px;
  --vvh: 100vh;
  position: fixed;
  right: 16px;
  bottom: calc(16px + var(--kb));
  z-index: 80;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  pointer-events: none;
  transition: bottom 0.18s var(--ease);
}
.chatdock > * { pointer-events: auto; }
.chatdock__launcher {
  position: relative;
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--on-accent);
  background: linear-gradient(140deg, var(--neon), var(--accent-c));
  box-shadow: 0 10px 30px -8px rgba(var(--neon-rgb), 0.7), inset 0 1px 0 rgba(var(--veil), 0.35);
}
.chatdock__launcher .pip { position: absolute; top: -3px; right: -3px; }
.chatdock__panel {
  width: 340px;
  max-width: calc(100vw - 24px);
  height: 460px;
  max-height: min(560px, calc(var(--vvh) - 110px));
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--overlay);
  box-shadow: var(--shadow);
}
/* On a desktop the dock is the chat, so it gets a proper panel. */
@media (min-width: 861px) {
  .chatdock { right: 24px; bottom: calc(24px + var(--kb)); }
  .chatdock__panel {
    width: 400px;
    height: min(72vh, 640px);
    max-height: min(72vh, 640px);
    border-radius: 18px;
  }
  .chatdock__messages { padding: 14px; gap: 12px; }
  .chatdock__row { padding: 10px; }
  .chatdock__avatar { width: 38px; height: 38px; }
  .chatdock__launcher { width: 56px; height: 56px; }
}
.chatdock.is-min .chatdock__panel { height: auto; }
.chatdock.is-min .chatdock__body, .chatdock.is-min .chatdock__foot { display: none; }
.chatdock__head { display: flex; align-items: center; gap: 4px; padding: 7px 9px; border-bottom: 1px solid var(--line-soft); }
/* The little picture of somebody who wrote while another chat was open. */
.chatdock__switch { position: relative; display: flex; align-items: center; }
.chatdock__switch-btn {
  position: relative;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  line-height: 0;
}
.chatdock__switch-btn .chatdock__avatar { width: 26px; height: 26px; }
.chatdock__switch-btn::after {
  content: '';
  position: absolute;
  top: -1px;
  right: -1px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--danger);
  border: 2px solid var(--overlay);
}
.chatdock__switch-btn:hover .chatdock__avatar { box-shadow: 0 0 0 2px rgba(var(--neon-rgb), 0.5); }
.chatdock__title { flex: 1; min-width: 0; font-family: var(--font-head); font-size: 12.5px; letter-spacing: 0.06em; text-transform: uppercase; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; background: none; border: 0; padding: 0; color: inherit; text-align: left; cursor: pointer; }
.chatdock__title:hover { color: var(--neon); }
.chatdock__mi, .chatdock__mx { display: grid; place-items: center; }
.chatdock__headbtns { display: flex; gap: 2px; }
.chatdock__body { flex: 1; min-height: 0; display: flex; }
.chatdock__list {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.chatdock__row { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px; border-radius: 10px; text-align: left; color: var(--text-dim); background: var(--panel-2, rgba(255,255,255,0.03)); min-height: 50px; touch-action: pan-y; }
.chatdock__rowwrap { position: relative; overflow: hidden; border-radius: 10px; width: 100%; background: transparent; margin-bottom: 2px; min-height: 50px; }
.chatdock__row:hover { background: rgba(var(--veil), 0.05); }
.chatdock__row.is-unread { background: rgba(var(--neon-2-rgb), 0.05); }
.chatdock__avatar { width: 34px; height: 34px; border-radius: 50%; flex: 0 0 auto; object-fit: cover; background: var(--panel-3); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.chatdock__avatar--gen { display: grid; place-items: center; font-family: var(--font-head); font-size: 14px; color: var(--neon); border: 1px solid var(--line-soft); border-radius: 50%; }
.chatdock__rowtext { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.chatdock__rowtop { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.chatdock__rowtop strong { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chatdock__rowtop time { flex: 0 0 auto; font-family: var(--font-mono); font-size: 9.5px; color: var(--dim); }
.chatdock__preview { font-size: 11.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chatdock__hint { padding: 16px 10px; font-size: 12.5px; }
.chatdock__thread { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.chatdock__messages {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.chatdock__composer { display: flex; gap: 6px; padding: 8px; border-top: 1px solid var(--line-soft); }
.chatdock__composer input[type="text"] { flex: 1; padding: 8px 14px; font-size: 13px; }
.chatdock__foot { padding: 8px 12px; border-top: 1px solid var(--line-soft); text-align: center; font-size: 12px; }
.chatdock__foot a { display: inline-flex; align-items: center; gap: 6px; color: var(--neon); }
.chatdock__error { margin: 0 10px 8px; font-size: 12px; color: var(--danger-soft); }

.chatdock__mention-panel {
  position: absolute;
  bottom: calc(100% + 4px);
  left: 0;
  right: 0;
  background: var(--overlay);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
  max-height: 240px;
  overflow-y: auto;
  z-index: 50;
  padding: 4px;
}
.chatdock__mention-panel.visible { display: block; }
.chatdock__mention-panel[hidden] { display: none !important; }
.chatdock__mention-avatar { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; }

/* The @mention picker, shared by the comment box and the chat box. */
.mentionbox {
  position: absolute;
  bottom: calc(100% + 6px);
  left: 0;
  right: 0;
  background: var(--overlay);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
  max-height: 240px;
  overflow-y: auto;
  z-index: 60;
  padding: 4px;
}
.mentionbox[hidden] { display: none !important; }
.mentionbox__item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 7px 9px;
  border: 0;
  border-radius: 9px;
  background: none;
  color: var(--text);
  font-size: 13px;
  text-align: left;
  cursor: pointer;
}
.mentionbox__item:hover { background: rgba(var(--veil), 0.06); }
.mentionbox__avatar { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; }
.mentionbox__name { font-weight: 600; }
.mentionbox__display { color: var(--muted); font-size: 12px; }
.chatdock.is-ping .chatdock__launcher { animation: dockping 1.4s var(--ease); }
@keyframes dockping {
  0%, 100% { transform: scale(1); }
  30% { transform: scale(1.16); }
  60% { transform: scale(0.95); }
}

@media (max-width: 860px) {
  .chatdock { right: 16px; bottom: calc(16px + var(--kb)); }
  /* On a phone the sheet is tall, so it has to shrink further when the
     keyboard is up - the visible height is what is left of the screen. */
  .chatdock__panel { width: calc(100vw - 24px); height: min(64vh, 480px); max-height: calc(var(--vvh) - 30px); }
  .chatdock.is-keyboard .chatdock__foot { display: none; }
}

/* ── motion preferences ─────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ══════════════════════════════════════════════════════════════════
   SERVICES - the parts marketplace and the maintenance directory.
   ══════════════════════════════════════════════════════════════════ */

/* ── section switch (Parts <-> Maintenance) ─────────────────────── */
.srvswitch {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  margin: 0 0 18px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--panel);
  position: relative;
  z-index: 10;
}
.srvswitch__tab {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 16px;
  border-radius: 9px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color 0.15s var(--ease), background 0.15s var(--ease);
}
.srvswitch__tab:hover { color: var(--text); background: rgba(var(--veil), 0.04); }
.srvswitch__tab.is-active {
  color: var(--on-accent);
  background: linear-gradient(135deg, var(--neon), var(--neon-deep));
  box-shadow: 0 0 20px -6px rgba(var(--neon-rgb), 0.7);
}

/* Add vehicle tab - icon only, same size as tabs */
.srvswitch__tab--add {
  padding: 8px 12px;
  gap: 0;
}
.srvswitch__tab--add svg { width: 15px; height: 15px; }
.srvswitch__tab--add:hover { background: rgba(var(--veil), 0.04); }
.srvswitch__tab--add:focus-visible { outline: 2px solid var(--neon); outline-offset: 2px; }

/* The numbers under the services tabs. */
.srvsummary {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin: -4px 0 22px;
  color: var(--muted);
  font-size: 12.5px;
}
.srvsummary__item { display: inline-flex; align-items: center; gap: 7px; }
.srvsummary__item .icon { color: var(--neon); }
.srvsummary__item strong { color: var(--text); font-family: var(--font-mono); font-size: 13px; }

/* ── category filter chips ──────────────────────────────────────── */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; }
a.chip { transition: color 0.14s var(--ease), border-color 0.14s var(--ease), background 0.14s var(--ease); }
a.chip:hover { color: var(--text); border-color: var(--line); background: rgba(var(--veil), 0.07); }
a.chip.is-active {
  color: var(--neon);
  border-color: rgba(var(--neon-rgb), 0.42);
  background: rgba(var(--neon-rgb), 0.1);
}
.chip__n { font-family: var(--font-mono); font-size: 10px; color: var(--dim); }
a.chip.is-active .chip__n { color: var(--neon); }

/* ── hub ────────────────────────────────────────────────────────── */
.srvhub { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.srvhub__card {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 24px;
}
.srvhub__card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(420px 220px at 112% -20%, rgba(var(--neon-rgb), 0.13), transparent 70%);
  pointer-events: none;
}
.srvhub__card:nth-child(2)::after {
  background: radial-gradient(420px 220px at 112% -20%, rgba(var(--amber-rgb), 0.14), transparent 70%);
}
.srvhub__icon {
  display: inline-grid;
  place-items: center;
  width: 52px;
  height: 52px;
  margin-bottom: 8px;
  border-radius: 15px;
  border: 1px solid rgba(var(--neon-rgb), 0.26);
  background: rgba(var(--neon-rgb), 0.09);
  color: var(--neon);
}
.srvhub__card:nth-child(2) .srvhub__icon {
  border-color: rgba(var(--amber-rgb), 0.3);
  background: rgba(var(--amber-rgb), 0.09);
  color: var(--amber);
}
.srvhub__title {
  font-family: var(--font-head);
  font-size: 25px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1;
}
.srvhub__stat {
  margin: 6px 0 16px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--text-dim);
}
.srvhub__stat strong { color: var(--text); }
.srvhub__card .btn { align-self: flex-start; margin-top: auto; }

/* ── cards ──────────────────────────────────────────────────────── */
.srvcard { display: flex; flex-direction: column; overflow: hidden; padding: 0; }
.srvcard__media {
  position: relative;
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--bg);
}
.srvcard__media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.4s var(--ease); }
.srvcard:hover .srvcard__media img { transform: scale(1.04); }
.srvcard__gen {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: hsl(var(--h, 190) 90% 76%);
  background:
    radial-gradient(circle at 30% 8%, hsl(var(--h, 190) 80% 28% / 0.9), transparent 68%),
    linear-gradient(140deg, hsl(var(--h, 190) 45% 13%), var(--inset));
}
.srvcard__cat {
  position: absolute;
  left: 10px;
  top: 10px;
  border-color: rgba(var(--veil), 0.14);
  background: rgba(var(--panel-scrim), 0.78);
  backdrop-filter: blur(8px);
  color: var(--text-dim);
}
.srvcard__sold {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(var(--panel-scrim), 0.6);
  font-family: var(--font-head);
  font-size: 22px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--danger);
}
.srvcard__count {
  position: absolute;
  right: 10px;
  bottom: 10px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 99px;
  background: rgba(var(--panel-scrim), 0.78);
  font-size: 11px;
  color: var(--text-dim);
}
.srvcard__body { display: flex; flex-direction: column; gap: 8px; padding: 14px; flex: 1; }
.srvcard__title {
  font-family: var(--font-head);
  font-size: 17px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  line-height: 1.25;
}
.srvcard__title:hover { color: var(--neon); }
.srvcard__price { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.srvcard__price strong { font-family: var(--font-head); font-size: 20px; letter-spacing: 0.02em; color: var(--neon-3); }
.srvcard__rating { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.srvcard__meta { display: flex; flex-direction: column; gap: 3px; font-size: 12px; }
.srvcard__meta span { display: inline-flex; align-items: center; gap: 6px; }
.srvcard__meta svg { flex: 0 0 auto; }
.srvcard__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid var(--line-soft);
}
.srvcard__seller { display: inline-flex; align-items: center; gap: 8px; min-width: 0; font-size: 12px; }
.srvcard--sold .srvcard__title { color: var(--muted); }

/* ── stars + badges ─────────────────────────────────────────────── */
.stars { display: inline-flex; gap: 1px; }
.stars svg { flex: 0 0 auto; }
.star--on { color: var(--amber); fill: var(--amber); }
.star--off { color: var(--line); }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 600;
}
.badge--provider {
  align-self: flex-start;
  color: var(--amber);
  border: 1px solid rgba(var(--amber-rgb), 0.35);
  background: rgba(var(--amber-rgb), 0.09);
}

.tag--cat { color: var(--text-dim); }
.tag--sold { color: var(--danger-soft); border-color: rgba(var(--danger-rgb), 0.4); background: rgba(var(--danger-rgb), 0.12); }

/* ── detail hero ────────────────────────────────────────────────── */
.srvhero { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); padding: 0; overflow: hidden; }
.srvhero__media { border-right: 1px solid var(--line-soft); background: var(--bg); min-width: 0; }
.srvhero__media .gallery { padding: 0; }
.srvhero__media .gallery__stage { border: 0; border-radius: 0; }
.srvhero__media .gallery__slide img { max-height: 60vh; }
.srvhero__side { display: flex; flex-direction: column; gap: 14px; padding: 22px; min-width: 0; }
.srvhero__tags { display: flex; flex-wrap: wrap; gap: 8px; }
.srvhero__title { font-size: clamp(24px, 3vw, 34px); line-height: 1.08; }
.srvhero__price { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.srvhero__price strong { font-family: var(--font-head); font-size: 32px; letter-spacing: 0.02em; color: var(--neon-3); }
.srvhero__rating { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 13px; }
.srvhero__meta { display: flex; flex-wrap: wrap; gap: 14px; font-size: 12.5px; }
.srvhero__meta span { display: inline-flex; align-items: center; gap: 6px; }
.srvhero__actions { display: flex; flex-direction: column; gap: 8px; }
.srvhero__manage {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--line-soft);
}
.srvhero__gen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 260px;
  background:
    radial-gradient(circle at 32% 10%, hsl(var(--h, 190) 80% 26% / 0.9), transparent 66%),
    linear-gradient(140deg, hsl(var(--h, 190) 45% 12%), var(--inset));
}
.srvhero__genmark { display: grid; place-items: center; color: hsl(var(--h, 190) 90% 76% / 0.55); }

.seller {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid var(--line-soft);
  background: rgba(var(--veil), 0.02);
}
.seller:hover { border-color: var(--line); background: rgba(var(--veil), 0.045); }
.seller__id { display: flex; flex-direction: column; line-height: 1.35; font-size: 12.5px; min-width: 0; }

/* ── reviews ────────────────────────────────────────────────────── */
.reviews__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.reviews__summary { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; }
.reviewform {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-bottom: 18px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--line-soft);
}
.rateinput { display: inline-flex; flex-direction: row-reverse; justify-content: flex-end; gap: 2px; }
.rateinput__radio { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.rateinput__star { color: var(--line); cursor: pointer; transition: transform 0.12s var(--ease), color 0.12s var(--ease); }
.rateinput__star:hover { transform: scale(1.14); }
.rateinput__star:hover,
.rateinput__star:hover ~ .rateinput__star,
.rateinput__radio:checked ~ .rateinput__star { color: var(--amber); fill: var(--amber); }
.reviewlist { display: flex; flex-direction: column; gap: 16px; list-style: none; padding: 0; margin: 0; }
.review { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 14px; }
.review__who { display: flex; align-items: center; gap: 9px; min-width: 0; }
.review__id { display: flex; flex-direction: column; line-height: 1.35; font-size: 12.5px; min-width: 0; }
.review__body { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.review__body p { font-size: 13.5px; color: var(--text-dim); line-height: 1.6; }

/* ── responsive ─────────────────────────────────────────────────── */
@media (max-width: 980px) {
  .srvhero { grid-template-columns: 1fr; }
  .srvhero__media { border-right: 0; border-bottom: 1px solid var(--line-soft); }
}
@media (max-width: 760px) {
  .srvhub { grid-template-columns: 1fr; }
  .review { grid-template-columns: 1fr; gap: 8px; }
}
@media (max-width: 860px) {
  /* seven bottom-nav tabs - keep the longer labels from spilling out */
  .bottomnav__link { font-size: 9px; letter-spacing: 0.02em; gap: 2px; }
  .bottomnav__link > span:not(.pip) {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: center;
  }
}


/* ── theme picker (Settings) ────────────────────────────────────── */
.themegrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin: 4px 0 16px;
}
.themecard {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--panel-2);
  transition: border-color 0.16s var(--ease), transform 0.16s var(--ease);
}
.themecard:hover { border-color: var(--line-strong); transform: translateY(-1px); }
.themecard.is-active { border-color: var(--neon); box-shadow: var(--glow); }
.themecard__swatch {
  display: block;
  height: 56px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--sw-bg);
  position: relative;
  overflow: hidden;
}
.themecard__swatch::after {
  content: '';
  position: absolute;
  left: 12px;
  bottom: 12px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--sw-accent);
  box-shadow: 0 0 16px var(--sw-accent);
}
.themecard__swatch--street {
  --sw-bg: linear-gradient(150deg, #101420, #07080b 72%);
  --sw-accent: #1fe0ff;
}
.themecard__swatch--gold {
  --sw-bg: linear-gradient(150deg, #1c160c, #0a0806 72%);
  --sw-accent: #f2c14e;
}
.themecard__swatch--underground {
  --sw-bg: linear-gradient(150deg, #2a0b12, #060506 72%);
  --sw-accent: #ff3b4d;
}
.themecard__swatch--light {
  --sw-bg: linear-gradient(150deg, #ffffff, #ece5d3 72%);
  --sw-accent: #b8860b;
}
.themecard__meta { display: flex; flex-direction: column; gap: 2px; }
.themecard__meta strong {
  font-family: var(--font-head);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-size: 14px;
}
.themecard__meta small { font-size: 12px; line-height: 1.35; }
.themecard__check {
  position: absolute;
  top: 10px;
  right: 10px;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--neon);
  color: var(--on-accent);
}

/* ── currency picker ────────────────────────────────────────────── */
/* The small converted-from figure under a price. */
.money__alt { font-size: 12px; font-weight: 500; color: var(--muted); }
.currencyswitch .langswitch__opt { min-width: 26px; font-size: 12px; }
.curcard__swatch {
  display: grid;
  place-items: center;
  height: 56px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: rgba(var(--veil), 0.04);
  font-family: var(--font-head);
  font-size: 26px;
  line-height: 1;
  color: var(--neon-3);
}
.curcard__swatch--usd { color: var(--neon); }

/* ── service claims ─────────────────────────────────────────────── */
.claim-list { display: flex; flex-direction: column; gap: 14px; }
.claim-card { padding: 18px; }
.claim-card__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.claim-card__message { padding: 10px 14px; border: 1px dashed var(--line); border-radius: 8px; background: rgba(var(--veil), 0.04); margin-bottom: 10px; }
.claim-card__actions { display: flex; gap: 10px; justify-content: flex-end; }

/* Verified badge */
.badge--verified { background: rgba(var(--ok-rgb), 0.12); color: var(--ok-soft); border-color: rgba(var(--ok-rgb), 0.3); }
.srvcard--verified { border-color: rgba(var(--ok-rgb), 0.3); }
.srvcard__verified { position: absolute; top: 8px; right: 8px; z-index: 2; font-size: 11px; padding: 3px 8px; border-radius: 99px; }

/* Claim button */
.btn--claim { background: rgba(var(--neon-rgb), 0.08); color: var(--neon); border-color: rgba(var(--neon-rgb), 0.3); }
.btn--claim:hover { background: rgba(var(--neon-rgb), 0.15); }
.cards--partners { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 24px; }
.partner-card { padding: 24px; display: flex; flex-direction: column; align-items: center; text-align: center; }
.partner-card__link { display: flex; flex-direction: column; align-items: center; gap: 10px; text-decoration: none; }
.partner-card__logo { max-width: 100%; max-height: 90px; width: auto; height: auto; object-fit: contain; background: transparent !important; filter: grayscale(1); transition: filter 0.2s; display: block; }
.partner-card__link:hover .partner-card__logo { filter: grayscale(0); }
.partner-card__name { font-family: var(--font-head); font-size: 14px; color: var(--text); }
.partner-card:hover { border-color: var(--neon-3); box-shadow: 0 0 0 1px var(--neon-3); }
.partner-card img { background: transparent !important; }

/* Public partner wall.
   Every logo sits in the same slot - the same height, the same border,
   centred - so the wall looks the same with three partners or with
   ten. A banner simply takes two columns. */
.partnerwall { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; padding: 10px 0 6px; }
.partnerwall__card {
  display: flex; flex-direction: column; gap: 12px;
  min-width: 0;
  padding: 14px 14px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}
.partnerwall__card:hover {
  border-color: var(--neon);
  box-shadow: 0 0 0 1px var(--neon), 0 12px 32px rgba(var(--neon-rgb), 0.14);
  transform: translateY(-3px);
}
/* The slot: one size for everybody. */
.partnerwall__frame {
  display: flex; align-items: center; justify-content: center;
  min-width: 0;
  height: 224px;
  padding: 16px;
  border-radius: var(--radius-sm);
  background:
    radial-gradient(circle at 50% 0%, rgba(var(--neon-rgb), 0.10), transparent 70%),
    var(--inset);
  overflow: hidden;
}
/* The logo keeps its own proportions and wears a small border. */
.partnerwall__logo {
  max-width: 100%; max-height: 100%;
  min-width: 0;
  width: auto; height: auto;
  object-fit: contain;
  padding: 6px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  opacity: 0.94;
  transition: opacity 0.25s, transform 0.25s;
}
.partnerwall__card:hover .partnerwall__logo { opacity: 1; transform: scale(1.03); }
/* A logo drawn on white paper needs a dark hairline, not a light one. */
.partnerwall__card--light .partnerwall__logo { border-color: rgba(0, 0, 0, 0.22); }
.partnerwall__card--dark .partnerwall__logo { border-color: rgba(255, 255, 255, 0.14); }

/* A banner takes two columns and sits next to its name. */
.partnerwall__card--wide { grid-column: span 2; flex-direction: row; align-items: center; gap: 20px; }
.partnerwall__card--wide .partnerwall__frame { flex: 1 1 auto; height: 120px; padding: 12px; }
.partnerwall__card--wide .partnerwall__logo { width: auto; max-height: 100%; }
.partnerwall__card--wide .partnerwall__name { flex: 0 0 auto; }

.partnerwall__name {
  display: flex; align-items: center; gap: 8px;
  margin: 0; padding: 0 2px;
  font-family: var(--font-head);
  font-size: 13px; letter-spacing: 0.09em; text-transform: uppercase;
  color: var(--muted);
  transition: color 0.2s;
}
.partnerwall__name svg { flex: 0 0 auto; opacity: 0.55; transition: color 0.2s, opacity 0.2s; }
.partnerwall__card:hover .partnerwall__name { color: var(--text); }
.partnerwall__card:hover .partnerwall__name svg { color: var(--neon); opacity: 1; }

@media (max-width: 760px) {
  .partnerwall { grid-template-columns: 1fr; gap: 14px; }
  .partnerwall__frame { height: 190px; }
  .partnerwall__card--wide { grid-column: span 1; flex-direction: column; align-items: stretch; gap: 12px; }
  .partnerwall__card--wide .partnerwall__frame { height: 108px; }
}

@media (max-width: 420px) {
  .partnerwall__frame { height: 168px; }
  .partnerwall__card--wide .partnerwall__frame { height: 92px; }
}

/* Admin partner list: horizontal rows with drag + delete */
.partneradmin { display: flex; flex-direction: column; gap: 8px; }
.partneradmin__item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  transition: border-color 0.15s, background 0.15s;
}
.partneradmin__item:hover { border-color: var(--neon); background: rgba(var(--neon-rgb), 0.03); }
.partneradmin__drag { cursor: grab; color: var(--dim); flex: 0 0 auto; }
.partneradmin__drag:hover { color: var(--neon); }
.partneradmin__drag:active { cursor: grabbing; }
.partneradmin__logo { width: 44px; height: 44px; object-fit: contain; border-radius: 6px; background: transparent; flex: 0 0 auto; }
.partneradmin__name { flex: 0 0 auto; font-size: 13px; font-weight: 500; color: var(--text); min-width: 80px; }
.partneradmin__url { flex: 1 1 auto; font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.partneradmin__item .btn--danger { flex: 0 0 auto; margin-left: auto; }
.sortable-ghost { opacity: 0.2; background: var(--neon-3-rgb) !important; }

@media (max-width: 620px) {
  /* A banner logo needs a wider preview, and the row must not push the
     delete button past the card edge on a phone. */
  .partneradmin__item {
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px 12px;
  }
  .partneradmin__logo { width: 60px; height: 40px; }
  .partneradmin__name {
    flex: 1 1 90px;
    min-width: 0;
    white-space: normal;
    overflow-wrap: anywhere;
  }
  .partneradmin__url { display: none; }
  .partneradmin__edit { margin-left: auto; }
}

/* ── iOS: no zoom when a field is focused ───────────────────────── */
/* Safari zooms the whole page in when a field with a font under 16px
   is focused, and the zoom cannot be switched off without taking
   pinch-to-zoom away from the user. So on a phone every field the
   driver types into keeps a 16px font - the size at which Safari
   leaves the page alone. The padding is trimmed a little so the
   fields keep the height they had. */
@media (max-width: 860px) {
  input[type="text"], input[type="email"], input[type="password"], input[type="search"],
  input[type="number"], input[type="tel"], input[type="url"], input[type="datetime-local"],
  input[type="date"], input[type="time"], select, textarea {
    font-size: 16px;
  }
  input[type="text"], input[type="email"], input[type="password"], input[type="search"],
  input[type="number"], input[type="tel"], input[type="url"] {
    padding: 8px 16px;
    line-height: 22px;
  }
  .comments__form input { font-size: 16px; }
  .chatdock__composer input[type="text"] { font-size: 16px; }
  .chatdock__search-input { font-size: 16px; }
  .mapbox__input input, .mapbox__input input[type="text"] { font-size: 16px; }
  .composer textarea { font-size: 16px; }
  .searchbar input, .searchbar input[type="search"],
  .searchbig input, .searchbig input[type="search"] { font-size: 16px; }
  .form-grid input, .form-grid input[type="email"], .form-grid input[type="password"],
  .form-grid textarea, .form-grid select { font-size: 16px; }
  .trrow__input, .howsec__ka-input, .howblock textarea { font-size: 16px; }
  .odometer__input { font-size: 16px; }
  .inlineform input { font-size: 16px; }
  .custom-font-form input[type="text"] { font-size: 16px; }
}


/* ── the manual editor ──────────────────────────────────────────── */
.howeditor {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}
.howeditor__list { display: flex; flex-direction: column; gap: 12px; min-width: 0; }

.howart {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(var(--panel-scrim), 0.7);
  padding: 12px 14px 10px;
  transition: border-color 0.15s, opacity 0.15s, box-shadow 0.15s;
}
.howart:hover { border-color: var(--line-strong); }
.howart.is-dragging { opacity: 0.4; }
.howart--new {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 18px;
  border-style: dashed;
  background: none;
  color: var(--muted);
  font-family: var(--font-body);
  font-size: 13px;
  cursor: pointer;
}
.howart--new:hover { color: var(--neon); border-color: rgba(var(--neon-rgb), 0.4); }

.howart__head { display: flex; align-items: flex-start; gap: 10px; }
.howart__grip, .howline__grip {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 26px;
  height: 30px;
  border: 0;
  border-radius: 8px;
  background: rgba(var(--veil), 0.05);
  color: var(--dim);
  cursor: grab;
}
.howart__grip:hover, .howline__grip:hover { color: var(--neon); background: rgba(var(--neon-rgb), 0.1); }
.howart__grip:active, .howline__grip:active { cursor: grabbing; }
.howart__titles { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.howart__en, .howart__ka {
  width: 100%;
  padding: 7px 10px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: var(--inset);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 13px;
}
.howart__en { font-family: var(--font-head); font-size: 14px; letter-spacing: 0.02em; }
.howart__ka { color: var(--text-dim); }
.howart__en:focus, .howart__ka:focus { border-color: rgba(var(--neon-rgb), 0.5); outline: none; }
.howart__acts { display: flex; align-items: center; gap: 2px; flex: 0 0 auto; }

.howart__blocks { display: flex; flex-direction: column; gap: 8px; margin: 12px 0 6px 36px; }
.howline {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 6px;
  border-radius: 10px;
  border: 1px solid transparent;
}
.howline:hover { background: rgba(var(--veil), 0.03); border-color: var(--line-soft); }
.howline.is-dragging { opacity: 0.35; }
.howline__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.howline__body textarea {
  width: 100%;
  resize: vertical;
  padding: 7px 10px;
  border-radius: 9px;
  border: 1px solid var(--line-soft);
  background: var(--inset);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 12.5px;
  line-height: 1.45;
}
.howline__body textarea:focus { border-color: rgba(var(--neon-rgb), 0.5); outline: none; }
.howline__body textarea[data-block-ka] { color: var(--text-dim); }
.howline__acts { display: flex; flex-direction: column; align-items: center; gap: 4px; flex: 0 0 auto; }
.howline__acts select {
  font-size: 11px;
  padding: 4px 6px;
  border-radius: 8px;
  border: 1px solid var(--line-soft);
  background: var(--inset);
  color: var(--text-dim);
}
.howart__foot { margin-left: 36px; padding-top: 4px; }

/* where a dragged article or line will land */
.is-drop-before { box-shadow: 0 -2px 0 0 var(--neon); }
.is-drop-after { box-shadow: 0 2px 0 0 var(--neon); }


@media (max-width: 900px) {
  .howeditor { grid-template-columns: 1fr; }
}

/* ── replies, reactions and attachments ── */

/* A mention inside a comment or a message. */
.mention { color: var(--neon); font-weight: 600; }
.mention:hover { text-decoration: underline; }

/* Reply to a comment. */
.comment__main { flex: 1; min-width: 0; }
.comment__acts { display: flex; gap: 8px; margin-top: 2px; }
.comment__reply {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border: 0;
  border-radius: 99px;
  background: none;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
}
.comment__reply:hover { color: var(--neon); background: rgba(var(--neon-rgb), 0.08); }
.comment__replyform {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  flex-wrap: wrap;
}
.comment__replyform[hidden] { display: none; }
.comment__replyform input[type="text"] {
  flex: 1;
  min-width: 0;
  border-radius: 99px;
  padding: 7px 13px;
  font-size: 12.5px;
}
.comment__replies { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.comment--reply { padding-left: 6px; border-left: 2px solid var(--line-soft); }
.comment--reply .comment__bubble { background: rgba(var(--veil), 0.03); }

/* The reactions on a comment. */
.comment__react {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border: 0;
  border-radius: 99px;
  background: none;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
}
.comment__react:hover { color: var(--neon); background: rgba(var(--neon-rgb), 0.08); }
.comment__reacts {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 4px;
}
.comment__reacts:empty { display: none; }

/* Editing a comment: the box takes the place of the text. */
.comment__edited, .post__edited { color: var(--dim); font-style: italic; }
.comment__editform {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 6px;
}
.comment__editform[hidden] { display: none; }
.comment__editform textarea {
  width: 100%;
  resize: vertical;
  min-height: 62px;
  padding: 8px 11px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--inset);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 13px;
  line-height: 1.5;
}
.comment__editform textarea:focus { border-color: rgba(var(--neon-rgb), 0.5); outline: none; }
.comment__editacts { display: flex; justify-content: flex-end; gap: 6px; }

/* Editing a post. */
.post__editform {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 12px 0 0 55px;
}
.post__editform[hidden] { display: none; }
.post__editform textarea {
  width: 100%;
  resize: vertical;
  min-height: 90px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--inset);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.55;
}
.post__editform textarea:focus { border-color: rgba(var(--neon-rgb), 0.5); outline: none; }
.post__editacts { display: flex; justify-content: flex-end; gap: 8px; }

/* Reactions on a chat message. */
.msg__reacts { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.msg__reacts:empty { display: none; }
.react {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 7px;
  border: 1px solid var(--line);
  border-radius: 99px;
  background: rgba(var(--veil), 0.04);
  color: var(--text-dim);
  font-size: 12px;
  cursor: pointer;
}
.react:hover { border-color: rgba(var(--neon-rgb), 0.5); }
.react.is-mine { border-color: var(--neon); background: rgba(var(--neon-rgb), 0.12); color: var(--text); }
.reactpicker {
  position: fixed;
  z-index: 120;
  display: flex;
  gap: 2px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 99px;
  background: var(--overlay);
  box-shadow: var(--shadow);
}
.reactpicker button {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: none;
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
}
.reactpicker button:hover { background: rgba(var(--veil), 0.1); transform: scale(1.15); }

/* Replying to a message. */
.msg__row { display: flex; align-items: center; gap: 10px; }
/* The time sits inside the bubble, at the bottom corner, so it never
   floats in the middle of the message. */
.msg__meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 3px;
  padding: 0 2px;
  justify-content: flex-start;
}
.msg--mine .msg__meta { justify-content: flex-end; }
.msg__time {
  font-size: 9.5px;
  line-height: 1.2;
  color: var(--muted);
  opacity: 0.7;
  transition: opacity 0.15s;
  white-space: nowrap;
}
.msg:hover .msg__time { opacity: 1; }

/* The small tools under a message. On a pointer they only take up room
   while the message is hovered; on a touch screen they are always
   there, because there is no hover to reveal them. */
.msg__tools {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: 2px;
}
.msg--mine .msg__tools { justify-content: flex-end; }
.msg__tool {
  border: 0;
  background: none;
  padding: 0;
  color: var(--dim);
  font-size: 10.5px;
  font-weight: 600;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.msg:hover .msg__tool, .msg__tool:focus-visible { opacity: 1; }
.msg__tool:hover { color: var(--neon); }
@media (hover: hover) and (pointer: fine) {
  .msg__tools { max-height: 0; overflow: hidden; opacity: 0; transition: max-height 0.18s var(--ease), opacity 0.18s; }
  .msg:hover .msg__tools, .msg:focus-within .msg__tools { max-height: 24px; opacity: 1; }
}

/* Editing a message you wrote. */
.msg__editform { display: flex; flex-direction: column; gap: 6px; margin-top: 4px; }
.msg__editform[hidden] { display: none; }
.msg__editform textarea {
  width: 100%;
  min-height: 3.4em;
  resize: vertical;
  font-family: var(--font-body);
  font-size: 13px;
  line-height: 1.45;
  color: var(--text);
  padding: 8px 11px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--inset);
}
.msg__editform textarea:focus { border-color: rgba(var(--neon-rgb), 0.5); outline: none; }
.msg__editacts { display: flex; gap: 6px; }

/* A green dot on somebody who is online right now. */
.msg__avatar.is-online { position: relative; }
.msg__avatar.is-online::after {
  content: '';
  position: absolute;
  right: -1px;
  bottom: -1px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #4ade80;
  border: 2px solid var(--overlay);
}
.chatdock__avatar.is-online { position: relative; box-shadow: 0 0 0 2px rgba(74, 222, 128, 0.55); }
.msg__quote {
  display: flex;
  gap: 6px;
  align-items: baseline;
  max-width: 260px;
  padding: 4px 9px;
  border-left: 2px solid rgba(var(--neon-rgb), 0.5);
  border-radius: 0 8px 8px 0;
  background: rgba(var(--veil), 0.04);
  font-size: 11.5px;
  color: var(--muted);
}
.msg__quote strong { color: var(--neon); flex: 0 0 auto; }
.msg__quote span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* A document sent in the chat. */
.msg__file {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 6px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(var(--veil), 0.04);
  color: var(--text);
  text-decoration: none;
}
.msg__file span { display: flex; flex-direction: column; min-width: 0; }
.msg__file strong { font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msg__file small { font-size: 10.5px; color: var(--dim); }

/* A thing handed over in the chat: a build, a post, a meetup, a part
   or a service. */
.msg__share {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(var(--veil), 0.04);
  color: var(--text);
  text-decoration: none;
  transition: border-color 0.15s, background 0.15s, transform 0.15s;
  max-width: 320px;
}
.msg__share:hover {
  border-color: rgba(var(--neon-rgb), 0.5);
  background: rgba(var(--neon-rgb), 0.07);
  transform: translateY(-1px);
}
.msg__share-img {
  width: 52px;
  height: 52px;
  flex: 0 0 auto;
  border-radius: 9px;
  object-fit: cover;
  background: var(--inset);
}
.msg__share-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.msg__share-kind {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--neon);
}
.msg__share-title {
  font-size: 13px;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.msg__share-text {
  font-size: 11px;
  color: var(--dim);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* A thing handed over in a group post: a build, a part, a service, etc. */
.post__share {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 12px 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(var(--veil), 0.04);
  color: var(--text);
  text-decoration: none;
  transition: border-color 0.15s, background 0.15s, transform 0.15s;
}
.post__share:hover {
  border-color: rgba(var(--neon-rgb), 0.5);
  background: rgba(var(--neon-rgb), 0.07);
  transform: translateY(-1px);
}
.post__share-media {
  width: 64px;
  height: 64px;
  flex: 0 0 auto;
  border-radius: 10px;
  object-fit: cover;
  background: var(--inset);
  overflow: hidden;
}
.post__share-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.post__share-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  flex: 1;
}
.post__share-type {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--neon);
}
.post__share-title {
  font-size: 14px;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.post__share-desc {
  font-size: 12px;
  color: var(--dim);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* The share picker: hand a thing to another driver. */
.sharebtn { flex: 0 0 auto; }
.sharepick__what {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 12px;
  margin-bottom: 14px;
  border: 1px solid rgba(var(--neon-rgb), 0.28);
  border-radius: 12px;
  background: rgba(var(--neon-rgb), 0.07);
}
.sharepick__icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  border-radius: 9px;
  background: rgba(var(--neon-rgb), 0.14);
  color: var(--neon);
}
.sharepick__whattext { display: flex; flex-direction: column; min-width: 0; }
.sharepick__whattext strong {
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sharepick__whattext small { font-size: 11px; }
.sharepick__list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-height: 300px;
  overflow-y: auto;
  margin: 0 -6px;
  padding: 0 6px;
}
.sharepick__row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 7px 8px;
  border: 0;
  border-radius: 10px;
  background: none;
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: background 0.12s;
}
.sharepick__row:hover { background: rgba(var(--neon-rgb), 0.09); }
.sharepick__row:disabled { opacity: 0.5; cursor: default; }
.sharepick__avatar {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  border-radius: 50%;
  object-fit: cover;
  background: var(--panel-3);
}
.sharepick__avatar--gen {
  display: grid;
  place-items: center;
  font-family: var(--font-head);
  font-weight: 700;
  color: hsl(var(--h, 190) 90% 78%);
  background: linear-gradient(140deg, hsl(var(--h, 190) 55% 15%), var(--panel));
}
.sharepick__rowtext { display: flex; flex-direction: column; min-width: 0; }
.sharepick__rowtext strong {
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sharepick__error {
  margin: 0 0 8px;
  padding: 8px 10px;
  border-radius: 9px;
  background: rgba(var(--red-rgb, 255, 90, 90), 0.12);
  color: var(--red, #ff8a8a);
  font-size: 12px;
}

/* ── the part search ───────────────────────────────────────────── */
.pspanel { display: flex; flex-direction: column; gap: 14px; }
.pspanel[hidden] { display: none; }
.pssteps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
}
.pssteps select {
  width: 100%;
  padding: 9px 11px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--inset);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 13px;
}
.pssteps select:disabled { opacity: 0.55; }
.pssteps select:focus { border-color: rgba(var(--neon-rgb), 0.5); outline: none; }
.psgroups { margin-top: 4px; }
.psgroups .chips { margin-top: 8px; }
.pstwin__note {
  flex: 1 1 100%;
  margin: 0;
  line-height: 1.45;
}
.psloading { padding: 18px 0; }
.pserror {
  margin: 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(var(--red-rgb, 255, 90, 90), 0.12);
  color: var(--red, #ff8a8a);
  font-size: 12.5px;
}
.psresults { display: flex; flex-direction: column; gap: 8px; }
.pspart {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
}
.pspart__img {
  width: 56px;
  height: 56px;
  flex: 0 0 auto;
  border-radius: 9px;
  object-fit: contain;
  background: #fff;
}
.pspart__body { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.pspart__brand { font-size: 13.5px; }
.pspart__number { font-family: var(--font-mono); font-size: 11.5px; color: var(--neon); }
.pspart__what { font-size: 12.5px; color: var(--text); }
.pspart__note { font-size: 11px; color: var(--dim); }
.pspart__foot { display: flex; align-items: center; gap: 12px; margin-top: 3px; }
.pspart__price { font-family: var(--font-mono); font-size: 13px; color: var(--text); }
.pspart__foot .link { font-size: 11.5px; }
.psvincard {
  padding: 14px 16px;
  border: 1px solid rgba(var(--neon-rgb), 0.3);
  border-radius: 14px;
  background: rgba(var(--neon-rgb), 0.06);
}
.psvincard__head { display: flex; flex-direction: column; gap: 2px; margin-bottom: 10px; }
.psvincard__head strong { font-size: 17px; }
.psvincard__list { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
.psvincard__row { display: flex; flex-direction: column; gap: 1px; }
.psvincard__row strong { font-size: 13px; }
.psvincard p { margin: 10px 0 0; }
/* A car the North American register only half knows: the model is chosen in the catalogue. */
.psvincard .psnote {
  padding: 8px 10px;
  border: 1px solid rgba(var(--neon-rgb), 0.22);
  border-radius: 10px;
  background: rgba(var(--neon-rgb), 0.07);
  color: var(--text);
  font-size: 12px;
  line-height: 1.45;
}

/* The cars of the driver, from the garage. */
.psgarage { display: flex; flex-direction: column; gap: 8px; }
.psgarage__car {
  display: flex;
  flex-direction: column;
  gap: 3px;
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, transform 0.15s;
}
.psgarage__car:hover {
  border-color: rgba(var(--neon-rgb), 0.45);
  background: rgba(var(--neon-rgb), 0.06);
  transform: translateY(-1px);
}
.psgarage__car strong { font-size: 14px; }
.psgarage__car span { font-family: var(--font-mono); font-size: 11px; }

/* The other places the same number can be looked up. */
.pssources { margin-top: 14px; }
.pssources__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 8px;
  margin-top: 8px;
}
.pssource {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(var(--veil), 0.03);
  color: var(--text);
  text-decoration: none;
  transition: border-color 0.15s, background 0.15s, transform 0.15s;
}
.pssource:hover {
  border-color: rgba(var(--neon-rgb), 0.45);
  background: rgba(var(--neon-rgb), 0.07);
  transform: translateY(-1px);
}
.pssource strong { font-size: 12.5px; }
.pssource span { font-size: 10.5px; color: var(--dim); line-height: 1.35; }
.pswarn {
  margin: 0 0 10px;
  padding: 9px 11px;
  border-radius: 10px;
  background: rgba(var(--amber-rgb, 255, 176, 46), 0.12);
  color: var(--amber, #ffb02e);
  font-size: 12px;
}

/* A page that is not here yet. */
.soon { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.soon .card__title { margin: 0; }
.soon p { max-width: 52ch; }
/* The same, but tucked into a corner of a card. */
.soon--small {
  text-align: left;
  align-items: flex-start;
  gap: 8px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line-soft);
}
.soon--small p { max-width: 60ch; margin: 0; }
.soon__badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 99px;
  background: rgba(var(--neon-rgb), 0.14);
  color: var(--neon);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ── the services pages on a phone ─────────────────────────────── */
@media (max-width: 620px) {
  /* The four sections should fill the full width on mobile.
     The bar stretches to the edges, tabs distribute evenly. */
  .srvswitch {
    display: flex;
    width: 100%;
    gap: 0;
    padding: 0;
    margin: 0 0 18px;
    border-radius: 10px;
    overflow: hidden;
  }
  .srvswitch__tab {
    flex: 1 1 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 8px;
    font-size: 11px;
    gap: 6px;
    border-radius: 0;
    border-right: 1px solid var(--line);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .srvswitch__tab:last-child { border-right: none; }
  .srvswitch__tab svg { width: 14px; height: 14px; flex-shrink: 0; }
  /* Garage now has only My Ride + the add button; keep the plus compact. */
  #toggle-add-vehicle { flex: 0 0 54px; }
  .srvswitch__tab.is-active {
    border-radius: 0;
    box-shadow: none;
    background: linear-gradient(135deg, var(--neon), var(--neon-deep));
  }

/* On a small phone - keep icons hidden for text tabs, adjust padding */
@media (max-width: 480px) {
  .srvswitch__tab { padding: 10px 6px; font-size: 10.5px; letter-spacing: 0.05em; }
  .srvswitch__tab:not(.srvswitch__tab--add) svg { display: none; }
  .srvswitch__tab--add {
    padding: 10px 8px;
    color: var(--neon);
    border: 1px solid rgba(var(--neon-rgb), 0.35);
    background: rgba(var(--neon-rgb), 0.1);
    border-radius: 0;
  }
  .srvswitch__tab--add svg { display: block; width: 16px; height: 16px; }
}

/* Allow srvswitch to reach edges on mobile by relaxing container max-width */
@media (max-width: 640px) {
  .single--narrow { max-width: 100%; }

  /* Pin drops / rows: keep the title on one line and the action
     button tall enough for Georgian copy, never squeezed. */
  .row { flex-wrap: nowrap; gap: 8px; padding: 11px 12px; }
  .row__id { flex: 1 1 0; min-width: 0; }
  .row__id > span:not(.avatar) { display: flex; align-items: baseline; gap: 4px; min-width: 0; flex: 1 1 auto; }
  .row__id strong { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .row__id .muted { flex: 0 1 auto; min-width: 0; max-width: 45%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .row > .btn { flex-shrink: 0; margin-left: auto; height: auto; min-height: 40px; min-width: 84px; padding: 8px 14px; font-size: 12px; white-space: nowrap; }

  /* Activity, search-post and pin-drop rows carry a sentence, not just a
     name. Let the sentence wrap instead of squeezing the author or time. */
  .row--stack { align-items: flex-start; }
  .row--stack .row__id { align-items: flex-start; }
  .row--stack .row__id > span:not(.avatar) {
    display: block;
    flex: 1 1 auto;
    min-width: 0;
    line-height: 1.45;
  }
  .row--stack .row__id strong,
  .row--stack .row__id .muted {
    display: inline;
    max-width: none;
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
  }
  /* Keep "2d ago" together; it may move to the next line, but not split. */
  .row--stack .row__id .muted { white-space: nowrap; }
}

  /* The numbers under the tabs. */
  .srvsummary { gap: 8px 14px; margin-bottom: 18px; }
  .srvsummary__item { font-size: 12px; }

  /* The pickers of a car go one under the other. */
  .pssteps { grid-template-columns: 1fr; gap: 10px; }
  .pssources__grid { grid-template-columns: 1fr; }
  .psvincard__list { grid-template-columns: 1fr 1fr; gap: 10px 12px; }
  .pspart { padding: 9px 10px; gap: 10px; }
  .pspart__img { width: 46px; height: 46px; }
  .psresult .pspart__title { font-size: 12.5px; }

  /* The search pill keeps room for the field. */
  .searchbig { padding: 0 5px 0 14px; height: 40px; }
  .searchbig .btn { padding: 0 11px; font-size: 11px; }
  .searchbig input { font-size: 13.5px; }

  /* The card of a car. */
  .psvincard { padding: 12px 13px; }
  .psvincard__head strong { font-size: 15.5px; }
  .soon--small .btn { width: 100%; }
}

/* The reply bar above the chat box. */
.chatdock__replybar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 10px;
  border-top: 1px solid var(--line-soft);
  background: rgba(var(--neon-rgb), 0.06);
  font-size: 11.5px;
  color: var(--neon);
}
.chatdock__replybar[hidden] { display: none; }

/* The file that is waiting to be sent. */
.chatdock__attachbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-top: 1px solid var(--line-soft);
  background: rgba(var(--amber-rgb), 0.08);
  color: var(--amber);
  font-size: 12px;
}
.chatdock__attachbar[hidden] { display: none; }
.chatdock__attach-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
}

/* The global channel stands out from the private chats. */
.chatdock__row--global {
  border: 1px solid rgba(var(--neon-rgb), 0.28);
  background: linear-gradient(135deg, rgba(var(--neon-rgb), 0.12), rgba(var(--neon-rgb), 0.04));
}
.chatdock__row--global:hover { background: linear-gradient(135deg, rgba(var(--neon-rgb), 0.2), rgba(var(--neon-rgb), 0.07)); }
.chatdock__row--global .chatdock__rowtop strong { color: var(--neon); }
/* .chatdock__rowwrap is defined above with flex display */
.chatdock__rowdelete {
  position: absolute; right: 0; top: 0; bottom: 0;
  width: 80px; display: flex; align-items: center; justify-content: center;
  background: var(--danger, #e53935); color: #fff; border: none;
  font-size: 12px; font-weight: 600; cursor: pointer; border-radius: 0 10px 10px 0;
  opacity: 0; pointer-events: none; transition: opacity 0.2s ease;
}
.chatdock__rowwrap.is-swiped .chatdock__rowdelete {
  opacity: 1; pointer-events: auto;
}
.chatdock__rowmute {
  position: absolute; left: 0; top: 0; bottom: 0;
  width: 80px; display: flex; align-items: center; justify-content: center;
  background: #f2c14e; color: #1a1206; border: none;
  font-size: 12px; font-weight: 700; cursor: pointer; border-radius: 10px 0 0 10px;
  opacity: 0; pointer-events: none; transition: opacity 0.2s ease;
}
.chatdock__rowwrap.is-muted-open .chatdock__rowmute {
  opacity: 1; pointer-events: auto;
}
.chatdock__row.is-muted { opacity: 0.8; }
.chatdock__muted {
  flex: 0 0 auto;
  padding: 1px 5px;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.chatdock__rowtop strong { flex: 1 1 auto; min-width: 0; }
.chatdock__avatar--globe {
  display: grid;
  place-items: center;
  color: var(--neon);
  background: rgba(var(--neon-rgb), 0.12);
  border: 1px solid rgba(var(--neon-rgb), 0.35);
  border-radius: 50%;
}

/* A string the site does not use any more. */
.trrow--unused .trrow__en { border-style: dashed; border-color: rgba(var(--amber-rgb), 0.3); }
.trrow__tag {
  display: inline-block;
  margin-left: 8px;
  padding: 1px 7px;
  border-radius: 99px;
  background: rgba(var(--amber-rgb), 0.14);
  color: var(--amber);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  vertical-align: middle;
}
.trrow__entext { overflow-wrap: anywhere; }

/* ── the icon library ───────────────────────────────────────────── */
.howart__iconbtn {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--inset);
  color: var(--text-dim);
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.howart__iconbtn:hover { color: var(--neon); border-color: rgba(var(--neon-rgb), 0.45); background: rgba(var(--neon-rgb), 0.07); }

.iconlib__label {
  margin: 0 0 8px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--dim);
}
.iconlib__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(46px, 1fr));
  gap: 6px;
  margin-bottom: 16px;
}
.iconlib__grid--used {
  grid-template-columns: repeat(auto-fill, minmax(46px, 1fr));
  padding: 8px;
  border: 1px solid rgba(var(--neon-rgb), 0.25);
  border-radius: 12px;
  background: rgba(var(--neon-rgb), 0.05);
}
.iconlib__btn {
  display: grid;
  place-items: center;
  height: 42px;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: rgba(var(--veil), 0.03);
  color: var(--text-dim);
  cursor: pointer;
  transition: color 0.12s, border-color 0.12s, background 0.12s, transform 0.12s;
}
.iconlib__btn:hover {
  color: var(--neon);
  border-color: rgba(var(--neon-rgb), 0.5);
  background: rgba(var(--neon-rgb), 0.1);
  transform: translateY(-1px);
}
.iconlib__btn.is-used { border-color: rgba(var(--neon-rgb), 0.35); color: var(--text); }
/* ---------- password recovery ---------- */
.auth__mail { display: flex; align-items: center; gap: 9px; margin: 0 0 16px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel-2); font-weight: 600; letter-spacing: .3px; word-break: break-all; }
.auth__mail svg { flex: 0 0 auto; color: var(--accent-a); }
.auth__forgot { margin: -2px 0 14px; text-align: right; font-size: 12.5px; }
.alert--info { border: 1px solid color-mix(in srgb, var(--accent-a) 34%, transparent); background: color-mix(in srgb, var(--accent-a) 8%, transparent); color: var(--text); }
/* ── admin: add a partner (the logo is all the admin has to give) ── */
.partneradd { display: flex; flex-direction: column; }
.pdz {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 7px; padding: 28px 20px; text-align: center;
  border: 1px dashed var(--line-strong); border-radius: var(--radius);
  background: rgba(var(--veil), 0.02);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}
.pdz:hover, .pdz.is-over { border-color: var(--neon); background: rgba(var(--neon-rgb), 0.05); }
.pdz input[type="file"] { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.pdz__icon { color: var(--neon); }
.pdz__title { font-family: var(--font-head); font-size: 14px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--text); }
.pdz__hint { font-size: 12px; color: var(--dim); }
.pdz__preview {
  display: flex; align-items: center; gap: 14px;
  margin-top: 14px; padding: 10px 12px;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--inset);
}
.pdz__preview[hidden] { display: none; }
.pdz__preview-img { width: 56px; height: 56px; object-fit: contain; border: 1px solid var(--line); border-radius: 8px; background: #0a0c11; flex: 0 0 auto; }
.pdz__preview-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1 1 auto; }
.pdz__preview-text strong { font-size: 14px; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pdz__note { display: flex; align-items: center; gap: 7px; margin: 14px 0 0; }
.pdz__note svg { color: var(--neon); flex: 0 0 auto; }
.partneradd .field--submit { margin-top: 16px; }

/* the row of an existing partner */
.partneradmin__url--none { font-style: italic; }
.partneradmin__edit { flex: 0 0 auto; }

/* the edit modal */
.partneredit { display: grid; grid-template-columns: 140px 1fr; gap: 20px; }
.partneredit__logo { width: 140px; height: 116px; object-fit: contain; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--inset); }
.partneredit__fields { display: flex; flex-direction: column; gap: 16px; }
.partneredit__fields .field > span { font-size: 13px; font-weight: 500; color: var(--text-dim); }

@media (max-width: 640px) {
  .partneredit { grid-template-columns: 1fr; }
  .partneredit__logo { width: 100%; height: 120px; }
}

/* Admin controls in groups - mobile responsive */
@media (max-width: 640px) {
  /* Stack the inline form (invite) vertically */
  .inlineform { flex-direction: column; gap: 8px; }
  .inlineform input { width: 100%; }
  .inlineform .btn { width: 100%; justify-content: center; }

  /* Fields in admin section stack properly */
  .field { width: 100%; }
  .field input,
  .field textarea,
  .field select { width: 100%; box-sizing: border-box; }

  /* Buttons in admin forms */
  .strip .btn--sm { width: 100%; justify-content: center; }
  .dangerrow .btn--sm { width: 100%; justify-content: center; }

  /* The pin-drops rows keep their title: the button sits beside the
     name and must not stretch to the full width. */
  .strip .row > .btn { width: auto; justify-content: center; }

  /* Row actions in pending requests */
  .row__actions { flex-direction: column; gap: 6px; width: 100%; }
  .row__actions form { width: 100%; }
  .row__actions .btn { width: 100%; justify-content: center; }

  /* Invited faces wrap */
  .faces--wrap { justify-content: flex-start; }
}

/* ── touge route card ───────────────────────────────────────────── */
.routecard { padding: 18px; display: flex; flex-direction: column; gap: 14px; }
.route__points { display: flex; gap: 16px; flex-wrap: wrap; }
.route__point { flex: 1; min-width: 140px; display: flex; flex-direction: column; gap: 6px; padding: 12px; border-radius: 10px; background: rgba(var(--veil), 0.03); border: 1px solid var(--line-soft); position: relative; }
.route__point--start { border-color: rgba(34, 197, 94, 0.4); }
.route__point--end { border-color: rgba(239, 68, 68, 0.4); }
.route__label { display: flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.route__point--start .route__label { color: #22c55e; }
.route__point--end .route__label { color: #ef4444; }
.route__name { font-size: 14px; font-weight: 500; color: var(--text); word-break: break-word; }
.route__length { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: var(--neon); padding: 10px 14px; border-radius: 99px; background: rgba(var(--neon-rgb), 0.1); border: 1px solid rgba(var(--neon-rgb), 0.25); width: fit-content; }

/* Touge category tag */
.tag--info { border-color: rgba(31, 224, 255, 0.4); background: rgba(31, 224, 255, 0.1); color: #1fe0ff; }

/* ── car badge for meetup attendees ────────────────────────────── */
.faces__text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.carbadge { display: inline-flex; align-items: center; gap: 4px; font-size: 10.5px; font-weight: 600; color: var(--text-dim); background: rgba(var(--veil), 0.06); border: 1px solid var(--line-soft); padding: 2px 8px; border-radius: 99px; white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.carbadge svg { flex-shrink: 0; color: var(--neon); }

/* ── touge route pins ───────────────────────────────────────────── */
.touge-pin { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 50%; font-size: 14px; font-weight: 800; color: #fff; box-shadow: 0 0 0 3px rgba(255,255,255,0.95), 0 0 0 6px rgba(0,0,0,0.4), 0 8px 24px -6px rgba(0,0,0,0.9); z-index: 10; position: relative; }
.touge-pin__inner { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 50%; font-size: 13px; font-weight: 800; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,0.5); transition: transform 0.15s ease; }
.touge-pin:hover .touge-pin__inner { transform: scale(1.08); }
.touge-pin--start .touge-pin__inner { background: linear-gradient(140deg, #22c55e, #16a34a); }
.touge-pin--finish .touge-pin__inner { background: linear-gradient(140deg, #ef4444, #dc2626); }
.touge-pin--start::before { content: ''; position: absolute; inset: -4px; border-radius: 50%; background: #22c55e; opacity: 0.4; animation: touge-pulse 2s ease-out infinite; }
.touge-pin--finish::before { content: ''; position: absolute; inset: -4px; border-radius: 50%; background: #ef4444; opacity: 0.4; animation: touge-pulse 2s ease-out infinite; }
@keyframes touge-pulse { 0% { transform: scale(1); opacity: 0.4; } 70% { transform: scale(1.5); opacity: 0; } 100% { transform: scale(1.5); opacity: 0; } }

/* ── touge picker + preview ─────────────────────────────────────── */
[data-touge-picker] .mapbox__map { height: 360px; border-radius: 12px; }
[data-touge-picker] .mapbox__actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; padding: 0 4px; }
[data-touge-picker] .mapbox__chosen { flex: 1; min-width: 200px; font-size: 12px; color: var(--text-dim); }
[data-touge-preview] { height: 320px; border-radius: 12px; }

/* ── mobile ─────────────────────────────────────────────────────── */
@media (max-width: 480px) {
  .route__points { flex-direction: column; }
  .route__point { min-width: 0; }
  .faces__text { gap: 3px; }
  .carbadge { font-size: 10px; padding: 1px 6px; }
  [data-touge-picker] .mapbox__map { height: 300px; }
  [data-touge-preview] { height: 260px; }
}

/* ── touge map overlays (length banner + elevation profile) ─────── */
.touge-map { position: relative; }
.touge-map .mapbox__map,
.touge-map .mapcard__map { border-radius: 12px; }
.touge-widgets {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  margin-top: 12px;
}
.touge-widgets .touge-names { width: 100%; }
.touge-widgets--overlay {
  position: absolute;
  left: 12px;
  bottom: 12px;
  z-index: 20;
  margin: 0;
  max-width: calc(100% - 90px);
  pointer-events: none;
}
.touge-banner {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 15px;
  border-radius: 99px;
  background: rgba(7, 17, 26, 0.82);
  border: 1px solid rgba(31, 224, 255, 0.5);
  color: #eafcff;
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  box-shadow: 0 8px 22px -8px rgba(0, 0, 0, 0.9);
  pointer-events: none;
  backdrop-filter: blur(4px);
}
.touge-banner strong { color: #1fe0ff; font-weight: 800; }
.touge-banner span { color: #bfe9f2; }
.touge-profile {
  margin-top: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--line-soft);
  background: rgba(var(--veil), 0.03);
}
.touge-profile svg { display: block; width: 100%; height: 80px; }
.touge-profile__labels {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 11px;
  color: var(--text-dim);
  margin-top: 4px;
}
@media (max-width: 480px) {
  .touge-banner { font-size: 11.5px; padding: 6px 11px; gap: 7px; }
  .touge-profile svg { height: 64px; }
}

/* ── touge map HUD: 3D preview + full screen ─────────────────────── */
.touge-hud {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 30;
}
.touge-hud__btn {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(7, 17, 26, 0.85);
  border: 1px solid rgba(31, 224, 255, 0.45);
  color: #1fe0ff;
  cursor: pointer;
  box-shadow: 0 6px 18px -6px rgba(0, 0, 0, 0.9);
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.touge-hud__btn:hover { background: rgba(31, 224, 255, 0.16); color: #eafcff; }
.touge-hud__btn.is-on { background: #1fe0ff; color: #07111a; border-color: #1fe0ff; }
.touge-hud__btn--compass .icon { transition: transform 0.2s ease; }

/* ── bottom banner: pin A / pin B street names ───────────────────── */
.touge-names {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
}
.touge-names__chip {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  width: 100%;
  max-width: 100%;
  padding: 11px 14px;
  border-radius: 12px;
  background: rgba(7, 17, 26, 0.86);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #eafcff;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.3;
  white-space: normal;
  box-shadow: 0 6px 18px -8px rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(4px);
}
.touge-names__chip strong { flex: none; font-size: 12px; font-weight: 800; }
.touge-names__chip > span { min-width: 0; overflow: visible; text-overflow: clip; white-space: normal; }
.touge-names__chip--a { border-color: rgba(34, 197, 94, 0.6); }
.touge-names__chip--a strong { color: #22c55e; }
.touge-names__chip--b { border-color: rgba(239, 68, 68, 0.6); }
.touge-names__chip--b strong { color: #ef4444; }

/* ── full screen map ─────────────────────────────────────────────── */
.touge-map:fullscreen {
  width: 100vw;
  height: 100vh;
  border-radius: 0;
  background: #07080b;
}
.touge-map:fullscreen .mapbox__map,
.touge-map:fullscreen .mapcard__map {
  height: 100vh;
  border-radius: 0;
}
.touge-map.is-fs-fallback {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
  border-radius: 0;
  background: #07080b;
}
.touge-map.is-fs-fallback .mapbox__map,
.touge-map.is-fs-fallback .mapcard__map {
  height: 100%;
  border-radius: 0;
}
body.touge-fs-lock { overflow: hidden; }

@media (max-width: 480px) {
  .touge-hud { right: 8px; gap: 6px; }
  .touge-hud__btn { width: 36px; height: 36px; }
  .touge-widgets { margin-top: 10px; gap: 6px; }
  .touge-widgets--overlay { left: 8px; bottom: 8px; max-width: calc(100% - 80px); }
  .touge-names__chip { font-size: 12px; padding: 9px 11px; max-width: 100%; }
}

/* ── expected weather under a meetup map ─────────────────────────── */
.meetupweather {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 12px 0;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--line-soft);
  background: rgba(var(--veil), 0.03);
}
.meetupweather__icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: none;
  border-radius: 10px;
  border: 1px solid rgba(31, 224, 255, 0.22);
  background: rgba(31, 224, 255, 0.07);
  font-size: 19px;
  line-height: 1;
}
.meetupweather__body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.meetupweather__temp { font-size: 14px; }
.meetupweather__desc { font-size: 12px; color: var(--text-dim); }
.meetupweather__note { margin-left: auto; font-size: 11px; text-align: right; }
@media (max-width: 480px) {
  .meetupweather { gap: 10px; padding: 10px 12px; }
  .meetupweather__icon { width: 34px; height: 34px; font-size: 17px; }
  .meetupweather__note { display: none; }
}

/* ── weather beside the route length, inside the map ─────────────── */
.touge-widgets .meetupweather--badge {
  margin: 0;
  padding: 7px 12px;
  border-radius: 99px;
  background: rgba(7, 17, 26, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: 0 8px 22px -8px rgba(0, 0, 0, 0.9);
  gap: 6px;
  backdrop-filter: blur(4px);
  pointer-events: none;
  white-space: nowrap;
}
.meetupweather--badge .meetupweather__icon {
  width: 22px;
  height: 22px;
  font-size: 14px;
  border: none;
  background: none;
}
.meetupweather--badge .meetupweather__body {
  flex-direction: row;
  align-items: baseline;
  gap: 6px;
}
.meetupweather--badge .meetupweather__temp { font-size: 12.5px; font-weight: 700; }
.meetupweather--badge .meetupweather__desc {
  font-size: 11px;
  white-space: nowrap;
  max-width: 170px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.meetupweather--badge .meetupweather__note { display: none; }

/* The strip below the map belongs to the categories without a route. */
form.is-touge .meetupweather--strip { display: none; }

@media (max-width: 480px) {
  .touge-widgets--overlay { max-width: calc(100% - 80px); gap: 6px; }
  .meetupweather--badge { padding: 6px 9px; }
  .meetupweather--badge .meetupweather__desc { display: none; }
}

/* Elements with a display rule must still hide when marked [hidden]. */
.meetupweather[hidden],
.touge-banner[hidden],
.touge-names[hidden],
.touge-profile[hidden],
.touge-hud[hidden] { display: none; }

/* ── pinned street-name banner on the location picker ───────────── */
.mapbox__mapwrap { position: relative; }
.mapbox__pinned {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  max-width: calc(100% - 24px);
  padding: 7px 14px;
  border-radius: 99px;
  background: rgba(7, 17, 26, 0.85);
  border: 1px solid rgba(31, 224, 255, 0.5);
  color: #eafcff;
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  box-shadow: 0 8px 22px -8px rgba(0, 0, 0, 0.9);
  pointer-events: none;
  backdrop-filter: blur(4px);
}
.mapbox__pinned[hidden] { display: none; }
@media (max-width: 480px) {
  .mapbox__pinned { top: 8px; max-width: calc(100% - 16px); font-size: 11.5px; padding: 6px 11px; }
}

/* ── friends + drivers: action buttons on a phone ───────────────── */
/* The admin block above stretches every .btn--sm inside .strip to the
   full width. Friend, message and chat actions must stay in a row. */
@media (max-width: 640px) {
  .strip .person__actions .btn--sm { width: auto; justify-content: center; }
  .person__actions { flex-wrap: nowrap; }
  .strip .driverlist .driverlist__msg { width: auto; justify-content: center; flex-shrink: 0; }
  .driverlist__row { flex-wrap: nowrap; }
  .driverlist__count { display: none; }
}
