/* The Wall - styles.
 *
 * PALETTES. Each palette is one dark block and one light block keyed on
 * data-palette and data-mode. data-mode is resolved before first paint by
 * app/boot.js (System follows the OS), so there is one light definition per
 * palette instead of a copy inside a media query. tools/check-contrast.mjs
 * reads these blocks and checks every text and control pair against WCAG AA;
 * keep each token on its own line in the form `--name: #rrggbb;`.
 */

:root,
:root[data-palette="midnight"] {
  color-scheme: dark;
  --bg: #101720;
  --panel: #1d2939;
  --raised: #182231;
  --text: #f8fafc;
  --muted: #b6c5d5;
  --line: #34485f;
  --control: #6683a3;
  --accent: #38bdf8;
  --accent-ink: #06243a;
  --focus: #facc15;
  --danger: #fda4af;
}
:root[data-palette="midnight"][data-mode="light"] {
  color-scheme: light;
  --bg: #f1f5f9;
  --panel: #ffffff;
  --raised: #ffffff;
  --text: #132236;
  --muted: #4b6077;
  --line: #d3dce6;
  --control: #7b8ea4;
  --accent: #0369a1;
  --accent-ink: #ffffff;
  --focus: #b45309;
  --danger: #be123c;
}
:root[data-palette="terminal"] {
  color-scheme: dark;
  --bg: #16191b;
  --panel: #292d30;
  --raised: #212528;
  --text: #f7faf0;
  --muted: #c3cbb6;
  --line: #444c47;
  --control: #7a857c;
  --accent: #a3e635;
  --accent-ink: #182507;
  --focus: #38bdf8;
  --danger: #fda4af;
}
:root[data-palette="terminal"][data-mode="light"] {
  color-scheme: light;
  --bg: #f4f7ee;
  --panel: #ffffff;
  --raised: #ffffff;
  --text: #1d261d;
  --muted: #526050;
  --line: #d5dccf;
  --control: #7f8c7b;
  --accent: #3f6212;
  --accent-ink: #ffffff;
  --focus: #0369a1;
  --danger: #be123c;
}
:root[data-palette="arcade"] {
  color-scheme: dark;
  --bg: #1c1830;
  --panel: #332c50;
  --raised: #2a2443;
  --text: #faf7ff;
  --muted: #d0c8e3;
  --line: #4d4470;
  --control: #8679b3;
  --accent: #a78bfa;
  --accent-ink: #21184a;
  --focus: #facc15;
  --danger: #fda4af;
}
:root[data-palette="arcade"][data-mode="light"] {
  color-scheme: light;
  --bg: #f6f3ff;
  --panel: #ffffff;
  --raised: #ffffff;
  --text: #2d2543;
  --muted: #625978;
  --line: #dcd5ec;
  --control: #8f84ad;
  --accent: #6d28d9;
  --accent-ink: #ffffff;
  --focus: #b45309;
  --danger: #be123c;
}
/* BBS: Whittle's amber phosphor ramp (bg #0a0705, amber #ffb000, frame
 * #7a5210, danger #ff6a3a, cyan #7fe3d0), monospace, faint scanlines. The
 * light variant is the same ramp printed on paper. */
:root[data-palette="bbs"] {
  color-scheme: dark;
  --bg: #0a0705;
  --panel: #150e08;
  --raised: #110b06;
  --text: #fff0d6;
  --muted: #e1952d;
  --line: #4a3208;
  --control: #9a6a1c;
  --accent: #ffb000;
  --accent-ink: #0a0705;
  --focus: #7fe3d0;
  --danger: #ff6a3a;
}
:root[data-palette="bbs"][data-mode="light"] {
  color-scheme: light;
  --bg: #fbf4e6;
  --panel: #fffaf0;
  --raised: #fffaf0;
  --text: #2b1a03;
  --muted: #6b4708;
  --line: #e5d3ae;
  --control: #a8844a;
  --accent: #8a4f00;
  --accent-ink: #fffaf0;
  --focus: #0f766e;
  --danger: #b3361a;
}

