/* ═══════════════════════════════════════════════════════════════════════════
   azforeigner design system — v2 (2026 redesign, see REDESIGN.md)
   Same class vocabulary as site.css (v1, HUD), new look: light warm ground,
   dark ink, one action colour, 16px body, no ambient effects. _Layout loads
   this file instead of site.css when DesignMode.IsV2. Page-level <style>
   blocks keep working because they read the same tokens.
   Admin pages (/Admin/**) keep their own inline styles.
   ═══════════════════════════════════════════════════════════════════════════ */

@import url("/fonts/inter.css");

/* ── tokens ─────────────────────────────────────────────────────────────── */
:root {
  --badge-blue: #1D9BF0;
  --badge-gold: #D4A017;
  color-scheme: light;
  --bg: #FBF8F3;
  --bg-2: #F5F1EA;
  --panel: #FFFFFF;
  --panel-2: #F7F4EE;
  --panel-3: #EFEAE1;
  --line: #EAE4DA;
  --line-2: #DCD5C9;
  --line-3: #C9C1B4;
  --text: #1D1B18;
  --muted: #4D4840;            /* 8.9:1 on white */
  --faint: #6B655B;            /* 5.8:1 on white — still body-legal */
  --accent: #0E7A62;           /* buttons; white text 5.3:1 */
  --accent-2: #0B6B55;         /* links 6.5:1 */
  --accent-3: #08513F;         /* hover */
  --accent-line: rgba(14,122,98,.35);
  --accent-glow: rgba(14,122,98,.20);
  --accent-soft: #E3F2EC;
  --hero: #0F3D36; --hero-ink: #D7E6DF; --gold: #F6C26B;
  --ok: #1F7A55;   --ok-line: rgba(31,122,85,.35);   --ok-soft: #E3F2EC;
  --warn: #8A5A00; --warn-line: rgba(183,121,31,.45); --warn-soft: #FDEFD6;
  --bad: #B42318;  --bad-line: rgba(180,35,24,.35);  --bad-soft: #FDECEA;
  --alert: #C23B22; --online: #22A06B;
  /* module hues are inks here (readable on light), with soft fills next to them */
  --blue: #24508F;   --blue-soft: #D8E4FA;
  --pink: #8C2A5E;   --pink-soft: #F7D6E4;
  --teal: #0F6B63;   --teal-soft: #D3EFEC;
  --amber: #8A5A00;  --amber-soft: #FDEFD6;
  --indigo: #4B3A8C; --indigo-soft: #E6E0F5;
  --green: #145C42;  --green-soft: #CFEBDD;
  --orange: #9A4A0A; --orange-soft: #FBE3CF;
  --sky: #1F5F8B;    --sky-soft: #D6EAF7;
  --orange: #9A4A12; --orange-soft: #FBE3D0;
  --violet: #5B3FA8; --violet-soft: #E9E2F8;
  --red: #B42318;    --red-soft: #FDECEA;
  --m: var(--accent-2);
  --display: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  --body: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  --mono: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;  /* v1 mono labels become plain text */
  --r: 18px; --r-sm: 12px; --r-xs: 999px;
  --shadow: 0 1px 2px rgba(60,40,10,.05);
  --shadow-lg: 0 1px 2px rgba(60,40,10,.06), 0 12px 32px rgba(60,40,10,.10);
  --card: var(--panel);
  --border: var(--line);
  /* Page-level styles read these with their v1 value as the fallback, e.g.
     font-size: var(--fs-11, 11px); text-transform: var(--tt-off, uppercase). v1 never defines
     them, so v1 renders exactly as before; v2 lifts tiny sizes and drops caps and tracking. */
  --fs-9: 12px; --fs-10: 12.5px; --fs-10-5: 13px; --fs-11: 13px; --fs-11-5: 13.5px;
  --fs-12: 14px; --fs-12-5: 14px; --fs-13: 15px; --fs-13-5: 15px;
  --tt-off: none; --ls-off: 0;
  /* solid surfaces for popovers and toasts */
  --solid: #FFFFFF; --input-bg: #FFFFFF; --toast-bg: #1D1B18; --toast-ink: #FFFFFF;
}

/* ── base ───────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { font-size: 16px; scroll-behavior: smooth; position: relative; min-height: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--body); font-size: 16px; line-height: 1.5; -webkit-font-smoothing: antialiased; overflow-x: hidden; display: flex; flex-direction: column; min-height: 100vh; }
body > .container { flex: 1; position: relative; z-index: 1; }
.container { overflow: visible !important; }
a { color: var(--accent-2); text-decoration: none; }
a:hover { color: var(--accent-3); }
img { max-width: 100%; }
h1, h2, h3, h4 { font-family: var(--display); letter-spacing: -.01em; line-height: 1.2; margin: 0; text-wrap: balance; color: var(--text); font-weight: 700; }
:focus-visible { outline: 3px solid #6FB8A4; outline-offset: 2px; border-radius: 6px; }
::selection { background: #CDE9DE; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 6px; border: 2px solid var(--bg); }

/* v1 ambient layers: never shown in v2 */
#bgfx, .bg-vignette, .bg-scan { display: none !important; }
.ground::before { display: none; }

