/* Discreet Affairs — dark & luxurious */

:root {
    --bg: #0e0a0c;
    --bg-2: #140e11;
    --surface: #1b1317;
    --surface-2: #241a1f;
    --surface-3: #2e2228;
    --line: rgba(201, 164, 92, 0.16);
    --line-strong: rgba(201, 164, 92, 0.34);
    --gold: #c9a45c;
    --gold-2: #e5c88d;
    --gold-ink: #1a1206;
    --wine: #7a1e36;
    --wine-2: #a32a49;
    --text: #f1e8e3;
    --muted: #a89790;
    --faint: #6f615b;
    --success: #6fbf8e;
    --danger: #e0677a;
    --radius: 14px;
    --radius-sm: 9px;
    --shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
    --serif: "Didot", "Bodoni MT", "Bodoni 72", "Playfair Display", "Cormorant Garamond", Georgia, "Times New Roman", serif;
    --sans: "Segoe UI", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
    color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background:
        radial-gradient(1200px 600px at 85% -10%, rgba(122, 30, 54, 0.22), transparent 60%),
        radial-gradient(900px 500px at -10% 110%, rgba(201, 164, 92, 0.06), transparent 60%),
        var(--bg);
    background-attachment: fixed;
    color: var(--text);
    font: 16px/1.6 var(--sans);
    -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--gold-2); text-decoration: none; }