:root {
  --font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: ui-monospace, "JetBrains Mono", "Cascadia Mono", Consolas, Menlo, monospace;
  --container: 1280px;
  --sidebar: 336px;
  --radius: 0;
  --message-size: 1.25rem;
  --glow: none;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
}
:root[data-palette="bbs"] {
  --font: var(--font-mono);
  --message-size: 1.125rem;
  --glow: 0 0 6px rgba(255, 176, 0, 0.28);
}
:root[data-palette="bbs"][data-mode="light"] { --glow: none; }

/* ---------------------------------------------------------------- base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; min-width: 320px; background: var(--bg); color: var(--text); line-height: 1.5; }
h1, h2, h3, p { margin: 0; }
button, input, textarea, select { font: inherit; color: inherit; }
a { color: var(--accent); }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
::placeholder { color: var(--muted); opacity: 0.8; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
  position: absolute; left: 1rem; top: -4rem; z-index: 50; padding: 0.6rem 0.9rem;
  background: var(--accent); color: var(--accent-ink); font-weight: 800; text-decoration: none;
}
.skip:focus { top: 1rem; }

:root[data-palette="bbs"] body { text-shadow: var(--glow); }
:root[data-palette="bbs"]:not([data-mode="light"]) body::after {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 100;
  background: repeating-linear-gradient(to bottom, transparent 0, transparent 2px, rgba(0, 0, 0, 0.16) 3px);
}

.page { width: min(var(--container), calc(100% - 2.5rem)); margin-inline: auto; }

/* ---------------------------------------------------------------- buttons */
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: 2.5rem; padding: 0.55rem 1rem; border: 1px solid var(--accent); border-radius: var(--radius);
  background: var(--accent); color: var(--accent-ink); font-weight: 800; cursor: pointer; text-decoration: none;
  text-shadow: none;
}
.button:hover:not(:disabled) { filter: brightness(1.08); }
.button:disabled { cursor: not-allowed; opacity: 0.55; }
.button.secondary { background: transparent; color: var(--text); border-color: var(--control); }
.button.secondary:hover:not(:disabled) { border-color: var(--accent); filter: none; }
.button.danger { background: transparent; color: var(--danger); border-color: var(--danger); }
.button.block { width: 100%; }
.button.small { min-height: 2rem; padding: 0.3rem 0.7rem; font-size: 0.85rem; }
.text-button {
  padding: 0.25rem 0.1rem; border: 0; background: none; color: var(--accent); cursor: pointer;
  font-weight: 700; text-decoration: underline; text-underline-offset: 3px;
}
.icon-button {
  display: inline-grid; place-items: center; width: 2.25rem; height: 2.25rem; padding: 0;
  border: 1px solid transparent; background: transparent; color: var(--muted); cursor: pointer;
}
.icon-button:hover { border-color: var(--control); color: var(--text); }
.icon-button svg { width: 1.25rem; height: 1.25rem; }
.discord-mark { width: 1.2rem; height: 1.2rem; flex: none; }


