/*
 * forum.css: the "forum" theme, an old-school message board in the dark, after XenForo 2's dark styles.
 *
 * Built from template.css (same section order). What makes it a forum:
 *  - the page is a centred column (body, max 1240px) on a darker ground, under a blue navigation bar of tabs
 *    (the navbar's bracketed board groups lose their brackets on desktop; phones keep arisuchan.xyz's list);
 *  - every post is a "message": a user cell on the left (avatar, name, title) and the message on the right: a
 *    header row (the intro), the text, then the files as "Attachments" (forums show them under the text), the
 *    backlinks, and a footer of actions. On phones the user cell is a strip above the message;
 *  - blocks (the post form, /all/ and index thread headers, homepage boxes, the rules, the log) have the blue
 *    gradient header bars of the old boards.
 * CSS lays all of that out before the first paint, with a placeholder silhouette in each user cell. The theme's
 * script, js/theme-forum.js, fills the user cells (letter avatars, names, titles), adds the message footers
 * (Report, Quote, Reply), the breadcrumb bar, the thread title block and the current tab; see its header.
 *
 * Deliberately not like the other themes, so tools/theme-check.mjs reports these as FAIL by design:
 * navbar-gaps (tabs, no brackets on desktop) and multifile-op-below (an OP's files come after its text).
 *
 * Order: 1 tokens; 2 base; 3 buttons and small helpers; 4 the navbar; 5 the board header and page furniture;
 * 6 the post form; 7 threads and messages; 8 post text; 9 files; 10 previews; 11 pagination, thread links,
 * moderation fields, footer; 12 catalog; 13 /all/ and index thread headers; 14 homepage; 15 rules and log
 * pages; 16 the script's parts; 17 phones.
 *
 * !important appears only where the markup or a script sets an inline style, and is marked there.
 */

/* ── 1. Tokens ─────────────────────────────────────────────────────────────────────────────────────────────── */
:root {
    color-scheme: dark;

    /* Page */
    --page-bg: #0e1012;              /* outside the page column */
    --bg: #16181b;                   /* the page column */
    --page-edge: #24282d;
    --text: #d1d5da;
    --text-strong: #eceff2;
    --text-muted: #8b939c;
    --font: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-size: 13px;
    --font-mono: Consolas, "DejaVu Sans Mono", Menlo, monospace;

    /* Navigation bar */
    --nav-bg: linear-gradient(#21406a, #1a3352);
    --nav-border: #0c1826;
    --nav-link: #c8d8ea;
    --nav-link-hover: #fff;
    --nav-tab-hover: rgba(255, 255, 255, 0.08);
    --nav-height: 36px;

    /* Links and accents */
    --link: #5aa3e0;
    --link-hover: #8cc3f2;
    --accent: #47a7eb;
    --accent-hover: #8cc3f2;

    /* Blocks: the boxes everything sits in */
    --block-bg: #1d2024;
    --block-border: #2c3036;
    --block-head: linear-gradient(#2a4b70, #213d5c);  /* major header bars */
    --block-head-border: #18304b;
    --block-head-text: #e9f0f7;
    --block-minor-bg: #1a2129;       /* minor header rows */
    --block-minor-text: #9cc0e4;
    --radius: 4px;

    /* Messages */
    --cell-w: 150px;                 /* the user cell */
    --cell-bg: #212429;
    --cell-border: #2f343b;
    --reply-highlight: #1f2b38;      /* a message linked to (#123), or hovered */
    --highlight-border: #3b6d9a;
    --subject: #eceff2;
    --name: #7fb8ea;
    --trip: #79c08b;
    --quote: #8fbf5a;                /* greentext */
    --redtext: #e2645a;
    --heading: #47a7eb;              /* ==heading== */
    --spoiler: #0b0c0d;
    --code-bg: #121417;
    --hr: #2c3036;
    --avatar-silhouette: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 96 96'%3E%3Crect width='96' height='96' fill='%2330353c'/%3E%3Ccircle cx='48' cy='38' r='17' fill='%23596370'/%3E%3Cpath d='M15 96c0-21 14-33 33-33s33 12 33 33z' fill='%23596370'/%3E%3C/svg%3E");

    /* Form */
    --input-bg: #121417;
    --input-border: #353b43;
    --input-focus: #3b6d9a;
    --label-bg: #212429;
    --label-text: #aab2bb;

    /* Buttons */
    --btn-text: #eef3f8;
    --btn-primary: linear-gradient(#3283c4, #2266a0);
    --btn-primary-border: #1a5180;
    --btn-secondary: linear-gradient(#3b4149, #30353c);
    --btn-secondary-border: #24282d;
    --btn-danger: linear-gradient(#b4473f, #923631);
    --btn-danger-border: #6e2723;

    /* The public ban message */
    --ban-bg: #2e1a1a;
    --ban-border: #b4473f;
}

/* ── 2. Base ───────────────────────────────────────────────────────────────────────────────────────────────── */
/* The root size is 15px: navbar.html's phone rules shrink the navbar in rem, sized for it. */
html {
    font-size: 15px;
    background: var(--page-bg);
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}
*, *::before, *::after {
    box-sizing: border-box;
}
/* The page: a column, as a forum's. html has its own background, so body's stays in its box. */
body {
    position: relative;              /* the theme dropdown at its foot is placed in it */
    max-width: 1240px;
    min-height: 100vh;
    margin: 0 auto;
    padding: 0 16px 32px;            /* the dropdown sits in the bottom padding, under the footer */
    background: var(--bg);
    border: solid var(--page-edge);
    border-width: 0 1px;
    box-shadow: 0 0 24px rgba(0, 0, 0, 0.5);
    color: var(--text);
    font: var(--font-size)/1.5 var(--font);
}
a {
    color: var(--link);
    text-decoration: none;
}
a:hover {
    color: var(--link-hover);
    text-decoration: underline;
}
img {
    max-width: 100%;
}
h1, h2, h3 {
    font-weight: normal;
    margin: 0;
}
hr {
    clear: both;
    border: 0;
    border-top: 1px solid var(--hr);
    margin: 16px 0;
}
input, textarea, select, button {
    font: inherit;
    color: inherit;
}
input[type=text], input[type=password], input[type=search], input:not([type]), textarea, select {
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 3px;
    color: var(--text);
    padding: 4px 6px;
}
input[type=text]:focus, input[type=password]:focus, input[type=search]:focus, input:not([type]):focus,
textarea:focus, select:focus {
    border-color: var(--input-focus);
    outline: none;
    box-shadow: 0 0 0 2px rgba(71, 167, 235, 0.15);
}
pre, code {
    font-family: var(--font-mono);
}
.unimportant {
    font-size: 0.85em;
}
.clear, .clearfix {
    clear: both;
}
/* The index page's spacer <br>s round the button bar: the blocks have margins of their own. The two that make
   room for the navbar stay; on the catalog those are the first two (its navbar comes after the header), and the
   two after the navbar would only open a gap. */
body > br:has(+ .pages-center), .pages-center + br,
body.active-catalog #site-navbar + br, body.active-catalog #site-navbar + br + br {
    display: none;
}

/* ── 3. Buttons and small helpers ───────────────────────────────────────────────────────────────────────────────
   XenForo's: primary (blue) for posting, secondary (grey) for the rest, red for deleting. */
.btn {
    display: inline-block;
    border: 1px solid var(--btn-secondary-border);
    border-radius: 3px;
    padding: 4px 12px;
    background: var(--btn-secondary);
    color: var(--btn-text);
    text-align: center;
    vertical-align: middle;
    white-space: nowrap;
    cursor: pointer;
    user-select: none;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
.btn:hover {
    color: #fff;
    text-decoration: none;
    filter: brightness(1.15);
}
.btn.is-disabled, .btn:disabled {
    opacity: 0.45;
    cursor: default;
    filter: none;
}
.btn-post, .btn-report-confirm {
    background: var(--btn-primary);
    border-color: var(--btn-primary-border);
}
.btn-delete-confirm {
    background: var(--btn-danger);
    border-color: var(--btn-danger-border);
}
.btn-catalog, .btn-index, .btn-logs, .btn-page, .btn-log-page, .btn-delete, .btn-report, .btn-boards,
.btn-search, .btn-sort, .btn-draw {
    padding: 3px 9px;
    font-size: 12px;
}
.btn-post {
    padding: 7px 16px;
    font-weight: bold;
}
.btn-sort, .sort-label { margin-right: 16px; }
.log-return, .update-countdown { float: left; }
.reply-link { float: right; }
.form-captcha, .error-message { text-align: center; }
.search-input { padding: 3px 6px; font-size: 12px; }

/* ── 4. The navbar ─────────────────────────────────────────────────────────────────────────────────────────────
   A blue bar of tabs across the window, its content as wide as the page column. On desktop the board groups'
   brackets and slashes (text in the markup) are hidden by a zero font size, the links set their own. The home
   link carries an inline font, colour and padding, hence the !important. Below 876px navbar.html shows the
   compact .boardlist.mobile-only instead: plain text, as arisuchan.xyz has it. */
#site-navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    background: var(--nav-bg);
    border-bottom: 1px solid var(--nav-border);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.45);
    color: var(--nav-link) !important;   /* inline grey on the bar's first child */
    font-size: 13px;
    line-height: var(--nav-height);
}
#site-navbar > .nav-inner {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 10px;
    text-align: left;
    white-space: nowrap;
    color: var(--nav-link) !important;   /* inline */
}
#site-navbar a {
    color: var(--nav-link);
}
#site-navbar a:hover {
    color: var(--nav-link-hover);
    text-decoration: none;
}
/* The home link: the board's name in a logo's place. */
#site-navbar .nav-home {
    font-family: var(--font) !important;   /* inline: Love Letter */
    font-weight: bold;
    color: var(--nav-link-hover) !important; /* inline */
}
#site-navbar .nav-home.desktop-only {
    display: inline-block;
    padding: 0 18px 0 6px !important;      /* inline: 20px */
    font-size: 16px;
    letter-spacing: 0.02em;
}
#site-navbar .nav-home:hover {
    color: var(--accent-hover) !important;
}
/* Its text is "0xfdb", not "home": the link's own text at size 0, the name drawn after it, at the size the home
   link has there (navbar.html shrinks the bar's links from 376px down; .nav-inner a.nav-home outranks it). */
#site-navbar .nav-inner a.nav-home {
    font-size: 0;
}
#site-navbar .nav-home::after {
    content: "0xfdb";
    font-size: 13px;
}
/* A step larger than the tabs' text, its letters (14px of ink) centred in the bar, measured at 1x, 2x and 4x: the
   line box leaves them 1px high on standard screens and 1.5-2px high on dense ones, where text moves by half
   pixels. 11px above and below at 1x; 11/10.5 at 2x, 11.25/10.75 at 4x. */
#site-navbar .nav-home.desktop-only::after {
    position: relative;
    top: 1px;
    font-size: 19px;
}
@media (min-resolution: 1.5dppx) {
    #site-navbar .nav-home.desktop-only::after {
        top: 1.5px;                  /* within half a pixel (1.25px rounds to 1 and is worse) */
    }
}
/* Desktop: at the top of the line like the tabs (and the board list round them, below). On the baseline, these
   made the line (and the bar) 41px instead of the tabs' 36: the tabs' hover stopped short of the bar's foot, and
   the gear (centred for 36px) sat high. */
