/* Africa.red design system. Mobile first. No framework. */

:root {
  --red: #C8281E; --red-600: #A81F17; --red-50: #FDEDEB;
  --saffron: #F5A623; --saffron-50: #FFF5E2;
  --green: #0B7A55; --green-50: #E5F4EE;
  --ink: #1C1613; --ink-2: #4A413C; --ink-3: #7A706A;
  --line: #E7E3DF; --line-2: #D9D3CD;
  --bg: #F4F3F1; --surface: #FFFFFF; --surface-2: #FAF9F7; --hover: #F1EFEC;
  --focus: #2563EB;
  --r-sm: 8px; --r: 12px; --r-lg: 18px; --pill: 999px;
  --shadow: 0 1px 2px rgba(28,22,19,.06), 0 4px 16px rgba(28,22,19,.06);
  --shadow-lg: 0 12px 40px rgba(28,22,19,.18);
  --display: 'Bricolage Grotesque', ui-sans-serif, system-ui, sans-serif;
  --body: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif;
  --top: 60px; --tabbar: 62px;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --red: #F0574B; --red-600: #FF7468; --red-50: #3A1B18;
  --saffron: #F8B84A; --saffron-50: #33280F;
  --green: #3CC593; --green-50: #12302A;
  --ink: #F3EEEA; --ink-2: #CFC6C0; --ink-3: #9C928B;
  --line: #2E2724; --line-2: #3B332F;
  --bg: #120E0C; --surface: #1B1613; --surface-2: #211B18; --hover: #2A2320;
  --shadow: 0 1px 2px rgba(0,0,0,.4); --shadow-lg: 0 12px 40px rgba(0,0,0,.6);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --red: #F0574B; --red-600: #FF7468; --red-50: #3A1B18;
    --saffron: #F8B84A; --saffron-50: #33280F;
    --green: #3CC593; --green-50: #12302A;
    --ink: #F3EEEA; --ink-2: #CFC6C0; --ink-3: #9C928B;
    --line: #2E2724; --line-2: #3B332F;
    --bg: #120E0C; --surface: #1B1613; --surface-2: #211B18; --hover: #2A2320;
    --shadow: 0 1px 2px rgba(0,0,0,.4); --shadow-lg: 0 12px 40px rgba(0,0,0,.6);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--top) + 12px); }
body { margin: 0; font: 400 15px/1.5 var(--body); color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; overflow-wrap: anywhere; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--red); }
p a, .prose a, .post-text a, .comment-text a { color: var(--red); }
p a:hover, .prose a:hover { text-decoration: underline; }
h1, h2, h3, h4 { font-family: var(--display); line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.01em; font-weight: 700; }
h1 { font-size: clamp(1.6rem, 1.2rem + 1.8vw, 2.3rem); }
h2 { font-size: 1.3rem; }
h3 { font-size: 1.08rem; }
p { margin: 0 0 1em; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
.i { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; vertical-align: -4px; }
.i.fill { fill: currentColor; stroke: none; }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hp { position: absolute; left: -9999px; height: 0; overflow: hidden; }
.muted { color: var(--ink-3); }
.small { font-size: .85rem; }
.nowrap { white-space: nowrap; }
.skip { position: absolute; left: 8px; top: -60px; background: var(--ink); color: var(--surface); padding: 8px 14px; border-radius: var(--r-sm); z-index: 200; }
.skip:focus { top: 8px; color: var(--surface); }

/* ---------------------------------------------------------------- top bar */
.top { position: sticky; top: 0; z-index: 50; height: var(--top); background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.top-in { max-width: 1280px; margin: 0 auto; height: 100%; display: flex; align-items: center; gap: 12px; padding: 0 16px; }
.brand { display: flex; align-items: center; gap: 9px; font-family: var(--display); font-weight: 800; font-size: 1.28rem; letter-spacing: -.02em; color: var(--ink); flex: none; }
.brand img { width: 34px; height: 34px; }
.brand b { color: var(--red); font-weight: 800; }
.brand:hover { color: var(--ink); }
.search { flex: 1; max-width: 440px; position: relative; display: none; }
.search input { width: 100%; height: 40px; border-radius: var(--pill); border: 1px solid var(--line); background: var(--surface-2); padding: 0 16px 0 40px; outline: none; }
.search input:focus { border-color: var(--ink-3); background: var(--surface); }
.search .i { position: absolute; left: 14px; top: 10px; color: var(--ink-3); }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.icon-btn { position: relative; display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; border: 0; background: transparent; cursor: pointer; color: var(--ink-2); }
.icon-btn:hover { background: var(--hover); color: var(--ink); }
.dot { position: absolute; top: 4px; right: 3px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--red); color: #fff; font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; border: 2px solid var(--surface); }
.dot[hidden] { display: none; }
.top .btn { height: 38px; }
.me-btn { display: flex; align-items: center; gap: 8px; padding: 3px; border-radius: var(--pill); border: 0; background: transparent; cursor: pointer; }
.me-btn:hover { background: var(--hover); }

/* dropdown menu */
.menu { position: relative; }
.menu-pop { position: absolute; right: 0; top: calc(100% + 6px); min-width: 230px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow-lg); padding: 6px; display: none; z-index: 60; }
.menu.open .menu-pop { display: block; }
.menu-pop a, .menu-pop button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border-radius: var(--r-sm); border: 0; background: none; text-align: left; cursor: pointer; color: var(--ink); font-size: .95rem; }
.menu-pop a:hover, .menu-pop button:hover { background: var(--hover); color: var(--ink); }
.menu-pop hr { border: 0; border-top: 1px solid var(--line); margin: 6px 0; }
.menu-head { padding: 8px 10px 10px; display: flex; gap: 10px; align-items: center; }
.menu-head b { display: block; }

