/* Southbag Social — house style.
   Follows the other Southbag products (Identity, Office, Branch Locator): a shadow on everything, grey outset buttons, inset inputs that lean slightly, ridge-bordered
   panels, a left sidebar of plain underlined links, a stretched logo, slow transitions.
   No icons, no emoji, no colour except the occasional Southbag blue.
   The font is the browser default.
   Media is never cropped or letterboxed: it is stretched to whatever box it is given. */

:root {
  --sb-blue: #3b87c6;          /* the Southbag blue, from the logo. Use sparingly. */
  --sb-ink: #171714;
  --sb-text: #171714;
  --sb-muted: #6c6a64;
  --sb-faint: #9a9892;
  --sb-bg: #efeee9;
  --sb-paper: #fbfaf6;
  --sb-panel: rgba(255, 255, 255, 0.8);
  --sb-hairline: #c7c5bd;
  --sb-bevel: #dddddd;
  --sb-ridge: #dddddd;
  --sb-button: #dcdbd6;         /* every button is this colour */
  --sb-button-hover: #d0cfca;
  --sb-button-text: #a3a19b;    /* on purpose: poor contrast, like the rest of Southbag */
  --sb-halo: 0 0 10px rgba(0, 0, 0, 0.35), inset 0 0 5px rgba(255, 255, 255, 0.3);
  --sb-halo-soft: 0 3px 12px rgba(0, 0, 0, 0.14);
  --sb-lift: 0 10px 20px rgba(0, 0, 0, 0.25), 0 15px 40px rgba(0, 0, 0, 0.2), inset 0 -2px 5px rgba(0, 0, 0, 0.15), inset 0 2px 5px rgba(255, 255, 255, 0.5);
  --sb-text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.27), 2px 2px 4px rgba(0, 0, 0, 0.12);
  --main-width: 640px;
  --aside-width: 280px;
  --nav-width: 220px;

  /* Older token names used by feature stylesheets, mapped onto the greyscale palette. */
  --sb-teal: var(--sb-button);
  --sb-teal-hover: var(--sb-button-hover);
  --sb-teal-dark: var(--sb-ink);
  --sb-link: var(--sb-ink);
  --sb-active: var(--sb-blue);
  --sb-paper-nav: #e4e2db;
  --sb-groove: #b5b2a8;
  --sb-inset: #dddddd;
  --sb-promo: #e4e2db;
  --sb-announce-bg: rgba(255, 255, 255, 0.65);
  --sb-announce-border: var(--sb-ridge);
  --sb-announce-card-border: var(--sb-ridge);
  --sb-alert-bg: #eeeeee;
  --sb-alert-border: #999999;
  --sb-recovery-bg: #f2f2f2;
  --sb-privacy-border: #111111;
  --sb-valid: var(--sb-ink);
  --sb-invalid: var(--sb-ink);
  --sb-error-red: var(--sb-ink);
  --sb-blue-dark: var(--sb-blue);
  --sb-blue-grad: var(--sb-blue);
  --sb-logo-gradient: #dddddd;
  --sb-chat-bg: #f2f1ec;
  --sb-chat-border: #cccccc;
  --sb-chat-ink: var(--sb-ink);
  --sb-chat-muted: var(--sb-muted);
  --sb-online: #999999;
  --sb-win-title: #555555;
  --sb-win-body: #f7f6f1;
  --sb-btn-shadow: var(--sb-lift);
  --sb-heading-shadow: var(--sb-text-shadow);
  --sb-pad: clamp(8px, 2vw, 16px);
  color-scheme: light;
}

:root[data-theme='dark'] {
  --sb-ink: #e6e4de;
  --sb-text: #e6e4de;
  --sb-muted: #a09e98;
  --sb-faint: #77756f;
  --sb-bg: #1b1b19;
  --sb-paper: #242421;
  --sb-panel: rgba(40, 40, 37, 0.85);
  --sb-hairline: #4a4944;
  --sb-bevel: #555555;
  --sb-ridge: #555555;
  --sb-button: #3a3a37;
  --sb-button-hover: #45453f;
  --sb-button-text: #6d6b66;
  --sb-paper-nav: #22221f;
  --sb-chat-bg: #20201d;
  --sb-halo: 0 0 10px rgba(0, 0, 0, 0.8);
  color-scheme: dark;
}

