@import url('https://fonts.googleapis.com/css2?family=DM+Mono:wght@400;500&family=Space+Grotesk:wght@400;500;600;700&display=swap');

:root {
  color-scheme: light;
  --paper: #f5f6f1;
  --surface: #ffffff;
  --ink: #18211d;
  --muted: #717a73;
  --line: #e3e7df;
  --lime: #d7f36b;
  --coral: #ff8268;
  --mint: #78d5c7;
  --yellow: #ffc76b;
  --font: 'Space Grotesk', 'Trebuchet MS', sans-serif;
  --mono: 'DM Mono', monospace;
}

* { box-sizing: border-box; }
html { min-width: 320px; scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--font); font-size: 14px; }
button, input, textarea, select { font: inherit; }
button { color: inherit; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }

.topbar { height: 72px; padding: 0 5.1vw; background: rgba(255,255,255,.9); border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 240px minmax(180px, 540px) 1fr; align-items: center; gap: 34px; position: sticky; top: 0; z-index: 5; backdrop-filter: blur(14px); }
.brand { display: flex; align-items: center; gap: 10px; font-size: 21px; font-weight: 700; letter-spacing: 0; width: fit-content; }
.brand-mark, .user-glyph, .compose-avatar { display: grid; place-items: center; border-radius: 50%; background: var(--lime); color: var(--ink); font-weight: 700; }
.brand-mark { width: 33px; height: 33px; font-size: 21px; transform: rotate(-8deg); }
.brand-period, .title-dot { color: #eb684d; }
.searchbox { height: 40px; border: 1px solid var(--line); border-radius: 4px; background: #f8f9f6; display: flex; align-items: center; padding: 0 12px; gap: 9px; color: var(--muted); }
.searchbox > span { font-size: 22px; line-height: 1; }
.searchbox input { width: 100%; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 13px; }
.searchbox input::placeholder { color: #8e968f; }
kbd { font: 11px var(--mono); border: 1px solid var(--line); border-radius: 3px; padding: 2px 5px; color: #879087; }
.account-actions { display: flex; align-items: center; justify-content: flex-end; gap: 18px; font-size: 13px; }
.account-user { gap: 11px; }
.user-glyph { width: 27px; height: 27px; font-size: 14px; }
.text-button { border: 0; background: transparent; cursor: pointer; padding: 8px 0; font-weight: 600; }
.text-button:hover { color: #557319; }
.primary-button { display: inline-flex; align-items: center; gap: 12px; border: 0; border-radius: 4px; padding: 11px 14px; background: var(--ink); color: #fff; font-size: 12px; font-weight: 600; cursor: pointer; transition: transform .18s ease, background .18s ease; }
.primary-button:hover { transform: translateY(-1px); background: #34423a; }
.menu-toggle { display: none !important; }

.layout { max-width: 1440px; min-height: calc(100vh - 72px); margin: 0 auto; padding: 0 5.1vw; display: grid; grid-template-columns: 220px minmax(420px, 680px) minmax(220px, 280px); justify-content: space-between; gap: 34px; }
.left-rail { min-height: calc(100vh - 72px); border-right: 1px solid var(--line); padding: 34px 24px 24px 0; display: flex; flex-direction: column; position: sticky; top: 72px; align-self: start; height: calc(100vh - 72px); }
.rail-label, .eyebrow, .toolbar-label, .note-domain, .right-footer, .count { font: 10px var(--mono); letter-spacing: 0; color: var(--muted); }
.nav-item { width: 100%; display: flex; align-items: center; gap: 12px; padding: 10px 12px; margin: 8px 0 0 -12px; border: 0; border-radius: 4px; background: transparent; text-align: left; font-size: 13px; cursor: pointer; color: #48534b; }
.nav-item:hover, .nav-item.active { background: #e9eddf; color: var(--ink); }
.nav-symbol { width: 16px; text-align: center; font-size: 17px; }
.rail-divider { height: 1px; background: var(--line); margin: 24px 0 21px; }
.rail-heading { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.count { color: #9ba39b; }
.community-nav { display: grid; gap: 2px; }
.community-link { width: 100%; display: flex; align-items: center; gap: 10px; border: 0; border-radius: 4px; padding: 9px 8px; background: transparent; cursor: pointer; text-align: left; color: #465049; font-size: 12px; }
.community-link:hover, .community-link.current { background: #e9eddf; color: var(--ink); }
.community-icon { width: 23px; height: 23px; border-radius: 7px; display: grid; place-items: center; font: 11px var(--mono); color: var(--ink); flex: 0 0 auto; }
.rail-note { margin-top: auto; min-height: 164px; padding: 15px; border-radius: 4px; background: var(--ink); color: white; display: flex; flex-direction: column; align-items: flex-start; overflow: hidden; position: relative; }
.rail-note::after { content: ''; width: 90px; height: 90px; position: absolute; right: -26px; top: -34px; border: 1px solid rgba(215,243,107,.4); border-radius: 50%; box-shadow: 0 0 0 14px rgba(215,243,107,.08), 0 0 0 28px rgba(215,243,107,.05); }
.note-mark { font-size: 23px; line-height: 1; color: var(--lime); }
.rail-note p { max-width: 155px; margin: 13px 0 auto; color: #e6e9e4; font-size: 13px; line-height: 1.45; }
.note-domain { margin-top: 16px; color: #aab5a9; font-size: 8px; }

.feed-column { min-width: 0; padding: 44px 0 70px; }
.feed-heading { display: flex; justify-content: space-between; align-items: center; gap: 18px; margin-bottom: 28px; }
.eyebrow { color: #778076; }
h1 { margin: 8px 0 4px; font-size: clamp(30px, 3.2vw, 42px); line-height: 1.03; font-weight: 600; letter-spacing: 0; }
.feed-heading p { margin: 0; color: var(--muted); font-size: 13px; }
.round-compose { width: 43px; height: 43px; flex: 0 0 auto; border: 0; border-radius: 50%; background: var(--lime); cursor: pointer; font-size: 25px; transition: transform .18s ease; }
.round-compose:hover { transform: rotate(90deg); }
.compose-prompt { width: 100%; height: 58px; padding: 0 15px; display: flex; gap: 12px; align-items: center; border: 1px solid var(--line); border-radius: 4px; background: var(--surface); color: #858e86; text-align: left; cursor: pointer; }
.compose-prompt:hover { border-color: #b6c87e; }
.compose-avatar { width: 29px; height: 29px; flex: 0 0 auto; font-size: 15px; }
.compose-arrow { margin-left: auto; font-size: 16px; color: #59645c; }
.feed-toolbar { display: flex; justify-content: space-between; align-items: center; margin: 31px 0 10px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.toolbar-label { color: #616c64; }
.sort-control { display: flex; align-items: center; gap: 3px; }
.sort-button { padding: 7px 10px; border: 0; border-radius: 3px; background: transparent; color: #7c867e; font-size: 11px; cursor: pointer; }
.sort-button:hover, .sort-button.selected { background: #e8eddc; color: var(--ink); }
.post-list { display: grid; gap: 10px; }
.post-card { background: var(--surface); border: 1px solid var(--line); border-radius: 4px; padding: 17px 18px 14px; animation: arrive .35s both; }
@keyframes arrive { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: translateY(0); } }
.post-meta { display: flex; align-items: center; gap: 8px; font-size: 11px; color: var(--muted); }
.community-tag { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 600; color: #455046; }
.community-tag .community-icon { width: 19px; height: 19px; border-radius: 5px; font-size: 9px; }
.meta-dot { color: #bdc4bb; }
.post-title { margin: 12px 0 7px; font-size: 18px; line-height: 1.28; letter-spacing: 0; font-weight: 600; overflow-wrap: anywhere; }
.post-body { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; color: #505b53; font-size: 13px; line-height: 1.6; }
.post-actions { display: flex; align-items: center; gap: 7px; margin-top: 16px; }
.vote-group { display: flex; align-items: center; background: #f2f4ee; border-radius: 4px; padding: 2px; }
.action-button { min-height: 28px; display: inline-flex; align-items: center; gap: 6px; padding: 5px 8px; border: 0; border-radius: 3px; background: transparent; color: #6a746b; cursor: pointer; font-size: 11px; }
.action-button:hover { background: #e8eddd; color: var(--ink); }
.action-button.vote-up.selected { color: #5e811e; background: #e4f2c1; }
.action-button.vote-down.selected { color: #bd5944; background: #ffe4dd; }
.score { min-width: 22px; text-align: center; font: 11px var(--mono); color: #4e594f; }
.empty-state { min-height: 290px; border: 1px dashed #d4dbce; border-radius: 4px; padding: 34px; display: grid; align-content: center; justify-items: center; text-align: center; background: rgba(255,255,255,.38); }
.empty-mark { width: 58px; height: 58px; display: grid; place-items: center; border-radius: 50%; background: var(--lime); font-size: 27px; transform: rotate(-8deg); }
.empty-state h2 { margin: 17px 0 4px; font-size: 19px; font-weight: 600; }
.empty-state p { max-width: 270px; margin: 0 0 17px; color: var(--muted); line-height: 1.55; }
.comment-list { display: grid; gap: 10px; margin: 14px 0 8px 7px; padding-left: 12px; border-left: 2px solid #e3e9d7; }
.comment { font-size: 12px; line-height: 1.5; color: #4d5950; white-space: pre-wrap; overflow-wrap: anywhere; }
.comment-author { margin-right: 6px; color: var(--ink); font-weight: 600; }
.comment-form { display: flex; gap: 7px; margin: 13px 0 0; }
.comment-form input { width: 100%; min-width: 0; height: 36px; border: 1px solid var(--line); border-radius: 3px; padding: 0 10px; outline: 0; }
.comment-form input:focus, .form-field:focus { border-color: #91ae4d; box-shadow: 0 0 0 3px rgba(215,243,107,.28); }
.comment-form button { border: 0; border-radius: 3px; padding: 0 12px; background: var(--ink); color: white; font-size: 11px; cursor: pointer; }

.right-rail { min-height: calc(100vh - 72px); border-left: 1px solid var(--line); padding: 46px 0 24px 27px; display: flex; flex-direction: column; position: sticky; top: 72px; align-self: start; height: calc(100vh - 72px); }
.side-section { padding: 0 0 27px; border-bottom: 1px solid var(--line); }
.side-section-top { display: flex; align-items: center; gap: 8px; }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: #8bb73d; box-shadow: 0 0 0 4px rgba(139,183,61,.13); }
.right-rail h2 { margin: 19px 0 12px; font-size: 26px; line-height: 1.04; font-weight: 600; letter-spacing: 0; }
.right-rail h2 em { color: #688c2a; font-weight: 500; }
.right-rail p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.community-total { display: flex; align-items: baseline; gap: 7px; margin-top: 18px; font-size: 11px; color: #758076; }
.community-total span:first-child { font: 18px var(--mono); color: var(--ink); }
.community-picks { padding-top: 22px; }
.pick-link { width: 100%; display: grid; grid-template-columns: 30px 1fr 20px; align-items: center; gap: 9px; padding: 12px 0; border: 0; border-bottom: 1px solid var(--line); background: transparent; text-align: left; cursor: pointer; }
.pick-link:last-child { border-bottom: 0; }
.pick-copy { display: grid; gap: 2px; min-width: 0; }
.pick-copy strong { font-size: 11px; font-weight: 600; }
.pick-copy small { color: var(--muted); font-size: 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pick-arrow { justify-self: end; color: #8a9589; }
.right-footer { margin-top: auto; display: grid; gap: 7px; font-size: 8px; color: #8b958b; }

.modal { width: min(460px, calc(100vw - 28px)); max-width: none; padding: 0; border: 0; border-radius: 5px; background: var(--surface); color: var(--ink); box-shadow: 0 24px 80px rgba(18,31,21,.24); }
.modal::backdrop { background: rgba(19,29,22,.48); backdrop-filter: blur(3px); }
.modal-panel { padding: 28px; }
.modal-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; }
.modal-title { margin: 7px 0 0; font-size: 25px; line-height: 1.1; letter-spacing: 0; }
.modal-close { width: 30px; height: 30px; border: 0; border-radius: 50%; background: #f1f3ed; font-size: 18px; cursor: pointer; }
.modal-copy { margin: 9px 0 20px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.auth-tabs { display: flex; gap: 4px; padding: 4px; margin: 19px 0; border-radius: 4px; background: #f0f2ec; }
.auth-tab { flex: 1; padding: 9px; border: 0; border-radius: 3px; background: transparent; color: var(--muted); cursor: pointer; font-size: 12px; }
.auth-tab.active { background: white; color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.form-stack { display: grid; gap: 14px; }
.form-row { display: grid; gap: 6px; }
.form-row label { font-size: 11px; font-weight: 600; }
.form-field { width: 100%; min-height: 42px; padding: 10px 11px; border: 1px solid var(--line); border-radius: 3px; outline: 0; background: #fbfcfa; font-size: 13px; }
textarea.form-field { resize: vertical; min-height: 110px; }
.form-hint { color: #7e887f; font: 10px var(--mono); }
.form-submit { width: 100%; justify-content: center; min-height: 43px; margin-top: 4px; }
.form-error { min-height: 16px; color: #bb513c; font-size: 11px; }
.toast { position: fixed; left: 50%; bottom: 24px; z-index: 10; transform: translate(-50%, 14px); opacity: 0; pointer-events: none; max-width: calc(100vw - 32px); padding: 12px 16px; border-radius: 4px; background: var(--ink); color: white; font-size: 12px; box-shadow: 0 8px 25px rgba(0,0,0,.18); transition: opacity .2s ease, transform .2s ease; }
.toast.visible { opacity: 1; transform: translate(-50%, 0); }
.modal.owner-modal { width: min(760px, calc(100vw - 28px)); max-height: min(88dvh, 780px); overflow-y: auto; }
.modal.moderation-modal { width: min(760px, calc(100vw - 28px)); max-height: min(88dvh, 780px); overflow-y: auto; }
.owner-panel .modal-copy { max-width: 520px; }
.moderation-panel .modal-copy { max-width: 520px; }
.owner-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 22px 0 25px; }
.owner-stat { min-width: 0; display: grid; gap: 4px; padding: 12px 13px; border-radius: 3px; background: #f2f4ed; }
.owner-stat strong { color: var(--ink); font: 20px var(--mono); }
.owner-stat span { color: var(--muted); font: 10px var(--mono); }
.owner-policy-note { margin: -12px 0 17px; padding: 9px 10px; border-left: 3px solid var(--coral); background: #fff3ef; color: #78594f; font-size: 11px; line-height: 1.45; }
.owner-roster-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 9px; border-bottom: 1px solid var(--line); }
.owner-roster-heading h3 { margin: 0; font-size: 14px; font-weight: 600; }
.owner-member { display: grid; grid-template-columns: minmax(0, 1fr) 145px; align-items: center; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.owner-member-identity { min-width: 0; display: grid; gap: 4px; }
.owner-member-identity strong { overflow-wrap: anywhere; font-size: 12px; }
.owner-member-identity small { color: var(--muted); font-size: 10px; line-height: 1.45; }
.moderation-section { margin-top: 24px; }
.moderation-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 9px; border-bottom: 1px solid var(--line); }
.moderation-section-heading h3 { margin: 0; font-size: 14px; font-weight: 600; }
.moderation-list { display: grid; gap: 8px; margin-top: 10px; }
.moderation-item { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; padding: 12px; border: 1px solid var(--line); border-radius: 3px; background: #fbfcfa; }
.moderation-item-copy { min-width: 0; }
.moderation-item h3 { margin: 0; font-size: 12px; font-weight: 600; overflow-wrap: anywhere; }
.moderation-item-meta { margin-top: 4px; color: var(--muted); font: 10px var(--mono); }
.moderation-item p { max-height: 72px; margin: 8px 0 0; overflow: auto; color: #4d5950; font-size: 11px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.moderation-empty { margin: 0; padding: 16px 0 4px; color: var(--muted); font-size: 12px; }
.role-select { width: 100%; min-width: 0; min-height: 36px; padding: 0 9px; border: 1px solid var(--line); border-radius: 3px; background: #fbfcfa; font-size: 11px; }
.role-select:focus { outline: 2px solid rgba(145,174,77,.45); outline-offset: 1px; }
.role-select:disabled { color: #667064; background: #edf0e9; opacity: 1; }
.comment { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.comment-copy { min-width: 0; }
.moderation-remove { flex: 0 0 auto; padding: 3px 5px; border: 0; border-radius: 3px; background: transparent; color: #a84d3a; font-size: 10px; cursor: pointer; white-space: nowrap; }
.moderation-remove:hover { background: #ffe9e3; }
.action-button.moderation-remove { margin-left: auto; padding: 5px 8px; }
.social-button { position: relative; width: 32px; height: 32px; display: inline-grid; place-items: center; flex: 0 0 auto; border: 1px solid var(--line); border-radius: 4px; background: #fff; color: var(--ink); font-size: 17px; cursor: pointer; }
.social-button:hover { border-color: #bacb85; background: #f6f8ef; }
.unread-badge { position: absolute; top: -6px; right: -6px; min-width: 16px; height: 16px; display: grid; place-items: center; padding: 0 4px; border: 2px solid #fff; border-radius: 10px; background: #e96e53; color: #fff; font: 8px var(--mono); }
.modal.social-modal { width: min(900px, calc(100vw - 28px)); max-height: min(90dvh, 840px); overflow-y: auto; }
.social-panel .modal-copy { max-width: 520px; }
.social-tabs { display: flex; gap: 4px; margin: 0 0 14px; border-bottom: 1px solid var(--line); }
.social-tab { display: inline-flex; align-items: center; gap: 7px; padding: 10px 12px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--muted); font-size: 12px; cursor: pointer; }
.social-tab:hover, .social-tab.active { border-bottom-color: #7f9c3e; color: var(--ink); }
.social-tab-count { min-width: 17px; height: 17px; display: grid; place-items: center; border-radius: 9px; background: var(--lime); color: var(--ink); font: 9px var(--mono); }
.social-inbox { min-height: 430px; display: grid; grid-template-columns: minmax(210px, 270px) minmax(0, 1fr); overflow: hidden; border: 1px solid var(--line); border-radius: 3px; background: #fff; }
.conversation-list { max-height: min(62vh, 540px); overflow-y: auto; border-right: 1px solid var(--line); background: #fafbf8; }
.conversation-item { width: 100%; min-width: 0; display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; align-items: center; gap: 9px; padding: 11px 10px; border: 0; border-bottom: 1px solid var(--line); background: transparent; text-align: left; cursor: pointer; }
.conversation-item:hover, .conversation-item.active { background: #edf2e3; }
.social-avatar { width: 30px; height: 30px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 50%; background: var(--lime); color: var(--ink); font-size: 12px; font-weight: 700; }
.conversation-summary { min-width: 0; display: grid; gap: 3px; }
.conversation-summary strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
.conversation-summary small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 10px; }
.conversation-unread { min-width: 18px; height: 18px; display: grid; place-items: center; padding: 0 4px; border-radius: 9px; background: #e96e53; color: #fff; font: 9px var(--mono); }
.social-empty-list { padding: 18px 12px; color: var(--muted); font-size: 11px; line-height: 1.5; }
.message-thread { min-width: 0; min-height: 0; display: flex; flex-direction: column; background: #fff; }
.message-thread-header { display: flex; align-items: center; gap: 9px; padding: 10px 14px; border-bottom: 1px solid var(--line); font-size: 12px; }
.message-thread-header strong { overflow-wrap: anywhere; }
.message-list { min-height: 250px; max-height: min(50vh, 480px); flex: 1; display: flex; flex-direction: column; gap: 10px; overflow-y: auto; padding: 14px; }
.message-row { display: flex; justify-content: flex-start; }
.message-row.own { justify-content: flex-end; }
.message-bubble { width: fit-content; max-width: min(82%, 440px); padding: 9px 11px; border-radius: 4px; background: #f0f2ec; }
.message-row.own .message-bubble { background: #e8f2ce; }
.message-author { color: #627064; font: 9px var(--mono); }
.message-bubble p { margin: 4px 0 6px; color: var(--ink); font-size: 12px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.message-bubble time { display: block; color: #818a81; font: 9px var(--mono); text-align: right; }
.message-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 8px; padding: 11px; border-top: 1px solid var(--line); }
.message-input { min-width: 0; min-height: 42px; max-height: 120px; resize: vertical; border: 1px solid var(--line); border-radius: 3px; padding: 10px; outline: 0; font: inherit; font-size: 12px; }
.message-input:focus { border-color: #91ae4d; box-shadow: 0 0 0 3px rgba(215,243,107,.28); }
.message-form .primary-button { min-height: 38px; padding: 9px 12px; }
.social-thread-empty { flex: 1; min-height: 210px; display: grid; align-content: center; justify-items: center; gap: 8px; padding: 22px; color: var(--muted); text-align: center; font-size: 11px; }
.social-thread-empty h3 { margin: 0; color: var(--ink); font-size: 14px; font-weight: 600; }
.social-thread-empty p { max-width: 230px; margin: 0; line-height: 1.5; }
.social-empty-mark { color: #6c852f; font-size: 24px; }
.social-list-view { display: grid; gap: 11px; }
.friend-request-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; padding: 12px; border: 1px solid var(--line); border-radius: 3px; background: #fafbf8; }
.friend-request-form .primary-button { justify-content: center; }
.social-people-list { display: grid; border-top: 1px solid var(--line); }
.social-person-row { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 12px; padding: 11px 4px; border-bottom: 1px solid var(--line); }
.social-person-identity { min-width: 0; display: flex; align-items: center; gap: 9px; }
.social-person-identity strong { overflow-wrap: anywhere; font-size: 12px; }
.social-person-identity small { display: block; color: var(--muted); font-size: 10px; }
.social-person-identity .social-avatar { flex: 0 0 auto; }
.social-list-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.social-list-heading h3 { margin: 0; font-size: 13px; font-weight: 600; }
.outgoing-heading { margin-top: 12px; }
.request-accept { min-height: 34px; padding: 8px 11px; }
.social-remove { padding: 7px 5px; border: 0; background: transparent; color: #a84d3a; font-size: 10px; cursor: pointer; white-space: nowrap; }
.social-remove:hover { color: #7e3021; text-decoration: underline; }
.social-empty-state { padding: 20px 12px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.profile-name-link { max-width: 82px; overflow: hidden; padding: 0; border: 0; background: transparent; font-size: inherit; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }
.profile-name-link:hover, .post-author:hover { color: #5d7927; text-decoration: underline; }
.post-author { padding: 0; border: 0; background: transparent; color: var(--muted); font-size: 11px; cursor: pointer; }
.feed-column.profile-active > :not(.profile-page) { display: none; }
.profile-page { min-width: 0; padding: 36px 0 70px; }
.profile-back { margin-bottom: 16px; color: var(--muted); font-size: 11px; }
.profile-cover { height: 205px; position: relative; border-radius: 4px; background-position: center; background-size: cover; }
.profile-cover[data-theme="field"] { background-color: #e4edcf; background-image: repeating-linear-gradient(135deg, rgba(44,66,37,.07) 0, rgba(44,66,37,.07) 1px, transparent 1px, transparent 14px); }
.profile-cover[data-theme="coral"] { background-color: #ffe5dc; background-image: repeating-linear-gradient(35deg, rgba(115,48,37,.08) 0, rgba(115,48,37,.08) 1px, transparent 1px, transparent 16px); }
.profile-cover[data-theme="tide"] { background-color: #d9eee8; background-image: repeating-linear-gradient(155deg, rgba(31,81,72,.08) 0, rgba(31,81,72,.08) 1px, transparent 1px, transparent 18px); }
.profile-cover[data-theme="midnight"] { background-color: #273a34; background-image: repeating-linear-gradient(125deg, rgba(226,243,211,.1) 0, rgba(226,243,211,.1) 1px, transparent 1px, transparent 17px); }
.profile-heading { display: flex; align-items: flex-end; gap: 14px; position: absolute; bottom: -33px; left: 22px; }
.profile-avatar { width: 94px; height: 94px; display: grid; place-items: center; flex: 0 0 auto; overflow: hidden; border: 4px solid var(--paper); border-radius: 50%; background: var(--lime); color: var(--ink); font-size: 36px; font-weight: 700; }
.profile-page[data-theme="coral"] .profile-avatar { background: var(--coral); }
.profile-page[data-theme="tide"] .profile-avatar { background: var(--mint); }
.profile-page[data-theme="midnight"] .profile-avatar { background: #34443d; color: #f4f6ef; }
.profile-avatar img { width: 100%; height: 100%; object-fit: cover; }
.profile-identity { min-width: 0; display: grid; gap: 4px; padding-bottom: 5px; }
.profile-identity h1 { margin: 0; overflow-wrap: anywhere; font-size: 27px; }
.profile-joined { color: var(--muted); font-size: 10px; }
.profile-stats { display: flex; gap: 24px; margin: 48px 0 20px 130px; }
.profile-stat { display: flex; align-items: baseline; gap: 6px; }
.profile-stat strong { font: 14px var(--mono); }
.profile-stat span { color: var(--muted); font-size: 10px; }
.profile-editor { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; margin-bottom: 25px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.profile-media-controls { display: flex; flex-wrap: wrap; gap: 15px; }
.profile-media-control button { font-size: 11px; }
.profile-theme-controls { display: flex; align-items: center; gap: 10px; }
.profile-theme-options { display: flex; gap: 6px; }
.profile-theme-choice { width: 24px; height: 24px; padding: 0; border: 2px solid transparent; border-radius: 50%; background: var(--theme-swatch); cursor: pointer; }
.profile-theme-choice.selected { outline: 2px solid var(--ink); outline-offset: 2px; }
.profile-theme-choice:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.profile-posts-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.profile-posts-heading h2 { margin: 0; font-size: 16px; font-weight: 600; }
.profile-empty { padding: 30px 0; color: var(--muted); font-size: 12px; }
.profile-post-list { display: grid; gap: 10px; }

@media (min-width: 1500px) { .topbar { padding-left: max(5.1vw, calc((100vw - 1300px) / 2)); padding-right: max(5.1vw, calc((100vw - 1300px) / 2)); } }
@media (max-width: 1120px) { .topbar { grid-template-columns: 190px minmax(150px, 1fr) auto; gap: 22px; padding: 0 28px; } .layout { padding: 0 28px; grid-template-columns: 190px minmax(400px, 1fr); gap: 28px; } .right-rail { display: none; } }
@media (max-width: 720px) {
  .topbar { height: 60px; grid-template-columns: 34px 1fr auto; gap: 9px; padding: 0 16px; }
  .menu-toggle { display: inline-flex !important; width: 32px; height: 32px; justify-content: center; align-items: center; border: 1px solid var(--line); border-radius: 4px; background: white; font-size: 10px; cursor: pointer; }
  .brand { font-size: 18px; gap: 7px; }
  .brand-mark { width: 29px; height: 29px; }
  .searchbox { display: none; }
  .account-actions { gap: 10px; font-size: 11px; }
  .signup-button { padding: 10px; gap: 5px; font-size: 10px; }
  .account-user { gap: 6px; }
  .account-user .text-button { font-size: 10px; }
  .profile-name-link { max-width: 58px; font-size: 10px; }
  .account-user .owner-link { font-size: 9px; }
  .user-glyph { width: 24px; height: 24px; }
  .social-button { width: 29px; height: 29px; }
  .layout { display: block; min-height: calc(100vh - 60px); padding: 0 16px; }
  .left-rail { display: none; position: fixed; z-index: 4; top: 60px; bottom: 0; left: 0; width: min(300px, 84vw); height: calc(100dvh - 60px); min-height: 0; overflow-y: auto; padding: 24px 20px; border-right: 1px solid var(--line); background: var(--paper); box-shadow: 12px 0 32px rgba(24,33,29,.12); }
  .left-rail.open { display: flex; }
  .feed-column { padding: 29px 0 50px; }
  .feed-heading { margin-bottom: 21px; }
  h1 { font-size: 32px; }
  .feed-heading p { font-size: 12px; }
  .round-compose { width: 39px; height: 39px; }
  .post-card { padding: 14px 13px 12px; }
  .post-title { font-size: 16px; }
  .post-body { font-size: 12px; }
  .sort-button { padding: 7px 8px; }
  .modal-panel { padding: 22px; }
  .modal.owner-modal { max-height: 90dvh; }
  .modal.moderation-modal { max-height: 90dvh; }
  .modal.social-modal { max-height: 92dvh; }
  .social-panel.modal-panel { padding: 20px; }
  .social-inbox { min-height: 0; grid-template-columns: minmax(0, 1fr); }
  .conversation-list { max-height: 92px; display: flex; overflow-x: auto; overflow-y: hidden; border-right: 0; border-bottom: 1px solid var(--line); }
  .conversation-item { min-width: 156px; grid-template-columns: 27px minmax(0, 1fr) auto; padding: 9px; }
  .conversation-item .social-avatar { width: 27px; height: 27px; }
  .message-thread { min-height: 340px; }
  .message-list { min-height: 205px; max-height: 43dvh; padding: 10px; }
  .social-person-row { gap: 7px; }
  .friend-request-form { padding: 9px; gap: 6px; }
  .friend-request-form .primary-button { padding: 9px; font-size: 10px; }
  .owner-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; margin: 17px 0 20px; }
  .owner-stat { padding: 10px; }
  .owner-member { grid-template-columns: minmax(0, 1fr) 120px; gap: 8px; }
  .moderation-item { gap: 10px; padding: 10px; }
  .profile-page { padding-top: 27px; }
  .profile-cover { height: 150px; }
  .profile-heading { left: 12px; bottom: -27px; gap: 10px; }
  .profile-avatar { width: 76px; height: 76px; font-size: 28px; }
  .profile-identity h1 { font-size: 23px; }
  .profile-joined { font-size: 9px; }
  .profile-stats { gap: 15px; margin: 39px 0 16px 96px; }
  .profile-editor { align-items: flex-start; flex-direction: column; gap: 11px; margin-bottom: 20px; }
  .profile-media-controls { gap: 11px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; scroll-behavior: auto !important; transition-duration: .01ms !important; } }

.theme-toggle { width: 34px; height: 34px; display: inline-grid; place-items: center; flex: 0 0 auto; padding: 0; border: 1px solid var(--line); border-radius: 4px; background: var(--surface); color: var(--ink); font-size: 17px; cursor: pointer; }
.theme-toggle:hover { background: var(--paper); }
.theme-toggle:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #121814;
  --surface: #1c2420;
  --ink: #edf2e9;
  --muted: #a2ada2;
  --line: #38433b;
  --coral: #ff9a85;
}
:root[data-theme="dark"] .topbar { background: rgba(18,24,20,.92); }
:root[data-theme="dark"] .searchbox,
:root[data-theme="dark"] .form-field,
:root[data-theme="dark"] .role-select,
:root[data-theme="dark"] .message-input,
:root[data-theme="dark"] .comment-form input { background: #222c25; color: var(--ink); }
:root[data-theme="dark"] .searchbox input::placeholder { color: var(--muted); }
:root[data-theme="dark"] .nav-item,
:root[data-theme="dark"] .community-link,
:root[data-theme="dark"] .community-tag,
:root[data-theme="dark"] .post-body,
:root[data-theme="dark"] .comment,
:root[data-theme="dark"] .social-remove { color: var(--muted); }
:root[data-theme="dark"] .nav-item:hover,
:root[data-theme="dark"] .nav-item.active,
:root[data-theme="dark"] .community-link:hover,
:root[data-theme="dark"] .community-link.current { background: #2a352d; color: var(--ink); }
:root[data-theme="dark"] .text-button:hover,
:root[data-theme="dark"] .profile-name-link:hover,
:root[data-theme="dark"] .post-author:hover { color: var(--lime); }
:root[data-theme="dark"] .primary-button,
:root[data-theme="dark"] .comment-form button { background: var(--lime); color: #18211d; }
:root[data-theme="dark"] .primary-button:hover { background: #e4f894; }
:root[data-theme="dark"] .rail-note { background: var(--lime); color: #18211d; }
:root[data-theme="dark"] .rail-note p { color: #34423a; }
:root[data-theme="dark"] .note-mark { color: #18211d; }
:root[data-theme="dark"] .post-body,
:root[data-theme="dark"] .right-rail p,
:root[data-theme="dark"] .community-total,
:root[data-theme="dark"] .community-total span:first-child,
:root[data-theme="dark"] .pick-arrow,
:root[data-theme="dark"] .right-footer { color: var(--muted); }
:root[data-theme="dark"] .right-rail h2 em { color: var(--lime); }
:root[data-theme="dark"] .vote-group,
:root[data-theme="dark"] .owner-stat,
:root[data-theme="dark"] .auth-tabs,
:root[data-theme="dark"] .friend-request-form { background: #222c25; }
:root[data-theme="dark"] .action-button { color: var(--muted); }
:root[data-theme="dark"] .action-button:hover { background: #2a352d; color: var(--ink); }
:root[data-theme="dark"] .action-button.vote-up.selected { background: #34452b; color: var(--lime); }
:root[data-theme="dark"] .action-button.vote-down.selected { background: #482e2c; color: #ff9a85; }
:root[data-theme="dark"] .score { color: var(--ink); }
:root[data-theme="dark"] .empty-state { border-color: #465247; background: rgba(255,255,255,.03); }
:root[data-theme="dark"] .comment-list { border-left-color: var(--line); }
:root[data-theme="dark"] .modal-close { background: #2a352d; color: var(--ink); }
:root[data-theme="dark"] .auth-tab.active { background: #354238; color: var(--ink); }
:root[data-theme="dark"] .form-hint { color: var(--muted); }
:root[data-theme="dark"] .owner-policy-note { background: #3c2d29; color: #f1c0b2; }
:root[data-theme="dark"] .role-select:disabled { background: #2a352d; color: var(--muted); }
:root[data-theme="dark"] .moderation-item { background: #222c25; }
:root[data-theme="dark"] .moderation-item p { color: var(--muted); }
:root[data-theme="dark"] .moderation-remove:hover { background: #482e2c; color: #ff9a85; }
:root[data-theme="dark"] .social-button { background: var(--surface); }
:root[data-theme="dark"] .social-button:hover { background: #2a352d; }
:root[data-theme="dark"] .unread-badge { border-color: var(--surface); }
:root[data-theme="dark"] .social-inbox,
:root[data-theme="dark"] .message-thread { background: var(--surface); }
:root[data-theme="dark"] .conversation-list { background: #171f1a; }
:root[data-theme="dark"] .conversation-item:hover,
:root[data-theme="dark"] .conversation-item.active { background: #2a352d; }
:root[data-theme="dark"] .message-bubble { background: #2a352d; }
:root[data-theme="dark"] .message-row.own .message-bubble { background: #35442c; }
:root[data-theme="dark"] .message-author,
:root[data-theme="dark"] .message-bubble time { color: var(--muted); }
:root[data-theme="dark"] .toast { background: var(--lime); color: #18211d; }
:root[data-theme="dark"] .menu-toggle { background: var(--surface); color: var(--ink); }