/* ── navbar ─────────────────────────────────────────────────────────────── */
header { position: sticky; top: 0; z-index: 1040; }
nav.navbar { background: rgba(251,248,243,.94) !important; border-bottom: 1px solid var(--line) !important; backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); padding: 0; min-height: 64px; }
nav.navbar .navbar-brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text) !important; font-family: var(--display); font-weight: 800; font-size: 18px; letter-spacing: -.01em; text-transform: none; padding: 12px 0; }
nav.navbar .navbar-brand svg, nav.navbar .navbar-brand img { width: 30px; height: 30px; color: var(--hero); }
nav.navbar .nav-link, nav.navbar .nav-link.text-dark { position: relative; color: var(--muted) !important; font-size: 15px; font-weight: 500; padding: 10px 14px !important; border-radius: var(--r-sm); transition: background .15s, color .15s; }
nav.navbar .nav-link:hover, nav.navbar .nav-link:focus { color: var(--text) !important; background: var(--panel-3); }
nav.navbar .nav-link.active { color: var(--accent-3) !important; background: var(--accent-soft); font-weight: 600; }
nav.navbar .navbar-toggler { border: 1px solid var(--line-2); border-radius: var(--r-sm); padding: 8px 10px; }
nav.navbar .navbar-toggler-icon { background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='%231D1B18' stroke-linecap='round' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important; }
nav.navbar .navbar-toggler:focus { box-shadow: 0 0 0 3px var(--accent-glow); }
nav.navbar .dropdown-toggle::after { opacity: .6; margin-left: 6px; }
nav.navbar .dropdown-menu { background: #fff !important; border: 1px solid var(--line) !important; border-radius: 16px !important; padding: 6px !important; margin-top: 6px !important; box-shadow: var(--shadow-lg) !important; min-width: 240px; z-index: 1050 !important; }
nav.navbar .dropdown-item { display: flex !important; align-items: center; gap: 10px; color: var(--text) !important; background: transparent !important; border-radius: 10px !important; padding: 10px 12px !important; font-size: 15px !important; font-weight: 500 !important; transition: background .15s; }
nav.navbar .dropdown-item .ic { width: 18px; height: 18px; color: var(--accent-2); }
nav.navbar .dropdown-item:hover, nav.navbar .dropdown-item:focus { background: var(--panel-2) !important; }
nav.navbar .dropdown-item:active { background: var(--accent-soft) !important; color: var(--text) !important; }
nav.navbar .dropdown-divider { border-color: var(--line) !important; margin: 6px 0; }
nav.navbar .dropdown-header { font-family: var(--body); color: var(--faint) !important; font-size: 13px; font-weight: 600; text-transform: none; letter-spacing: 0; padding: 8px 12px 4px; }
.nav-icon { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border: 1px solid var(--line-2); border-radius: var(--r-sm); color: var(--muted); background: #fff; transition: color .15s, border-color .15s; }
.nav-icon:hover { color: var(--text); border-color: var(--line-3); }
.nav-icon svg { width: 20px; height: 20px; }
.nav-badge { position: absolute; top: -6px; right: -6px; background: var(--alert); color: #fff; font-family: var(--body); font-size: 11px; font-weight: 700; min-width: 20px; height: 20px; border-radius: 999px; display: none; align-items: center; justify-content: center; padding: 0 5px; line-height: 1; box-shadow: 0 0 0 2px var(--bg); }
.nav-badge[data-count]:not([data-count="0"]) { display: inline-flex; }
.nav-user { display: inline-flex !important; align-items: center; gap: 8px; border: 1px solid var(--line-2); border-radius: 999px; padding: 4px 12px 4px 4px !important; background: #fff; }
.nav-user:hover { background: var(--panel-2) !important; }
.nav-avatar { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; border: 0; flex-shrink: 0; background: var(--panel-3); }
.nav-pill-badge { background: var(--alert); color: #fff; font-size: 11px; font-weight: 700; min-width: 20px; height: 20px; border-radius: 999px; display: none; align-items: center; justify-content: center; padding: 0 6px; line-height: 1; }
.nav-pill-badge[data-count]:not([data-count="0"]) { display: inline-flex; }
@media (max-width: 991px) {
  nav.navbar { backdrop-filter: none; -webkit-backdrop-filter: none; background: var(--bg) !important; }
  body:has(.navbar-collapse.show) { overflow: hidden; }
  body:has(.navbar-collapse.show)::after { content: ""; position: fixed; inset: 0; background: rgba(20,18,14,.45); z-index: 1039; }
  nav.navbar .navbar-collapse, nav.navbar .navbar-collapse.collapsing { display: flex !important; flex-direction: column; position: fixed; top: 0; right: 0; bottom: 0; width: min(86vw, 360px); height: auto !important; margin: 0; padding: 0 0 calc(16px + env(safe-area-inset-bottom, 0px)); overflow: hidden; background: #fff; border-left: 1px solid var(--line); box-shadow: -24px 0 48px rgba(20,18,14,.18); z-index: 1041; transform: translateX(104%); visibility: hidden; transition: transform .28s cubic-bezier(.2,.8,.2,1), visibility 0s linear .28s; }
  nav.navbar .navbar-collapse.show { transform: none; visibility: visible; transition: transform .28s cubic-bezier(.2,.8,.2,1), visibility 0s; }
  nav.navbar .navbar-collapse.collapsing { transition: none; }
  nav.navbar .navbar-collapse::before { content: "Menyu"; display: flex; align-items: center; height: 64px; padding: 0 20px; font-family: var(--body); font-size: 18px; font-weight: 700; color: var(--text); border-bottom: 1px solid var(--line); flex-shrink: 0; }
  nav.navbar .drawer-close { position: absolute; top: 10px; right: 12px; width: 44px; height: 44px; display: grid; place-items: center; border: 1px solid var(--line-2); border-radius: var(--r-sm); background: #fff; color: var(--muted); cursor: pointer; }
  nav.navbar .drawer-close svg { width: 18px; height: 18px; }
  nav.navbar .navbar-nav { gap: 0; padding: 6px 0; }
  nav.navbar .navbar-nav:first-of-type { flex: 1 1 auto; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
  nav.navbar .nav-item > .nav-link { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 0 20px !important; font-size: 16px; font-weight: 600; color: var(--text) !important; border-radius: 0; background: transparent; }
  nav.navbar .nav-item > .nav-link.active { color: var(--accent-3) !important; background: var(--accent-soft); box-shadow: inset 4px 0 0 var(--accent); }
  nav.navbar .nav-item.dropdown > .nav-link { justify-content: space-between; }
  nav.navbar .nav-item.dropdown > .nav-link::after { margin: 0; transition: transform .2s; }
  nav.navbar .nav-item.dropdown > .nav-link.show::after { transform: rotate(180deg); }
  nav.navbar .dropdown-menu { display: block !important; position: static; float: none; width: 100%; min-width: 0; margin: 0 !important; padding: 0 !important; max-height: 0; overflow: hidden; background: var(--bg) !important; border: 0 !important; border-radius: 0 !important; box-shadow: none !important; transition: max-height .3s cubic-bezier(.2,.8,.2,1), padding .3s; }
  nav.navbar .dropdown-menu.show { max-height: 720px; padding: 4px 0 8px !important; }
  nav.navbar .dropdown-header { padding: 10px 20px 4px !important; }
  nav.navbar .dropdown-divider { margin: 4px 20px !important; }
  nav.navbar .dropdown-item { min-height: 48px; padding: 0 20px 0 32px !important; border-radius: 0 !important; font-size: 15px !important; }
  nav.navbar .navbar-nav + .navbar-nav { flex-shrink: 0; margin-top: 0; padding: 12px 20px 0; border-top: 1px solid var(--line); background: #fff; }
  nav.navbar .navbar-nav + .navbar-nav > .nav-item > .nav-link { padding: 0 !important; }
  nav.navbar .nav-user { border: 0; gap: 10px; padding: 4px 0 !important; }
  nav.navbar .navbar-nav + .navbar-nav .dropdown-menu { background: transparent !important; }
  nav.navbar .navbar-nav + .navbar-nav .dropdown-menu.show { padding: 0 0 4px !important; }
  nav.navbar .navbar-nav + .navbar-nav .dropdown-item { padding-left: 46px !important; }
  nav.navbar .navbar-nav + .navbar-nav .dropdown-menu form .dropdown-item { color: var(--bad) !important; }
  nav.navbar .navbar-nav + .navbar-nav > .nav-item > .nav-link:not(.dropdown-toggle) { justify-content: center; min-height: 48px; margin-bottom: 8px; border: 1px solid var(--line-2); border-radius: var(--r-sm); font-size: 16px; }
  nav.navbar .navbar-nav + .navbar-nav > .nav-item > .btn { width: 100%; --h: 48px; font-size: 16px; }
}

/* status strip under the nav (home page) — v2 home does not use it */
.strip { display: none; }

/* ── footer ─────────────────────────────────────────────────────────────── */
footer.footer { position: relative; z-index: 1; background: transparent; border-top: 1px solid var(--line) !important; padding: 24px 0 40px; font-size: 14px; }
footer.footer, footer.footer a { color: var(--faint) !important; }
footer.footer a:hover { color: var(--text) !important; }
footer.footer .container { display: flex; justify-content: space-between; align-items: center; gap: 12px 24px; flex-wrap: wrap; }
footer.footer .footer-links { display: flex; flex-wrap: wrap; gap: 4px 0; }
footer.footer .footer-links a { padding: 6px 12px; border-left: 1px solid var(--line-2); line-height: 1; }
footer.footer .footer-links a:first-child { border-left: 0; padding-left: 0; }
@media (max-width: 600px) {
  footer.footer { text-align: center; }
  footer.footer .container { flex-direction: column; align-items: center; }
  footer.footer .footer-links { justify-content: center; }
}

/* WhatsApp contact button */
.wa-fab { position: fixed; bottom: 24px; right: 24px; z-index: 9999; display: flex; align-items: center; gap: 10px; background: #1F8F4E; color: #fff; border-radius: 999px; padding: 12px 18px 12px 14px; box-shadow: var(--shadow-lg); text-decoration: none; font-size: 15px; font-weight: 600; white-space: nowrap; max-width: calc(100vw - 48px); }
.wa-fab:hover { color: #fff; background: #187A42; }
.wa-fab-icon { font-size: 18px; flex-shrink: 0; }
.wa-fab-text { overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 480px) { .wa-fab { padding: 14px; } .wa-fab-text { display: none; } }

.admin-badge { display: inline-flex; align-items: center; gap: 3px; background: var(--warn-soft); color: var(--warn); font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; vertical-align: middle; white-space: nowrap; }

/* ═══════════════════════════════════════════════════════════════════════════
   PRIMITIVES
   ═══════════════════════════════════════════════════════════════════════════ */

/* layout */
.wrap { max-width: 1140px; margin: 0 auto; padding: 28px 0 80px; }
.wrap-narrow { max-width: 820px; }
.wrap-xnarrow { max-width: 640px; }
.page-body { max-width: 1140px; margin: 0 auto; padding: 0 0 80px; }

/* eyebrow + headings: sentence case, no mono */
.eyebrow { font-family: var(--body); font-size: 14px; font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--m); display: inline-flex; align-items: center; gap: 8px; }
.eyebrow::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; flex-shrink: 0; }
.crumbs { font-size: 14px; color: var(--faint); margin-bottom: 6px; }
.crumbs a { color: var(--faint); }
.crumbs a:hover { color: var(--text); }

.page-head, .pg-header { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; padding: 4px 0 24px; margin-bottom: 24px; border-bottom: 1px solid var(--line); background: none; border-radius: 0; }
.pg-header .hdr-row { display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 16px; width: 100%; }
.page-head h1, .page-head h2, .pg-header h1, .pg-header h2 { font-size: clamp(28px, 4vw, 38px); font-weight: 800; text-transform: none; margin: 8px 0 0; color: var(--text); letter-spacing: -.02em; line-height: 1.12; }
.page-head p, .pg-header p { color: var(--muted); margin: 8px 0 0; max-width: 62ch; font-size: 17px; }
.page-head.center, .pg-header.center { flex-direction: column; align-items: center; text-align: center; }
.page-head.center p, .pg-header.center p { margin-inline: auto; }

.section-head, .section-label, .section-hdr { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin: 40px 0 16px; padding-bottom: 0; border-bottom: 0; font-family: var(--display); font-size: 22px; font-weight: 700; text-transform: none; color: var(--text); letter-spacing: -.01em; }
.section-head h2, .section-head h3 { font-size: inherit; font-weight: inherit; }
.section-head .idx, .section-label .idx { font-size: 14px; color: var(--faint); font-weight: 500; text-transform: none; letter-spacing: 0; }
.sec-title { font-family: var(--body); font-size: 18px; font-weight: 700; letter-spacing: 0; text-transform: none; color: var(--text); margin-bottom: 14px; padding-bottom: 0; border-bottom: 0; }

.link, .see-all, .card-link-text { font-family: var(--body); font-size: 15px; font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--accent-2); display: inline-flex; align-items: center; gap: 6px; }
.link:hover, .see-all:hover { color: var(--accent-3); }
.see-all { margin-top: 14px; }
.back-link, .back-btn { display: inline-flex; align-items: center; gap: 6px; font-family: var(--body); font-size: 15px; font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--accent-2); margin-bottom: 14px; min-height: 40px; }
.back-link:hover, .back-btn:hover { color: var(--accent-3); }

/* panel */
.panel, .card { position: relative; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; box-shadow: var(--shadow); transition: border-color .2s, box-shadow .2s; overflow: visible; color: var(--text); }
:where(a).panel, :where(a).card, .panel.hover, .card.hover, .card.lift { display: block; color: inherit; }
:where(a).panel:hover, :where(a).card:hover, .panel.hover:hover, .card.hover:hover, .card.lift:hover { border-color: var(--line-2); box-shadow: var(--shadow-lg); color: inherit; transform: none; }
/* the HUD corner brackets are not part of v2 */
.bracket::before, .bracket::after, .bracket > i.b::before, .bracket > i.b::after { display: none !important; }
.panel.lit { border-color: var(--line-2); }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.panel-head h3 { font-size: 18px; text-transform: none; font-weight: 700; margin-top: 6px; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 900px) { .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }

.card-title { font-family: var(--body); font-size: 17px; font-weight: 700; color: var(--text); margin: 0 0 6px; line-height: 1.35; }
.card-title a { color: inherit; }
.card-desc, .card-text { font-size: 15px; color: var(--muted); line-height: 1.55; }
.card-meta { font-size: 14px; color: var(--faint); display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 10px; letter-spacing: 0; }
.owner-row { display: flex; align-items: center; gap: 8px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.owner-av { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; border: 0; background: var(--panel-3); }
.owner-name { font-size: 14px; color: var(--muted); font-weight: 500; }
.kv { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 16px; font-size: 14px; color: var(--faint); padding: 12px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); letter-spacing: 0; }
.kv b { color: var(--text); font-weight: 600; display: block; font-variant-numeric: tabular-nums; font-family: var(--body); font-size: 15px; }
.cover { width: 100%; aspect-ratio: 16/9; object-fit: cover; border-radius: 14px; border: 0; background: var(--panel-3); display: block; }
.thumb { width: 44px; height: 44px; border-radius: 12px; object-fit: cover; flex-shrink: 0; background: var(--panel-3); border: 0; display: flex; align-items: center; justify-content: center; font-size: 16px; color: var(--muted); }
.row-item { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); color: inherit; }
.row-item:first-of-type { border-top: 0; }
.row-item:hover { color: inherit; }
.row-item:hover .row-name { color: var(--accent-2); }
.row-thumb { width: 40px; height: 40px; border-radius: 12px; object-fit: cover; flex-shrink: 0; background: var(--panel-3); border: 0; display: flex; align-items: center; justify-content: center; font-size: 15px; }
.row-info { flex: 1; min-width: 0; }
.row-name { font-size: 16px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: color .15s; }
.row-meta { font-size: 14px; color: var(--faint); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; letter-spacing: 0; }
.row-right { font-size: 14px; color: var(--muted); flex-shrink: 0; font-variant-numeric: tabular-nums; }
.empty-cell { color: var(--faint); font-size: 15px; padding: 8px 0; margin: 0; }

/* tags / chips / badges: soft pills */
.tag { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--c, var(--m)); }
.tag::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--c, var(--m)); flex-shrink: 0; }
.chip, .badge, .status-active, .mini-badge, .cat-badge, .type-badge, .cat-pill { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border: 0; border-radius: 999px; font-family: var(--body); font-size: 13px; font-weight: 600; color: var(--muted); background: var(--panel-3); letter-spacing: 0; white-space: nowrap; line-height: 1; }
.chip.ok, .status-active, .badge.ok, .mb-offering { color: var(--ok); background: var(--ok-soft); }
.chip.warn, .badge.warn, .mb-seeking { color: var(--warn); background: var(--warn-soft); }
.chip.bad, .badge.bad { color: var(--bad); background: var(--bad-soft); }
.chip.acc, .badge.acc { color: var(--accent-3); background: var(--accent-soft); }
.chip.m, .badge.m { color: var(--m); background: color-mix(in srgb, var(--m) 12%, #fff); }
.cat-blue { color: var(--blue); background: var(--blue-soft); }
.cat-green { color: var(--green); background: var(--green-soft); }
.cat-purple, .cat-violet { color: var(--violet); background: var(--violet-soft); }
.cat-amber, .cat-yellow { color: var(--amber); background: var(--amber-soft); }
.cat-teal { color: var(--teal); background: var(--teal-soft); }
.cat-pink { color: var(--pink); background: var(--pink-soft); }
.cat-sky, .cat-cyan { color: var(--sky); background: var(--sky-soft); }
.cat-indigo { color: var(--indigo); background: var(--indigo-soft); }
.cat-red { color: var(--red); background: var(--red-soft); }
.cat-orange { color: var(--orange); background: var(--orange-soft); }
.cat-gray { color: var(--muted); background: var(--panel-3); }

/* buttons: 44px+, radius 12, one action colour */
.btn, .btn-submit, .btn-auth, .create-btn, .search-btn, .clear-btn, .btn-primary-hero, .btn-ghost-hero, .read-btn, .voice-cta, .card-link, .btn-admin-del, .btn-admin-ban {
  --h: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: var(--h); height: auto; padding: 0 18px; border-radius: var(--r-sm); border: 1px solid transparent; font-family: var(--body); font-weight: 600; font-size: 15px; letter-spacing: 0; line-height: 1.2; cursor: pointer; position: relative; text-decoration: none; white-space: nowrap; transition: background .15s, border-color .15s, color .15s, transform .1s; box-shadow: none; }
.btn svg { width: 18px; height: 18px; }
.btn:hover, .btn:focus { text-decoration: none; }
.btn:active { transform: scale(.98); }
.btn-primary, .btn-submit, .btn-auth, .create-btn, .btn-primary-hero, .read-btn, .voice-cta { background: var(--accent); color: #fff !important; border-color: var(--accent); }
.btn-primary:hover, .btn-submit:hover, .btn-auth:hover, .create-btn:hover, .btn-primary-hero:hover, .read-btn:hover, .voice-cta:hover, .btn-primary:focus { background: #0B634F; border-color: #0B634F; color: #fff !important; box-shadow: none; }
.btn-primary:active, .btn-submit:active { background: #09503F; }
.btn-ghost, .btn-outline-primary, .btn-ghost-hero, .clear-btn, .card-link { background: #fff; color: var(--text) !important; border-color: var(--line-2); }
.btn-ghost:hover, .btn-outline-primary:hover, .btn-ghost-hero:hover, .clear-btn:hover, .card-link:hover { background: var(--panel-2); border-color: var(--line-3); color: var(--text) !important; }
.btn-quiet, .btn-secondary, .btn-light, .search-btn { background: var(--panel-3); color: var(--text) !important; border-color: transparent; }
.btn-quiet:hover, .btn-secondary:hover, .btn-light:hover, .search-btn:hover { background: #E6E0D5; color: var(--text) !important; }
.btn-danger, .btn-outline-danger, .btn-admin-del { background: #fff; color: var(--bad) !important; border-color: var(--bad-line); }
.btn-danger:hover, .btn-outline-danger:hover, .btn-admin-del:hover { background: var(--bad-soft); color: var(--bad) !important; border-color: var(--bad); }
.btn-warn, .btn-admin-ban { background: #fff; color: var(--warn) !important; border-color: var(--warn-line); }
.btn-warn:hover, .btn-admin-ban:hover { background: var(--warn-soft); }
.btn-ok, .btn-success { background: var(--ok-soft); color: var(--ok) !important; border-color: transparent; }
.btn-ok:hover, .btn-success:hover { background: #D2EBDF; }
.btn-link { background: none; border: 0; color: var(--accent-2) !important; padding: 0; min-height: 0; height: auto; }
.btn-sm, .btn-admin-del, .btn-admin-ban { --h: 38px; padding: 0 14px; font-size: 14px; }
.btn-xs { --h: 30px; padding: 0 10px; font-size: 13px; }
.btn-lg { --h: 52px; padding: 0 24px; font-size: 16px; }
.btn-block, .btn-submit, .btn-auth { width: 100%; }
.btn[disabled], .btn:disabled, .btn.disabled, .btn-submit:disabled, .btn-auth:disabled { opacity: .5; cursor: not-allowed; pointer-events: none; }
.btn-admin-del, .btn-admin-ban { width: 100%; margin-top: 6px; }
.btn:focus-visible, .form-control:focus, .form-check-input:focus { box-shadow: 0 0 0 3px var(--accent-glow); }
.btn-spinner, .spinner { display: inline-block; width: 16px; height: 16px; border: 2px solid rgba(255,255,255,.45); border-top-color: #fff; border-radius: 50%; animation: btn-spin .6s linear infinite; vertical-align: -3px; }
.btn-ghost .btn-spinner, .btn-quiet .btn-spinner { border-color: var(--line-2); border-top-color: var(--accent); }
@keyframes btn-spin { to { transform: rotate(360deg); } }

/* forms: labels above, 16px inputs (no iOS zoom), white fields */
.form-group { margin-bottom: 18px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.form-label, .label, label.form-label { display: block; font-family: var(--body); font-size: 15px; font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--text); margin-bottom: 6px; }
.form-label em, .label em { color: var(--bad); font-style: normal; }
.form-control, .input, .form-select, textarea.form-control, select.form-control,
input:not([type=checkbox]):not([type=radio]):not([type=submit]):not([type=button]):not([type=reset]):not([type=range]):not([type=file]).form-control {
  display: block; width: 100%; height: 48px; padding: 0 14px; background: #fff !important; border: 1px solid var(--line-2) !important; border-radius: var(--r-sm) !important; color: var(--text) !important; font-family: var(--body); font-size: 16px; line-height: 46px; outline: none; box-shadow: none; transition: border-color .15s, box-shadow .15s; }
textarea.form-control, textarea.input { height: auto; min-height: 120px; padding: 12px 14px; line-height: 1.5; resize: vertical; }
.form-control::placeholder, .input::placeholder { color: #8A8377 !important; text-align: start; }
.form-control:hover, .input:hover { border-color: var(--line-3) !important; }
.form-control:focus, .input:focus, .form-select:focus { border-color: var(--accent) !important; box-shadow: 0 0 0 3px var(--accent-glow) !important; background: #fff !important; color: var(--text) !important; }
.form-control.input-validation-error, .input.err, .form-control.err { border-color: var(--bad) !important; }
.form-control-lg { height: 52px; line-height: 50px; font-size: 17px; }
select.form-control, .form-select, select.input { appearance: none; -webkit-appearance: none; padding-right: 36px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%234D4840' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important; background-repeat: no-repeat !important; background-position: right 14px center !important; }
select.form-control option, .form-select option { background: #fff; color: var(--text); }
input[type=file].form-control { padding: 10px 14px; line-height: 1.6; height: auto; color: var(--muted) !important; }
input[type=file]::file-selector-button { font: inherit; font-size: 14px; font-weight: 600; background: var(--panel-3); color: var(--text); border: 0; border-radius: 10px; padding: 6px 12px; margin-right: 12px; cursor: pointer; }
input:disabled, input[readonly], input[disabled], .form-control:disabled, .form-control[readonly] { color: var(--faint) !important; -webkit-text-fill-color: var(--faint) !important; opacity: 1 !important; background: var(--panel-2) !important; cursor: not-allowed; }
input[type=checkbox], input[type=radio], .form-check-input { width: 20px; height: 20px; accent-color: var(--accent); cursor: pointer; flex-shrink: 0; }
.form-check-input:checked { background-color: var(--accent); border-color: var(--accent); }
.form-check-label { color: var(--text); font-size: 15px; cursor: pointer; }
.help, .form-hint, .form-text { font-size: 14px; color: var(--faint); margin-top: 6px; display: block; }
.val-error, .err-msg, .text-danger, .field-validation-error { display: block; font-family: var(--body); font-size: 14px; font-weight: 500; color: var(--bad) !important; margin-top: 6px; letter-spacing: 0; }
.field-validation-valid { display: none; }
.val-summary, .validation-summary-errors { border: 1px solid var(--bad-line); background: var(--bad-soft); color: var(--bad); border-radius: var(--r-sm); padding: 14px 16px; margin-bottom: 18px; font-size: 15px; }
.validation-summary-errors ul { margin: 0; padding-left: 18px; }
.validation-summary-valid { display: none; }
.row2, .form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.row3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 600px) { .row2, .row3, .form-row-2 { grid-template-columns: 1fr; } }
.input-group { display: flex; gap: 8px; align-items: stretch; }
.input-group .form-control { flex: 1; }

/* location picker (city-picker.js hooks: keep class names) */
.loc-picker { position: relative; }
.loc-btn, .loc-btn.form-control { display: flex !important; justify-content: space-between; align-items: center; cursor: pointer; text-align: left !important; font-family: var(--body); }
.loc-btn:hover { border-color: var(--line-3) !important; }
.loc-btn.loc-hint { border-color: var(--warn) !important; box-shadow: 0 0 0 3px var(--warn-soft) !important; }
.loc-selected { flex: 1; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 16px; }
.loc-chevron { flex-shrink: 0; margin-left: 8px; font-size: 12px; color: var(--muted); }
.loc-panel { position: absolute; top: calc(100% + 6px); left: 0; right: 0; min-width: 240px; background: #fff; border: 1px solid var(--line); border-radius: 14px; z-index: 9999; overflow: hidden; box-shadow: var(--shadow-lg); padding: 0; }
.loc-search, .loc-search.form-control { display: block; width: 100%; box-sizing: border-box; border: none !important; border-bottom: 1px solid var(--line) !important; border-radius: 0 !important; box-shadow: none !important; margin: 0 !important; height: 48px; line-height: 48px; padding: 0 14px !important; font-family: var(--body); font-size: 16px !important; color: var(--text) !important; background: #fff !important; outline: none; }
.loc-search::placeholder { color: #8A8377 !important; }
.loc-search:focus, .loc-search.form-control:focus { border-bottom-color: var(--accent) !important; box-shadow: none !important; }
.loc-list { list-style: none; margin: 0; padding: 6px; max-height: 260px; overflow-y: auto; }
.loc-item, .loc-list li { padding: 10px 12px; font-size: 15px; color: var(--text); cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; outline: none; border-radius: 10px; }
.loc-item:hover, .loc-item:focus, .loc-list li:hover { background: var(--accent-soft); color: var(--accent-3); }
.loc-empty { padding: 12px; font-size: 14px; color: var(--faint); list-style: none; }
/* Phones: the picker often sits in a half-width column (country | city), and a 240px panel
   hung off the right-hand one ran past the screen and let the whole page scroll sideways.
   Here the panel spans the screen instead, just under the top bar. */
@media (max-width: 600px) {
  .loc-panel { position: fixed; top: 72px; left: 16px; right: 16px; min-width: 0; width: auto; }
  .loc-list { max-height: min(50vh, 320px); }
}

/* filter bar */
.fbar { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; padding: 16px; margin-bottom: 20px; background: #fff; border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); }
.fbar-sep { color: var(--faint); font-size: 16px; padding: 0 2px; height: 48px; display: flex; align-items: center; flex-shrink: 0; }
.fbar-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.fbar-picker { position: relative; flex: 1; min-width: 160px; max-width: 260px; }
.fbar .form-group { margin: 0; flex: 1; min-width: 160px; }
.fbar select, .fbar input[type=text], .fbar input[type=search] { min-width: 160px; }
.search-result-info, .result-info { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; color: var(--faint); letter-spacing: 0; text-transform: none; margin-bottom: 14px; }
@media (max-width: 600px) { .fbar-sep { display: none; } .fbar-picker { max-width: none; } }

/* pagination */
.pg-wrap, .pager { display: flex; justify-content: center; gap: 6px; margin: 32px 0 8px; flex-wrap: wrap; }
.pg-btn, .pager a { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; height: 44px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: var(--r-sm); background: #fff; font-size: 15px; font-weight: 600; color: var(--muted); transition: border-color .15s, color .15s; }
.pg-btn:hover, .pager a:hover { border-color: var(--line-3); color: var(--text); }
.pg-btn.active, .pager a.on { border-color: var(--accent); background: var(--accent); color: #fff; pointer-events: none; }
.pg-btn.disabled { opacity: .4; pointer-events: none; }
.pg-info { text-align: center; font-size: 14px; color: var(--faint); margin-top: 8px; }

/* alerts */
.alert, .success-bar, .error-bar, .info-bar, .warn-bar, .email-warning { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; font-size: 15px; margin-bottom: 18px; background: #fff; color: var(--text); line-height: 1.5; }
.alert-success, .success-bar { border-color: transparent; background: var(--ok-soft); color: #145C42; }
.alert-danger, .error-bar { border-color: transparent; background: var(--bad-soft); color: #8F1C13; }
.alert-warning, .warn-bar, .email-warning { border-color: transparent; background: var(--warn-soft); color: #6E4A0A; }
.alert-info, .info-bar { border-color: transparent; background: var(--accent-soft); color: var(--accent-3); }
.alert a, .email-warning a { color: inherit; text-decoration: underline; font-weight: 600; }
.alert strong { color: inherit; }

/* empty state: an invitation, not a shrug */
.empty, .empty-state { text-align: center; padding: 40px 20px; border: 1.5px dashed var(--line-2); border-radius: var(--r); color: var(--muted); background: transparent; }
.empty .big, .empty-state .big { font-size: 28px; margin-bottom: 8px; }
.empty svg, .empty-state svg { width: 36px; height: 36px; color: var(--accent-2); margin-bottom: 12px; }
.empty b, .empty-state b, .empty h3 { display: block; font-family: var(--display); font-size: 19px; text-transform: none; font-weight: 700; color: var(--text); }
.empty p, .empty-state p { color: var(--muted); margin: 6px auto 16px; font-size: 15px; max-width: 48ch; }
.empty p:last-child { margin-bottom: 0; }

/* toast */
.toast-hud { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 99999; display: flex; gap: 12px; align-items: center; padding: 12px 16px; background: var(--text); border: 0; border-radius: 14px; box-shadow: var(--shadow-lg); max-width: min(380px, calc(100vw - 32px)); color: #fff; text-decoration: none; animation: slideUp .25s ease; }
.toast-hud:hover { color: #fff; }
.toast-hud ._ti { width: 34px; height: 34px; border-radius: 10px; background: rgba(255,255,255,.12); border: 0; display: grid; place-items: center; font-size: 15px; flex-shrink: 0; color: #7EE2B8; }
.toast-hud ._tt { font-size: 15px; font-weight: 600; }
.toast-hud ._tb { font-size: 14px; color: rgba(255,255,255,.78); margin-top: 2px; }
@keyframes slideUp { from { opacity: 0; transform: translateX(-50%) translateY(12px); } to { opacity: 1; transform: translateX(-50%) translateY(0); } }

/* avatars */
.avatar, .av { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; border: 0; background: var(--panel-3); flex-shrink: 0; }
.avatar-lg { width: 80px; height: 80px; }
.avatar-xl { width: 104px; height: 104px; }
.av-fallback { display: inline-flex; align-items: center; justify-content: center; font-family: var(--body); font-size: 13px; font-weight: 600; color: var(--sand-ink, #6E3E0A); background: #F6D9B8; border: 0; border-radius: 50%; }

.stars, .rating { font-family: var(--body); font-size: 14px; font-weight: 600; color: #B7791F; letter-spacing: .02em; font-variant-numeric: tabular-nums; }

/* tables */
.table-hud { width: 100%; border-collapse: collapse; font-size: 15px; }
.table-hud th { font-size: 13px; font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--faint); text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line-2); }
.table-hud td { padding: 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table-hud tr:hover td { background: var(--panel-2); }

/* auth pages */
.auth-wrap { min-height: 74vh; display: flex; align-items: center; justify-content: center; padding: 32px 0 64px; }
.auth-card { width: 100%; max-width: 460px; background: #fff; border: 1px solid var(--line); border-radius: 24px; padding: 36px 32px; position: relative; box-shadow: var(--shadow-lg); }
.auth-icon { display: none; }
.auth-title { font-family: var(--display); font-size: 28px; font-weight: 800; text-transform: none; color: var(--text); text-align: center; margin: 0 0 6px; letter-spacing: -.02em; }
.auth-sub { font-size: 16px; color: var(--muted); text-align: center; margin: 0 0 28px; }
.auth-links { text-align: center; margin-top: 24px; display: flex; flex-direction: column; gap: 12px; }
.auth-links a { color: var(--muted); font-size: 15px; }
.auth-links a:hover { color: var(--accent-2); }
.auth-links .register-link { font-weight: 700; color: var(--accent-2); }
.remember-row { display: flex; align-items: center; gap: 10px; margin-bottom: 20px; }
.remember-row label { font-size: 15px; color: var(--text); cursor: pointer; margin: 0; user-select: none; }
@media (max-width: 480px) { .auth-card { padding: 28px 20px; border-radius: 20px; } }
/* third-party sign-in buttons */
.auth-divider { display: flex; align-items: center; gap: 12px; color: var(--faint); font-size: 14px; margin: 20px 0; }
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.btn-provider { width: 100%; background: #fff; color: var(--text) !important; border-color: var(--line-2); }
.btn-provider:hover { background: var(--panel-2); border-color: var(--line-3); }
.btn-provider.apple { background: #000; color: #fff !important; border-color: #000; }
.btn-provider.apple:hover { background: #222; }
.btn-provider svg { width: 20px; height: 20px; }

.brand-mark { position: relative; width: 72px; height: 72px; margin: 0 auto 16px; display: flex; align-items: center; justify-content: center; border-radius: 20px; background: var(--hero); }
.brand-mark img { width: 60%; }
.brand-ring { display: none; }

/* stat tiles */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.stat { padding: 16px; border: 1px solid var(--line); border-radius: 16px; background: #fff; }
.stat .k { font-size: 14px; font-weight: 500; letter-spacing: 0; text-transform: none; color: var(--faint); }
.stat .v { font-family: var(--display); font-size: 28px; font-weight: 800; font-variant-numeric: tabular-nums; margin-top: 4px; }

/* utilities */
.mono { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.ok { color: var(--ok); } .warn { color: var(--warn); } .bad { color: var(--bad); }
.text-m { color: var(--m); }
.hr { border: 0; border-top: 1px solid var(--line); margin: 18px 0; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.rowx { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.between { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.prose { max-width: 70ch; color: var(--muted); line-height: 1.7; font-size: 17px; }
.prose h2, .prose h3 { color: var(--text); font-size: 21px; text-transform: none; margin: 32px 0 10px; }
.prose p { margin: 0 0 16px; }
.prose ul { padding-left: 22px; }
.prose strong { color: var(--text); }
.text-lines { white-space: pre-line; }
.tabular { font-variant-numeric: tabular-nums; }
.text-muted { color: var(--muted) !important; }

@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.fade-up { animation: fadeUp .3s ease both; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }

.ic { width: 1.15em; height: 1.15em; vertical-align: -.2em; flex-shrink: 0; fill: none; }
.ic-lg { width: 1.4em; height: 1.4em; }

.grid > *, .grid-2 > *, .grid-3 > *, .row2 > *, .row3 > * { min-width: 0; }
.empty .btn svg, .empty-state .btn svg, .alert .btn svg { width: 18px; height: 18px; margin: 0; color: currentColor; }

/* ═══════════════════════════════════════════════════════════════════════════
   CHAT SCREEN (Messages/Chat, Groups/Chat) — same structure as v1, light look
   ═══════════════════════════════════════════════════════════════════════════ */
.chat-page { overflow: hidden; }
.chat-page footer.footer { display: none; }
.chat-page main { padding: 0 !important; }
.chat-screen { position: fixed; left: 0; right: 0; top: 65px; bottom: 0; z-index: 5; display: flex; flex-direction: column; background: var(--bg); }
.chat-col { flex: 1; min-height: 0; width: 100%; max-width: 860px; margin: 0 auto; display: flex; flex-direction: column; }
@media (min-width: 900px) { .chat-col { border-left: 1px solid var(--line); border-right: 1px solid var(--line); } }
.chat-head { display: flex; align-items: center; gap: 10px; padding: 8px 12px; flex-shrink: 0; background: #fff; border-bottom: 1px solid var(--line); }
.chat-head .back-link { margin: 0; padding: 6px; min-height: 44px; }
.chat-head .back-link span { display: none; }
.chat-head form { margin: 0; }
.chat-head .chat-avatar { width: 42px; height: 42px; }
.chat-head .chat-name { font-size: 16px; font-weight: 700; color: var(--text); line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-head .chat-name a { color: inherit; }
.chat-head .chat-status { font-size: 13px; letter-spacing: 0; text-transform: none; color: var(--faint); margin-top: 2px; }
.chat-head .chat-status:empty { display: none; }
@media (max-width: 600px) { .chat-head .btn .lbl { display: none; } .chat-head .btn { padding: 0 12px; } }
.chat-body { flex: 1; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; display: flex; flex-direction: column; gap: 6px; padding: 16px 12px 10px; scrollbar-width: thin; background: #EFE9DF; }
.chat-foot { flex-shrink: 0; padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px)); background: #fff; border-top: 1px solid var(--line); }
.chat-foot .composer, .chat-foot .input-bar { display: flex; gap: 8px; align-items: flex-end; margin: 0; padding: 0; border: 0; }
.chat-foot .form-control { flex: 1; min-height: 46px; height: 46px; max-height: 140px; padding: 11px 16px; line-height: 1.45; resize: none; font-size: 16px; border-radius: 23px !important; background: var(--panel-2) !important; }
.chat-foot .send-btn, .chat-foot #send { width: 46px; height: 46px; min-height: 46px; padding: 0; border-radius: 50%; flex-shrink: 0; }
.chat-foot #send .lbl { display: none; }
.chat-foot .send-btn svg, .chat-foot #send svg { width: 19px; height: 19px; margin-left: 1px; }
.chat-body .msg-row { display: flex; gap: 6px; align-items: flex-end; }
.chat-body .msg-row.mine { flex-direction: row-reverse; }
.chat-body .msg-inner { display: flex; flex-direction: column; max-width: min(78%, 520px); position: relative; }
.chat-body .msg-row.mine .msg-inner { align-items: flex-end; }
.chat-body .bubble { position: relative; padding: 8px 12px 20px; border-radius: 16px; font-size: 16px; line-height: 1.45; word-break: break-word; overflow-wrap: anywhere; white-space: pre-wrap; color: var(--text); box-shadow: 0 1px 1px rgba(60,40,10,.08); min-width: 64px; }
.chat-body .bubble-theirs { background: #fff; border: 0; border-bottom-left-radius: 4px; }
.chat-body .bubble-mine { background: #D3F0E3; border: 0; border-bottom-right-radius: 4px; }
.chat-body .bubble.deleted { color: var(--faint); font-style: italic; }
.chat-body .msg-time, .chat-body .b-time { font-size: 11px; letter-spacing: 0; color: var(--faint); margin-top: -18px; padding: 0 10px 4px 0; align-self: flex-end; position: relative; pointer-events: none; }
.chat-body .b-name { font-size: 13px; font-weight: 600; letter-spacing: 0; color: var(--accent-2); margin: 0 0 3px 4px; }
.chat-body .msg-av { display: none; }
.chat-body .m-avatar { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; flex-shrink: 0; display: flex; align-items: center; justify-content: center; background: #F6D9B8; border: 0; font-size: 11px; font-weight: 600; color: #6E3E0A; }
.chat-body .msg-row.mine .m-avatar { display: none; }
.chat-body .date-divider, .chat-body .sys { align-self: center; max-width: 86%; text-align: center; font-size: 13px; font-weight: 500; letter-spacing: 0; text-transform: none; color: var(--muted); background: rgba(255,255,255,.85); border: 0; border-radius: 999px; padding: 4px 12px; margin: 6px 0; }
.chat-body .date-divider::before, .chat-body .date-divider::after { display: none; }
.chat-body .empty-chat { margin: auto; text-align: center; font-size: 15px; letter-spacing: 0; text-transform: none; color: var(--muted); padding: 40px 20px; }
.chat-body .load-older { align-self: center; margin-bottom: 6px; }
.chat-foot .block-bar { display: flex; gap: 10px; align-items: center; justify-content: center; margin: 0; padding: 4px 0; border: 0; }
.chat-foot .blocked-notice { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--faint); text-align: center; }
.chat-foot .locked { margin: 0; padding: 6px 0; border: 0; text-align: center; font-size: 14px; letter-spacing: 0; text-transform: none; color: var(--faint); }
.chat-foot .err-toast { margin: 0 0 8px; }
@media (max-width: 900px) {
  .chat-page .chat-foot textarea, .chat-page .chat-foot input { font-size: 16px !important; }
  .chat-page .chat-foot .form-control { touch-action: manipulation; }
}

.flash-wrap { max-width: 1140px; margin: 20px auto -4px; }
.flash-wrap .alert { margin-bottom: 8px; }
.flash-wrap .alert span { color: inherit; }

/* ═══════════════════════════════════════════════════════════════════════════
   v2 NAVIGATION (_NavV2): top bar on desktop, app-style tab bar on phones
   ═══════════════════════════════════════════════════════════════════════════ */
.nav2 { background: rgba(251,248,243,.94); border-bottom: 1px solid var(--line); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.nav2-in { max-width: 1200px; margin: 0 auto; padding: 10px 24px; display: flex; align-items: center; gap: 12px; }
.nav2-brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 800; font-size: 18px; letter-spacing: -.01em; margin-right: 8px; }
.nav2-brand:hover { color: var(--text); }
.nav2-mark { width: 36px; height: 36px; border-radius: 11px; background: var(--hero); color: var(--gold); display: inline-flex; align-items: center; justify-content: center; }
.nav2-mark svg { width: 26px; height: 26px; }
.nav2-links { display: flex; gap: 4px; }
.nav2-link { position: relative; display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 14px; border-radius: 12px; color: var(--muted); font-weight: 500; font-size: 15px; }
.nav2-link:hover { background: var(--panel-3); color: var(--text); }
.nav2-link.on { background: var(--accent-soft); color: var(--accent-3); font-weight: 600; }
.nav2-badge { position: static; box-shadow: none; }
.nav2-search { flex: 1 1 220px; max-width: 360px; margin-left: auto; display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 14px; border: 1px solid var(--line-2); border-radius: 12px; background: #fff; color: var(--faint); }
.nav2-search input { border: 0; background: transparent; font: 400 15px var(--body); color: var(--text); outline: none; width: 100%; }
.nav2-me { position: relative; border: 0; background: transparent; padding: 0; border-radius: 50%; cursor: pointer; }
.nav2-me .nav-avatar { width: 44px; height: 44px; }
.nav2-menu { border-radius: 16px !important; border: 1px solid var(--line) !important; box-shadow: var(--shadow-lg) !important; padding: 6px !important; min-width: 240px; }
.nav2-menu .dropdown-item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; font-size: 15px; color: var(--text); background: transparent; border: 0; width: 100%; text-align: left; }
.nav2-menu .dropdown-item:hover { background: var(--panel-2); }
.nav2-menu .dropdown-item .ic { width: 18px; height: 18px; color: var(--accent-2); }
.nav2-menu-head { padding: 10px 12px 8px; display: flex; flex-direction: column; font-size: 15px; }
.nav2-menu-head span { font-size: 13px; color: var(--faint); }
.tab2 { display: none; }
@media (max-width: 991px) {
  .nav2-in { padding: 8px 16px; }
  .nav2-links, .nav2-search, .nav2-share, .nav2-login { display: none !important; }
  .nav2 .dropdown, .nav2 .nav-icon:first-of-type { margin-left: 0; }
  .nav2-brand { margin-right: auto; }
  .tab2 { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 1030; background: #fff; border-top: 1px solid var(--line); padding: 6px 8px calc(8px + env(safe-area-inset-bottom, 0px)); }
  .tab2-i { position: relative; flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 54px; color: var(--faint); font-size: 11.5px; font-weight: 500; white-space: nowrap; }
  .tab2-i .ic { width: 22px; height: 22px; }
  .tab2-i.on { color: var(--accent-2); font-weight: 700; }
  .tab2-i .nav-badge { top: 2px; right: auto; left: 50%; margin-left: 4px; }
  .tab2-plus span { width: 54px; height: 54px; border-radius: 18px; background: var(--accent); color: #fff; display: inline-flex; align-items: center; justify-content: center; margin-top: -20px; box-shadow: 0 1px 2px rgba(10,60,45,.25), 0 8px 20px rgba(14,122,98,.32); }
  .tab2-plus span .ic { width: 26px; height: 26px; stroke-width: 2.4; }
  body[data-design="v2"] { padding-bottom: calc(76px + env(safe-area-inset-bottom, 0px)); }
  body[data-design="v2"] .wa-fab { bottom: calc(88px + env(safe-area-inset-bottom, 0px)); }
  /* the chat screens own the bottom edge (composer) */
  body.chat-page .tab2 { display: none; }
  body.chat-page[data-design="v2"] { padding-bottom: 0; }
}


/* ── Topic list: the 10 topics, same row on the home page and Axtar ──
   Fixed catalogue order everywhere (spatial memory: a topic is always in the same place).
   Compact rows, 2 columns on phones and 4 on wide screens, so 10 topics never leave one alone
   on the last line; white rows with colour only in the icon square. Under the name a short
   hint says what the topic holds; the count pill appears only above zero (no "add" filler,
   which read as "this platform is empty"). */
.topic-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.topic-tile { display: flex; align-items: center; gap: 10px; min-height: 64px; padding: 10px 10px 10px 10px; border-radius: 14px; background: #fff; border: 1px solid var(--line); color: var(--text); line-height: 1.25; min-width: 0; }
.topic-tile:hover { color: var(--text); border-color: var(--line-3); }
.topic-tile:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.topic-ic { width: 38px; height: 38px; border-radius: 11px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.topic-ic .ic { width: 20px; height: 20px; }
.topic-tx { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.topic-tx b { font-weight: 600; font-size: 15px; }
.topic-tx .hint { font-size: 13px; color: var(--faint); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.topic-n { flex-shrink: 0; align-self: center; min-width: 24px; height: 22px; padding: 0 7px; border-radius: 999px; background: var(--panel-2); color: var(--muted); font-size: 12px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; }
@media (min-width: 900px) {
  .topic-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
  .topic-tile { padding: 12px; gap: 12px; }
}
.soft-amber{background-color:var(--amber-soft)}.soft-pink{background-color:var(--pink-soft)}.soft-blue{background-color:var(--blue-soft)}.soft-green{background-color:var(--green-soft)}.soft-violet{background-color:var(--violet-soft)}.soft-indigo{background-color:var(--indigo-soft)}.soft-teal{background-color:var(--teal-soft)}.soft-sky{background-color:var(--sky-soft)}.soft-orange{background-color:var(--orange-soft)}.soft-red{background-color:var(--red-soft)}
.ink-amber{color:var(--amber)}.ink-pink{color:var(--pink)}.ink-blue{color:var(--blue)}.ink-green{color:var(--green)}.ink-violet{color:var(--violet)}.ink-indigo{color:var(--indigo)}.ink-teal{color:var(--teal)}.ink-sky{color:var(--sky)}.ink-orange{color:var(--orange)}.ink-red{color:var(--red)}

/* Verification badges (CLAUDE.md): the tick after a name. Gold = admin, blue = verified. */
.vbadge { display: inline-block; width: .9em; height: .9em; vertical-align: -.12em; margin-left: .22em; flex-shrink: 0; }
.vb-verified { color: var(--badge-blue); }
.vb-admin { color: var(--badge-gold); }
.vb-none { color: var(--faint, #9a9a9a); }
.vb-request { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 500; color: var(--muted); text-decoration: none; text-transform: none; letter-spacing: 0; white-space: nowrap; vertical-align: middle; margin-left: 6px; }
.vb-request:hover { color: var(--text); text-decoration: underline; }
.vb-request .vbadge { margin-left: 0; }
