/* Builders.cam: hand-written CSS, no framework. One font, one accent. */

:root {
    --bg: #1a1c1f;
    --panel: #222529;
    --panel-2: #2a2d32;
    --line: #33373d;
    --text: #d4d7dc;
    --muted: #8a9099;
    --accent: #8fa3bf;
    --name: #7fae7f;
    --subject: #c9b48a;
    --green: #8fae5f;
    --red: #c97a7a;
    --natty: #7fae7f;
    --juice: #a68cc7;
    --font: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font: 14px/1.5 var(--font);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
img, video { max-width: 100%; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
b, strong { font-weight: 600; }
.muted { color: var(--muted); }
[hidden] { display: none !important; }
:focus-visible { outline: 1px solid var(--accent); outline-offset: 2px; }

.wrap { width: 100%; max-width: 1100px; margin: 0 auto; padding: 0 16px; }
main.wrap { flex: 1; padding-top: 8px; padding-bottom: 32px; }

/* Top bar: plain board list, like an imageboard */
.topbar {
    display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
    padding: 6px 16px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 13px;
}
.boardlist a.active { color: var(--text); font-weight: 600; }

.btn {
    display: inline-block; background: var(--panel-2); border: 1px solid var(--line); color: var(--text);
    padding: 4px 16px; border-radius: 4px; cursor: pointer;
}
.btn:hover { border-color: var(--muted); text-decoration: none; }
.btn:disabled { opacity: .6; cursor: progress; }
.link-btn { background: none; border: 0; padding: 0; color: var(--accent); cursor: pointer; }
.link-btn:hover { text-decoration: underline; }
.icon-btn { background: none; border: 0; padding: 2px; cursor: pointer; color: var(--muted); display: inline-flex; align-items: center; gap: 4px; }
.icon-btn:hover { color: var(--text); }

/* Board header */
.board-head { text-align: center; padding: 18px 0 10px; }
.board-head h1 { margin: 0; font-size: 22px; font-weight: 600; color: var(--subject); }
.board-head p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }

.navline { padding: 6px 0; margin: 6px 0 10px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); color: var(--muted); }
.navline input[type=search] { background: var(--bg); border: 1px solid var(--line); border-radius: 4px; padding: 1px 8px; margin: 0 6px 0 10px; }

.new-thread { text-align: center; margin: 8px 0; }
.new-thread > summary { list-style: none; cursor: pointer; font-size: 16px; color: var(--muted); }
.new-thread > summary span { color: var(--accent); }
.new-thread > summary::-webkit-details-marker { display: none; }
.new-thread .post-form { margin: 10px auto 0; text-align: left; }

/* Threads and posts */
.thread { padding: 4px 0 12px; border-bottom: 1px solid var(--line); margin-bottom: 12px; }
.thread-full { border: 0; }
.thread-meta { color: var(--muted); margin: 6px 0; font-size: 13px; }
.replies { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding-left: 22px; }

.post { position: relative; }
.post-reply {
    background: var(--panel); border: 1px solid var(--line); border-radius: 3px;
    padding: 6px 10px; max-width: 100%; min-width: min(360px, 100%);
}
.post-reply::before { content: ">>"; position: absolute; left: -22px; top: 6px; color: var(--line); font-size: 12px; }
.post-reply.is-mine { border-left: 2px solid var(--accent); }
.post.highlight { background: var(--panel-2); border-color: var(--accent); }
.post-op.highlight { outline: 1px solid var(--accent); }

.file-info { font-size: 12px; color: var(--muted); margin: 2px 0 3px; }
.post-main { display: flex; gap: 14px; align-items: flex-start; }
.post-media { flex-shrink: 0; max-width: min(100%, 520px); }
.post-media:has(.dual-player) { max-width: min(100%, 720px); flex-shrink: 1; }
.post-content { min-width: 0; flex: 1; }
.media-thumb { display: block; line-height: 0; }
.media-thumb img { max-width: 200px; max-height: 200px; object-fit: contain; cursor: zoom-in; }
.post-reply .media-thumb img { max-width: 125px; max-height: 125px; }
.media-thumb.expanded img { max-width: min(100%, 1000px); max-height: none; cursor: zoom-out; }
.post-main:has(.expanded) { flex-direction: column; }
.post-media:has(.expanded) { max-width: 100%; }

