:root {
  --ink: #14213d;
  --ink-soft: #40506d;
  --muted: #6d788b;
  --paper: #f5f3ee;
  --paper-deep: #ebe8e0;
  --card: #fffefa;
  --line: #dcd9d0;
  --navy: #14284b;
  --navy-light: #24436f;
  --gold: #d49b2d;
  --gold-dark: #8d6318;
  --gold-soft: #fff4d8;
  --blue-soft: #edf3f9;
  --red: #9c3d42;
  --green: #2f705d;
  --shadow-sm: 0 5px 18px rgba(20, 40, 75, .07);
  --shadow: 0 18px 50px rgba(20, 40, 75, .12);
  --radius: 14px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.55 "DM Sans", sans-serif; }
body.no-scroll { overflow: hidden; }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible, textarea:focus-visible, summary:focus-visible { outline: 3px solid #e9b84f; outline-offset: 2px; }
h1, h2, h3 { font-family: "Libre Caslon Text", serif; line-height: 1.18; }
p { overflow-wrap: anywhere; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

.topbar { height: 76px; padding: 0 max(24px, calc((100vw - 1320px) / 2)); display: flex; align-items: center; gap: 30px; position: sticky; top: 0; z-index: 30; background: rgba(20, 40, 75, .98); color: white; box-shadow: 0 3px 16px rgba(9, 21, 43, .14); }
.brand { display: flex; align-items: center; gap: 12px; border: 0; padding: 0; background: none; color: white; font: 700 20px "Libre Caslon Text", serif; white-space: nowrap; }
.brand-mark { width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.32); border-radius: 10px; color: #f3c65f; background: rgba(255,255,255,.04); font-size: 20px; }
.search-field { position: relative; display: flex; align-items: center; }
.search-field svg { position: absolute; left: 14px; width: 18px; fill: none; stroke: currentColor; stroke-width: 2; pointer-events: none; }
.search-field input { width: 100%; border: 1px solid rgba(255,255,255,.2); border-radius: 10px; padding: 11px 14px 11px 42px; background: rgba(255,255,255,.08); color: white; }
.search-field input::placeholder { color: #cbd4e1; }
.desktop-search { width: min(460px, 44vw); margin-left: 8px; color: #cbd4e1; }
.nav-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.nav-link { border: 0; background: transparent; color: white; padding: 10px 13px; font-weight: 600; }
.nav-link:hover { color: #f3c65f; }
.btn { min-height: 42px; border: 1px solid var(--line); border-radius: 9px; padding: 9px 15px; background: white; color: var(--ink); font-weight: 700; transition: transform .15s, border-color .15s, background .15s; }
.btn:hover { border-color: #a8b2c1; transform: translateY(-1px); }
.btn.primary { border-color: var(--gold); background: var(--gold); color: #17233a; }
.btn.primary:hover { background: #e1aa3c; border-color: #e1aa3c; }
.btn.danger { color: var(--red); }
.btn.compact { min-height: 40px; padding: 7px 12px; }
.nav-link, .account-button { white-space: nowrap; }
.text-button { border: 0; background: none; padding: 9px 0; color: var(--navy-light); text-decoration: underline; font-weight: 700; }
.icon-button { width: 40px; height: 40px; border: 0; border-radius: 50%; display: grid; place-items: center; background: transparent; color: var(--ink); font-size: 26px; line-height: 1; }
.icon-button:hover { background: var(--blue-soft); }

.mobile-search-wrap { display: none; }
.shell { max-width: 1320px; margin: 0 auto; padding: 34px 24px 70px; display: grid; grid-template-columns: 278px minmax(0, 1fr); gap: 42px; }
.sidebar { position: sticky; top: 104px; align-self: start; max-height: calc(100vh - 122px); overflow-y: auto; padding-right: 8px; scrollbar-width: thin; }
.side-section { margin-bottom: 30px; }
.section-label { margin: 0 0 12px; color: var(--muted); font-size: 12px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.topic-list { list-style: none; margin: 0; padding: 0; }
.topic-button { width: 100%; border: 0; border-left: 3px solid transparent; border-radius: 0 10px 10px 0; padding: 11px 12px; background: transparent; color: var(--ink); text-align: left; }
.topic-button strong { display: block; font-size: 14px; line-height: 1.35; }
.topic-button small { display: block; margin-top: 3px; color: var(--muted); font-size: 12px; }
.topic-button:hover { background: rgba(255,255,255,.58); }
.topic-button.active { border-left-color: var(--gold); background: var(--card); box-shadow: var(--shadow-sm); }
.category-heading { margin: 17px 12px 5px; color: var(--navy); font-size: 13px; font-weight: 800; }
.covenant-card { display: grid; grid-template-columns: 28px 1fr; gap: 10px; margin-top: 30px; border: 1px solid #d9e3ed; border-radius: var(--radius); padding: 17px; background: var(--blue-soft); color: var(--ink-soft); font-size: 13px; }
.covenant-card strong { color: var(--navy); }
.covenant-card p { margin: 4px 0 0; }
.covenant-icon { color: var(--gold-dark); font-size: 19px; }
.main { min-width: 0; }
.mobile-navigation { display: none; }
.loading-state { min-height: 420px; display: grid; place-content: center; justify-items: center; color: var(--muted); }
.loader { width: 30px; height: 30px; border: 3px solid var(--line); border-top-color: var(--gold); border-radius: 50%; animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.topic-hero { position: relative; margin-bottom: 28px; border: 1px solid var(--line); border-radius: 20px; overflow: hidden; padding: clamp(27px, 4vw, 46px); background: linear-gradient(135deg, #fffefa 20%, #f6f0e2 100%); box-shadow: var(--shadow-sm); }
.topic-hero::after { content: ""; position: absolute; width: 240px; height: 240px; right: -95px; top: -115px; border: 42px solid rgba(212,155,45,.12); border-radius: 50%; }
.eyebrow { margin: 0 0 6px; color: var(--gold-dark); font-size: 12px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.topic-hero h1 { position: relative; z-index: 1; max-width: 820px; margin: 4px 0 10px; font-size: clamp(29px, 4.1vw, 49px); letter-spacing: -.025em; }
.lead { margin: 0; color: var(--muted); }
.topic-hero .lead { max-width: 740px; font-size: 17px; }
.scriptures { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 19px; }
.scriptures span { border: 1px solid #eedcab; border-radius: 999px; padding: 5px 10px; background: var(--gold-soft); color: #74521b; font-size: 12px; font-weight: 700; }
.discussion-summary { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin: 0 2px 15px; }
.discussion-summary h2 { margin: 0; font-size: 21px; }
.discussion-summary p { margin: 0; color: var(--muted); font-size: 13px; }
.view-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; align-items: start; }
.view-card { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow-sm); }
.view-card-head { border-top: 4px solid var(--navy); padding: 24px 23px 20px; }
.view-card:nth-child(even) .view-card-head { border-top-color: var(--gold); }
.view-card h2 { margin: 0 0 10px; font-size: 22px; }
.view-summary { margin: 0 0 17px; color: var(--ink-soft); }
.author { color: var(--muted); font-size: 13px; }
.vote-row { display: flex; gap: 9px; padding: 14px 23px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: #fbfaf6; }
.vote { flex: 1; min-height: 42px; border: 1px solid var(--line); border-radius: 9px; background: white; color: var(--navy); font-weight: 800; }
.vote:hover { border-color: #9cadc0; background: var(--blue-soft); }
.vote.disagree { color: var(--red); }
.comments { padding: 22px 23px 24px; }
.comments-title { margin: 0 0 14px; color: var(--muted); font: 800 12px "DM Sans", sans-serif; letter-spacing: .12em; text-transform: uppercase; }
.comment { display: grid; grid-template-columns: 38px minmax(0,1fr); gap: 11px; padding: 15px 0; border-top: 1px solid #ebe8e1; }
.comment:first-of-type { border-top: 0; padding-top: 2px; }
.avatar { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; overflow: hidden; background: linear-gradient(135deg, var(--navy), #3f638e); color: white; font-size: 13px; font-weight: 800; box-shadow: inset 0 0 0 1px rgba(255,255,255,.2); }
.avatar.large { width: 104px; height: 104px; font-size: 30px; box-shadow: 0 12px 30px rgba(20,40,75,.18); }
.avatar.medium { width: 56px; height: 56px; font-size: 17px; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.comment-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 7px; }
.profile-link { border: 0; padding: 0; background: none; color: var(--ink); font-weight: 800; }
.profile-link:hover { color: var(--gold-dark); text-decoration: underline; }
.meta { color: #8b94a2; font-size: 12px; }
.comment-body { margin: 4px 0 8px; color: var(--ink-soft); font-size: 14px; white-space: pre-wrap; }
.comment-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.rating-button, .comment-action { min-height: 30px; border: 1px solid var(--line); border-radius: 999px; padding: 3px 9px; background: white; color: var(--muted); font-size: 12px; font-weight: 700; }
.rating-button:hover, .comment-action:hover { border-color: #9cadc0; background: var(--blue-soft); }
.comment-action { border-color: transparent; }
.comment-action.delete { color: var(--red); }
.comment-edit { width: 100%; min-height: 88px; margin: 5px 0 8px; border: 1px solid #9cadc0; border-radius: 9px; padding: 10px; resize: vertical; }
.composer { margin-top: 16px; border: 1px solid var(--line); border-radius: 11px; padding: 11px; background: #faf9f5; }
.composer textarea { width: 100%; min-height: 76px; resize: vertical; border: 0; background: transparent; color: var(--ink); }
.composer textarea:focus { outline: 0; }
.composer-footer { display: flex; justify-content: space-between; align-items: center; gap: 10px; border-top: 1px solid var(--line); padding-top: 9px; }
.composer-note { color: var(--muted); font-size: 11px; }
.empty-card { grid-column: 1 / -1; border: 1px dashed #b8c1cd; border-radius: 18px; padding: 64px 28px; background: rgba(255,255,255,.62); text-align: center; color: var(--muted); }
.empty-card h2 { margin: 5px 0 9px; color: var(--ink); font-size: 25px; }

.drawer-scrim { position: fixed; inset: 0; z-index: 39; background: rgba(10,22,43,.34); backdrop-filter: blur(2px); }
.account-drawer { position: fixed; inset: 0 0 0 auto; z-index: 40; width: min(520px, 100%); overflow-y: auto; padding: 30px; background: var(--card); box-shadow: -24px 0 60px rgba(13,27,51,.2); transform: translateX(105%); transition: transform .25s ease; }
.account-drawer.open { transform: none; }
.account-drawer.page-mode { position: relative; inset: auto; z-index: 1; width: 100%; max-width: 1240px; min-height: calc(100vh - 76px); margin: 0 auto; overflow: visible; padding: 42px 24px 80px; transform: none; background: transparent; box-shadow: none; }
.drawer-header { display: flex; align-items: start; justify-content: space-between; gap: 15px; }
.drawer-header h2 { margin: 2px 0 8px; font-size: 28px; }
.page-mode .drawer-header h2 { font-size: clamp(30px, 4vw, 42px); }
.page-mode #accountIntro { max-width: 680px; font-size: 17px; }
.auth-form { margin-top: 25px; }
.auth-form label, .form-field label { display: block; margin: 13px 0 5px; font-size: 13px; font-weight: 800; }
.auth-form > input, .password-row input, .form-field input, .form-field textarea, .form-field select { width: 100%; border: 1px solid var(--line); border-radius: 9px; padding: 11px; background: white; color: var(--ink); }
.password-row { display: flex; gap: 7px; }
.password-row input { min-width: 0; }
.button-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.account-card { display: grid; grid-template-columns: 56px minmax(0,1fr); gap: 13px; align-items: center; margin-top: 22px; border: 1px solid #d8e2ec; border-radius: 13px; padding: 15px; background: var(--blue-soft); }
.account-card strong { display: block; }
.account-card p { margin: 2px 0; color: var(--muted); font-size: 13px; }
.account-card .button-row { grid-column: 1 / -1; margin-top: 5px; }
.verified { color: var(--green) !important; font-weight: 700; }
.member-tools { margin-top: 28px; border-top: 1px solid var(--line); padding-top: 25px; }
.member-tools h3 { margin: 0 0 6px; font-size: 20px; }
.page-mode #activityArea { display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 30px; align-items: start; margin-top: 28px; }
.page-mode .account-card { position: sticky; top: 100px; margin-top: 0; }
.page-mode #memberTools { min-width: 0; }
.account-tabs { display: flex; gap: 4px; overflow-x: auto; margin: 0 0 20px; border-bottom: 1px solid var(--line); scrollbar-width: none; }
.account-tabs::-webkit-scrollbar { display: none; }
.account-tabs button { flex: 0 0 auto; border: 0; border-bottom: 3px solid transparent; padding: 12px 13px 10px; background: transparent; color: var(--muted); font-weight: 800; }
.account-tabs button:hover { color: var(--navy); }
.account-tabs button.active { border-bottom-color: var(--gold); color: var(--navy); }
.page-mode .account-tabs { position: sticky; top: 76px; z-index: 5; background: var(--paper); }
.account-panel { display: grid; gap: 18px; }
.account-panel .member-tools { margin: 0; border-top: 0; padding-top: 0; }
.account-section { border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; background: var(--card); box-shadow: var(--shadow-sm); }
.account-section h3 { margin: 0 0 6px; font-family: "Libre Caslon Text", serif; font-size: 22px; }
.topic-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.topic-form-grid .wide { grid-column: 1 / -1; }
.section-heading-row { display: flex; align-items: start; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.result-count { flex: 0 0 auto; border-radius: 999px; padding: 5px 10px; background: var(--blue-soft); color: var(--navy); font-size: 12px; font-weight: 800; }
.management-toolbar { display: grid; grid-template-columns: minmax(190px, 1fr) auto auto; gap: 9px; margin-bottom: 14px; }
.management-toolbar input, .management-toolbar select { width: 100%; min-height: 42px; border: 1px solid var(--line); border-radius: 9px; padding: 8px 11px; background: white; color: var(--ink); }
.management-summary { margin: 0 0 10px; color: var(--muted); font-size: 13px; }
.management-list { border: 1px solid var(--line); border-radius: 11px; overflow: hidden; }
.management-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 15px 16px; border-top: 1px solid var(--line); background: white; }
.management-row:first-child { border-top: 0; }
.management-main { min-width: 0; }
.management-main strong { display: block; margin-top: 3px; overflow: hidden; text-overflow: ellipsis; }
.management-main p { display: -webkit-box; margin: 5px 0 0; overflow: hidden; color: var(--muted); font-size: 13px; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.category-label { color: var(--gold-dark); font-size: 11px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.management-actions { display: flex; flex: 0 0 auto; gap: 7px; }
.item-badges { display: flex; gap: 6px; margin-bottom: 4px; }
.type-badge, .status-badge { border-radius: 999px; padding: 3px 8px; background: var(--blue-soft); color: var(--navy); font-size: 10px; font-weight: 800; text-transform: capitalize; }
.status-badge.pending { background: var(--gold-soft); color: var(--gold-dark); }
.status-badge.deleted, .status-badge.cancelled { background: #fae9e9; color: var(--red); }
.status-badge.approved, .status-badge.visible { background: #e7f4ed; color: var(--green); }
.management-empty { border: 1px dashed #b8c1cd; border-radius: 11px; padding: 38px 20px; text-align: center; }
.management-empty p { margin: 4px 0 0; color: var(--muted); }
.pagination { display: flex; align-items: center; justify-content: flex-end; gap: 12px; margin-top: 14px; color: var(--muted); font-size: 12px; }
.pagination button:disabled { cursor: not-allowed; opacity: .45; transform: none; }
.page-mode .participation-note { margin-left: 300px; }
.profile-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.profile-form-grid .wide { grid-column: 1 / -1; }
.form-field textarea { min-height: 88px; resize: vertical; }
.field-help { margin: 4px 0 0; color: var(--muted); font-size: 11px; }
.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 14px 0; }
.stat { border: 1px solid var(--line); border-radius: 10px; padding: 12px 8px; background: white; text-align: center; }
.stat strong { display: block; color: var(--navy); font: 700 23px "Libre Caslon Text", serif; }
.stat span { color: var(--muted); font-size: 11px; }
.activity-list { list-style: none; margin: 10px 0 0; padding: 0; }
.activity-list li { position: relative; padding: 9px 0 9px 19px; border-bottom: 1px solid #ece9e1; color: var(--ink-soft); font-size: 13px; }
.activity-list li::before { content: ""; position: absolute; left: 1px; top: 16px; width: 7px; height: 7px; border-radius: 50%; background: var(--gold); }
.queue-item { margin: 10px 0; border: 1px solid var(--line); border-radius: 10px; padding: 13px; background: white; }
.queue-item p { margin: 5px 0 10px; color: var(--muted); font-size: 13px; }
.participation-note { margin-top: 30px; border-top: 1px solid var(--line); padding-top: 22px; color: var(--muted); font-size: 13px; }
.participation-note strong { color: var(--ink); }
.participation-note p { margin: 5px 0 0; }

.profile-page { max-width: 1120px; min-height: calc(100vh - 76px); margin: 0 auto; padding: 42px 24px 80px; }
.back-button { border: 0; padding: 8px 0; background: none; color: var(--navy-light); font-weight: 800; }
.profile-hero { position: relative; overflow: hidden; margin-top: 13px; border: 1px solid var(--line); border-radius: 22px; padding: clamp(27px, 5vw, 54px); background: linear-gradient(135deg, #172f57, #284c77); color: white; box-shadow: var(--shadow); }
.profile-hero::after { content: ""; position: absolute; width: 330px; height: 330px; right: -120px; bottom: -210px; border: 60px solid rgba(243,198,95,.15); border-radius: 50%; }
.profile-identity { position: relative; z-index: 1; display: grid; grid-template-columns: 104px minmax(0,1fr); align-items: center; gap: 25px; }
.profile-identity h1 { margin: 0; font-size: clamp(30px, 5vw, 47px); }
.profile-handle { margin: 5px 0 0; color: #d9e2ee; }
.role-badge { display: inline-flex; margin-top: 9px; border: 1px solid rgba(255,255,255,.28); border-radius: 999px; padding: 4px 9px; color: #f5cf79; font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.profile-bio { position: relative; z-index: 1; max-width: 700px; margin: 24px 0 0 129px; color: #e5ebf2; font-size: 16px; }
.profile-content { display: grid; grid-template-columns: 1fr 300px; gap: 25px; margin-top: 26px; }
.profile-panel { border: 1px solid var(--line); border-radius: var(--radius); padding: 23px; background: var(--card); box-shadow: var(--shadow-sm); }
.profile-panel h2 { margin: 0 0 15px; font-size: 22px; }
.profile-topic { display: block; width: 100%; border: 0; border-top: 1px solid var(--line); padding: 16px 0; background: none; color: var(--ink); text-align: left; }
.profile-topic:first-of-type { border-top: 0; }
.profile-topic strong { display: block; font-size: 15px; }
.profile-topic span { color: var(--muted); font-size: 12px; }
.profile-page .stats-grid { grid-template-columns: 1fr; }
.profile-page .stat { display: flex; align-items: center; justify-content: space-between; padding: 14px; text-align: left; }
.profile-page .stat strong { order: 2; }
.profile-events { margin-top: 18px; }

.feature-page { max-width: 1240px; min-height: calc(100vh - 76px); margin: 0 auto; padding: 42px 24px 80px; }
.feature-hero { position: relative; overflow: hidden; margin-bottom: 34px; border-radius: 22px; padding: clamp(30px, 5vw, 58px); background: linear-gradient(135deg, #14284b, #274c78); color: white; box-shadow: var(--shadow); }
.feature-hero::after { content: ""; position: absolute; width: 310px; height: 310px; right: -120px; top: -180px; border: 55px solid rgba(243,198,95,.14); border-radius: 50%; }
.feature-hero h1 { position: relative; z-index: 1; margin: 5px 0 12px; color: white; font-size: clamp(34px, 5vw, 54px); }
.feature-hero > p:not(.eyebrow) { position: relative; z-index: 1; max-width: 720px; margin: 0; color: #e3eaf2; font-size: 17px; }
.feature-hero .button-row { position: relative; z-index: 1; margin-top: 22px; }
.feature-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 28px; align-items: start; }
.feature-layout h2, .feature-page section > .section-heading-row h2, .feature-side h2 { margin: 0 0 5px; font-size: 25px; }
.feature-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px; }
.feature-card { display: flex; min-height: 210px; flex-direction: column; border: 1px solid var(--line); border-radius: 15px; padding: 21px; background: var(--card); color: var(--ink); text-align: left; box-shadow: var(--shadow-sm); }
.feature-card:hover { border-color: #afbac8; transform: translateY(-2px); box-shadow: var(--shadow); }
.feature-card h3 { margin: 8px 0; font: 700 20px "Libre Caslon Text", serif; }
.feature-card p { display: -webkit-box; overflow: hidden; margin: 0; color: var(--muted); font-size: 14px; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
.topic-parent { margin-top: 13px; color: var(--navy-light); font-size: 12px; font-weight: 700; }
.feature-card footer { display: flex; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 18px; color: var(--muted); font-size: 11px; }
.feature-side, .room-panel { border: 1px solid var(--line); border-radius: 15px; padding: 22px; background: var(--card); box-shadow: var(--shadow-sm); }
.feature-side { position: sticky; top: 96px; }
.feature-side form > .btn { width: 100%; margin-top: 16px; }
.starter-section { margin-top: 34px; border-top: 1px solid var(--line); padding-top: 28px; }
.starter-section.first { margin: 0 0 34px; border-top: 0; padding-top: 0; }
.starter-section h2 { margin: 0 0 5px; font-size: 24px; }
.template-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 10px; margin-top: 16px; }
.template-card { min-height: 145px; border: 1px solid var(--line); border-radius: 12px; padding: 16px; background: var(--card); color: var(--ink); text-align: left; box-shadow: var(--shadow-sm); }
.template-card:hover { border-color: var(--gold); background: var(--gold-soft); }
.template-card strong { display: block; margin: 8px 0 18px; font: 700 15px/1.35 "Libre Caslon Text", serif; }
.template-card > span:last-child { color: var(--navy-light); font-size: 12px; font-weight: 800; }
.room-hero { margin: 14px 0 24px; }
.room-topic-line { position: relative; z-index: 1; display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 20px; color: #eef3f8; font-size: 13px; font-weight: 700; }
.room-topic-line .btn { border-color: rgba(255,255,255,.32); background: rgba(255,255,255,.08); color: white; }
.host-line { position: relative; z-index: 1; display: flex; align-items: center; gap: 9px; margin-top: 22px; color: #e3eaf2; font-size: 13px; }
.host-line .avatar { width: 32px; height: 32px; }
.room-message { display: grid; grid-template-columns: 38px minmax(0,1fr); gap: 12px; padding: 17px 0; border-top: 1px solid var(--line); }
.room-message:first-child { border-top: 0; }
.room-message p { margin: 5px 0 0; color: var(--ink-soft); white-space: pre-wrap; }
.room-composer { display: grid; grid-template-columns: 1fr auto; gap: 10px; margin-top: 18px; border-top: 1px solid var(--line); padding-top: 18px; }
.room-composer textarea { min-height: 86px; border: 1px solid var(--line); border-radius: 10px; padding: 12px; resize: vertical; }
.room-composer .btn { align-self: end; }
.meeting-grid { display: grid; gap: 14px; }
.meeting-card { display: grid; grid-template-columns: 72px minmax(0,1fr); gap: 19px; border: 1px solid var(--line); border-radius: 15px; padding: 22px; background: var(--card); box-shadow: var(--shadow-sm); }
.meeting-date { display: flex; height: 72px; flex-direction: column; align-items: center; justify-content: center; border-radius: 13px; background: var(--gold-soft); color: var(--gold-dark); }
.meeting-date strong { font: 700 28px "Libre Caslon Text", serif; }
.meeting-date span { font-size: 11px; font-weight: 800; text-transform: uppercase; }
.meeting-card h3 { margin: 8px 0 6px; font-size: 21px; }
.meeting-card p { margin: 0; color: var(--muted); }
.meeting-meta { margin-top: 12px; color: var(--ink-soft); font-size: 13px; }
.meeting-filter { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 15px; }
.meeting-filter .active { border-color: var(--gold); background: var(--gold-soft); color: var(--gold-dark); }

.modal-backdrop { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 20px; background: rgba(8,19,38,.62); backdrop-filter: blur(4px); }
.modal { position: relative; width: min(690px, 100%); max-height: calc(100vh - 40px); overflow-y: auto; border-radius: 20px; padding: clamp(25px, 4vw, 42px); background: var(--card); box-shadow: 0 30px 90px rgba(0,0,0,.28); }
.modal h2 { margin: 4px 0 24px; font-size: 30px; }
.modal-close { position: absolute; top: 16px; right: 16px; }
.guideline-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.guideline-grid div { border: 1px solid var(--line); border-radius: 12px; padding: 16px; }
.guideline-grid span { display: block; color: var(--gold-dark); font-size: 11px; font-weight: 800; }
.guideline-grid strong { display: block; margin-top: 3px; }
.guideline-grid p { margin: 5px 0 0; color: var(--muted); font-size: 13px; }
.toast { position: fixed; right: 22px; bottom: 22px; z-index: 70; max-width: min(380px, calc(100vw - 32px)); border-radius: 11px; padding: 13px 17px; background: var(--navy); color: white; box-shadow: var(--shadow); opacity: 0; pointer-events: none; transform: translateY(14px); transition: .2s; }
.toast.show { opacity: 1; transform: none; }

@media (max-width: 980px) {
  .shell { grid-template-columns: 235px minmax(0,1fr); gap: 25px; }
  .view-grid { grid-template-columns: 1fr; }
  .page-mode #activityArea { grid-template-columns: 220px minmax(0, 1fr); gap: 20px; }
  .page-mode .participation-note { margin-left: 240px; }
  .management-toolbar { grid-template-columns: 1fr 1fr; }
  .management-search { grid-column: 1 / -1; }
  .feature-layout { grid-template-columns: 1fr; }
  .feature-side { position: static; }
}

@media (max-width: 1100px) and (min-width: 761px) {
  .topbar { gap: 14px; }
  .desktop-search { width: min(320px, 29vw); margin-left: 0; }
  .nav-actions { gap: 2px; }
  .nav-link { padding-left: 8px; padding-right: 8px; font-size: 14px; }
}

@media (max-width: 760px) {
  .topbar { height: 68px; padding: 0 16px; gap: 12px; }
  .brand { font-size: 18px; }
  .brand-mark { width: 34px; height: 34px; }
  .desktop-search, .nav-link:not(.community-link) { display: none; }
  .community-link { display: block; padding: 8px 6px; font-size: 12px; }
  .wide-label { display: none; }
  .account-button { min-height: 40px; padding: 7px 12px; }
  .mobile-search-wrap { display: block; padding: 12px 16px 0; background: var(--paper); }
  .mobile-search { color: var(--muted); }
  .mobile-search input { border-color: var(--line); background: var(--card); color: var(--ink); }
  .mobile-search input::placeholder { color: var(--muted); }
  .shell { display: block; padding: 16px 16px 55px; }
  .sidebar { display: none; }
  .mobile-navigation { display: block; margin-bottom: 22px; }
  .mobile-trending { display: flex; gap: 8px; overflow-x: auto; margin: 0 -16px 12px; padding: 0 16px 6px; scrollbar-width: none; }
  .mobile-trending::-webkit-scrollbar { display: none; }
  .mobile-topic { flex: 0 0 min(270px, 78vw); border: 1px solid var(--line); border-radius: 11px; padding: 11px 13px; background: var(--card); color: var(--ink); text-align: left; box-shadow: var(--shadow-sm); }
  .mobile-topic strong { display: block; font-size: 13px; line-height: 1.35; }
  .mobile-topic small { color: var(--muted); }
  .mobile-topic.active { border-color: var(--gold); box-shadow: inset 3px 0 var(--gold); }
  .topic-browser { border: 1px solid var(--line); border-radius: 11px; background: var(--card); overflow: hidden; }
  .topic-browser > summary { padding: 12px 14px; color: var(--navy); font-weight: 800; }
  .topic-browser > summary span { color: var(--muted); font-weight: 500; }
  .topic-browser #mobileCategories { border-top: 1px solid var(--line); padding: 5px; }
  .mobile-category { margin: 5px; }
  .mobile-category summary { padding: 8px; color: var(--ink); font-size: 13px; font-weight: 800; }
  .topic-hero { border-radius: 15px; padding: 27px 21px; }
  .topic-hero h1 { font-size: clamp(29px, 9vw, 41px); }
  .topic-hero .lead { font-size: 15px; }
  .discussion-summary { display: block; }
  .discussion-summary p { margin-top: 3px; }
  .view-card-head, .comments { padding-left: 18px; padding-right: 18px; }
  .vote-row { padding-left: 18px; padding-right: 18px; }
  .account-drawer { padding: 23px 20px; }
  .account-tabs { margin-top: 20px; }
  .account-section { border: 0; border-radius: 0; padding: 22px 0; box-shadow: none; }
  .account-panel { gap: 0; }
  .topic-form-grid { grid-template-columns: 1fr; }
  .topic-form-grid .wide { grid-column: auto; }
  .management-toolbar { grid-template-columns: 1fr; }
  .management-search { grid-column: auto; }
  .management-row { align-items: flex-start; flex-direction: column; gap: 11px; }
  .management-actions { width: 100%; }
  .management-actions .btn { flex: 1; }
  .pagination { justify-content: space-between; }
  .profile-page { padding: 24px 16px 60px; }
  .feature-page { padding: 24px 16px 60px; }
  .feature-hero { border-radius: 15px; padding: 30px 22px; }
  .feature-grid { grid-template-columns: 1fr; }
  .template-grid { grid-template-columns: 1fr; }
  .template-card { min-height: 0; }
  .room-panel { padding: 18px; }
  .room-composer { grid-template-columns: 1fr; }
  .room-composer .btn { width: 100%; }
  .meeting-card { grid-template-columns: 55px minmax(0,1fr); gap: 13px; padding: 17px; }
  .meeting-date { height: 55px; }
  .meeting-date strong { font-size: 22px; }
  .profile-identity { grid-template-columns: 76px minmax(0,1fr); gap: 17px; }
  .avatar.large { width: 76px; height: 76px; font-size: 24px; }
  .profile-bio { margin: 20px 0 0; }
  .profile-content { grid-template-columns: 1fr; }
  .profile-content aside { order: -1; }
  .profile-page .stats-grid { grid-template-columns: repeat(3,1fr); }
  .profile-page .stat { display: block; padding: 10px 5px; text-align: center; }
  .guideline-grid { grid-template-columns: 1fr; }
}

@media (max-width: 430px) {
  .brand span:last-child { font-size: 17px; }
  .comment { grid-template-columns: 33px minmax(0,1fr); }
  .avatar { width: 33px; height: 33px; }
  .composer-footer { align-items: end; }
  .composer-note { max-width: 160px; }
  .profile-form-grid { grid-template-columns: 1fr; }
  .profile-form-grid .wide { grid-column: auto; }
  .stats-grid { gap: 5px; }
  .stat { padding-left: 4px; padding-right: 4px; }
  .stat strong { font-size: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