@media (min-width: 876px) {
    #site-navbar .nav-inner > b, #site-navbar .nav-home.desktop-only, #site-navbar .nav-home.desktop-only::after {
        vertical-align: top;             /* the link, its text, and the <b> the markup wraps it in */
    }
}
/* larpforum.org's brand (static.tmpl marks the page html[data-site]): its seal (the favicon's), "larp" in white and
   "forum" in the accent, the seal and "larp" drawn before the link's text, "forum" after it, both on the ::after's
   size and placement above. */
html[data-site="larpforum.org"] #site-navbar .nav-home::before {
    content: "larp";
    display: inline-block;
    padding-left: 1.45em;
    background: url(/static/larpforum_seal.png) left center / 1.2em 1.2em no-repeat;
    color: #fff;
    font-weight: 800;
    letter-spacing: -0.02em;
    font-size: 13px;
}
html[data-site="larpforum.org"] #site-navbar .nav-home::after {
    content: "forum";
    color: var(--accent);
    font-weight: 600;
    letter-spacing: -0.02em;
}
html[data-site="larpforum.org"] #site-navbar .nav-home:hover::after {
    color: var(--accent-hover);
}
html[data-site="larpforum.org"] #site-navbar .nav-home.desktop-only::before {
    position: relative;
    top: 1px;
    font-size: 19px;
}
@media (min-resolution: 1.5dppx) {
    html[data-site="larpforum.org"] #site-navbar .nav-home.desktop-only::before {
        top: 1.5px;
    }
}
@media (min-width: 876px) {
    html[data-site="larpforum.org"] #site-navbar .nav-home.desktop-only::before {
        vertical-align: top;
    }
}
@media (max-width: 376px) {
    #site-navbar .nav-home::after,
    html[data-site="larpforum.org"] #site-navbar .nav-home::before {
        font-size: 0.85rem;
    }
}
@media (max-width: 340px) {
    #site-navbar .nav-home::after,
    html[data-site="larpforum.org"] #site-navbar .nav-home::before {
        font-size: 0.75rem;
    }
}
/* Desktop: the board links as tabs. */
@media (min-width: 876px) {
    #site-navbar .nav-inner > .desktop-only,
    #site-navbar .nav-webring {
        font-size: 0;                     /* the brackets, slashes and spaces between the links */
        vertical-align: top;              /* their (empty) 36px line boxes in the bar, not 4px below it */
    }
    #site-navbar .nav-inner > .desktop-only a,
    #site-navbar .nav-webring a {
        display: inline-block;
        padding: 0 9px;
        font-size: 13px;
        vertical-align: top;
    }
    #site-navbar .nav-inner > .desktop-only a:hover,
    #site-navbar .nav-webring a:hover {
        background: var(--nav-tab-hover);
    }
    /* The current board (js/theme-forum.js marks it): a tab joined to the page. */
    #site-navbar a.forum-tab-current {
        background: var(--bg);
        color: var(--text-strong);
        box-shadow: inset 0 3px 0 var(--accent);
    }
    /* The mod login (empty in the markup): a key at the bar's end, a full-height tab like the others. */
    #site-navbar a[title="mod login"] {
        display: inline-block !important;    /* navbar.html: .desktop-only { display: inline !important } */
        padding: 0 9px;
        vertical-align: top;
    }
    #site-navbar a[title="mod login"]::before {
        content: "\f084";
        font: 13px FontAwesome;
    }
    #site-navbar a[title="mod login"]:hover {
        background: var(--nav-tab-hover);
    }
    /* The settings gear (board-settings.js puts it inline 90px down the page): at the bar's right end. */
    #board-settings-icon {
        position: fixed !important;
        top: 2px !important;
        right: 10px !important;
        z-index: 51;
        color: var(--nav-link) !important;
        mix-blend-mode: normal !important;
    }
}
/* Phones and tablets: the board links as the desktop's tabs, a little condensed: the groups' brackets, slashes and
   spaces (text in the markup) hidden by a zero font size, each link a 32px tab with its own size, the current board
   marked as on desktop. navbar.html's phone rules shrink the groups (!important)
   and keep the bar to one line; these outrank them, and the bar wraps to as many rows of tabs as it needs.
   A deliberate break from the authoring notes' compact text list (theme-check's mobile-navbar fails by design). */
@media (max-width: 875px) {
    #site-navbar {
        line-height: 1.5;
    }
    /* A wrapping row: the home link, then each group (kept whole) as a row of tabs, every row centred alike.
       The two wrappers round the groups give their children to the row (display: contents). */
    #site-navbar > .nav-inner {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        padding: 0 6px;
        white-space: normal;
        letter-spacing: 0;                 /* navbar.html: -0.5px / -0.8px on the wrappers */
    }
    #site-navbar .nav-inner > .boardlist.mobile-only,
    #site-navbar .nav-inner > div:last-child {
        display: contents !important;      /* navbar.html: .mobile-only { display: inline !important } */
    }
    #site-navbar .nav-home.mobile-only {
        display: inline-block !important;
        padding: 0 8px 0 4px !important;   /* inline: 2px right */
    }
    #site-navbar .boardlist.mobile-only .sub,
    #site-navbar .nav-webring {
        display: inline-flex;
        margin: 0 !important;              /* navbar.html: 4px from 340px down */
        font-size: 0 !important;           /* navbar.html: 0.8rem / 0.72rem !important on the groups */
        white-space: nowrap;
    }
    #site-navbar .boardlist.mobile-only a,
    #site-navbar .nav-inner .nav-webring a {   /* .nav-inner: outranks navbar.html's 340px font size */
        display: inline-block;
        min-width: 28px;                   /* a one-letter board (r, q, λ) still a fingertip wide */
        padding: 0 7px;
        font-size: 13px;
        line-height: 32px;
        text-align: center;
    }
    #site-navbar .boardlist.mobile-only a:hover,
    #site-navbar .nav-webring a:hover {
        background: var(--nav-tab-hover);
        color: var(--nav-link-hover);
    }
    #site-navbar .boardlist.mobile-only a.forum-tab-current {
        background: var(--bg);
        color: var(--text-strong);
        box-shadow: inset 0 3px 0 var(--accent);
    }
    /* The page below the bar: the gap the one-line bar (33px) left, kept under a taller one. main.js measures the
       bar's bottom into --fixed-top (again whenever it changes size); until then, one row (two on larpforum.org's
       phones, below). */
    html {
        --forum-nav-extra: max(0px, calc(var(--fixed-top, 33px) - 33px));
    }
    html body {
        padding-top: var(--forum-nav-extra);   /* html: the 600px rule's padding comes later */
    }
    #board-settings-icon {
        top: calc(90px + var(--forum-nav-extra)) !important;   /* inline 90px, under the one-line bar */
        color: var(--text) !important;
        mix-blend-mode: normal !important;
    }
}
@media (max-width: 600px) {
    html[data-site="larpforum.org"] {
        --forum-nav-extra: max(0px, calc(var(--fixed-top, 65px) - 33px));   /* its wider brand and /cyb/: two rows */
    }
}

/* ── 5. Board header and page furniture ───────────────────────────────────────────────────────────────────────
   As a forum's page head: the banner, then the board's title and description on the left. */
.banner-link {
    display: block;
    margin: 14px 0 0 !important;     /* the page's style centres it with auto margins */
}
img.board_image {
    border: 1px solid var(--block-border);
    border-radius: var(--radius);
    margin: 0 !important;
}
header.board-header {
    margin: 10px 0 8px;
    padding: 0 0 10px;
    border-bottom: 1px solid var(--hr);
}
header h1, .bigtitle {
    color: var(--text-strong);
    font: 24px/1.3 var(--font);
}
header .subtitle {
    color: var(--text-muted);
    font-size: 13px;
    margin-top: 2px;
}
header h1 a {
    color: inherit;
}
/* Online users: a slim info row (its own inline font, colour, padding and centring). */
#fdb-counter {
    justify-content: flex-start !important;
    margin: 0 0 10px;
    padding: 4px 10px !important;
    background: var(--block-minor-bg);
    border: 1px solid var(--block-border);
    border-radius: var(--radius);
    color: var(--text-muted) !important;
    font: 12px/1.8 var(--font) !important;
}
#fdb-counter .viewers-header-text {
    color: var(--block-minor-text);
    opacity: 1 !important;
    font-weight: bold;
}
/* "Posting mode: Reply": the reply form's header bar. Full width (an inline max-width keeps it in the column). */
div.banner {
    margin: 12px 0 0;
    padding: 3px 12px;
    line-height: 21px;
    background: var(--block-head);
    border: 1px solid var(--block-head-border);
    border-radius: var(--radius) var(--radius) 0 0;
    color: var(--block-head-text);
    font-weight: bold;
    font-size: 14px;
    text-align: left;
}
div.banner a {
    color: var(--block-head-text);
    font-size: 12px;
    font-weight: normal;
    margin-left: 6px;
    opacity: 0.8;
}
div.banner a:hover {
    opacity: 1;
}
/* A thread page's: Return and Go to bottom as small buttons at the bar's right, like the bottom bar's (their
   bracketed text hidden by a zero font size, set again by ::after). */
.active-thread div.banner {
    display: flex;
    align-items: center;
    gap: 6px;
}
.active-thread div.banner a {
    margin: 0;
    padding: 1px 8px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--block-head-text);
    font-size: 0;
    line-height: 18px;
    opacity: 1;
    white-space: nowrap;
}
.active-thread div.banner a:hover {
    background: rgba(255, 255, 255, 0.16);
    text-decoration: none;
}
.active-thread div.banner a:first-of-type {
    margin-left: auto;
}
.active-thread div.banner a::before {
    margin-right: 6px;
    font: 11px/18px FontAwesome;
}
.active-thread div.banner a::after {
    font-size: 12px;
}
.active-thread div.banner a:not([href="#bottom"])::before { content: "\f060"; }
.active-thread div.banner a:not([href="#bottom"])::after { content: "Return"; }
.active-thread div.banner a[href="#bottom"]::before { content: "\f063"; }
.active-thread div.banner a[href="#bottom"]::after { content: "Go to bottom"; }
/* "Start a New Thread" on index pages: the forum's "Post thread" button, at the right. */
button.formopen-center {
    display: block;
    margin: 6px 0 10px auto;
    padding: 7px 16px;
    font-size: 13px;
}
button.formopen-center::before {
    content: "\f040";
    font: 13px FontAwesome;
    margin-right: 7px;
}
/* Catalog, board, search and log buttons: the forum's filter bar. Their size is pinned inline (55x23): no
   padding, the label centred on its line. */
div.pages-center {
    margin: 0 0 4px;
    padding: 6px 10px;
    background: var(--block-minor-bg);
    border: 1px solid var(--block-border);
    border-radius: var(--radius);
}
.catalog-search-row {
    justify-content: flex-start;
    margin-top: 0 !important;        /* inline 8px */
}
.catalog-search-row form {
    float: none;
}
.pages-center .btn {
    padding: 0;
    line-height: 21px;
}
.pages-center input.search-input {
    height: 23px;
    width: 160px;
    padding: 0 6px;
}
.new-threads {
    color: var(--text-muted);
    font-size: 12px;
    margin: 0 0 12px;
}
/* The theme dropdown, at the very foot of the page. */
#theme-switcher {
    font-size: 12px;
}