.post-head { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 6px; font-size: 13px; }
.post-subject { color: var(--subject); font-weight: 600; }
.post-name { color: var(--name); font-weight: 600; }
.poster-id, .stats, .post-head time { color: var(--muted); }
.stats { white-space: nowrap; }
.you { color: var(--accent); font-size: 12px; }
.post-no a { color: var(--muted); }
.post-num { background: none; border: 0; padding: 0; color: var(--accent); cursor: pointer; }
.post-num:hover { text-decoration: underline; }
.head-icon { vertical-align: middle; }
.tree-btn { font-size: 12px; }
.backlinks { display: inline-flex; flex-wrap: wrap; gap: 6px; font-size: 12px; }
.backlinks:empty { display: none; }

.post-body { margin: 6px 0 4px; overflow-wrap: anywhere; }
.post-op .post-body { margin-top: 8px; }
.greentext { color: var(--green); }
.quote { color: var(--accent); }
.quote.op-quote::after { content: " (OP)"; color: var(--muted); }
.quote.you-quote::after { content: " (You)"; color: var(--muted); }
.quote.op-quote.you-quote::after { content: " (OP)(You)"; }
.quote.dead { color: var(--muted); text-decoration: line-through; cursor: help; }
.quote.cross-quote::after { content: " \2192"; color: var(--muted); }

