:root {
  --night: #160b16;
  --night-2: #2a1224;
  --paper: #fffdf9;
  --cream: #f7f0e8;
  --berry: #b42664;
  --pink: #ef4e8e;
  --rose: #f7dce8;
  --gold: #d39a2d;
  --aqua: #78d6c7;
  --green: #31b96b;
  --red: #a91f42;
  --ink: #28151f;
  --muted: #786670;
  --line: #e7d8df;
  --shadow: 0 24px 70px rgba(42, 15, 31, .14);
  --serif: Georgia, "Times New Roman", serif;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--cream); color: var(--ink); font: 16px/1.5 var(--sans); scroll-behavior: smooth; }
body { min-height: 100vh; margin: 0; background: radial-gradient(circle at 7% 22%, rgba(239,78,142,.09), transparent 24%), var(--cream); }
body.modal-open { overflow: hidden; }
a { color: inherit; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
img { max-width: 100%; }
.hidden { display: none !important; }
.visually-hidden { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0,0,0,0) !important; white-space: nowrap !important; border: 0 !important; }
.skip-link { position: fixed; z-index: 500; top: 10px; left: 10px; padding: 10px 15px; transform: translateY(-170%); background: white; }
.skip-link:focus { transform: none; }

.ca-header { position: sticky; z-index: 80; top: 0; min-height: 76px; padding: 0 clamp(18px, 4vw, 68px); display: flex; align-items: center; justify-content: space-between; gap: 24px; background: rgba(22,11,22,.97); color: white; border-bottom: 1px solid rgba(255,255,255,.12); backdrop-filter: blur(14px); }
.ca-brand { display: flex; align-items: center; gap: 12px; min-width: max-content; text-decoration: none; }
.ca-mark { display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid rgba(255,255,255,.72); border-radius: 50%; color: #fff; font: italic 22px/1 var(--serif); }
.ca-brand strong { display: block; font: 700 20px/1 var(--serif); }
.ca-brand small { display: block; margin-top: 6px; color: #f29abe; font-size: 8px; font-weight: 900; letter-spacing: .17em; text-transform: uppercase; }
.ca-header nav { display: flex; align-items: center; gap: clamp(12px, 2vw, 25px); }
.ca-header nav a, .ca-header nav button { position: relative; padding: 10px 0; border: 0; background: none; color: rgba(255,255,255,.76); font-size: 10px; font-weight: 900; letter-spacing: .1em; text-decoration: none; text-transform: uppercase; }
.ca-header nav a:hover, .ca-header nav a.active, .ca-header nav button:hover { color: white; }
.ca-header nav a.active::after { position: absolute; right: 0; bottom: 2px; left: 0; height: 2px; content: ""; background: var(--pink); }
.account-chip { display: flex !important; align-items: center; gap: 7px; padding: 7px 10px !important; border: 1px solid rgba(255,255,255,.18) !important; }
.nav-badge { position: absolute; top: -2px; right: -10px; min-width: 18px; height: 18px; padding: 0 5px; display: grid; place-items: center; border-radius: 99px; background: var(--pink); color: white; font-size: 9px; letter-spacing: 0; }
.mobile-nav { display: none; }

.ca-hero { min-height: 300px; padding: 58px max(24px, calc((100vw - 1280px)/2)); display: grid; grid-template-columns: minmax(0,1fr) minmax(310px,.62fr); align-items: end; gap: 70px; background: radial-gradient(circle at 83% 15%, rgba(239,78,142,.27), transparent 27%), radial-gradient(circle at 16% 90%, rgba(120,214,199,.12), transparent 30%), var(--night); color: white; }
.eyebrow, .kicker { margin: 0; color: var(--berry); font-size: 10px; font-weight: 950; letter-spacing: .17em; text-transform: uppercase; }
.ca-hero .eyebrow { color: #f584ae; }
.ca-hero h1 { max-width: 780px; margin: 15px 0 14px; font: 700 clamp(42px, 5.2vw, 70px)/.95 var(--serif); letter-spacing: -.035em; }
.ca-hero h1 em { color: #f382ad; font-weight: 400; }
.ca-hero-copy { max-width: 680px; margin: 0; color: rgba(255,255,255,.68); font-size: 16px; }
.hero-stats { display: grid; grid-template-columns: repeat(3,1fr); border-top: 1px solid rgba(255,255,255,.2); }
.hero-stats div { padding: 18px 10px 0 0; }
.hero-stats strong { display: block; color: #fff; font: 700 20px var(--serif); }
.hero-stats span { color: rgba(255,255,255,.52); font-size: 9px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }

.page-shell { width: min(1280px, calc(100vw - 44px)); margin: 0 auto; padding: 34px 0 88px; }
.community-layout { display: grid; grid-template-columns: 230px minmax(0,1fr); gap: 25px; align-items: start; }
.side-nav { position: sticky; top: 102px; padding: 15px; border: 1px solid var(--line); background: rgba(255,253,249,.9); box-shadow: 0 12px 34px rgba(42,15,31,.06); }
.side-nav > small { display: block; padding: 7px 9px 12px; color: var(--muted); font-size: 8px; font-weight: 950; letter-spacing: .15em; }
.side-nav button, .side-nav a { width: 100%; min-height: 62px; padding: 11px; display: grid; grid-template-columns: 30px 1fr; align-items: center; border: 0; border-top: 1px solid var(--line); background: transparent; color: var(--ink); text-align: left; text-decoration: none; }
.side-nav button > span, .side-nav a > span { grid-row: 1/3; font-size: 18px; }
.side-nav b { font-size: 12px; }
.side-nav em { color: var(--muted); font-size: 9px; font-style: normal; }
.side-nav button.active { background: var(--rose); color: var(--berry); }
.side-note { margin-top: 14px; padding: 15px; background: var(--night); color: white; }
.side-note strong { font: 700 17px var(--serif); }
.side-note p { margin: 6px 0 0; color: rgba(255,255,255,.6); font-size: 10px; }
.content-panel { min-width: 0; }
.tab-panel { display: none; }
.tab-panel.active { display: block; }
.panel-head { min-height: 145px; padding: 28px 32px; display: flex; align-items: center; justify-content: space-between; gap: 25px; border: 1px solid var(--line); background: var(--paper); }
.panel-head h2 { margin: 7px 0 4px; font: 700 clamp(31px,4vw,47px)/1 var(--serif); letter-spacing: -.03em; }
.panel-head p:last-child { margin: 0; color: var(--muted); }

.button, .button-soft, .button-danger, .icon-button { border: 0; text-decoration: none; font-weight: 850; }
.button { padding: 12px 17px; background: linear-gradient(135deg,var(--berry),var(--pink)); color: white; box-shadow: 0 9px 25px rgba(180,38,100,.22); }
.button:hover { filter: brightness(1.07); }
.button-soft { padding: 11px 15px; background: #f2e7eb; color: var(--ink); }
.button-danger { padding: 11px 15px; background: var(--red); color: white; }
.button-quiet { padding: 8px 4px; border: 0; background: none; color: var(--berry); font-size: 11px; font-weight: 800; }
.wide { width: 100%; }
.live-dot { display: inline-block; width: 8px; height: 8px; margin-right: 6px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 5px rgba(49,185,107,.13); }
.notice { position: sticky; z-index: 50; top: 88px; margin-bottom: 12px; padding: 12px 15px; border: 1px solid #eeb5cb; background: #fff0f5; color: #8f244b; font-size: 12px; font-weight: 800; box-shadow: 0 8px 26px rgba(42,15,31,.1); }
.notice[data-type="success"] { border-color: #a9dfba; background: #eaf8ef; color: #22663a; }
.notice[data-type="error"] { border-color: #efb1bd; background: #ffe8ec; color: #921b35; }
.empty { padding: 58px 25px; text-align: center; color: var(--muted); background: rgba(255,253,249,.7); }
.empty span { display: block; margin-bottom: 9px; font-size: 38px; }
.empty strong { display: block; color: var(--ink); font: 700 22px var(--serif); }

.dashboard-grid { margin-top: 16px; display: grid; grid-template-columns: 1.3fr .7fr; gap: 16px; }
.dash-card { border: 1px solid var(--line); background: var(--paper); }
.dash-card > header { padding: 19px 21px; display: flex; align-items: center; justify-content: space-between; gap: 15px; border-bottom: 1px solid var(--line); }
.dash-card h3 { margin: 0; font: 700 22px var(--serif); }
.dash-card > header a { color: var(--berry); font-size: 10px; font-weight: 850; text-decoration: none; }
.live-card { padding: 24px; background: linear-gradient(140deg,var(--night-2),var(--night)); color: white; }
.live-card h3 { margin: 10px 0 8px; font: 700 31px var(--serif); }
.live-card p { color: rgba(255,255,255,.62); }
.live-card .button { display: inline-block; margin-top: 8px; }
.benefits { margin: 0; padding: 0; list-style: none; }
.benefits li { padding: 13px 20px; display: flex; gap: 10px; border-bottom: 1px solid var(--line); font-size: 12px; }
.benefits b { color: var(--berry); }

.category-bar { padding: 14px 0; display: flex; gap: 7px; overflow-x: auto; }
.category-bar button { flex: none; padding: 8px 12px; border: 1px solid var(--line); background: rgba(255,253,249,.7); color: var(--muted); font-size: 10px; font-weight: 850; }
.category-bar button.active { border-color: var(--night); background: var(--night); color: white; }
.thread-list { border-top: 2px solid var(--night); }
.thread-row { width: 100%; min-height: 92px; padding: 16px 18px; display: grid; grid-template-columns: minmax(0,1fr) 72px 126px; align-items: center; gap: 12px; border: 0; border-bottom: 1px solid var(--line); background: rgba(255,253,249,.74); color: var(--ink); text-align: left; }
.thread-row:hover { background: white; }
.thread-main { display: grid; grid-template-columns: 42px minmax(0,1fr); gap: 12px; align-items: center; }
.thread-icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: var(--rose); }
.thread-title { margin: 0; font: 700 17px/1.2 var(--serif); }
.thread-meta, .thread-latest { color: var(--muted); font-size: 9px; }
.thread-count { text-align: center; font: italic 20px var(--serif); }
.thread-latest strong { display: block; color: var(--ink); font-size: 10px; }
.badge { display: inline-block; margin-right: 4px; padding: 2px 6px; background: #f2e6eb; color: var(--berry); font-size: 7px; font-weight: 950; letter-spacing: .09em; text-transform: uppercase; }
.badge.gold { background: #f7ebc8; color: #7c5714; }

.people-grid { padding-top: 16px; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 13px; }
.person-card { padding: 0; overflow: hidden; border: 1px solid var(--line); background: var(--paper); color: var(--ink); text-align: left; box-shadow: 0 8px 25px rgba(42,15,31,.05); transition: transform .18s, box-shadow .18s; }
.person-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.person-photo { position: relative; height: 205px; overflow: hidden; background: linear-gradient(135deg,#f7dce8,#f5e8c6); }
.person-photo img { width: 100%; height: 100%; object-fit: cover; }
.person-photo > span { height: 100%; display: grid; place-items: center; font-size: 61px; }
.person-badge { position: absolute; bottom: 9px; left: 9px; padding: 4px 7px; background: rgba(22,11,22,.86); color: white; font-size: 8px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.person-copy { padding: 15px; }
.person-copy h3 { margin: 0; font: 700 20px var(--serif); }
.person-copy p { margin: 4px 0 0; overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }

.form-card { padding: 28px; border: 1px solid var(--line); background: var(--paper); }
.form-card + .form-card { margin-top: 14px; }
.form-card h2, .form-card h3 { margin: 0 0 5px; font-family: var(--serif); }
.form-card > p { color: var(--muted); }
label, legend { display: block; margin-top: 16px; font-size: 11px; font-weight: 850; }
input, textarea, select { width: 100%; margin-top: 6px; padding: 12px 13px; border: 1px solid var(--line); border-radius: 0; background: white; color: var(--ink); outline: none; }
input:focus, textarea:focus, select:focus { border-color: var(--berry); box-shadow: 0 0 0 3px rgba(180,38,100,.1); }
textarea { resize: vertical; }
fieldset { margin: 18px 0 0; padding: 0; border: 0; }
.two-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-actions { margin-top: 20px; padding-top: 17px; display: flex; align-items: center; justify-content: flex-end; gap: 9px; border-top: 1px solid var(--line); }
.check { display: flex; align-items: flex-start; gap: 9px; color: var(--muted); font-weight: 600; }
.check input { flex: none; width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--berry); }
.form-error { min-height: 18px; color: var(--red); font-size: 11px; font-weight: 750; }
.fine-print { color: var(--muted); font-size: 9px; }
.avatar-picker { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 8px; }
.avatar-picker button { width: 40px; height: 40px; padding: 0; border: 1px solid var(--line); background: white; font-size: 20px; }
.avatar-picker button.active { border-color: var(--berry); background: var(--rose); box-shadow: 0 0 0 2px var(--berry); }
.media-picker { margin-top: 15px; padding: 14px; background: #fff6f9; border: 1px dashed #d8b7c5; }
.media-picker .media-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.media-picker small { color: var(--muted); }

dialog { width: min(94vw,720px); max-height: 92vh; padding: 0; border: 0; background: transparent; }
dialog::backdrop { background: rgba(20,8,17,.78); backdrop-filter: blur(5px); }
.dialog-card { max-height: 92vh; padding: 27px; overflow: auto; background: var(--paper); box-shadow: var(--shadow); }
.dialog-card > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.dialog-card > header h2 { margin: 5px 0 0; font: 700 29px/1.05 var(--serif); }
.dialog-close { padding: 0; border: 0; background: transparent; color: var(--ink); font-size: 28px; }
.wide-dialog { width: min(94vw,900px); }
.profile-pop { width: min(94vw,760px); }
.profile-summary { margin: 20px 0; padding: 19px; display: grid; grid-template-columns: 65px minmax(0,1fr); gap: 15px; background: var(--rose); }
.profile-summary .big-avatar { display: grid; place-items: center; width: 65px; height: 65px; border-radius: 50%; background: white; font-size: 32px; }
.profile-summary h3 { margin: 0; font: 700 23px var(--serif); }
.profile-summary p { margin: 4px 0; color: var(--muted); white-space: pre-wrap; }
.profile-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.profile-tags span { padding: 4px 7px; background: white; color: var(--berry); font-size: 8px; font-weight: 850; }
.profile-photos { display: grid; grid-template-columns: repeat(3,1fr); gap: 7px; }
.profile-photos button { padding: 0; aspect-ratio: 1; overflow: hidden; border: 0; background: #eee; }
.profile-photos img { width: 100%; height: 100%; object-fit: cover; }
.dialog-actions { margin-top: 19px; display: flex; justify-content: space-between; gap: 9px; flex-wrap: wrap; }
.lightbox { position: fixed; z-index: 900; inset: 0; padding: 26px; display: grid; place-items: center; background: rgba(15,6,12,.94); }
.lightbox img { max-width: 94vw; max-height: 90vh; object-fit: contain; }
.lightbox button { position: absolute; top: 18px; right: 24px; border: 0; background: none; color: white; font-size: 38px; }

.forum-posts { padding: 16px; background: #f5eee9; }
.forum-post { padding: 20px; display: grid; grid-template-columns: 155px minmax(0,1fr); gap: 20px; border: 1px solid var(--line); border-bottom: 0; background: white; }
.forum-post:last-child { border-bottom: 1px solid var(--line); }
.post-author { padding-right: 16px; border-right: 1px solid var(--line); }
.post-author button { padding: 0; border: 0; background: none; color: var(--ink); text-align: left; }
.post-avatar { display: grid; place-items: center; width: 43px; height: 43px; margin-bottom: 8px; border-radius: 50%; background: var(--rose); font-size: 22px; }
.post-author strong { display: block; font: 700 15px var(--serif); }
.post-author small { color: var(--muted); font-size: 8px; }
.post-body p { margin: 0; overflow-wrap: anywhere; white-space: pre-wrap; }
.post-media { display: block; max-width: 620px; max-height: 520px; margin-top: 15px; object-fit: contain; background: #eee; }
.post-foot { margin-top: 17px; display: flex; justify-content: space-between; color: var(--muted); font-size: 9px; }
.reply-area { padding: 21px; border-top: 1px solid var(--line); background: var(--paper); }

.account-shell { width: min(1020px,calc(100vw - 40px)); margin: 36px auto 90px; display: grid; grid-template-columns: 300px minmax(0,1fr); gap: 18px; align-items: start; }
.account-aside { position: sticky; top: 104px; padding: 26px; background: var(--night); color: white; }
.account-aside h1 { margin: 8px 0 12px; font: 700 37px/1 var(--serif); }
.account-aside p { color: rgba(255,255,255,.62); }
.account-aside ul { padding: 0; list-style: none; }
.account-aside li { padding: 10px 0; border-top: 1px solid rgba(255,255,255,.13); font-size: 11px; }
.auth-tabs { margin-bottom: 13px; display: flex; }
.auth-tabs button { flex: 1; padding: 11px; border: 1px solid var(--line); background: #f2e8ec; color: var(--muted); font-weight: 850; }
.auth-tabs button.active { background: var(--night); color: white; }
.auth-panel { display: none; }
.auth-panel.active { display: block; }
.profile-editor-grid { display: grid; grid-template-columns: minmax(0,1.1fr) minmax(300px,.9fr); gap: 14px; align-items: start; }
.photo-drop { min-height: 115px; margin: 16px 0 10px; display: grid; place-content: center; border: 2px dashed #d6b6c3; background: #fff7fa; color: var(--berry); text-align: center; cursor: pointer; }
.own-photos { display: grid; grid-template-columns: repeat(2,1fr); gap: 8px; }
.own-photo { position: relative; aspect-ratio: 1; overflow: hidden; background: #eee; }
.own-photo img { width: 100%; height: 100%; object-fit: cover; }
.own-photo button { position: absolute; top: 6px; right: 6px; width: 28px; height: 28px; padding: 0; border: 0; border-radius: 50%; background: rgba(22,11,22,.83); color: white; }
.pending-card { padding: 25px; background: #fff4cf; border: 1px solid #e7cc75; }

.lounge-page { height: calc(100vh - 76px); min-height: 590px; overflow: hidden; background: var(--night); }
.join-layout { height: 100%; padding: clamp(24px,5vw,70px); display: grid; grid-template-columns: minmax(350px,.8fr) minmax(420px,1.1fr); align-items: center; gap: clamp(35px,7vw,100px); color: white; background: radial-gradient(circle at 15% 30%,rgba(239,78,142,.24),transparent 28%),radial-gradient(circle at 85% 80%,rgba(120,214,199,.11),transparent 25%),var(--night); }
.join-copy h1 { margin: 15px 0; font: 700 clamp(48px,7vw,92px)/.88 var(--serif); letter-spacing: -.05em; }
.join-copy h1 em { color: #f382ad; font-weight: 400; }
.join-copy > p { max-width: 570px; color: rgba(255,255,255,.65); }
.join-benefits { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 24px; }
.join-benefits span { padding: 7px 9px; border: 1px solid rgba(255,255,255,.15); color: rgba(255,255,255,.68); font-size: 9px; font-weight: 800; }
.join-card { padding: clamp(24px,4vw,40px); background: var(--paper); color: var(--ink); box-shadow: 0 30px 90px rgba(0,0,0,.35); }
.join-card h2 { margin: 0; font: 700 31px var(--serif); }
.join-divider { margin: 18px 0; display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 9px; font-weight: 850; }
.join-divider::before,.join-divider::after { height: 1px; flex: 1; content: ""; background: var(--line); }

.lounge-app { height: 100%; display: grid; grid-template-columns: 230px minmax(0,1fr) 245px; background: #f6efea; }
.rooms { padding: 21px 15px; overflow-y: auto; background: var(--night); color: white; }
.room-brand { padding: 0 8px 19px; border-bottom: 1px solid rgba(255,255,255,.14); }
.room-brand strong { display: block; font: 700 23px var(--serif); }
.room-brand small { color: #f186ad; font-size: 8px; font-weight: 900; letter-spacing: .13em; }
.room-label { margin: 20px 8px 7px; color: rgba(255,255,255,.42); font-size: 8px; font-weight: 900; letter-spacing: .14em; }
.room-button { width: 100%; min-height: 57px; padding: 10px; display: grid; grid-template-columns: 30px 1fr; align-items: center; border: 0; background: transparent; color: rgba(255,255,255,.72); text-align: left; }
.room-button:hover,.room-button.active { background: rgba(239,78,142,.17); color: white; }
.room-button > span { grid-row: 1/3; font-size: 17px; }
.room-button b { font-size: 11px; }
.room-button small { color: rgba(255,255,255,.38); font-size: 8px; }
.room-button.locked { opacity: .55; }
.upgrade-box { margin-top: 22px; padding: 15px; border: 1px solid rgba(255,255,255,.13); background: rgba(255,255,255,.05); }
.upgrade-box b { color: #f48ab2; font: 700 16px var(--serif); }
.upgrade-box p { color: rgba(255,255,255,.5); font-size: 9px; }
.upgrade-box a { display: block; color: white; font-size: 9px; font-weight: 850; }
.chat-column { min-width: 0; display: grid; grid-template-rows: auto minmax(0,1fr) auto; }
.chat-head { min-height: 72px; padding: 13px 20px; display: flex; align-items: center; justify-content: space-between; gap: 15px; border-bottom: 1px solid var(--line); background: var(--paper); }
.chat-head h1 { margin: 0; font: 700 24px var(--serif); }
.chat-head p { margin: 2px 0 0; color: var(--muted); font-size: 9px; }
.session-pill { padding: 7px 9px; border: 1px solid var(--line); color: var(--muted); font-size: 9px; font-weight: 800; }
.messages { padding: 20px; overflow-y: auto; }
.chat-message { margin: 0 auto 13px; display: flex; align-items: flex-end; gap: 9px; }
.chat-message.mine { justify-content: flex-end; }
.chat-avatar { flex: none; width: 37px; height: 37px; display: grid; place-items: center; border-radius: 50%; background: var(--rose); font-size: 19px; }
.chat-bubble { max-width: min(690px,78%); padding: 11px 14px; border: 1px solid var(--line); background: white; box-shadow: 0 4px 13px rgba(42,15,31,.04); }
.chat-message.mine .chat-bubble { background: #fff0f6; border-color: #ecc1d2; }
.chat-meta { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.chat-meta button { padding: 0; border: 0; background: none; color: var(--ink); font-size: 10px; font-weight: 900; }
.chat-meta time { color: var(--muted); font-size: 8px; }
.chat-bubble p { margin: 0; overflow-wrap: anywhere; white-space: pre-wrap; }
.chat-media { display: block; max-width: min(440px,100%); max-height: 420px; object-fit: contain; }
.reaction-row { margin-top: 7px; display: flex; flex-wrap: wrap; gap: 4px; opacity: 0; transition: opacity .14s; }
.chat-message:hover .reaction-row,.reaction-row:focus-within { opacity: 1; }
.reaction-row button { padding: 3px 5px; border: 1px solid var(--line); background: #fff; font-size: 10px; }
.reaction-row button.on { border-color: var(--berry); background: var(--rose); }
.composer { position: relative; padding: 12px 16px 15px; border-top: 1px solid var(--line); background: var(--paper); }
.composer-main { display: grid; grid-template-columns: auto minmax(0,1fr) auto; gap: 7px; align-items: end; }
.composer-tools { display: flex; gap: 4px; }
.composer-tools button { width: 37px; height: 37px; padding: 0; border: 1px solid var(--line); background: #f7eef2; }
.composer-tools button.locked { opacity: .46; }
.composer textarea { min-height: 43px; max-height: 130px; margin: 0; resize: none; }
.composer-note { margin: 6px 0 0; color: var(--muted); font-size: 8px; }
.emoji-panel { position: absolute; bottom: 73px; left: 16px; width: min(420px,calc(100vw - 40px)); max-height: 220px; padding: 9px; overflow-y: auto; border: 1px solid var(--line); background: white; box-shadow: var(--shadow); }
.emoji-panel button { width: 34px; height: 34px; padding: 0; border: 0; background: transparent; font-size: 18px; }
.online-column { padding: 18px 14px; overflow-y: auto; border-left: 1px solid var(--line); background: var(--paper); }
.online-column h2 { margin: 0; font: 700 19px var(--serif); }
.online-column > p { margin: 3px 0 15px; color: var(--muted); font-size: 9px; }
.online-person { width: 100%; padding: 9px 6px; display: grid; grid-template-columns: 35px 1fr; align-items: center; border: 0; border-top: 1px solid var(--line); background: transparent; color: var(--ink); text-align: left; }
.online-person .mini-avatar { grid-row: 1/3; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: var(--rose); }
.online-person b { font-size: 10px; }
.online-person small { color: var(--muted); font-size: 8px; }

.messages-shell { height: calc(100vh - 76px); min-height: 570px; display: grid; grid-template-columns: 330px minmax(0,1fr); background: var(--paper); }
.conversation-list { overflow-y: auto; border-right: 1px solid var(--line); background: #f7efea; }
.conversation-list > header { position: sticky; top: 0; z-index: 3; padding: 20px; background: #f7efea; border-bottom: 1px solid var(--line); }
.conversation-list h1 { margin: 0; font: 700 29px var(--serif); }
.conversation-tabs { display: flex; gap: 5px; margin-top: 12px; }
.conversation-tabs button { flex: 1; padding: 7px; border: 1px solid var(--line); background: white; color: var(--muted); font-size: 9px; font-weight: 850; }
.conversation-tabs button.active { background: var(--night); color: white; }
.conversation-item { width: 100%; padding: 13px 15px; display: grid; grid-template-columns: 42px 1fr auto; gap: 9px; border: 0; border-bottom: 1px solid var(--line); background: transparent; color: var(--ink); text-align: left; }
.conversation-item:hover,.conversation-item.active { background: white; }
.conversation-item .mini-avatar { grid-row: 1/3; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--rose); }
.conversation-item b { font-size: 11px; }
.conversation-item p { grid-column: 2/4; margin: -8px 0 0; overflow: hidden; color: var(--muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.unread-dot { min-width: 18px; height: 18px; padding: 0 5px; display: grid; place-items: center; border-radius: 99px; background: var(--pink); color: white; font-size: 8px; }
.conversation-pane { min-width: 0; display: grid; grid-template-rows: auto minmax(0,1fr) auto; }
.conversation-head { min-height: 71px; padding: 13px 18px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.conversation-head h2 { margin: 0; font: 700 22px var(--serif); }
.conversation-head p { margin: 2px 0 0; color: var(--muted); font-size: 9px; }
.conversation-messages { padding: 20px; overflow-y: auto; background: #fbf7f3; }
.dm { max-width: 72%; margin-bottom: 10px; padding: 11px 13px; border: 1px solid var(--line); background: white; }
.dm.mine { margin-left: auto; background: #fff0f6; border-color: #edbed0; }
.dm p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.dm time { display: block; margin-top: 4px; color: var(--muted); font-size: 8px; }
.request-banner { padding: 12px 17px; border-bottom: 1px solid #e5cd80; background: #fff5d6; font-size: 10px; }
.request-banner .button,.request-banner .button-soft { margin: 5px 5px 0 0; padding: 7px 10px; font-size: 9px; }
.dm-composer { padding: 13px 16px; display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 8px; border-top: 1px solid var(--line); }
.dm-composer textarea { min-height: 45px; max-height: 120px; margin: 0; resize: none; }
.messages-gate { height: calc(100vh - 76px); display: grid; place-items: center; padding: 20px; background: var(--cream); }
.messages-gate .form-card { width: min(510px,100%); text-align: center; }

.founder-shell { width: min(1280px,calc(100vw - 40px)); margin: 32px auto 90px; }
.founder-head { padding: 28px; display: flex; align-items: center; justify-content: space-between; gap: 20px; background: var(--night); color: white; }
.founder-head h1 { margin: 4px 0; font: 700 38px var(--serif); }
.founder-head p { margin: 0; color: rgba(255,255,255,.6); }
.admin-tabs { display: flex; gap: 6px; padding: 13px 0; overflow-x: auto; }
.admin-tabs button { padding: 9px 13px; border: 1px solid var(--line); background: white; font-size: 10px; font-weight: 850; }
.admin-tabs button.active { background: var(--night); color: white; }
.admin-list { border-top: 2px solid var(--night); }
.admin-row { padding: 15px 17px; display: grid; grid-template-columns: 48px minmax(0,1fr) auto; align-items: center; gap: 12px; border: 1px solid var(--line); border-top: 0; background: white; }
.admin-row .admin-avatar { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: var(--rose); font-size: 21px; }
.admin-row h3 { margin: 0; font: 700 16px var(--serif); }
.admin-row p { margin: 3px 0 0; color: var(--muted); font-size: 9px; }
.admin-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 5px; }
.admin-actions button { padding: 7px 8px; border: 1px solid var(--line); background: #f4e9ed; color: var(--ink); font-size: 8px; font-weight: 850; }
.admin-actions button.danger { background: var(--red); color: white; }

.ca-footer { padding: 26px max(22px,calc((100vw - 1280px)/2)); display: flex; align-items: center; justify-content: space-between; gap: 18px; background: var(--night); color: rgba(255,255,255,.56); font-size: 10px; }
.ca-footer p { margin: 0; }
.ca-footer nav { display: flex; gap: 16px; }
.ca-footer a { color: white; text-decoration: none; }

@media (max-width: 1050px) {
  .ca-hero { grid-template-columns: 1fr; gap: 32px; }
  .community-layout { grid-template-columns: 190px minmax(0,1fr); }
  .people-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .lounge-app { grid-template-columns: 190px minmax(0,1fr); }
  .online-column { display: none; }
  .profile-editor-grid { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  body { padding-bottom: 62px; }
  .ca-header { position: relative; min-height: 68px; padding: 0 14px; }
  .ca-brand strong { font-size: 17px; }
  .ca-brand small { font-size: 7px; }
  .ca-header nav a:not(.account-chip), .ca-header nav .inbox-link { display: none; }
  .mobile-nav { position: fixed; z-index: 100; right: 0; bottom: 0; left: 0; height: 62px; display: grid; grid-template-columns: repeat(5,1fr); border-top: 1px solid rgba(255,255,255,.14); background: rgba(22,11,22,.98); color: white; }
  .mobile-nav a { position: relative; padding: 8px 2px 5px; display: grid; place-items: center; color: rgba(255,255,255,.7); font-size: 8px; font-weight: 800; text-decoration: none; }
  .mobile-nav a span:first-child { font-size: 18px; }
  .mobile-nav a.active { color: #f584ae; }
  .mobile-nav .nav-badge { top: 4px; right: 18%; }
  .ca-hero { min-height: 330px; padding: 47px 20px 42px; }
  .ca-hero h1 { font-size: 47px; }
  .page-shell { width: 100%; padding: 0 0 45px; }
  .community-layout { display: block; }
  .side-nav { position: sticky; z-index: 55; top: 0; padding: 6px; display: flex; overflow-x: auto; border-width: 0 0 1px; }
  .side-nav > small,.side-note,.side-nav a { display: none; }
  .side-nav button { min-width: 110px; min-height: 50px; padding: 7px; display: block; text-align: center; border: 0; }
  .side-nav button > span { display: none; }
  .side-nav em { display: block; }
  .content-panel { padding: 13px; }
  .panel-head { min-height: 0; padding: 23px 19px; display: block; }
  .panel-head .button { display: inline-block; margin-top: 16px; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .thread-row { grid-template-columns: minmax(0,1fr) 44px; padding: 13px; }
  .thread-latest { display: none; }
  .thread-main { grid-template-columns: 34px minmax(0,1fr); }
  .thread-icon { width: 34px; height: 34px; }
  .people-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
  .person-photo { height: auto; aspect-ratio: 1; }
  .person-copy { padding: 11px; }
  .person-copy h3 { font-size: 17px; }
  .forum-post { grid-template-columns: 1fr; gap: 10px; padding: 15px; }
  .post-author { padding: 0 0 10px; display: flex; gap: 9px; align-items: center; border: 0; border-bottom: 1px solid var(--line); }
  .post-avatar { flex: none; width: 37px; height: 37px; margin: 0; }
  .two-fields,.media-picker .media-row { grid-template-columns: 1fr; }
  .profile-photos { grid-template-columns: repeat(2,1fr); }
  .account-shell { width: 100%; margin: 0; display: block; }
  .account-aside { position: static; padding: 30px 20px; }
  .account-main { padding: 13px; }
  .lounge-page { height: calc(100vh - 130px); min-height: 520px; }
  .join-layout { display: block; height: auto; min-height: 100%; padding: 36px 18px; overflow-y: auto; }
  .join-copy h1 { font-size: 54px; }
  .join-card { margin-top: 28px; }
  .lounge-app { grid-template-columns: 1fr; grid-template-rows: auto minmax(0,1fr); }
  .rooms { padding: 7px; display: flex; overflow-x: auto; }
  .room-brand,.room-label,.upgrade-box { display: none; }
  .room-button { min-width: 116px; min-height: 48px; display: block; text-align: center; }
  .room-button > span,.room-button small { display: none; }
  .chat-head { min-height: 62px; padding: 9px 13px; }
  .chat-head h1 { font-size: 20px; }
  .messages { padding: 12px 10px; }
  .chat-bubble { max-width: 84%; }
  .reaction-row { opacity: 1; }
  .composer { padding: 8px 9px; }
  .composer-main { grid-template-columns: 1fr auto; }
  .composer-tools { grid-column: 1/3; }
  .messages-shell { height: calc(100vh - 130px); grid-template-columns: 1fr; }
  .conversation-list { display: block; border: 0; }
  .conversation-pane { position: fixed; z-index: 90; inset: 68px 0 62px; background: white; transform: translateX(100%); transition: transform .2s; }
  .conversation-pane.open { transform: none; }
  .conversation-head::before { content: "←"; margin-right: 10px; font-size: 23px; }
  .conversation-head { justify-content: flex-start; }
  .conversation-head .conversation-actions { margin-left: auto; }
  .dm { max-width: 84%; }
  .founder-shell { width: 100%; margin: 0 0 45px; }
  .founder-head { padding: 24px 18px; display: block; }
  .founder-head .button-soft { display: inline-block; margin-top: 13px; }
  .admin-tabs,.admin-content { padding-right: 12px; padding-left: 12px; }
  .admin-row { grid-template-columns: 42px minmax(0,1fr); }
  .admin-actions { grid-column: 1/3; justify-content: flex-start; }
  .ca-footer { display: block; text-align: center; }
  .ca-footer nav { margin-top: 8px; justify-content: center; }
}

@media (max-width: 420px) {
  .people-grid { grid-template-columns: 1fr 1fr; }
  .person-copy p { display: none; }
  .ca-header nav .account-chip span:last-child { display: none; }
  .profile-summary { grid-template-columns: 52px minmax(0,1fr); }
  .profile-summary .big-avatar { width: 52px; height: 52px; }
}