a:hover { color: #fff; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.15; margin: 0 0 .5em; letter-spacing: .005em; }
h1 em, h2 em { font-style: italic; color: var(--gold); }
h1 { font-size: clamp(2rem, 4vw, 2.75rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }
kbd { font: 600 .8em var(--sans); background: var(--surface-3); border: 1px solid var(--line-strong); border-radius: 5px; padding: 1px 6px; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
[hidden] { display: none !important; }

.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.main { flex: 1; padding-top: 32px; padding-bottom: 64px; }
.main-wide { flex: 1; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.fine { font-size: .8rem; color: var(--faint); }
.center { text-align: center; }
.eyebrow { font: 600 .72rem/1 var(--sans); letter-spacing: .22em; text-transform: uppercase; color: var(--gold); margin-bottom: 14px; }
.h-small { font-size: 1.25rem; margin-bottom: .75em; }
.skip-link { position: absolute; left: -999px; top: 8px; background: var(--gold); color: var(--gold-ink); padding: 8px 14px; border-radius: 6px; z-index: 100; }
.skip-link:focus { left: 8px; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    min-height: 42px; padding: 0 20px; border-radius: 999px;
    font: 600 .9rem/1 var(--sans); letter-spacing: .02em;
    border: 1px solid transparent; cursor: pointer; transition: all .18s ease; white-space: nowrap;
    background: none; color: var(--text);
}
.btn-gold { background: linear-gradient(135deg, var(--gold-2), var(--gold) 55%, #a8823e); color: var(--gold-ink); box-shadow: 0 6px 20px rgba(201, 164, 92, .18); }
.btn-gold:hover { color: var(--gold-ink); filter: brightness(1.08); transform: translateY(-1px); }
.btn-ghost { border-color: var(--line-strong); color: var(--gold-2); }
.btn-ghost:hover { background: rgba(201, 164, 92, .08); color: #fff; border-color: var(--gold); }
.btn-ghost.is-on { background: rgba(163, 42, 73, .2); border-color: var(--wine-2); color: #ffd5de; }
.btn-danger { background: var(--wine); color: #fff; }
.btn-danger:hover { background: var(--wine-2); }
.btn-link { padding: 0; min-height: auto; color: var(--muted); font-weight: 500; border-radius: 0; }
.btn-link:hover { color: var(--gold-2); }
.btn-danger-text:hover { color: var(--danger); }
.btn-lg { min-height: 52px; padding: 0 30px; font-size: 1rem; }
.btn-block { width: 100%; }

.badge { display: inline-grid; place-items: center; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 999px; background: var(--wine-2); color: #fff; font: 700 .7rem/1 var(--sans); }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; border: 1px solid var(--line-strong); font-size: .78rem; color: var(--gold-2); background: rgba(0, 0, 0, .35); }
.pill-gold { background: var(--gold); color: var(--gold-ink); border-color: var(--gold); font-weight: 700; }
.pill-muted { color: var(--muted); margin: 0; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 40; background: rgba(14, 10, 12, .82); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; gap: 18px; height: 68px; }
.brand { display: flex; align-items: center; gap: 11px; color: var(--gold); flex-shrink: 0; }
.brand:hover { color: var(--gold-2); }
.logo { width: 34px; height: 34px; color: var(--gold); flex-shrink: 0; }
.brand-name { font: 400 1.3rem/1 var(--serif); color: var(--text); letter-spacing: .02em; }
.brand-name em { color: var(--gold); }

.main-nav { display: flex; gap: 4px; margin-left: auto; }
.main-nav a { position: relative; display: flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 999px; color: var(--muted); font-size: .9rem; font-weight: 500; }
.main-nav a:hover { color: var(--text); background: rgba(255, 255, 255, .04); }
.main-nav a.active { color: var(--gold-2); background: rgba(201, 164, 92, .1); }
.main-nav svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linejoin: round; stroke-linecap: round; }
.header-actions { display: flex; gap: 10px; margin-left: auto; }

.account-menu { position: relative; }
.account-menu summary { list-style: none; display: flex; align-items: center; gap: 9px; cursor: pointer; padding: 4px 12px 4px 4px; border-radius: 999px; border: 1px solid var(--line); }
.account-menu summary::-webkit-details-marker { display: none; }
.account-menu summary:hover { border-color: var(--line-strong); }
.account-name { font-size: .88rem; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu-panel { position: absolute; right: 0; top: calc(100% + 10px); min-width: 220px; background: var(--surface-2); border: 1px solid var(--line-strong); border-radius: var(--radius); box-shadow: var(--shadow); padding: 8px; display: grid; }
.menu-panel a, .menu-panel button { display: block; width: 100%; text-align: left; padding: 10px 12px; border-radius: 8px; color: var(--text); font: 500 .9rem var(--sans); background: none; border: 0; cursor: pointer; }
.menu-panel a:hover, .menu-panel button:hover { background: rgba(201, 164, 92, .1); color: var(--gold-2); }
.menu-panel form { margin: 0; border-top: 1px solid var(--line); margin-top: 4px; padding-top: 4px; }

.quick-exit { display: flex; align-items: center; gap: 7px; padding: 8px 14px; border-radius: 999px; border: 1px solid rgba(224, 103, 122, .45); background: rgba(122, 30, 54, .35); color: #ffd5dc; font: 600 .8rem/1 var(--sans); cursor: pointer; flex-shrink: 0; }
.quick-exit:hover { background: var(--wine-2); color: #fff; }
.quick-exit svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Avatars ---------- */
.avatar { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.avatar-sm { width: 32px; height: 32px; }
.avatar-fallback { display: inline-grid; place-items: center; font: 400 1.1rem/1 var(--serif); color: var(--gold-2); }
.avatar-sm.avatar-fallback { font-size: .9rem; }
.av-0 { background: linear-gradient(135deg, #4a1424, #1e0c13); }
.av-1 { background: linear-gradient(135deg, #3d2a14, #160f08); }
.av-2 { background: linear-gradient(135deg, #2b1a33, #120b16); }
.av-3 { background: linear-gradient(135deg, #14303a, #081418); }
.av-4 { background: linear-gradient(135deg, #3a1a1a, #180a0a); }
.av-5 { background: linear-gradient(135deg, #2c2a16, #131209); }

/* ---------- Flash ---------- */
.flashes { display: grid; gap: 10px; margin-bottom: 24px; }
.main-wide .flashes { padding-top: 20px; margin-bottom: 0; }
.flash { padding: 13px 18px; border-radius: var(--radius-sm); border: 1px solid var(--line-strong); background: var(--surface); font-size: .92rem; }
.flash-success { border-color: rgba(111, 191, 142, .4); background: rgba(111, 191, 142, .08); }
.flash-error { border-color: rgba(224, 103, 122, .5); background: rgba(224, 103, 122, .1); }
.flash-info { border-color: var(--line-strong); background: rgba(201, 164, 92, .06); }
.flash a { text-decoration: underline; }

/* ---------- Landing ---------- */
.hero { position: relative; overflow: hidden; padding: 110px 0 120px; border-bottom: 1px solid var(--line); }
.hero-glow { position: absolute; inset: -20% -10% auto auto; width: 70%; height: 140%; background: radial-gradient(closest-side, rgba(163, 42, 73, .35), transparent 70%); filter: blur(10px); pointer-events: none; }
.hero::after { content: ""; position: absolute; inset: 0; pointer-events: none; background-image: linear-gradient(rgba(201, 164, 92, .05) 1px, transparent 1px), linear-gradient(90deg, rgba(201, 164, 92, .05) 1px, transparent 1px); background-size: 64px 64px; mask-image: radial-gradient(ellipse at 30% 40%, #000 0%, transparent 70%); -webkit-mask-image: radial-gradient(ellipse at 30% 40%, #000 0%, transparent 70%); }
.hero-inner { position: relative; z-index: 1; max-width: 1180px; }
.hero h1 { font-size: clamp(2.6rem, 7vw, 5.2rem); line-height: 1.02; margin-bottom: 26px; }
.lede { font-size: clamp(1.05rem, 1.8vw, 1.25rem); color: var(--muted); max-width: 560px; margin-bottom: 36px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 22px; }
.hero-note { color: var(--faint); font-size: .88rem; letter-spacing: .04em; }

.section { padding: 96px 20px; }
.section-head { max-width: 640px; margin-bottom: 48px; }
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.feature { background: var(--bg-2); padding: 34px 30px; transition: background .2s; }
.feature:hover { background: var(--surface); }
.feature svg { width: 34px; height: 34px; fill: none; stroke: var(--gold); stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round; margin-bottom: 18px; }
.feature p { color: var(--muted); margin: 0; font-size: .95rem; }

.steps-band { background: linear-gradient(180deg, var(--bg-2), var(--surface)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 96px 0; }
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; }
.step-num { display: block; font: italic 400 2.6rem/1 var(--serif); color: var(--gold); margin-bottom: 18px; }
.steps p { color: var(--muted); }

.cta-final { text-align: center; }
.cta-final h2 { font-size: clamp(2rem, 5vw, 3.4rem); margin-bottom: 32px; }
.cta-final .fine { margin-top: 20px; }

/* ---------- Auth ---------- */
.auth-wrap { display: grid; place-items: center; padding: 20px 0; }
.auth-card { width: 100%; max-width: 440px; background: linear-gradient(180deg, var(--surface), var(--bg-2)); border: 1px solid var(--line-strong); border-radius: 20px; padding: 40px; box-shadow: var(--shadow); }
.auth-card-wide { max-width: 720px; }
.auth-mark { display: grid; place-items: center; margin-bottom: 16px; }
.auth-mark .logo { width: 52px; height: 52px; }
.auth-card h1 { text-align: center; }
.auth-card-wide h1 { text-align: left; }
.auth-card .flash { margin-bottom: 18px; }

/* ---------- Forms ---------- */
.form { display: grid; gap: 18px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.span-2 { grid-column: span 2; }
.field { display: grid; gap: 7px; margin: 0; border: 0; padding: 0; min-width: 0; }
.field > span, .field legend { font-size: .82rem; font-weight: 600; letter-spacing: .04em; color: var(--gold-2); padding: 0; }
.field small { color: var(--faint); font-size: .78rem; }
.optional { font-style: normal; font-weight: 400; color: var(--faint); letter-spacing: 0; }
.field-error { color: var(--danger); font-size: .82rem; }
input, select, textarea {
    width: 100%; font: inherit; color: var(--text);
    background: rgba(0, 0, 0, .35); border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
    padding: 11px 14px; transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(201, 164, 92, .15); }
select { appearance: none; -webkit-appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--gold) 50%), linear-gradient(135deg, var(--gold) 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 36px; }
select option { background: var(--surface-2); }
input[type="date"]::-webkit-calendar-picker-indicator { filter: invert(.8) sepia(1) saturate(2) hue-rotate(5deg); }
textarea { resize: vertical; min-height: 44px; }
.check { display: flex; gap: 11px; align-items: flex-start; font-size: .9rem; color: var(--muted); cursor: pointer; }
.check input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--gold); flex-shrink: 0; padding: 0; }
.check a { text-decoration: underline; }
.check-inline { align-items: center; white-space: nowrap; }
.check-inline input { margin: 0; }

.chip-checks { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-checks label { cursor: pointer; }
.chip-checks input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chip-checks span { display: inline-block; padding: 8px 14px; border: 1px solid var(--line-strong); border-radius: 999px; font-size: .85rem; color: var(--muted); transition: all .15s; }
.chip-checks input:checked + span { background: rgba(201, 164, 92, .14); border-color: var(--gold); color: var(--gold-2); }
.chip-checks input:focus-visible + span { outline: 2px solid var(--gold); outline-offset: 2px; }

.switch { display: flex; gap: 14px; align-items: flex-start; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch-track { position: relative; width: 44px; height: 24px; border-radius: 999px; background: var(--surface-3); border: 1px solid var(--line-strong); flex-shrink: 0; transition: background .2s; margin-top: 2px; }
.switch-track::after { content: ""; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: var(--muted); transition: transform .2s, background .2s; }
.switch input:checked + .switch-track { background: rgba(201, 164, 92, .3); border-color: var(--gold); }
.switch input:checked + .switch-track::after { transform: translateX(20px); background: var(--gold-2); }
.switch input:focus-visible + .switch-track { outline: 2px solid var(--gold); outline-offset: 2px; }

/* ---------- Page chrome ---------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 28px; }
.page-head h1 { margin: 0; }
.page-head .eyebrow { margin-bottom: 10px; }
.panel { background: linear-gradient(180deg, var(--surface), var(--bg-2)); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; margin-bottom: 20px; }
.panel-danger { border-color: rgba(224, 103, 122, .3); }
.empty { text-align: center; padding: 80px 20px; max-width: 460px; margin: 0 auto; }
.empty .logo { width: 56px; height: 56px; margin: 0 auto 22px; opacity: .7; }
.empty p { color: var(--muted); }
.section-sm { margin-top: 40px; }

/* ---------- Browse ---------- */
.filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 14px 18px; padding: 18px 20px; margin-bottom: 30px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.filters label:not(.check) { display: grid; gap: 6px; font-size: .75rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--gold); }
.filters select { min-width: 170px; padding-top: 9px; padding-bottom: 9px; }
.age-range { grid-template-columns: auto auto auto; }
.age-range span { grid-column: 1 / -1; }
.age-range input { width: 74px; padding: 9px 10px; }
.age-range i { align-self: center; font-style: normal; color: var(--muted); }
.filters .btn { margin-left: auto; }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 20px; }
.card { display: block; border-radius: var(--radius); overflow: hidden; background: var(--surface); border: 1px solid var(--line); color: var(--text); transition: transform .2s, border-color .2s, box-shadow .2s; }
.card:hover { transform: translateY(-3px); border-color: var(--line-strong); box-shadow: var(--shadow); color: var(--text); }
.card-photo { position: relative; aspect-ratio: 4 / 5; overflow: hidden; }
.card-img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.card:hover .card-img { transform: scale(1.04); }
.card-img.avatar-fallback { display: grid; font-size: 4.5rem; color: rgba(229, 200, 141, .55); }
.card-photo::after { content: ""; position: absolute; inset: 55% 0 0; background: linear-gradient(transparent, rgba(14, 10, 12, .7)); pointer-events: none; }
.online-dot { position: absolute; top: 12px; right: 12px; width: 11px; height: 11px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 3px rgba(14, 10, 12, .7); z-index: 1; }
.demo-tag { position: absolute; top: 10px; left: 10px; z-index: 1; padding: 3px 9px; border-radius: 999px; background: rgba(0, 0, 0, .65); border: 1px solid var(--line-strong); color: var(--muted); font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; }
.card-body { padding: 14px 16px 18px; }
.card-body h3 { font-size: 1.15rem; margin: 0 0 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.age { color: var(--gold); font-style: italic; }
.card-loc { font-size: .82rem; color: var(--muted); margin: 0 0 8px; }
.card-tagline { font: italic .9rem/1.45 var(--serif); color: #d8c9c1; margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pager { display: flex; justify-content: center; gap: 12px; margin-top: 36px; }

/* ---------- Profile ---------- */
.profile { display: grid; grid-template-columns: minmax(280px, 420px) 1fr; gap: 44px; align-items: start; }
.profile-photo { position: relative; border-radius: 18px; overflow: hidden; border: 1px solid var(--line-strong); aspect-ratio: 4 / 5; background: var(--surface); box-shadow: var(--shadow); }
.profile-photo img { width: 100%; height: 100%; object-fit: cover; }
.profile-photo a { display: block; height: 100%; cursor: zoom-in; }
.profile-fallback { width: 100%; height: 100%; display: grid; font-size: 8rem; color: rgba(229, 200, 141, .5); }
.presence { font-size: .82rem; color: var(--muted); margin-bottom: 8px; display: flex; align-items: center; gap: 8px; }
.presence::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--faint); }
.presence.is-online { color: var(--success); }
.presence.is-online::before { background: var(--success); }
.profile-info h1 { margin-bottom: 4px; }
.profile-loc { color: var(--muted); margin-bottom: 18px; }
.profile-tagline { font: italic 1.35rem/1.4 var(--serif); color: #e6d8cf; border-left: 2px solid var(--gold); padding-left: 18px; margin-bottom: 26px; }
.profile-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 30px; }
.profile-actions form { margin: 0; }
.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; margin: 0 0 30px; }
.facts div { background: var(--surface); padding: 12px 16px; }
.facts dt { font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); margin-bottom: 3px; }
.facts dd { margin: 0; font-size: .95rem; }
.chips { list-style: none; padding: 0; margin: 0 0 30px; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { padding: 7px 14px; border-radius: 999px; background: rgba(201, 164, 92, .1); border: 1px solid var(--line-strong); color: var(--gold-2); font-size: .85rem; }
.prose { color: #ddd0c8; max-width: 640px; }

.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.gallery a, .locked { display: block; aspect-ratio: 4 / 5; border-radius: var(--radius-sm); overflow: hidden; border: 1px solid var(--line); }
.gallery a { cursor: zoom-in; }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.gallery a:hover img { transform: scale(1.05); }
.locked { display: grid; place-items: center; background: repeating-linear-gradient(135deg, var(--surface), var(--surface) 10px, var(--surface-2) 10px, var(--surface-2) 20px); }
.locked svg { width: 34px; height: 34px; fill: none; stroke: var(--gold); stroke-width: 1.3; }
.vault-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.vault-head h2 { margin: 0; }
.vault-head form { margin: 0; }
.profile-controls { display: flex; gap: 28px; flex-wrap: wrap; padding-top: 24px; border-top: 1px solid var(--line); }
.profile-controls form { margin: 0; }

/* ---------- Edit profile ---------- */
.edit-layout { display: grid; grid-template-columns: 1fr 1.15fr; gap: 20px; align-items: start; }
.photo-manager { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; margin-bottom: 20px; }
.pm-item { position: relative; margin: 0; border-radius: var(--radius-sm); overflow: hidden; border: 1px solid var(--line); background: var(--bg); }
.pm-item img { aspect-ratio: 4 / 5; object-fit: cover; width: 100%; }
.pm-item.is-private img { filter: saturate(.6) brightness(.85); }
.pm-item figcaption { position: absolute; top: 8px; left: 8px; display: flex; gap: 5px; }
.pm-item figcaption .pill { font-size: .66rem; padding: 3px 8px; }
.pm-actions { display: grid; }
.pm-actions form { margin: 0; }
.pm-actions button { width: 100%; padding: 8px; background: var(--surface-2); border: 0; border-top: 1px solid var(--line); color: var(--muted); font: 500 .78rem var(--sans); cursor: pointer; }
.pm-actions button:hover { color: var(--gold-2); background: var(--surface-3); }
.pm-actions button.danger:hover { color: var(--danger); }
.upload-form { display: grid; gap: 14px; }
.upload-drop { position: relative; display: grid; place-items: center; gap: 8px; text-align: center; padding: 28px 18px; border: 1.5px dashed var(--line-strong); border-radius: var(--radius); color: var(--muted); font-size: .88rem; cursor: pointer; transition: all .15s; }
.upload-drop:hover { border-color: var(--gold); color: var(--gold-2); background: rgba(201, 164, 92, .04); }
.upload-drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.upload-drop svg { width: 30px; height: 30px; fill: none; stroke: var(--gold); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Messages ---------- */
.conversations { list-style: none; padding: 0; margin: 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.conversations li + li { border-top: 1px solid var(--line); }
.convo { display: flex; align-items: center; gap: 14px; padding: 16px 20px; color: var(--text); background: var(--surface); transition: background .15s; }
.convo:hover { background: var(--surface-2); color: var(--text); }
.convo.is-unread { background: linear-gradient(90deg, rgba(201, 164, 92, .08), var(--surface)); }
.convo.is-unread strong { color: var(--gold-2); }
.convo-avatar { position: relative; }
.convo-avatar .avatar { width: 52px; height: 52px; }
.convo-avatar .online-dot { top: auto; bottom: 1px; right: 1px; width: 12px; height: 12px; }
.convo-main { flex: 1; min-width: 0; display: grid; gap: 3px; }
.convo-top { display: flex; justify-content: space-between; gap: 10px; }
.convo-top strong { font-family: var(--serif); font-weight: 400; font-size: 1.1rem; }
.convo-top time { font-size: .78rem; color: var(--faint); white-space: nowrap; }
.convo-preview { font-size: .9rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.convo.is-unread .convo-preview { color: var(--text); }

.thread-wrap { max-width: 820px; margin: 0 auto; display: flex; flex-direction: column; height: calc(100vh - 68px - 64px); min-height: 480px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.thread-head { display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-bottom: 1px solid var(--line); background: var(--bg-2); }
.thread-head .back { font-size: 1.3rem; color: var(--muted); padding: 0 4px; }
.thread-head form { margin: 0 0 0 auto; }
.thread-who { display: flex; align-items: center; gap: 12px; color: var(--text); }
.thread-who strong { display: block; font: 400 1.15rem/1.2 var(--serif); }
.thread-who .presence { margin: 0; font-size: .76rem; }
.thread { flex: 1; overflow-y: auto; padding: 24px 20px; display: flex; flex-direction: column; gap: 10px; }
.thread-empty { margin: auto; max-width: 380px; text-align: center; color: var(--muted); font-size: .92rem; }
.msg { max-width: 75%; padding: 10px 15px 8px; border-radius: 18px; font-size: .95rem; line-height: 1.45; word-wrap: break-word; }
.msg p { margin: 0 0 3px; }
.msg time { display: block; font-size: .68rem; opacity: .6; text-align: right; }
.msg.theirs { align-self: flex-start; background: var(--surface-3); border-bottom-left-radius: 5px; }
.msg.mine { align-self: flex-end; background: linear-gradient(135deg, #8d2541, var(--wine)); color: #fff1f4; border-bottom-right-radius: 5px; }
.msg.is-sending { opacity: .55; }
.composer { display: flex; gap: 10px; padding: 14px; border-top: 1px solid var(--line); background: var(--bg-2); align-items: flex-end; }
.composer textarea { border-radius: 22px; max-height: 160px; padding: 11px 18px; }
.composer .btn { height: 46px; }

/* ---------- Access / settings ---------- */
.access-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 1px; background: var(--line); border-radius: var(--radius-sm); overflow: hidden; }
.access-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; background: var(--surface); flex-wrap: wrap; }
.access-who { display: flex; align-items: center; gap: 12px; color: var(--text); }
.access-who strong { font-family: var(--serif); font-weight: 400; font-size: 1.05rem; }
.access-actions { display: flex; gap: 8px; }
.access-actions form, .access-row form { margin: 0; }
.access-actions .btn, .access-row .btn { min-height: 36px; padding: 0 16px; font-size: .82rem; }
.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
.settings-grid .panel { margin: 0; }

/* ---------- Docs ---------- */
.doc { max-width: 760px; margin: 0 auto; }
.doc h2 { font-size: 1.45rem; margin-top: 2em; }
.doc p, .doc li { color: #ddd0c8; }
.doc li { margin-bottom: .45em; }
.doc a { text-decoration: underline; }
.draft-note { padding: 12px 16px; border: 1px dashed var(--gold); border-radius: var(--radius-sm); color: var(--gold-2) !important; font-size: .9rem; }

/* ---------- Email flows ---------- */
.label-row { display: flex; justify-content: space-between; gap: 10px; }
.label-row a { font-weight: 500; letter-spacing: 0; color: var(--muted); }
.label-row a:hover { color: var(--gold-2); }
.resend-form { margin-bottom: 18px; }
.auth-card .center strong { color: var(--text); word-break: break-all; }
.message-actions { justify-content: center; margin-top: 24px; }
.dev-mail header { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.dev-mail pre { margin: 0; white-space: pre-wrap; word-break: break-word; font: .9rem/1.6 var(--sans); color: #ddd0c8; }
.dev-mail pre a { text-decoration: underline; }
code { font-size: .88em; background: var(--surface-3); padding: 1px 6px; border-radius: 5px; }

/* ---------- Membership ---------- */
.membership-status h2 { margin: 14px 0 8px; }
.membership-status p { margin: 0; max-width: 640px; }
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin: 8px 0 24px; }
.plan { position: relative; display: grid; gap: 6px; align-content: start; text-align: center; padding: 32px 24px 24px; border-radius: var(--radius); border: 1px solid var(--line); background: linear-gradient(180deg, var(--surface), var(--bg-2)); }
.plan h3 { margin: 0; }
.plan .btn { margin-top: 14px; }
.plan-featured { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold), var(--shadow); }
.plan-flag { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); padding: 4px 12px; border-radius: 999px; background: var(--gold); color: var(--gold-ink); font: 700 .7rem/1.2 var(--sans); letter-spacing: .1em; text-transform: uppercase; white-space: nowrap; }
.plan-price { font: 400 2.4rem/1.1 var(--serif); color: var(--gold-2); margin: 6px 0 0; }
.billing-notes { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-bottom: 24px; font-size: .9rem; color: var(--muted); }
.billing-notes strong { color: var(--text); }
.history { list-style: none; padding: 0; margin: 0; }
.history li { display: flex; gap: 12px; justify-content: space-between; flex-wrap: wrap; padding: 10px 0; border-top: 1px solid var(--line); }
.history li:first-child { border-top: 0; }
.checkout-summary { margin: 8px 0 18px; }
.plan form { margin: 0; }
.plan form + form { margin-top: 8px; }
.plan form .btn { margin-top: 10px; }
.plan .btn[disabled] { opacity: .4; cursor: not-allowed; transform: none; filter: none; }
.plan-short { margin: 4px 0 0; }
.wallet { display: grid; grid-template-columns: 1fr 1.4fr; gap: 28px; align-items: center; }
.wallet-balance .plan-price { margin: 0 0 6px; }
.wallet-balance p:last-child { margin: 0; }
.wallet-form .fine { margin: 0; }
.paywall { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; padding: 16px 18px; border-top: 1px solid var(--line); background: linear-gradient(90deg, rgba(201, 164, 92, .1), var(--bg-2)); }
.paywall p { margin: 0; display: grid; gap: 2px; font-size: .92rem; }

/* ---------- Reports ---------- */
.reason-list { display: grid; gap: 10px; }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.thread-head .thread-report { margin-left: auto; }
.thread-head .thread-report + form { margin-left: 14px; }

/* ---------- Admin ---------- */
.admin-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 26px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.admin-bar form { margin: 0; }
.admin-nav, .tabs { display: flex; gap: 4px; flex-wrap: wrap; }
.admin-nav a, .tabs a { padding: 8px 14px; border-radius: 999px; color: var(--muted); font-size: .9rem; font-weight: 500; }
.admin-nav a:hover, .tabs a:hover { color: var(--text); background: rgba(255, 255, 255, .04); }
.admin-nav a.active, .tabs a.active { color: var(--gold-2); background: rgba(201, 164, 92, .1); }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; margin-bottom: 14px; }
.stat { display: grid; gap: 4px; padding: 20px; border-radius: var(--radius); border: 1px solid var(--line); background: linear-gradient(180deg, var(--surface), var(--bg-2)); color: var(--text); }
.stat:hover { border-color: var(--line-strong); color: var(--text); }
.stat-value { font: 400 2rem/1.1 var(--serif); color: var(--gold-2); }
.stat-label { font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.stat-alert { border-color: var(--wine-2); background: linear-gradient(180deg, rgba(163, 42, 73, .25), var(--bg-2)); }
.stat-alert .stat-value { color: #ffd5de; }
.table-wrap { overflow-x: auto; padding: 8px 12px; }
.admin-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.admin-table th { text-align: left; font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; color: var(--gold); font-weight: 600; padding: 10px 10px; border-bottom: 1px solid var(--line-strong); }
.admin-table td { padding: 11px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.admin-table td .muted.small { display: block; }
.admin-table tr:last-child td { border-bottom: 0; }
.nowrap { white-space: nowrap; }
.pill-danger { border-color: rgba(224, 103, 122, .6); color: #ffd5dc; background: rgba(163, 42, 73, .3); }
.report { margin-bottom: 14px; }
.report-urgent { border-color: var(--danger); box-shadow: inset 4px 0 0 var(--danger); }
.report-head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.report-head > div { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.report-target { font: 400 1.25rem/1.2 var(--serif); }
.report-details { color: #ddd0c8; background: rgba(0, 0, 0, .25); border-left: 2px solid var(--line-strong); padding: 10px 14px; border-radius: 0 8px 8px 0; }
.evidence { margin-bottom: 16px; }
.evidence summary { cursor: pointer; color: var(--gold-2); font-size: .9rem; }
.evidence-list { margin-top: 10px; max-height: 360px; overflow-y: auto; padding: 12px 14px; background: rgba(0, 0, 0, .3); border-radius: var(--radius-sm); }
.evidence-list p { margin: 0 0 12px; font-size: .9rem; }
.report-actions { display: grid; gap: 12px; padding-top: 14px; border-top: 1px solid var(--line); }
.facts-admin { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.facts-admin dd { word-break: break-word; }
.form-spaced { margin-top: 22px; padding-top: 22px; border-top: 1px solid var(--line); }
.menu-panel a .badge { margin-left: 6px; }

/* ---------- Lightbox ---------- */
.lightbox { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 24px; background: rgba(5, 3, 4, .92); backdrop-filter: blur(6px); cursor: zoom-out; }
.lightbox img { max-height: 90vh; max-width: 100%; border-radius: var(--radius-sm); box-shadow: var(--shadow); }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 34px 0; background: var(--bg); }
.footer-inner { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.footer-brand { display: flex; align-items: center; gap: 10px; font-family: var(--serif); color: var(--muted); }
.footer-brand .logo { width: 24px; height: 24px; }
.site-footer nav { display: flex; gap: 22px; flex-wrap: wrap; }
.site-footer nav a { color: var(--muted); font-size: .88rem; }
.site-footer nav a:hover { color: var(--gold-2); }
.site-footer .fine { margin: 0 0 0 auto; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
    .main-nav span { display: none; }
    .main-nav a { padding: 10px 12px; }
    .main-nav .badge { position: absolute; top: 2px; right: 0; }
    .account-name { display: none; }
    .account-menu summary { padding: 4px; }
    .edit-layout, .settings-grid { grid-template-columns: 1fr; }
    .features { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
    .container { padding: 0 16px; }
    .header-inner { height: 60px; gap: 10px; }
    .brand-name { font-size: 1.1rem; }
    .signed-in .brand-name { display: none; }
    .signed-in .account-menu { margin-left: auto; }
    .quick-exit span { display: none; }
    .quick-exit { padding: 9px; }
    .header-actions .btn { min-height: 36px; padding: 0 14px; font-size: .82rem; }
    .signed-out .header-actions .btn-ghost { display: none; }

    /* Main nav becomes a bottom tab bar */
    .main-nav { position: fixed; bottom: 0; left: 0; right: 0; z-index: 40; margin: 0; justify-content: space-around; padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); background: rgba(14, 10, 12, .95); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--line); }
    .main-nav a { flex-direction: column; gap: 3px; padding: 6px 10px; border-radius: 10px; font-size: .68rem; }
    .main-nav span { display: block; }
    .main-nav .badge { top: 0; right: 6px; }
    .signed-in .site-footer { padding-bottom: 96px; }
    .signed-in .main { padding-bottom: 96px; }

    .hero { padding: 72px 0 80px; }
    .section, .steps-band { padding: 64px 16px; }
    .steps-band { padding: 64px 0; }
    .features, .steps, .grid-2 { grid-template-columns: 1fr; }
    .span-2 { grid-column: auto; }
    .auth-card { padding: 28px 20px; border-radius: 16px; }
    .panel { padding: 20px; }
    .filters { padding: 16px; }
    .filters label:not(.check) { flex: 1 1 140px; }
    .filters select { min-width: 0; }
    .filters .btn { width: 100%; margin: 0; }
    .cards { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .card-body { padding: 10px 12px 14px; }
    .card-body h3 { font-size: 1rem; }
    .card-tagline { display: none; }
    .profile { grid-template-columns: 1fr; gap: 26px; }
    .plans, .billing-notes, .wallet { grid-template-columns: 1fr; gap: 22px; }
    .thread-wrap { height: calc(100vh - 60px - 140px); border-radius: 12px; }
    .msg { max-width: 86%; }
    .site-footer .fine { margin: 0; }
}