/* ── 6. The post form ─────────────────────────────────────────────────────────────────────────────────────────
   A block: labels in a column on the left (right-aligned, as a forum's form rows), the fields on the right. On a
   thread page "Posting mode: Reply" is its header bar. */
form[name=post] {
    margin: 0 0 24px;
    background: var(--block-bg);
    border: 1px solid var(--block-border);
    border-radius: var(--radius);
}
div.banner + #reply-form-container form[name=post] {
    border-top: 0;
    border-radius: 0 0 var(--radius) var(--radius);
}
form[name=post] table {
    width: 100%;
    border-collapse: collapse;
}
form[name=post] tr + tr > * {
    border-top: 1px solid var(--block-border);
}
form[name=post] th {
    width: 170px;
    background: var(--label-bg);
    border-right: 1px solid var(--cell-border);
    color: var(--label-text);
    text-align: right;
    vertical-align: top;
    padding: 9px 12px;
    font-weight: bold;
}
form[name=post] th .unimportant, form[name=post] th a {
    display: block;
    font-weight: normal;
    font-size: 11px;
}
form[name=post] td {
    padding: 6px 10px;
    vertical-align: top;
}
form[name=post] input[type=text], form[name=post] input[type=password] {
    width: 100%;
    max-width: 380px;
    height: 28px;
    float: none !important;          /* the subject's inline float */
}
form[name=post] input[name=password] {
    max-width: 180px;
}
form[name=post] input[name=post] {
    max-width: 240px;                /* inline width: 100% */
    margin: 0 !important;            /* inline margin-left */
}
/* The comment box and its preview side by side, sharing the field's width. */
form[name=post] .post-compose-editor {
    flex: 1 1 360px;
    width: auto;
    max-width: 640px;
}
form[name=post] .post-compose textarea, form[name=post] textarea[name=body] {
    width: 100% !important;          /* inline width: 320px, and the script's */
    min-height: 140px;
    resize: vertical;
}
form[name=post] .post-format-bar {
    /* The textarea fills the column, so the bar does too. post-format-bar.js copies the textarea's width onto it
       inline, and that fixed width would hold the column (and the textarea) at its old size when the window
       narrows: the form overflowed the page. */
    width: 100% !important;
    background: var(--cell-bg);
    border-color: var(--input-border);
}
form[name=post] .post-compose-preview {
    flex: 1 1 260px;
    background: var(--input-bg);
    border-color: var(--input-border);
    border-radius: 3px;
}
/* "Someone is typing": js/theme-forum.js puts it in the Comment row's label cell, under "Formatting", beside the
   text box (above it on phones), where the writer sees it. Hidden, it keeps its line's room (static.tmpl), so it
   shifts nothing when it shows. Where the markup has it, over the form, it takes no room: the move then shifts
   nothing either (on phones the cell keeps the room for it from the start, below). */
#reply-form-container > .typing-indicator--form {
    display: none;
}
form[name=post] th > .typing-indicator--form {
    justify-content: flex-end;       /* the label cell's text is right-aligned */
    margin: 10px 0 0;
    padding: 0;
    color: var(--accent);
    font-size: 12px;
    font-weight: normal;
    white-space: nowrap;
}
.captcheck_container {
    text-align: left;
}

/* ── 7. Threads and messages ──────────────────────────────────────────────────────────────────────────────────
   Every post is a message: a grid of the user cell (column 1) and the message (column 2). The cell is drawn by
   ::before (a silhouette, for the first paint) and covered by the script's .forum-user when it arrives; both
   span the message's rows, the last of which (1fr) takes whatever height the cell needs beyond the message.

   A reply's rows: 1 the intro (the header), 2 the text, 3 the files ("Attachments"), 4 the backlinks, 5 the
   footer (the script's actions, at the bottom).

   The opening post isn't one element (its files come before .post.op in the markup), so the thread itself is the
   grid: rows 1 .post.op (header, text, omitted count, backlinks), 2 its files, 3 the footer; ::after draws the
   message's box behind them. Everything else in the thread (the replies) spans both columns, below. Only real
   threads: a preview of another board's OP is a .post.op.thread. */
div.thread:not(.post) {
    display: grid;
    grid-template-columns: var(--cell-w) minmax(0, 1fr);
    grid-template-rows: auto auto 1fr;
    isolation: isolate;              /* the message box (::after, z-index -1) stays above the page */
    margin: 0 0 24px;
}
div.thread:not(.post) > * {
    grid-column: 1 / -1;
}
div.thread:not(.post) > .post.op { grid-column: 2; grid-row: 1; }
div.thread:not(.post) > .op-files { grid-column: 2; grid-row: 2; }
div.thread:not(.post) > .forum-actions { grid-column: 2; grid-row: 3; }
div.thread:not(.post) > .forum-user,
div.thread:not(.post)::before { grid-column: 1; grid-row: 1 / span 3; }
div.thread:not(.post)::after {
    content: "";
    grid-column: 1 / -1;
    grid-row: 1 / span 3;
    z-index: -1;
    background: var(--block-bg);
    border: 1px solid var(--block-border);
    border-radius: var(--radius);
}
/* Out of the grid: the anchor (main.js measures where it is; empty), the end-of-thread rule and break. */
div.thread:not(.post) > a.post_anchor {
    position: absolute;
}
div.thread:not(.post) > br, div.thread:not(.post) > hr {
    display: none;
}

.post.reply {
    display: grid;
    grid-template-columns: var(--cell-w) minmax(0, 1fr);
    grid-template-rows: auto auto auto auto 1fr;
    margin: 10px 0 0;
    background: var(--block-bg);
    border: 1px solid var(--block-border);
    border-radius: var(--radius);
    max-width: 100%;
}
.post.reply > * { grid-column: 2; }
.post.reply > .intro { grid-row: 1; }
.post.reply > .body { grid-row: 2; }
.post.reply > .files { grid-row: 3; }
.post.reply > .mentioned { grid-row: 4; }
.post.reply > .forum-actions { grid-row: 5; }
.post.reply > .forum-user,
.post.reply::before { grid-column: 1; grid-row: 1 / span 5; }

/* The user cell's stand-in: a silhouette where the avatar goes. */
div.thread:not(.post)::before, .post.reply::before {
    content: "";
    min-height: 124px;
    background: var(--avatar-silhouette) center 14px / 96px 96px no-repeat, var(--cell-bg);
    border-right: 1px solid var(--cell-border);
    border-radius: var(--radius) 0 0 var(--radius);
}
.post.reply.highlighted, .post.reply:target {
    background: var(--reply-highlight);
    border-color: var(--highlight-border);
}
.post.op.highlighted {
    background: var(--reply-highlight);
}

/* The intro: the message's header row: checkbox, subject, name (until the user cell shows it), time, number,
   then the links at the right. */
p.intro {
    display: flow-root;
    margin: 0;
    padding: 6px 12px;
    border-bottom: 1px solid var(--block-border);
    color: var(--text-muted);
    font-size: 12px;
}
.post.op > p.intro {
    padding: 8px 12px;
}
.intro .subject {
    color: var(--subject);
    font-size: 15px;
    font-weight: bold;
    margin-right: 4px;
}
.intro .name {
    color: var(--name);
    font-weight: bold;
}
.intro .trip {
    color: var(--trip);
}
.intro .capcode {
    color: var(--redtext);
    font-weight: bold;
}
.intro time {
    color: var(--text-muted);
}
.intro a.post_no {
    color: var(--link);              /* link-coloured, not the intro's grey */
}
.intro a.post_no:hover {
    color: var(--link-hover);
}
.intro input.delete {
    margin: 0 6px 0 0;
    vertical-align: middle;
}
.intro i.fa {
    margin-left: 6px;                /* sticky, lock, bumplock: clear of the number */
    color: var(--accent);
}
/* With the user cell filled (the script marks the post), the name is there, not here. */
.forum-has-user > .intro .name, .forum-has-user > .intro .trip, .forum-has-user > .intro .capcode {
    display: none;
}
/* An OP's links as small buttons at the right of its header row: Open (the markup's [Reply]: every message has its
   own Reply in its footer, so the thread link is named for what it does), Hide, Watch / Unwatch (the markup's
   [Ignore]) and Last 50. Their bracketed text is hidden by a zero font size and set again by ::after, as in the
   thread's bottom bar; phones show them the same, on a row of their own. A reply's [✕] is Hide too, in the footer actions' look. */
:is(.post.op .intro, p.thread-hidden) > a.reply-link, .intro a.watchThread, .intro :is(a.hide-thread-link, a.hide-reply-link), :is(.post.op .intro, p.thread-hidden) > a[href*="+50.html"] {
    float: right;
    margin: 0 0 0 6px;
    padding: 1px 8px;
    border: 1px solid var(--btn-secondary-border);
    border-radius: 3px;
    background: var(--btn-secondary);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
    color: var(--btn-text);
    font-size: 0;
    line-height: 18px;
    white-space: nowrap;
}
:is(.post.op .intro, p.thread-hidden) > a.reply-link:hover, .intro a.watchThread:hover, .intro :is(a.hide-thread-link, a.hide-reply-link):hover,
:is(.post.op .intro, p.thread-hidden) > a[href*="+50.html"]:hover {
    color: #fff;
    text-decoration: none;
    filter: brightness(1.15);
}
:is(.post.op .intro, p.thread-hidden) > a.reply-link::before, .intro a.watchThread::before, .intro :is(a.hide-thread-link, a.hide-reply-link)::before,
:is(.post.op .intro, p.thread-hidden) > a[href*="+50.html"]::before {
    margin-right: 6px;
    font: 11px/18px FontAwesome;
    vertical-align: top;
}
:is(.post.op .intro, p.thread-hidden) > a.reply-link::after, .intro a.watchThread::after, .intro :is(a.hide-thread-link, a.hide-reply-link)::after,
:is(.post.op .intro, p.thread-hidden) > a[href*="+50.html"]::after {
    font-size: 12px;
    line-height: 18px;
    vertical-align: top;
}
:is(.post.op .intro, p.thread-hidden) > a.reply-link {
    background: var(--btn-primary);
    border-color: var(--btn-primary-border);
}
:is(.post.op .intro, p.thread-hidden) > a.reply-link::before { content: "\f061"; }
:is(.post.op .intro, p.thread-hidden) > a.reply-link::after { content: "Open"; }
.intro :is(a.hide-thread-link, a.hide-reply-link)::before { content: "\f070"; }
.intro :is(a.hide-thread-link, a.hide-reply-link)::after { content: "Hide"; }
.intro a.watchThread::before { content: "\f06e"; }
.intro a.watchThread::after { content: "Watch"; }
.intro a.watchThread.watching {
    border-color: var(--highlight-border);
    color: var(--block-minor-text);
}
.intro a.watchThread.watching::before { content: "\f070"; }
.intro a.watchThread.watching::after { content: "Unwatch"; }
:is(.post.op .intro, p.thread-hidden) > a[href*="+50.html"]::before { content: "\f0cb"; }
:is(.post.op .intro, p.thread-hidden) > a[href*="+50.html"]::after { content: "Last 50"; }
/* A reply's Hide: the OP's label and icon, but drawn like the footer's Report / Quote / Reply (plain muted text,
   no button), which sits better in a reply's slimmer header. Phones keep the label too, as the footer does. */
