/* ============================================================
   Saitas.net — design system
   Tokens lifted from /docs/design-brief.md (Claude Design v1).
   Mobile-first. Light + dark modes. Bilingual LT/EN.
   ============================================================ */

/* Web fonts moved to assets/styles/fonts.css (self-hosted). Same
   reasoning as tokens.css: the previous Google Fonts @import leaked
   visitor IPs to the US. Geist + Instrument Serif + JetBrains Mono
   all live in fonts.css now, linked from base.html.twig. */

/* ---- Turbo navigation crossfade ----------------------------
   The View Transitions API is enabled site-wide via the
   <meta name="view-transition" content="same-origin"> in base.
   Browser defaults to a ~250ms linear opacity crossfade — readable
   but a beat too slow to feel native. These rules tighten the
   timing and add a subtle 1% scale on the outgoing / incoming
   pages so transitions read as "page handed off" rather than
   "page replaced". Falls back gracefully on browsers without
   View Transitions support (no animation, instant swap). */
::view-transition-old(root) {
    animation: 160ms cubic-bezier(.4, 0, .2, 1) both saitas-page-out;
}
::view-transition-new(root) {
    animation: 200ms cubic-bezier(.4, 0, .2, 1) both saitas-page-in;
}
@keyframes saitas-page-out {
    to { opacity: 0; transform: scale(.99); }
}
@keyframes saitas-page-in {
    from { opacity: 0; transform: scale(1.01); }
}

:root {
    /* Surfaces */
    --bg:           #FBF6F2;
    --surface:      #FFFFFF;
    --surface-alt:  #F4ECE6;
    --line:         rgba(27,10,26,0.08);
    --line-strong:  rgba(27,10,26,0.16);

    /* Ink */
    --ink:          #1B0A1A;
    --ink-soft:     #5A3F55;
    --ink-muted:    #8E7589;

    /* Brand — values mirror tokens.css plum scale (tokens.css loads later and
       wins on conflict; keeping the literals aligned avoids visual mismatch
       on any cascade hop where app.css resolves first). */
    --primary:      #5C2340;
    --primary-deep: #3F1729;
    --primary-soft: #E5C0CC;
    --primary-ink:  #FFFFFF;

    /* Mystical */
    --plum:         #3A1652;
    --plum-soft:    #EAD9F5;
    --violet:       #7B3FE4;

    /* Accents */
    --saffron:      #F5B400;
    --saffron-soft: #FFF1C9;
    --saffron-ink:  #7A5500;
    --mint:         #00C896;
    --mint-soft:    #D6F5E9;
    --coral:        #FF6B47;
    --sky:          #3B9AE1;

    /* Semantic */
    --danger:       #E11D48;
    --success:      #00A878;

    /* Radius — soft scale (default) */
    --r-card:   20px;
    --r-button: 14px;
    --r-input:  14px;
    --r-pill:   999px;
    --r-tile:   14px;

    /* Typography */
    --f-display: 'Instrument Serif', 'Iowan Old Style', Georgia, serif;
    --f-ui:      'Geist', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    --f-mono:    'JetBrains Mono', 'SF Mono', ui-monospace, monospace;

    /* Spacing scale */
    --sp-1: 4px;  --sp-2: 8px;  --sp-3: 12px; --sp-4: 16px;
    --sp-6: 24px; --sp-8: 32px; --sp-12: 48px; --sp-16: 64px;

    /* Shadows */
    --sh-sm: 0 4px 12px rgba(27,10,26,0.06);
    --sh-md: 0 8px 24px rgba(27,10,26,0.08);
    --sh-lg: 0 16px 40px rgba(27,10,26,0.12);
    --sh-glow-primary: 0 12px 28px rgba(92,35,64,0.30);
    --sh-glow-saffron: 0 12px 28px rgba(245,180,0,0.45);
    --sh-glow-violet:  0 8px 20px rgba(123,63,228,0.40);

    /* Layout */
    --tabbar-h: 76px;
    --topbar-h: 64px;
    --container: 880px;
    --container-wide: 1180px;
}

[data-theme="dark"], html.dark {
    --bg:           #160814;
    --surface:      #22101F;
    --surface-alt:  #2D162A;
    --line:         rgba(255,255,255,0.08);
    --line-strong:  rgba(255,255,255,0.16);

    --ink:          #FFF6F2;
    --ink-soft:     #D9BFD3;
    --ink-muted:    #9E839A;

    --primary:      #C77E9D;
    --primary-deep: #B0667D;
    --primary-soft: #6F324C;

    --plum:         #C7A4E0;
    --plum-soft:    #3D1B57;
    --violet:       #A77AFF;

    --saffron:      #FFC93C;
    --saffron-soft: #3A2A0A;
    --saffron-ink:  #FFD96B;
    --mint:         #3CE0AE;
    --mint-soft:    #0F3528;
    --coral:        #FF8A6B;
    --sky:          #5BB4F0;

    --danger:       #FF5577;
    --success:      #3CE0AE;
}

/* ============================================================
   Base reset
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
    font-family: var(--f-ui);
    font-size: 15px;
    line-height: 1.5;
    color: var(--ink);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
    overflow-x: hidden;
}
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
/* Image-only links (gallery thumbnails, lightbox triggers, the avatar
   photo wrapper) shouldn't pick up the hover underline — it renders as
   a stray pink line under the photo. :has() matches when the anchor's
   only child is an <img>; data-lightbox-trigger is a belt-and-suspenders
   selector for explicit gallery links. */
a:has(> img:only-child),
a:has(> img:only-child):hover,
a[data-lightbox-trigger],
a[data-lightbox-trigger]:hover { text-decoration: none; }

h1, h2, h3, h4 { margin: 0 0 var(--sp-4); font-family: var(--f-display); font-weight: 400; letter-spacing: -0.4px; line-height: 1.1; color: var(--ink); }
h1 { font-size: clamp(28px, 5vw, 40px); }
h2 { font-size: clamp(22px, 3.5vw, 28px); }
h3 { font-size: clamp(18px, 2.5vw, 22px); }
h4 { font-size: 16px; font-family: var(--f-ui); font-weight: 700; letter-spacing: -0.1px; }

p { margin: 0 0 var(--sp-3); }
.muted { color: var(--ink-muted); }
.eyebrow {
    font-family: var(--f-mono); font-size: 10px;
    color: var(--ink-muted); letter-spacing: 1.4px;
    text-transform: uppercase; margin-bottom: var(--sp-1);
}

.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { scrollbar-width: none; -ms-overflow-style: none; }

/* ============================================================
   Layout — topnav, container, tab bar
   ============================================================ */
.topnav {
    position: sticky; top: 0; z-index: 50;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    padding: var(--sp-3) var(--sp-4);
    display: flex; align-items: center; justify-content: center; gap: var(--sp-4);
    min-height: var(--topbar-h);
    backdrop-filter: saturate(180%) blur(8px);
    -webkit-backdrop-filter: saturate(180%) blur(8px);
}
.topnav .brand {
    font-family: var(--f-display);
    font-size: 22px;
    color: var(--ink);
    letter-spacing: -0.5px;
    display: inline-flex; align-items: center; gap: 8px;
    flex-shrink: 0;
    text-decoration: none;
}
.topnav .brand:hover { text-decoration: none; }
.topnav .brand .dot { color: var(--primary); }
.topnav .brand-mark { width: 28px; height: 28px; flex-shrink: 0; }