/* ---------------------------------------------------------------- shell */
.shell { max-width: 1280px; margin: 0 auto; padding: 16px 16px calc(var(--tabbar) + 24px); display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; }
.rail-l, .rail-r { display: none; }
.main { min-width: 0; }
.page-wide .shell { max-width: 1180px; }
.narrow { max-width: 640px; margin: 0 auto; }

.side-nav { position: sticky; top: calc(var(--top) + 16px); display: flex; flex-direction: column; gap: 2px; }
.side-nav a { display: flex; align-items: center; gap: 14px; padding: 10px 14px; border-radius: var(--pill); font-size: 1.02rem; color: var(--ink-2); font-weight: 500; }
.side-nav a:hover { background: var(--hover); color: var(--ink); }
.side-nav a.on { color: var(--ink); font-weight: 700; background: var(--surface); box-shadow: var(--shadow); }
.side-nav a.on .i { color: var(--red); }
.side-nav .count { margin-left: auto; font-size: .78rem; font-weight: 700; background: var(--red); color: #fff; border-radius: var(--pill); padding: 1px 8px; }
.side-nav .btn { margin-top: 12px; color: #fff; justify-content: center; font-weight: 650; }
.side-nav .btn:hover { color: #fff; background: var(--red-600); }
.side-sec { margin-top: 18px; padding: 0 14px; font-size: .82rem; color: var(--ink-3); font-weight: 600; }
.side-list a { font-size: .95rem; padding: 7px 14px; }

/* bottom tab bar (mobile) */
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; height: calc(var(--tabbar) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); background: var(--surface); border-top: 1px solid var(--line); display: grid; grid-template-columns: repeat(5, 1fr); }
.tabbar a { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 11px; color: var(--ink-3); font-weight: 600; }
.tabbar a.on { color: var(--red); }
.tabbar a .i { width: 23px; height: 23px; }
.tabbar .tab-post span.plus { width: 44px; height: 32px; border-radius: 12px; background: var(--red); color: #fff; display: grid; place-items: center; }
.tabbar .tab-post .i { width: 22px; height: 22px; stroke-width: 2.4; }
.tabbar .dot { top: 6px; right: calc(50% - 22px); }

@media (min-width: 720px) {
  .search { display: block; }
}
@media (min-width: 1000px) {
  .shell { grid-template-columns: 230px minmax(0, 1fr); padding-bottom: 40px; }
  .rail-l { display: block; }
  .tabbar { display: none; }
  .hide-desk { display: none !important; }
}
@media (min-width: 1240px) {
  .shell { grid-template-columns: 230px minmax(0, 1fr) 320px; }
  .rail-r { display: block; }
  .page-wide .shell, .page-full .shell { grid-template-columns: 230px minmax(0, 1fr); }
  .page-wide .rail-r, .page-full .rail-r { display: none; }
}
@media (max-width: 999px) { .hide-mob { display: none !important; } }
.page-full .shell { max-width: none; padding: 0 0 calc(var(--tabbar) + 24px); display: block; }
.page-full .rail-l { display: none; }
@media (min-width: 1000px) { .page-full .shell { padding-bottom: 0; } }

/* ---------------------------------------------------------------- buttons & forms */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 42px; padding: 0 18px; border-radius: var(--pill); border: 1px solid transparent; font-weight: 650; font-size: .95rem; cursor: pointer; white-space: nowrap; background: var(--ink); color: var(--surface); transition: background .15s, transform .1s; }
.btn:hover { color: var(--surface); opacity: .92; }
.btn:active { transform: scale(.98); }
.btn-red { background: var(--red); color: #fff; }
.btn-red:hover { background: var(--red-600); color: #fff; opacity: 1; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-2); }
.btn-ghost:hover { background: var(--hover); color: var(--ink); opacity: 1; }
.btn-soft { background: var(--hover); color: var(--ink); }
.btn-soft:hover { color: var(--ink); background: var(--line); opacity: 1; }
.btn-white { background: #fff; color: #1C1613; }
.btn-white:hover { color: #1C1613; }
.btn-sm { height: 34px; padding: 0 14px; font-size: .88rem; }
.btn-lg { height: 52px; padding: 0 26px; font-size: 1.04rem; }
.btn-block { width: 100%; }
.btn[disabled], .btn.is-busy { opacity: .55; pointer-events: none; }
.btn.following { background: transparent; color: var(--ink); border-color: var(--line-2); }

.field { margin-bottom: 16px; }
.field > label, .label { display: block; font-weight: 600; font-size: .92rem; margin-bottom: 6px; }
.hint { font-size: .82rem; color: var(--ink-3); margin-top: 5px; }
.input, .select, .textarea { width: 100%; min-height: 44px; border: 1px solid var(--line-2); background: var(--surface); border-radius: var(--r-sm); padding: 10px 12px; outline: none; transition: border-color .15s, box-shadow .15s; }
.textarea { min-height: 110px; resize: vertical; line-height: 1.5; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--ink-2); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ink) 10%, transparent); }
.select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%237A706A' stroke-width='1.8' fill='none' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 34px; }
.row2 { display: grid; gap: 0 14px; grid-template-columns: 1fr; }
@media (min-width: 560px) { .row2 { grid-template-columns: 1fr 1fr; } .row3 { grid-template-columns: 1fr 1fr 1fr; } }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .94rem; cursor: pointer; margin-bottom: 10px; }
.check input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--red); flex: none; }
.seg { display: inline-flex; background: var(--hover); border-radius: var(--pill); padding: 3px; gap: 2px; flex-wrap: wrap; }
.seg a, .seg label { padding: 6px 14px; border-radius: var(--pill); font-size: .9rem; font-weight: 600; color: var(--ink-2); cursor: pointer; }
.seg a.on, .seg input:checked + span { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.seg input { display: none; }
.seg label span { display: block; padding: 0; }

/* ---------------------------------------------------------------- cards & blocks */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px; }
.card + .card { margin-top: 16px; }
.card-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.card-h h2, .card-h h3 { margin: 0; }
.card-h a.more { font-size: .88rem; color: var(--red); font-weight: 600; }
.stack > * + * { margin-top: 16px; }
.rail-r .card { padding: 16px; }
.rail-r { position: sticky; top: calc(var(--top) + 16px); align-self: start; max-height: calc(100vh - var(--top) - 24px); overflow: auto; scrollbar-width: none; }
.rail-r h3 { font-size: 1rem; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 4px 0 16px; }
.page-head h1 { margin: 0; }
.page-head p { margin: 4px 0 0; color: var(--ink-3); }
.empty { text-align: center; padding: 40px 20px; color: var(--ink-3); }
.empty .i { width: 40px; height: 40px; color: var(--line-2); margin-bottom: 10px; }
.empty h3 { color: var(--ink); }
.notice { padding: 12px 14px; border-radius: var(--r); background: var(--saffron-50); color: var(--ink); font-size: .93rem; margin-bottom: 16px; border: 1px solid color-mix(in srgb, var(--saffron) 35%, transparent); }
.notice.error { background: var(--red-50); border-color: color-mix(in srgb, var(--red) 30%, transparent); }
.notice.ok { background: var(--green-50); border-color: color-mix(in srgb, var(--green) 30%, transparent); }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: var(--pill); background: var(--surface); border: 1px solid var(--line); font-size: .88rem; font-weight: 550; color: var(--ink-2); white-space: nowrap; }
.chip:hover { border-color: var(--ink-3); color: var(--ink); }
.chip.on { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.chip .n { color: var(--ink-3); font-weight: 500; }
.chip.on .n { color: inherit; opacity: .7; }
.scroll-x { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; margin: 0 -16px; padding-left: 16px; padding-right: 16px; }
.scroll-x::-webkit-scrollbar { display: none; }
@media (min-width: 1000px) { .scroll-x { margin: 0; padding-left: 0; padding-right: 0; flex-wrap: wrap; } }
.pill { display: inline-block; font-size: .74rem; font-weight: 700; padding: 2px 8px; border-radius: var(--pill); background: var(--hover); color: var(--ink-2); vertical-align: 2px; }
.pill.red { background: var(--red-50); color: var(--red); }
.pill.green { background: var(--green-50); color: var(--green); }
.pill.gold { background: var(--saffron-50); color: color-mix(in srgb, var(--saffron) 55%, var(--ink)); }
.vbadge { color: #1D9BF0; display: inline-flex; }
.vbadge .i { width: 16px; height: 16px; fill: currentColor; stroke: #fff; stroke-width: 1.5; vertical-align: -3px; }
.online-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--green); border: 2px solid var(--surface); display: inline-block; }
.flag { font-family: 'Apple Color Emoji', 'Segoe UI Emoji', 'Noto Color Emoji', sans-serif; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 16px; overflow-x: auto; scrollbar-width: none; }
.tabs a { padding: 12px 14px; font-weight: 600; color: var(--ink-3); border-bottom: 3px solid transparent; white-space: nowrap; margin-bottom: -1px; }
.tabs a.on { color: var(--ink); border-bottom-color: var(--red); }
.tabs a:hover { color: var(--ink); }
.pager { display: flex; justify-content: center; gap: 8px; margin: 24px 0; }

/* avatars & tiles */
.av { --h: 10; display: inline-grid; place-items: center; flex: none; border-radius: 50%; overflow: hidden; background: hsl(var(--h) 55% 88%); color: hsl(var(--h) 55% 28%); font-weight: 700; font-family: var(--display); }
:root[data-theme="dark"] .av { background: hsl(var(--h) 35% 26%); color: hsl(var(--h) 60% 85%); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .av { background: hsl(var(--h) 35% 26%); color: hsl(var(--h) 60% 85%); } }
.av img { width: 100%; height: 100%; object-fit: cover; }
.av-xs { width: 24px; height: 24px; font-size: 11px; }
.av-sm { width: 32px; height: 32px; font-size: 13px; }
.av-md { width: 44px; height: 44px; font-size: 17px; }
.av-lg { width: 64px; height: 64px; font-size: 24px; }
.av-xl { width: 128px; height: 128px; font-size: 48px; border: 4px solid var(--surface); }
.tile { --h: 10; display: inline-grid; place-items: center; flex: none; border-radius: 14px; overflow: hidden; background: hsl(var(--h) 60% 45%); color: #fff; font-weight: 800; font-family: var(--display); }
.tile img { width: 100%; height: 100%; object-fit: cover; }
.tile-sm { width: 32px; height: 32px; font-size: 12px; border-radius: 9px; }
.tile-md { width: 48px; height: 48px; font-size: 17px; }
.tile-lg { width: 84px; height: 84px; font-size: 30px; border-radius: 20px; border: 4px solid var(--surface); }

/* person row */
.person { display: flex; align-items: center; gap: 12px; padding: 8px 0; }
.person .who { min-width: 0; flex: 1; }
.person .who b { display: flex; align-items: center; gap: 4px; font-weight: 650; }
.person .who b a { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.person .who > span { display: block; font-size: .84rem; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------------------------------------------------------------- composer */
.composer { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 14px 16px; margin-bottom: 16px; }
.composer-top { display: flex; gap: 12px; }
.composer textarea { flex: 1; border: 0; outline: none; resize: none; min-height: 52px; padding: 10px 0; font-size: 1.05rem; background: transparent; line-height: 1.45; }
.composer-previews { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; margin: 8px 0 0 56px; }
.composer-previews:empty { display: none; }
.composer-previews figure { margin: 0; position: relative; aspect-ratio: 1; border-radius: var(--r-sm); overflow: hidden; background: var(--hover); }
.composer-previews img { width: 100%; height: 100%; object-fit: cover; }
.composer-previews button { position: absolute; top: 4px; right: 4px; width: 24px; height: 24px; border-radius: 50%; border: 0; background: rgba(0,0,0,.65); color: #fff; display: grid; place-items: center; cursor: pointer; }
.composer-previews button .i { width: 14px; height: 14px; }
.composer-bar { display: flex; align-items: center; gap: 6px; border-top: 1px solid var(--line); margin-top: 10px; padding-top: 10px; flex-wrap: wrap; }
.composer-bar .tool { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 10px; border-radius: var(--pill); color: var(--ink-2); cursor: pointer; font-size: .9rem; font-weight: 600; border: 0; background: none; }
.composer-bar .tool:hover { background: var(--hover); }
.composer-bar .tool .i { color: var(--green); }
.composer-bar select { flex: 1 1 110px; height: 36px; border: 1px solid var(--line); background: var(--surface); border-radius: var(--pill); padding: 0 28px 0 12px; font-size: .88rem; max-width: 180px; }
.composer-bar .btn { margin-left: auto; }
.composer-mini { display: flex; align-items: center; gap: 12px; cursor: text; }
.composer-mini span { flex: 1; height: 44px; display: flex; align-items: center; padding: 0 16px; border-radius: var(--pill); background: var(--hover); color: var(--ink-3); }
.counter { font-size: .8rem; color: var(--ink-3); }

/* ---------------------------------------------------------------- posts */
.feed-tabs { display: flex; gap: 6px; margin-bottom: 14px; overflow-x: auto; scrollbar-width: none; }
.post { container-type: inline-size; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px 16px 8px; margin-bottom: 14px; }
.post-head { display: flex; gap: 12px; align-items: flex-start; }
.post-meta { flex: 1; min-width: 0; line-height: 1.3; }
.post-meta .name { font-weight: 700; display: inline-flex; align-items: center; gap: 4px; }
.post-meta .sub { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: .84rem; color: var(--ink-3); margin-top: 2px; }
.post-meta .sub a { color: var(--ink-3); }
.post-meta .sub a:hover { color: var(--red); }
.post-meta .in-comm { color: var(--ink-2); font-weight: 600; }
.post-text { margin: 10px 0 0; font-size: 1.02rem; line-height: 1.55; white-space: normal; }
.post-text.clamp { display: -webkit-box; -webkit-line-clamp: 8; -webkit-box-orient: vertical; overflow: hidden; }
.read-more { border: 0; background: none; color: var(--red); font-weight: 600; padding: 0; cursor: pointer; font-size: .92rem; }
.post-text .tag, .comment-text .tag { color: var(--red); font-weight: 550; }
.post-text .mention { color: var(--red); font-weight: 600; }
.gallery { display: grid; gap: 3px; margin: 12px -16px 0; overflow: hidden; }
.gallery a { display: block; background: var(--hover); overflow: hidden; }
.gallery img { width: 100%; height: 100%; object-fit: cover; }
.gallery.n1 img { max-height: 560px; width: 100%; height: auto; object-fit: contain; background: var(--hover); }
.gallery.n2 { grid-template-columns: 1fr 1fr; aspect-ratio: 2 / 1.2; }
.gallery.n3 { grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; aspect-ratio: 4 / 3; }
.gallery.n3 a:first-child { grid-row: span 2; }
.gallery.n4 { grid-template-columns: 1fr 1fr; aspect-ratio: 1; }
.gallery .more-n { position: relative; }
.gallery .more-n::after { content: attr(data-more); position: absolute; inset: 0; display: grid; place-items: center; background: rgba(0,0,0,.5); color: #fff; font: 700 1.8rem var(--display); }
@media (min-width: 560px) { .gallery { margin: 12px 0 0; border-radius: var(--r); } }
.yt { position: relative; display: block; margin-top: 12px; border-radius: var(--r); overflow: hidden; aspect-ratio: 16/9; background: #000; cursor: pointer; }
.yt img { width: 100%; height: 100%; object-fit: cover; opacity: .9; }
.yt iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.yt-play { position: absolute; inset: 0; margin: auto; width: 68px; height: 48px; border-radius: 14px; border: 0; background: var(--red); color: #fff; display: grid; place-items: center; cursor: pointer; }
.yt-play .i { fill: currentColor; stroke: none; width: 26px; height: 26px; }
.post-listing { display: flex; gap: 12px; margin-top: 12px; padding: 10px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface-2); align-items: center; }
.post-listing img { width: 76px; height: 76px; border-radius: var(--r-sm); object-fit: cover; }
.post-listing b { display: block; }
.post-stats { display: flex; justify-content: space-between; font-size: .84rem; color: var(--ink-3); padding: 10px 0 0; }
.post-actions { display: flex; border-top: 1px solid var(--line); margin-top: 10px; padding-top: 4px; }
.act { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 40px; border: 0; background: none; border-radius: var(--r-sm); color: var(--ink-2); font-weight: 600; font-size: .9rem; cursor: pointer; }
.act:hover { background: var(--hover); color: var(--ink); }
.act.on { color: var(--red); }
.act.on .i { fill: currentColor; }
.act.saved .i { fill: currentColor; color: var(--saffron); }
.act { white-space: nowrap; }
.act .lbl { display: none; }
@container (min-width: 440px) { .act .lbl { display: inline; } }
.like-pop { animation: pop .35s ease; }
@keyframes pop { 40% { transform: scale(1.35); } }
@media (prefers-reduced-motion: reduce) { .like-pop { animation: none; } * { scroll-behavior: auto !important; transition: none !important; } }
.post-more { margin-left: auto; }
.load-more { display: flex; justify-content: center; padding: 10px 0 20px; }

/* comments */
.comments { margin-top: 6px; }
.comment { display: flex; gap: 10px; padding: 8px 0; }
.comment-body { flex: 1; min-width: 0; }
.bubble { display: inline-block; max-width: 100%; background: var(--hover); border-radius: 16px; padding: 8px 12px; }
.bubble .name { font-weight: 700; font-size: .9rem; display: inline-flex; gap: 4px; align-items: center; }
.comment-text { font-size: .96rem; line-height: 1.45; }
.comment-tools { display: flex; gap: 14px; font-size: .8rem; color: var(--ink-3); padding: 3px 12px 0; font-weight: 600; align-items: center; }
.comment-tools button { border: 0; background: none; padding: 0; color: var(--ink-3); font-weight: 600; cursor: pointer; font-size: .8rem; }
.comment-tools button:hover, .comment-tools button.on { color: var(--red); }
.replies { margin-left: 4px; padding-left: 12px; border-left: 2px solid var(--line); }
.comment-form { display: flex; gap: 10px; align-items: flex-end; padding: 10px 0; }
.comment-form textarea { flex: 1; min-height: 42px; max-height: 160px; border-radius: 21px; border: 1px solid var(--line-2); background: var(--surface-2); padding: 10px 16px; resize: none; outline: none; line-height: 1.4; }
.comment-form textarea:focus { background: var(--surface); border-color: var(--ink-3); }
.comment-form .btn { height: 42px; width: 42px; padding: 0; border-radius: 50%; }

/* ---------------------------------------------------------------- landing (logged out home) */
.hero { position: relative; overflow: hidden; background: #1C1613; color: #FFF7EF; }
:root[data-theme="dark"] .hero { background: #0A0706; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .hero { background: #0A0706; } }
.hero-in { max-width: 1240px; margin: 0 auto; padding: 44px 16px 36px; display: grid; gap: 32px; }
.hero h1 { font-size: clamp(2.3rem, 1.4rem + 4.6vw, 4.6rem); line-height: 1; letter-spacing: -.022em; font-weight: 800; margin: 0 0 18px; max-width: 12ch; }
.hero p.lead { font-size: 1.12rem; color: #E9DCD2; max-width: 46ch; margin-bottom: 24px; }
.hero .btns { display: flex; gap: 10px; flex-wrap: wrap; }
.hero .stats { display: flex; gap: 22px; margin-top: 26px; flex-wrap: wrap; color: #CDBDB1; font-size: .92rem; }
.hero .stats b { display: block; color: #fff; font: 800 1.5rem var(--display); }
.hero-band { height: 8px; background: linear-gradient(90deg, var(--red) 0 40%, #F5A623 40% 70%, #0B7A55 70% 100%); }
.wall { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; align-content: start; }
.wall a { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 10px; background: rgba(255,255,255,.06); color: #F3E9E1; font-size: .88rem; font-weight: 550; border: 1px solid rgba(255,255,255,.07); min-width: 0; transition: background .15s; }
.wall a:hover { background: rgba(255,255,255,.14); color: #fff; }
.wall a .flag { font-size: 1.15rem; }
.wall a span.nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.wall a em { font-style: normal; font-size: .75rem; color: #F5A623; font-weight: 700; }
.wall { max-height: 380px; overflow: auto; overscroll-behavior: contain; }
.wall-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; color: #CDBDB1; font-size: .92rem; }
.wall-head input { height: 36px; border-radius: var(--pill); border: 1px solid rgba(255,255,255,.2); background: rgba(255,255,255,.08); color: #fff; padding: 0 14px; width: 190px; outline: none; }
.wall-head input::placeholder { color: #B5A69B; }
@media (min-width: 1000px) {
  .hero-in { grid-template-columns: 1fr 1.15fr; padding: 72px 24px 60px; gap: 48px; align-items: start; }
  .wall { max-height: 520px; overflow: auto; padding-right: 6px; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.2) transparent; }
}
.section { max-width: 1240px; margin: 0 auto; padding: 48px 16px 0; }
.section > h2 { font-size: clamp(1.5rem, 1.1rem + 1.4vw, 2.1rem); margin-bottom: 6px; }
.section > p.sub { color: var(--ink-3); margin-bottom: 20px; max-width: 60ch; }
.features { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 700px) { .features { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .features { grid-template-columns: repeat(4, 1fr); } }
.feature { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 22px; display: flex; flex-direction: column; }
.feature .ic { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; margin-bottom: 14px; background: var(--red-50); color: var(--red); }
.feature:nth-child(2) .ic { background: var(--saffron-50); color: color-mix(in srgb, var(--saffron) 60%, var(--ink)); }
.feature:nth-child(3) .ic { background: var(--green-50); color: var(--green); }
.feature:nth-child(4) .ic { background: var(--hover); color: var(--ink); }
.feature h3 { font-size: 1.2rem; }
.feature p { color: var(--ink-2); flex: 1; }
.feature a.go { font-weight: 650; color: var(--red); }
.cta-band { margin: 56px auto 0; max-width: 1240px; padding: 0 16px; }
.cta-band > div { background: var(--red); color: #fff; border-radius: 24px; padding: 36px 24px; display: grid; gap: 16px; align-items: center; }
.cta-band h2 { font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.4rem); margin: 0; }
.cta-band p { margin: 0; color: #FFE3DE; }
@media (min-width: 800px) { .cta-band > div { grid-template-columns: 1fr auto; padding: 44px; } }

/* grids of cards */
.grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); }
.grid-sm { grid-template-columns: repeat(auto-fill, minmax(min(100%, 170px), 1fr)); }
.comm-card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.comm-card .cover { height: 74px; background: linear-gradient(120deg, hsl(var(--h) 55% 42%), hsl(calc(var(--h) + 40) 60% 52%)); position: relative; }
.comm-card .cover img { width: 100%; height: 100%; object-fit: cover; }
.comm-card .body { padding: 0 16px 16px; flex: 1; display: flex; flex-direction: column; }
.comm-card .tile { margin-top: -26px; border: 3px solid var(--surface); }
.comm-card h3 { margin: 8px 0 4px; font-size: 1.04rem; }
.comm-card p { font-size: .88rem; color: var(--ink-2); margin: 0 0 12px; flex: 1; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.comm-card .meta { font-size: .82rem; color: var(--ink-3); display: flex; gap: 10px; flex-wrap: wrap; }
.person-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px 14px; text-align: center; display: flex; flex-direction: column; align-items: center; position: relative; }
.person-card .av { margin-bottom: 10px; }
.person-card b { display: inline-flex; gap: 4px; align-items: center; font-weight: 700; max-width: 100%; }
.person-card b a { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.person-card .sub { font-size: .84rem; color: var(--ink-3); margin: 2px 0 10px; min-height: 1.3em; }
.person-card .bio { font-size: .86rem; color: var(--ink-2); margin: 0 0 12px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; flex: 1; }
.person-card .btn { width: 100%; }
.person-card .online-dot { position: absolute; top: 76px; left: calc(50% + 22px); }
.date-card { padding: 0; overflow: hidden; text-align: left; align-items: stretch; }
.date-card .ph { aspect-ratio: 4/5; background: var(--hover); position: relative; display: grid; place-items: center; }
.date-card .ph img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.date-card .ph .av { margin: 0; }
.date-card .ph .shade { position: absolute; inset: auto 0 0 0; padding: 40px 12px 10px; background: linear-gradient(transparent, rgba(0,0,0,.75)); color: #fff; }
.date-card .ph .shade b { color: #fff; font-size: 1.05rem; }
.date-card .ph .shade span { display: block; font-size: .82rem; opacity: .9; }
.date-card .body { padding: 10px 12px 12px; }
.date-card .online-dot { position: absolute; top: 10px; right: 10px; left: auto; }

/* listings */
.item-card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.item-card .ph { aspect-ratio: 4/3; background: var(--hover); display: grid; place-items: center; color: var(--ink-3); position: relative; }
.item-card .ph img { width: 100%; height: 100%; object-fit: cover; }
.item-card .ph .i { width: 36px; height: 36px; }
.item-card .ph .pill { position: absolute; top: 10px; left: 10px; background: rgba(255,255,255,.92); color: #1C1613; }
.item-card .body { padding: 12px 14px 14px; }
.item-card .price { font: 800 1.12rem var(--display); }
.item-card h3 { font-family: var(--body); font-weight: 550; font-size: .95rem; margin: 2px 0 6px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.35; }
.item-card .place { font-size: .8rem; color: var(--ink-3); display: flex; justify-content: space-between; gap: 8px; }
.item-gallery { display: grid; gap: 6px; }
.item-gallery .main-img { aspect-ratio: 4/3; background: var(--hover); border-radius: var(--r-lg); overflow: hidden; }
.item-gallery .main-img img { width: 100%; height: 100%; object-fit: contain; }
.item-gallery .thumbs { display: flex; gap: 6px; overflow-x: auto; }
.item-gallery .thumbs button { width: 72px; height: 72px; border-radius: var(--r-sm); overflow: hidden; border: 2px solid transparent; padding: 0; cursor: pointer; flex: none; background: var(--hover); }
.item-gallery .thumbs button.on { border-color: var(--red); }
.item-gallery .thumbs img { width: 100%; height: 100%; object-fit: cover; }
.item-layout { display: grid; gap: 20px; }
@media (min-width: 900px) { .item-layout { grid-template-columns: 1.4fr 1fr; align-items: start; } .item-layout aside { position: sticky; top: calc(var(--top) + 16px); } }
.item-price { font: 800 2rem var(--display); margin: 4px 0 8px; }
dl.facts { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; margin: 0; font-size: .93rem; }
dl.facts dt { color: var(--ink-3); }
dl.facts dd { margin: 0; font-weight: 550; }
.filters { display: grid; gap: 10px; }
.filter-bar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.filter-bar > * { min-width: 0; max-width: 100%; }
.select { max-width: 100%; text-overflow: ellipsis; }
.filter-bar .input, .filter-bar .select { height: 40px; min-height: 40px; width: auto; flex: 1 1 140px; border-radius: var(--pill); padding-left: 14px; }
.filter-bar .select { flex: 0 1 190px; }

/* profile & community headers */
.cover-wrap { position: relative; border-radius: var(--r-lg); overflow: hidden; background: #1C1613; height: 170px; }
@media (min-width: 700px) { .cover-wrap { height: 240px; } }
.cover-wrap img { width: 100%; height: 100%; object-fit: cover; }
.cover-wrap .cover-pattern { position: absolute; inset: 0; background:
  radial-gradient(circle at 20% 120%, color-mix(in srgb, var(--red) 80%, transparent) 0 35%, transparent 36%),
  radial-gradient(circle at 85% -20%, color-mix(in srgb, var(--saffron) 85%, transparent) 0 30%, transparent 31%),
  linear-gradient(135deg, #2A1F1A, #1C1613); }
.cover-wrap .edit-cover { position: absolute; right: 12px; bottom: 12px; }
.profile-head { display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: flex-start; padding: 0 8px; margin-top: -48px; position: relative; }
.profile-head .av-xl { width: 112px; height: 112px; }
.profile-head .who { flex: 1; min-width: 200px; padding-top: 56px; }
.profile-head h1 { margin: 0; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.profile-head .handle { color: var(--ink-3); }
.profile-head .acts { display: flex; gap: 8px; flex-wrap: wrap; padding-top: 58px; }
@media (max-width: 640px) { .profile-head .acts { padding-top: 0; width: 100%; } .profile-head .who { padding-top: 54px; } }
.profile-facts { display: flex; flex-wrap: wrap; gap: 6px 16px; color: var(--ink-2); font-size: .92rem; margin: 12px 8px 4px; }
.profile-facts .i { width: 17px; height: 17px; color: var(--ink-3); }
.profile-counts { display: flex; gap: 18px; margin: 10px 8px 16px; font-size: .93rem; color: var(--ink-3); }
.profile-counts b { color: var(--ink); }
.bio { white-space: pre-line; margin: 10px 8px 0; }
.comm-head { display: flex; gap: 16px; align-items: flex-start; padding: 0 8px; margin-top: -42px; position: relative; flex-wrap: wrap; }
.comm-head .who { flex: 1; min-width: 200px; padding-top: 48px; }
.comm-head .acts { padding-top: 50px; }
@media (max-width: 640px) { .comm-head .acts { padding-top: 0; width: 100%; } }
.comm-head h1 { margin: 0; }

/* messages */
.inbox { display: grid; grid-template-columns: 1fr; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; height: calc(100dvh - var(--top) - var(--tabbar) - 32px); min-height: 420px; }
@media (min-width: 800px) { .inbox { grid-template-columns: 320px 1fr; } }
@media (min-width: 1000px) { .inbox { height: calc(100dvh - var(--top) - 40px); } }
.conv-list { border-right: 1px solid var(--line); overflow-y: auto; }
.conv-list h2 { padding: 16px 16px 8px; margin: 0; }
.conv { display: flex; gap: 12px; padding: 12px 16px; align-items: center; }
.conv:hover { background: var(--hover); color: inherit; }
.conv.on { background: var(--hover); }
.conv .who { flex: 1; min-width: 0; }
.conv .who b { display: flex; justify-content: space-between; gap: 6px; font-weight: 650; }
.conv .who b small { font-weight: 400; color: var(--ink-3); }
.conv .who span { display: block; color: var(--ink-3); font-size: .88rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.conv.unread .who span { color: var(--ink); font-weight: 650; }
.conv .unread-n { background: var(--red); color: #fff; border-radius: var(--pill); font-size: .74rem; font-weight: 700; padding: 1px 7px; }
.thread { display: flex; flex-direction: column; min-height: 0; }
.thread-head { display: flex; gap: 12px; align-items: center; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.thread-head .who { flex: 1; }
.thread-head .who span { display: block; font-size: .82rem; color: var(--ink-3); }
.msgs { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 4px; background: var(--surface-2); }
.msg { max-width: 78%; padding: 8px 12px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); align-self: flex-start; line-height: 1.4; }
.msg.mine { align-self: flex-end; background: var(--red); color: #fff; border-color: var(--red); }
.msg.mine a { color: #fff; text-decoration: underline; }
.msg img { border-radius: 12px; margin: 2px 0; max-height: 280px; }
.msg time { display: block; font-size: .7rem; opacity: .7; margin-top: 2px; text-align: right; }
.day-sep { align-self: center; font-size: .76rem; color: var(--ink-3); margin: 10px 0 4px; font-weight: 600; }
.msg-form { display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--line); align-items: flex-end; background: var(--surface); }
.msg-form textarea { flex: 1; min-height: 44px; max-height: 140px; resize: none; border-radius: 22px; border: 1px solid var(--line-2); padding: 11px 16px; outline: none; background: var(--surface-2); }
.msg-form .icon-btn { flex: none; }
@media (max-width: 799px) { .inbox.has-thread .conv-list { display: none; } .inbox:not(.has-thread) .thread { display: none; } }

/* notifications */
.notif { display: flex; gap: 12px; padding: 12px 16px; align-items: flex-start; border-bottom: 1px solid var(--line); }
.notif:last-child { border-bottom: 0; }
.notif.unread { background: color-mix(in srgb, var(--red-50) 60%, var(--surface)); }
.notif .txt { flex: 1; min-width: 0; }
.notif .txt small { display: block; color: var(--ink-3); }
.notif .kind { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--red); color: #fff; margin: -18px 0 0 26px; position: absolute; border: 2px solid var(--surface); }
.notif .kind .i { width: 12px; height: 12px; stroke-width: 2.6; }
.notif .avwrap { position: relative; }

/* topic & country pages */
.topic-hero { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 24px 20px; margin-bottom: 18px; position: relative; overflow: hidden; }
.topic-hero::after { content: ""; position: absolute; inset: auto 0 0 0; height: 5px; background: linear-gradient(90deg, var(--red) 0 40%, var(--saffron) 40% 70%, var(--green) 70%); }
.topic-hero .flag.big { font-size: 2.6rem; line-height: 1; display: block; margin-bottom: 10px; }
.topic-hero h1 { margin-bottom: 10px; }
.topic-hero p { color: var(--ink-2); max-width: 70ch; }
.topic-hero .btns { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.crumbs { font-size: .85rem; color: var(--ink-3); margin-bottom: 10px; display: flex; flex-wrap: wrap; gap: 6px; }
.crumbs a { color: var(--ink-3); }
.crumbs a:hover { color: var(--red); }
.crumbs span[aria-hidden] { opacity: .5; }
.facts-card dl.facts { font-size: .9rem; }
.tips { margin: 0; padding-left: 20px; }
.tips li { margin-bottom: 8px; }
.faq details { border-bottom: 1px solid var(--line); padding: 12px 0; }
.faq details:last-child { border-bottom: 0; }
.faq summary { font-weight: 650; cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 10px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.3rem; line-height: 1; color: var(--ink-3); }
.faq details[open] summary::after { content: "−"; }
.faq details p { margin: 8px 0 0; color: var(--ink-2); }
.link-cloud { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: .9rem; }
.link-cloud a { color: var(--ink-2); }
.link-cloud a:hover { color: var(--red); }
.region h3 { margin-top: 18px; }
.country-grid { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr)); }
.country-tile { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); }
.country-tile .flag { font-size: 1.6rem; }
.country-tile b { display: block; font-weight: 650; }
.country-tile span { font-size: .8rem; color: var(--ink-3); }
.country-tile:hover { border-color: var(--ink-3); color: inherit; }
.two-col { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) { .two-col { grid-template-columns: minmax(0, 1fr) 320px; align-items: start; } }
.clock { font-variant-numeric: tabular-nums; }

/* footer */
.foot { border-top: 1px solid var(--line); background: var(--surface); margin-top: 56px; }
.foot-in { max-width: 1240px; margin: 0 auto; padding: 36px 16px calc(var(--tabbar) + 30px); display: grid; gap: 28px; grid-template-columns: 1fr 1fr; font-size: .92rem; }
.foot-in h4 { font-family: var(--body); font-size: .9rem; margin-bottom: 10px; }
.foot-in ul { list-style: none; margin: 0; padding: 0; }
.foot-in li { margin-bottom: 7px; }
.foot-in a { color: var(--ink-2); }
.foot-in a:hover { color: var(--red); }
.foot-brand { grid-column: 1 / -1; }
.foot-brand p { color: var(--ink-3); max-width: 42ch; margin-top: 10px; }
.foot-bottom { grid-column: 1 / -1; border-top: 1px solid var(--line); padding-top: 18px; display: flex; flex-wrap: wrap; gap: 8px 18px; color: var(--ink-3); font-size: .85rem; justify-content: space-between; }
.foot-countries { grid-column: 1 / -1; }
@media (min-width: 900px) { .foot-in { grid-template-columns: 1.6fr repeat(4, 1fr); padding-bottom: 30px; } .foot-brand { grid-column: auto; } }
.in-app .foot { margin-top: 24px; }

/* toast & modal */
.toasts { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--tabbar) + 16px); z-index: 300; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; width: calc(100% - 32px); max-width: 420px; }
@media (min-width: 1000px) { .toasts { bottom: 24px; } }
.toast { background: var(--ink); color: var(--surface); padding: 11px 18px; border-radius: var(--pill); box-shadow: var(--shadow-lg); font-weight: 550; font-size: .93rem; pointer-events: auto; animation: toastin .2s ease; }
.toast.error { background: var(--red); color: #fff; }
@keyframes toastin { from { opacity: 0; transform: translateY(8px); } }
dialog.modal { border: 0; border-radius: var(--r-lg); padding: 0; width: min(560px, calc(100% - 24px)); background: var(--surface); color: var(--ink); box-shadow: var(--shadow-lg); }
dialog.modal::backdrop { background: rgba(20,14,12,.55); }
.modal-h { display: flex; align-items: center; justify-content: space-between; padding: 12px 12px 12px 18px; border-bottom: 1px solid var(--line); }
.modal-h h2 { margin: 0; font-size: 1.1rem; }
.modal-b { padding: 16px 18px; }
.lightbox { position: fixed; inset: 0; background: rgba(0,0,0,.92); z-index: 400; display: grid; place-items: center; }
.lightbox img { max-width: 96vw; max-height: 92vh; object-fit: contain; }
.lightbox button { position: absolute; top: 14px; right: 14px; color: #fff; background: rgba(255,255,255,.15); }

/* auth */
.auth { max-width: 440px; margin: 10px auto 0; }
.auth .card { padding: 26px 22px; }
.auth h1 { font-size: 1.7rem; }
.auth .alt { text-align: center; margin-top: 16px; color: var(--ink-3); }
.auth .alt a { color: var(--red); font-weight: 650; }
.pw-wrap { position: relative; }
.pw-wrap button { position: absolute; right: 4px; top: 2px; }
.prose { max-width: 70ch; }
.prose h2 { margin-top: 1.4em; }
.prose ul { padding-left: 20px; }
.prose li { margin-bottom: 6px; }

/* admin */
.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th, .table td { text-align: left; padding: 9px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table th { color: var(--ink-3); font-weight: 600; font-size: .82rem; }
.table-wrap { overflow-x: auto; }
.statgrid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); margin-bottom: 18px; }
.statgrid div { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; }
.statgrid b { display: block; font: 800 1.6rem var(--display); }
.statgrid span { color: var(--ink-3); font-size: .85rem; }

/* invite */
.copy-row { display: flex; gap: 8px; }
.copy-row .input { flex: 1; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .88rem; }
.share-btns { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.promo { display: flex; align-items: center; gap: 12px; background: var(--saffron-50); border: 1px solid color-mix(in srgb, var(--saffron) 40%, transparent); border-radius: var(--r-lg); padding: 14px 16px; }
.promo .ic { width: 40px; height: 40px; border-radius: 12px; background: var(--saffron); color: #1C1613; display: grid; place-items: center; flex: none; }
.promo p { margin: 0; font-size: .92rem; }
.promo b { display: block; }
.install-bar { display: none; }
.install-bar.show { display: flex; }