.post.reply > .intro a.hide-reply-link {
    margin: 0 0 0 6px;
    padding: 0;
    border: 0;
    background: none;
    box-shadow: none;
    color: var(--text-muted);
}
.post.reply > .intro a.hide-reply-link:hover {
    color: var(--link-hover);
    filter: none;
}
.post.reply > .intro a.hide-reply-link::before {
    margin-right: 5px;
    font-size: 12px;
}
body.active-thread .hide-thread-link {
    display: none;
}
/* A hidden post or thread, zipped up into one bar: the script hides the post and puts a copy of its header after
   it, [+] first. The bar is the message box in miniature: [+] becomes a "Show" strip where the user cell was,
   then the subject, name and time, a muted "Hidden post" / "Hidden thread" at the right and, for a thread, its
   Last 50 and Open buttons. A hidden thread's own grid goes: its box, cell, files and footer are the OP's. */
div.thread:not(.post):has(> .post.op.manually-hidden) {
    display: block;
}
div.thread:not(.post):has(> .post.op.manually-hidden)::before,
div.thread:not(.post):has(> .post.op.manually-hidden)::after {
    content: none;
}
div.thread:not(.post):has(> .post.op.manually-hidden) > :is(.forum-user, .op-files, .forum-actions) {
    display: none;
}
p.intro.reply-hidden, p.intro.thread-hidden {
    display: flex;
    align-items: center;
    gap: 0 6px;
    min-height: 34px;
    padding: 0 12px 0 0;
    background: var(--block-bg);
    border: 1px solid var(--block-border);
    border-radius: var(--radius);
    color: var(--text-muted);
}
p.intro.reply-hidden {
    margin: 10px 0 0;
}
p.intro.reply-hidden > label, p.intro.thread-hidden > label {
    min-width: 0;
    overflow: hidden;
    padding-left: 6px;
    text-overflow: ellipsis;
    white-space: nowrap;
}
p.intro.thread-hidden .subject {
    font-size: 13px;
}
p.intro.reply-hidden::after, p.intro.thread-hidden::after {
    order: 1;
    margin-left: auto;
    padding-left: 12px;
    font-style: italic;
    white-space: nowrap;
}
p.intro.reply-hidden::after { content: "Hidden post"; }
p.intro.thread-hidden::after { content: "Hidden thread"; }
p.intro.thread-hidden > a {
    order: 2;
}
p.intro.thread-hidden > a.reply-link {
    order: 3;                        /* Open last, as in the OP's header */
}
p.intro.thread-hidden > a.unhide-thread-link {
    order: -1;
}
p.intro.reply-hidden .trip, p.intro.thread-hidden .trip {
    margin-left: 4px;
}
p.intro.thread-hidden > :is(a.reply-link, a[href*="+50.html"]) {
    float: none;
    margin: 0;
}
a.unhide-reply-link, a.unhide-thread-link {
    display: flex;
    align-self: stretch;
    align-items: center;
    justify-content: center;
    flex: 0 0 var(--cell-w);
    box-sizing: border-box;
    background: var(--cell-bg);
    border-right: 1px solid var(--cell-border);
    border-radius: var(--radius) 0 0 var(--radius);
    color: var(--block-minor-text);
    font-size: 0;
}
a.unhide-reply-link:hover, a.unhide-thread-link:hover {
    background: var(--reply-highlight);
    color: var(--link-hover);
    text-decoration: none;
}
a.unhide-reply-link::before, a.unhide-thread-link::before {
    content: "\f065";
    margin-right: 6px;
    font: 11px/18px FontAwesome;
}
a.unhide-reply-link::after { content: "Show post"; font-size: 12px; line-height: 18px; }
a.unhide-thread-link::after { content: "Show thread"; font-size: 12px; line-height: 18px; }
.omitted {
    display: block;
    margin: 0 12px 8px;
    color: var(--text-muted);
    font-size: 12px;
    font-style: italic;
}
/* "Replies: >>12 >>15": a row of its own at the message's foot. "Replies:" is a <sub>: kept on the baseline. */
.mentioned {
    display: block;
    padding: 0 12px 8px;
    color: var(--text-muted);
    font-size: 11px;
    line-height: 1.5;
}
.mentioned sub {
    vertical-align: baseline;
    font-size: 1em;
}
.mentioned a {
    margin-right: 4px;
}

/* ── 8. Post text ──────────────────────────────────────────────────────────────────────────────────────────── */
div.body {
    margin: 0;
    padding: 10px 12px 12px;
    font-size: 14px;
    line-height: 1.6;
    white-space: pre-wrap;
    overflow-wrap: break-word;
}
.post.reply div.body {
    margin-left: 0;
}
div.body a {
    color: var(--link);
    text-decoration: underline;
    text-decoration-color: rgba(90, 163, 224, 0.4);
}
div.body a:hover {
    color: var(--link-hover);
}
.quote {
    color: var(--quote);
}
.redtext {
    color: var(--redtext);
}
.heading {
    color: var(--heading);
    font-size: 1.15em;
    font-weight: bold;
}
.spoiler {
    background: var(--spoiler);
    color: var(--spoiler);
    padding: 0 2px;
    border-radius: 2px;
}
.spoiler:hover {
    color: var(--text);
}
div.body pre {
    white-space: pre;
    overflow-x: auto;
    max-width: 100%;
    margin: 6px 0;
}
div.body code {
    background: var(--code-bg);
    border: 1px solid var(--block-border);
    border-radius: 3px;
    padding: 0 3px;
    font-size: 13px;
}
div.body pre code {
    display: block;
    padding: 8px 10px;
}
.toolong {
    display: block;
    color: var(--text-muted);
    margin-top: 6px;
    font-size: 12px;
}
/* The public ban message: always its own line under the text. */
.public_ban {
    display: block;
    width: fit-content;
    margin: 8px 0 0;
    padding: 4px 10px;
    background: var(--ban-bg);
    border: 1px solid var(--ban-border);
    border-radius: 3px;
    color: var(--redtext);
    font-weight: bold;
}

/* ── 9. Files ─────────────────────────────────────────────────────────────────────────────────────────────────
   The message's "Attachments": under the text, each file a small box (its name and size over the picture), in a
   row that wraps. */
.files:has(.file) {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 8px 10px;
    padding: 0 12px 12px;
}
.files:has(.file)::before {
    content: "Attachments";
    flex: 0 0 100%;
    padding-top: 8px;
    border-top: 1px dashed var(--block-border);
    color: var(--text-muted);
    font-size: 11px;
    font-weight: bold;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}
.file {
    display: flow-root;
    max-width: 100%;
    padding: 6px;
    background: var(--cell-bg);
    border: 1px solid var(--cell-border);
    border-radius: 3px;
}
p.fileinfo {
    max-width: 260px;
    margin: 0 0 4px;
    color: var(--text-muted);
    font-size: 11px;
    overflow-wrap: anywhere;
}
p.fileinfo .unimportant {
    font-size: 1em;
}
.file.multifile p.fileinfo .unimportant {
    display: block;              /* size and name under "File:" */
}
.file > :not(.fileinfo) {
    float: none;
    margin: 0;
}
.file > a {
    display: block;
    width: fit-content;
}
.post-image {
    display: block;
    height: auto;                /* never stretched */
    max-width: 250px;
    margin: 0;
    border: 0;
    border-radius: 2px;
}
/* Video and embed thumbnails: capped like an image's. */
.youtube-placeholder {
    position: relative;
    display: inline-block;
    max-width: 250px;
}
.youtube-placeholder img {
    display: block;
    max-width: 250px;
    height: auto;
}
/* A webm.cafe video: webm.cafe's cup over the middle of its thumbnail, as the button that plays it (the other
   providers' placeholders show their thumbnail alone). */
.youtube-placeholder .play-icon.webmcafe {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 68px;
    height: 48px;
    transform: translate(-50%, -50%);
    background: url(/static/webmcafe-play.svg) no-repeat center/contain;
    opacity: 0.92;
}
.video-container {
    max-width: 100%;
}
/* An image opened in the gallery or lightbox (js's .full-image): over the whole window, on a dark ground. */
.file a .full-image {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 100;
    display: flex;
    box-sizing: border-box;
    width: 100vw;
    height: 100vh;
    max-width: none;
    padding: 23px;
    background: rgba(0, 0, 0, 0.8);
    object-fit: contain;
    overflow: visible;
    border-radius: 0;
}
/* An image expanded in place: as wide as the message allows. */
img.inline-mode-full-image {
    max-width: 100%;
    height: auto;
}

/* ── 10. Hover previews (App Mode off) ──────────────────────────────────────────────────────────────────────
   A reply's preview is a copy of the message, user cell and all, in a floating box. */
.post-hover {
    background: var(--block-bg);
    border: 1px solid var(--highlight-border) !important;  /* post-hover.js: inline border-style */
    border-radius: var(--radius);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.6);
    max-width: 600px;
}
.post-hover.reply.highlighted {
    background: var(--block-bg);
}
.post-hover.op {
    padding: 0 0 4px;
}
.post-hover .post-image {
    max-width: 200px;
}
/* Another board's opening post: the same box. */
.floating.thread, .thread-hover {
    display: block;
    margin: 0;
    background: var(--block-bg);
    border: 1px solid var(--highlight-border);
    border-radius: var(--radius);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.6);
}
.floating.thread .fileinfo .unimportant {
    display: none;
}
.floating.thread .post-image {
    max-width: 200px;
}
.floating.thread .body {
    display: -webkit-box;
    -webkit-line-clamp: 20;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ── 11. Pagination, thread links, moderation fields, footer ─────────────────────────────────────────────────
   Page numbers as the forum's page buttons: the brackets between them (text) are hidden by a zero font size. */
body:not(.active-catalog) div.pages {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
    margin: 16px 0 8px !important;   /* inline margin-left */
    padding: 6px 8px;
    background: var(--block-minor-bg);
    border: 1px solid var(--block-border);
    border-radius: var(--radius);
    color: var(--text-muted);
    font-size: 0;
}
body:not(.active-catalog) div.pages > * {
    font-size: 12px;
}
div.pages a:not(.btn) {
    display: inline-block;
    min-width: 26px;
    padding: 2px 6px;
    background: var(--cell-bg);
    border: 1px solid var(--cell-border);
    border-radius: 3px;
    color: var(--link);
    font-size: 12px;
    text-align: center;
}
div.pages a:not(.btn):hover {
    border-color: var(--highlight-border);
    text-decoration: none;
}
div.pages a.selected {
    background: var(--btn-primary);
    border-color: var(--btn-primary-border);
    color: #fff;
    font-weight: bold;
}
div.pages .catalog_webring {
    display: inline-block;
    margin: 0 0 0 8px !important;    /* inline margin-top */
}
/* A thread page's bottom bar: Return, Go to top, Catalog and Post a Reply as small buttons, auto-reload's Update
   and status after them, REPORT and DELETE on the right. The links' bracketed text is hidden by a zero font size
   and set again by ::after; the markup's inline floats and margins are overridden. */
#thread-interactions {
    display: flex !important;        /* inline display: block */
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin: 14px 0;
    padding: 8px 10px;
    background: var(--block-minor-bg);
    border: 1px solid var(--block-border);
    border-radius: var(--radius);
}
#thread-links, #thread-quick-reply {
    display: contents;
}
#updater {
    display: contents !important;    /* inline display: flex */
}
#thread-links a, #thread-quick-reply a, #updater a {
    display: inline-block;
    margin: 0;
    padding: 3px 9px !important;     /* #update_thread's inline padding-left */
    border: 1px solid var(--btn-secondary-border);
    border-radius: 3px;
    background: var(--btn-secondary);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
    color: var(--btn-text);
    font-size: 0;
    line-height: 18px;
    white-space: nowrap;
}
#thread-links a:hover, #thread-quick-reply a:hover, #updater a:hover {
    color: #fff;
    text-decoration: none;
    filter: brightness(1.15);
}
#thread-links a::before, #thread-quick-reply a::before, #updater a::before {
    margin-right: 6px;
    font: 12px/18px FontAwesome;
}
#thread-links a::after, #thread-quick-reply a::after, #updater a::after {
    font-size: 12px;
}
/* The labels and icons line up with the links' zero-size text by their tops: on its baseline the 12px text
   would make the line 4px taller than its 18px line-height. */
