@font-face {
  font-family:"Cascadia Code";
  src:url("/assets/fonts/CascadiaCode.ttf") format("truetype");
  font-style:normal; font-weight:200 900; font-display:swap;
}
:root {
  color-scheme:dark; --paper:#0f1113; --panel:#171a1d; --panel2:#23272b;
  --ink:#eceae3; --muted:#a5aaa7; --line:#000; --accent:#96b36a;
  --font:"Cascadia Code",monospace;
  font-family:var(--font); color:var(--ink); background:var(--paper);
}
* { box-sizing:border-box; }
body { margin:0; font-size:14px; line-height:1.4; }
button,input,textarea,select { font:inherit; color:inherit; border-radius:0; }
button { cursor:pointer; border:0; background:none; }
button:disabled { opacity:.55; cursor:wait; }
button,input,textarea,select { touch-action:manipulation; }
a { color:var(--accent); text-underline-offset:3px; }
img { max-width:100%; }
.icon { display:inline-block; width:20px; height:20px; flex:none; vertical-align:middle; }
button:focus-visible,a:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible,summary:focus-visible {
  outline:3px solid var(--accent); outline-offset:-3px;
}
[hidden] { display:none!important; }
.sr-only { position:absolute; width:1px; height:1px; padding:0; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
.skip-link { position:fixed; top:-60px; left:10px; z-index:100; background:#171a1d; padding:14px; }
.skip-link:focus { top:10px; }
.masthead { background:#0f1012; border-bottom:2px solid #000; }
.utility-line { background:#16191a; color:#dfe5da; display:flex; justify-content:space-between; gap:12px; padding:5px 20px; font-size:9px; letter-spacing:.1em; border-bottom:1px solid #000; }
.masthead-inner { display:flex; align-items:center; gap:22px; min-height:84px; max-width:1920px; margin:auto; padding:14px 20px; }
.logo { display:flex; align-items:center; gap:12px; font-weight:800; font-size:34px; letter-spacing:-.09em; padding:0; }
.logo em { font-style:normal; color:var(--accent); }
.brand-mark { display:grid; place-items:center; width:36px; height:36px; border:2px solid var(--accent); color:var(--accent); font-size:26px; letter-spacing:-.15em; padding-right:4px; }
.header-search { flex:1; min-width:130px; max-width:420px; margin-left:auto; }
.sort-control { display:flex; flex-direction:column; gap:4px; }
.sort-control > span { color:var(--muted); font-size:9px; text-transform:uppercase; }
.sort-control select { min-width:100px; }
.header-actions { display:flex; gap:12px; align-items:center; margin-left:auto; }
.btn { display:inline-flex; align-items:center; justify-content:center; gap:8px; min-height:44px; padding:10px 14px; border:1px solid #58625c; font-size:12px; font-weight:700; text-decoration:none; cursor:pointer; }
.btn-primary { background:var(--accent); border-color:var(--accent); color:#101510; }
.btn-primary:hover { background:#adc487; }
.btn-secondary { background:var(--panel2); color:var(--ink); }
.btn-quiet { text-decoration:underline; }
.btn-danger { background:#683335; border-color:#b95d64; }
.profile-chip { min-height:44px; display:flex; align-items:center; gap:7px; font-size:11px; }
#profileMonogram { border:1px solid #5b675d; width:28px; height:28px; display:grid; place-items:center; }
#profileLabel { max-width:110px; overflow:hidden; text-overflow:ellipsis; }
.menu-button,.filter-toggle { width:44px; height:44px; display:flex; align-items:center; justify-content:center; gap:3px; padding:0; }
.filter-toggle { display:none; }
.forum-shell { display:grid; grid-template-columns:184px minmax(0,1fr) 236px; max-width:1920px; margin:auto; align-items:start; }
.left-panel,.right-panel { position:sticky; top:0; max-height:100dvh; overflow:auto; padding:22px 14px; background:#151719; }
.left-panel { border-right:2px solid #000; }
.right-panel { border-left:2px solid #000; padding:20px 16px; }
main { min-width:0; }
.nav-link { display:flex; align-items:center; gap:8px; min-height:44px; width:100%; padding:8px 0; font-weight:600; font-size:12px; text-align:left; }
.nav-link:first-of-type { color:var(--accent); }
.category-filters { padding:0; margin:25px 0 0; border:0; min-width:0; }
.category-filters legend,.eyebrow { font-size:10px; font-weight:700; text-transform:uppercase; letter-spacing:.1em; color:var(--muted); margin:0 0 12px; }
#categoryFilters { display:grid; gap:0; }
.category-filter { display:flex; align-items:flex-start; min-height:44px; padding:11px 0; gap:7px; cursor:pointer; border-bottom:1px solid #2d3234; font-size:11px; }
.category-filter input { appearance:none; display:grid; place-items:center; width:15px; height:15px; flex:none; margin:1px 0 0; border:1px solid #738074; background:#0e0f10; cursor:pointer; }
.category-filter input:checked { background:var(--accent); border-color:var(--accent); }
.category-filter input:checked::after { content:'✓'; color:#0a110a; font-size:12px; font-weight:bold; }
.category-filter .icon { width:15px; height:15px; color:var(--theme); margin-top:1px; }
.category-filter small { display:block; font-size:9px; line-height:1.5; color:var(--muted); margin-top:5px; }
.sidebar-note { margin-top:25px; padding-top:20px; border-top:1px solid #333a38; font-size:12px; }
.wall-toolbar { display:flex; justify-content:space-between; align-items:center; gap:8px; padding:14px 12px; min-height:49px; font-size:10px; text-transform:uppercase; letter-spacing:.06em; color:var(--muted); }
.wall-toolbar h1 { font:inherit; margin:0; }
.wall-toolbar b { font-weight:400; }
.live-dot { display:inline-block; width:7px; height:7px; background:#4d9b71; margin-right:7px; }
.poster-wall { columns:3; column-gap:0; padding-bottom:35px; }
.theme-question { --theme:#719ad2; --theme-bg:#294267; --theme-rgb:73,114,173; }
.theme-opinion { --theme:#bb80ad; --theme-bg:#623854; --theme-rgb:154,85,135; }
.theme-story { --theme:#b4a36b; --theme-bg:#595039; --theme-rgb:158,139,78; }
.theme-alert { --theme:#cb8177; --theme-bg:#713d3e; --theme-rgb:175,91,83; }
.theme-tip { --theme:#6fb4a1; --theme-bg:#2e5e54; --theme-rgb:66,143,125; }
.post-card { display:block; width:100%; break-inside:avoid; border:1px solid #000; margin:0; background:var(--panel); overflow:hidden; }
.tile-header { display:flex; align-items:center; justify-content:space-between; gap:4px; height:37px; padding:0 10px; border-top:4px solid var(--theme); border-bottom:2px solid #050505; background:linear-gradient(90deg,rgba(var(--theme-rgb),.22),#222426 72%); }
.category-name { display:flex; align-items:center; gap:5px; font-size:10px; font-weight:800; text-transform:uppercase; }
.category-name .icon { width:14px; height:14px; color:var(--theme); }
.tile-header time { font-size:9px; font-weight:600; color:#d2d4d0; white-space:nowrap; }
.tile-open { position:relative; display:block; width:100%; padding:0; text-align:left; }
.tile-open:hover { filter:brightness(1.08); }
.tile-open:focus-visible { position:relative; z-index:2; }
.poster-surface { position:relative; isolation:isolate; overflow:hidden; width:100%; aspect-ratio:1; container-type:inline-size; color:#fff; }
.poster-surface.with-image { aspect-ratio:1/1.12; }
.poster-photo { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; filter:contrast(1.02) saturate(.92) brightness(.94); }
.original-poster .poster-photo { object-fit:contain; filter:none; background:#101214; }
.with-image:not(.original-poster)::after { content:''; position:absolute; inset:0; z-index:0; background:linear-gradient(180deg,rgba(0,0,0,.04),transparent 29%,rgba(var(--theme-rgb),.08) 46%,rgba(var(--theme-rgb),.38) 62%,rgba(var(--theme-rgb),.70) 81%,rgba(var(--theme-rgb),.91)),linear-gradient(0deg,rgba(11,13,15,.29),transparent 53%); }
.without-image { background:linear-gradient(145deg,var(--theme-bg),#17191b 58%,#111315); }
.theme-question.without-image { background:linear-gradient(145deg,#344d69,#223347 56%,#12171d); }
.theme-opinion.without-image { background:linear-gradient(145deg,#63425b,#362738 60%,#141316); }
.theme-story.without-image { background:linear-gradient(135deg,#4c4431,#2f2b22 52%,#131415); }
.theme-alert.without-image { background:linear-gradient(145deg,#633c39,#402c2b 56%,#141315); }
.theme-tip.without-image { background:linear-gradient(145deg,#366355,#263f37 56%,#121516); }
.without-image::before { content:''; position:absolute; top:10%; right:-10%; width:72%; aspect-ratio:1; border:20px solid rgba(var(--theme-rgb),.20); transform:rotate(-23deg); z-index:-1; }
.without-image::after { content:''; position:absolute; inset:0; border-left:8px solid rgba(var(--theme-rgb),.72); pointer-events:none; }
.poster-motif { display:none; }
.poster-decor { position:absolute; top:12px; right:12px; width:42px; height:42px; z-index:1; display:grid; place-items:center; background:var(--theme-bg); border:2px solid var(--theme); }
.poster-decor .icon { width:24px; height:24px; }
.poster-text { position:absolute; z-index:1; bottom:0; left:0; right:0; padding:16px; display:flex; flex-direction:column; gap:10px; align-items:flex-start; }
.poster-text::before { content:''; display:block; width:54px; height:6px; background:var(--theme); flex:none; }
.poster-title { font-family:var(--font); font-size:clamp(18px,10.5cqw,38px); font-weight:800; line-height:1.06; letter-spacing:-.075em; text-transform:uppercase; overflow-wrap:anywhere; text-wrap:balance; text-shadow:0 3px 13px #000a; }
.poster-title.compact { font-size:clamp(16px,9.6cqw,34px); }
.poster-title.dense { font-size:clamp(13px,7.4cqw,29px); }
.without-image .poster-text,.placement-center .poster-text { bottom:auto; top:50%; transform:translateY(-50%); }
.without-image .poster-title { text-shadow:none; }
.placement-top .poster-text { top:55px; bottom:auto; transform:none; }
.placement-bottom .poster-text { top:auto; bottom:0; transform:none; }
.with-image.placement-top:not(.original-poster)::after { transform:rotate(180deg); }
.with-image.placement-center:not(.original-poster)::after { background:linear-gradient(0deg,rgba(var(--theme-rgb),.35),rgba(var(--theme-rgb),.85) 50%,rgba(var(--theme-rgb),.25)); }
.demo-tag { position:absolute; z-index:2; top:8px; left:8px; padding:3px 4px; font-size:7px; line-height:1.2; text-transform:uppercase; background:#111a1be6; color:#eee; }
.video-tile-badge,.video-preview-badge { position:absolute; z-index:3; left:10px; top:10px; padding:6px 8px; background:#0f1113e8; color:#fff; border:1px solid #fff; font-size:10px; }
.video-preview-badge { top:auto; bottom:10px; }
.video-preview-badge .icon { width:15px; height:15px; margin-right:5px; vertical-align:middle; }
.detail-video { display:block; width:100%; max-height:calc(100dvh - 120px); background:#000; }
.photo-field progress { width:100%; accent-color:var(--accent); }
.tile-actions { display:grid; grid-template-columns:48px 48px minmax(35px,1fr) minmax(35px,1fr); align-items:stretch; height:50px; border-top:2px solid #000; background:#16191b; }
.vote-btn { width:48px; height:48px; padding:0; }
.vote-btn .icon { width:100%; height:100%; display:block; }
.vote-btn:hover { filter:brightness(1.15); }
.vote-btn[aria-pressed=true] { outline:3px solid #fff; outline-offset:-5px; }
.vote-number { display:grid; place-items:center; border-inline:2px solid #000; background:#212529; font-weight:800; font-size:14px; letter-spacing:-.08em; font-variant-numeric:tabular-nums; }
.vote-number.negative { color:#d98a90; }
.comment-count { min-width:0; display:flex; gap:5px; align-items:center; justify-content:center; border-left:1px solid #000; padding:3px; font-size:12px; font-weight:700; }
.comment-count .icon { width:16px; height:16px; }
.comment-count:hover { background:#25292c; }
.activity-section { margin-bottom:25px; }
.activity-section h2 { display:flex; align-items:center; gap:8px; font-size:11px; text-transform:uppercase; color:var(--accent); margin:0 0 12px; }
.activity-section h2 .icon { width:16px; height:16px; }
.activity-item,.activity-comment { display:block; width:100%; text-align:left; padding:12px 0; border-bottom:1px solid #343938; }
.activity-item:hover,.activity-comment:hover { background:#202624; }
.activity-item small,.activity-comment small { display:block; font-size:9px; color:var(--muted); margin-bottom:6px; }
.activity-item small { color:var(--theme); }
.activity-item strong { display:block; font-size:12px; line-height:1.45; overflow-wrap:anywhere; font-weight:600; }
.activity-item > span { display:block; color:var(--muted); font-size:10px; margin-top:7px; }
.activity-comment > span { display:block; font-size:11px; line-height:1.55; overflow-wrap:anywhere; }
.activity-comment em { display:block; font-size:9px; font-style:normal; color:var(--muted); margin-top:6px; overflow-wrap:anywhere; }
.activity-totals { font-size:10px; color:var(--accent); border-top:1px solid #39413b; padding-top:16px; }
.activity-totals span { color:var(--muted); }
.empty-state { column-span:all; padding:45px 20px; text-align:center; }
.load-more { column-span:all; width:calc(100% - 24px); margin:18px 12px; }
.recovery-key { width:100%; min-width:0; padding:16px; border:2px solid var(--accent); background:var(--panel2); font-size:15px; }
.credential-row { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:8px; align-items:stretch; }
.credential-row button { min-width:72px; }
.recovery-actions { display:flex; gap:10px; flex-wrap:wrap; }
.policy-page { max-width:760px; margin:0 auto; padding:clamp(24px,6vw,80px) 20px; }
.policy-page h1 { font-size:clamp(28px,6vw,52px); letter-spacing:-.08em; }
.policy-page h2 { margin-top:35px; color:var(--accent); }
.policy-page li,.policy-page p { line-height:1.75; }
.area-picker { display:grid; grid-template-columns:1.2fr 1fr; gap:20px; }
.norway-map { width:100%; max-height:55dvh; border:1px solid var(--muted); background:var(--panel2); }
.norway-map path { fill:#879182; stroke:var(--line); stroke-width:1.5; cursor:pointer; }
.norway-map path[aria-pressed=true] { fill:var(--accent); }
.norway-map path:focus-visible { stroke:#fff; stroke-width:5; outline:none; }
.area-list { max-height:55dvh; overflow:auto; }
.area-list-item { width:100%; min-height:44px; display:flex; justify-content:space-between; align-items:center; border-bottom:1px solid var(--muted); text-align:left; }
.area-list-item[aria-pressed=true] { background:var(--accent); color:#101510; }
@media(max-width:699px) { .area-picker { grid-template-columns:1fr; } .norway-map { max-height:40dvh; } #areaButton { padding:5px; } }
.empty-state h2 { font-size:20px; }
.loading-card { padding:25px; }
.modal-open { overflow:hidden; }
.modal-overlay { position:fixed; inset:0; z-index:20; background:#000b; backdrop-filter:blur(6px); display:flex; align-items:center; justify-content:center; padding:24px; }
.modal-panel { background:#101214; border:2px solid #000; width:min(580px,100%); max-height:calc(100dvh - 48px); display:flex; flex-direction:column; box-shadow:0 25px 80px #000b; overflow:hidden; animation:enter-modal 180ms ease-out; }
@keyframes enter-modal { from { opacity:0; transform:translateY(10px) scale(.97); } to { opacity:1; transform:none; } }
.modal-panel.modal-refresh { animation:none; }
.modal-header,.modal-footer { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:14px 20px; background:#1e2022; flex-shrink:0; }
.modal-header { border-bottom:2px solid #000; }
.modal-footer { border-top:2px solid #000; }
.modal-header h2 { margin:0; font-size:20px; letter-spacing:-.06em; }
.modal-close { min-height:44px; min-width:44px; font-size:13px; text-transform:uppercase; white-space:nowrap; }
.modal-content { padding:22px; overflow:auto; overscroll-behavior:contain; min-height:0; }
.modal-content p { line-height:1.6; }
.detail-modal { width:min(1080px,100%); }
.detail-toolbar { display:flex; align-items:center; gap:12px; padding:8px 16px; border-bottom:2px solid #000; background:#1e2022; flex-shrink:0; }
.detail-toolbar .report-button { margin-left:auto; min-height:44px; font-size:11px; text-decoration:underline; color:var(--muted); }
.detail-modal .modal-content { padding:0; display:grid; grid-template-columns:1fr 1fr; align-items:start; }
.detail-poster { position:sticky; top:0; border-right:2px solid #000; }
.detail-copy { padding:0 24px 28px; min-width:0; }
.detail-copy .tile-actions { margin:0 -24px 20px; grid-template-columns:56px 56px 1fr 1fr; height:58px; }
.detail-copy .vote-btn { width:56px; height:56px; }
.detail-copy .vote-number { font-size:22px; }
.detail-meta { font-size:10px; text-transform:uppercase; color:var(--muted); overflow-wrap:anywhere; }
.detail-title { font-size:27px; letter-spacing:-.07em; line-height:1.12; overflow-wrap:anywhere; }
.detail-body { white-space:pre-wrap; overflow-wrap:anywhere; }
.detail-surface.original-poster { aspect-ratio:auto; min-height:100px; }
.detail-surface.original-poster .poster-photo { position:relative; display:block; height:auto; width:100%; }
.source-link { display:block; overflow-wrap:anywhere; font-size:12px; line-height:1.6; }
.text-button { display:inline-block; min-height:44px; padding:8px 0; text-decoration:underline; font-size:11px; text-underline-offset:3px; color:var(--accent); }
.variant-button { margin-top:12px; }
.discussion { border-top:2px solid #000; margin-top:24px; padding-top:18px; }
.discussion h2 { font-size:14px; text-transform:uppercase; color:var(--accent); }
.comment-unit { margin:14px 0; }
.comment-meta { font-size:10px; color:var(--muted); }
.comment-body { margin:7px 0 0; font-size:12px; white-space:pre-wrap; overflow-wrap:anywhere; }
.comment-replies { border-left:2px solid #58664e; padding-left:12px; }
.reply-button { min-height:44px; font-size:11px; padding:5px 0; color:var(--accent); }
.reply-context { display:flex; align-items:center; justify-content:space-between; gap:10px; padding:8px; background:#252c25; font-size:11px; }
.reply-context button { min-height:44px; }
.comment-entry { display:grid; gap:9px; margin-top:20px; }
.comment-entry label { font-size:12px; }
.comment-entry .btn { justify-self:end; }
.field { display:flex; flex-direction:column; gap:8px; margin:0; font-size:13px; }
.field > span { font-weight:600; }
input:not([type=radio]):not([type=checkbox]):not([type=range]):not([type=file]),textarea,select { width:100%; min-height:44px; padding:10px; border:1px solid #4e5953; background:#202528; color:var(--ink); font-size:14px; }
textarea { min-height:100px; resize:vertical; }
input[type=range] { width:100%; accent-color:var(--accent); min-height:30px; }
.form-stack { display:grid; gap:18px; }
.notice { background:#202724; padding:15px; font-size:12px; }
.muted-note { color:var(--muted); font-size:11px; line-height:1.5; }
.compose-modal { width:min(980px,100%); }
.composer { display:grid; grid-template-columns:1fr .85fr; gap:28px; align-items:start; }
.composer.flow-select,.composer.flow-edit.mode-text { display:block; max-width:720px; margin:auto; }
.compose-fields { display:grid; gap:22px; min-width:0; }
.category-picker,.post-type-picker,.media-workspace { border:0; padding:0; margin:0; min-width:0; }
.category-picker legend,.post-type-picker > legend { margin-bottom:10px; font-size:13px; font-weight:600; }
.post-type-choices { display:grid; grid-template-columns:repeat(auto-fit,minmax(96px,1fr)); gap:8px; }
.post-type-picker h3 { margin:4px 0 18px; font-size:21px; }
.flow-select .post-type-card { min-height:168px; justify-content:center; }
.flow-select .post-type-icon { width:52px; height:52px; }
.flow-select .post-type-icon .icon { width:31px; height:31px; }
.flow-select .post-type-card strong { font-size:14px; }
.post-type-choice { position:relative; cursor:pointer; min-width:0; }
.post-type-choice > input { position:absolute; inset:0; z-index:2; width:100%; height:100%; margin:0; opacity:0; cursor:pointer; }
.post-type-card { position:relative; min-height:124px; height:100%; display:flex; flex-direction:column; gap:7px; padding:12px; overflow:hidden; border:2px solid #434b47; background:#181d1d; }
.post-type-card::after { content:''; position:absolute; inset:auto -18px -24px auto; width:72px; height:72px; opacity:.25; transform:rotate(20deg); pointer-events:none; }
.mode-text .post-type-card { background:repeating-linear-gradient(0deg,#171c1c 0 12px,#202725 12px 13px); }
.mode-text .post-type-card::after { border:9px solid var(--accent); }
.mode-image .post-type-card { background:linear-gradient(145deg,#263b35 0 48%,#1a2220 48%); }
.mode-image .post-type-card::after { border-radius:50%; background:#8ba56e; }
.mode-video .post-type-card { background:repeating-linear-gradient(90deg,#251f2a 0 13px,#302737 13px 18px); }
.mode-video .post-type-card::after { border:7px dashed #c8a8d5; }
.post-type-icon { width:42px; height:42px; display:grid; place-items:center; border:2px solid currentColor; background:#101414; color:var(--accent); }
.mode-image .post-type-icon { color:#9fc78f; }
.mode-video .post-type-icon { color:#d4acd8; }
.post-type-icon .icon { width:25px; height:25px; }
.post-type-card strong { position:relative; z-index:1; font-size:12px; line-height:1.2; }
.post-type-card small { position:relative; z-index:1; color:var(--muted); font-size:9px; line-height:1.35; }
.post-type-choice > input:checked + .post-type-card { border-color:var(--accent); box-shadow:inset 0 -6px var(--accent),4px 4px 0 #000; }
.post-type-choice > input:checked + .post-type-card .post-type-icon { color:#111; background:var(--accent); border-color:var(--accent); }
.post-type-choice > input:focus-visible + .post-type-card { outline:3px solid var(--accent); outline-offset:2px; }
.category-choices { display:flex; flex-wrap:wrap; gap:0; }
.category-choice { cursor:pointer; position:relative; }
.category-choice input { position:absolute; opacity:0; width:1px; height:1px; }
.category-choice span { min-height:44px; display:flex; align-items:center; gap:5px; padding:8px 9px; border:1px solid #4a504c; font-size:11px; background:#171c1c; }
.category-choice b { font-size:17px; }
.category-choice input:checked + span { background:var(--theme-bg); border-color:var(--theme); color:#fff; box-shadow:inset 0 0 0 1px var(--theme); }
.category-choice input:focus-visible + span { outline:3px solid var(--accent); outline-offset:-3px; }
.media-workspace { position:relative; padding:16px; overflow:hidden; border:2px solid #4c6358; background:repeating-linear-gradient(135deg,#17201d 0 14px,#1b2722 14px 28px); }
.video-workspace { border-color:#725d78; background:repeating-linear-gradient(90deg,#1e1a22 0 18px,#26202b 18px 23px); }
.media-workspace > legend { display:flex; align-items:center; gap:8px; padding:0 7px; font-size:13px; font-weight:700; background:var(--panel); }
.media-workspace > legend span { display:grid; place-items:center; color:var(--accent); }
.video-workspace > legend span { color:#d4acd8; }
.media-workspace > legend .icon { width:22px; height:22px; }
.media-instruction { max-width:52ch; margin:0 0 14px; color:var(--muted); font-size:11px; line-height:1.5; }
.media-actions { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; align-items:stretch; }
.media-action { position:relative; min-height:72px; display:flex; align-items:center; gap:10px; padding:11px; border:2px solid #53635b; background:#141a18; color:var(--ink); text-align:left; cursor:pointer; }
.video-workspace .media-action { border-color:#6b586f; background:#19161c; }
.media-action:hover { border-color:var(--accent); }
.media-action:focus-visible,.media-action:focus-within { outline:3px solid var(--accent); outline-offset:2px; }
.media-action > .icon { width:30px; height:30px; flex:0 0 auto; color:var(--accent); }
.video-workspace .media-action > .icon { color:#d4acd8; }
.media-action span { display:flex; flex-direction:column; gap:3px; }
.media-action b { font-size:11px; }
.media-action small { color:var(--muted); font-size:8px; line-height:1.35; }
.media-action input { position:absolute; width:1px; height:1px; opacity:0; }
.media-status { min-height:20px; margin:12px 0 0; padding:7px 9px; background:rgba(0,0,0,.25); color:var(--muted); font-size:10px; overflow-wrap:anywhere; }
.media-workspace progress { width:100%; accent-color:var(--accent); }
.post-mode-note { display:flex; gap:12px; align-items:flex-start; margin:0; padding:13px; border-left:6px solid var(--accent); background:repeating-linear-gradient(0deg,#171c1c 0 12px,#202725 12px 13px); }
.post-mode-note b { white-space:nowrap; font-size:11px; }
.post-mode-note span { color:var(--muted); font-size:10px; line-height:1.5; }
.flow-back { justify-self:start; }
.primary-writing textarea { min-height:260px; padding:18px; font-size:18px; line-height:1.55; }
.picture-crop { padding:12px 14px; border:1px solid #53635b; background:#151b19; }
.picture-crop .field { margin:12px 0; }
.poster-upgrade { padding:14px; border:1px solid #53635b; background:repeating-linear-gradient(135deg,#17201d 0 14px,#1b2722 14px 28px); }
.poster-upgrade p { margin:0 0 8px; }
.poster-upgrade .media-actions { margin-top:12px; }
#photoFilename { overflow-wrap:anywhere; }
.compose-preview { position:sticky; top:0; min-width:0; }
#posterPreview { border:2px solid #000; overflow:hidden; }
details summary { min-height:44px; display:list-item; padding:12px 0; font-size:12px; cursor:pointer; }
.desktop-crop .field { margin:12px 0; }
.connection-details { margin-top:24px; }
.connection-details img { display:block; }
.account-summary { display:flex; align-items:center; gap:14px; padding:4px 0 18px; border-bottom:1px solid var(--line); }
.account-summary h3,.account-summary p { margin:0; }
.account-avatar { width:52px; height:52px; display:grid; place-items:center; flex:0 0 auto; border:2px solid var(--accent); background:var(--panel2); font-size:22px; font-weight:800; }
.account-actions { display:flex; gap:10px; flex-wrap:wrap; padding:18px 0; }
.account-login { margin-top:18px; }
.account-register { margin-top:24px; padding-top:18px; border-top:1px solid var(--line); }
.account-links { margin-top:24px; }
.admin-row { padding:12px 0; border-bottom:1px solid #38413b; }
.admin-actions { display:flex; gap:8px; flex-wrap:wrap; }
.toast-container { position:fixed; bottom:max(20px,env(safe-area-inset-bottom)); left:50%; transform:translateX(-50%); z-index:40; width:max-content; max-width:calc(100% - 32px); pointer-events:none; }
.toast { background:var(--accent); color:#0d160c; padding:14px 20px; border:2px solid #000; box-shadow:5px 5px 0 #000; font-size:12px; }
@media(min-width:1700px) { .poster-wall { columns:4; } }
@media(max-width:1279px) {
  .forum-shell { grid-template-columns:176px minmax(0,1fr); }
  .right-panel { display:none; }
  .masthead-inner { gap:16px; }
  #profileLabel { display:none; }
}
@media(max-width:899px) {
  .forum-shell { display:block; }
  .left-panel { display:none; position:static; max-height:none; padding:12px; border-bottom:2px solid #000; }
  .filters-open .left-panel { display:block; }
  .desktop-navigation,.category-filter small { display:none; }
  .category-filters { margin:0; }
  #categoryFilters { display:flex; flex-wrap:wrap; gap:0; }
  .category-filter { padding:10px 8px; border:1px solid #414845; align-items:center; }
  .category-filter .icon { margin:0; }
  .category-filters legend { margin-bottom:8px; }
  .filter-toggle { display:flex; }
  .poster-wall { columns:3; }
  .masthead-inner { gap:10px; }
  .header-search { max-width:230px; }
  .sort-control { display:none; }
}
@media(max-width:699px) {
  .utility-line,.header-search,.profile-chip,.create-label { display:none; }
  .masthead-inner { min-height:58px; padding:7px 10px; }
  .logo { font-size:26px; gap:8px; }
  .brand-mark { width:29px; height:29px; font-size:22px; }
  .header-actions { gap:4px; }
  .create-button { width:44px; padding:0; }
  .wall-toolbar { display:none; }
  .poster-wall { columns:2; }
  .tile-header { height:32px; padding:0 7px; }
  .category-name { font-size:9px; gap:4px; letter-spacing:-.03em; }
  .category-name .icon { width:12px; height:12px; }
  .tile-header time { font-size:9px; }
  .poster-text { padding:11px; gap:8px; }
  .poster-text::before { width:38px; height:5px; }
  .poster-decor { width:30px; height:30px; top:9px; right:9px; }
  .poster-decor .icon { width:17px; height:17px; }
  .poster-title { font-size:clamp(18px,10.5cqw,31px); }
  .poster-title.compact { font-size:clamp(16px,10cqw,27px); }
  .poster-title.dense { font-size:clamp(12px,7.3cqw,23px); }
  .tile-actions { grid-template-columns:44px 44px minmax(28px,1fr) minmax(30px,1fr); height:46px; }
  .vote-btn { width:44px; height:44px; }
  .vote-number { font-size:13px; }
  .comment-count { font-size:11px; gap:3px; }
  .comment-count .icon { width:13px; height:13px; }
  .demo-tag { font-size:6px; padding:2px 3px; top:6px; left:6px; }
  .modal-overlay { padding:10px; }
  .modal-panel { max-height:calc(100dvh - 20px); }
  .modal-header,.modal-footer { padding:10px 14px; }
  .modal-header h2 { font-size:17px; }
  .modal-content { padding:16px; }
  .detail-modal,.compose-modal { width:100%; height:100dvh; max-height:100dvh; border:0; }
  .modal-overlay:has(.detail-modal),.modal-overlay:has(.compose-modal) { padding:0; }
  .detail-toolbar { padding:calc(6px + env(safe-area-inset-top)) 12px 6px; gap:8px; }
  .detail-modal .modal-content { display:block; padding-bottom:env(safe-area-inset-bottom); }
  .detail-poster { position:static; border-right:0; }
  .detail-copy { padding:0 16px 24px; }
  .detail-copy .tile-actions { margin:0 -16px 18px; }
  .detail-copy .comment-count { font-size:14px; }
  .detail-title { font-size:24px; }
  .compose-modal .modal-header { padding-top:calc(8px + env(safe-area-inset-top)); }
  .compose-modal .modal-footer { padding-bottom:calc(10px + env(safe-area-inset-bottom)); }
  .composer { grid-template-columns:1fr; gap:24px; }
  .compose-preview { position:static; max-width:390px; width:100%; margin:auto; }
  .post-type-card { min-height:116px; padding:9px; }
  .post-type-icon { width:38px; height:38px; }
  .post-type-card strong { font-size:11px; }
  .post-type-card small { font-size:8px; }
  .media-workspace { padding:13px; }
  .media-actions { grid-template-columns:1fr; }
  .desktop-crop,.desktop-placement { display:none; }
  .compose-modal .modal-footer .muted-note { max-width:130px; }
  input:not([type=radio]):not([type=checkbox]):not([type=range]):not([type=file]),textarea,select { font-size:16px; }
}
@media(max-width:359px) {
  .poster-wall { columns:1; }
  .masthead-inner { padding-inline:8px; }
  .logo { font-size:23px; }
}
@media(prefers-reduced-motion:reduce) {
  *,*::before,*::after { animation:none!important; transition:none!important; scroll-behavior:auto!important; }
}

/* Display modes share the same wall, category selection and actions. */
.display-preferences { display:flex; justify-content:flex-end; align-items:center; gap:16px; padding:8px 20px; background:var(--panel); border-bottom:1px solid var(--line); }
.view-switch { display:flex; border:1px solid var(--muted); }
.display-preferences button { min-height:44px; padding:8px 14px; font-size:11px; }
.view-switch button[aria-pressed=true] { background:var(--accent); color:#101510; font-weight:700; }
#themeToggle { border:1px solid var(--muted); }
.simple-categories { display:none; }
.category-button { display:flex; align-items:center; justify-content:center; gap:10px; min-height:56px; padding:10px 18px; border:1px solid var(--muted); background:var(--panel); font-size:12px; }
.category-button .icon { width:26px; height:26px; color:var(--theme); }
.category-button[aria-pressed=true] { border-color:var(--theme); box-shadow:inset 0 -4px var(--theme); background:linear-gradient(rgba(var(--theme-rgb),.22),rgba(var(--theme-rgb),.22)),var(--panel); }
.category-button[aria-pressed=false] { color:var(--muted); }
.category-button:hover { outline:1px solid var(--theme); }
@media(min-width:900px) {
  [data-layout=simple] .forum-shell { display:block; max-width:1320px; padding:0 24px; }
  [data-layout=simple] .left-panel,[data-layout=simple] .right-panel { display:none; }
  [data-layout=simple] .simple-categories { display:flex; gap:8px; justify-content:center; flex-wrap:wrap; padding:18px 0 4px; }
  [data-layout=simple] .poster-wall { columns:3; column-gap:10px; }
  [data-layout=simple] .post-card { margin-bottom:10px; }
  [data-layout=simple] .wall-toolbar { padding-inline:0; }
  [data-layout=simple] .utility-line { display:none; }
}
@media(max-width:899px) { .display-preferences { display:none; } }

/* Light shell keeps the supplied poster artwork's own contrast and palette. */
:root[data-theme=light] { color-scheme:light; --paper:#f2f1eb; --panel:#fafaf6; --panel2:#e4e8df; --ink:#202724; --muted:#546058; --accent:#b5cb91; }
[data-theme=light] a,[data-theme=light] .text-button,[data-theme=light] .reply-button,[data-theme=light] .discussion h2,[data-theme=light] .activity-section h2,[data-theme=light] .activity-totals { color:#3d6028; }
[data-theme=light] .masthead,[data-theme=light] .left-panel,[data-theme=light] .right-panel,[data-theme=light] .modal-panel { background:var(--panel); }
[data-theme=light] .utility-line,[data-theme=light] .modal-header,[data-theme=light] .modal-footer,[data-theme=light] .detail-toolbar,[data-theme=light] .notice,[data-theme=light] .reply-context { background:var(--panel2); color:var(--ink); }
[data-theme=light] input:not([type=radio]):not([type=checkbox]):not([type=range]):not([type=file]),[data-theme=light] textarea,[data-theme=light] select { background:#fff; }
[data-theme=light] .category-choice span,[data-theme=light] .tile-actions,[data-theme=light] .vote-number { background:var(--panel2); }
[data-theme=light] .tile-header { background:linear-gradient(90deg,rgba(var(--theme-rgb),.28),#eceee8 72%); }
[data-theme=light] .tile-header time { color:var(--muted); }
[data-theme=light] .category-name .icon,[data-theme=light] .category-filter .icon,[data-theme=light] .category-button .icon { color:var(--theme-bg); }
[data-theme=light] .category-choice input:checked + span { background:var(--theme-bg); }
[data-theme=light] .activity-item:hover,[data-theme=light] .activity-comment:hover,[data-theme=light] .comment-count:hover { background:#e3e8dd; }
[data-theme=light] .activity-item small { color:var(--theme-bg); }
[data-theme=light] .vote-number.negative { color:#9e353d; }
[data-theme=light] .vote-btn[aria-pressed=true] { outline-color:#fff; }
[data-theme=light] .logo em,[data-theme=light] .brand-mark,[data-theme=light] .nav-link:first-of-type { color:#3d6028; }
