@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

/* Single fixed theme: black background, grey lines, light grey text (Twitter "lights out" style). */
:root {
  color-scheme: dark;
  --bg: #000000;
  --panel: #16181c;
  --hover: #080808;
  --hover-strong: #181818;
  --field: #202327;
  --ink: #e7e9ea;
  --ink-soft: #71767b;
  --line: #2f3336;
  --line-strong: #536471;
  --accent: #eff3f4;
  --on-accent: #0f1419;
  --danger: #f4212e;
  --ok: #00ba7c;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); }
body { margin: 0; font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; background: var(--bg); color: var(--ink); line-height: 1.4; -webkit-font-smoothing: antialiased; font-size: 15px; }
h1, h2, h3 { margin: 0; font-weight: 800; letter-spacing: -0.01em; }
h1 { font-size: 1.25rem; }
h3 { font-size: 1.15rem; margin-bottom: 0.6rem; }
a { color: var(--ink); text-decoration: none; }
a:hover { text-decoration: underline; }
p { margin: 0 0 0.8rem; }
.muted { color: var(--ink-soft); }
.small { font-size: 0.85rem; }

/* ---------- Layout: sidebar | feed | right column ---------- */
.layout { display: grid; grid-template-columns: 260px 600px 350px; justify-content: center; min-height: 100vh; }
.sidenav { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 0.4rem 0.6rem; }
.feed { border-left: 1px solid var(--line); border-right: 1px solid var(--line); min-height: 100vh; min-width: 0; }
.rightbar { padding: 0.6rem 1.4rem; position: sticky; top: 0; height: fit-content; max-height: 100vh; overflow-y: auto; }

.brand { display: flex; align-items: center; gap: 0.6rem; padding: 0.7rem 0.8rem; font-size: 1.35rem; font-weight: 800; width: fit-content; border-radius: 999px; }
.brand:hover { background: var(--hover-strong); text-decoration: none; }
.nav-item { display: flex; align-items: center; gap: 1rem; padding: 0.7rem 0.9rem; border-radius: 999px; font-size: 1.2rem; color: var(--ink); width: fit-content; background: none; border: none; cursor: pointer; font-family: inherit; margin: 0.15rem 0; }
.nav-item:hover { background: var(--hover-strong); text-decoration: none; }
.nav-item.active { font-weight: 800; }
.nav-item svg { width: 26px; height: 26px; flex-shrink: 0; }
.nav-user { margin-top: auto; display: flex; align-items: center; gap: 0.7rem; padding: 0.7rem 0.8rem; border-radius: 999px; }
.nav-user:hover { background: var(--hover-strong); text-decoration: none; }
.nav-user .who { min-width: 0; line-height: 1.2; }
.nav-user .who b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-user .who span { color: var(--ink-soft); font-size: 0.9rem; }
.sidenav form { margin: 0; }

.feed-header { position: sticky; top: 0; z-index: 10; background: rgb(0 0 0 / 0.7); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.feed-title { display: flex; align-items: center; gap: 0.8rem; padding: 0.8rem 1rem; }
.feed-title-action { margin-left: auto; display: none; }
.joined-list { display: flex; flex-direction: column; gap: 0.35rem; }
.joined-list a { font-weight: 600; }

/* Dialog (joined journal) */
.dialog { border: none; border-radius: 16px; background: var(--panel); color: var(--ink); padding: 1rem 1.2rem 1.2rem; width: min(92vw, 440px); }
.dialog::backdrop { background: rgb(91 112 131 / 0.4); }
.dialog-head { display: flex; align-items: center; gap: 0.6rem; margin-bottom: 0.4rem; }
.dialog-head h3 { margin: 0; }
.dialog .search-results { max-height: 40vh; overflow-y: auto; }
.feed-title .icon-btn { margin-left: -0.3rem; }
.feed-body { padding: 1rem; }
.feed-note { padding: 2rem 1rem; text-align: center; color: var(--ink-soft); }
.feed-note strong { display: block; color: var(--ink); font-size: 1.3rem; margin-bottom: 0.3rem; }

/* Tabs */
.tabbar { display: flex; overflow-x: auto; scrollbar-width: none; }
.tabbar::-webkit-scrollbar { display: none; }
.tabbar .tab-btn { flex: 1; min-width: 120px; position: relative; background: none; border: none; color: var(--ink-soft); font-weight: 600; font-size: 0.95rem; padding: 1rem 0.8rem; cursor: pointer; font-family: inherit; white-space: nowrap; text-align: center; }
.tabbar .tab-btn:hover { background: var(--hover-strong); text-decoration: none; }
.tabbar .tab-btn.active { color: var(--ink); font-weight: 800; }
.tabbar .tab-btn.active::after { content: ""; position: absolute; left: 50%; bottom: 0; transform: translateX(-50%); width: 56px; height: 4px; border-radius: 2px; background: var(--accent); }
.tab-panels > .tab-panel { display: none; }
.tab-panels > .tab-panel.active { display: block; }

/* Avatars */
.avatar-circle { width: 40px; height: 40px; border-radius: 50%; background: var(--panel); border: 1px solid var(--line); color: var(--ink-soft); display: flex; align-items: center; justify-content: center; overflow: hidden; flex-shrink: 0; }
.avatar-circle.small { width: 40px; height: 40px; }
.avatar-circle.large { width: 96px; height: 96px; border: 4px solid var(--bg); margin: 0; }
.avatar-circle.xl { width: 128px; height: 128px; }

/* Composer */
.composer { display: flex; gap: 0.8rem; padding: 0.9rem 1rem 0.6rem; border-bottom: 1px solid var(--line); }
.composer form { flex: 1; min-width: 0; margin: 0; }
.composer textarea { width: 100%; border: none; background: transparent; color: var(--ink); font-family: inherit; font-size: 1.25rem; line-height: 1.35; resize: none; padding: 0.5rem 0; margin: 0; min-height: 3.2rem; outline: none; }
.composer textarea::placeholder { color: var(--ink-soft); }
.composer-actions { display: flex; justify-content: flex-end; align-items: center; gap: 0.8rem; border-top: 1px solid var(--line); padding-top: 0.6rem; margin-top: 0.4rem; }
.composer-actions .hint { color: var(--ink-soft); font-size: 0.8rem; margin-right: auto; }

/* Posts */
.post { display: flex; gap: 0.8rem; padding: 0.8rem 1rem; border-bottom: 1px solid var(--line); transition: background .12s ease; }
.post:hover { background: var(--hover); }
.post-body { flex: 1; min-width: 0; }
.post-meta { display: flex; gap: 0.3rem; align-items: baseline; flex-wrap: wrap; }
.post-username { font-weight: 700; }
.post-handle, .post-time { color: var(--ink-soft); }
.post-text { white-space: pre-wrap; overflow-wrap: anywhere; margin-top: 0.15rem; font-size: 1rem; }
.badge.tiny { font-size: 0.6rem; padding: 0 0.4rem; }
.post-actions { display: flex; gap: 0.4rem; margin-top: 0.5rem; margin-left: -0.5rem; }
.post-actions form { margin: 0; }
.action-btn { background: none; border: none; color: var(--ink-soft); padding: 0.3rem 0.6rem; border-radius: 999px; font-weight: 600; font-size: 0.85rem; display: inline-flex; align-items: center; gap: 0.35rem; }
.action-btn:hover { background: var(--hover-strong); color: var(--ink); }
.action-btn svg { display: block; }
.like-btn svg { fill: none; }
.like-btn.liked { color: #f91880; }
.like-btn.liked svg { fill: currentColor; }
.like-btn.pop svg { animation: heartPop .25s ease; }
@keyframes heartPop { 0% { transform: scale(1); } 50% { transform: scale(1.35); } 100% { transform: scale(1); } }
.comments { margin-top: 0.3rem; }
.comment { display: flex; gap: 0.5rem; padding: 0.45rem 0 0.2rem; }
.comment-body { flex: 1; min-width: 0; font-size: 0.92rem; }
.comment-meta { display: flex; gap: 0.3rem; align-items: baseline; flex-wrap: wrap; }
.comment-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.avatar-circle.tiny { width: 26px; height: 26px; }
.comment-form { display: flex; gap: 0.5rem; align-items: center; margin-top: 0.4rem; }
.comment-form input { margin: 0; padding: 0.45rem 0.7rem; border-radius: 999px; font-size: 0.9rem; }
.comment-form button { flex-shrink: 0; }
.comment-form.collapsed { display: none; }
.scroll-panel { }

/* Day pager (private journal) */
.day-pager { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; padding: 0.5rem 0.8rem; border-bottom: 1px solid var(--line); background: var(--bg); }
.day-label { font-weight: 700; text-align: center; font-size: 0.95rem; }
.icon-btn { width: 36px; height: 36px; border-radius: 50%; border: none; background: transparent; color: var(--ink); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; box-shadow: none; font-size: 1.2rem; font-weight: 700; }
.icon-btn:hover { background: var(--hover-strong); transform: none; box-shadow: none; }
.icon-btn:disabled { opacity: 0.3; cursor: not-allowed; }

/* Buttons and fields */
button, .btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem; background: var(--accent); color: var(--on-accent); border: 1px solid transparent; padding: 0.55rem 1.1rem; border-radius: 999px; font-size: 0.95rem; font-weight: 700; cursor: pointer; font-family: inherit; text-decoration: none; transition: background .12s ease, opacity .12s ease; }
button:hover, .btn:hover { background: #d7dbdc; text-decoration: none; }
button.secondary, .btn.secondary { background: transparent; color: var(--ink); border-color: var(--line-strong); }
button.secondary:hover, .btn.secondary:hover { background: var(--hover-strong); }
button.danger { background: transparent; color: var(--danger); border-color: var(--line-strong); }
button.danger:hover { background: rgb(244 33 46 / 0.12); border-color: var(--danger); }
button.full, .btn.full { width: 100%; }
button.small, .btn.small { padding: 0.35rem 0.85rem; font-size: 0.85rem; }
button:disabled { opacity: 0.45; cursor: not-allowed; }

input, textarea, select { width: 100%; padding: 0.7rem 0.8rem; margin-bottom: 0.9rem; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); color: var(--ink); font-size: 16px; font-family: inherit; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--accent); }
input::placeholder, textarea::placeholder { color: var(--ink-soft); }
label { font-weight: 600; font-size: 0.82rem; color: var(--ink-soft); }
label.stacked { display: block; margin-bottom: 0.35rem; }
.hint { font-size: 0.78rem; color: var(--ink-soft); margin: -0.5rem 0 0.9rem; }

.badge { display: inline-block; padding: 0.1rem 0.55rem; border-radius: 999px; font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; border: 1px solid var(--line-strong); color: var(--ink-soft); vertical-align: middle; }
.badge.accent { background: var(--accent); color: var(--on-accent); border-color: transparent; }
.badge.approved { color: var(--ok); border-color: var(--ok); }
.badge.rejected { color: var(--danger); border-color: var(--danger); }
.error-text { color: var(--danger); font-weight: 600; font-size: 0.9rem; margin-bottom: 0.8rem; }
.notice { margin: 0.8rem 1rem; padding: 0.7rem 1rem; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); font-size: 0.9rem; }
.notice.error { border-color: var(--danger); color: var(--danger); font-weight: 600; }