.topnav nav.primary {
    display: none; gap: 4px; align-items: center;
    overflow-x: auto; scrollbar-width: none;
}
.topnav nav.primary::-webkit-scrollbar { display: none; }
.topnav nav.primary a {
    color: var(--ink-soft);
    padding: 8px 14px;
    border-radius: var(--r-pill);
    font-size: 13px; font-weight: 600;
    display: inline-flex; align-items: center; gap: 6px;
    white-space: nowrap;
    transition: background 0.15s, color 0.15s;
}
.topnav nav.primary a:hover { background: var(--surface-alt); color: var(--ink); text-decoration: none; }
.topnav nav.primary a.is-active { background: var(--surface-alt); color: var(--primary); }
.topnav nav.primary a .badge {
    background: var(--primary); color: #fff;
    font-size: 10px; font-family: var(--f-mono); font-weight: 700;
    padding: 1px 6px; border-radius: 999px; min-width: 18px;
    display: inline-grid; place-items: center;
}

.topnav .actions { display: flex; align-items: center; gap: var(--sp-2); }
.topnav .icon-btn {
    width: 40px; height: 40px;
    border-radius: 50%;
    background: var(--surface-alt);
    border: 1px solid var(--line);
    display: grid; place-items: center;
    color: var(--ink);
    position: relative;
    text-decoration: none;
    transition: background 0.15s;
}
.topnav .icon-btn:hover { background: var(--line); text-decoration: none; }
.topnav .icon-btn .pulse {
    position: absolute; top: 8px; right: 8px;
    width: 8px; height: 8px; border-radius: 50%;
    background: var(--primary);
    box-shadow: 0 0 0 2px var(--surface);
}
.topnav .menu-toggle {
    display: inline-grid;
    width: 40px; height: 40px;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: var(--surface-alt);
    place-items: center;
    color: var(--ink);
}

@media (min-width: 1024px) {
    .topnav { padding: var(--sp-3) var(--sp-6); gap: var(--sp-6); }
    .topnav nav.primary { display: flex; }
    .topnav .menu-toggle { display: none; }
}

/* Mobile drawer */
.drawer {
    position: fixed; inset: 0; z-index: 60;
    background: rgba(27,10,26,0.5);
    backdrop-filter: blur(4px);
    display: none;
}
.drawer[aria-hidden="false"] { display: block; }
.drawer .panel {
    position: absolute; top: 0; right: 0; bottom: 0;
    width: min(86vw, 340px);
    background: var(--surface);
    padding: var(--sp-4);
    overflow-y: auto;
    animation: slide-in 0.25s ease-out;
}
.drawer nav { display: flex; flex-direction: column; gap: 4px; margin-top: var(--sp-6); }
.drawer nav a {
    padding: 12px 14px; border-radius: var(--r-button);
    color: var(--ink); font-size: 15px; font-weight: 500;
    display: flex; align-items: center; gap: 12px;
    text-decoration: none;
}
.drawer nav a:hover { background: var(--surface-alt); text-decoration: none; }
.drawer nav a.is-active { background: var(--primary-soft); color: var(--primary-deep); }

@keyframes slide-in { from { transform: translateX(20px); opacity: 0 } to { transform: translateX(0); opacity: 1 } }

/* Container */
.container {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: var(--sp-4);
}
.container.narrow { max-width: 480px; }
.container.wide { max-width: var(--container-wide); }
.container.bleed { padding: 0; }
@media (min-width: 768px) {
    .container { padding: var(--sp-6); }
}

/* ============================================================
   Sidebar (left rail) + app shell layout
   ============================================================ */
.app-shell {
    display: flex; align-items: flex-start;
    max-width: var(--container-wide, 1280px);
    margin: 0 auto;
}
.app-shell > .container { flex: 1; min-width: 0; max-width: none; }

.sidebar {
    display: none;            /* shown ≥1024px via media query below */
    flex: 0 0 240px;
    width: 240px;
    position: sticky; top: calc(var(--topbar-h) + 12px);
    align-self: flex-start;
    max-height: calc(100vh - var(--topbar-h) - 24px);
    overflow-y: auto;
    padding: var(--sp-3) var(--sp-3) var(--sp-6);
    margin-left: var(--sp-4);
}
.sidebar-nav { list-style: none; padding: 0; margin: 0; }
.sidebar-nav > li + li { margin-top: 2px; }

.sidebar-link {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 12px;
    border-radius: 10px;
    color: var(--ink-soft);
    text-decoration: none;
    font-size: 14px; font-weight: 500;
    background: transparent; border: 0; width: 100%; text-align: left; cursor: pointer;
    transition: background 0.15s, color 0.15s;
}
.sidebar-link:hover { background: var(--surface-alt); color: var(--ink); text-decoration: none; }
.sidebar-link.is-active { background: var(--surface-alt); color: var(--primary); }
.sidebar-link.is-active svg { stroke: var(--primary); }
.sidebar-link span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-chevron { font-size: 11px; color: var(--ink-muted); transition: transform 0.15s; }
.sidebar-group__toggle[aria-expanded="false"] .sidebar-chevron { transform: rotate(-90deg); }

.sidebar-subnav { list-style: none; padding: 0 0 4px 24px; margin: 0; }
.sidebar-subnav > li + li { margin-top: 1px; }
.sidebar-sublink {
    display: flex; align-items: center; gap: 8px;
    padding: 7px 10px;
    border-radius: 8px;
    color: var(--ink-soft);
    text-decoration: none;
    font-size: 13px;
    transition: background 0.15s, color 0.15s;
}
.sidebar-sublink:hover { background: var(--surface-alt); color: var(--ink); text-decoration: none; }
.sidebar-sublink.is-active { color: var(--primary); font-weight: 600; }
.sidebar-sublink span { flex: 1; min-width: 0; }

.sidebar-badge {
    background: var(--primary); color: #fff;
    font-size: 10px; font-family: var(--f-mono); font-weight: 700;
    padding: 1px 6px; border-radius: 999px; min-width: 18px;
    display: inline-grid; place-items: center;
}

@media (min-width: 1024px) {
    .sidebar { display: block; }
}