@keyframes ambient-text {
  0%, 100% { text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.27), 2px 2px 4px rgba(0, 0, 0, 0.12); }
  35% { text-shadow: 4px 2px 5px rgba(0, 0, 0, 0.25), -3px 3px 8px rgba(0, 0, 0, 0.15); }
  70% { text-shadow: -3px 4px 6px rgba(0, 0, 0, 0.2), 3px -2px 7px rgba(0, 0, 0, 0.18); }
}
@keyframes soft-shadow-wander {
  0%, 100% { box-shadow: 2px 5px 14px rgba(0, 0, 0, 0.16); }
  35% { box-shadow: 16px 5px 32px rgba(0, 0, 0, 0.28); }
  70% { box-shadow: -12px 16px 28px rgba(0, 0, 0, 0.22); }
}
@keyframes control-pulse {
  0%, 100% { background-color: #e2e1dc; }
  33% { background-color: #d2d1cc; }
  66% { background-color: #e8e7e2; }
}
@keyframes page-arrival { from { opacity: 0; } to { opacity: 1; } }
@keyframes dialog-arrival { from { transform: scale(0); } to { transform: scale(1); } }
@keyframes office-background {
  0%, 100% { background-color: #efeee9; }
  40% { background-color: #e3e2dd; }
  75% { background-color: #f5f5f2; }
}
@keyframes quiet-blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }
@keyframes spin { to { transform: rotate(360deg); } }

*, *::before, *::after { box-sizing: border-box; }
* { text-shadow: var(--sb-text-shadow); }
html { font-size: 16px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-width: 320px;
  width: 100vw;
  overflow-x: hidden;
  color: var(--sb-text);
  background: var(--sb-bg);
  line-height: 1.4;
  animation: office-background 34s linear infinite;
}
:root[data-theme='dark'] body { animation: none; }
/* The halo from Identity, on every block. */
div, section, article, header, nav, aside, main, footer, form, li, ul, ol, img, video, button, input, textarea, select, label, a.btn, a.btn-large, a.btn-small {
  box-shadow: var(--sb-halo);
}
.layout, .layout > main, .layout > aside, .row, .stack, .grow, .sentinel, .overlay, .track, .dots, svg { box-shadow: none; }

h1, h2, h3, h4 { font-weight: 700; line-height: 1; margin: 0 0 0.4em; animation: ambient-text 19s linear infinite; }
h1 { font-size: clamp(2rem, 6vw, 4rem); transform: rotate(-1deg); transform-origin: left; max-width: 16ch; }
h2 { font-size: clamp(1.4rem, 3.5vw, 2.1rem); }
h3 { font-size: 1.2rem; }
p { margin: 0.45rem 0; }
a { color: var(--sb-ink); text-decoration: underline; transition: color 2.7s linear, background-color 3.2s linear; }
a:hover { background: #e4e2db; font-weight: 700; }
:root[data-theme='dark'] a:hover { background: #33332f; }
img, video { max-width: 100%; object-fit: fill !important; }
button, input, textarea, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px dotted var(--sb-blue); outline-offset: 2px; }
label { display: inline-block; transform: skew(5deg) scale(1.02); transform-origin: left; }

/* Icons are gone. Any leftover icon element renders nothing. */
.icon, svg.icon { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--sb-muted); }
.faint { color: var(--sb-faint); }
.eyebrow { font-weight: 700; font-size: 0.6rem; line-height: 1.3; letter-spacing: 2px; text-transform: uppercase; color: var(--sb-muted); }
.fine, .tiny { font-size: 0.78rem; color: var(--sb-muted); overflow-wrap: anywhere; }
.row { display: flex; align-items: center; gap: 8px; }
.row.wrap { flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.stack { display: flex; flex-direction: column; gap: 10px; }
.grow { flex: 1; min-width: 0; }
.center { text-align: center; }
.hidden { display: none !important; }

/* ── Buttons: all the same grey, all hard to read ───────────────────── */
.btn, .btn-large, .btn-small, .icon-btn, button {
  display: inline-block;
  border: 2px outset var(--sb-bevel);
  border-radius: 0;
  background: var(--sb-button);
  color: var(--sb-button-text);
  padding: 0.35rem 0.7rem;
  font-size: 0.95rem;
  line-height: 1.2;
  text-decoration: none;
  text-align: center;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: var(--sb-lift);
  transition: background-color 1.6s linear, color 1.4s linear, box-shadow 2s linear;
  animation: control-pulse 11s linear infinite;
}
:root[data-theme='dark'] :is(.btn, .btn-large, .btn-small, .icon-btn, button) { animation: none; }
button:nth-of-type(2n), .btn:nth-of-type(2n) { animation-delay: -4s; animation-duration: 14s; }
button:nth-of-type(3n), .btn:nth-of-type(3n) { animation-delay: -8s; animation-duration: 17s; }
.btn:hover, .btn-large:hover, .btn-small:hover, .icon-btn:hover, button:hover {
  background: var(--sb-button-hover); color: var(--sb-button-text); text-decoration: none; font-weight: inherit; animation: none;
}
.btn:active, .btn-large:active, .btn-small:active, .icon-btn:active, button:active { border-style: inset; }
button:disabled, .btn:disabled, .btn-small:disabled, .btn-large:disabled { color: #c4c2bc; cursor: default; animation: none; }
.btn-large { font-size: 1.5rem; padding: 0.6rem 1.8rem; }
.btn-small { font-size: 0.8rem; padding: 0.2rem 0.5rem; }
/* The 3px button every Southbag product has. It grows on hover so it stays usable. */
.btn-tiny { font-size: 3px; padding: 2px 8px; transition: font-size 0.4s linear; }
.btn-tiny:hover, .btn-tiny:focus-visible { font-size: 11px; }
/* Variants collapse into the same grey. */
.btn.flat, .btn-small.flat, .btn.outline, .btn-small.outline, .btn.danger, .btn-small.danger, .btn.blue { background: var(--sb-button); color: var(--sb-button-text); }
.icon-btn { font-size: 0.85rem; padding: 0.2rem 0.5rem; }
.icon-btn.on, .icon-btn[aria-pressed='true'] { border-style: inset; color: var(--sb-ink); }

/* ── Forms ──────────────────────────────────────────────────────────── */
.field { display: block; margin: 0 0 14px; }
.field > span, .field-label { display: inline-block; font-weight: 700; margin-bottom: 4px; transform: skew(5deg) scale(1.05); transform-origin: left; }
.input, .textarea, .select, input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]), textarea, select {
  display: block; width: 100%; border: 2px inset var(--sb-bevel); border-radius: 0; background: #fff; color: #000;
  padding: 0.45rem; transform: skew(-1deg); outline: none;
}
:root[data-theme='dark'] :is(.input, .textarea, .select, input, textarea, select) { background: #151513; color: var(--sb-ink); }
.textarea, textarea { resize: vertical; min-height: 5rem; }
.boxed { }
.checkbox { display: flex; gap: 8px; align-items: flex-start; margin: 8px 0; cursor: pointer; }
.counter { font-size: 0.75rem; color: var(--sb-muted); }
.counter.over { color: var(--sb-ink); font-weight: 700; text-decoration: underline; }

/* ── Promotional strip ──────────────────────────────────────────────── */
.promo-strip {
  background: #e4e2db; color: var(--sb-ink); font-size: 0.8rem; text-align: center;
  padding: 4px 70px 4px 12px; position: relative; border-bottom: 1px solid #aaa89f; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.promo-strip a { color: var(--sb-blue); }
.promo-strip .promo-close { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); font-size: 0.7rem; padding: 0 6px; }
:root[data-theme='dark'] .promo-strip { background: #2a2a27; }

/* ── Header (Office) ────────────────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 18px; min-height: 76px;
  padding: 10px 20px; border-bottom: 1px solid #aaa89f; background: rgba(251, 250, 246, 0.94);
  animation: soft-shadow-wander 16s linear infinite;
}
:root[data-theme='dark'] .site-header { background: rgba(30, 30, 28, 0.95); }
.site-header .brand { display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; flex-shrink: 0; box-shadow: none; }
.site-header .brand:hover { background: none; }
/* The logo is stretched. It is always stretched. */
.site-header .brand img { width: 360px; height: 38px; object-fit: fill; display: block; }
.site-header .brand h2 { font-size: 1.4rem; margin: 0; letter-spacing: -1px; }
.site-header .search { flex: 1; max-width: 640px; margin: 0 auto; box-shadow: none; }
.site-header .search input { height: 42px; }
.site-header .account { display: flex; align-items: center; gap: 8px; flex-shrink: 0; box-shadow: none; }
@media (max-width: 900px) { .site-header .brand img { width: 230px; height: 32px; } }
@media (max-width: 640px) {
  .site-header { position: static; flex-wrap: wrap; gap: 8px; padding: 8px 10px; }
  .site-header .brand img { width: 78vw; height: 30px; }
  .site-header .brand h2 { display: none; }
  .site-header .search { order: 3; flex-basis: 100%; max-width: none; }
}

.welcome { display: none; }

/* ── Sidebar navigation (Identity) ─────────────────────────────────── */
.south-nav { border: 2px ridge var(--sb-ridge); background: var(--sb-panel); padding: 0.75rem; align-self: start; position: sticky; top: 96px; }
.south-nav .nav-title { font-size: 1.2rem; font-weight: 700; margin: 0 0 4px; }
.south-nav .nav-apps { margin-top: 14px; padding-top: 10px; border-top: 2px dashed #000; }
.south-nav .nav-hello { margin: 0 0 10px; }
.south-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.5rem; box-shadow: none; }
.south-nav li { box-shadow: none; }
.south-nav a { display: block; color: var(--sb-ink); text-decoration: underline; padding: 2px 4px; box-shadow: none; }
.south-nav a[aria-current='page'] { background: #dcdbd6; font-weight: 700; color: var(--sb-blue); }
:root[data-theme='dark'] .south-nav a[aria-current='page'] { background: #33332f; }
.south-nav .nav-footer { margin-top: 14px; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; box-shadow: none; }
.badge { font-weight: 700; color: var(--sb-blue); }
.badge::before { content: ' ('; } .badge::after { content: ')'; }
@media (max-width: 900px) {
  .south-nav { position: static; }
  .south-nav ul { flex-direction: row; flex-wrap: wrap; gap: 0.3rem 0.8rem; }
  .south-nav .nav-title, .south-nav .nav-hello, .south-nav .nav-footer { display: none; }
}
.bottom-bar { display: none !important; }

.chip { display: inline-block; padding: 0 6px; font-size: 0.75rem; border: 1px solid #999; background: transparent; color: var(--sb-muted); box-shadow: none; }
.chip.red, .chip.teal { color: var(--sb-blue); border-color: var(--sb-blue); }

/* ── Layout: sidebar, main, extras ─────────────────────────────────── */
.layout {
  display: grid; grid-template-columns: var(--nav-width) minmax(0, var(--main-width)) var(--aside-width); gap: 1rem;
  justify-content: center; align-items: start; padding: 1.3rem 1rem 60px; max-width: 1280px; margin: 0 auto;
  animation: page-arrival 1.4s linear both;
}
.layout > main { min-width: 0; }
.layout > aside { min-width: 0; }
.layout.wide { grid-template-columns: var(--nav-width) minmax(0, 1fr); }
.layout.wide > aside { display: none; }
.layout.full { grid-template-columns: minmax(0, 1fr); max-width: none; padding: 0; }
.layout.full > .south-nav, .layout.full > aside { display: none; }
@media (max-width: 1150px) {
  .layout { grid-template-columns: var(--nav-width) minmax(0, var(--main-width)); }
  .layout > aside { display: none; }
}
@media (max-width: 900px) {
  .layout, .layout.wide { grid-template-columns: minmax(0, 1fr); padding: 0.6rem 0.6rem 40px; }
}
.page-head { display: flex; align-items: center; gap: 10px; margin: 4px 0 14px; flex-wrap: wrap; box-shadow: none; }
.page-head h1, .page-head h2 { margin: 0; }
.page-head .spacer { flex: 1; box-shadow: none; }

/* ── Panels ─────────────────────────────────────────────────────────── */
.south-board { display: grid; gap: 1rem; box-shadow: none; }
.south-card, .bad-panel, .bad-card {
  border: 2px ridge var(--sb-ridge); background: var(--sb-panel); padding: 0.75rem; margin: 0 0 1rem;
}
.south-board > .south-card { margin: 0; }
.south-board > .south-card:nth-child(3n + 2) { transform: rotate(-0.4deg); }
.south-board > .south-card:nth-child(5n) { transform: rotate(0.3deg); }
.south-card.flat { transform: none; }
.south-card h2 { font-size: 1.5rem; }
.divider { border: 0; border-top: 2px dashed #000; margin: 12px 0; }
:root[data-theme='dark'] .divider { border-top-color: #777; }
.announcement-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 0.85rem; padding: 0.75rem; border: 2px ridge var(--sb-ridge); background: var(--sb-panel); margin: 0 0 1rem; }
.announcement-grid > h2, .announcement-grid > h3 { grid-column: 1 / -1; margin: 0; }
.announcement-card { padding: 0.7rem; border: 2px dashed #000; background: rgba(255, 255, 255, 0.7); }
:root[data-theme='dark'] .announcement-card { border-color: #666; background: rgba(0, 0, 0, 0.2); }
.announcement-card h3 { font-size: 1.05rem; margin-bottom: 4px; }
.announcement-card p { margin: 0 0 6px; font-size: 0.9rem; }
aside .announcement-grid { grid-template-columns: 1fr; }
aside .sticky { position: sticky; top: 96px; box-shadow: none; }
.tile-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; box-shadow: none; }
.south-item { border: 2px inset var(--sb-bevel); padding: 6px; background: var(--sb-paper); min-width: 0; }
.south-item strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ── People ─────────────────────────────────────────────────────────── */
.avatar { --size: 44px; width: var(--size); height: var(--size); flex-shrink: 0; display: inline-block; position: relative; border: 1px solid #111; background: #ddd; overflow: hidden; }
.avatar img { width: 100%; height: 100%; display: block; box-shadow: none; }
.avatar .initial { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; color: #111; font-weight: 700; font-size: calc(var(--size) * 0.55); box-shadow: none; }
.avatar.round { border-radius: 50%; }
.avatar.xs { --size: 24px; } .avatar.sm { --size: 32px; } .avatar.lg { --size: 72px; } .avatar.xl { --size: 120px; }
.avatar.story-ring { outline: 3px double var(--sb-blue); outline-offset: 2px; }
.avatar.story-ring.seen { outline-color: #999; }
.user-name { display: inline-flex; align-items: baseline; gap: 4px; min-width: 0; flex-wrap: wrap; box-shadow: none; }
.user-name .name { font-weight: 700; color: var(--sb-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.user-name .handle { color: var(--sb-muted); font-size: 0.9em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.verified { color: var(--sb-blue); font-size: 0.75em; font-weight: 700; }
.user-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; box-shadow: none; }
.user-row + .user-row { border-top: 1px dashed #999; }
.user-row .bio { font-size: 0.85rem; color: var(--sb-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ── Posts ──────────────────────────────────────────────────────────── */
.post { position: relative; }
.post-context { color: var(--sb-muted); font-size: 0.85rem; margin: 0 0 6px; box-shadow: none; }
.post-context a { color: inherit; font-weight: 700; }
.post-head { display: flex; gap: 10px; align-items: flex-start; box-shadow: none; }
.post-head .meta { flex: 1; min-width: 0; line-height: 1.25; box-shadow: none; }
.post-head .meta .sub { color: var(--sb-muted); font-size: 0.85rem; display: flex; gap: 6px; flex-wrap: wrap; box-shadow: none; }
.post-head .meta .sub a { color: inherit; }
.post-body { margin: 8px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 1.08rem; box-shadow: none; }
.post-body a { color: var(--sb-blue); }
.post-title { font-size: 1.3rem; margin: 8px 0 0; }
.post-media { margin-top: 10px; box-shadow: none; }
.post-actions { display: flex; gap: 6px; margin: 10px 0 0; flex-wrap: wrap; align-items: center; box-shadow: none; }
.post-actions .spacer { flex: 1; box-shadow: none; }
.post .deleted { color: var(--sb-muted); font-style: italic; }
.post.compact { padding: 0.6rem; }
.post .sponsored-tag { font-size: 0.7rem; border: 1px solid #999; padding: 0 4px; }
.quote { border: 2px inset var(--sb-bevel); padding: 8px 10px; margin-top: 10px; background: var(--sb-paper); cursor: pointer; }
.reaction-summary { font-size: 0.8rem; color: var(--sb-muted); box-shadow: none; }
.reaction-picker { position: absolute; z-index: 40; bottom: calc(100% + 4px); left: 0; display: flex; gap: 2px; padding: 4px; background: #fff; border: 3px ridge #ccc; }
:root[data-theme='dark'] .reaction-picker { background: #222; }
.reaction-picker button { font-size: 0.8rem; padding: 2px 6px; }
.thread-line { border-left: 2px dashed #000; margin-left: 20px; padding-left: 12px; box-shadow: none; }

/* Media: every box has a fixed shape and the file is stretched into it. */
.media-grid { display: grid; gap: 4px; background: #000; aspect-ratio: 16 / 9; }
.media-grid.n1 { grid-template-columns: 1fr; }
.media-grid.n2, .media-grid.n4 { grid-template-columns: 1fr 1fr; }
.media-grid.n3 { grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; }
.media-grid.n3 > :first-child { grid-row: span 2; }
.media-grid img { width: 100%; height: 100%; min-height: 0; display: block; cursor: zoom-in; }
.carousel { position: relative; background: #000; overflow: hidden; aspect-ratio: 1; }
.carousel .track { display: flex; height: 100%; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.carousel .track::-webkit-scrollbar { display: none; }
.carousel .track > * { flex: 0 0 100%; width: 100%; height: 100% !important; scroll-snap-align: center; }
.carousel .nav-btn { position: absolute; top: 50%; transform: translateY(-50%); font-size: 0.75rem; }
.carousel .nav-btn.prev { left: 8px; } .carousel .nav-btn.next { right: 8px; }
.carousel .dots { position: absolute; bottom: 6px; left: 0; right: 0; text-align: center; color: #fff; font-size: 0.75rem; pointer-events: none; }
.video-wrap { position: relative; background: #000; aspect-ratio: 16 / 9; }
.video-wrap video { display: block; width: 100%; height: 100%; }
.video-thumb { position: relative; display: block; background: #000; aspect-ratio: 16 / 9; overflow: hidden; }
.video-thumb:hover { background: #000; }
.video-thumb img, .video-thumb video { width: 100%; height: 100%; display: block; }
.video-thumb.vertical { aspect-ratio: 9 / 16; }
.video-thumb .duration { position: absolute; right: 4px; bottom: 4px; background: #fff; color: #000; font-size: 0.75rem; padding: 0 4px; }
.video-thumb .play { position: absolute; left: 4px; bottom: 4px; background: #fff; color: #000; font-size: 0.75rem; padding: 0 4px; }

/* ── Composer ───────────────────────────────────────────────────────── */
.composer { display: flex; gap: 10px; box-shadow: none; }
.composer .grow textarea { display: block; width: 100%; resize: none; min-height: 3.2rem; font-size: 1.05rem; }
.composer .tools { display: flex; align-items: center; gap: 6px; margin-top: 8px; flex-wrap: wrap; box-shadow: none; }
.composer .tools .spacer { flex: 1; box-shadow: none; }
.composer .tools select { width: auto; }
.attachments { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; box-shadow: none; }
.attachment { position: relative; width: 96px; height: 96px; border: 2px inset var(--sb-bevel); background: #000; }
.attachment img, .attachment video { width: 100%; height: 100%; display: block; }
.attachment .remove { position: absolute; top: 2px; right: 2px; font-size: 0.65rem; padding: 0 4px; }
.attachment .progress { position: absolute; left: 0; bottom: 0; height: 4px; background: var(--sb-blue); }
.attachment.error { outline: 2px dashed #000; }
.progress-bar { height: 8px; border: 1px inset #ccc; background: #eee; }
.progress-bar > div { height: 100%; width: 0; background: var(--sb-blue); transition: width 1.2s linear; }

/* ── Tabs ───────────────────────────────────────────────────────────── */
.tabs { display: flex; gap: 0.8rem; flex-wrap: wrap; margin: 0 0 14px; padding: 0 0 6px; border-bottom: 2px dashed #000; box-shadow: none; }
:root[data-theme='dark'] .tabs { border-bottom-color: #666; }
.tabs a, .tabs button { background: none; border: 0; box-shadow: none; animation: none; padding: 2px 4px; color: var(--sb-ink); text-decoration: underline; font-size: 1rem; }
.tabs a[aria-current='page'], .tabs button[aria-selected='true'] { background: #dcdbd6; font-weight: 700; color: var(--sb-blue); }

/* ── States ─────────────────────────────────────────────────────────── */
.empty { padding: 36px 16px; text-align: center; font-size: 0.8rem; color: var(--sb-muted); }
.empty p { margin: 4px 0; }
.loading { padding: 24px; text-align: center; font-size: 0.8rem; color: var(--sb-muted); animation: quiet-blink 2.4s linear infinite; box-shadow: none; }
.spinner { display: none; }
.error-box { border: 4px double #111; background: #eee; padding: 10px 12px; margin: 0 0 14px; }
:root[data-theme='dark'] .error-box { background: #2a2a27; border-color: #999; }
.notice { border: 4px double #111; background: #f5f5f3; padding: 12px 14px; margin: 0 0 16px; }
:root[data-theme='dark'] .notice { background: #2a2a27; border-color: #999; }
.sentinel { height: 1px; }

/* ── Dialogs (Office) ───────────────────────────────────────────────── */
.overlay { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: 24px; background: rgba(28, 28, 26, 0.38); }
.dialog { width: min(440px, 100%); max-height: calc(100vh - 48px); display: flex; flex-direction: column; background: #f7f6f1; box-shadow: 0 18px 48px rgba(0, 0, 0, 0.26); animation: dialog-arrival 1.6s linear both; }
:root[data-theme='dark'] .dialog { background: #262623; }
.dialog.wide { width: min(720px, 100%); }
.dialog .titlebar { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 16px 20px 0; box-shadow: none; }
.dialog .titlebar img { width: 180px; height: 34px; }
.dialog .titlebar button { font-size: 0.7rem; }
.dialog .dialog-title { margin: 12px 20px 0; font-size: 1.6rem; }
.dialog .body { padding: 10px 20px; overflow: auto; box-shadow: none; }
.dialog .actions { display: flex; justify-content: flex-end; gap: 9px; padding: 10px 20px 20px; flex-wrap: wrap; box-shadow: none; }
.dialog .retro-btn { min-width: 90px; }
.lightbox { background: rgba(0, 0, 0, 0.9); }
.lightbox img { width: 90vw; height: 80vh; }
.lightbox .close { position: fixed; top: 12px; right: 12px; }


.menu { position: absolute; z-index: 50; min-width: 170px; padding: 5px; background: #fff; border: 3px ridge #ccc; display: flex; flex-direction: column; gap: 4px; animation: dialog-arrival 0.9s linear both; transform-origin: top right; }
:root[data-theme='dark'] .menu { background: #222; }
.menu button, .menu a { width: 100%; text-align: left; padding: 7px 10px; font-size: 0.9rem; }
.menu a { border: 2px outset var(--sb-bevel); background: var(--sb-button); color: var(--sb-button-text); text-decoration: none; }
.menu hr { border: 0; border-top: 1px dashed #999; margin: 2px 0; width: 100%; }

/* ── Landing and footer ─────────────────────────────────────────────── */
.landing { max-width: 1000px; margin: 0 auto; padding: 1.3rem 1rem 60px; animation: page-arrival 1.4s linear both; }
.landing .hero-logo { margin: 0.5rem 0 1.5rem; box-shadow: none; }
.landing .hero-logo img { width: 112%; max-width: none; height: 120px; display: block; }
.landing h1.hero { font-size: clamp(3rem, 11vw, 7rem); line-height: 0.9; }
.landing .cta { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin: 1.5rem 0; box-shadow: none; }
.site-footer { padding: 16px 20px 40px; font-size: 0.8rem; color: var(--sb-muted); box-shadow: none; }
.site-footer .inner { max-width: 1000px; margin: 0 auto; display: flex; flex-wrap: wrap; gap: 6px 16px; box-shadow: none; }
.site-footer a { color: var(--sb-muted); }
aside .site-footer { padding: 8px 0; }
aside .site-footer .inner { display: flex; }

.gag-darkmode body { background: #000; }
.gag-darkmode h1, .gag-darkmode h2 { color: #000; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ── Polls and pinned posts (components/poll.js, components/pinned.js) ── */
.poll { margin: 10px 0 0; padding: 8px 10px; border: 2px inset var(--sb-bevel); background: var(--sb-paper); cursor: default; }
.poll.busy { opacity: 0.6; }
.poll-choices, .poll-results { display: flex; flex-direction: column; gap: 8px; box-shadow: none; }
.poll-choice { display: block; width: 100%; text-align: left; white-space: normal; overflow-wrap: anywhere; }
.poll-check { margin: 0; }
.poll-submit { margin-top: 8px; box-shadow: none; }
.poll-result { box-shadow: none; }
.poll-result-head { display: flex; justify-content: space-between; gap: 10px; box-shadow: none; }
.poll-label { overflow-wrap: anywhere; }
.poll-result.leading .poll-label { font-weight: 700; }
.poll-yours { color: var(--sb-muted); font-size: 0.85rem; }
.poll-pct { font-weight: 700; flex-shrink: 0; }
.poll-track { height: 12px; margin: 3px 0 2px; border: 1px inset #ccc; background: #e4e2db; box-shadow: none; }
:root[data-theme='dark'] .poll-track { background: #33332f; border-color: #555; }
.poll-fill { height: 100%; background: var(--sb-blue); box-shadow: none; transition: width 1.2s linear; }
.poll-count { font-size: 0.78rem; color: var(--sb-muted); box-shadow: none; }
.poll-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin-top: 8px; font-size: 0.8rem; color: var(--sb-muted); box-shadow: none; }
.poll-summary { margin-top: 6px; }
.poll-editor { margin-top: 8px; padding: 8px 10px; border: 1px dashed #999; box-shadow: none; }
.poll-editor-options { display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; box-shadow: none; }
.poll-editor-option { display: flex; gap: 6px; align-items: center; box-shadow: none; }
.poll-editor-option input { flex: 1; min-width: 0; }
.poll-editor-settings { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; margin-top: 8px; box-shadow: none; }
.poll-editor-length { display: flex; align-items: center; gap: 6px; }
.poll-editor-length select { width: auto; }
.poll-editor .checkbox { margin: 0; align-items: center; }
.pinned-slot { box-shadow: none; }
.pinned-post { margin: 0 0 1rem; box-shadow: none; }
.pinned-label { margin: 0 0 6px; padding: 2px 4px; font-size: 0.8rem; font-weight: 700; color: var(--sb-muted); box-shadow: none; }