/* Panels / widgets (right column, cards) */
.card, .widget { background: var(--panel); border-radius: 16px; padding: 1rem; margin-bottom: 1rem; }
.card > :last-child, .widget > :last-child { margin-bottom: 0; }
.widget-sub { color: var(--ink-soft); font-size: 0.9rem; margin-bottom: 0.8rem; }

/* Username search (joined journals) */
.search { display: flex; align-items: center; gap: 0.6rem; background: var(--field); border-radius: 999px; padding: 0.15rem 1rem; border: 1px solid transparent; }
.search:focus-within { border-color: var(--accent); background: var(--bg); }
.search svg { color: var(--ink-soft); flex-shrink: 0; }
.search input { border: none; background: transparent; margin: 0; padding: 0.55rem 0; }
.search input:focus { border: none; }
.search-results { margin: 0.4rem 0 0; padding: 0; list-style: none; }
.search-results li { display: flex; align-items: center; gap: 0.7rem; padding: 0.5rem 0.3rem; border-radius: 10px; }
.search-results li:hover { background: var(--hover-strong); }
.search-results .who { flex: 1; min-width: 0; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search-results .who span { display: block; color: var(--ink-soft); font-weight: 400; font-size: 0.85rem; }
.search-empty { color: var(--ink-soft); font-size: 0.85rem; padding: 0.5rem 0.3rem; }
.chips { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0.6rem 0; }
.chip { display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.25rem 0.5rem 0.25rem 0.7rem; border-radius: 999px; border: 1px solid var(--line-strong); font-weight: 600; font-size: 0.9rem; }
.chip button { background: none; border: none; color: var(--ink-soft); padding: 0 0.2rem; font-size: 1rem; line-height: 1; }
.chip button:hover { color: var(--danger); background: none; }

/* Profile header: banner + overlapping avatar */
.profile-head { border-bottom: 1px solid var(--line); }
.profile-banner { position: relative; aspect-ratio: 3 / 1; background: var(--panel); overflow: hidden; }
.profile-banner img { width: 100%; height: 100%; object-fit: cover; display: block; }
.banner-edit { position: absolute; right: 0.6rem; bottom: 0.6rem; width: 36px; height: 36px; border-radius: 50%; background: rgb(0 0 0 / 0.6); border: 1px solid rgb(255 255 255 / 0.3); color: #fff; display: flex; align-items: center; justify-content: center; padding: 0; }
.banner-edit:hover { background: rgb(0 0 0 / 0.8); }
.profile-body { padding: 0 1rem 1rem; }
.profile-top { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; margin-top: -48px; margin-bottom: 0.6rem; position: relative; z-index: 1; }
.profile-top .avatar-circle.large { width: 96px; height: 96px; border: 4px solid var(--bg); background: var(--panel); }
.profile-top-actions { display: flex; gap: 0.5rem; padding-bottom: 0.3rem; }
.avatar-edit { position: relative; background: none; border: none; padding: 0; border-radius: 50%; cursor: pointer; display: inline-block; line-height: 0; }
.avatar-edit:hover { background: none; }
.avatar-edit:hover .avatar-circle img, .avatar-edit:hover .avatar-circle svg { filter: brightness(0.75); }
.avatar-edit-badge { position: absolute; right: 2px; bottom: 2px; width: 32px; height: 32px; border-radius: 50%; background: var(--panel); border: 2px solid var(--bg); color: var(--ink); display: flex; align-items: center; justify-content: center; }
.profile-name { font-size: 1.35rem; font-weight: 800; line-height: 1.2; }
.profile-handle { color: var(--ink-soft); }
.profile-facts { display: flex; gap: 1rem; flex-wrap: wrap; color: var(--ink-soft); margin-top: 0.7rem; font-size: 0.95rem; }
.profile-facts b { color: var(--ink); }

/* Crop editor dialogs (profile picture: circle, banner: wide 3:1) */
.crop-dialog { width: min(92vw, 420px); }
.crop-dialog .dialog-head .crop-save { margin-left: auto; }
.crop-file { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.crop-pick { text-align: center; padding: 1.2rem 0 0.4rem; }
.crop-pick label.btn, .crop-actions label.btn { cursor: pointer; }
.crop-stage { position: relative; margin: 0 auto; border-radius: 12px; overflow: hidden; background: #000; touch-action: none; user-select: none; }
.crop-stage.circle { width: 280px; height: 280px; }
.crop-stage.wide { width: 360px; height: 120px; max-width: 100%; }
.crop-canvas { display: block; width: 100%; height: 100%; cursor: grab; }
.crop-canvas:active { cursor: grabbing; }
.crop-mask { position: absolute; inset: 0; pointer-events: none; border: 2px solid rgb(255 255 255 / 0.9); }
.crop-stage.circle .crop-mask { border-radius: 50%; box-shadow: 0 0 0 200px rgb(0 0 0 / 0.62); }
input[type="range"].crop-zoom { -webkit-appearance: none; appearance: none; width: 100%; height: 6px; border-radius: 3px; background: var(--line-strong); padding: 0; margin: 0.2rem 0 0.8rem; border: none; }
input[type="range"].crop-zoom::-webkit-slider-thumb { -webkit-appearance: none; width: 20px; height: 20px; border-radius: 50%; background: var(--accent); cursor: pointer; }
input[type="range"].crop-zoom::-moz-range-thumb { width: 20px; height: 20px; border-radius: 50%; background: var(--accent); border: none; cursor: pointer; }
.crop-actions { display: flex; justify-content: center; }

/* Joined journals: picker list and members */
.journal-row { display: flex; align-items: center; gap: 0.9rem; padding: 0.9rem 1rem; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.journal-row:hover { background: var(--hover); text-decoration: none; }
.journal-row-id { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--ink-soft); font-size: 0.85rem; min-width: 3.2rem; }
.journal-row-main { flex: 1; min-width: 0; }
.journal-row-name { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.journal-row-meta { color: var(--ink-soft); font-size: 0.85rem; display: flex; gap: 0.3rem; flex-wrap: wrap; align-items: center; }
.journal-row-arrow { color: var(--ink-soft); font-size: 1.4rem; }
.member-list { display: flex; flex-direction: column; gap: 0.4rem; }
.member-item { display: flex; align-items: center; gap: 0.6rem; padding: 0.3rem 0.2rem; border-radius: 8px; text-decoration: none; }
.member-item:hover { background: var(--hover-strong); text-decoration: none; }
.member-item .avatar-circle.small { width: 32px; height: 32px; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search-results .state { color: var(--ink-soft); font-size: 0.85rem; font-weight: 600; flex-shrink: 0; }
/* Joined journals */
.journal-bar { display: flex; align-items: center; justify-content: space-between; gap: 0.8rem; padding: 0.6rem 1rem; border-bottom: 1px solid var(--line); font-size: 0.9rem; }
.journal-bar form { margin: 0; }
.journal-bar-text { flex: 1; min-width: 0; }
.journal-bar-actions { display: flex; gap: 0.4rem; flex-shrink: 0; }
.link-btn { background: none; border: none; color: var(--ink-soft); padding: 0 0.2rem; font-size: 0.85rem; line-height: 1; }
.link-btn:hover { background: none; color: var(--danger); }
.request-row { display: flex; align-items: center; gap: 0.7rem; padding: 0.8rem 1rem; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.request-row.compact { padding: 0.5rem 0; }
.request-row form { margin: 0; }
.request-row-text { flex: 1; min-width: 160px; }
.nav-icon-wrap { position: relative; display: inline-flex; }
.nav-count { position: absolute; top: -6px; right: -8px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--accent); color: var(--on-accent); font-size: 0.7rem; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.post-avatar { line-height: 0; }
.post-username:hover { text-decoration: underline; }
.search-results li button { flex-shrink: 0; }

/* Admin lists */
.user-row { display: flex; align-items: center; gap: 0.9rem; padding: 0.8rem 1rem; border-bottom: 1px solid var(--line); }
.user-row:hover { background: var(--hover); }
.user-main { flex: 1; min-width: 0; }
.user-name { font-weight: 700; display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.user-meta { font-size: 0.88rem; color: var(--ink-soft); display: flex; gap: 0.4rem; flex-wrap: wrap; }
.user-actions { display: flex; gap: 0.4rem; flex-wrap: wrap; justify-content: flex-end; }
.user-actions form { margin: 0; }
.user-row.inactive .avatar-circle, .user-row.inactive .user-name > span:first-child { opacity: 0.5; }
.request-card { padding: 1rem; border-bottom: 1px solid var(--line); }
.request-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; flex-wrap: wrap; }
.request-name { font-weight: 800; font-size: 1.05rem; }
.request-email { margin: 0.2rem 0 0.4rem; font-size: 0.9rem; }
.request-message { margin: 0.5rem 0 0.9rem; padding: 0.6rem 0.9rem; border-left: 3px solid var(--line-strong); background: var(--panel); border-radius: 0 10px 10px 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.request-message.empty { color: var(--ink-soft); font-style: italic; }
.request-actions { display: flex; gap: 0.7rem; align-items: flex-end; flex-wrap: wrap; }
.request-actions form { margin: 0; }
.request-actions .approve { display: flex; gap: 0.7rem; align-items: flex-end; flex: 1; min-width: 260px; }
.request-actions .approve > div { flex: 1; }
.request-actions input { margin-bottom: 0; }
.request-actions .hint { margin: 0.3rem 0 0; }
.resolved-row { display: flex; gap: 0.8rem; align-items: center; padding: 0.7rem 1rem; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.resolved-row .who { font-weight: 600; flex: 1; min-width: 140px; }
.resolved-row .meta { color: var(--ink-soft); font-size: 0.85rem; }
.credential { display: flex; align-items: center; justify-content: space-between; gap: 0.8rem; padding: 0.8rem 1rem; background: var(--bg); border: 1px dashed var(--line-strong); border-radius: 12px; margin-bottom: 0.8rem; }
.credential code { font-size: 1.05rem; font-weight: 700; overflow-wrap: anywhere; }
.section-title { padding: 0.9rem 1rem 0.5rem; font-size: 1.15rem; font-weight: 800; border-bottom: 1px solid var(--line); }

/* Stand-alone pages (login, request, password) */
.login-wrapper { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 1.5rem; }
.login-card { width: 100%; max-width: 400px; text-align: center; background: var(--panel); border-radius: 16px; padding: 2.4rem 2rem; }
.login-card .avatar-circle { margin: 0 auto 1.2rem; width: 64px; height: 64px; }
.login-card h1 { font-size: 1.6rem; margin-bottom: 0.4rem; }
.login-card form { text-align: left; margin-top: 1.4rem; }
.login-card input, .login-card textarea { background: var(--bg); }

.weirdum-toast { position: fixed; bottom: 4.5rem; left: 50%; transform: translateX(-50%) translateY(10px); background: var(--accent); color: var(--on-accent); padding: 0.7rem 1.4rem; border-radius: 999px; font-weight: 700; font-size: 0.9rem; z-index: 100; opacity: 0; transition: opacity .25s ease, transform .25s ease; pointer-events: none; }
.weirdum-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- Responsive ----------
   >=1280px  : full sidebar with labels | feed | right column
   1000-1279 : narrower sidebar, labels kept | feed | narrower right column
   700-999   : icon-only sidebar | feed (right column moves below the feed)
   <700      : bottom bar with icons + small labels; single column            */
@media (max-width: 1279px) {
  .layout { grid-template-columns: 200px minmax(0, 600px) 300px; }
  .nav-item { font-size: 1.05rem; gap: 0.8rem; padding: 0.6rem 0.8rem; }
  .nav-item svg { width: 24px; height: 24px; }
  .brand { font-size: 1.2rem; }
  .rightbar { padding: 0.6rem 1rem; }
}
@media (max-width: 999px) {
  .layout { grid-template-columns: 88px minmax(0, 600px); }
  .sidenav .label, .sidenav .nav-user .who, .brand span { display: none; }
  .nav-item, .brand, .nav-user { padding: 0.8rem; }
  .rightbar { grid-column: 2; position: static; max-height: none; padding: 0.6rem 1rem 1rem; }
  .feed-title-action { display: inline-flex; }
}
@media (max-width: 699px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
  .sidenav { position: fixed; bottom: 0; left: 0; right: 0; top: auto; height: 60px; flex-direction: row; justify-content: space-around; align-items: stretch; padding: 0; background: var(--bg); border-top: 1px solid var(--line); z-index: 30; }
  .sidenav .brand, .sidenav .nav-user { display: none; }
  .sidenav form { display: contents; }
  .nav-item { margin: 0; padding: 0.4rem 0.6rem 0.3rem; flex-direction: column; gap: 0.15rem; border-radius: 0; flex: 1; justify-content: center; width: auto; }
  .nav-item:hover { background: none; }
  .nav-item svg { width: 24px; height: 24px; }
  .sidenav .label { display: block; font-size: 0.65rem; font-weight: 600; color: var(--ink-soft); }
  .nav-item.active .label { color: var(--ink); }
  .feed { border: none; padding-bottom: 68px; }
  .rightbar { grid-column: 1; padding-bottom: 5rem; }
  .composer textarea { font-size: 1.1rem; }
  .request-actions { flex-direction: column; align-items: stretch; }
  .request-actions .approve { flex-direction: column; align-items: stretch; min-width: 0; }
  .profile-top { margin-top: -36px; }
  .profile-top .avatar-circle.large { width: 72px; height: 72px; }
  .user-row { flex-wrap: wrap; }
  .user-actions { width: 100%; justify-content: flex-start; }
  .user-actions button { width: auto; }
  .weirdum-toast { bottom: 5rem; }
}