/* User avatar dropdown (topnav) */
.user-dropdown { position: relative; }
.user-dropdown__trigger {
    background: transparent; border: 0; padding: 0; cursor: pointer;
    display: inline-flex; align-items: center;
    border-radius: 50%;
}
.user-dropdown__trigger:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.user-dropdown__menu {
    position: absolute; top: calc(100% + 8px); right: 0;
    min-width: 240px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: 0 12px 32px rgba(0,0,0,0.18);
    padding: 8px;
    z-index: 100;
    display: none;
}
.user-dropdown__menu.is-open { display: block; }
.user-dropdown__header {
    padding: 8px 10px 4px;
}
.user-dropdown__divider {
    border: 0; border-top: 1px solid var(--line);
    margin: 6px 0;
}
.user-dropdown__item {
    display: flex; align-items: center; gap: 10px;
    padding: 8px 10px;
    border-radius: 8px;
    color: var(--ink);
    text-decoration: none;
    font-size: 14px;
    transition: background 0.15s;
}
.user-dropdown__item:hover { background: var(--surface-alt); text-decoration: none; }
.user-dropdown__locale {
    display: flex; gap: 6px; padding: 6px 10px 2px;
    font-size: 13px;
}
.user-dropdown__lang {
    flex: 1; text-align: center;
    padding: 6px 10px; border-radius: 8px;
    background: var(--surface-alt);
    color: var(--ink-soft); text-decoration: none;
    transition: background 0.15s, color 0.15s;
}
.user-dropdown__lang:hover { background: var(--line); color: var(--ink); text-decoration: none; }
.user-dropdown__lang.is-active { background: var(--primary); color: #fff; font-weight: 600; }

/* Mobile bottom tab bar */
.tabbar {
    position: fixed; left: 14px; right: 14px; bottom: 14px;
    z-index: 40;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-pill);
    padding: 8px;
    display: flex; align-items: center; justify-content: space-between;
    box-shadow: var(--sh-lg);
}
.tabbar a, .tabbar button {
    flex: 1; height: 48px;
    border: none; background: transparent;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 2px;
    color: var(--ink-muted);
    text-decoration: none;
    font-size: 10px; font-weight: 500;
    letter-spacing: 0.1px;
    transition: color 0.15s;
    position: relative;
}
.tabbar a:hover { text-decoration: none; }
.tabbar a.is-active { color: var(--primary); }
.tabbar a.is-active span { font-weight: 700; }
.tabbar a .badge {
    position: absolute; top: 4px; right: calc(50% - 18px);
    background: var(--primary); color: #fff;
    font-size: 9px; font-family: var(--f-mono); font-weight: 700;
    padding: 1px 5px; border-radius: 999px; min-width: 16px;
    display: inline-grid; place-items: center;
}
.tabbar .spark {
    flex: 0 0 54px; height: 54px; margin-top: -22px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--violet));
    box-shadow: var(--sh-glow-violet);
    color: #fff;
    display: grid; place-items: center;
}

@media (min-width: 1024px) {
    .tabbar { display: none; }
}

body.has-tabbar main { padding-bottom: calc(var(--tabbar-h) + var(--sp-4)); }

/* ============================================================
   Buttons
   ============================================================ */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    gap: var(--sp-2);
    height: 44px; padding: 0 18px;
    border: 1.5px solid transparent;
    border-radius: var(--r-button);
    background: var(--primary); color: var(--primary-ink);
    font-family: var(--f-ui); font-size: 14px; font-weight: 600;
    letter-spacing: 0.1px;
    text-decoration: none; cursor: pointer;
    white-space: nowrap;
    transition: transform 0.15s, box-shadow 0.15s, filter 0.15s;
}
.btn:hover { filter: brightness(1.05); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 3px solid var(--primary-soft); outline-offset: 2px; }

.btn--lg  { height: 54px; padding: 0 22px; font-size: 16px; }
.btn--sm  { height: 32px; padding: 0 14px; font-size: 13px; }
.btn--full { width: 100%; }
.btn--block { width: 100%; }