.active-thread div.banner a::before, .active-thread div.banner a::after,
#thread-links a::before, #thread-links a::after, #thread-quick-reply a::before, #thread-quick-reply a::after,
#updater a::before, #updater a::after,
#post-moderation-fields > .btn::before, #post-moderation-fields > .btn::after {
    vertical-align: top;
    line-height: 18px;
}
#thread-return::before { content: "\f060"; }
#thread-return::after { content: "Return"; }
#thread-top::before { content: "\f062"; }
#thread-top::after { content: "Go to top"; }
#thread-catalog::before { content: "\f009"; }
#thread-catalog::after { content: "Catalog"; }
#link-quick-reply::before { content: "\f112"; }
#link-quick-reply::after { content: "Post a Reply"; }
#update_thread::before { content: "\f021"; }
#update_thread::after { content: "Update"; }
#thread-quick-reply a {
    background: var(--btn-primary);
    border-color: var(--btn-primary-border);
}
#thread-interactions .update-countdown {
    display: block !important;       /* inline display: flex */
    float: none;
    margin-left: 4px;
    color: var(--text-muted);
    font-size: 12px;
}
/* REPORT and DELETE: the wrapper's box goes (its inline margin-right too), the buttons pushed right; an opened
   delete or report box gets a row of its own under them. */
#thread-interactions #post-moderation-fields {
    display: contents;
}
#thread-interactions #post-moderation-fields > br {
    display: none;
}
#thread-interactions #post-moderation-fields > .btn {
    float: none !important;          /* inline float: right and margin-right: 1vw */
    margin: 0 !important;
}
#thread-interactions #post-moderation-fields > .btn-report { order: 1; margin-left: auto !important; }
#thread-interactions #post-moderation-fields > .btn-delete { order: 2; }
#thread-interactions #delete-fields { order: 3; }
#thread-interactions #report-fields { order: 4; }
/* REPORT and DELETE (here and on board indexes): their markup text is upper case, set again in the footer
   actions' case with their icons. */
#post-moderation-fields > .btn {
    font-size: 0;
    line-height: 18px;
}
#post-moderation-fields > .btn::before {
    margin-right: 6px;
    font: 12px/18px FontAwesome;
}
#post-moderation-fields > .btn::after {
    font-size: 12px;
}
#post-moderation-fields > .btn-report::before { content: "\f024"; }
#post-moderation-fields > .btn-report::after { content: "Report"; }
#post-moderation-fields > .btn-delete::before { content: "\f1f8"; }
#post-moderation-fields > .btn-delete::after { content: "Delete"; }
#post-moderation-fields {
    float: right;
    text-align: right;
    margin: 10px 0;
}
#post-moderation-fields .btn {
    margin-left: 6px;
}
/* The delete and report boxes: a heading, then the fields in a row. Their text ("Delete Post [", "]", the
   report's run of &nbsp;) is hidden by a zero font size, the heading is ::before. */
#delete-fields, #report-fields {
    box-sizing: border-box;
    margin-top: 8px;
    padding: 8px 10px 10px;
    background: var(--block-bg);
    border: 1px solid var(--block-border);
    border-radius: var(--radius);
    text-align: left;
    font-size: 0;
}
/* In the bar: a line of their own (the 100% basis wraps them), shrunk by the margin to 440px at the right. */
#thread-interactions #delete-fields, #thread-interactions #report-fields {
    flex: 0 1 100%;
    min-width: 0;
    margin: 2px 0 0 max(0px, 100% - 440px);
}
#delete-fields::before, #report-fields::before {
    display: block;
    margin-bottom: 8px;
    color: var(--text-strong);
    font-size: 12px;
    font-weight: bold;
}
#delete-fields::before { content: "Delete post"; }
#report-fields::before { content: "Report post"; }
#delete-fields > *, #report-fields > * {
    font-size: 12px;
}
#delete-fields > input[type=checkbox] {
    margin: 0 6px 0 0;
    vertical-align: middle;
    transform: none !important;      /* inline translateY(2px) */
}
#delete-fields > label {
    color: var(--text);
    vertical-align: middle;
}
#delete-fields > div, #report-fields > div:not(.captcheck_container) {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
}
#delete-fields > div label, #report-fields > div label {
    color: var(--label-text);
}
#delete-fields input, #report-fields input {
    margin: 0;
}
#delete-fields input[type=password], #report-fields input[type=text] {
    flex: 1;
    min-width: 0;
}
#report-fields .captcheck_container:not(:empty) {
    margin-top: 8px;
}
/* The footer: the forum's dark strip. */
footer {
    clear: both;
    margin: 24px -16px 0;
    padding: 10px 16px;
    background: var(--nav-bg);
    border-top: 1px solid var(--nav-border);
    color: var(--nav-link);
    text-align: center;
}
footer .unimportant {
    display: block;
    margin: 4px 0;
    font-size: 11px;
}
footer a {
    color: var(--nav-link-hover);
}

/* ── 12. Catalog ──────────────────────────────────────────────────────────────────────────────────────────────
   Threads as cards. The catalog's own style comes later in the page, so these rules name #Grid to win. Tiles keep
   a fixed height, the text filling the rest (a click lets it scroll inside the tile instead of growing it). */
.catalog-controls-bar {
    padding: 0;
}
.active-catalog .catalog-container {
    padding: 0;
}
.catalog-container #Grid {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
}
#Grid .tiles.grid-li {
    position: relative;
    height: 330px;
    min-width: 0;
    min-height: 0;
    padding: 8px 0 6px;
    background: var(--block-bg);
    border: 1px solid var(--block-border);
    border-radius: var(--radius);
    box-shadow: none;
    text-align: center;
}
#Grid .tiles.grid-li:hover {
    border-color: var(--highlight-border);
}
#Grid .post-info {
    display: contents;
}
#Grid .thread-image-container {
    order: 1;
    height: auto;
    margin: 0;
}
#Grid .thread-image {
    width: auto;
    height: auto;
    max-width: 150px;
    max-height: 150px;
    border-radius: 3px;
    box-shadow: 0 0 6px rgba(0, 0, 0, 0.5);
}
#Grid .stats {
    order: 2;
    margin: 4px 0 2px;
    color: var(--text-muted);
    font-size: 11px;
    line-height: 1.2;
}
#Grid .post-info-header {
    order: 3;
    display: block;
    min-height: 0;
    margin: 0;
    padding: 0 10px;
    line-height: 1.3;
}
#Grid .post-subject {
    display: inline;
    padding: 0;
    margin: 0;
    color: var(--text-strong);
    font-weight: bold;
    white-space: normal;
}
#Grid .post-subject:hover {
    color: var(--link-hover);
}
#Grid .post-icons {
    top: 10px;
    left: auto;
    right: 12px;
    transform: none;
    padding: 0;
}
#Grid .post-icons i {
    margin: 0 0 0 2px;
    color: var(--accent);
    font-size: 1em;
}
#Grid .post-message {
    order: 4;
    display: block;
    flex: 1 1 0;
    min-height: 0;
    padding: 2px 10px 0;
    font-size: inherit;
    line-height: 1.35;
}
#Grid .post-message .heading {
    font-size: inherit;
}

/* ── 13. /all/ and index pages: the board name over each thread, as the thread block's header bar ─────────── */
h2.thread {
    clear: both;
    margin: 0;
    padding: 7px 12px;
    background: var(--block-head);
    border: 1px solid var(--block-head-border);
    border-radius: var(--radius) var(--radius) 0 0;
    font: bold 13px/1.5 var(--font);
}
h2.thread a.ukko-boardlink {
    color: var(--block-head-text);
}
h2.thread a.ukko-boardlink:hover {
    color: var(--accent-hover);
}
h2.thread + div.thread::after {
    border-top: 0;
    border-radius: 0 0 var(--radius) var(--radius);
}
h2.thread + div.thread::before {
    border-top-left-radius: 0;
}

/* ── 14. Homepage ─────────────────────────────────────────────────────────────────────────────────────────────
   The about text and the two lists (recent images, latest posts) as blocks with header bars. */
body.homepage .container {
    max-width: 1060px;
    margin: 48px auto 0;
}
#tan-avatar {
    display: none;
}
.about-section, .recent-section {
    background: var(--block-bg);
    border: 1px solid var(--block-border);
    border-radius: var(--radius);
    overflow: hidden;
}
.about-section {
    margin: 0 auto 16px;
    padding: 0 0 14px;
}
.about-section::before {
    content: "Welcome";
    display: block;
    padding: 7px 12px;
    background: var(--block-head);
    border-bottom: 1px solid var(--block-head-border);
    color: var(--block-head-text);
    font: bold 14px/1.5 var(--font);
}
.about-section p {
    margin: 12px 16px;
    font-size: 14px;
}
.board-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin: 10px 16px 0;
}
.board-links a {
    min-width: 110px;
    padding: 8px 16px;
    background: var(--cell-bg);
    border: 1px solid var(--cell-border);
    border-radius: var(--radius);
    color: var(--text-strong);
    font-size: 15px;
    font-weight: bold;
    text-align: center;
}
.board-links a:hover {
    border-color: var(--highlight-border);
    color: var(--link-hover);
    text-decoration: none;
}
.sections-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    justify-content: center;
}
.recent-section {
    flex: 1 1 400px;
    max-width: 522px;
    min-width: 0;
}
.section-title {
    padding: 7px 12px;
    margin: 0 0 8px;
    background: var(--block-head);
    border-bottom: 1px solid var(--block-head-border);
    color: var(--block-head-text);
    font: bold 14px/1.5 var(--font);
}
.post-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    padding: 4px 12px 12px;
}
.post-grid img {
    display: block;
    max-width: 140px;
    height: auto;
    border: 1px solid var(--cell-border);
    border-radius: 3px;
}
.posts-list ul, .recent-section .stats ul {
    list-style: none;
    margin: 0;
    padding: 0 12px 8px;
}
.posts-list li {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 4px 0;
    border-bottom: 1px solid var(--block-border);
}
.posts-list li:last-child {
    border-bottom: 0;
}
.posts-list a {
    color: var(--link);
}
.posts-list a:hover {
    color: var(--link-hover);
}
.recent-section .stats {
    padding-top: 8px;
    background: var(--block-minor-bg);
    border-top: 1px solid var(--block-border);
    color: var(--text-muted);
    font-size: 12px;
}

/* With the script (html.js): a forum's front page. The main column is the script's board list (.forum-nodes, put
   before Latest Posts) and Latest Posts (the stats its footer); the sidebar, floated right, is Welcome (its
   service links a grid of small buttons) and Recent Images. Floats, so each column stacks on its own. Latest
   Posts waits hidden until the list is in (at most 2 s), so it doesn't jump down when it arrives. Without JS: the layout above. */
