:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f5f5f1;
  color: #292b28;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  --ink: #292b28;
  --muted: #777a72;
  --line: #e5e6df;
  --paper: #fff;
  --wash: #f5f5f1;
  --violet: #53766b;
  --pink: #c29467;
  --shadow: 0 12px 32px rgba(41, 43, 40, .045);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; background: var(--wash); }
button, input, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
[hidden] { display: none !important; }

.page { width: min(1380px, calc(100% - 48px)); margin: 0 auto; }
.topbar { position: sticky; z-index: 5; top: 0; display: flex; height: 78px; align-items: center; justify-content: space-between; border-bottom: 1px solid rgba(226, 226, 237, .8); background: rgba(245, 246, 250, .88); backdrop-filter: blur(18px); }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--ink); font-size: 21px; font-weight: 850; letter-spacing: -.055em; text-decoration: none; }
.brand-mark { display: grid; width: 39px; height: 39px; place-items: center; border-radius: 14px; background: #53766b; color: #fff; font-size: 17px; letter-spacing: -.08em; }
.tagline { margin: 0; color: var(--muted); font-size: 13px; }
.topbar-cta { padding: 11px 16px; border: 1px solid #e8e4fb; border-radius: 12px; background: #fff; color: var(--violet); font-size: 13px; font-weight: 750; text-decoration: none; }
.topbar-cta span { padding-left: 5px; }
.theme-toggle { display: grid; width: 39px; height: 39px; place-items: center; border: 1px solid #e8e7ef; border-radius: 12px; background: #fff; color: #53766b; font-size: 19px; transition: transform .18s ease, background .18s ease; }
.theme-toggle:hover { transform: translateY(-1px); background: #edf2ed; }
.notice { width: min(100%, 760px); margin: 12px auto 0; padding: 11px 14px; border: 1px solid #e8d8cf; border-radius: 10px; background: #fff9f4; color: #805640; font-size: 13px; }
.consent-backdrop { position: fixed; z-index: 20; inset: 0; display: grid; place-items: center; padding: 18px; background: rgba(24, 21, 37, .54); backdrop-filter: blur(7px); }
.consent-dialog { width: min(100%, 430px); padding: 28px; border: 1px solid #e9e5f2; border-radius: 22px; background: #fff; box-shadow: 0 25px 80px rgba(24, 19, 51, .28); }
.consent-icon { display: grid; width: 43px; height: 43px; margin-bottom: 18px; place-items: center; border-radius: 14px; background: linear-gradient(140deg, #7d62f4, #ec63a5); color: #fff; font-size: 22px; }
.consent-dialog h2 { margin: 8px 0; color: #29283b; font-size: 23px; letter-spacing: -.05em; }
.consent-dialog > p:not(.eyebrow) { color: #707084; font-size: 12px; line-height: 1.65; }
.consent-note { padding: 10px 12px; border-radius: 10px; background: #f7f6fb; font-size: 10px !important; }
.consent-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 20px; }
.consent-secondary { border-color: #e8e7ef; background: #fff; color: #656477; }
.consent-actions .button { font-size: 11px; }

.auth-layout { display: grid; min-height: 710px; grid-template-columns: minmax(0, 1fr) 410px; align-items: center; gap: clamp(40px, 8vw, 130px); padding: 54px clamp(12px, 5vw, 72px) 68px; }
.welcome { max-width: 640px; }
.eyebrow { margin: 0; color: #648276; font-size: 10px; font-weight: 800; letter-spacing: .13em; }
.live-dot { display: inline-block; width: 7px; height: 7px; margin-right: 7px; border-radius: 50%; background: #fd8c9f; box-shadow: 0 0 0 4px #fde9ee; }
.welcome h1 { max-width: 620px; margin: 20px 0 14px; font-size: clamp(43px, 6vw, 74px); line-height: .99; letter-spacing: -.075em; }
.welcome h1 span { color: transparent; background: linear-gradient(100deg, #7959ed 8%, #ed6da4 85%); background-clip: text; -webkit-background-clip: text; }
.welcome-copy { max-width: 470px; margin: 0; color: #76778c; font-size: 16px; line-height: 1.75; }
.welcome-stats { display: flex; align-items: center; gap: 12px; margin-top: 23px; color: #6f7084; font-size: 12px; font-weight: 650; }
.stat-avatars { display: flex; padding-left: 3px; }
.stat-avatars span { display: grid; width: 27px; height: 27px; margin-left: -4px; place-items: center; border: 2px solid var(--wash); border-radius: 50%; background: #e8dcff; color: #7259bd; font-size: 9px; font-weight: 800; }
.stat-avatars span:nth-child(2) { background: #ffe4d7; color: #ba6b47; }
.stat-avatars span:nth-child(3) { background: #d7ecff; color: #477aab; }
.stat-avatars span:nth-child(4) { background: #252239; color: #fff; }
.landing-preview { width: min(100%, 410px); margin: 31px 0 0 24px; padding: 13px; transform: rotate(-2deg); border: 1px solid rgba(238, 236, 245, .9); border-radius: 21px; background: rgba(255,255,255,.92); box-shadow: 0 25px 70px rgba(58, 45, 114, .14); }
.preview-head { display: flex; align-items: center; gap: 9px; padding: 2px 2px 11px; font-size: 11px; }
.preview-head strong, .preview-head small { display: block; }
.preview-head small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.preview-avatar { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 50%; color: #fff; font-weight: 800; }
.avatar-peach { background: linear-gradient(145deg, #ffb78d, #dd638a); }
.preview-more { margin-left: auto; color: #8e8d9d; letter-spacing: 2px; }
.preview-art { position: relative; display: grid; min-height: 210px; overflow: hidden; place-items: center; border-radius: 13px; background: linear-gradient(145deg, #f8c7a6 0%, #f9dfbb 44%, #ed9e88 100%); }
.preview-art::before, .preview-art::after { position: absolute; width: 180px; height: 180px; border-radius: 50%; background: rgba(255, 247, 221, .45); content: ""; filter: blur(1px); }
.preview-art::before { top: -66px; right: 25px; }
.preview-art::after { bottom: -129px; left: -12px; width: 285px; height: 230px; background: rgba(126, 87, 124, .18); }
.art-sun { position: absolute; top: 35px; left: 50%; width: 63px; height: 63px; transform: translateX(-50%); border-radius: 50%; background: #fff2ca; box-shadow: 0 0 35px rgba(255, 242, 202, .65); }
.art-title { z-index: 1; margin-top: 25px; color: #503c58; font-family: Georgia, serif; font-size: 44px; font-style: italic; line-height: .8; text-align: center; }
.art-caption { position: absolute; z-index: 1; right: 15px; bottom: 13px; color: rgba(63, 45, 69, .65); font-size: 8px; font-weight: 800; letter-spacing: .2em; }
.preview-actions { display: flex; justify-content: space-between; padding: 12px 2px 6px; color: #5b536b; font-size: 17px; }
.landing-preview > p { margin: 4px 2px 3px; color: #69697c; font-size: 10px; }
.landing-preview > p strong { color: var(--ink); }

.panel { border: 1px solid rgba(231, 231, 240, .9); border-radius: 19px; background: var(--paper); box-shadow: var(--shadow); }
.auth-panel { padding: 30px; }
.auth-heading { margin-bottom: 24px; }
.auth-kicker { color: #a48fe8; font-size: 9px; font-weight: 850; letter-spacing: .19em; }
.auth-heading h2 { margin: 9px 0 4px; font-size: 25px; letter-spacing: -.055em; }
.auth-heading p { margin: 0; font-size: 12px; }
.tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; margin-bottom: 20px; border-radius: 11px; background: #f4f3f8; }
.tab { padding: 10px; border: 0; border-radius: 8px; background: transparent; color: #88889a; font-size: 12px; font-weight: 700; }
.tab.active { background: #fff; box-shadow: 0 2px 9px rgba(35, 29, 68, .08); color: #423b62; }
.field { display: grid; gap: 7px; margin-bottom: 15px; color: #5f5f73; font-size: 11px; font-weight: 700; }
input, textarea { width: 100%; padding: 12px 13px; border: 1px solid #e8e8ef; border-radius: 10px; outline: none; background: #fbfbfd; color: var(--ink); }
input::placeholder, textarea::placeholder { color: #a5a5b4; }
input:focus, textarea:focus { border-color: #9e8ae9; box-shadow: 0 0 0 3px rgba(126, 93, 227, .09); }
.captcha { min-height: 65px; margin-bottom: 14px; overflow: hidden; }
.button { min-height: 40px; padding: 10px 15px; border: 1px solid transparent; border-radius: 10px; color: #fff; font-weight: 750; transition: transform .18s ease, box-shadow .18s ease; }
.button:hover { transform: translateY(-1px); }
.button:disabled { cursor: wait; opacity: .65; }
.primary { background: #53766b; box-shadow: none; }
.primary:hover { background: #426458; box-shadow: none; }
.full { width: 100%; }
.muted { color: var(--muted); }
.small { font-size: 11px; }
.auth-foot { margin: 15px 0 0; line-height: 1.6; }

.app-layout { display: grid; grid-template-areas: "sidebar main discovery"; grid-template-columns: 190px minmax(0, 1fr) 250px; align-items: start; gap: 26px; padding: 34px 0 56px; }
.sidebar { position: sticky; top: 100px; grid-area: sidebar; display: flex; flex-direction: column; gap: 12px; padding: 8px 0; }
.side-nav { display: grid; gap: 5px; }
.side-link { display: flex; min-height: 44px; align-items: center; gap: 12px; padding: 0 12px; border: 0; border-radius: 10px; background: transparent; color: #62675f; font-size: 13px; font-weight: 600; text-align: left; text-decoration: none; }
.side-link:hover { background: rgba(83, 118, 107, .08); color: var(--ink); }
.side-link.active { background: #e9eee9; color: #36594e; font-weight: 750; }
.nav-icon { display: inline-grid; width: 22px; place-items: center; color: #53766b; font-size: 20px; line-height: 1; }
.sidebar-divider { height: 1px; margin: 4px 0; background: var(--line); }
.profile-summary { display: flex; align-items: center; gap: 10px; padding: 6px 4px; }
.avatar { display: grid; width: 40px; height: 40px; flex: 0 0 40px; place-items: center; overflow: hidden; border-radius: 50%; background: #e3ebe5; color: #45685d; font-size: 14px; font-weight: 800; }
.avatar-photo { width: 100%; height: 100%; border-radius: inherit; object-fit: cover; }
.profile-copy { display: grid; min-width: 0; gap: 4px; }
.profile-copy strong { overflow: hidden; color: var(--ink); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.profile-copy span { font-size: 11px; }
.signout { width: 100%; }
.main-column { display: grid; grid-area: main; min-width: 0; gap: 24px; }
.main-heading { padding: 2px 2px 0; }
.main-heading h1 { margin: 8px 0 5px; color: var(--ink); font-size: 30px; letter-spacing: -.045em; }
.main-heading > p:last-child { margin: 0; font-size: 13px; line-height: 1.6; }
.composer { padding: 20px; border-color: var(--line); border-radius: 13px; box-shadow: 0 4px 16px rgba(41, 43, 40, .025); }
.composer-back { display: none; color: var(--muted); font-size: 12px; font-weight: 700; text-decoration: none; }
.composer-back:hover { color: var(--ink); }
.composer-heading { display: flex; align-items: center; gap: 11px; }
.composer-heading > div:last-child { display: grid; gap: 4px; }
.composer-heading strong { color: var(--ink); font-size: 13px; }
.composer-heading span { font-size: 11px; }
.composer-top { margin-top: 15px; }
.composer textarea { min-height: 86px; padding: 13px 14px; resize: vertical; border-color: var(--line); border-radius: 10px; background: var(--wash); font-size: 13px; line-height: 1.6; }
.media-duration-hint { margin: 8px 0 0; }
.composer form { display: flex; align-items: center; gap: 9px; padding-top: 12px; }
.media-picker { padding: 9px 11px; border: 1px solid var(--line); border-radius: 9px; color: #496c61; cursor: pointer; font-size: 11px; font-weight: 650; }
.media-picker:hover { background: #f0f3ef; }
.media-picker span { padding-right: 4px; font-size: 14px; }
.media-filename { max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.composer-spacer { flex: 1; }
.post-submit { min-height: 37px; padding: 8px 13px; font-size: 11px; }
.feed-section { min-width: 0; }
.feed-heading { display: flex; align-items: center; justify-content: space-between; padding: 0 2px 13px; }
.feed-heading h2 { margin: 0; color: var(--ink); font-size: 19px; letter-spacing: -.025em; }
.feed-heading p { margin: 5px 0 0; font-size: 11px; }
.icon-button { display: grid; width: 36px; height: 36px; place-items: center; border: 1px solid var(--line); border-radius: 9px; background: var(--paper); color: #53766b; font-size: 20px; }
.icon-button:hover { background: #edf2ed; }
.feed { display: grid; gap: 14px; }
.feed > .muted { padding: 20px; text-align: center; }
.feed-state { padding: 28px 22px; border: 1px solid var(--line); border-radius: 13px; background: var(--paper); text-align: center; }
.feed-state h3 { margin: 10px 0 5px; color: var(--ink); font-size: 16px; }
.feed-state p { margin: 6px auto 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.empty-mark { display: inline-grid; width: 42px; height: 42px; place-items: center; border-radius: 13px; background: #e9eee9; color: #53766b; font-size: 17px; font-weight: 800; }
.feed-error { border-color: #ead9ce; background: #fffaf6; text-align: left; }
.feed-error strong { color: #805640; font-size: 13px; }
.feed-error .button { margin-top: 12px; }
.post { overflow: hidden; border: 1px solid var(--line); border-radius: 13px; background: var(--paper); box-shadow: 0 4px 16px rgba(41, 43, 40, .025); }
.post-heading { display: flex; align-items: center; gap: 11px; padding: 16px 18px 12px; }
.post-heading .avatar { width: 39px; height: 39px; flex-basis: 39px; }
.post-heading .creator-link { flex: 1; }
.post-meta { display: grid; min-width: 0; gap: 4px; }
.post-meta strong { overflow-wrap: anywhere; color: var(--ink); font-size: 13px; }
.post-meta span { color: var(--muted); font-size: 11px; }
.post-menu { margin-left: auto; border: 0; background: transparent; color: var(--muted); letter-spacing: 2px; }
.post-delete { position: absolute; z-index: 4; top: 12px; right: 12px; padding: 7px 10px; border: 1px solid rgba(255,255,255,.24); border-radius: 9px; background: rgba(25,25,25,.76); color: #fff; font-size: 11px; font-weight: 750; }
.post-delete:hover { background: #a63e47; }
.post-delete:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.post-follow-button { flex: 0 0 auto; padding: 8px 13px; border: 1px solid var(--line); border-radius: 999px; background: var(--paper); color: #426458; font-size: 11px; font-weight: 750; }
.post-follow-button.following { background: var(--wash); color: var(--muted); }
.verified { display: inline-flex; align-items: center; gap: 3px; margin-left: 5px; color: #398df2; font-size: 10px; font-weight: 750; vertical-align: 1px; }
.verified-icon { display: inline-grid; width: 14px; height: 14px; place-items: center; border-radius: 50%; background: #398df2; color: #fff; font-size: 9px; }
.mobile-bottom-nav.admin-enabled { grid-template-columns: repeat(7, minmax(0, 1fr)); }
.admin-trigger { color: #398df2; font-weight: 750; }
.admin-trigger .verified-icon { flex: 0 0 14px; }
.admin-dialog { width: min(680px, calc(100vw - 28px)); max-height: calc(100vh - 32px); padding: 22px; overflow-y: auto; border: 1px solid var(--line); border-radius: 16px; background: var(--paper); color: var(--ink); }
.admin-dialog::backdrop { background: rgba(15, 17, 15, .66); backdrop-filter: blur(3px); }
.admin-dialog-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.admin-dialog-header h2 { margin: 4px 0 0; font-size: 24px; }
.admin-notice { margin: 10px 0 18px; }
.admin-users { display: grid; max-height: 58vh; gap: 12px; overflow-y: auto; }
.admin-user-card { display: grid; gap: 10px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--wash); }
.admin-user-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.admin-user-heading > div { display: grid; min-width: 0; gap: 4px; }
.admin-user-heading strong { overflow-wrap: anywhere; }
.admin-user-bio { min-height: 66px; padding: 10px; resize: vertical; }
.admin-password-label { display: grid; gap: 6px; color: var(--muted); font-size: 11px; }
.admin-user-password { min-height: 40px; }
.admin-user-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.system-admin-page { width: min(1120px, 100%); min-height: calc(100vh - 150px); margin: 28px auto; }
.system-admin-login { width: min(100%, 430px); margin: 70px auto; padding: 28px; }
.system-admin-login h1, .system-admin-header h1 { margin: 8px 0; color: var(--ink); font-size: clamp(25px, 4vw, 36px); letter-spacing: -.05em; }
.system-admin-login form, .system-admin-password-form { display: grid; gap: 14px; margin-top: 20px; }
.system-admin-message { margin: 0; color: #b13d3d; font-size: 12px; }
.system-admin-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.system-admin-header-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.system-admin-notice { margin: 12px 0; padding: 11px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); color: var(--ink); font-size: 13px; }
.system-admin-notice.error { border-color: #e8d8cf; background: #fff9f4; color: #805640; }
.system-admin-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.system-admin-stat { display: grid; gap: 8px; padding: 18px; }
.system-admin-stat span { color: var(--muted); font-size: 12px; }
.system-admin-stat strong { color: var(--ink); font-size: 27px; }
.system-admin-content { padding: 18px; }
.system-admin-tabs { display: flex; gap: 8px; margin-bottom: 18px; border-bottom: 1px solid var(--line); }
.system-admin-tab { padding: 10px 14px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--muted); font-size: 12px; font-weight: 750; }
.system-admin-tab.active { border-bottom-color: var(--violet); color: var(--violet); }
.system-admin-search { display: grid; max-width: 380px; gap: 6px; margin-bottom: 14px; color: var(--muted); font-size: 11px; }
.system-admin-list { display: grid; gap: 10px; }
.system-admin-user, .system-admin-post, .system-admin-comment, .system-admin-audit-entry { display: grid; gap: 10px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--wash); }
.system-admin-user-heading, .system-admin-post-heading, .system-admin-comment-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.system-admin-user-heading strong, .system-admin-post-heading strong, .system-admin-comment-heading strong { color: var(--ink); overflow-wrap: anywhere; }
.system-admin-user-heading span, .system-admin-post-heading span, .system-admin-comment-heading span, .system-admin-audit-entry span { color: var(--muted); font-size: 11px; }
.system-admin-user textarea { min-height: 60px; padding: 10px; resize: vertical; }
.system-admin-user-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; }
.system-admin-verify { display: inline-flex; align-items: center; gap: 6px; margin-right: auto; color: var(--muted); font-size: 11px; }
.system-admin-user-password { width: min(100%, 260px); min-height: 38px; padding: 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); color: var(--ink); }
.system-admin-post p, .system-admin-comment p { margin: 0; color: var(--ink); font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; white-space: pre-wrap; }
.system-admin-comment .system-admin-comment-context { color: var(--muted); font-size: 11px; }
.system-admin-bulk-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.system-admin-bulk-actions p { margin: 0; }
.system-admin-comments-more { margin-top: 14px; }
.system-admin-audit-entry { grid-template-columns: minmax(100px, .7fr) minmax(120px, 1fr) minmax(150px, 2fr) auto; align-items: center; }
.system-admin-audit-entry strong { color: var(--ink); font-size: 12px; }
.system-admin-password-form { min-width: min(420px, calc(100vw - 48px)); }
.button.danger { border: 1px solid #a93d3d; background: #a93d3d; color: #fff; }
.button.danger:hover { background: #8e3030; }
.post-body { margin: 4px 18px 14px; color: #555b53; font-size: 13px; line-height: 1.7; overflow-wrap: anywhere; white-space: pre-wrap; }
.media-preview { display: block; width: 100%; max-height: 600px; margin: 0; background: #f0f0eb; object-fit: contain; }
.post-actions { display: flex; align-items: center; gap: 16px; padding: 12px 18px 6px; }
.like-button, .save-button { padding: 0; border: 0; background: transparent; color: #62675f; font-size: 20px; }
.like-button.liked { color: #c56458; }
.save-button { margin-left: auto; font-size: 18px; }
.save-button.saved { color: #53766b; }
.post-likes { margin: 0 18px 6px; color: var(--ink); font-size: 11px; font-weight: 700; }
.post-comments { padding: 0 18px 15px; }
.comments-heading { display: flex; align-items: center; gap: 7px; padding-bottom: 8px; color: var(--ink); font-size: 12px; }
.comments-heading span { color: var(--muted); font-size: 11px; }
.comments-empty { margin: 4px 0 8px; color: var(--muted); font-size: 11px; line-height: 1.5; }
.comment { padding: 5px 0; color: #62675f; font-size: 11px; overflow-wrap: anywhere; }
.comment strong { margin-right: 5px; color: var(--ink); }
.comment-form { display: flex; gap: 8px; margin-top: 10px; }
.comment-form input { min-width: 0; padding: 10px 11px; border-color: var(--line); background: var(--wash); font-size: 11px; }
.comment-form .button { min-height: 34px; padding: 7px 11px; font-size: 11px; }
.discovery { position: sticky; top: 100px; grid-area: discovery; padding: 19px; border: 1px solid var(--line); border-radius: 13px; background: var(--paper); }
.discover-heading { margin-bottom: 15px; }
.discover-heading h2 { margin: 6px 0 0; color: var(--ink); font-size: 17px; letter-spacing: -.025em; }
.search-form { display: flex; align-items: center; gap: 8px; padding: 0 10px; border: 1px solid var(--line); border-radius: 9px; background: var(--wash); color: #648276; }
.search-form input { min-width: 0; padding: 11px 2px; border: 0; outline: none; background: transparent; font-size: 11px; box-shadow: none; }
.search-form input:focus { box-shadow: none; }
.search-results { display: grid; gap: 8px; margin-top: 10px; }
.search-results > p { line-height: 1.6; }
.person { display: flex; align-items: center; gap: 9px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.person .avatar { width: 36px; height: 36px; flex-basis: 36px; font-size: 12px; }
.person-copy { display: grid; min-width: 0; flex: 1; gap: 4px; }
.person-copy strong { overflow: hidden; color: var(--ink); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.person-copy span { color: var(--muted); font-size: 10px; }
.person-actions .button { min-height: 31px; padding: 6px 9px; font-size: 10px; }
.footer { padding: 18px 0 27px; color: #a1a1af; font-size: 10px; text-align: center; }
.footer span { color: #648276; }
.footer #cookie-settings { margin-left: 8px; padding: 3px 5px; border: 0; background: transparent; color: #53766b; font-size: inherit; text-decoration: underline; text-underline-offset: 2px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }

html[data-theme="dark"] {
  color-scheme: dark;
  background: #191b18;
  --ink: #eeeee7;
  --muted: #a7aaa0;
  --line: #393c36;
  --paper: #232520;
  --wash: #191b18;
  --shadow: 0 12px 32px rgba(0, 0, 0, .16);
}
html[data-theme="dark"] body { background: var(--wash); color: var(--ink); }
html[data-theme="dark"] .topbar { border-color: #34372f; background: rgba(25, 27, 24, .92); }
html[data-theme="dark"] .topbar-cta, html[data-theme="dark"] .theme-toggle,
html[data-theme="dark"] .icon-button { border-color: #3a3d37; background: #282a25; color: #bfd0c3; }
html[data-theme="dark"] .notice { border-color: #59473a; background: #30271f; color: #ead2bd; }
html[data-theme="dark"] .system-admin-notice.error { border-color: #59473a; background: #30271f; color: #ead2bd; }
html[data-theme="dark"] .welcome-copy, html[data-theme="dark"] .welcome-stats { color: #b8bbb1; }
html[data-theme="dark"] .panel, html[data-theme="dark"] .auth-panel,
html[data-theme="dark"] .landing-preview, html[data-theme="dark"] .composer,
html[data-theme="dark"] .post, html[data-theme="dark"] .feed-state,
html[data-theme="dark"] .discovery {
  border-color: #393c36;
  background-color: var(--paper);
}
html[data-theme="dark"] .preview-head, html[data-theme="dark"] .landing-preview > p,
html[data-theme="dark"] .auth-heading h2, html[data-theme="dark"] .consent-dialog h2,
html[data-theme="dark"] .main-heading h1, html[data-theme="dark"] .feed-heading h2,
html[data-theme="dark"] .discover-heading h2, html[data-theme="dark"] .composer-heading strong,
html[data-theme="dark"] .post-meta strong, html[data-theme="dark"] .post-likes,
html[data-theme="dark"] .comment strong, html[data-theme="dark"] .profile-copy strong { color: #eeeee7; }
html[data-theme="dark"] .preview-head small, html[data-theme="dark"] .auth-heading p,
html[data-theme="dark"] .post-meta span, html[data-theme="dark"] .post-body,
html[data-theme="dark"] .comment, html[data-theme="dark"] .main-heading > p:last-child,
html[data-theme="dark"] .feed-heading p, html[data-theme="dark"] .composer-heading span,
html[data-theme="dark"] .person-copy span { color: #a7aaa0; }
html[data-theme="dark"] .auth-kicker { color: #bdabff; }
html[data-theme="dark"] .tabs { background: #17151f; }
html[data-theme="dark"] .tab { color: #aaa7bb; }
html[data-theme="dark"] .tab.active { background: #2a2736; color: #f3f1fa; }
html[data-theme="dark"] .field { color: #d3d0df; }
html[data-theme="dark"] input, html[data-theme="dark"] textarea {
  border-color: #393644;
  background: #17161f;
  color: #f3f1fa;
}
html[data-theme="dark"] input::placeholder, html[data-theme="dark"] textarea::placeholder { color: #777487; }
html[data-theme="dark"] .side-link { color: #c5c8bf; }
html[data-theme="dark"] .side-link:hover { background: #2a2d27; color: #eeeee7; }
html[data-theme="dark"] .side-link.active { background: #2c382f; color: #c6d8ca; }
html[data-theme="dark"] .nav-icon, html[data-theme="dark"] .media-picker { color: #b8cdbd; }
html[data-theme="dark"] .sidebar-divider { background: #393c36; }
html[data-theme="dark"] .avatar { background: #344139; color: #ccddcf; }
html[data-theme="dark"] .composer textarea { border-color: #393c36; background: #191b18; }
html[data-theme="dark"] .media-picker { border-color: #41473f; }
html[data-theme="dark"] .feed-error { border-color: #59473a; background: #30271f; }
html[data-theme="dark"] .feed-error strong { color: #ead2bd; }
html[data-theme="dark"] .empty-mark { background: #2c382f; color: #c6d8ca; }
html[data-theme="dark"] .search-form { border-color: #393c36; background: #191b18; }
html[data-theme="dark"] .person { border-color: #393c36; }
html[data-theme="dark"] .comment-form input { border-color: #393c36; background: #191b18; }
html[data-theme="dark"] .consent-dialog { border-color: #393c36; background: #232520; }
html[data-theme="dark"] .consent-dialog > p:not(.eyebrow) { color: #c1c3ba; }
html[data-theme="dark"] .consent-note { background: #191b18; }
html[data-theme="dark"] .consent-secondary { border-color: #393c36; background: #2c2e28; color: #e1e2db; }
html[data-theme="dark"] .footer #cookie-settings { color: #b8cdbd; }

@media (max-width: 1100px) {
  .app-layout { grid-template-areas: "sidebar main" "sidebar discovery"; grid-template-columns: 176px minmax(0, 1fr); gap: 24px; }
  .discovery { position: static; }
  .auth-layout { gap: 50px; padding-right: 20px; padding-left: 20px; }
}
@media (max-width: 850px) {
  .page { width: min(100% - 32px, 700px); }
  .app-layout { grid-template-areas: "sidebar" "main" "discovery"; grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .sidebar { position: static; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 8px; padding: 0; }
  .side-nav { display: flex; flex: 1; flex-wrap: wrap; gap: 4px; }
  .side-link { min-height: 39px; padding: 0 10px; font-size: 11px; }
  .sidebar-divider { display: none; }
  .profile-summary { margin-left: auto; padding: 0 4px; }
  .signout { width: auto; }
  .auth-layout { grid-template-columns: minmax(0, 1fr) 350px; gap: 25px; padding-top: 42px; }
  .landing-preview { margin-left: 5px; }
}
@media (max-width: 620px) {
  .page { width: min(100% - 22px, 480px); }
  .topbar { height: 65px; }
  .brand { font-size: 18px; }
  .brand-mark { width: 34px; height: 34px; border-radius: 12px; }
  .tagline { display: none; }
  .topbar-cta { padding: 9px 11px; font-size: 10px; }
  .auth-layout { min-height: auto; grid-template-columns: 1fr; gap: 27px; padding: 39px 4px 48px; }
  .welcome h1 { max-width: 450px; font-size: clamp(43px, 12vw, 61px); }
  .welcome-copy { font-size: 13px; }
  .landing-preview { width: min(92%, 380px); margin: 22px auto 0; }
  .preview-art { min-height: 180px; }
  .auth-panel { padding: 22px; }
  .app-layout { grid-template-columns: minmax(0, 1fr); gap: 18px; padding-top: 22px; }
  .sidebar { flex-wrap: wrap; }
  .side-nav { display: grid; width: 100%; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .sidebar .side-link { justify-content: center; gap: 6px; padding: 0 5px; font-size: 10px; }
  .nav-icon { width: auto; }
  .profile-summary { margin-left: 0; }
  .signout { margin-left: auto; }
  .main-column { gap: 18px; }
  .main-heading h1 { font-size: 26px; }
  .composer { padding: 15px; }
  .composer form { flex-wrap: wrap; }
  .composer-spacer { display: none; }
  .post-submit { margin-left: auto; }
  .discovery { padding: 16px; }
  .system-admin-page { margin: 18px auto; }
  .system-admin-login { margin: 36px auto; padding: 21px; }
  .system-admin-header { align-items: flex-start; flex-direction: column; }
  .system-admin-header-actions { width: 100%; }
  .system-admin-stats { gap: 7px; }
  .system-admin-stat { padding: 12px 9px; }
  .system-admin-stat span { font-size: 10px; }
  .system-admin-stat strong { font-size: 21px; }
  .system-admin-content { padding: 12px; }
  .system-admin-tabs { gap: 0; }
  .system-admin-tab { flex: 1; padding: 10px 4px; font-size: 10px; }
  .system-admin-user-actions { justify-content: flex-start; }
  .system-admin-bulk-actions { align-items: stretch; flex-direction: column; }
  .system-admin-audit-entry { grid-template-columns: 1fr; gap: 4px; }
  .system-admin-password-form { min-width: min(420px, calc(100vw - 54px)); }
}
@media (max-height: 480px) {
  .consent-backdrop { align-items: start; overflow-y: auto; }
  .consent-dialog { max-height: calc(100vh - 24px); margin: 12px auto; overflow-y: auto; }
}

/* Responsive feed and mobile navigation */
.mobile-bottom-nav {
 position: fixed;
 z-index: 7;
 bottom: 0;
 left: 50%;
 display: grid;
 width: min(100%, 620px);
 height: 66px;
 grid-template-columns: repeat(6, minmax(0, 1fr));
 align-items: center;
 transform: translateX(-50%);
 border: 1px solid var(--line);
 border-bottom: 0;
 border-radius: 16px 16px 0 0;
 background: var(--paper);
 box-shadow: 0 -6px 24px rgba(0, 0, 0, .08);
 backdrop-filter: blur(18px);
}
.mobile-nav-item {
 display: grid;
 min-width: 0;
 height: 56px;
 place-items: center;
 align-content: center;
 gap: 4px;
 border: 0;
 background: transparent;
 color: var(--muted);
 text-decoration: none;
}
.mobile-nav-item span { font-size: 21px; line-height: 1; }
.mobile-nav-item small { font-size: 10px; line-height: 1; }
.mobile-nav-item.active { color: var(--ink); }
#mobile-profile-avatar { display: grid; width: 24px; height: 24px; place-items: center; border: 1.5px solid currentColor; border-radius: 50%; font-size: 9px; font-weight: 800; }
.mobile-create { display: grid; width: 42px; height: 42px; justify-self: center; place-items: center; border: 0; border-radius: 13px; background: #53766b; color: #fff; box-shadow: 0 4px 12px rgba(47, 86, 73, .22); text-decoration: none; }
.mobile-create span { display: grid; width: 100%; height: 100%; place-items: center; border-radius: inherit; color: inherit; font-size: 25px; line-height: 1; }
body.video-feed-active .mobile-bottom-nav { border-color: #303030; background: rgba(16, 16, 16, .97); }
body.video-feed-active .mobile-nav-item { color: #aaa; }
body.video-feed-active .mobile-nav-item.active { color: #fff; }
body.video-feed-active .post-follow-button { border-color: rgba(255,255,255,.35); background: rgba(10,10,10,.5); color: #fff; }
body.video-feed-active .post-follow-button.following { background: rgba(255,255,255,.18); color: #eee; }
html[data-theme="dark"] .mobile-bottom-nav { border-color: #393c36; background: #191b18; }
.app-layout { grid-template-columns: 210px minmax(480px, 680px) 260px; justify-content: center; }
.main-heading { position: sticky; z-index: 4; top: 78px; display: grid; height: 58px; place-items: center; border-bottom: 1px solid var(--line); background: var(--wash); }
.feed-tabs { display: flex; height: 100%; align-items: center; gap: 22px; }
.feed-tab { position: relative; height: 100%; padding: 0 4px; border: 0; background: transparent; color: var(--muted); font-size: 14px; font-weight: 800; }
.feed-tab.active { color: var(--ink); }
.feed-tab.active::after { position: absolute; right: 0; bottom: 0; left: 0; height: 3px; border-radius: 3px 3px 0 0; background: var(--ink); content: ""; }
.feed-heading { display: none; }
.composer { order: 2; }
.feed-section { display: grid; gap: 14px; }
.feed { gap: 18px; }
.post { position: relative; border: 0; border-radius: 0 0 16px 16px; background: transparent; box-shadow: none; }
.post-heading { padding: 14px 12px 10px; }
.post-body { margin: 0 12px 10px; padding: 0; color: var(--ink); font-size: 15px; }
.post-media-wrap { position: relative; width: 100%; max-height: 72vh; overflow: hidden; border-radius: 16px; background: #111; }
.post-media-wrap .media-preview { width: 100%; max-height: 72vh; height: min(72vh, 680px); object-fit: cover; background: #111; }
.post-action-rail { position: absolute; right: 12px; bottom: 18px; display: grid; gap: 12px; }
.rail-action { display: grid; width: 52px; min-height: 52px; place-items: center; gap: 1px; border: 0; border-radius: 50%; background: transparent; color: #fff; text-shadow: 0 1px 5px rgba(0, 0, 0, .55); }
.rail-action span { display: grid; width: 46px; height: 46px; place-items: center; border-radius: 50%; background: rgba(20, 20, 20, .45); backdrop-filter: blur(8px); font-size: 23px; line-height: 1; }
.rail-action small { color: #fff; font-size: 9px; font-weight: 800; text-shadow: 0 1px 4px #000; }
.rail-action.like-button.liked span { background: rgba(238, 72, 95, .9); color: #fff; }
.rail-action.save-button.saved span { background: rgba(83, 118, 107, .92); color: #fff; }
.post-comments { margin: 0 12px; padding: 10px 0 16px; }
.comment { color: var(--muted); }
.text-actions { justify-content: flex-start; padding: 10px 12px 0; }
.text-actions .like-button, .text-actions .save-button { display: inline-flex; align-items: center; gap: 6px; color: var(--ink); font-size: 20px; }
.text-actions .comment-jump { display: inline-flex; align-items: center; gap: 6px; padding: 0; border: 0; background: transparent; color: var(--ink); font-size: 20px; }
.text-actions .comment-jump span { color: var(--muted); font-size: 12px; }
.text-actions .like-button span { color: var(--muted); font-size: 12px; }
.sidebar { top: 112px; }
.discovery { top: 112px; }
.main-column { gap: 12px; }
.discover-page { grid-column: 1 / -1; width: min(100%, 980px); min-width: 0; margin: 0 auto; }
.discover-page-heading { padding: 8px 0 20px; }
.discover-page-heading h1 { margin: 7px 0 0; color: var(--ink); font-size: 30px; letter-spacing: -.05em; }
.discover-page-heading > .muted { margin: 7px 0 0; font-size: 13px; }
.discover-user-search { max-width: 620px; margin: 0 0 18px; }
.discover-user-results { max-width: 620px; }
.video-search-form { display: flex; max-width: 620px; gap: 9px; margin: 0 0 20px; }
.video-search-form input { min-width: 0; flex: 1; }
.video-search-form .button { flex: 0 0 auto; }
.discover-feed { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.discover-card { position: relative; min-width: 0; aspect-ratio: 4 / 5; overflow: hidden; border-radius: 14px; background: #171817; }
.discover-media { display: block; width: 100%; height: 100%; object-fit: cover; }
.discover-card video { background: #171817; }
.discover-card-copy { position: absolute; right: 0; bottom: 0; left: 0; display: grid; gap: 5px; padding: 30px 11px 10px; background: linear-gradient(transparent, rgba(0, 0, 0, .76)); color: #fff; pointer-events: none; }
.discover-card-copy p { display: -webkit-box; margin: 0; overflow: hidden; font-size: 11px; line-height: 1.4; overflow-wrap: anywhere; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; }
.discover-card-copy span { font-size: 10px; font-weight: 750; }
.discover-empty { grid-column: 1 / -1; }
.app-layout.discover-mode { grid-template-areas: none; grid-template-columns: minmax(0, 1fr); }
.app-layout.discover-mode > .sidebar,
.app-layout.discover-mode > .main-column,
.app-layout.discover-mode > .discovery { display: none; }

@media (min-width: 851px) {
  .main-heading { border-radius: 12px 12px 0 0; }
  .post { border: 1px solid var(--line); border-radius: 16px; background: var(--paper); }
  .post-media-wrap { border-radius: 0; }
  .post-comments { margin: 0; padding: 10px 18px 16px; }
  .post-body { padding: 0 6px; }
}

@media (max-width: 850px) {
  .app-layout { grid-template-areas: "sidebar" "main" "discovery"; grid-template-columns: minmax(0, 680px); }
  .sidebar { display: none; }
  .discovery { display: none; }
  .main-column { width: 100%; }
  .composer { display: none; }
  .main-heading { top: 65px; margin: 0 -11px; }
  .post-media-wrap { max-height: calc(100vh - 160px); }
  .post-media-wrap .media-preview { max-height: calc(100vh - 160px); height: calc(100vh - 160px); }
  .feed { max-width: 680px; width: 100%; margin: 0 auto; }
  .mobile-bottom-nav {
    position: fixed;
    z-index: 30;
    right: 0;
    bottom: 0;
    left: 0;
    display: grid;
    width: 100%;
    height: calc(66px + env(safe-area-inset-bottom));
    grid-template-columns: repeat(6, minmax(0, 1fr));
    align-items: center;
    transform: none;
    padding: 0 8px env(safe-area-inset-bottom);
    border: 1px solid var(--line);
    border-bottom: 0;
    border-radius: 16px 16px 0 0;
    background: var(--paper);
    backdrop-filter: blur(18px);
  }
  .mobile-nav-item {
    display: grid;
    height: 56px;
    place-items: center;
    align-content: center;
    gap: 4px;
    border: 0;
    background: transparent;
    color: var(--muted);
  }
  .mobile-nav-item span { font-size: 21px; line-height: 1; }
  .mobile-nav-item small { font-size: 10px; }
  .mobile-nav-item.active { color: var(--ink); }
  .mobile-bottom-nav.admin-enabled { grid-template-columns: repeat(7, minmax(0, 1fr)); }
  #mobile-profile-avatar { display: grid; width: 24px; height: 24px; place-items: center; border: 1.5px solid currentColor; border-radius: 50%; font-size: 9px; font-weight: 800; }
  .mobile-create { width: 42px; height: 42px; border-radius: 13px; background: #53766b; color: #fff; box-shadow: 0 4px 12px rgba(47, 86, 73, .22); }
  .mobile-create span { width: 100%; height: 100%; border-radius: inherit; background: transparent; color: inherit; font-size: 25px; }
  .footer { padding-bottom: 82px; }
  .app-layout.discover-mode { padding-top: 20px; }
  .app-layout.discover-mode { grid-template-areas: none; }
  .discover-page { padding-bottom: 80px; }
  .discover-feed { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
  .discover-card { border-radius: 8px; }
  html[data-theme="dark"] .mobile-bottom-nav { border-color: #393c36; background: #191b18; }
}

html[data-theme="dark"] .discover-page-heading h1 { color: var(--ink); }

.creator-link { display: flex; min-width: 0; align-items: center; gap: 11px; color: inherit; text-decoration: none; }
.creator-link:hover .post-meta strong { text-decoration: underline; text-underline-offset: 3px; }
.profile-page { grid-column: 1 / -1; width: min(100%, 980px); min-width: 0; margin: 0 auto; padding: 18px 0 80px; }
.profile-back { display: inline-block; margin-bottom: 20px; color: var(--muted); font-size: 13px; font-weight: 700; text-decoration: none; }
.profile-back:hover { color: var(--ink); }
.profile-header { display: flex; align-items: center; gap: 17px; padding: 15px 0 25px; border-bottom: 1px solid var(--line); }
.profile-avatar { display: grid; width: 76px; height: 76px; flex: 0 0 76px; place-items: center; border-radius: 50%; background: #e3ebe5; color: #45685d; font-size: 25px; font-weight: 800; }
.profile-header-copy { min-width: 0; flex: 1; }
.profile-header-copy h1 { margin: 0; color: var(--ink); font-size: 25px; letter-spacing: -.04em; overflow-wrap: anywhere; }
.profile-header-copy p { margin: 5px 0 0; font-size: 13px; }
.profile-bio { margin: 8px 0 0; color: var(--muted); font-size: 12px; line-height: 1.55; overflow-wrap: anywhere; white-space: pre-wrap; }
.profile-bio.empty { font-style: italic; }
.profile-follow { min-width: 110px; }
.profile-actions { display: flex; flex: 0 0 auto; flex-direction: column; align-items: stretch; gap: 8px; }
.profile-bio-edit { min-height: 36px; padding: 8px 12px; font-size: 11px; }
.profile-logout { min-height: 36px; padding: 8px 12px; font-size: 11px; }
.profile-bio-form { max-width: 680px; margin: 18px 0 26px; padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--paper); }
.profile-bio-form textarea { min-height: 84px; resize: vertical; }
.profile-bio-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 9px; }
.profile-bio-actions > div { display: flex; gap: 8px; }
.profile-bio-actions .button { min-height: 36px; padding: 8px 12px; font-size: 11px; }
.profile-follow.following { border-color: var(--line); background: var(--paper); color: var(--ink); box-shadow: none; }
.profile-videos-title { margin: 24px 0 14px; color: var(--ink); font-size: 17px; }
.profile-videos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.profile-video-card { position: relative; min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); }
.profile-post-media { display: block; width: 100%; aspect-ratio: 4 / 5; background: #111; object-fit: cover; }
.profile-video-card p { margin: 0; padding: 10px; color: var(--ink); font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }
.profile-video-card .profile-text-post { display: grid; min-height: 150px; align-items: center; padding: 18px; font-size: 15px; }
.profile-empty { grid-column: 1 / -1; }
.app-layout.profile-mode { grid-template-areas: none; grid-template-columns: minmax(0, 1fr); }
.app-layout.profile-mode > .sidebar,
.app-layout.profile-mode > .main-column,
.app-layout.profile-mode > .discovery { display: none; }
.app-layout.create-mode { grid-template-areas: none; grid-template-columns: minmax(0, 620px); justify-content: center; padding-top: clamp(22px, 6vh, 52px); }
.app-layout.create-mode > .sidebar,
.app-layout.create-mode > .discovery,
.app-layout.create-mode > .discover-page,
.app-layout.create-mode > .profile-page { display: none; }
.app-layout.create-mode > .main-column { display: grid; grid-area: auto; width: 100%; gap: 14px; }
.app-layout.create-mode > .main-column > .main-heading,
.app-layout.create-mode > .main-column > .feed-section { display: none; }
.app-layout.create-mode .composer { display: block; order: 0; padding: clamp(20px, 4vw, 36px); border-radius: 18px; }
.app-layout.create-mode .composer-back { display: inline-flex; margin-bottom: 22px; }

body.video-feed-active { height: 100vh; overflow: hidden; }
body.video-feed-active .footer { display: none; }
body.video-feed-active .topbar { padding-inline: clamp(12px, 3vw, 28px); border-color: #303030; background: rgba(16, 16, 16, .96); }
body.video-feed-active .brand { display: inline-flex; flex: 0 0 auto; color: #fff; }
body.video-feed-active .tagline { display: none; }
body.video-feed-active .topbar-actions { margin-left: auto; }
body.video-feed-active .theme-toggle,
body.video-feed-active .topbar-cta { border-color: #373737; background: #222; color: #fff; }
.app-layout.video-mode {
  position: fixed;
  z-index: 4;
  top: 78px;
  right: 0;
  bottom: 0;
  left: 0;
  display: block;
  overflow: hidden;
  margin: 0;
  padding: 0;
  background: #101010;
  color: #fff;
}
.app-layout.video-mode > .sidebar,
.app-layout.video-mode > .discovery,
.app-layout.video-mode > .discover-page,
.app-layout.video-mode > .profile-page,
.app-layout.video-mode > .main-column > .composer { display: none; }
.app-layout.video-mode > .main-column { display: block; width: 100%; height: 100%; min-height: 0; }
.video-mode .main-heading { position: absolute; z-index: 5; top: 0; right: 0; left: 0; height: 52px; border: 0; background: linear-gradient(rgba(0, 0, 0, .48), transparent); }
.video-mode .feed-tab { color: rgba(255, 255, 255, .72); }
.video-mode .feed-tab.active { color: #fff; }
.video-mode .feed-tab.active::after { background: #fff; }
.video-mode .feed-section { height: 100%; }
.video-mode .feed { display: flex; height: 100%; flex-direction: column; align-items: center; overflow-y: auto; padding-top: 52px; overscroll-behavior-y: contain; scroll-snap-type: y mandatory; scrollbar-width: none; }
.video-mode .feed::-webkit-scrollbar { display: none; }
.video-mode .post { width: min(100%, calc((100vh - 142px) * .9)); height: calc(100vh - 142px); min-height: 320px; flex: 0 0 auto; scroll-snap-align: start; scroll-snap-stop: always; border: 0; border-radius: 0; background: #101010; }
.video-mode .post-media-wrap { position: absolute; z-index: 0; inset: 0; width: 100%; max-height: none; border-radius: 0; }
.video-mode .post-media-wrap .media-preview { width: 100%; height: 100%; max-height: none; object-fit: contain; }
.video-mode .feed-state { width: min(100% - 32px, 420px); margin: auto; border-color: #363636; background: #1b1b1b; color: #fff; }
.video-mode .feed-state h3, .video-mode .feed-error strong { color: #fff; }
.video-mode .feed-state p { color: #bdbdbd; }
.video-mode .feed-error { text-align: center; }
.video-mode .feed-error .button { border-color: #444; background: #292929; color: #fff; }
.video-mode .post-media-wrap::after { position: absolute; inset: 45% 0 0; background: linear-gradient(transparent, rgba(0, 0, 0, .62)); content: ""; pointer-events: none; }
.video-mode .post-heading { position: absolute; z-index: 2; right: 78px; bottom: 56px; left: 18px; padding: 0; }
.video-mode .post-meta strong, .video-mode .post-meta span { color: #fff; }
.video-mode .post-body { position: absolute; z-index: 2; right: 78px; bottom: 22px; left: 18px; margin: 0; color: #fff; font-size: 13px; line-height: 1.45; text-shadow: 0 1px 5px rgba(0, 0, 0, .6); }
.video-mode .text-post { display: flex; flex-direction: column; justify-content: center; padding: 28px; background: radial-gradient(ellipse at 75% 20%, #5b475a 0, transparent 45%), linear-gradient(145deg, #293e44, #151d2b 62%, #392c3a); }
.video-mode .text-post .post-heading { position: relative; inset: auto; padding: 0; }
.video-mode .text-post .post-body { position: relative; inset: auto; margin: 16px 0 0; color: #fff; font-size: clamp(18px, 2.4vw, 27px); line-height: 1.45; }
.video-mode .text-post .post-actions { position: relative; z-index: 2; padding: 16px 0 0; }
.video-mode .text-post .like-button, .video-mode .text-post .save-button { color: #fff; }
.video-mode .post-menu { display: none; }
.video-mode .post-delete { top: 64px; }
.video-mode .post-action-rail { z-index: 3; right: 14px; bottom: 20px; }
.video-mode .post-comments { display: none; }
.video-mode .post.comments-open .post-comments { position: absolute; z-index: 5; right: 12px; bottom: 8px; left: 12px; display: flex; max-height: min(46vh, 380px); flex-direction: column; gap: 4px; overflow-y: auto; padding: 14px; border: 1px solid rgba(255, 255, 255, .2); border-radius: 14px; background: rgba(18, 18, 18, .97); box-shadow: 0 10px 32px rgba(0, 0, 0, .35); }
.video-mode .post-comments .comment { padding: 7px 0; border-bottom: 1px solid rgba(255, 255, 255, .1); color: #f0f0f0; line-height: 1.55; }
.video-mode .post-comments .comment strong { color: #fff; }
.video-mode .post-comments .comment-form input { border-color: #444; background: #222; color: #fff; }
.video-mode .post-comments .comment-form { position: sticky; bottom: -14px; padding-top: 8px; background: #121212; }
.app-layout.video-mode .mobile-bottom-nav { z-index: 7; }

@media (max-width: 850px) {
  .app-layout.video-mode { top: 65px; bottom: calc(66px + env(safe-area-inset-bottom)); }
  .video-mode .main-heading { margin: 0; }
  .video-mode .post { height: calc(100dvh - 131px - env(safe-area-inset-bottom)); min-height: 320px; }
  .video-mode .post { width: 100%; }
  .video-mode .post-heading { bottom: 56px; }
  .video-mode .post-action-rail { bottom: 16px; }
  .profile-page { padding: 12px 0 80px; }
  .profile-header { gap: 12px; }
  .profile-avatar { width: 60px; height: 60px; flex-basis: 60px; font-size: 20px; }
  .profile-header-copy h1 { font-size: 20px; }
  .profile-follow { min-width: 86px; padding: 9px 10px; }
  .profile-videos { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .profile-video-card { border-radius: 8px; }
}

@media (min-width: 851px) {
  .video-mode .main-heading { right: auto; width: calc(100% - 340px); }
  .video-mode .post { display: grid; width: min(calc(100vw - 64px), calc(min(100vh - 150px, 860px) + 340px)); height: min(calc(100vh - 150px), 860px); grid-template-columns: minmax(0, 1fr) 340px; }
  .video-mode .post-media-wrap { position: relative; inset: auto; width: 100%; height: 100%; max-height: none; border-radius: 16px 0 0 16px; }
  .video-mode .post-media-wrap .media-preview { width: 100%; height: 100%; max-height: none; object-fit: contain; }
  .video-mode .post-heading { right: 422px; bottom: 58px; left: 20px; }
  .video-mode .post-body { right: 422px; bottom: 22px; left: 20px; }
  .video-mode .post.text-post { grid-template-rows: auto 1fr auto; grid-template-areas: "heading comments" "body comments" "actions comments"; padding: 28px; }
  .video-mode .post.text-post .post-heading { grid-area: heading; }
  .video-mode .post.text-post .post-body { grid-area: body; }
  .video-mode .post.text-post .text-actions { grid-area: actions; }
  .video-mode .post.text-post .post-comments { grid-area: comments; }
  .video-mode .text-actions .comment-jump { color: #fff; }
  .video-mode .text-actions .comment-jump span { color: #ddd; }
  .video-mode .post-comments,
  .video-mode .post.comments-open .post-comments { position: relative; inset: auto; z-index: 1; display: flex; width: 100%; height: 100%; max-height: none; flex-direction: column; gap: 4px; overflow-y: auto; padding: 18px; border: 0; border-left: 1px solid rgba(255,255,255,.12); border-radius: 0 16px 16px 0; background: #121212; box-shadow: none; }
  .video-mode .post-comments .comment-form { position: sticky; bottom: 0; padding-top: 10px; background: #121212; }
  .video-mode .post-comments .comments-heading,
  .video-mode .post-comments .comments-heading span { color: #fff; }
  .video-mode .post-comments .comments-empty { color: #c1c1c1; }
}

.messages-page { grid-column: 1 / -1; width: min(100%, 980px); min-width: 0; margin: 0 auto; padding: 18px 0 80px; }
.messages-page-heading { padding-bottom: 18px; }
.messages-page-heading h1 { margin: 7px 0 0; color: var(--ink); font-size: 30px; letter-spacing: -.05em; }
.messages-page-heading > .muted { margin: 7px 0 0; font-size: 13px; }
.messages-layout { display: grid; min-height: 480px; grid-template-columns: minmax(220px, .75fr) minmax(0, 1.5fr); overflow: hidden; border: 1px solid var(--line); border-radius: 15px; background: var(--paper); }
.messages-conversations { min-width: 0; padding: 16px; border-right: 1px solid var(--line); }
.messages-conversations h2 { margin: 0 0 12px; font-size: 15px; }
.messages-list { display: grid; gap: 5px; }
.conversation-item { display: flex; width: 100%; min-width: 0; align-items: center; gap: 10px; padding: 9px; border: 0; border-radius: 10px; background: transparent; color: var(--ink); text-align: left; }
.conversation-item:hover, .conversation-item.active { background: var(--wash); }
.conversation-copy { display: grid; min-width: 0; flex: 1; gap: 4px; }
.conversation-copy strong, .conversation-copy span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conversation-copy strong { font-size: 12px; }
.conversation-copy span { color: var(--muted); font-size: 10px; }
.messages-chat { display: flex; min-width: 0; min-height: 480px; flex-direction: column; }
.messages-thread { display: flex; min-height: 0; flex: 1; flex-direction: column; gap: 10px; overflow-y: auto; padding: 17px; }
.messages-thread-heading { display: flex; align-items: center; gap: 10px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.messages-thread-heading strong, .messages-thread-heading span { display: block; }
.messages-thread-heading strong { font-size: 13px; }
.messages-thread-heading span { margin-top: 3px; color: var(--muted); font-size: 10px; }
.message-row { display: flex; }
.message-row.own { justify-content: flex-end; }
.message-bubble { max-width: min(80%, 420px); padding: 10px 12px; border-radius: 13px 13px 13px 3px; background: var(--wash); color: var(--ink); }
.message-row.own .message-bubble { border-radius: 13px 13px 3px 13px; background: #e9eee9; color: #292b28; }
.message-row.own .message-bubble time { color: #687167; }
html[data-theme="dark"] .message-row.own .message-bubble { background: #344139; color: #eeeee7; }
html[data-theme="dark"] .message-row.own .message-bubble time { color: #b8bbb1; }
.message-bubble p { margin: 0; font-size: 12px; line-height: 1.55; overflow-wrap: anywhere; white-space: pre-wrap; }
.message-bubble time { display: block; margin-top: 5px; color: var(--muted); font-size: 9px; text-align: right; }
.messages-form { display: flex; align-items: flex-end; gap: 9px; padding: 12px; border-top: 1px solid var(--line); }
.messages-form textarea { min-height: 42px; max-height: 120px; resize: vertical; }
.messages-mode { grid-template-areas: none; grid-template-columns: minmax(0, 1fr); }
.messages-mode > .sidebar,
.messages-mode > .main-column,
.messages-mode > .discovery,
.messages-mode > .discover-page,
.messages-mode > .notifications-page,
.messages-mode > .profile-page { display: none; }

@media (max-width: 620px) {
  .messages-page { padding-top: 12px; }
  .messages-page-heading h1 { font-size: 25px; }
  .messages-layout { min-height: calc(100dvh - 230px); grid-template-columns: minmax(105px, .72fr) minmax(0, 1.6fr); }
  .messages-conversations { padding: 10px 7px; }
  .messages-conversations h2 { padding-left: 5px; font-size: 12px; }
  .conversation-item { flex-direction: column; align-items: flex-start; gap: 5px; padding: 8px 5px; }
  .conversation-item .avatar { width: 32px; height: 32px; flex-basis: 32px; }
  .conversation-copy { width: 100%; }
  .messages-chat { min-height: calc(100dvh - 230px); }
  .messages-thread { padding: 10px; }
  .message-bubble { max-width: 94%; padding: 8px 9px; }
  .messages-form { gap: 6px; padding: 8px; }
  .messages-form .button { min-height: 38px; padding: 8px 10px; font-size: 11px; }
}