.btn--deep   { background: var(--plum); color: #fff; }
.btn--soft   { background: var(--primary-soft); color: var(--primary-deep); }
.btn--ghost  { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn--ghost:hover { background: var(--surface-alt); }
.btn--saffron { background: var(--saffron); color: #3D2900; }
.btn--coral  { background: var(--coral); color: #fff; }
.btn--white  { background: #fff; color: var(--plum); }
.btn--secondary { background: var(--surface); color: var(--ink); border-color: var(--line-strong); }

.btn .icon { width: 18px; height: 18px; }

.btn.block { width: 100%; }

/* Icon button (round) */
.icon-circle {
    width: 44px; height: 44px;
    border-radius: 50%;
    border: 1px solid var(--line);
    background: var(--surface);
    display: grid; place-items: center;
    color: var(--ink);
    box-shadow: var(--sh-sm);
    transition: transform 0.15s;
    text-decoration: none;
}
.icon-circle:hover { transform: translateY(-1px); text-decoration: none; }
.icon-circle--lg { width: 56px; height: 56px; }
.icon-circle--xl { width: 68px; height: 68px; }
.icon-circle--primary {
    background: var(--primary); color: #fff; border-color: transparent;
    box-shadow: var(--sh-glow-primary);
}
.icon-circle--violet {
    background: rgba(123,63,228,0.10); color: var(--violet); border-color: transparent;
}
.icon-circle--saffron {
    background: var(--saffron-soft); color: var(--saffron); border-color: transparent;
}
.icon-circle--coral {
    background: rgba(255,107,71,0.10); color: var(--coral); border-color: transparent;
}

/* ============================================================
   Cards
   ============================================================ */
.card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-card);
    padding: var(--sp-4);
}
.card--padded { padding: var(--sp-6); }
.card--flush { padding: 0; overflow: hidden; }
.card--alt { background: var(--surface-alt); }
.card--gradient {
    background: linear-gradient(135deg, var(--plum) 0%, var(--primary-deep) 70%, var(--coral) 130%);
    color: #fff;
    border-color: transparent;
}

/* ============================================================
   Avatar
   ============================================================ */
.avatar {
    position: relative;
    flex-shrink: 0;
    border-radius: 50%;
    display: inline-grid; place-items: center;
    color: #fff;
    font-family: var(--f-display);
    line-height: 1;
    overflow: hidden;
    background: linear-gradient(135deg, var(--primary), var(--violet));
}
.avatar > img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.avatar.has-ring {
    overflow: visible;
    box-shadow: 0 0 0 2.5px var(--bg), 0 0 0 4.5px var(--primary);
}
.avatar .online-dot {
    position: absolute; right: 0; bottom: 0;
    width: 28%; height: 28%; min-width: 8px; min-height: 8px;
    border-radius: 50%; background: var(--mint);
    border: 2px solid var(--bg);
    z-index: 2;
}

.avatar.size-xs { width: 24px; height: 24px; font-size: 10px; }
.avatar.size-sm { width: 32px; height: 32px; font-size: 14px; }
.avatar.size-md { width: 44px; height: 44px; font-size: 20px; }
.avatar.size-lg { width: 64px; height: 64px; font-size: 28px; }
.avatar.size-xl { width: 96px; height: 96px; font-size: 44px; }
.avatar.size-2xl { width: 160px; height: 160px; font-size: 72px; }

/* ============================================================
   Chips & badges
   ============================================================ */
.chip {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 4px 10px;
    border-radius: var(--r-pill);
    font-family: var(--f-mono); font-weight: 600;
    font-size: 11px; letter-spacing: 0.2px;
    background: var(--surface-alt); color: var(--ink);
    white-space: nowrap;
    text-decoration: none;
}
.chip--lg { padding: 6px 12px; font-size: 13px; }

.chip--karma {
    background: var(--saffron-soft);
    color: var(--saffron-ink);
}
.chip--karma .glyph { color: var(--saffron); flex-shrink: 0; }

.chip--mint    { background: var(--mint-soft);  color: var(--mint); }
.chip--coral   { background: rgba(255,107,71,0.12); color: var(--coral); }
.chip--violet  { background: rgba(123,63,228,0.12); color: var(--violet); }
.chip--saffron { background: var(--saffron-soft); color: var(--saffron-ink); }
.chip--ink     { background: var(--ink); color: var(--bg); }

.chip-online {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 3px 8px;
    border-radius: var(--r-pill);
    background: rgba(0,0,0,0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #fff; font-size: 10px; font-weight: 600;
}
.chip-online .dot { width: 5px; height: 5px; border-radius: 50%; background: var(--mint); }

/* ============================================================
   Forms
   ============================================================ */
.form-stack { display: flex; flex-direction: column; gap: var(--sp-3); }
.form-stack label > .field-label,
.form-field-label,
.form-stack > label {
    display: block;
    font-size: 13px; font-weight: 600;
    color: var(--ink-soft);
}
.form-stack label > .field-label,
.form-field-label { margin-bottom: 6px; }

.form-stack input[type=email],
.form-stack input[type=text],
.form-stack input[type=password],
.form-stack input[type=date],
.form-stack input[type=number],
.form-stack input[type=tel],
.form-stack input[type=url],
.form-stack input[type=search],
.form-stack textarea,
.form-stack select,
.input {
    width: 100%; padding: 12px 14px;
    border: 1.5px solid var(--line);
    border-radius: var(--r-input);
    background: var(--surface); color: var(--ink);
    font-family: inherit; font-size: 15px;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.form-stack input:focus,
.form-stack textarea:focus,
.form-stack select:focus,
.input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-soft);
}
.form-stack textarea { min-height: 96px; resize: vertical; }

.check-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; }

/* Inline pill nav (for tabs etc.) */
.pill-nav {
    display: inline-flex; gap: 6px; padding: 4px;
    background: var(--surface-alt);
    border-radius: var(--r-pill);
    flex-wrap: wrap;
}
.pill-nav a, .pill-nav button {
    padding: 6px 14px; border-radius: var(--r-pill);
    border: none; background: transparent;
    color: var(--ink-soft); font-size: 13px; font-weight: 600;
    text-decoration: none;
    cursor: pointer;
}
.pill-nav a:hover { color: var(--ink); text-decoration: none; }
.pill-nav a.is-active, .pill-nav button.is-active {
    background: var(--ink); color: var(--bg);
}

/* Tabs (alt style — wider) */
.tabs {
    display: flex; gap: 6px;
    flex-wrap: wrap;
}
.tabs a, .tabs button {
    padding: 8px 14px; border-radius: var(--r-pill);
    background: var(--surface); color: var(--ink);
    border: 1px solid var(--line);
    font-size: 13px; font-weight: 600;
    text-decoration: none; cursor: pointer;
    display: inline-flex; align-items: center; gap: 6px;
}
.tabs a.is-active, .tabs button.is-active { background: var(--ink); color: var(--bg); border-color: transparent; }
.tabs a .count, .tabs button .count {
    padding: 1px 7px; border-radius: 999px;
    font-size: 10px; font-family: var(--f-mono); font-weight: 700;
    background: var(--surface-alt); color: var(--ink-soft);
}
.tabs a.is-active .count, .tabs button.is-active .count { background: rgba(255,255,255,0.2); color: var(--bg); }

/* ============================================================
   Section header
   ============================================================ */
.section {
    padding: 0 var(--sp-4); margin: var(--sp-6) 0 var(--sp-3);
}
.section .section-eyebrow {
    font-family: var(--f-mono); font-size: 10px;
    color: var(--ink-muted); letter-spacing: 1.4px;
    text-transform: uppercase; margin-bottom: 4px;
}
.section .section-row {
    display: flex; align-items: baseline; justify-content: space-between;
    gap: var(--sp-3);
}
.section .section-title {
    font-family: var(--f-display); font-weight: 400;
    font-size: clamp(22px, 4vw, 28px);
    color: var(--ink); letter-spacing: -0.4px;
    line-height: 1.05;
    margin: 0;
}
.section .section-title em { font-style: italic; color: var(--primary); }
.section .section-action {
    color: var(--primary); font-size: 13px; font-weight: 600;
    text-decoration: none;
}

/* ============================================================
   Grids
   ============================================================ */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--sp-3); }
.grid-3 { display: grid; grid-template-columns: 1fr; gap: var(--sp-3); }
.grid-4 { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--sp-3); }
.grid-auto { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: var(--sp-3); }

@media (min-width: 640px) {
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
    .grid-4 { grid-template-columns: repeat(3, 1fr); }
    .grid-auto { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
}
@media (min-width: 1024px) {
    .grid-3 { grid-template-columns: repeat(3, 1fr); }
    .grid-4 { grid-template-columns: repeat(4, 1fr); }
    .grid-auto { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
}

.h-strip {
    display: flex; gap: 12px;
    padding: 0 var(--sp-4) var(--sp-2);
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
}
.h-strip::-webkit-scrollbar { display: none; }
.h-strip > * { scroll-snap-align: start; flex-shrink: 0; }

/* ============================================================
   User card (gradient placeholder + meta)
   ============================================================ */
.user-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-card);
    overflow: hidden;
    text-decoration: none;
    color: var(--ink);
    display: block;
    transition: transform 0.15s, box-shadow 0.15s;
}
.user-card:hover { transform: translateY(-2px); box-shadow: var(--sh-md); text-decoration: none; }
.user-card .photo {
    position: relative;
    aspect-ratio: 4/5;
    background: linear-gradient(135deg, var(--primary), var(--violet));
    overflow: hidden;
    display: grid; place-items: center;
}
.user-card .photo img { width: 100%; height: 100%; object-fit: cover; }
/* Diagonal-stripe overlay — only meaningful as texture on the gradient
   placeholder for users without a photo. Hide it when an <img> is present
   so it doesn't render as visible stripes across real profile photos. */
.user-card .photo:not(:has(img))::after {
    content: '';
    position: absolute; inset: 0;
    background-image: repeating-linear-gradient(45deg,
        rgba(255,255,255,0.06) 0 8px, transparent 8px 16px);
    pointer-events: none;
}
.user-card .photo .initial {
    position: relative; z-index: 1;
    font-family: var(--f-display); color: rgba(255,255,255,0.95);
    font-size: 38%; line-height: 1; letter-spacing: -2px;
}
.user-card .photo .compat {
    position: absolute; top: 8px; right: 8px; z-index: 2;
    padding: 4px 8px; border-radius: 999px;
    background: rgba(255,255,255,0.95);
    font-family: var(--f-mono); font-size: 11px; font-weight: 700;
    color: var(--primary-deep);
}
.user-card .photo .chip-online { position: absolute; bottom: 8px; left: 8px; z-index: 2; }
.user-card .info {
    padding: 10px 12px 12px;
}
.user-card .info .name {
    font-weight: 700; font-size: 14px; color: var(--ink);
}
.user-card .info .meta {
    display: flex; gap: 6px; align-items: center; flex-wrap: wrap;
    margin-top: 6px;
    font-size: 11px; color: var(--ink-muted);
    font-family: var(--f-mono);
}

/* ============================================================
   Hot-line row
   ============================================================ */