html.js body.homepage .container {
    display: flow-root;
    max-width: none;
    margin: 14px 0 0;
}
html.js body.homepage .sections-wrapper {
    display: contents;
}
html.js body.homepage .about-section,
html.js body.homepage .recent-section:has(.post-grid) {
    float: right;
    clear: right;
    width: 300px;
    max-width: none;
    margin: 0 0 12px 16px;
}
html.js body.homepage .forum-nodes,
html.js body.homepage .recent-section:has(.posts-list) {
    max-width: none;
    margin: 0 316px 12px 0;
}
html.js body.homepage .container:not(:has(.forum-nodes)) .recent-section:has(.posts-list) {
    animation: forum-home-wait 0s 2s both;   /* hidden until the list is in, or for 2 s if it never comes */
}
@keyframes forum-home-wait {
    from { visibility: hidden; }
    to { visibility: visible; }
}
html.js body.homepage .about-section p {
    margin: 10px 12px;
    font-size: 13px;
}
html.js body.homepage .about-section {
    padding-bottom: 12px;
}
html.js body.homepage .board-links {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    margin: 6px 12px 0;
}
html.js body.homepage .board-links a {
    min-width: 0;
    padding: 4px 6px;
    font-size: 12px;
}
html.js body.homepage .post-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    padding: 4px 12px 12px;
}
html.js body.homepage .post-grid img {
    width: 100%;
    max-width: none;
    aspect-ratio: 1;
    object-fit: cover;
}
/* The homepage header: the site's name and tagline on the left, the forum's totals on the right, across both
   columns; a fixed height (held as the container's top padding until the script adds it, or for 2 s if it never
   does), so the page doesn't move when it arrives. */
html.js body.homepage .container:not(:has(> .forum-home-head)) {
    animation: forum-home-room 0s 2s both;
}
@keyframes forum-home-room {
    from { padding-top: 108px; }
    to { padding-top: 0; }
}
.forum-home-head {
    box-sizing: border-box;
    display: flex;
    align-items: center;
    gap: 24px;
    height: 96px;
    margin: 0 0 12px;
    padding: 0 24px;
    background: var(--nav-bg);
    border: 1px solid var(--nav-border);
    border-radius: var(--radius);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
.forum-home-brand {
    flex: 1;
    min-width: 0;
}
.forum-home-brand h1 {
    margin: 0;
    overflow: hidden;
    color: var(--nav-link-hover);
    font: bold 28px/1.2 var(--font);
    text-overflow: ellipsis;
    white-space: nowrap;
}
.forum-home-brand p {
    margin: 4px 0 0;
    overflow: hidden;
    color: var(--nav-link);
    font-size: 13px;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.forum-home-stats {
    display: flex;
    margin: 0;
}
.forum-home-stats > div {
    min-width: 76px;
    padding: 0 14px;
    text-align: center;
}
.forum-home-stats > div + div {
    border-left: 1px solid rgba(255, 255, 255, 0.12);
}
.forum-home-stats dt {
    color: var(--nav-link);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.forum-home-stats dd {
    margin: 2px 0 0;
    color: var(--nav-link-hover);
    font-size: 20px;
    font-weight: bold;
}

/* The header shows the tagline: the Welcome text drops its copy (and the <br> before it). */
body.homepage .container:has(> .forum-home-head) .about-section :is(.about-tagline, br:has(+ .about-tagline)) {
    display: none;
}

/* The board list. */
.forum-nodes {
    container-type: inline-size;     /* its rows switch layout on its own width (below) */
    background: var(--block-bg);
    border: 1px solid var(--block-border);
    border-radius: var(--radius);
    overflow: hidden;
}
.forum-nodes-head {
    margin: 0;
    padding: 7px 12px;
    background: var(--block-head);
    border-bottom: 1px solid var(--block-head-border);
    color: var(--block-head-text);
    font: bold 14px/1.5 var(--font);
}
.forum-node {
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr) 150px 240px;
    align-items: center;
    gap: 12px;
    min-height: 56px;
    padding: 8px 12px;
}
.forum-node + .forum-node {
    border-top: 1px solid var(--block-border);
}
.forum-node:nth-of-type(even) {
    background: var(--cell-bg);
}
.forum-node-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--block-minor-bg);
    border: 1px solid var(--block-border);
    box-sizing: border-box;
    color: var(--text-muted);
    font: 16px/34px FontAwesome;
    text-align: center;
}
.forum-node-icon::before {
    content: "\f086";
}
.forum-node-new .forum-node-icon {
    border-color: var(--highlight-border);
    color: var(--accent);
}
.forum-node-title {
    color: var(--text-strong);
    font-size: 15px;
    font-weight: bold;
}
.forum-node-new .forum-node-title {
    color: var(--link);
}
.forum-node-title:hover {
    color: var(--link-hover);
    text-decoration: none;
}
.forum-node-uri {
    margin-top: 2px;
    color: var(--text-muted);
    font-size: 12px;
}
.forum-node-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    margin: 0;
    text-align: center;
}
.forum-node-stats dt {
    color: var(--text-muted);
    font-size: 11px;
}
.forum-node-stats dd {
    margin: 0;
    color: var(--text-strong);
    font-size: 14px;
}
.forum-node-latest {
    min-width: 0;
    min-height: 32px;                /* its two lines, held until the catalog arrives (on phones they're a row) */
    font-size: 12px;
}
.forum-node-thread {
    display: block;
    overflow: hidden;
    color: var(--link);
    text-overflow: ellipsis;
    white-space: nowrap;
}
.forum-node-when, .forum-node-none {
    margin-top: 2px;
    color: var(--text-muted);
}
/* A narrow list (under 700px: the sidebar squeezes it from ~1050px viewports, before the phone layout): a row
   puts its counts beside the name and its latest thread under them, as on phones. */
@container (max-width: 699px) {
    .forum-node {
        grid-template-columns: 36px minmax(0, 1fr) auto;
        row-gap: 4px;
    }
    .forum-node-latest {
        grid-column: 2 / -1;
    }
    .forum-node-stats {
        gap: 10px;
    }
}

/* ── 15. Rules and log pages ──────────────────────────────────────────────────────────────────────────────── */
/* The rules page's head, as a board page's: "Rules" (upper case in the markup: set again by ::after) on the left
   over a rule, without the markup's <br> gaps round it (the two right after the navbar, its room, stay). */
body.active-rules > br:not(#site-navbar + br, #site-navbar + br + br) {
    display: none;
}
body.active-rules h1 {
    margin: 14px 0 12px;
    padding: 0 0 10px;
    border-bottom: 1px solid var(--hr);
    color: var(--text-strong);
    font: 0/1.3 var(--font);
    text-align: left;
}
body.active-rules h1::after {
    content: "Rules";
    font-size: 24px;
}
/* The rules: a forum box (the markup's inline box style overridden) under a "Site rules" header bar, one numbered
   row per rule. */
body.active-rules .post {
    width: auto;
    max-width: 100%;
    margin: 0 0 24px !important;
    padding: 0 !important;
    background: var(--block-bg) !important;
    color: var(--text) !important;
    border: 1px solid var(--block-border) !important;
    border-radius: var(--radius);
    box-shadow: none !important;
    overflow: hidden;
    counter-reset: rule;
    font-size: 14px;
}
body.active-rules .post::before {
    content: "Site rules";
    display: block;
    padding: 7px 12px;
    background: var(--block-head);
    border-bottom: 1px solid var(--block-head-border);
    color: var(--block-head-text);
    font-size: 14px;
    font-weight: bold;
}
body.active-rules .post > p {
    display: flex;
    gap: 12px;
    margin: 0;
    padding: 10px 12px;
    line-height: 1.5;
    counter-increment: rule;
}
body.active-rules .post > p + p {
    border-top: 1px solid var(--block-border);
}
body.active-rules .post > p:nth-of-type(even) {
    background: var(--cell-bg);
}
body.active-rules .post > p::before {
    content: counter(rule);
    flex: 0 0 24px;
    height: 21px;
    border-radius: 3px;
    background: var(--block-minor-bg);
    border: 1px solid var(--block-border);
    box-sizing: border-box;
    color: var(--block-minor-text);
    font-size: 12px;
    font-weight: bold;
    line-height: 19px;
    text-align: center;
}
/* The webring page (hand-built, inline styles throughout): a board page's head ("Webring", from the markup's
   "OUR FRIENDS" heading, moved to the top), then forum boxes: "Link to us" (the 88x31 and 200x70 lines), "Our
   friends" (the button wall) and the boards table under a "Boards" header bar with its Refresh button. The page's
   own clearfix ::before/::after on the rows give way to the box headers. The <br> gaps go, as on the rules page. */
body.active-webring > br:not(#site-navbar + br, #site-navbar + br + br) {
    display: none;
}
body.active-webring > div:has(.friendtext) {
    display: flex;
    flex-direction: column;
}
body.active-webring div:has(> h1.friendtext) {
    order: -1;
}
body.active-webring h1.friendtext {
    margin: 14px 0 12px;
    padding: 0 0 10px;
    border-bottom: 1px solid var(--hr);
    color: var(--text-strong);
    font: 0/1.3 var(--font);
    text-align: left;
}
body.active-webring h1.friendtext::after {
    content: "Webring";
    font-size: 24px;
}
body.active-webring .webring-row {
    flex-wrap: wrap;
    align-items: center;
    gap: 2px 8px !important;
    margin: 0;
    padding: 10px 12px !important;   /* inline 0 50px */
    background: var(--block-bg);
    border: 1px solid var(--block-border);
    border-top: 0;
    color: var(--text);
    font-size: 13px;
}
body.active-webring .webring-row::after, body.active-webring .webring-row + .webring-row::before {
    content: none;
}
/* A box's first row: its header bar, full width over the row's padding. */
body.active-webring .webring-row:not(.webring-row + .webring-row) {
    margin-top: 12px;
    border-top: 1px solid var(--block-border);
    border-radius: var(--radius) var(--radius) 0 0;
}
body.active-webring .webring-row:not(.webring-row + .webring-row)::before {
    display: block;
    flex: 0 0 calc(100% + 24px);
    margin: -10px -12px 8px;
    padding: 7px 12px;
    background: var(--block-head);
    border-bottom: 1px solid var(--block-head-border);
    border-radius: var(--radius) var(--radius) 0 0;
    color: var(--block-head-text);
    font-size: 14px;
    font-weight: bold;
    text-align: left;
}
body.active-webring p.webring-row::before { content: "Link to us"; }
body.active-webring div.webring-row::before { content: "Our friends"; }
/* The first box follows the title's own 12px margin. */
body.active-webring > div:has(.friendtext) > .webring-row:first-of-type {
    margin-top: 0;
}
/* A box's last row: its rounded foot. */
body.active-webring .webring-row:not(:has(+ .webring-row)) {
    border-radius: 0 0 var(--radius) var(--radius);
}
body.active-webring p.webring-row {
    justify-content: flex-start !important;
    text-align: left !important;
}
body.active-webring p.webring-row img {
    margin-left: 4px;
    vertical-align: middle;
}
/* The boards table. */
body.active-webring .chanlist {
    margin: 12px 0 24px !important;  /* inline 40px 0 */
    padding: 0;
}
body.active-webring .chanlist div:has(> h1.boardstext) {
    margin: 0 !important;            /* inline 5px under it */
    padding: 6px 8px 6px 12px;
    background: var(--block-head);
    border: 1px solid var(--block-head-border);
    border-radius: var(--radius) var(--radius) 0 0;
}
body.active-webring h1.boardstext {
    color: var(--block-head-text);
    font: bold 0/18px var(--font);
}
body.active-webring h1.boardstext::after {
    content: "Boards";
    font-size: 14px;
    line-height: 18px;
    vertical-align: top;
}
body.active-webring #webring-refresh {
    padding: 1px 8px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.08) !important;
    box-shadow: none;
    color: var(--block-head-text) !important;
    font-size: 12px;
    font-weight: normal;
    line-height: 18px;
}
body.active-webring #webring-refresh:hover {
    background: rgba(255, 255, 255, 0.16) !important;
    filter: none;
}
body.active-webring #webring-refresh::before {
    content: "\f021";
    margin-right: 6px;
    font: 11px/18px FontAwesome;
    vertical-align: top;
}
body.active-webring #webring-content {
    background: var(--block-bg);
    border: 1px solid var(--block-border);
    border-top: 0;
    border-radius: 0 0 var(--radius) var(--radius) !important;
}
body.active-webring #webring-content th {
    padding: 6px 8px;
    background: var(--block-minor-bg) !important;
    color: var(--block-minor-text);
    font-size: 12px;
}
body.active-webring #webring-content td {
    padding: 6px 8px;
    border-bottom: 1px solid var(--block-border) !important;
}
body.active-webring #webring-content tbody tr:last-child td {
    border-bottom: 0 !important;
}
body.active-webring #webring-content tr:hover {
    background: var(--reply-highlight) !important;
}
body.active-webring #webring-content td.activity {
    border-radius: 0;
    font-size: 12px;
}
body.active-webring #webring-content .webring-status {
    margin: 0;
    padding: 12px;
    color: var(--text-muted) !important;
}
/* The log pages' head, as a board page's: title and description on the left over a rule, then (a board's log)
   the Return button in a filter bar like the board's. Its text is upper case in the markup: set again by ::after. */