/* ---------------------------------------------------------------- header */
.site-header {
  display: flex; align-items: center; gap: 1rem; min-height: 4.75rem; border-bottom: 1px solid var(--line);
}
.brand { display: inline-flex; align-items: center; gap: 0.8rem; color: var(--text); text-decoration: none; min-width: 0; }
.brand-mark { width: 2.75rem; height: 2.75rem; flex: none; color: var(--accent); }
.brand-text { display: grid; line-height: 1.1; }
.brand-name { font-size: 1.55rem; font-weight: 900; letter-spacing: -0.04em; white-space: nowrap; }
.brand-sub { margin-top: 0.2rem; color: var(--muted); font-size: 0.7rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
:root[data-palette="bbs"] .brand-name { letter-spacing: 0.02em; text-transform: uppercase; }
.header-actions { display: flex; align-items: center; gap: 0.6rem; margin-left: auto; }
.header-link { padding: 0.4rem 0.5rem; border: 0; background: none; color: var(--muted); cursor: pointer; font-weight: 700; font-size: 0.9rem; }
.header-link:hover { color: var(--text); }

/* ---------------------------------------------------------------- popovers */
.pop { position: relative; }
.pop-panel {
  position: absolute; z-index: 40; right: 0; top: calc(100% + 0.4rem); min-width: 15rem; padding: 0.75rem;
  border: 1px solid var(--line); background: var(--panel); box-shadow: 0 18px 44px rgb(0 0 0 / 0.32);
}
.pop-panel label { display: grid; gap: 0.35rem; color: var(--muted); font-size: 0.82rem; font-weight: 700; }
.pop-panel label + label { margin-top: 0.75rem; }
.pop-menu { display: grid; gap: 0.15rem; min-width: 12.5rem; padding: 0.35rem; }
.pop-menu .who { padding: 0.45rem 0.6rem 0.55rem; border-bottom: 1px solid var(--line); margin-bottom: 0.25rem; color: var(--muted); font-size: 0.82rem; }
.pop-menu .who strong { display: block; color: var(--text); font-size: 0.95rem; }
.pop-menu button {
  display: flex; width: 100%; padding: 0.5rem 0.6rem; border: 0; background: none; color: var(--text);
  cursor: pointer; text-align: left; font-size: 0.9rem;
}
.pop-menu button:hover { background: var(--raised); }
.pop-menu button.danger { color: var(--danger); }
.account-button {
  display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.25rem 0.55rem 0.25rem 0.25rem;
  border: 1px solid var(--control); background: transparent; color: var(--text); cursor: pointer; font-weight: 700;
}
.account-button .avatar { width: 2rem; height: 2rem; }
.account-button .label { max-width: 11rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

select, input[type="text"], input[type="email"], input[type="url"], input[type="search"], input:not([type]), textarea {
  width: 100%; padding: 0.6rem 0.7rem; border: 1px solid var(--control); border-radius: var(--radius);
  background: var(--bg); color: var(--text);
}
textarea { resize: vertical; line-height: 1.45; }
[aria-invalid="true"] { border-color: var(--danger) !important; }

/* ---------------------------------------------------------------- hero */
.hero { padding: 1.75rem 0 1.25rem; }
.eyebrow { color: var(--accent); text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.75rem; font-weight: 800; }
h1 { margin-top: 0.35rem; font-size: clamp(1.85rem, 3.1vw, 2.6rem); line-height: 1.05; letter-spacing: -0.045em; }
:root[data-palette="bbs"] h1 { letter-spacing: -0.01em; }
.intro { margin-top: 0.6rem; max-width: 50rem; color: var(--muted); font-size: 1.05rem; }

/* ---------------------------------------------------------------- layout */
.layout { display: grid; gap: 1.5rem; align-items: start; padding-bottom: 3rem; }
@media (min-width: 980px) {
  .layout { grid-template-columns: var(--sidebar) minmax(0, 1fr); }
  .sidebar { position: sticky; top: 1rem; }
}
.sidebar { display: grid; gap: 1rem; }
.panel { padding: 1.25rem; border: 1px solid var(--line); background: var(--panel); }
.panel h2 { font-size: 1.2rem; letter-spacing: -0.02em; }
.panel-copy { margin-top: 0.35rem; color: var(--muted); font-size: 0.9rem; }
.stack { display: grid; gap: 0.75rem; margin-top: 1rem; }
.field { display: grid; gap: 0.35rem; }
.field > label, .field-label { color: var(--muted); font-size: 0.85rem; font-weight: 700; }
.hint { color: var(--muted); font-size: 0.8rem; }
.error-text { color: var(--danger); font-size: 0.85rem; font-weight: 700; }
.divider { display: flex; align-items: center; gap: 0.75rem; color: var(--muted); font-size: 0.8rem; }
.divider::before, .divider::after { content: ""; flex: 1; border-top: 1px solid var(--line); }

/* composer */
.composer-who { display: flex; align-items: center; gap: 0.65rem; margin-bottom: 0.85rem; }
.composer-who .avatar { width: 2.5rem; height: 2.5rem; }
.composer-who strong { display: block; font-size: 1rem; }
.composer-who span { color: var(--muted); font-size: 0.8rem; }
.composer textarea { min-height: 7.5rem; font-size: 1.08rem; }
.composer-foot { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; margin-top: 0.7rem; }
.count { color: var(--muted); font-size: 0.85rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.count.near { color: var(--accent); font-weight: 700; }
.count.over { color: var(--danger); font-weight: 800; }
.quota { display: flex; align-items: center; gap: 0.6rem; margin-top: 0.9rem; padding-top: 0.8rem; border-top: 1px dashed var(--line); font-size: 0.85rem; }
.pips { display: inline-flex; gap: 0.25rem; flex: none; }
.pip { width: 0.7rem; height: 0.7rem; border: 1px solid var(--accent); }
.pip.on { background: var(--accent); }
.quota-text { color: var(--muted); }
.quota-text strong { color: var(--text); }
.notice-box { padding: 0.75rem 0.85rem; border-left: 3px solid var(--accent); background: var(--raised); color: var(--muted); font-size: 0.88rem; }
.notice-box.bad { border-left-color: var(--danger); }
.notice-box strong { color: var(--text); }
.about-list { margin: 0.6rem 0 0; padding-left: 1.1rem; color: var(--muted); font-size: 0.88rem; }
.about-list li + li { margin-top: 0.3rem; }

/* ---------------------------------------------------------------- the wall */
.wall-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.35rem 1rem; margin-bottom: 0.9rem; }
.wall-head h2 { font-size: 1.35rem; letter-spacing: -0.03em; }
.wall-meta { color: var(--muted); font-size: 0.85rem; }
/* search, sort, date and page size: one compact row, wrapping on narrow screens */
.wall-tools { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 0.6rem 0.75rem; margin-bottom: 0.9rem; }
.tool-search { display: flex; flex: 1 1 16rem; gap: 0.4rem; min-width: 0; }
.tool-search input { min-width: 0; }
.tool-search .button { flex: none; min-height: auto; }
.tool { display: grid; gap: 0.2rem; }
.tool-label { color: var(--muted); font-size: 0.72rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; }
.tool select { width: auto; min-width: 7.5rem; padding-block: 0.45rem; }
.wall-tools .text-button { align-self: center; }
.wall-filter { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.9rem; margin-bottom: 0.9rem; padding: 0.55rem 0.75rem; border: 1px solid var(--line); background: var(--panel); }
.filter-who { display: inline-flex; align-items: center; gap: 0.45rem; color: var(--muted); }
.handle-button { padding: 0; border: 0; background: none; color: var(--text); font: inherit; font-weight: 800; cursor: pointer; text-align: left; overflow-wrap: anywhere; }
.handle-button:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.filter-who .handle-button { color: var(--accent); }
.stamp-link { color: inherit; text-decoration: none; }
.stamp-link:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }

/* numbered pages: First, Prev, numbers, Next, Last */
.pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 0.3rem; margin: 0 0 0.9rem; font-size: 0.88rem; }
.pager--bottom { margin: 1.1rem 0 0; }
.pg-nums { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 0.3rem; }
.pg {
  display: inline-flex; align-items: center; justify-content: center; min-width: 2.25rem; min-height: 2.25rem; padding: 0.2rem 0.55rem;
  border: 1px solid var(--control); color: var(--text); font-weight: 700; text-decoration: none; line-height: 1;
}
a.pg:hover { border-color: var(--accent); color: var(--accent); }
.pg-cur { border-color: var(--accent); background: var(--accent); color: var(--accent-ink); text-shadow: none; }
.pg.is-off { border-style: dashed; color: var(--muted); opacity: 0.6; }
.pg-gap { padding: 0 0.2rem; color: var(--muted); }
.pg-of { display: none; color: var(--muted); font-weight: 700; padding: 0 0.4rem; }
.pg-rev { flex-direction: row-reverse; }
.pg-word { white-space: pre; }