.hotline-row {
    display: flex; gap: 12px; align-items: flex-start;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-card);
    padding: 14px;
    text-decoration: none; color: var(--ink);
}
.hotline-row:hover { background: var(--surface-alt); text-decoration: none; }
.hotline-row .glyph {
    width: 38px; height: 38px; flex-shrink: 0;
    border-radius: 999px;
    display: grid; place-items: center;
    background: rgba(123,63,228,0.10); color: var(--violet);
}
.hotline-row.is-hot .glyph {
    background: rgba(255,107,71,0.10); color: var(--coral);
}
.hotline-row .topic {
    font-size: 14px; font-weight: 600; line-height: 1.3;
    color: var(--ink);
    text-wrap: pretty;
}
.hotline-row .meta {
    display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
    margin-top: 6px;
    font-size: 11px; color: var(--ink-muted);
    font-family: var(--f-mono);
}

/* ============================================================
   Promo / CTA card
   ============================================================ */
.promo-card {
    border-radius: var(--r-card);
    background: var(--surface-alt);
    border: 1px solid var(--line);
    padding: 16px;
    display: flex; align-items: center; gap: 14px;
    text-decoration: none; color: var(--ink);
}
.promo-card:hover { text-decoration: none; box-shadow: var(--sh-sm); }
.promo-card .visual {
    width: 64px; height: 64px; flex-shrink: 0;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--saffron), var(--coral));
    display: grid; place-items: center;
    box-shadow: 0 6px 16px rgba(245,180,0,0.35);
    color: #fff;
}
.promo-card .body { flex: 1; }
.promo-card .body .title {
    font-family: var(--f-display); font-size: 20px;
    color: var(--ink); letter-spacing: -0.3px; line-height: 1;
}
.promo-card .body .sub {
    font-size: 12px; color: var(--ink-soft); margin-top: 4px;
}

/* ============================================================
   Swipe deck
   ============================================================ */
.swipe-screen {
    height: calc(100vh - var(--topbar-h));
    display: flex; flex-direction: column;
}
.swipe-stage {
    position: relative;
    padding: var(--sp-4);
    flex: 1;
    min-height: 480px;
}
.swipe-card {
    position: absolute; inset: var(--sp-4) var(--sp-4) 96px;
    border-radius: var(--r-card);
    overflow: hidden;
    background: linear-gradient(135deg, var(--primary), var(--violet));
    box-shadow: var(--sh-lg);
    border: 1px solid var(--line);
}
.swipe-card.is-back {
    transform: scale(0.94) translateY(12px); opacity: 0.55; z-index: 0;
}
.swipe-card.is-front { z-index: 1; }
.swipe-card .photo-bg {
    position: absolute; inset: 0;
    display: grid; place-items: center;
    color: rgba(255,255,255,0.95);
    font-family: var(--f-display);
    font-size: 18vw;
    line-height: 1; letter-spacing: -2px;
}
.swipe-card .photo-bg:not(:has(img))::after {
    content: '';
    position: absolute; inset: 0;
    background-image: repeating-linear-gradient(45deg,
        rgba(255,255,255,0.08) 0 8px, transparent 8px 16px);
    pointer-events: none;
}
.swipe-card .meta-top {
    position: absolute; top: 14px; left: 14px; right: 14px;
    display: flex; justify-content: space-between; align-items: flex-start;
    z-index: 2;
}
.swipe-card .compat-pill {
    padding: 8px 12px; border-radius: 14px;
    background: rgba(255,255,255,0.96);
    font-family: var(--f-mono); font-size: 14px; font-weight: 700;
    color: var(--primary-deep);
    display: flex; flex-direction: column; align-items: center; line-height: 1;
}
.swipe-card .compat-pill small {
    font-size: 9px; font-weight: 500; margin-top: 2px;
    color: var(--ink-muted); letter-spacing: 0.5px;
}
.swipe-card .info {
    position: absolute; left: 0; right: 0; bottom: 0;
    padding: 80px 18px 22px;
    background: linear-gradient(180deg, transparent, rgba(0,0,0,0.85));
    color: #fff;
    z-index: 1;
}
.swipe-card .info .name {
    font-family: var(--f-display); font-size: 34px; line-height: 1;
    letter-spacing: -1px;
}
.swipe-card .info .age { font-size: 22px; font-weight: 300; opacity: 0.85; margin-left: 8px; }
.swipe-card .info .bio { margin-top: 10px; font-size: 13px; line-height: 1.4; opacity: 0.95; text-wrap: pretty; }
.swipe-card .tags { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; }
.swipe-card .tags .tag {
    padding: 3px 9px; border-radius: 999px;
    background: rgba(255,255,255,0.18); font-size: 11px;
    color: #fff;
}
.swipe-actions {
    position: absolute; left: 0; right: 0; bottom: 14px;
    padding: 0 30px;
    display: flex; justify-content: space-between; align-items: center;
    z-index: 2;
}

/* ============================================================
   Chat
   ============================================================ */
.chat-thread {
    display: flex; flex-direction: column;
    height: calc(100vh - var(--topbar-h));
    min-height: 0;
}
/* When the bottom tabbar is visible (it floats with bottom: 14px and
   has its own height), shrink the chat-thread so the composer is not
   hidden behind it. The 24px slot covers the tabbar's float offset
   plus a small breathing gap. The tabbar is hidden ≥1024px so the
   wider rule restores the original calc. */
body.has-tabbar .chat-thread {
    height: calc(100vh - var(--topbar-h) - var(--tabbar-h) - 24px);
}
@media (min-width: 1024px) {
    body.has-tabbar .chat-thread { height: calc(100vh - var(--topbar-h)); }
}
.chat-thread .header {
    padding: 12px 16px; display: flex; align-items: center; gap: 12px;
    border-bottom: 1px solid var(--line); background: var(--surface);
    position: sticky; top: 0; z-index: 10;
}
.chat-thread .header .name { font-weight: 700; font-size: 15px; color: var(--ink); }
.chat-thread .header .status { font-size: 11px; color: var(--mint); font-family: var(--f-mono); }
.chat-thread .messages {
    flex: 1; overflow-y: auto;
    padding: 16px 14px 8px;
    display: flex; flex-direction: column; gap: 6px;
}
.chat-thread .day-divider {
    text-align: center; font-size: 11px; color: var(--ink-muted);
    font-family: var(--f-mono); margin: 4px 0 12px;
}
.chat-thread .composer {
    padding: 10px 12px 18px;
    display: flex; gap: 8px; align-items: center;
    border-top: 1px solid var(--line);
    background: var(--surface);
}
.chat-thread .composer input.input {
    flex: 1; padding: 10px 14px;
    border-radius: var(--r-pill);
    background: var(--surface-alt);
    border: none;
    font-size: 14px;
}
.bubble {
    max-width: 78%; padding: 10px 14px;
    border-radius: 18px;
    font-size: 14px; line-height: 1.4;
    word-wrap: break-word;
}
.bubble.them {
    align-self: flex-start;
    background: var(--surface);
    border: 1px solid var(--line);
    border-bottom-left-radius: 6px;
    color: var(--ink);
}
.bubble.mine {
    align-self: flex-end;
    background: var(--primary); color: #fff;
    border-bottom-right-radius: 6px;
}
.bubble .when {
    display: block; font-size: 9px; opacity: 0.6;
    margin-top: 4px; font-family: var(--f-mono);
}
.bubble.mine .when { text-align: right; }
.bubble.gift {
    align-self: flex-start; max-width: 72%;
    padding: 12px 16px; border-radius: 18px;
    border-bottom-left-radius: 6px;
    background: linear-gradient(135deg, var(--saffron-soft), var(--primary-soft));
    border: 1px solid var(--line);
    color: var(--plum);
    display: flex; flex-direction: column; align-items: center; gap: 6px;
    text-align: center;
}