body.active-publiclogs header {
    margin: 14px 0 8px;
    padding: 0 0 10px;
    border-bottom: 1px solid var(--hr);
    text-align: left;
}
body.active-publiclogs header h1 {
    margin: 0;
    text-align: left;
}
body.active-publiclogs header + div:has(> a.log-return) {
    margin: 0 0 4px;
    padding: 6px 10px;
    background: var(--block-minor-bg);
    border: 1px solid var(--block-border);
    border-radius: var(--radius);
    text-align: left !important;     /* inline centring */
}
body.active-publiclogs a.log-return {
    float: none;
    font-size: 0;
    line-height: 18px;
}
body.active-publiclogs a.log-return::before {
    content: "\f060";
    margin-right: 6px;
    font: 11px/18px FontAwesome;
    vertical-align: top;
}
body.active-publiclogs a.log-return::after {
    content: "Return to board";
    font-size: 12px;
    line-height: 18px;
    vertical-align: top;
}
/* The log index: the template's own black page and tilted giant board names (an inline style) become the theme's
   page and a forum-style list of boards. */
body.active-publiclogs {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
}
body.active-publiclogs .arisuchan-boardlist-container {
    display: block;
    margin: 12px 0 0;
}
body.active-publiclogs .arisuchan-boardlist {
    display: block;
    margin: 0;
    transform: none;
    background: var(--block-bg);
    border: 1px solid var(--block-border);
    border-radius: var(--radius);
    overflow: hidden;
}
body.active-publiclogs .arisuchan-boardlist::before {
    content: "Boards";
    display: block;
    padding: 7px 12px;
    background: var(--block-head);
    border-bottom: 1px solid var(--block-head-border);
    color: var(--block-head-text);
    font-size: 14px;
    font-weight: bold;
}
body.active-publiclogs .arisuchan-boardlist a, body.active-publiclogs .arisuchan-boardlist .no-boards {
    display: block;
    padding: 9px 12px;
    color: var(--link);
    font-size: 14px;
    font-weight: normal;
    line-height: 18px;
    opacity: 1;
    text-shadow: none;
    transition: none;
}
body.active-publiclogs .arisuchan-boardlist a + a {
    border-top: 1px solid var(--block-border);
}
body.active-publiclogs .arisuchan-boardlist a::before {
    content: "\f03a";
    margin-right: 10px;
    color: var(--text-muted);
    font: 13px/18px FontAwesome;
    vertical-align: top;
}
body.active-publiclogs .arisuchan-boardlist a:hover {
    background: var(--reply-highlight);
    color: var(--link-hover) !important;     /* the template's hover is !important red */
    text-decoration: none;
}
body.active-publiclogs .arisuchan-boardlist .no-boards {
    color: var(--text-muted);
}
body.active-publiclogs .arisuchan-boardlist-container + hr {
    margin: 24px 0 !important;       /* inline 60px */
}
table.modlog {
    display: table;
    width: 100%;
    border-collapse: collapse;
    margin: 12px 0;
    background: var(--block-bg);
    border: 1px solid var(--block-border);
}
table.modlog th {
    display: table-cell;
    background: var(--block-head);
    color: var(--block-head-text);
    text-align: left;
    padding: 7px 8px;
}
table.modlog td {
    padding: 5px 8px;
    border-top: 1px solid var(--block-border);
    vertical-align: top;
}
table.modlog tr:nth-child(odd) td {
    background: var(--cell-bg);
}
.logpages {
    margin: 10px 0;
}

/* ── 16. The script's parts (js/theme-forum.js) ─────────────────────────────────────────────────────────────── */
/* The user cell: avatar, name, title, and a banner for staff. Covers the ::before stand-in exactly. */
.forum-user {
    min-width: 0;
    padding: 14px 8px 12px;
    background: var(--cell-bg);
    border-right: 1px solid var(--cell-border);
    border-radius: var(--radius) 0 0 var(--radius);
    text-align: center;
    overflow-wrap: anywhere;
}
h2.thread + div.thread > .forum-user {
    border-top-left-radius: 0;
}
.forum-avatar {
    display: block;
    width: 96px;
    height: 96px;
    margin: 0 auto 8px;
    border-radius: var(--radius);
    background: var(--avatar-bg, #3a4f66);
    color: #fff;
    font: bold 50px/96px var(--font);
    text-align: center;
    text-transform: uppercase;
    user-select: none;
}
.forum-avatar.is-anonymous {
    background: var(--avatar-silhouette) center / cover;
}
.forum-username {
    display: block;
    color: var(--name);
    font-size: 13px;
    font-weight: bold;
    line-height: 1.3;
}
.forum-username a {
    color: inherit;
}
.forum-username .trip {
    display: block;
    color: var(--trip);
    font-size: 11px;
    font-weight: normal;
}
.forum-usertitle {
    display: block;
    margin-top: 2px;
    color: var(--text-muted);
    font-size: 11px;
}
.forum-userbanner {
    display: block;
    margin: 6px auto 0;
    padding: 1px 6px;
    width: fit-content;
    max-width: 100%;
    background: linear-gradient(#b4473f, #923631);
    border: 1px solid #6e2723;
    border-radius: 3px;
    color: #fff;
    font-size: 10px;
    font-weight: bold;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}
.forum-userstats {
    display: block;
    margin-top: 8px;
    padding-top: 6px;
    border-top: 1px solid var(--cell-border);
    color: var(--text-muted);
    font-size: 11px;
}
.forum-userstats b {
    color: var(--text);
}
/* The message footer: Report on the left, Quote and Reply on the right, at the message's bottom. */
.forum-actions {
    align-self: end;
    display: flex;
    gap: 14px;
    padding: 4px 12px 8px;
    font-size: 12px;
}
.forum-actions a {
    color: var(--text-muted);
}
.forum-actions a:hover {
    color: var(--link-hover);
    text-decoration: none;
}
.forum-actions a::before {
    font: 12px FontAwesome;
    margin-right: 5px;
}
.forum-actions .forum-act-report { margin-right: auto; }
.forum-actions .forum-act-report::before { content: "\f024"; }
.forum-actions .forum-act-quote::before { content: "\f10d"; }
.forum-actions .forum-act-reply::before { content: "\f112"; }
.post-hover .forum-actions {
    display: none;
}
/* The breadcrumb bar under the navbar. The script adds it at DOMContentLoaded, so until then its room
   (12px margin + 32px box) is held at the top of the body, on the same pages the script puts it on: not the
   homepage, and only where there is a banner or the navbar's spacer to put it by. Everything above the bar is
   the fixed navbar and its <br> spacers, so room held there moves the page exactly as far as the bar does. */
html.js body:not(.homepage):has(> a.banner-link, > #site-navbar + br + br):not(:has(> .forum-crumbs))::before {
    content: "";
    display: block;
    height: 44px;
}
.forum-crumbs {
    margin: 12px 0 0;
    padding: 6px 10px;
    line-height: 18px;
    background: var(--block-minor-bg);
    border: 1px solid var(--block-border);
    border-radius: var(--radius);
    color: var(--text-muted);
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.forum-crumbs a {
    color: var(--block-minor-text);
}
.forum-crumbs .forum-crumb-sep {
    margin: 0 8px;
    color: var(--text-muted);
}
.forum-crumbs .forum-crumb-sep::before {
    content: "\f105";
    font: 12px FontAwesome;
}
/* A thread page's title block: the thread's subject, who started it and when. */
.forum-thread-title {
    margin: 4px 0 12px;
}
.forum-thread-title h1 {
    color: var(--text-strong);
    font: 22px/1.3 var(--font);
    overflow-wrap: anywhere;
}
.forum-thread-title .forum-thread-meta {
    margin-top: 2px;
    color: var(--text-muted);
    font-size: 12px;
}
.forum-thread-title .forum-thread-meta::before {
    content: "\f007";
    font: 12px FontAwesome;
    margin-right: 6px;
}

/* ── 17. Thread watcher (js/thread-watcher.js) ───────────────────────────────────────────────────────────────
   Its toggle (a.#watchlist-toggle, "[watchlist]", appended to body) and its panel (#watchlist, made on first open)
   carry the script's inline styles: an unplaced link at the page's foot and a pale blue box. The toggle becomes a
   "Watched" button fixed at the window's bottom right, blue while a watched thread has new replies; the panel a
   forum block over it: a header bar, the two clear actions as small buttons, a row per thread. The script shows
   and hides both by their inline display, which is left alone. */
#watchlist-toggle {
    position: fixed;
    right: 16px;
    bottom: 16px;
    z-index: 10001;
    display: inline-block;
    height: 32px;
    padding: 0 12px;
    border: 1px solid var(--btn-secondary-border);
    border-radius: var(--radius);
    background: var(--btn-secondary);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.08);
    color: var(--btn-text);
    font-size: 0;                    /* "[watchlist]": set again by ::after */
    line-height: 30px;
    text-decoration: none;
    white-space: nowrap;
}
#watchlist-toggle:hover {
    color: #fff;
    text-decoration: none;
    filter: brightness(1.15);
}
#watchlist-toggle::before {
    content: "\f06e";
    margin-right: 7px;
    font: 13px/30px FontAwesome;
    vertical-align: top;
}
#watchlist-toggle::after {
    content: "Watched";
    font-size: 13px;
    vertical-align: top;
}
#watchlist-toggle.watchlist-has-new {
    background: var(--btn-primary);
    border-color: var(--btn-primary-border);
}
#watchlist-toggle.watchlist-has-new::after {
    content: "Watched \00b7  new replies";
}
#watchlist {
    right: 16px !important;          /* inline: 26px up, 16px in */
    bottom: 56px !important;         /* above the toggle */
    z-index: 10001 !important;
    width: 340px;
    min-width: 0 !important;
    max-width: calc(100vw - 32px) !important;
    max-height: 60vh !important;
    padding: 0 !important;
    border: 1px solid var(--block-border) !important;
    border-radius: var(--radius);
    background: var(--block-bg) !important;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.6);
    color: var(--text);
    font-size: 13px !important;
    line-height: 1.45 !important;
}
#watchlist::before {
    content: "Watched threads";
    position: sticky;                /* stays while the list scrolls */
    top: 0;
    display: block;
    padding: 7px 12px;
    border-bottom: 1px solid var(--block-head-border);
    background: var(--block-head);
    color: var(--block-head-text);
    font-weight: bold;
}
#watchlist .watchlist-controls {
    display: flex;
    gap: 6px;
    margin: 0;
    padding: 7px 12px;
    border-bottom: 1px solid var(--block-border);
    background: var(--block-minor-bg);
    font-size: 0;                    /* the space between the two links */
}
#watchlist .watchlist-controls a {
    padding: 1px 8px;
    border: 1px solid var(--btn-secondary-border);
    border-radius: 3px;
    background: var(--btn-secondary);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
    color: var(--btn-text);
    font-size: 0;                    /* "[Clear List]", "[Clear Ghosts]": set again by ::after */
    line-height: 18px;
    text-decoration: none;
}
#watchlist .watchlist-controls a:hover {
    color: #fff;
    filter: brightness(1.15);
}
#clearList::after { content: "Clear list"; font-size: 12px; }
#clearGhosts::after { content: "Remove dead threads"; font-size: 12px; }
#watchlist .watchlist-inner {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin: 0;
    padding: 7px 12px;
    border-bottom: 1px solid var(--block-border);
    color: var(--text-muted);        /* "/board/ –" and the reply count */
}
#watchlist .watchlist-inner:last-child {
    border-bottom: 0;
}
#watchlist .watchlist-inner.watchlist-has-new {
    background: var(--reply-highlight);
}
#watchlist .watchlist-inner > span {
    flex: 1;
    min-width: 0;
    overflow-wrap: anywhere;
}
#watchlist a.watchlist-thread-link {
    color: var(--link);
    font-weight: 600;
}
#watchlist a.watchlist-thread-link:hover {
    color: var(--link-hover);
}
#watchlist .watchlist-new {
    display: inline-block;
    margin-left: 4px;
    padding: 0 5px;
    border-radius: 3px;
    background: var(--accent);
    color: #fff;
    font-size: 10px;
    font-weight: bold;
    line-height: 16px;
    letter-spacing: 0.04em;
}
#watchlist a.watchlist-remove {
    flex: none;
    padding: 0 2px;
    color: var(--text-muted);
    text-decoration: none;
}
#watchlist a.watchlist-remove:hover {
    color: var(--redtext);
}
/* Phones: the button a little in from the corner, the panel the window's width. */
@media (max-width: 600px) {
    #watchlist-toggle {
        right: 10px;
        bottom: 10px;
    }
    #watchlist {
        right: 8px !important;
        left: 8px !important;
        bottom: 50px !important;
        width: auto;
        max-width: none !important;
    }
}