.wall { display: grid; gap: 0.9rem; margin: 0; padding: 0; list-style: none; }
.wall > li { display: grid; min-width: 0; }
.entry {
  display: flex; flex-direction: column; min-width: 0; padding: 1.1rem 1.2rem 1rem;
  border: 1px solid var(--line); background: var(--raised);
}
.entry.pinned { margin-bottom: 0.9rem; border-left: 3px solid var(--accent); background: var(--panel); }
.entry.is-hidden { border-style: dashed; opacity: 0.8; }
.entry-top { display: flex; align-items: flex-start; gap: 0.7rem; }
.entry-top .avatar { width: 2.75rem; height: 2.75rem; flex: none; }
.entry-id { display: grid; min-width: 0; flex: 1; }
.entry-id h3 { font-size: 1rem; line-height: 1.25; overflow-wrap: anywhere; }
.entry-id .meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.15rem 0.5rem; color: var(--muted); font-size: 0.8rem; }
.tag {
  display: inline-block; padding: 0 0.35rem; border: 1px solid var(--control); color: var(--muted);
  font-size: 0.7rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; line-height: 1.5;
}
.tag.accent { border-color: var(--accent); color: var(--accent); }
.tag.bad { border-color: var(--danger); color: var(--danger); }
.message {
  margin-top: 0.75rem; font-size: var(--message-size); line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere;
}
.entry-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 0.5rem; margin-top: 0.85rem; padding-top: 0.7rem; border-top: 1px dashed var(--line); font-size: 0.85rem; }
.entry-foot:empty { display: none; }
/* contact chips: icon + value, compact */
.chip {
  display: inline-flex; align-items: center; gap: 0.35rem; min-height: 1.9rem; padding: 0.15rem 0.55rem;
  border: 1px solid var(--line); background: transparent; color: var(--accent); font: inherit; font-size: 0.85rem;
  overflow-wrap: anywhere; text-decoration: none; cursor: pointer;
}
a.chip:hover, .chip--button:hover { border-color: var(--accent); }
a.chip .chip-text { text-decoration: underline; text-underline-offset: 3px; }
.chip--plain { color: var(--text); cursor: default; }
.chip--button .chip-text { color: var(--accent); }
.chip .icon { width: 1rem; height: 1rem; flex: none; }
.check-row { display: flex; align-items: center; gap: 0.55rem; color: var(--text); font-size: 0.92rem; cursor: pointer; }
.check-row input { width: 1.05rem; height: 1.05rem; }
.entry .hidden-note { margin-top: 0.6rem; color: var(--danger); font-size: 0.82rem; font-weight: 700; }
.empty { padding: 2.5rem 1rem; border: 1px dashed var(--line); color: var(--muted); text-align: center; }
.skeleton { min-height: 8.5rem; border: 1px solid var(--line); background: var(--raised); }
@media (prefers-reduced-motion: no-preference) {
  .skeleton { animation: pulse 1.4s ease-in-out infinite; }
  @keyframes pulse { 50% { opacity: 0.55; } }
}