.chat-list .thread {
    padding: 12px 16px;
    display: flex; align-items: center; gap: 12px;
    text-decoration: none; color: var(--ink);
    border-bottom: 1px solid var(--line);
    transition: background 0.15s;
}
.chat-list .thread:hover { background: var(--surface-alt); text-decoration: none; }
.chat-list .thread .meta { flex: 1; min-width: 0; }
.chat-list .thread .top-row { display: flex; align-items: center; gap: 6px; min-width: 0; }
.chat-list .thread .name {
    font-weight: 600; font-size: 15px; color: var(--ink);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    flex-shrink: 1; min-width: 0;
}
.chat-list .thread .time { margin-left: auto; font-size: 11px; color: var(--ink-muted); font-family: var(--f-mono); flex-shrink: 0; }
.chat-list .thread .last {
    margin-top: 4px;
    display: flex; align-items: center; gap: 6px;
    font-size: 13px;
    color: var(--ink-muted);
}
.chat-list .thread.is-unread .last-text { color: var(--ink); font-weight: 600; }
.chat-list .thread .last-text {
    flex: 1; min-width: 0;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.chat-list .thread .badge-count {
    margin-left: auto;
    min-width: 20px; height: 20px; padding: 0 6px;
    border-radius: 10px; background: var(--primary); color: #fff;
    font-family: var(--f-mono); font-size: 11px; font-weight: 700;
    display: grid; place-items: center;
    flex-shrink: 0;
}

.match-strip {
    padding: 0 var(--sp-4) var(--sp-2);
}
.match-strip .strip {
    display: flex; gap: 14px;
    overflow-x: auto;
    scrollbar-width: none;
    padding-top: var(--sp-2);
}
.match-strip .strip::-webkit-scrollbar { display: none; }
.match-strip .item {
    flex-shrink: 0; text-align: center; min-width: 64px;
    text-decoration: none; color: var(--ink);
}
.match-strip .item:hover { text-decoration: none; }

/* ============================================================
   Karma bank
   ============================================================ */
.karma-balance {
    border-radius: var(--r-card);
    padding: 24px 22px;
    background: linear-gradient(135deg, var(--saffron) 0%, var(--coral) 100%);
    color: #3D2900;
    box-shadow: var(--sh-glow-saffron);
    position: relative; overflow: hidden;
}
.karma-balance::before {
    content: '✦';
    position: absolute; right: -10px; top: -20px;
    font-size: 200px; line-height: 1;
    opacity: 0.18;
    color: #fff;
    pointer-events: none;
    font-family: var(--f-display);
}
.karma-balance .label {
    font-family: var(--f-mono); font-size: 11px;
    letter-spacing: 1.4px; text-transform: uppercase;
    opacity: 0.7;
}
.karma-balance .amount {
    font-family: var(--f-mono); font-size: 48px; font-weight: 700;
    letter-spacing: -1px; line-height: 1;
    margin-top: 6px;
}
.karma-balance .delta { margin-top: 8px; font-size: 13px; opacity: 0.82; }
.karma-balance .actions { margin-top: 18px; display: flex; gap: 8px; flex-wrap: wrap; }

.karma-pkg {
    border-radius: var(--r-card);
    padding: 14px 14px 12px;
    background: var(--surface); color: var(--ink);
    border: 1.5px solid var(--line);
    position: relative;
    text-decoration: none;
    display: block;
}
.karma-pkg:hover { text-decoration: none; transform: translateY(-1px); box-shadow: var(--sh-md); }
.karma-pkg.is-popular {
    background: linear-gradient(135deg, var(--primary), var(--violet));
    color: #fff;
    border-color: transparent;
}
.karma-pkg .ribbon {
    position: absolute; top: -8px; left: 14px;
    padding: 3px 8px; border-radius: 999px;
    background: var(--saffron); color: #3D2900;
    font-family: var(--f-mono); font-size: 9px; font-weight: 700; letter-spacing: 1px;
}
.karma-pkg .kp {
    font-family: var(--f-mono); font-size: 24px; font-weight: 700;
    letter-spacing: -0.5px; margin-top: 2px; line-height: 1.1;
}
.karma-pkg .label-sm { font-size: 11px; opacity: 0.85; margin-top: 2px; }
.karma-pkg .price {
    margin-top: 10px; padding: 8px 10px;
    border-radius: var(--r-button);
    background: var(--surface-alt);
    text-align: center;
    font-family: var(--f-mono); font-weight: 700; font-size: 13px;
}
.karma-pkg.is-popular .price { background: rgba(255,255,255,0.18); }

.spend-row {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-card);
    padding: 12px;
    display: flex; align-items: center; gap: 12px;
    text-decoration: none;
    color: var(--ink);
}
.spend-row:hover { background: var(--surface-alt); text-decoration: none; }
.spend-row .glyph {
    width: 40px; height: 40px;
    border-radius: 999px;
    display: grid; place-items: center;
    flex-shrink: 0;
}
.spend-row .body { flex: 1; }
.spend-row .body .title { font-weight: 600; font-size: 14px; color: var(--ink); }
.spend-row .body .sub { font-size: 12px; color: var(--ink-muted); margin-top: 2px; }
.spend-row .cost { font-family: var(--f-mono); font-size: 12px; font-weight: 600; }

/* ============================================================
   Game tile
   ============================================================ */
.game-tile {
    background: var(--surface); border: 1px solid var(--line);
    border-radius: var(--r-card);
    padding: 14px;
    display: flex; flex-direction: column; gap: 10px;
    min-height: 140px;
    text-decoration: none; color: var(--ink);
}
.game-tile:hover { text-decoration: none; box-shadow: var(--sh-sm); }
.game-tile .glyph {
    width: 42px; height: 42px;
    border-radius: 999px;
    display: grid; place-items: center;
}
.game-tile .title {
    font-family: var(--f-display); font-size: 18px;
    color: var(--ink); line-height: 1.05; letter-spacing: -0.3px;
}
.game-tile .sub { font-size: 11px; color: var(--ink-muted); margin-top: 2px; }
.game-tile .stat {
    margin-top: auto;
    font-family: var(--f-mono); font-size: 10px; letter-spacing: 0.6px;
    font-weight: 700; text-transform: uppercase;
}

.game-hero {
    border-radius: var(--r-card); overflow: hidden;
    background: linear-gradient(135deg, var(--violet), var(--primary));
    color: #fff; padding: 20px; margin-bottom: 14px;
    position: relative;
}
.game-hero .label { font-family: var(--f-mono); font-size: 10px; letter-spacing: 1.4px; opacity: 0.8; text-transform: uppercase; }
.game-hero .quote {
    font-family: var(--f-display); font-size: 30px; line-height: 1.05;
    margin-top: 6px; letter-spacing: -0.5px;
}
.game-hero .meta { font-size: 13px; opacity: 0.9; margin-top: 10px; }
.game-hero .actions { display: flex; gap: 8px; margin-top: 16px; flex-wrap: wrap; }