/* ── 18. Phones ───────────────────────────────────────────────────────────────────────────────────────────────
   Messages fill the width, the user cell a strip across their top (avatar, name, title in a row); the post form's
   labels sit above their fields; the catalog shows two cards a row. */
@media (max-width: 600px) {
    body {
        padding: 0 4px 32px;
        border: 0;
    }
    footer {
        margin: 24px -4px 0;
    }
    div.thread:not(.post) {
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: 44px auto auto auto;
    }
    div.thread:not(.post) > .forum-user,
    div.thread:not(.post)::before { grid-column: 1; grid-row: 1; }
    div.thread:not(.post) > .post.op { grid-column: 1; grid-row: 2; }
    div.thread:not(.post) > .op-files { grid-column: 1; grid-row: 3; }
    div.thread:not(.post) > .forum-actions { grid-column: 1; grid-row: 4; }
    div.thread:not(.post)::after { grid-row: 1 / span 4; }
    .post.reply {
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: 44px auto auto auto auto auto;
    }
    .post.reply > * { grid-column: 1; }
    .post.reply > .forum-user,
    .post.reply::before { grid-row: 1; }
    .post.reply > .intro { grid-row: 2; }
    .post.reply > .body { grid-row: 3; }
    .post.reply > .files { grid-row: 4; }
    .post.reply > .mentioned { grid-row: 5; }
    .post.reply > .forum-actions { grid-row: 6; }
    div.thread:not(.post)::before, .post.reply::before {
        min-height: 0;
        background: var(--avatar-silhouette) 8px center / 30px 30px no-repeat, var(--cell-bg);
        border-right: 0;
        border-bottom: 1px solid var(--cell-border);
        border-radius: var(--radius) var(--radius) 0 0;
    }
    h2.thread + div.thread::before, h2.thread + div.thread > .forum-user {
        border-radius: 0;
    }
    .forum-user {
        display: flex;
        align-items: center;
        gap: 8px;
        padding: 0 8px;
        border-right: 0;
        border-bottom: 1px solid var(--cell-border);
        border-radius: var(--radius) var(--radius) 0 0;
        text-align: left;
        white-space: nowrap;
        overflow: hidden;
    }
    .forum-avatar {
        flex: none;
        width: 30px;
        height: 30px;
        margin: 0;
        font-size: 16px;
        line-height: 30px;
    }
    .forum-username .trip {
        display: inline;
        margin-left: 4px;
    }
    .forum-usertitle, .forum-userbanner {
        margin: 0;
    }
    .forum-userstats {
        margin: 0 0 0 auto;
        padding: 0;
        border: 0;
    }
    .post-image {
        max-width: 100%;
    }
    .files:has(.file.multifile) {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }
    .file.multifile {
        width: auto !important;      /* an OP's files: inline width: 295px */
    }
    .youtube-placeholder, .youtube-placeholder img {
        max-width: 100%;
    }
    button.formopen-center {
        margin-right: auto;
    }
    /* The post form stacks: each label above its field, the fields full width. */
    form[name=post] table, form[name=post] tbody, form[name=post] tr, form[name=post] th, form[name=post] td {
        display: block;
        width: 100%;
    }
    form[name=post] th {
        text-align: left;
        border-right: 0;
        padding: 6px 10px;
    }
    /* The typing line, over the text box: left, as the label; until js/theme-forum.js has moved it in, the cell
       keeps its room (4px margin and the line's min-height, 1.35em of 12px). */
    form[name=post] th > .typing-indicator--form {
        justify-content: flex-start;
        margin: 4px 0 0;
    }
    #reply-form-container:has(> .typing-indicator--form) form[name=post] tr:has(> td textarea[name=body]) > th {
        padding-bottom: calc(6px + 4px + 1.35 * 12px);
    }
    form[name=post] td {
        display: flow-root;              /* holds the captcha's inline float:left, or the next row wraps beside it */
    }
    form[name=post] th:empty {
        display: none;
    }
    form[name=post] th .unimportant, form[name=post] th a {
        display: inline;
        margin-left: 6px;
    }
    form[name=post] input[type=text], form[name=post] input[type=password] {
        max-width: none;
    }
    form[name=post] input[name=post] {
        max-width: none;
    }
    #post-moderation-fields {
        float: none;
    }
    /* The OP's buttons, as on desktop (icon and label, and in its order: Last 50, Watch, Hide, Open; the desktop
       floats them right, which reverses the markup's), on a row of their own under the subject line, at the right:
       the intro becomes a wrapping flex row, a full-width break (::after) before the buttons, a growing spacer
       (::before) pushing them right, and each kind its place by order, whichever the scripts added and where. */
    .post.op > p.intro {
        display: flex;
        flex-wrap: wrap;
        align-items: baseline;
    }
    .post.op > p.intro::after {
        content: "";
        order: 1;
        flex-basis: 100%;
    }
    .post.op > p.intro::before {
        content: "";
        order: 2;
        flex: 1 0 1px;                   /* not 0: a zero-wide one fits on the break's line, beside it, and grows nothing */
    }
    .post.op > p.intro > :is(a.reply-link, a.watchThread, a.hide-thread-link, a[href*="+50.html"]) {
        margin: 6px 0 0 6px;
    }
    .post.op > p.intro > a[href*="+50.html"] { order: 3; }
    .post.op > p.intro > a.watchThread { order: 4; }
    .post.op > p.intro > a.hide-thread-link { order: 5; }
    .post.op > p.intro > a.reply-link { order: 6; }
    /* The homepage: one column: header, welcome, boards, latest posts, images (the board rows' own layout is the
       list's container query, section 14). */
    html.js body.homepage .container {
        display: flex;
        flex-direction: column;
    }
    html.js body.homepage .about-section, html.js body.homepage .recent-section:has(.post-grid),
    html.js body.homepage .forum-nodes, html.js body.homepage .recent-section:has(.posts-list) {
        float: none;
        width: auto;
        margin: 0 0 12px;
        flex: none;                      /* not the lists' 1 1 400px: in a column that's a 400px height, and they clip */
    }
    /* The header: name and tagline over the totals. */
    @keyframes forum-home-room {
        from { padding-top: 152px; }
        to { padding-top: 0; }
    }
    .forum-home-head {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        height: 140px;
        padding: 14px 12px 0;
    }
    .forum-home-brand {
        flex: none;
    }
    .forum-home-brand h1 {
        font-size: 22px;
    }
    .forum-home-stats > div {
        flex: 1;
        min-width: 0;
        padding: 0 4px;
    }
    .forum-home-stats dd {
        font-size: 17px;
    }
    html.js body.homepage .forum-home-head { order: -4; }
    html.js body.homepage .about-section { order: -3; }
    html.js body.homepage .forum-nodes { order: -2; }
    html.js body.homepage .recent-section:has(.posts-list) { order: -1; }
    /* A hidden post's bar: a narrow "Show" strip, no "Hidden ..." tag. */
    a.unhide-reply-link, a.unhide-thread-link {
        flex-basis: auto;
        padding: 0 10px;
    }
    a.unhide-reply-link::after, a.unhide-thread-link::after {
        content: "Show";
    }
    p.intro.reply-hidden::after, p.intro.thread-hidden::after {
        content: none;
    }
    p.intro.thread-hidden > a[href*="+50.html"],
    p.intro.thread-hidden:not(:has(> a[href*="+50.html"])) > a.reply-link {
        margin-left: auto;
    }
    /* A line break before REPORT and DELETE, so they wrap together. */
    #thread-interactions::after {
        content: "";
        order: 1;
        flex-basis: 100%;
        margin-top: -6px;           /* the gap it adds */
    }
    #thread-interactions #post-moderation-fields > .btn-report { order: 2; }
    #thread-interactions #post-moderation-fields > .btn-delete { order: 3; }
    #thread-interactions #delete-fields { order: 4; }
    #thread-interactions #report-fields { order: 5; }
    .forum-thread-title h1 {
        font-size: 18px;
    }
    .catalog-container #Grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
        padding: 0;
    }
    .board-links a {
        min-width: 90px;
    }
}