/* ---------------------------------------------------------------- avatars */
.avatar { display: block; width: 2.5rem; height: 2.5rem; border: 1px solid var(--control); image-rendering: pixelated; }
.avatar.avatar--small { width: 1.75rem; height: 1.75rem; }
.avatar.avatar--large { width: 5.5rem; height: 5.5rem; flex: none; }
.composer-who .avatar.avatar--preview { width: 4.5rem; height: 4.5rem; }
.profile-preview span { display: block; }
#profile-avatar-name { color: var(--text); font-weight: 700; }

/* the picker: 40 pictures and 8 backgrounds, each a real radio input */
.avatar-library { display: grid; gap: 0.75rem; padding: 0.75rem; border: 1px solid var(--line); background: var(--bg); }
.avatar-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(2.75rem, 1fr)); gap: 0.35rem; }
.avatar-colors { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.av-opt { position: relative; display: block; }
.av-tile, .av-swatch { display: block; border: 2px solid transparent; cursor: pointer; }
.av-tile svg { display: block; width: 100%; height: auto; aspect-ratio: 1; image-rendering: pixelated; }
.av-swatch { width: 2rem; height: 2rem; background: var(--swatch); border-color: var(--line); }
.av-opt input:checked + .av-tile, .av-opt input:checked + .av-swatch { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
.av-opt input:focus-visible + .av-tile, .av-opt input:focus-visible + .av-swatch { outline: 3px solid var(--focus); outline-offset: 2px; }
.av-tile:hover, .av-swatch:hover { border-color: var(--control); }

/* the member card */
.member-card { display: flex; align-items: center; gap: 1rem; }
.member-facts { display: grid; gap: 0.15rem; color: var(--muted); font-size: 0.9rem; }
.member-handle { color: var(--text); font-size: 1.15rem; overflow-wrap: anywhere; }
.member-contact { margin-top: 0; }

/* ---------------------------------------------------------------- dialogs */
dialog {
  width: min(34rem, calc(100vw - 2rem)); max-height: calc(100vh - 2rem); padding: 0;
  border: 1px solid var(--line); background: var(--panel); color: var(--text);
}
dialog.wide { width: min(52rem, calc(100vw - 2rem)); }
dialog::backdrop { background: rgb(0 0 0 / 0.6); }
.dialog-head { display: flex; align-items: center; gap: 0.75rem; padding: 1rem 1.25rem; border-bottom: 1px solid var(--line); }
.dialog-head h2 { font-size: 1.15rem; }
.dialog-head .icon-button { margin-left: auto; }
.dialog-body { padding: 1.1rem 1.25rem 1.25rem; }
.dialog-body > p + p { margin-top: 0.7rem; }
.dialog-body ul { padding-left: 1.2rem; }
.dialog-body li + li { margin-top: 0.35rem; }
.dialog-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 0.6rem; margin-top: 1.1rem; }
.radio-list { display: grid; gap: 0.4rem; margin: 0; padding: 0; border: 0; }
.radio-list legend { margin-bottom: 0.4rem; color: var(--muted); font-size: 0.85rem; font-weight: 700; }
.radio-list label { display: flex; align-items: center; gap: 0.55rem; cursor: pointer; }
.link-row { display: grid; grid-template-columns: 8.5rem minmax(0, 1fr) auto; gap: 0.5rem; align-items: start; }
.link-row .preview { grid-column: 2 / 4; font-size: 0.8rem; color: var(--muted); overflow-wrap: anywhere; }
.inbox { margin-top: 1rem; padding: 0.85rem; border: 1px dashed var(--accent); background: var(--raised); font-size: 0.88rem; }
.inbox .code { font-family: var(--font-mono); font-size: 1.35rem; letter-spacing: 0.18em; color: var(--text); }
.tabs { display: flex; gap: 0.25rem; border-bottom: 1px solid var(--line); margin: -0.25rem 0 1rem; }
.tabs button { padding: 0.55rem 0.8rem; border: 0; border-bottom: 2px solid transparent; background: none; color: var(--muted); cursor: pointer; font-weight: 700; }
.tabs button[aria-selected="true"] { color: var(--text); border-bottom-color: var(--accent); }
.mod-list { display: grid; gap: 0.75rem; margin: 0; padding: 0; list-style: none; }
.mod-item { padding: 0.85rem; border: 1px solid var(--line); background: var(--raised); }
.mod-item .message { font-size: 1rem; margin-top: 0.4rem; }
.mod-item .row { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.7rem; }
.mod-reports { margin: 0.5rem 0 0; padding-left: 1.1rem; color: var(--muted); font-size: 0.85rem; }
.mod-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.mod-table th, .mod-table td { padding: 0.45rem 0.4rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.mod-table th { color: var(--muted); font-weight: 700; }

/* ---------------------------------------------------------------- footer */
.site-footer {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1.25rem; padding: 1.5rem 0 2rem;
  border-top: 1px solid var(--line); color: var(--muted); font-size: 0.85rem;
}
.site-footer strong { color: var(--text); }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 0.25rem 1rem; margin-left: auto; }
.site-footer .header-link { padding: 0; font-size: 0.85rem; font-weight: 400; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.site-footer a { color: var(--muted); }

/* ---------------------------------------------------------------- toast */
.toast {
  position: fixed; left: 50%; bottom: 1.25rem; z-index: 60; transform: translateX(-50%);
  max-width: min(28rem, calc(100vw - 2rem)); padding: 0.7rem 1rem; border: 1px solid var(--accent);
  background: var(--panel); color: var(--text); font-weight: 700; box-shadow: 0 12px 32px rgb(0 0 0 / 0.3);
}
.toast.bad { border-color: var(--danger); }

/* ---------------------------------------------------------------- sign-in page */
.signin-main { padding: 2.5rem 0 4rem; }
.signin-card { max-width: 32rem; margin: 0 auto; }
.signin-card h1 { font-size: clamp(1.6rem, 3vw, 2.1rem); }
.signin-card > .hint { margin-top: 1.1rem; }

/* ---------------------------------------------------------------- terms and privacy */
.doc { max-width: 46rem; padding: 2rem 0 3rem; }
.doc h1 { font-size: clamp(1.9rem, 3.2vw, 2.4rem); }
.doc h2 { margin-top: 1.8rem; font-size: 1.2rem; letter-spacing: -0.02em; }
.doc p, .doc ul { margin-top: 0.75rem; line-height: 1.6; }
.doc ul { padding-left: 1.2rem; }
.doc li + li { margin-top: 0.35rem; }

/* ---------------------------------------------------------------- small screens */
@media (max-width: 979px) {
  /* the intro already says how it works; keep the wall one scroll away */
  .about-panel { display: none; }
}
@media (max-width: 720px) {
  .page { width: calc(100% - 2rem); }
  .site-header { min-height: 4rem; gap: 0.5rem; }
  .brand-mark { width: 2.25rem; height: 2.25rem; }
  .brand-name { font-size: 1.3rem; }
  .brand-sub, .header-link.wide-only { display: none; }
  .account-button .label { display: none; }
  .account-button { padding: 0.25rem; }
  .hero { padding: 1.25rem 0 1rem; }
  .entry { padding: 1rem; }
  :root { --message-size: 1.15rem; }
  :root[data-palette="bbs"] { --message-size: 1.05rem; }
  .link-row { grid-template-columns: 1fr auto; }
  .link-row select { grid-column: 1 / 3; }
  .link-row .preview { grid-column: 1 / 3; }
  /* pages: First / Prev / 2 of 6 / Next / Last, numbers hidden */
  .pg-nums { display: none; }
  .pg-first .pg-word, .pg-last .pg-word { display: none; }
  .pg-of { display: inline; }
  .pager { gap: 0.25rem; }
  .pg { min-width: 2.5rem; min-height: 2.5rem; padding-inline: 0.45rem; }
  .wall-tools { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1.1fr) 4.25rem; gap: 0.6rem 0.5rem; }
  .tool-search, .wall-tools .text-button { grid-column: 1 / -1; }
  .wall-tools .text-button { justify-self: start; }
  .tool select { width: 100%; min-width: 0; padding-inline: 0.45rem; font-size: 0.9rem; }
  .site-footer nav { margin-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
@media (forced-colors: active) {
  .pip.on { background: CanvasText; }
  :root[data-palette="bbs"] body::after { display: none; }
}