/* ============================================================
   Auth pages
   ============================================================ */
.auth-page {
    min-height: 100vh;
    background: var(--bg);
    position: relative; overflow: hidden;
    display: flex; align-items: stretch; justify-content: center;
    padding: var(--sp-4);
}
.auth-page .blob {
    position: absolute; border-radius: 50%; filter: blur(8px);
    pointer-events: none;
}
.auth-page .blob-1 {
    top: -80px; right: -60px; width: 280px; height: 280px;
    background: radial-gradient(circle, rgba(240,39,107,0.4), transparent 70%);
}
.auth-page .blob-2 {
    top: 120px; left: -80px; width: 240px; height: 240px;
    background: radial-gradient(circle, rgba(123,63,228,0.33), transparent 70%);
}
.auth-page .panel {
    position: relative;
    width: 100%; max-width: 460px;
    padding: var(--sp-6) var(--sp-4) var(--sp-8);
    display: flex; flex-direction: column;
    z-index: 1;
    margin: auto;
}
.auth-page .hero {
    font-family: var(--f-display);
    font-size: clamp(36px, 9vw, 46px);
    line-height: 0.96; color: var(--ink);
    letter-spacing: -1.5px; margin: 0 0 14px;
}
.auth-page .hero em { color: var(--primary); font-style: italic; }
.auth-page .sub {
    font-size: 15px; color: var(--ink-soft);
    line-height: 1.45; max-width: 320px;
    margin-bottom: 28px;
}
.auth-page .pills { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 28px; }
.auth-page .pills span {
    padding: 6px 12px; border-radius: 999px;
    font-size: 12px; font-weight: 600;
}
.auth-page .pill-primary { background: rgba(240,39,107,0.10); color: var(--primary); }
.auth-page .pill-violet  { background: rgba(123,63,228,0.10); color: var(--violet); }
.auth-page .pill-saffron { background: var(--saffron-soft); color: var(--saffron-ink); }
.auth-page .pill-mint    { background: var(--mint-soft); color: var(--mint); }
.auth-page .meta {
    margin-top: 18px; text-align: center;
    font-size: 11px; color: var(--ink-muted); font-family: var(--f-mono);
}

/* ============================================================
   Profile (other user)
   ============================================================ */
.profile-hero {
    position: relative;
}
.profile-hero .photo {
    width: 100%; aspect-ratio: 4/5;
    background: linear-gradient(135deg, var(--primary), var(--violet));
    overflow: hidden;
    display: grid; place-items: center;
    color: #fff; font-family: var(--f-display);
    font-size: 30vw; letter-spacing: -4px; line-height: 1;
}
.profile-hero .photo:not(:has(img))::after {
    content: '';
    position: absolute; inset: 0;
    background-image: repeating-linear-gradient(45deg,
        rgba(255,255,255,0.06) 0 8px, transparent 8px 16px);
}
.profile-hero .photo > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.profile-hero .top-actions {
    position: absolute; top: 14px; left: 14px; right: 14px;
    display: flex; justify-content: space-between; gap: 8px;
    z-index: 1;
}
.profile-hero .photo-dots {
    position: absolute; top: 14px; left: 50%; transform: translateX(-50%);
    display: flex; gap: 4px; z-index: 1;
}
.profile-hero .photo-dots .dot {
    height: 3px; border-radius: 2px;
    background: rgba(255,255,255,0.5); width: 6px;
}
.profile-hero .photo-dots .dot.is-active { width: 20px; background: #fff; }

.profile-id {
    margin: -32px var(--sp-4) 0; position: relative;
    background: var(--surface); border-radius: var(--r-card);
    border: 1px solid var(--line); padding: 18px 18px 16px;
    box-shadow: var(--sh-md);
}
.profile-id .name-row { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.profile-id .name {
    font-family: var(--f-display); font-size: 32px; letter-spacing: -0.8px;
    line-height: 1; color: var(--ink);
}
.profile-id .age { font-size: 22px; font-weight: 300; color: var(--ink-soft); }

.compat-meter {
    margin-top: 16px; padding: 12px 14px;
    border-radius: var(--r-card);
    background: linear-gradient(135deg, var(--primary-soft), var(--plum-soft));
}
.compat-meter .row {
    display: flex; justify-content: space-between; align-items: baseline;
}
.compat-meter .label {
    font-size: 11px; font-family: var(--f-mono); letter-spacing: 1px;
    text-transform: uppercase; color: var(--plum); opacity: 0.85;
}
.compat-meter .value {
    font-family: var(--f-mono); font-weight: 700; font-size: 16px;
    color: var(--plum);
}
.compat-meter .bar {
    margin-top: 8px; height: 6px; border-radius: 3px;
    background: rgba(58,22,82,0.15); overflow: hidden;
}
.compat-meter .bar > .fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--violet));
    border-radius: 3px;
}
.compat-meter .quote {
    margin-top: 6px; font-size: 12px;
    font-family: var(--f-display); font-style: italic;
    color: var(--plum);
}

.profile-section {
    padding: var(--sp-6) var(--sp-4) 0;
}

.hobby-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.hobby-tags .tag {
    padding: 7px 12px; border-radius: 999px;
    background: var(--surface); border: 1px solid var(--line);
    font-size: 13px; color: var(--ink); font-weight: 500;
}

.profile-sticky-actions {
    position: sticky; bottom: 0;
    padding: 12px 16px 24px;
    background: linear-gradient(180deg, transparent, var(--bg) 30%);
    display: flex; gap: 8px; align-items: center;
}

/* ============================================================
   Match modal / celebration
   ============================================================ */