/* LiftText: icon + bold numbers, no boxes */
.lift { display: inline-flex; align-items: center; gap: 3px; vertical-align: middle; cursor: help; }
.lift-icon { width: 16px; height: 16px; }
.lift-name { font-weight: 600; }
.lift-num { font-weight: 600; font-variant-numeric: tabular-nums; }
.lift-num small { color: var(--muted); font-weight: 400; font-size: 12px; margin-left: 1px; }
.lift-x { color: var(--muted); }
.liftline { display: inline-flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.liftline-plus { width: 11px; height: 11px; }
.lift-note { color: var(--muted); }

.ts-link { background: none; border: 0; padding: 0; color: var(--accent); cursor: pointer; display: inline-flex; align-items: center; gap: 2px; }
.ts-link:hover { text-decoration: underline; }
.frame-ref { font-size: 13px; margin: 4px 0; }

/* Ref card: quiet embed of your own older post */
.ref-card { display: flex; gap: 10px; align-items: flex-start; border-left: 2px solid var(--line); padding: 4px 0 4px 10px; margin: 6px 0; max-width: 520px; }
.ref-thumb img { width: 56px; height: 56px; object-fit: cover; display: block; border-radius: 2px; }
.ref-text { min-width: 0; font-size: 13px; }
.ref-excerpt { color: var(--muted); margin-top: 2px; }
.ref-icon { background: none; border: 0; padding: 0; cursor: zoom-in; vertical-align: -2px; }

/* Before/After slider */
.ba-slider {
    --pos: 50%;
    position: relative; overflow: hidden; border-radius: 2px;
    width: 360px; max-width: 100%; aspect-ratio: var(--ratio, 3 / 4); max-height: 520px;
    background: var(--panel); user-select: none; touch-action: pan-y;
}
.ba-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.ba-before { clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
.ba-line { position: absolute; top: 0; bottom: 0; left: var(--pos); width: 1px; background: rgba(255, 255, 255, .7); pointer-events: none; }
.ba-line img { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); }
.ba-label { position: absolute; top: 6px; max-width: calc(50% - 10px); display: flex; flex-direction: column; font-size: 11px; background: rgba(20, 22, 25, .75); padding: 2px 6px; border-radius: 2px; pointer-events: none; }
.ba-label small { color: var(--muted); font-size: 10px; }
.ba-label-before { left: 6px; }
.ba-label-after { right: 6px; text-align: right; }
.ba-range { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: ew-resize; margin: 0; -webkit-appearance: none; appearance: none; }

/* Video / form check */
.video-box video { display: block; max-width: min(480px, 100%); max-height: 420px; background: #000; }
.video-tools { margin-top: 4px; font-size: 13px; color: var(--muted); }
.video-box.flash video { outline: 2px solid var(--accent); }
.dual-player { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.dual-player figure { margin: 0; }
.dual-player figcaption { font-size: 12px; color: var(--muted); }
.dual-player video { width: 100%; background: #000; display: block; }
.dual-controls { grid-column: 1 / -1; display: flex; align-items: center; gap: 10px; font-size: 13px; }
.dual-controls input[type=range] { flex: 1; accent-color: var(--accent); }

/* Natty or Juice */
.nj-vote { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 8px; font-size: 12px; }
.nj-btn { display: inline-flex; align-items: center; gap: 4px; background: none; border: 1px solid var(--line); border-radius: 3px; padding: 1px 8px; cursor: pointer; color: var(--muted); }
.nj-btn b { color: var(--text); font-variant-numeric: tabular-nums; }
.nj-natty.chosen { border-color: var(--natty); color: var(--natty); }
.nj-juice.chosen { border-color: var(--juice); color: var(--juice); }
.nj-btn:disabled { cursor: default; }
.nj-bar { width: 70px; height: 4px; background: var(--juice); overflow: hidden; border-radius: 2px; }
.nj-bar span { display: block; height: 100%; background: var(--natty); transition: width .4s; }

/* Post form: compact table like a classic imageboard */
.post-form { background: var(--panel); border: 1px solid var(--line); border-radius: 3px; padding: 10px 12px; max-width: 520px; }
.pf-head { display: flex; justify-content: space-between; color: var(--muted); font-size: 13px; margin-bottom: 6px; }
.pf-table { width: 100%; border-collapse: separate; border-spacing: 0 4px; }
.pf-table th { width: 72px; text-align: left; vertical-align: top; padding: 4px 8px 0 0; font-weight: 600; font-size: 13px; color: var(--muted); }
.pf-inline { display: flex; gap: 8px; align-items: center; }
.pf-inline label { white-space: nowrap; font-size: 13px; }
.post-form input[type=text], .post-form input[type=number], .post-form textarea, .post-form select {
    width: 100%; background: var(--bg); border: 1px solid var(--line); border-radius: 3px; padding: 4px 6px;
}
.post-form input:focus, .post-form textarea:focus, .post-form select:focus { border-color: var(--accent); outline: none; }
.post-form textarea { resize: vertical; min-height: 90px; line-height: 1.45; display: block; }
.pf-body { position: relative; }
.pf-counter { position: absolute; right: 6px; bottom: 4px; font-size: 11px; color: var(--muted); pointer-events: none; }
.pf-counter.over { color: var(--red); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.file-drop { display: block; position: relative; border: 1px dashed var(--line); border-radius: 3px; padding: 6px 8px; color: var(--muted); cursor: pointer; font-size: 13px; }
.file-drop:hover, .file-drop.drag { border-color: var(--accent); color: var(--text); }
.file-drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.file-preview { display: flex; gap: 10px; align-items: center; margin-top: 6px; font-size: 13px; }
.file-preview-media img, .file-preview-media video { max-height: 90px; max-width: 120px; display: block; }
.frame-attach { margin-top: 6px; font-size: 13px; }

.pf-more { margin-top: 4px; font-size: 13px; }
.pf-more > summary { cursor: pointer; color: var(--muted); padding: 2px 0; }
.pf-opt-row { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; padding: 6px 0; border-top: 1px solid var(--line); }
.pf-opt-label { width: 52px; font-weight: 600; color: var(--muted); }
.pf-opt-row label { white-space: nowrap; }
.pf-opt-row input[type=checkbox], .pf-opt-row input[type=radio] { accent-color: var(--accent); vertical-align: -2px; }
.post-form .pf-opt-row input[type=number] { width: 64px; }
.post-form .pf-opt-row select { width: auto; }
.pf-submit { display: flex; align-items: center; gap: 12px; margin-top: 8px; font-size: 12px; }
.form-errors { color: var(--red); border: 1px solid var(--red); border-radius: 3px; padding: 6px 10px; margin-bottom: 8px; font-size: 13px; }

.ref-list { flex-basis: 100%; display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 6px; max-height: 240px; overflow-y: auto; }
.ref-option { display: flex; flex-direction: column; gap: 2px; text-align: left; background: var(--bg); border: 1px solid var(--line); border-radius: 3px; padding: 4px; cursor: pointer; font-size: 11px; color: var(--muted); }
.ref-option:hover { border-color: var(--accent); }
.ref-option img { width: 100%; height: 70px; object-fit: cover; }
.ref-option b { color: var(--text); }
.ref-chosen { display: inline-flex; align-items: center; gap: 6px; }
.ref-chosen img { width: 32px; height: 32px; object-fit: cover; }
.ref-chosen small, .ref-chosen br { display: none; }
.ref-empty { color: var(--muted); grid-column: 1 / -1; }

/* Floating quick reply */
.reply-dock { margin-top: 12px; }
.reply-dock.floating .post-form {
    position: fixed; right: 12px; bottom: 12px; z-index: 60; width: min(440px, calc(100vw - 24px));
    max-height: calc(100vh - 60px); overflow-y: auto; box-shadow: 0 8px 30px rgba(0, 0, 0, .5);
}
.closed-note { color: var(--muted); }

/* Overlays */
.hover-preview { position: fixed; z-index: 80; max-width: min(560px, calc(100vw - 24px)); pointer-events: none; }
.hover-preview .post { background: var(--panel-2); border: 1px solid var(--line); border-radius: 3px; padding: 6px 10px; box-shadow: 0 6px 24px rgba(0, 0, 0, .5); width: auto; min-width: 0; }
.hover-preview .post-reply::before { display: none; }
.hover-preview .media-thumb img { max-width: 125px; max-height: 125px; }

.modal-backdrop { position: fixed; inset: 0; z-index: 90; background: rgba(10, 11, 13, .75); display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal { background: var(--panel); border: 1px solid var(--line); border-radius: 4px; width: min(860px, 100%); max-height: calc(100vh - 32px); overflow: auto; }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 8px 12px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--panel); z-index: 1; }
.modal-head h2 { margin: 0; font-size: 14px; font-weight: 600; display: flex; align-items: center; gap: 6px; }
.modal-body { padding: 12px; }

.compare-overlay { position: fixed; z-index: 85; inset: 0; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(10, 11, 13, .7); pointer-events: none; }
.compare-overlay.pinned { pointer-events: auto; }
.compare-panel { background: var(--panel); border: 1px solid var(--line); border-radius: 4px; padding: 10px; width: min(900px, 100%); }
.compare-panel header { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; font-size: 13px; color: var(--muted); }
.compare-panel header .icon-btn { margin-left: auto; }
.compare-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.compare-grid figure { margin: 0; background: var(--bg); }
.compare-grid img { width: 100%; height: min(70vh, 600px); object-fit: contain; display: block; }
.compare-grid figcaption { padding: 4px 8px; font-size: 12px; color: var(--muted); display: flex; justify-content: space-between; }

.tree-summary { display: flex; gap: 16px; flex-wrap: wrap; color: var(--muted); font-size: 13px; margin-bottom: 10px; }
.tree-summary b { color: var(--text); }
.tree { list-style: none; margin: 0; padding: 0; }
.tree ul { list-style: none; margin: 0 0 0 20px; padding: 0 0 0 12px; border-left: 1px solid var(--line); }
.tree-node { display: flex; gap: 10px; align-items: center; padding: 6px; color: var(--text); border: 1px solid transparent; border-radius: 3px; }
.tree-node:hover { background: var(--panel-2); text-decoration: none; }
.tree-node.focus { border-color: var(--accent); }
.tree-node > img, .tree-node .tn-noimg { width: 44px; height: 44px; object-fit: cover; flex-shrink: 0; background: var(--panel-2); display: grid; place-items: center; }
.tree-node .tn-main { min-width: 0; }
.tree-node .tn-top { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 13px; }
.tree-node .tn-top img { width: 13px; height: 13px; }
.tree-node .tn-no { color: var(--accent); font-size: 12px; }
.tree-node .tn-ex { display: block; color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 560px; }
.tn-delta { font-weight: 600; }
.tn-stats { font-size: 12px; color: var(--muted); }

/* Privacy editor */
.editor-wrap { display: flex; flex-direction: column; gap: 10px; }
.editor-tools { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 13px; }
.editor-tools .tool { display: inline-flex; align-items: center; gap: 5px; background: var(--bg); border: 1px solid var(--line); border-radius: 3px; padding: 3px 8px; cursor: pointer; }
.editor-tools .tool img { width: 14px; height: 14px; }
.editor-tools .tool.active { border-color: var(--accent); }
.editor-tools .sep { width: 1px; height: 18px; background: var(--line); }
.editor-tools label { color: var(--muted); display: inline-flex; gap: 6px; align-items: center; }
.editor-tools input[type=range] { accent-color: var(--accent); width: 80px; }
.editor-stage { background: #111214; display: flex; justify-content: center; }
.editor-stage canvas { max-width: 100%; max-height: 62vh; cursor: crosshair; touch-action: none; display: block; }
.editor-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }

/* Catalog */
.catalog { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px 10px; }
.cat-item { display: flex; flex-direction: column; align-items: center; text-align: center; color: var(--text); font-size: 12px; }
.cat-item:hover { text-decoration: none; }
.cat-item:hover .cat-thumb img { outline: 1px solid var(--accent); }
.cat-thumb img { max-width: 150px; max-height: 150px; display: block; }
.cat-counts { color: var(--muted); margin-top: 3px; }
.cat-text { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; }
.cat-text b { color: var(--subject); }

/* Archive */
.archive-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.archive-table th, .archive-table td { text-align: left; padding: 4px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.archive-table th { color: var(--muted); font-weight: 600; }

.pager { margin-top: 16px; color: var(--muted); }
.empty { text-align: center; color: var(--muted); padding: 30px 0; }

/* Home */
.home-head { text-align: center; padding: 28px 0 18px; }
.home-head h1 { margin: 8px 0 4px; font-size: 24px; font-weight: 600; }
.home-head p { margin: 0; color: var(--muted); }
.box { max-width: 640px; margin: 0 auto 16px; border: 1px solid var(--line); border-radius: 3px; background: var(--panel); }
.box-title { margin: 0; padding: 6px 12px; font-size: 13px; font-weight: 600; border-bottom: 1px solid var(--line); color: var(--subject); }
.box > p { margin: 0; padding: 8px 12px; }
.board-rows, .recent-rows { list-style: none; margin: 0; padding: 6px 12px; }
.board-rows li, .recent-rows li { display: flex; gap: 8px; align-items: baseline; padding: 3px 0; }
.board-rows li .muted, .recent-rows li .muted:last-child { margin-left: auto; white-space: nowrap; font-size: 12px; }
.recent-rows li a { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }

/* Prose pages */
.prose { max-width: 760px; margin: 0 auto; }
.prose h1 { font-size: 20px; font-weight: 600; }
.prose h2 { font-size: 16px; font-weight: 600; margin-top: 26px; }
.guide-table { width: 100%; border-collapse: collapse; margin: 8px 0; }
.guide-table th, .guide-table td { border-bottom: 1px solid var(--line); padding: 6px 8px; vertical-align: top; text-align: left; }
.guide-table pre { margin: 0; white-space: pre-wrap; font: inherit; color: var(--muted); }
.guide-features dt { display: flex; align-items: center; gap: 6px; font-weight: 600; margin-top: 14px; }
.guide-features dt img { width: 16px; height: 16px; }
.guide-features dd { margin: 2px 0 0 22px; color: var(--muted); }
.rules li { margin-bottom: 6px; }
code { background: var(--panel-2); padding: 0 4px; border-radius: 2px; font: inherit; }

.error-page { text-align: center; padding: 50px 0; }
.error-page img { width: 40px; height: 40px; }
.error-page h1 { font-size: 20px; font-weight: 600; margin: 12px 0 4px; }
.error-page p { color: var(--muted); margin-bottom: 18px; }

.site-footer { text-align: center; padding: 16px; color: var(--muted); font-size: 12px; border-top: 1px solid var(--line); }

.toast { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 100; background: var(--panel-2); border: 1px solid var(--line); padding: 6px 14px; border-radius: 3px; font-size: 13px; }

@media (max-width: 640px) {
    .post-main { flex-direction: column; gap: 6px; }
    .post-media { width: 100%; }
    .replies { padding-left: 0; }
    .post-reply::before { display: none; }
    .post-reply { min-width: 0; width: 100%; }
    .ba-slider { width: 100%; }
    .compare-grid, .dual-player { grid-template-columns: 1fr; }
    .compare-grid img { height: 36vh; }
    .post-form { max-width: none; }
}

/* ---------- Accounts ---------- */
.inline-form { display: inline; white-space: nowrap; }
.auth-box { max-width: 380px; margin-top: 24px; }
.auth-form { padding: 12px; display: grid; gap: 10px; }
.auth-form label { display: grid; gap: 3px; font-size: 13px; color: var(--muted); }
.auth-form input[type=text], .auth-form input[type=email], .auth-form input[type=password],
.admin-filter input, .admin-filter select, .ban-box input[type=text], .ban-box select {
    background: var(--bg); color: var(--text); border: 1px solid var(--line); border-radius: 3px; padding: 4px 8px; font: inherit;
}
.auth-form input:focus, .admin-filter input:focus { border-color: var(--accent); outline: none; }
.auth-form .btn { justify-self: start; }
.auth-form p { margin: 0; }
label.check { display: flex; align-items: center; gap: 6px; color: var(--text); }
.form-status { color: var(--name); border: 1px solid var(--line); border-radius: 3px; padding: 6px 10px; margin-bottom: 8px; font-size: 13px; }
.center { text-align: center; }
.row-text { padding: 4px 12px; }
.report-form { display: grid; gap: 8px; }
.report-form p { margin: 4px 0; font-size: 12px; }
.report-form .btn { justify-self: start; }
.report-btn, .mod-link { font-size: 12px; color: var(--muted); }

/* ---------- Admin ---------- */
.navline a.active { color: var(--text); font-weight: 600; }
.admin-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; margin-bottom: 16px; }
.admin-stats > div { background: var(--panel); border: 1px solid var(--line); border-radius: 3px; padding: 6px 10px; display: grid; }
.admin-stats b { font-size: 18px; }
.admin-h { font-size: 14px; color: var(--subject); margin: 16px 0 8px; }
.admin-filter { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 12px; }
.admin-filter input[type=number] { width: 90px; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.admin-table th { text-align: left; color: var(--muted); font-weight: 600; border-bottom: 1px solid var(--line); padding: 4px 8px; }
.admin-table td { border-bottom: 1px solid var(--line); padding: 6px 8px; vertical-align: top; }
.admin-table tr.is-hidden td { opacity: .55; }
.admin-content { max-width: 420px; overflow-wrap: anywhere; }
.admin-thumb { float: left; width: 48px; height: 48px; object-fit: cover; margin: 0 8px 4px 0; border-radius: 2px; }
.admin-actions form { display: inline; }
.ban-box { display: inline-block; }
.ban-box summary { list-style: none; display: inline; }
.ban-box summary::-webkit-details-marker { display: none; }
.ban-box[open] form { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.tag-banned { color: var(--red); font-size: 12px; }
@media (max-width: 640px) {
    .admin-table, .admin-table tbody, .admin-table tr, .admin-table td { display: block; }
    .admin-table thead { display: none; }
    .admin-table tr { border-bottom: 1px solid var(--line); padding: 6px 0; }
    .admin-table td { border: 0; padding: 2px 4px; }
}

/* ---------- Newcomers ---------- */
.welcome { border: 1px solid var(--line); border-left: 3px solid var(--accent); background: var(--panel); border-radius: 3px; padding: 8px 12px; margin: 10px 0; font-size: 13px; }
.welcome p { margin: 0; }
.welcome b { color: var(--subject); }
.welcome-links { margin-top: 4px !important; color: var(--muted); }
.reply-fab { position: fixed; right: 14px; bottom: 14px; z-index: 55; padding: 7px 16px; box-shadow: 0 4px 16px rgba(0, 0, 0, .45); background: var(--panel-2); }
.pf-help { margin-top: 6px; font-size: 12px; color: var(--muted); }
.pf-help summary { cursor: pointer; width: max-content; }
.pf-help table { border-collapse: collapse; margin: 6px 0; }
.pf-help td { padding: 2px 10px 2px 0; vertical-align: top; }
.pf-help code { color: var(--text); white-space: nowrap; }
.more-threads { max-width: 640px; margin: 24px auto 8px; border-top: 1px solid var(--line); padding-top: 10px; }
.more-threads h2 { font-size: 14px; font-weight: 600; color: var(--subject); margin: 0 0 8px; }
.more-threads ul { list-style: none; margin: 0; padding: 0; }
.more-threads li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 4px 0; border-bottom: 1px solid var(--line); }
.more-threads li a { display: flex; align-items: center; gap: 10px; min-width: 0; }
.more-threads img, .more-noimg { width: 40px; height: 40px; object-fit: cover; border-radius: 2px; flex: none; background: var(--panel-2); }
.more-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.more-threads li .muted { flex: none; font-size: 12px; }
.lingo dt { font-weight: 600; margin-top: 8px; }
.lingo dd { margin: 2px 0 0 0; color: var(--muted); }
.steps li { margin: 4px 0; }

/* ---------- Moderation ---------- */
.mod-menu { display: inline-block; position: relative; }
.mod-menu > summary { list-style: none; display: inline; }
.mod-menu > summary::-webkit-details-marker { display: none; }
.mod-pop { position: fixed; z-index: 70; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(320px, calc(100vw - 32px)); background: var(--panel-2); border: 1px solid var(--line); border-radius: 3px; padding: 8px 10px; box-shadow: 0 6px 24px rgba(0, 0, 0, .45); font-size: 13px; display: grid; gap: 8px; }
.mod-row { display: flex; flex-wrap: wrap; gap: 4px 12px; }
.mod-ban { display: grid; gap: 6px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 8px 0; }
.mod-ban input[type=text], .mod-ban select, .board-form input[type=text] { background: var(--bg); color: var(--text); border: 1px solid var(--line); border-radius: 3px; padding: 4px 8px; font: inherit; }
.mod-ban .btn { justify-self: start; }
.report-badge { display: inline-block; min-width: 18px; padding: 0 5px; border-radius: 9px; background: var(--red); color: var(--bg) !important; font-size: 11px; font-weight: 700; text-align: center; line-height: 17px; }
.report-badge:hover { text-decoration: none; }
.bulk-bar { padding: 6px 0; border-top: 1px solid var(--line); }
.admin-panel { background: var(--panel); border: 1px solid var(--line); border-radius: 3px; padding: 8px 12px; margin-bottom: 14px; }
.admin-panel summary { cursor: pointer; }
.board-form { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; margin-top: 10px; }
.board-form label { display: grid; gap: 3px; font-size: 13px; color: var(--muted); }
.board-form .wide { grid-column: 1 / -1; }
.board-form .check { display: flex; color: var(--text); }
.board-flags { display: grid; gap: 4px; }
.ban-box[open] .board-form { display: grid; min-width: min(420px, 80vw); }
.order-cell form { display: flex; gap: 6px; }
.order-cell button:disabled { opacity: .3; cursor: default; }
@media (max-width: 640px) { .board-form { grid-template-columns: 1fr; } }
.mod-menu[open] > summary::before { content: ""; position: fixed; inset: 0; z-index: 69; background: rgba(10, 11, 13, .55); cursor: default; }
.mod-pop-title { font-weight: 600; color: var(--subject); }
.nowrap { white-space: nowrap; }