.match-modal {
    position: relative; overflow: hidden;
    background: linear-gradient(160deg, var(--plum), var(--primary) 60%, var(--coral) 110%);
    color: #fff;
    min-height: 100vh;
    padding: 60px 24px 32px;
    display: flex; flex-direction: column;
}
.match-modal::before {
    content: '';
    position: absolute; inset: 0;
    background-image:
        radial-gradient(3px 3px at 10% 15%, #FFD940 50%, transparent),
        radial-gradient(2px 2px at 80% 25%, #FFFFFF 50%, transparent),
        radial-gradient(3px 3px at 30% 60%, #FF8AA0 50%, transparent),
        radial-gradient(2px 2px at 75% 75%, #C7A4E0 50%, transparent),
        radial-gradient(3px 3px at 50% 85%, #FFD940 50%, transparent);
}
.match-modal .content { position: relative; flex: 1; display: flex; flex-direction: column; justify-content: center; text-align: center; }
.match-modal .label {
    font-family: var(--f-mono); font-size: 11px; letter-spacing: 2.4px;
    text-transform: uppercase; opacity: 0.85; margin-bottom: 14px;
}
.match-modal .headline {
    font-family: var(--f-display); font-size: clamp(48px, 10vw, 64px);
    line-height: 0.95; letter-spacing: -2px;
}
.match-modal .headline em { font-style: italic; }

/* ============================================================
   Flashes
   ============================================================ */
.flash {
    padding: 12px 14px; margin: 0 0 12px;
    border-radius: var(--r-button);
    font-size: 14px;
    border: 1px solid transparent;
}
.flash.success { background: var(--mint-soft); color: var(--success); border-color: rgba(0,200,150,0.2); }
.flash.error   { background: rgba(225,29,72,0.08); color: var(--danger); border-color: rgba(225,29,72,0.2); }
.flash.info    { background: rgba(59,154,225,0.10); color: var(--sky); border-color: rgba(59,154,225,0.2); }
.flash.warning { background: var(--saffron-soft); color: var(--saffron-ink); border-color: rgba(245,180,0,0.3); }

.verify-banner {
    display: flex; align-items: center; flex-wrap: wrap; gap: 12px;
    padding: 12px 16px; margin-bottom: 16px;
    background: var(--saffron-soft, #fff5dd); color: var(--saffron-ink, #6b4f00);
    border: 1px solid rgba(245,180,0,0.3); border-radius: var(--r-button, 8px);
    font-size: 14px;
}

.welcome-back-card {
    position: relative;
    padding: 18px 20px; margin-bottom: 16px;
    background: linear-gradient(135deg, rgba(168,85,247,0.06) 0%, rgba(225,29,72,0.04) 100%);
    border: 1px solid rgba(168,85,247,0.18);
    border-radius: 12px;
    font-size: 14px; line-height: 1.5;
}
.welcome-back-card__close {
    position: absolute; top: 8px; right: 12px;
    background: transparent; border: 0;
    font-size: 22px; line-height: 1; color: var(--ink-soft);
    cursor: pointer; padding: 4px 8px; border-radius: 6px;
}
.welcome-back-card__close:hover { background: rgba(0,0,0,0.05); color: var(--ink); }
.welcome-back-card__head {
    display: flex; align-items: center; gap: 12px; margin-bottom: 8px;
}
.welcome-back-card__sign {
    font-size: 28px; line-height: 1;
    width: 44px; height: 44px;
    display: inline-flex; align-items: center; justify-content: center;
    background: rgba(168,85,247,0.10);
    border-radius: 50%;
}
.welcome-back-card__head strong { display:block; font-size: 15px; }
.welcome-back-card__head small { display: block; font-size: 12px; margin-top: 2px; }
.welcome-back-card__body { margin: 6px 0; }
.welcome-back-card__foot { margin-top: 10px; text-align: right; }
.welcome-back-card__dismiss {
    background: transparent; border: 0;
    color: var(--ink-soft); font-size: 12px;
    text-decoration: underline; cursor: pointer;
    padding: 4px 8px;
}
.welcome-back-card__dismiss:hover { color: var(--ink); }
.verify-banner strong { font-weight: 600; }
.verify-banner span { flex: 1 1 240px; }
.verify-banner button { margin-left: auto; }

.error {
    padding: 10px 14px;
    background: rgba(225,29,72,0.08); color: var(--danger);
    border: 1px solid rgba(225,29,72,0.2);
    border-radius: var(--r-button);
    margin-bottom: 12px;
}

/* ============================================================
   Pagination
   ============================================================ */
.pagination {
    display: flex; gap: 6px; justify-content: center;
    margin: var(--sp-6) 0; flex-wrap: wrap;
}
.pagination a, .pagination span {
    padding: 8px 14px;
    border: 1px solid var(--line);
    border-radius: var(--r-button);
    background: var(--surface);
    color: var(--ink); font-size: 14px;
    text-decoration: none;
}
.pagination a:hover { background: var(--surface-alt); text-decoration: none; }
.pagination .current {
    background: var(--primary); color: #fff;
    border-color: var(--primary);
}

/* ============================================================
   Footer
   ============================================================ */
.site-footer {
    margin-top: var(--sp-12);
    background: var(--surface); border-top: 1px solid var(--line);
    color: var(--ink-muted);
    padding: var(--sp-8) var(--sp-4);
}
.site-footer .row {
    max-width: var(--container); margin: 0 auto;
    display: grid; grid-template-columns: 1fr; gap: var(--sp-6);
}
@media (min-width: 640px) { .site-footer .row { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .site-footer .row { grid-template-columns: repeat(4, 1fr); } }
.site-footer h4 { color: var(--ink); font-size: 14px; margin: 0 0 8px; font-family: var(--f-ui); font-weight: 700; }
.site-footer ul { list-style: none; padding: 0; margin: 0; font-size: 13px; }
.site-footer ul li { margin-bottom: 6px; }
.site-footer ul a { color: var(--ink-soft); }
.site-footer ul a:hover { color: var(--primary); }
.site-footer .copy {
    text-align: center; max-width: var(--container); margin: var(--sp-6) auto 0;
    font-size: 12px;
}

/* ============================================================
   Helpers
   ============================================================ */
.row { display: flex; align-items: center; gap: var(--sp-2); flex-wrap: wrap; }
.row.tight { gap: 6px; }
.row.between { justify-content: space-between; }
.row.nowrap { flex-wrap: nowrap; }
.col { display: flex; flex-direction: column; gap: var(--sp-2); }
.stack-sm > * + * { margin-top: var(--sp-2); }
.stack-md > * + * { margin-top: var(--sp-3); }
.stack-lg > * + * { margin-top: var(--sp-6); }
.spacer-sm { height: var(--sp-3); }
.spacer-md { height: var(--sp-6); }
.spacer-lg { height: var(--sp-12); }

.text-display { font-family: var(--f-display); }
.text-mono    { font-family: var(--f-mono); }
.text-primary { color: var(--primary); }
.text-muted   { color: var(--ink-muted); }
.text-ink     { color: var(--ink); }

.skeleton {
    background: linear-gradient(90deg, var(--surface-alt) 0%, var(--surface) 50%, var(--surface-alt) 100%);
    background-size: 200% 100%;
    animation: shimmer 1.4s ease-in-out infinite;
    border-radius: var(--r-card);
}
@keyframes shimmer { 0% { background-position: 200% 0 } 100% { background-position: -200% 0 } }

/* Legacy compat — old class names that pages use; keep working with new tokens */
dl.profile-info { display: grid; grid-template-columns: 140px 1fr; gap: 8px 16px; }
dl.profile-info dt { color: var(--ink-muted); }
.avatar-large { width: 240px; height: 240px; object-fit: cover; border-radius: var(--r-card); }
.popup {
    background: var(--surface); border: 1px solid var(--line);
    border-radius: var(--r-card); padding: 20px;
    max-width: 420px; margin: 0 auto;
    box-shadow: var(--sh-md);
}
.popup h3 { margin: 0 0 12px; font-size: 18px; font-family: var(--f-ui); font-weight: 700; }

/* Filters */
.filters { display: flex; gap: 12px; align-items: center; margin-bottom: 16px; flex-wrap: wrap; }
.filters select, .filters input {
    padding: 8px 12px; border: 1.5px solid var(--line);
    border-radius: var(--r-input); font-size: 14px;
    background: var(--surface); color: var(--ink);
    font-family: inherit;
}

/* ============================================================
   Reduced motion
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
