/* Copyright (c) 2026 G-Forum. Tous droits réservés. */
@font-face {
    font-family: Inter;
    src: url("fonts/InterVariable.woff2") format("woff2");
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
}

:root {
    color-scheme: dark;
    font: 1rem/1.55 Inter, system-ui, sans-serif;
    --accent: #438bff;
    --accent-action: #5990e9;
    --accent-ink: #000;
    --accent-ui: #93bbff;
    --primary-outline: var(--accent-ui);
    --text: #f0f2f6;
    --muted: #c6cdd7;
    --page-bg: color-mix(in srgb, #101217, var(--accent) 8%);
    --page-glow: color-mix(in srgb, #17191f, var(--accent) 20%);
    --header: color-mix(in srgb, #14171b, var(--accent) 12%);
    --well: color-mix(in srgb, #15171b, var(--accent) 10%);
    --surface: color-mix(in srgb, #191b20, var(--accent) 14%);
    --raised: color-mix(in srgb, #1e2026, var(--accent) 20%);
    --active-wash: color-mix(in srgb, #20202a, var(--accent) 23%);
    --indicator-bg: color-mix(in srgb, #171923, var(--accent) 24%);
    --border: color-mix(in srgb, #30343b, var(--accent) 16%);
    --rule: color-mix(in srgb, #34383f, var(--accent) 20%);
    --control-border: color-mix(in srgb, var(--accent-ui) 55%, #7b7f88);
    --link: color-mix(in srgb, var(--accent-ui) 72%, white);
    --link-hover: color-mix(in srgb, var(--accent-ui) 48%, white);
    --focus-ring: color-mix(in srgb, var(--accent-ui) 65%, white);
    background: var(--page-bg);
    color: var(--text);
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: radial-gradient(ellipse at 50% 0, var(--page-glow), transparent 40rem); }
a { color: var(--link); text-underline-offset: .2em; }
a:hover { color: var(--link-hover); }
.site-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    min-height: 4rem;
    padding: .7rem max(1rem, calc((100% - 68rem) / 2));
    background: var(--header);
    border-bottom: 1px solid var(--border);
}
.site-header a { font-weight: 700; text-decoration: none; }
.site-header .brand { display: inline-flex; align-items: center; gap: .65rem; color: #edf3fb; letter-spacing: -.025em; }
.brand span { font-family: system-ui, sans-serif; display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: .55rem; background: var(--accent-action); color: var(--accent-ink); }
.site-action { color: #cedaeb; font-size: .9rem; }
.panel {
    width: min(42rem, calc(100% - 2rem));
    margin: clamp(1.5rem, 4vw, 3.25rem) auto;
    padding: clamp(1.25rem, 4vw, 2.5rem);
    border-radius: .9rem;
    background: var(--surface);
}
.forum-page .panel, .admin-page .panel { width: min(68rem, calc(100% - 2rem)); padding: 0; background: transparent; }
h1 { margin: 0 0 1.4rem; line-height: 1.1; font-size: clamp(1.75rem, 4vw, 2.5rem); letter-spacing: -.035em; }
p { margin: 0 0 .85rem; }
.breadcrumbs { font-size: .9rem; }
.empty-state { padding: clamp(1.15rem, 4vw, 2rem); border-radius: .85rem; background: var(--surface); color: var(--muted); }
.forum-category { margin: 0 0 1.1rem; overflow: hidden; background: var(--surface); border-radius: .85rem; }
.category-heading {
    display: flex;
    align-items: center;
    gap: 1rem;
    min-height: 3.25rem;
    padding: .65rem 1rem;
    background: var(--raised);
    box-shadow: inset .2rem 0 var(--accent-ui);
    overflow-wrap: anywhere;
}
.category-heading h2 { margin: 0; font-size: 1.08rem; }
.category-heading p { margin: .15rem 0 0; color: var(--muted); font-size: .88rem; white-space: pre-line; }

.forum-directory { margin: 0; padding: 0; list-style: none; }

.forum-directory li + li { border-top: 1px solid var(--border); }
.forum-summary { display: flex; align-items: flex-start; gap: .75rem; min-width: 0; }
.forum-icon { display: grid; place-items: center; flex: 0 0 2.35rem; height: 2.35rem; border-radius: .6rem; background: var(--indicator-bg); color: var(--link); }
.forum-row h3 { margin: 0; font-size: 1rem; }
.forum-row h3 a { color: inherit; text-decoration: none; }
.forum-row h3 a:hover { text-decoration: underline; color: var(--link-hover); }
.forum-row p { margin: .15rem 0 0; color: var(--muted); white-space: pre-line; font-size: .89rem; }

.forum-count dt, .last-post span, .last-post time { color: var(--muted); font-size: .78rem; }
.forum-count dd { margin: 0; font-weight: 700; font-variant-numeric: tabular-nums; }
.last-post { display: flex; flex-direction: column; line-height: 1.35; }
.last-post strong { font-size: .9rem; }

form, label { display: grid; gap: .35rem; }
form { gap: .85rem; }
input, select, textarea {
    width: 100%;
    min-width: 0;
    border-radius: .48rem;
    border: 1px solid var(--control-border);
    padding: .56rem .7rem;
    background: var(--well);
    color: inherit;
    font: inherit;
}
textarea { resize: vertical; }
:is(input, textarea)::placeholder { color: var(--muted); opacity: 1; }
input[type=color] { width: 4.5rem; height: 2.75rem; padding: .25rem; }
button, .button {
    justify-self: start;
    display: inline-block;
    border: 1px solid var(--primary-outline);
    border-radius: .48rem;
    padding: .50rem .85rem;
    background: var(--accent-action);
    color: var(--accent-ink);
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
}
.button:hover, button:not(:disabled):hover { text-decoration: underline; }
a.button:not(.secondary, .attachment-download):hover { color: var(--accent-ink); }
.secondary, a.button.secondary:hover { background: var(--well); border-color: var(--control-border); color: var(--text); }
.secondary:not(:disabled):hover { border-color: var(--accent-ui); }
.actions { display: flex; gap: .65rem; flex-wrap: wrap; }
.note { color: var(--muted); }
.error, .notice { padding: .65rem .85rem; border-radius: .45rem; }
.error { background: #3d2938; color: #ffccd8; }
.notice { background: #1e3b3c; color: #baf6db; }
:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 3px; }

.appearance-preview { display: flex; align-items: center; justify-content: space-between; gap: .6rem; margin: .2rem 0; padding: .8rem; border-radius: .6rem; background: var(--well); box-shadow: inset .2rem 0 var(--accent-ui); }
.appearance-preview .button { cursor: default; }
.swatches { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .45rem; }
.swatches button { width: 100%; min-height: 2.65rem; padding: .3rem; background: var(--well); color: #ecf3ff; font-size: .75rem; }
.swatches button[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--focus-ring); }
.swatches button::before { display: block; width: .95rem; height: .95rem; margin: 0 auto .25rem; border-radius: 50%; background: var(--swatch, var(--accent)); content: ""; }

.admin-layout { display: grid; grid-template-columns: 13.5rem minmax(0, 1fr); gap: 1.3rem; align-items: start; }
.admin-nav, .admin-content { border-radius: .85rem; background: var(--surface); }
.admin-nav { display: grid; gap: .2rem; padding: .45rem; }
.admin-nav a { display: flex; align-items: center; gap: .55rem; padding: .55rem .6rem; border-radius: .45rem; color: #c8d6e8; font-size: .9rem; text-decoration: none; }
.admin-nav a span { width: 1.05rem; text-align: center; }
.admin-content { padding: clamp(.85rem, 3vw, 1.5rem); }
.dashboard-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .5rem; margin: 0 0 1rem; }
.dashboard-stats div { padding: .65rem; border-radius: .5rem; background: var(--well); }
.dashboard-stats dt { color: var(--muted); font-size: .8rem; }
.dashboard-stats dd { margin: 0; font-size: 1.35rem; font-weight: 750; }
.admin-section + .admin-section { margin-top: 1.5rem; }
.admin-section h2 { margin: 0 0 .5rem; font-size: 1.14rem; }
.admin-section details { margin: .45rem 0; border-radius: .5rem; background: var(--well); }
.admin-section summary { padding: .65rem; cursor: pointer; font-weight: 650; }
.admin-section details form { padding: .65rem; }
.check { display: flex; align-items: center; gap: .45rem; }
.check input { width: 1rem; height: 1rem; }
.delete-form { border-top: 1px solid var(--border); }
button.danger { background: #502e3d; border-color: #ac788a; color: #ffd7e2; }
.image-library { display: grid; grid-template-columns: repeat(auto-fill, minmax(8rem, 1fr)); gap: .65rem; padding: 0; list-style: none; }
.image-library li { min-width: 0; overflow-wrap: anywhere; }


@media (max-width: 46rem) {
    .admin-layout { grid-template-columns: minmax(0, 1fr); gap: .65rem; }
    .admin-nav { display: flex; overflow-x: auto; }
    .admin-nav a { flex: 0 0 auto; }


}
@media (max-width: 28rem) {


    .dashboard-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .swatches { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.site-links { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; justify-content: flex-end; }
.account-links, .pagination { display: flex; flex-wrap: wrap; align-items: center; gap: .7rem 1.2rem; margin-top: 1rem; }
.pagination { justify-content: flex-end; font-size: .9rem; }
.topic-list { padding: 0; list-style: none; background: var(--surface); border-radius: .8rem; }
.topic-list li { display: flex; flex-wrap: wrap; gap: .35rem .7rem; align-items: baseline; padding: .75rem 1rem; overflow-wrap: anywhere; }
.topic-list li + li { border-top: 1px solid var(--border); }
.topic-list li > .note { margin-left: auto; font-size: .84rem; }
.topic-labels { color: var(--link); font-size: .8rem; }
.messages { display: grid; grid-template-columns: minmax(0, 1fr); gap: .8rem; }
.message, .discussion-form { padding: clamp(.8rem, 3vw, 1.3rem); border-radius: .8rem; background: var(--surface); }
.message header { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .4rem; }
.message header time, .message .note { color: var(--muted); font-size: .85rem; }
.message-body { margin: .7rem 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.message-actions { display: flex; gap: .9rem; flex-wrap: wrap; align-items: center; font-size: .9rem; }
.discussion-form { margin-top: 1.2rem; }
.discussion-form h2 { margin: 0 0 .7rem; font-size: 1.2rem; }
.permission-form { margin-top: .85rem; }
fieldset { min-width: 0; padding: .75rem; border: 1px solid var(--border); border-radius: .5rem; }
fieldset label + label { margin-top: .45rem; }

@media (max-width: 30rem) {
    .site-header { gap: .6rem; }
    .site-links { gap: .3rem .55rem; }
    .topic-list li > .note { margin-left: 0; width: 100%; }
}

.member-avatar { width: 2rem; height: 2rem; border-radius: .48rem; object-fit: cover; background: var(--well); }
.avatar-current { width: 4rem; height: 4rem; margin-bottom: .85rem; }
.post-author, .profile-avatar { display: inline-flex; align-items: center; gap: .5rem; }
.member-avatar, .captcha-field img { flex-shrink: 0; }
.captcha-field { display: grid; gap: .45rem; }
.captcha-field img { max-width: 100%; border-radius: .45rem; }
.captcha-field button, .editor-tools button { font-size: .84rem; }
.editor-tools { display: flex; flex-wrap: wrap; gap: .35rem; margin-bottom: .55rem; }
.editor-preview { margin: .65rem 0 0; padding: .55rem; background: var(--well); border-radius: .5rem; }
.message-body { line-height: 1.65; }
.message-body pre { max-width: 100%; overflow: auto; padding: .6rem; border-radius: .5rem; background: var(--well); }
.message-body blockquote { margin: .6rem 0; padding: .25rem .7rem; border-left: 3px solid var(--border); }
.message-body ul { white-space: normal; }
.follow-topic, .search-form, .report-item { margin-bottom: .85rem; }
.forum-description { white-space: pre-line; }

.member-signature { border-top: 1px solid var(--border); margin: .75rem 0 .5rem; padding-top: .45rem; color: var(--muted); font-size: .88rem; }
.attachment-list { padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: .65rem; }
.attachment-list img { display: block; max-width: min(100%, 23rem); max-height: 15rem; border-radius: .4rem; object-fit: contain; }
.site-logo { width: 2rem; height: 2rem; object-fit: contain; }
.site-banner { width: 100%; max-height: 13rem; object-fit: cover; border-radius: .6rem; margin: 0 0 1rem; }

.site-banner-shell {
    position: relative;
    width: min(68rem, calc(100% - 2rem));
    margin: 1rem auto 0;
}
.site-banner-shell .site-banner {
    display: block;
    max-height: clamp(7rem, 28vw, 15rem);
    margin: 0;
}
.post-header { padding-bottom: .65rem; }
.post-author { min-width: 0; flex-wrap: wrap; overflow-wrap: anywhere; }
.post-header time { white-space: nowrap; }
.role-badge {
    display: inline-flex;
    align-items: center;
    gap: .36rem;
    width: fit-content;
    padding: .16rem .46rem;
    border-radius: .36rem;
    font-size: .76rem;
    font-weight: 700;
    line-height: 1.35;
    white-space: nowrap;
}
.role-admin { background: #521f2b; color: #ffd2d9; }
.role-moderator { background: #173d35; color: #aceed4; }
.role-member { background: var(--indicator-bg); color: var(--text); }
.role-icon { position: relative; width: .76rem; height: .85rem; flex: 0 0 .76rem; }
.role-icon-shield { background: currentColor; clip-path: polygon(50% 0, 95% 20%, 90% 63%, 50% 100%, 10% 63%, 5% 20%); }
.role-icon-user::before, .role-icon-user::after { content: ""; display: block; position: absolute; background: currentColor; }
.role-icon-user::before { width: .34rem; height: .34rem; border-radius: 50%; top: 0; left: .21rem; }
.role-icon-user::after { width: .68rem; height: .38rem; border-radius: .4rem .4rem .12rem .12rem; bottom: 0; left: .04rem; }
.message-actions { padding-top: .65rem; border-top: 1px solid var(--border); gap: .45rem .6rem; }
.message-actions > a, .message-actions > details > summary, .smiley-picker > summary {
    display: inline-block;
    border-radius: .42rem;
    padding: .3rem .54rem;
    background: var(--well);
    color: var(--link);
    cursor: pointer;
    text-decoration: none;
}
.message-actions > details > summary::-webkit-details-marker, .smiley-picker > summary::-webkit-details-marker { display: none; }
.message-actions > details[open]:not(.post-action-menu), .smiley-picker[open] { flex-basis: 100%; }
.message-actions form { margin-top: .55rem; }
.smiley-choices, .settings-links { display: flex; flex-wrap: wrap; gap: .45rem .7rem; margin: .55rem 0; }
.smiley-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(5.75rem, 1fr)); gap: .45rem; list-style: none; padding: 0; }
.smiley-gallery li, .smiley-card { min-width: 0; padding: .55rem; border-radius: .45rem; background: var(--well); }
.smiley-gallery li { display: grid; justify-items: center; }
.smiley-gallery code, .smiley-card summary { overflow-wrap: anywhere; }
.smiley-card { margin-top: .55rem; }
.smiley-card summary { cursor: pointer; }
.smiley-card form { margin-top: .65rem; }
.unicode-smiley { font-size: 1.25rem; }
.bb-smiley { width: auto; height: auto; max-width: 22px; max-height: 22px; vertical-align: -.22em; }
.bb-unicode-smiley { font-size: 21px; line-height: 1; vertical-align: -.08em; }
.smiley-toggle button { padding: .3rem .4rem; font-size: .8rem; }
.smiley-gallery + p { margin-top: .5rem; }
[data-smiley-preview] { background: var(--well); border-radius: .35rem; }
[hidden] { display: none !important; }
@media (max-width: 42rem) {
    .site-header { flex-wrap: wrap; justify-content: flex-start; gap: .45rem; }
    .site-links { flex: 1 1 100%; justify-content: flex-start; gap: .25rem .65rem; }
    .site-action { padding: .3rem .1rem; }
    .admin-nav { min-width: 0; }
}

/* Layout shared by the forum, member pages and ACP. */
.site-header { min-height: 3.75rem; padding-block: .5rem; gap: .9rem; }
.site-header .brand { flex: 0 0 auto; }
.site-links { gap: .15rem; }
.site-action { border-radius: .5rem; padding: .42rem .58rem; font-size: .86rem; }
.site-action:hover, .section-tabs a:hover, .admin-nav a:hover { background: var(--raised); color: #edf3fb; }
.site-action[aria-current], .section-tabs a[aria-current], .admin-nav a[aria-current] { background: var(--active-wash); color: #f4f7ff; }
.site-nav-toggle { min-height: 2.5rem; }
.site-banner-shell { margin-top: .75rem; }
.site-banner-shell .site-banner { max-height: clamp(6rem, 26vw, 14rem); }
.site-banner-link {
    position: absolute;
    inset-inline-end: .45rem;
    inset-block-end: .45rem;
    display: inline-flex;
    align-items: center;
    gap: .38rem;
    max-width: min(22rem, calc(100% - 1rem));
    min-height: 2rem;
    padding: .2rem .55rem;
    border: 1px solid var(--accent-ui);
    border-radius: .45rem;
    background: var(--header);
    color: var(--text);
    font-size: .8rem;
    font-weight: 650;
    text-decoration: none;
}
.site-banner-link span { white-space: normal; overflow-wrap: anywhere; }
.site-banner-link .ui-svg { width: .9rem; height: .9rem; flex: none; }
.site-banner-link:is(:hover, :focus-visible) { background: var(--active-wash); color: var(--text); }
.panel { margin-block: clamp(.95rem, 2.5vw, 1.7rem) 2.4rem; }
h1 { font-weight: 650; margin-bottom: .85rem; font-size: clamp(1.55rem, 3.4vw, 2.15rem); overflow-wrap: anywhere; }
h2, h3 { font-weight: 620; overflow-wrap: anywhere; line-height: 1.25; }
input, select, textarea, button, .button { border-radius: .52rem; }
input[type="file"] { overflow: hidden; }
input[type="checkbox"], input[type="radio"], meter { accent-color: var(--accent-ui); }
.actions { align-items: center; gap: .5rem; }
.actions button, .actions a, label { overflow-wrap: anywhere; }
.section-tabs { display: flex; flex-wrap: wrap; gap: .25rem; margin-bottom: .85rem; padding: .28rem; border-radius: .65rem; background: var(--well); }
.section-tabs a { padding: .46rem .68rem; border-radius: .42rem; color: #c5d5ea; text-decoration: none; font-weight: 650; font-size: .88rem; }
.section-tabs a[aria-current] { box-shadow: inset 0 -2px var(--accent-ui); }
.content-card, .admin-card { min-width: 0; padding: clamp(.75rem, 2vw, 1.2rem); border-radius: .72rem; background: var(--surface); overflow-wrap: anywhere; }
.content-card h2, .content-card h3 { margin: 0 0 .65rem; font-size: 1.08rem; }
.content-card > :last-child { margin-bottom: 0; }
.inline-search { display: flex; flex-wrap: wrap; gap: .55rem; align-items: end; }
.inline-search > label { flex: 1 1 12rem; min-width: 0; }

/* Category directory */
.forum-home .forum-description { margin-bottom: .85rem; }
.forum-category { margin-bottom: .85rem; border-radius: .78rem; }
.category-heading { gap: .75rem; padding: .55rem .8rem; background: var(--raised); }
.category-image-box { display: grid; place-items: center; flex: 0 0 auto; width: 64px; height: 64px; overflow: hidden; border-radius: .52rem; background: var(--well); color: var(--link); }
.category-image-box > img { display: block; width: 100%; height: 100%; min-height: 0; min-width: 0; object-fit: scale-down; border-radius: inherit; }
.forum-category .category-image-box > img { width: 64px; height: 64px; }
.admin-image-box { width: 80px; height: 80px; }
.admin-image-box > img { width: 80px; height: 80px; }
.ui-icon { position: relative; display: inline-block; color: inherit; vertical-align: middle; }
.ui-icon-grid { width: .38rem; height: .38rem; margin: -.5rem .5rem 0 0; border-radius: 1px; background: currentColor; box-shadow: .5rem 0 currentColor, 0 .5rem currentColor, .5rem .5rem currentColor; }
.ui-icon-discussion { width: .94rem; height: .72rem; border: 1.5px solid currentColor; border-radius: .25rem; }
.ui-icon-discussion::after { position: absolute; bottom: -.2rem; left: .13rem; width: .22rem; height: .22rem; border-left: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; background: inherit; transform: skewY(-38deg); content: ''; }
.forum-icon { height: 2.15rem; flex-basis: 2.15rem; }
.forum-icon .ui-icon { background: var(--indicator-bg); }

.forum-summary { align-items: center; gap: .65rem; }


.last-post-label { font-weight: 650; }
.last-post-meta { display: flex; flex-wrap: wrap; gap: .05rem .5rem; }

/* Member profiles and posts */
.member-heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem 1.1rem; margin-bottom: .75rem; background: linear-gradient(115deg, var(--raised), var(--surface)); box-shadow: inset 0 2px var(--accent-ui); }
.member-heading h1 { margin: 0; }
.member-identity, .member-directory-identity { min-width: 0; display: flex; align-items: center; gap: .65rem; }
.member-directory-identity { text-decoration: none; }
.member-directory-identity:hover strong { text-decoration: underline; }
.member-heading-avatar { width: 4.25rem; height: 4.25rem; }
.author-identity { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; gap: .19rem; overflow-wrap: anywhere; }
.author-identity strong { line-height: 1.2; }
.member-identity .note { font-size: .84rem; margin-top: .1rem; }
.member-counts { display: flex; flex-wrap: wrap; gap: .45rem; margin: 0; }
.member-counts > div { display: flex; flex-direction: column-reverse; padding: .35rem .7rem; border-radius: .5rem; background: var(--well); }
.member-counts dd { margin: 0; font-size: 1.15rem; font-weight: 750; font-variant-numeric: tabular-nums; }
.member-counts dt { color: var(--muted); font-size: .78rem; }
.profile-cards, .profile-settings-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 23rem), 1fr)); gap: .75rem; }
.profile-settings-grid section { scroll-margin-top: .85rem; }
.group-tags { display: flex; flex-wrap: wrap; gap: .35rem; list-style: none; margin: .4rem 0 0; padding: 0; }
.group-tags li { padding: .2rem .5rem; border-radius: .4rem; background: var(--well); }
.member-activity-list { margin: .35rem 0 .65rem; background: var(--well); }
.member-directory li { align-items: center; }
.section-link { font-size: .88rem; }
.role-badge { border-radius: 99rem; font-size: .7rem; padding: .16rem .43rem; }
.role-admin { background: #572b38; color: #ffc4ce; }
.role-moderator { background: #214238; color: #b1ebd0; }
.message { min-width: 0; padding: clamp(.7rem, 2.5vw, 1rem); scroll-margin-top: .75rem; }
.message:target { box-shadow: inset 3px 0 var(--accent-ui); }
.message .post-header { align-items: center; gap: .45rem .9rem; padding-bottom: .55rem; border-bottom: 1px solid var(--border); }
.post-author { flex-wrap: nowrap; }
.post-author .member-avatar { width: 2.55rem; height: 2.55rem; }
.post-header time { color: var(--muted); font-size: .8rem; }
.message-body { margin-block: .7rem .85rem; }
.message-actions > a, .message-actions > details > summary { padding: .36rem .58rem; line-height: 1.25; }
.message-actions > a:hover, .message-actions > details > summary:hover { background: var(--raised); }
.message-actions .sensitive-action > summary { color: #ffc4ce; }
.message-actions details form { max-width: 35rem; }
.topic-controls { display: flex; flex-wrap: wrap; align-items: start; gap: .45rem; margin-bottom: .65rem; }
.topic-controls :is(.follow-topic, .notice) { margin-bottom: 0; }

.topic-controls > p { flex: 1 1 100%; }
.attachment-list { margin: .55rem 0 .8rem; }
.attachment-list li { min-width: 0; max-width: 100%; padding: .45rem; border: 1px solid var(--border); border-radius: .52rem; background: var(--well); overflow-wrap: anywhere; }
.attachment-list a { display: inline-block; padding: .2rem .3rem; }
.poll-card { margin: .65rem 0; }
.poll-choices { display: grid; gap: .4rem; margin: 0; padding: 0; list-style: none; }
.poll-option { display: grid; grid-template-columns: minmax(0, 1fr) minmax(4rem, 10rem); align-items: center; gap: .65rem; padding: .45rem .6rem; border-radius: .5rem; background: var(--well); overflow-wrap: anywhere; }
.poll-option input { flex: 0 0 auto; }
.poll-option meter { width: 100%; min-width: 0; }
.discussion-form { margin-top: .85rem; }
.discussion-form > summary { font-weight: 700; cursor: pointer; }
.discussion-form[open] > summary { margin-bottom: .65rem; }
.composer { border: 1px solid var(--rule); scroll-margin-top: .75rem; }
.composer > summary { color: #e5eeff; }
.composer:not([open]):hover { border-color: var(--accent-ui); }
.bb-editor { min-width: 0; }
.editor-tools { align-items: flex-start; gap: .45rem; padding: .45rem; border-radius: .58rem; background: var(--well); }
.editor-tool-group { display: flex; flex-wrap: wrap; gap: .25rem; min-width: 0; }
.editor-tools :is(button, summary) { min-height: 2.18rem; padding: .33rem .52rem; border-radius: .38rem; background: var(--surface); color: var(--text); }
.editor-tools [data-bb-tag="b"] { font-weight: 850; }
.editor-tools [data-bb-tag="i"] { font-style: italic; }
.editor-tools [data-bb-tag="u"] { text-decoration: underline; }
.editor-tools [data-bb-tag="s"] { text-decoration: line-through; }
.editor-tools [data-bb-preview] { margin-inline-start: auto; }
.smiley-picker[open] { order: 1; }
.smiley-choices { gap: .25rem; margin-bottom: 0; }
.smiley-choices button { min-width: 2.15rem; font-size: 24px; line-height: 1; }
.smiley-choices .bb-smiley { max-width: 24px; max-height: 24px; vertical-align: middle; }

/* Administration */
.admin-layout { grid-template-columns: 13rem minmax(0, 1fr); gap: .85rem; }
.admin-nav { min-width: 0; padding: .48rem; }
.admin-nav-group + .admin-nav-group { margin-top: .65rem; padding-top: .45rem; border-top: 1px solid var(--border); }
.admin-nav-label { display: block; padding: .3rem .55rem; color: var(--muted); font-size: .72rem; font-weight: 700; letter-spacing: .035em; }
.admin-nav a { padding: .48rem .55rem; overflow-wrap: anywhere; }
.admin-content { min-width: 0; padding: clamp(.75rem, 2.5vw, 1.15rem); overflow-wrap: anywhere; }
.admin-content > h2 { margin: 0 0 .75rem; font-size: 1.15rem; }
.admin-content :is(.topic-list, .discussion-form) { background: var(--well); }
.admin-section + .admin-section { margin-top: .8rem; }
.admin-card { background: var(--well); }
.admin-card :is(input, select, textarea, .secondary) { background: var(--surface); }
.admin-card .catalog-row { background: var(--surface); }
.admin-card .catalog-row :is(input, select, textarea, .secondary) { background: var(--well); }
.admin-section-heading, .report-heading { display: flex; align-items: baseline; justify-content: space-between; gap: .5rem; }
.admin-section-heading h2 { margin-bottom: .45rem; }
.count-label, .report-status, .account-state { flex-shrink: 0; padding: .12rem .48rem; border-radius: 99rem; background: var(--indicator-bg); color: var(--text); font-size: .75rem; font-weight: 700; }
.admin-filter { margin-bottom: .7rem; }
.account-state { margin-inline-start: auto; }
.account-state-active { background: #214238; color: #b1ebd0; }
.account-state-pending, .report-status.report-open { background: #493720; color: #ffe1af; }
.account-state-banned, .account-state-suspended, .account-state-disabled { background: #572b38; color: #ffc4ce; }
.catalog-row > summary { display: flex; align-items: center; gap: .55rem; list-style: none; }
.catalog-row > summary::-webkit-details-marker { display: none; }
.catalog-row > summary::after { margin-inline-start: auto; color: var(--muted); content: '›'; font-size: 1.1rem; line-height: 1; }
.catalog-row[open] > summary::after { transform: rotate(90deg); }
.catalog-row[open] > summary { border-bottom: 1px solid var(--border); }
.catalog-row .catalog-thumb { display: grid; place-items: center; flex: 0 0 30px; width: 30px; height: 30px; border-radius: .32rem; color: var(--link); background: var(--well); }
.catalog-thumb > img { width: 30px; height: 30px; }
.catalog-meta { margin-inline-start: auto; color: var(--muted); font-size: .78rem; }

.catalog-row > summary:has(.catalog-meta)::after { margin-inline-start: 0; }
.admin-section details.catalog-create { background: transparent; }
.admin-section .catalog-create > summary.button { display: inline-flex; width: fit-content; max-width: 100%; padding: .50rem .85rem; color: var(--accent-ink); border-color: var(--primary-outline); font-weight: 600; }
.catalog-create > summary::after { content: none; }
.form-columns { display: grid; grid-template-columns: minmax(0, 1fr) minmax(6rem, .35fr); gap: .65rem; }
.category-image-control { display: grid; grid-template-columns: 80px minmax(0, 1fr); gap: .65rem; align-items: start; }
.category-image-fields .actions { margin-top: .35rem; font-size: .83rem; }
.small-action { padding: .3rem .55rem; }
.admin-section details.sensitive-action { margin: 0 .65rem .65rem; background: #352735; }
.sensitive-action > summary { color: #ffc8d1; }
.delete-form { border-top-color: #614150; }
.image-library { margin-bottom: 0; }
.image-library li { padding: .55rem; border-radius: .5rem; background: var(--surface); font-size: .82rem; }
.image-library li .category-image-box { margin-bottom: .35rem; }

@media (max-width: 54rem) {
    .site-action { padding-inline: .42rem; }
}
@media (max-width: 47rem) {
    .site-header { flex-wrap: wrap; justify-content: space-between; gap: .4rem .55rem; }
    .site-links { flex: 1 1 100%; justify-content: flex-start; }
    .site-action { display: inline-flex; align-items: center; min-height: 2.5rem; padding-inline: .55rem; }


    .admin-layout { grid-template-columns: minmax(0, 1fr); gap: .6rem; }
    .admin-nav, .admin-nav-group { display: flex; flex-wrap: wrap; gap: .2rem; overflow: visible; }
    .admin-nav-group + .admin-nav-group { margin-top: .3rem; }
    .admin-nav-group, .admin-nav-label { flex-basis: 100%; }
    .admin-nav a { flex: 0 1 auto; }
}
@media (max-width: 30rem) {
    .site-header { padding-inline: .75rem; }
    .forum-page .panel, .admin-page .panel, .site-banner-shell { width: calc(100% - 1.25rem); }




    .member-heading-avatar { width: 3.45rem; height: 3.45rem; }
    .member-heading .button { max-width: 100%; }
    .catalog-row > summary { flex-wrap: wrap; gap: .35rem; }
    .catalog-row > summary strong { flex: 1; min-width: 3rem; }
    .catalog-meta { order: 1; flex-basis: 100%; margin-inline-start: 0; padding-inline-start: 2.2rem; }
    .catalog-row > summary:has(.catalog-meta)::after { margin-inline-start: auto; }
    .form-columns { grid-template-columns: minmax(0, 1fr); gap: .45rem; }
    .category-image-control { gap: .5rem; }
    .poll-option { grid-template-columns: minmax(0, 1fr) 4rem; gap: .35rem; }
}


/* Account navigation and image previews */
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.site-action { display: inline-flex; align-items: center; gap: .32rem; }
.site-account { position: relative; }
.site-account summary { cursor: pointer; font-weight: 700; list-style: none; }
.site-account .site-account-avatar { width: 1.5rem; height: 1.5rem; border-radius: 50%; }
.site-account-name { max-width: 13ch; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.site-account summary::-webkit-details-marker { display: none; }
.site-account summary::after { width: .35rem; height: .35rem; margin: -.17rem .06rem 0 .1rem; border: solid currentColor; border-width: 0 1px 1px 0; transform: rotate(45deg); content: ''; }
.site-account[open] summary::after { margin-top: .16rem; transform: rotate(225deg); }
.site-account summary.account-current, .site-account[open] summary { background: var(--active-wash); color: #f4f7ff; }
.site-account-links { position: absolute; z-index: 2; inset-inline-end: 0; top: calc(100% + .3rem); display: grid; gap: .16rem; min-width: 9rem; padding: .35rem; border: 1px solid var(--border); border-radius: .58rem; background: var(--well); box-shadow: 0 .6rem 1.5rem #080d16aa; }
.nav-unread { width: .47rem; height: .47rem; border-radius: 50%; flex: 0 0 .47rem; background: var(--focus-ring); }
.dashboard-stats > div { display: flex; flex-direction: column-reverse; border: 1px solid var(--border); border-radius: .55rem; padding: .52rem .7rem; }
.dashboard-stats dd { line-height: 1.3; font-variant-numeric: tabular-nums; }
.branding-card form { margin-top: .6rem; }
.branding-preview { display: block; max-width: 100%; background: var(--raised); object-fit: scale-down; border-radius: .55rem; }
.branding-logo { width: 80px; height: 80px; }
.branding-banner { width: min(100%, 31.25rem); aspect-ratio: 25 / 6; }
img.branding-banner { object-fit: contain; }
.image-smiley-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 8.5rem), 1fr)); gap: .5rem; }
.image-smiley-gallery .smiley-card { margin: 0; background: var(--surface); }
.image-smiley-gallery .smiley-card[open] { grid-column: 1 / -1; }
.image-smiley-gallery summary { display: grid; min-width: 0; justify-items: center; gap: .32rem; text-align: center; list-style: none; }
.image-smiley-gallery summary::-webkit-details-marker { display: none; }
.image-smiley-gallery summary:hover { background: var(--raised); border-radius: .45rem; }
.image-smiley-gallery summary::after { color: var(--muted); content: '›'; }
.image-smiley-gallery .smiley-card[open] > summary::after { transform: rotate(90deg); }
.image-smiley-gallery code { font-size: .78rem; }
.image-smiley-gallery .delete-form { margin-top: .8rem; padding-top: .65rem; }
.smiley-tile { display: grid; place-items: center; width: 54px; height: 54px; border-radius: .45rem; background: var(--well); }
.smiley-tile img { width: 54px; height: 54px; object-fit: scale-down; }
@media (max-width: 47rem) {
    .site-account[open] { flex-basis: 100%; }
    .site-account-links { position: static; display: flex; flex-wrap: wrap; margin-top: .25rem; box-shadow: none; }
}


/* Common icons, member controls and compact lists */
.ui-svg { display: inline-block; width: 1.05rem; height: 1.05rem; flex: 0 0 1.05rem; vertical-align: -.18em; }
.site-links { margin-inline-start: auto; }
.site-header-actions { display: flex; align-items: center; justify-content: flex-end; min-width: 0; gap: .3rem; }
.site-header-actions:empty { display: none; }
.site-header-actions .site-account { min-width: 0; }
.site-account-links { min-width: 13rem; }
.site-account-links button.site-action { width: 100%; background: transparent; border: 0; color: #cedaeb; text-align: start; }
.site-account-links button.site-action:hover { background: var(--raised); color: #edf3fb; }
.mail-shortcut { justify-content: center; min-width: 2.35rem; min-height: 2.35rem; }
.site-action.has-unread { color: #ffb6c0; background: #562532; }
.site-action.has-unread:hover { color: #ffe2e5; background: #682e3e; }
.site-account-links .has-unread { background: transparent; }
h1 { font-size: clamp(1.5rem, 3vw, 2rem); }
.profile-settings-panel, .settings-panel { max-width: 43rem; }
.profile-settings-panel button { margin-top: .15rem; }
.profile-detail-page .member-heading { padding-block: .72rem; }
.activity-filters { width: fit-content; max-width: 100%; }
.activity-kind { padding: .08rem .43rem; border-radius: .3rem; background: var(--raised); color: var(--muted); font-size: .78rem; }
.member-activity-list time { margin-inline-start: auto; }
.catalog-info { display: grid; min-width: 0; overflow-wrap: anywhere; }
.catalog-info small { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; color: var(--muted); font-weight: 400; }
.image-library li .check { align-items: start; overflow-wrap: anywhere; }
.image-library li .check input { flex: 0 0 1rem; }
.image-selection-form { margin-top: .65rem; }
.settings-panel h2 { font-size: 1.08rem; margin: 0; }
.permission-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr)); gap: .65rem; }
.permission-grid .note { margin: .35rem 0 0; font-size: .83rem; }
.permission-grid legend { padding-inline: .3rem; font-weight: 650; }
.permission-grid input { flex-shrink: 0; }
.admin-member-list li { display: grid; grid-template-columns: minmax(0,1.1fr) minmax(0,1fr) auto; gap: .5rem .8rem; align-items: center; }
.admin-member-meta { display: flex; align-items: center; flex-wrap: wrap; gap: .35rem .55rem; font-size: .83rem; }
.admin-member-meta .account-state { margin: 0; }
.avatar-placeholder { display: grid; place-items: center; color: var(--muted); background: var(--raised); }
.message-actions > a, .message-actions > details > summary { display: inline-flex; align-items: center; gap: .35rem; }
.message-actions .ui-svg { width: .92rem; height: .92rem; flex-basis: .92rem; }
.message-actions > a, .message-actions > details > summary { min-height: 2rem; }
@media (max-width: 480px) {
    .message-actions { column-gap: .26rem; }
    .message-actions > a, .message-actions > details > summary { gap: .24rem; padding-inline: .35rem; font-size: .8rem; }
}
@media (max-width: 52rem) {
    .site-header { flex-wrap: wrap; gap: .4rem .55rem; }
    .site-header .site-links { flex: 1 1 100%; justify-content: flex-start; order: 1; margin-inline-start: 0; }
    .site-header-actions .site-account-links { position: absolute; display: grid; top: calc(100% + .25rem); margin: 0; }
    .site-header-actions .site-account[open] { flex-basis: auto; }
    .site-header-actions .site-nav-toggle { padding-inline: .42rem; }
    .site-header-actions .site-account-name { max-width: clamp(4ch, 16vw, 13ch); }
}
@media (max-width: 32rem) {
    .admin-member-list li { grid-template-columns: minmax(0,1fr) auto; }
    .admin-member-meta { grid-column: 1; }
    .admin-member-list li > .button { grid-row: 1 / 3; grid-column: 2; }
    .member-activity-list time { flex-basis: 100%; }
    .catalog-info { flex: 1; }
}
@media (max-width: 23rem) {
    .site-header-actions { gap: .1rem; }
    .site-header .brand { gap: .35rem; }
    .site-header-actions .site-nav-toggle { font-size: .82rem; }
    .site-header-actions .site-account summary { padding-inline: .25rem; }
}



button:disabled { opacity: .58; cursor: not-allowed; filter: none; }



/* Forum directory and discussion rows */
.forum-actions { margin: 0 0 .8rem; }
.forum-actions form { display: contents; }
.forum-row.has-new-content, .discussion-list li.has-new-content { box-shadow: inset 3px 0 var(--accent-ui); }
.has-new-content .forum-icon { background: var(--active-wash); color: var(--focus-ring); }
.forum-unread, .discussion-labels span, .discussion-labels a { width: fit-content; padding: .08rem .4rem; background: var(--well); color: var(--link); border-radius: .36rem; font-size: .76rem; }
.discussion-index { padding: 0; background: var(--surface); border-radius: .74rem; overflow: hidden; }
.discussion-columns, .discussion-list > li { display: grid; align-items: center; grid-template-columns: minmax(0,1fr) 6.2rem minmax(9rem,13rem); gap: .8rem; padding: .65rem .8rem; }
.discussion-columns { color: var(--muted); font-size: .82rem; background: var(--raised); }
.discussion-list { list-style: none; padding: 0; margin: 0; }
.discussion-list > li + li { border-top: 1px solid var(--border); }
.discussion-title { display: flex; align-items: center; gap: .65rem; min-width: 0; }
.discussion-title > div, .discussion-last { overflow-wrap: anywhere; min-width: 0; }
.discussion-name { color: var(--link); font-weight: 620; }
.discussion-byline, .discussion-last time, .discussion-replies span { display: block; color: var(--muted); font-size: .8rem; }
.discussion-labels { display: flex; flex-wrap: wrap; gap: .25rem; margin-top: .18rem; }
.discussion-last, .discussion-replies { font-size: .88rem; }
.discussion-replies { font-variant-numeric: tabular-nums; }
.discussion-replies span { display: none; }
.new-discussion { margin-top: .65rem; }
.message-body { line-height: 1.65; }
.message .member-signature { max-width: 44rem; }
.profile-detail-page .member-heading { margin-bottom: .55rem; }
.profile-detail-page .member-heading-avatar { width: 3.45rem; height: 3.45rem; }
.profile-detail-page .profile-cards { align-items: start; }

/* Administrative lists and settings */
.catalog-tree { display: grid; gap: .6rem; }
.catalog-tree ul { list-style: none; padding: 0; margin: .45rem 0 0; }
.tree-row { display: flex; align-items: center; flex-wrap: wrap; gap: .35rem .6rem; overflow-wrap: anywhere; }
.tree-row h2, .tree-row > strong { margin: 0; font-size: 1rem; min-width: 0; flex: 1 1 10rem; }
.tree-category .catalog-thumb { width: 34px; height: 34px; }
.catalog-tree li { border-top: 1px solid var(--border); padding: .42rem .35rem .42rem 1rem; }
.tree-order { gap: .24rem; }
.tree-empty { margin: .4rem 0 0; }
.admin-summary-panels { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,20rem),1fr)); align-items: start; gap: 1rem; margin-top: 1rem; }
.admin-summary-panels h2 { font-size: 1rem; margin: 0; }
.admin-summary-panels .topic-list, .admin-card .topic-list { background-color: var(--surface); }
.admin-summary-panels li strong { margin-inline-start: auto; }
.dashboard-recent-activity { grid-column: 1 / -1; }
.dashboard-attention { border: 1px solid var(--primary-outline); box-shadow: inset 3px 0 var(--accent-ui); }
.dashboard-attention li { align-items: center; }
.heading-version { display: inline-block; vertical-align: middle; margin-inline-start: .5rem; font-size: .9rem; font-weight: 500; line-height: 1.4; letter-spacing: normal; color: var(--muted); white-space: nowrap; }
.forum-state-indicator { display: inline-flex; flex-wrap: wrap; align-items: center; gap: .45rem; padding: .4rem .7rem; margin: 0 0 .9rem; border: 1px solid var(--border); border-radius: .5rem; background: var(--surface); font-size: .88rem; }
.forum-state-indicator > span { width: .45rem; height: .45rem; border-radius: 50%; background: var(--accent-ui); }
.maintenance-sections { display: grid; gap: 1.25rem; }
.maintenance-sections > *, .maintenance-sections form { margin: 0; }
.maintenance-sections h2 { margin: 0 0 .8rem; font-size: 1.1rem; }
.maintenance-facts { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,10rem),1fr)); gap: .8rem; margin: 1rem 0; }
.maintenance-facts > div { min-width: 0; padding: .8rem; border: 1px solid var(--border); border-radius: .5rem; background: var(--surface); }
.maintenance-facts dt { color: var(--muted); font-size: .85rem; }
.maintenance-facts dd { margin: .3rem 0 0; color: var(--text); font-size: 1.05rem; font-weight: 550; font-variant-numeric: tabular-nums; }
.backup-records { display: grid; gap: .9rem; padding: 0; margin: 1rem 0; list-style: none; }
.backup-record { min-width: 0; }
.backup-record-heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem; }
.backup-record-heading h3 { margin: 0; font-size: 1rem; }
.backup-record-heading .count-label { flex-shrink: 0; white-space: nowrap; }
.backup-record .maintenance-facts { margin: .8rem 0; }
.backup-filename { margin: 0 0 .8rem; }
.backup-filename code { font-size: .82rem; white-space: normal; overflow-wrap: anywhere; }
.backup-record-actions { align-items: center; }
.group-overview details { margin: 0 0 0 auto; }
.group-overview details[open], .admin-journal details[open] { flex-basis: 100%; }
.admin-section .group-overview details form { padding: .4rem; }
.account-detail-section { margin-top: .55rem; }
.account-detail-section h3 { margin: 0 0 .45rem; }
.admin-journal details { margin-inline-start: auto; }

/* Avatar picker */
.current-avatar { display: flex; align-items: center; gap: .55rem; margin-bottom: .7rem; }
.current-avatar img { margin: 0; }
.avatar-admin-library li { display: grid; justify-items: start; gap: .3rem; }
.avatar-gallery-thumb { display: block; width: 64px; height: 64px; object-fit: scale-down; border-radius: .46rem; background: var(--well); }
.avatar-gallery-tabs a[aria-current] { background: var(--active-wash); }
.avatar-picker-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(min(100%,7rem),1fr)); gap: .45rem; }
.avatar-picker-item { position: relative; min-width: 0; justify-items: center; padding: .65rem .35rem .4rem; text-align: center; border-radius: .5rem; border: 1px solid var(--border); background: var(--raised); cursor: pointer; }
.avatar-picker-item input { position: absolute; width: 1rem; height: 1rem; left: .2rem; top: .2rem; }
.avatar-picker-item span { overflow-wrap: anywhere; font-size: .83rem; }
.avatar-picker-item:has(input:checked) { border-color: var(--accent-ui); background: var(--active-wash); }
.avatar-picker-item:focus-within { outline: 2px solid var(--focus-ring); outline-offset: 1px; }
@media (max-width: 40rem) {
    .discussion-columns { display: none; }
    .discussion-list > li { grid-template-columns: minmax(0,1fr) auto; gap: .4rem; }
    .discussion-title { grid-column: 1 / -1; }
    .discussion-replies { padding-inline-start: 2.8rem; }
    .discussion-replies span { display: inline; margin-inline-start: .3rem; }
    .discussion-last { text-align: end; }
    .tree-order { margin-left: auto; }
}



.reaction-bar { display: flex; flex-wrap: wrap; gap: .27rem .38rem; align-items: center; margin: .48rem 0; }
.reaction-bar button, .reaction-bar > span { padding: .2rem .48rem; border-radius: 1rem; font-size: .83rem; }
.reaction-bar button[aria-pressed=true] { border-color: var(--accent-ui); background: var(--active-wash); }
.draft-status { margin: 0; font-size: .82rem; }
.draft-status:empty { display: none; }
.mention { font-weight: 650; }
.topic-prefix { display: inline-flex; align-items: center; gap: .33rem; padding: .13rem .42rem; margin: 0 .2rem .2rem 0; border-radius: .38rem; background: var(--well); color: #e1edff; font-size: .8rem; }
.topic-prefix::before { content: ''; background: var(--prefix-color,var(--accent-ui)); width: .55rem; height: .55rem; border-radius: 100%; }
.prefix-filter { margin: 0 0 .75rem; }
.prefix-filter label { flex: 0 1 13rem; }
.prefix-allocation { padding: .35rem 0; border-bottom: 1px solid var(--border); }
.prefix-allocation .check { margin-inline-start: auto; }

/* ACP */
.admin-page .admin-layout { grid-template-columns: minmax(12rem, 14rem) minmax(0, 1fr); }
.admin-page .admin-menu { min-width: 0; padding: .35rem; border-radius: .74rem; background: var(--surface); }
.admin-menu > summary { display: none; }
.admin-page .admin-nav { display: grid; gap: .17rem; padding: 0; }
.admin-nav .admin-nav-group { display: block; margin: 0; padding: 0; border: 0; }
.admin-nav :is(a,summary) { display: flex; align-items: center; gap: .48rem; padding: .38rem .55rem; min-height: 2.25rem; border-radius: .4rem; }
.admin-nav summary { list-style: none; color: var(--text); cursor: pointer; font-size: .89rem; font-weight: 600; }
.admin-menu summary::-webkit-details-marker { display: none; }
.admin-nav summary::after { content: '›'; margin-inline-start: auto; color: var(--link); }
.admin-nav details[open] > summary::after { transform: rotate(90deg); }
.admin-nav summary:hover { background: var(--raised); }
.admin-nav .admin-subnav { margin: .14rem 0 .22rem 1.02rem; padding-left: .48rem; border-left: 1px solid var(--control-border); }
.admin-nav .admin-subnav a { font-size: .85rem; }
.admin-nav a .admin-unread-count {
    width: auto;
    margin-inline-start: auto;
    background: #513b80;
    color: #f1eaff;
    white-space: nowrap;
}
.admin-nav a[aria-current="page"] { box-shadow: inset 2px 0 var(--accent-ui); }
.admin-content :is(form,fieldset) { min-width: 0; }
.admin-content form .check input { flex-shrink: 0; }
.admin-content input[type="number"] { width: min(100%,9rem); }
.admin-content form.settings-panel { gap: .65rem; }
.admin-content .settings-panel fieldset { display: grid; gap: .42rem; margin-inline: 0; }
.admin-content .settings-panel fieldset label + label { margin-top: 0; }
.admin-content .settings-panel legend { padding-inline: .28rem; font-weight: 650; }
.admin-content .settings-panel :is(.note,label + label) { margin-bottom: 0; }
.admin-content .admin-field-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,14rem),1fr)); gap: .55rem .85rem; }
.admin-branding-sections { display: grid; grid-template-columns: minmax(0,1fr); gap: 1.25rem; }
.admin-content .admin-test-mail, .prefix-forums { margin-top: .7rem; }
.admin-content .admin-card > h2 { font-size: 1.08rem; margin: 0 0 .55rem; }
.admin-content .notice, .admin-content .error { margin-bottom: .65rem; }
.editor-code-row { margin: .2rem 0; }
.editor-code-row > summary { display: flex; align-items: center; flex-wrap: wrap; gap: .4rem .65rem; }
.editor-code-edit { margin-inline-start: auto; font-size: .8rem; }
.editor-code-remove { margin: .2rem .65rem .4rem; border-top: 1px solid var(--border); }
.editor-code-add { margin-top: .7rem; }
.prefix-index { display: grid; gap: .35rem; margin: 0 0 .7rem; }
.prefix-index li { align-items: center; }
.prefix-index li > a { margin-inline-start: auto; }
.prefix-index .topic-prefix { margin: 0; }
.image-library .library-tile:has(input:checked) { box-shadow: inset 0 0 0 2px var(--accent-ui); }
.image-library .library-tile label { display: grid; cursor: pointer; gap: .33rem; align-items: start; }
.image-library .library-name { display: flex; gap: .27rem; align-items: start; }
.image-library .library-name input { width: 1rem; height: 1rem; flex: 0 0 1rem; }
.library-selection { display: flex; align-items: end; flex-wrap: wrap; gap: .5rem .8rem; }
.library-selection > label { flex: 1 1 13rem; min-width: 0; }
.library-selection figure { margin: 0; }
.library-selection figure img { vertical-align: middle; width: 80px; height: 80px; object-fit: scale-down; background: var(--well); border-radius: .4rem; }
@media (max-width: 47rem) {
    .admin-page .admin-layout { grid-template-columns: minmax(0,1fr); }
    .admin-menu > summary { display: flex; gap: .5rem; align-items: center; padding: .48rem .53rem; cursor: pointer; font-weight: 700; }
    .admin-menu[open] > summary { border-bottom: 1px solid var(--border); margin-bottom: .26rem; }
}

/* ACP: alignement des commandes et aperçu du catalogue */
.admin-nav :is(a,summary) { padding-inline: .56rem; }
.admin-nav .admin-subnav { margin-inline-start: .55rem; }
.admin-content .tree-row { display: grid; grid-template-columns: auto minmax(0,1fr) auto; gap: .4rem .62rem; }
.admin-content .tree-order { gap: .3rem; margin: 0; }
.admin-content .tree-actions { justify-content: flex-end; gap: .3rem; }
.admin-content .tree-actions :is(button,a) { padding: .32rem .52rem; }
.admin-content .tree-actions form { display: contents; }
.admin-content .catalog-form { gap: .58rem; }
.admin-content .catalog-form .form-columns { grid-template-columns: minmax(0,1fr) minmax(5rem,9rem); }
.admin-content .catalog-form textarea { min-height: 4rem; }
.admin-content .library-tile .admin-image-box { width: min(100%,112px); height: 96px; }
.admin-content .library-tile .admin-image-box img { width: 100%; height: 100%; object-fit: scale-down; }
.admin-content .image-library:has(.library-tile) { grid-template-columns: repeat(auto-fill,minmax(min(100%,9rem),1fr)); }
.admin-content .library-tile:has(input:checked) { background: var(--active-wash); }
.admin-content .library-tile:focus-within { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.admin-content .library-selection figure { max-width: 100%; }
.admin-content .library-selection figure img { width: 130px; height: 96px; }
.admin-content .library-selection figcaption { max-width: 15rem; color: var(--muted); font-size: .8rem; }
@media (max-width: 57rem) {
    .admin-content .tree-actions { grid-column: 2 / -1; justify-content: flex-start; }
}
@media (max-width: 30rem) {
    .admin-content .catalog-form .form-columns { grid-template-columns: minmax(0,1fr); }
}

/* Téléchargements et icônes de forums */
.attachment-list { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,18rem),1fr)); gap: .62rem; }
.attachment-list .attachment-card { display: grid; gap: .55rem; padding: .65rem; background: var(--well); }
.attachment-details { min-width: 0; display: grid; grid-template-columns: 2.6rem minmax(0,1fr) auto; align-items: center; gap: .5rem; }
.attachment-art { width: 2.6rem; height: 2.6rem; --art-paper:#263d64; --art-ink:#adcfff; }
.attachment-pdf .attachment-art { --art-paper:#532f48; --art-ink:#ffbdd9; }
.attachment-shadow { fill: #101521; opacity: .85; }
.attachment-paper { fill: var(--art-paper); stroke: var(--art-ink); stroke-width: 1.2; }
.attachment-fold { fill: none; stroke: var(--art-ink); stroke-width: 1.3; }
.attachment-mark { fill: var(--art-ink); }
.attachment-lines { fill: none; stroke: var(--art-ink); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.attachment-meta { display: grid; gap: .07rem; }
.attachment-meta strong { font-size: .91rem; overflow-wrap: anywhere; }
.attachment-meta span { color: var(--muted); font-size: .79rem; }
.attachment-list .attachment-download { padding: .29rem .48rem; font-size: .82rem; white-space: nowrap; }
.forum-summary .forum-icon { flex: 0 0 2.55rem; height: 2.55rem; overflow: hidden; }
.forum-icon img { display: block; width: 100%; height: 100%; object-fit: scale-down; }
.forum-heading-summary { display: flex; gap: .54rem; align-items: center; margin-bottom: .55rem; }
.forum-heading-summary .forum-icon { width: 2.65rem; height: 2.65rem; flex: 0 0 2.65rem; }
.forum-heading-summary p { margin: 0; }
.forum-image-picker { min-width: 0; }
.forum-image-picker .forum-picker-current { display: flex; gap: .6rem; align-items: center; margin: .45rem .65rem; }
.forum-picker-current .category-image-box { flex-shrink: 0; }
.forum-picker-current p { margin: 0; font-size: .86rem; }
.forum-icon-choices { display: grid; grid-template-columns: repeat(auto-fill,minmax(min(100%,7.2rem),1fr)); gap: .4rem; margin: .5rem .65rem .65rem; max-height: 19rem; overflow: auto; }
.forum-icon-choice { min-width:0; background:var(--surface); padding:.35rem; border-radius:.4rem; cursor:pointer; font-size:.81rem; overflow-wrap:anywhere; }
.forum-icon-choice img, .forum-icon-choice > svg { width: 48px; height: 48px; object-fit: scale-down; }
.forum-icon-choice span { display: flex; align-items: start; gap: .25rem; }
.forum-icon-choice input { width: 1rem; height: 1rem; flex: 0 0 1rem; }
.forum-icon-choice:has(input:checked) { outline: 1px solid var(--accent-ui); background: var(--active-wash); }
.forum-icon-choice:focus-within { outline: 2px solid var(--focus-ring); }
.library-tile [data-open-library-image] { cursor: zoom-in; margin-bottom: .3rem; }
.library-image-dialog { width: max-content; max-width: calc(100vw - 2rem); max-height: calc(100dvh - 2rem); padding: .6rem; color: inherit; background: var(--surface); border: 1px solid var(--rule); border-radius: .7rem; }
.library-image-dialog::backdrop { background: rgb(5 9 17 / .82); }
.library-image-dialog > button { display: block; margin-left: auto; padding: .2rem .55rem; line-height: 1.25; font-size: 1.25rem; }
.library-image-dialog figure { margin: .35rem 0 0; text-align: center; }
.library-image-dialog img { display: block; max-width: min(73vw, 62rem); max-height: 74dvh; min-width: min(60vw,12rem); min-height: min(35dvh,10rem); object-fit: contain; margin-inline: auto; }
.library-image-dialog figcaption { color: var(--muted); font-size: .83rem; margin-top: .3rem; overflow-wrap: anywhere; max-width: 73vw; }
@media (max-width: 34rem) {
    .attachment-details { grid-template-columns: 2.6rem minmax(0,1fr); }
    .attachment-download { grid-column: 2; justify-self: start; }
}
/* Navigation et contexte du forum */
.site-header .site-header-actions { margin-inline-start: auto; }
.site-menu .site-account-links { inset-inline-start: 0; inset-inline-end: auto; min-width: 9rem; }
.site-menu summary { white-space: nowrap; }
.notification-shortcut { position: relative; justify-content: center; min-width: 2rem; }
.notification-shortcut .nav-unread { position: absolute; inset: .26rem .24rem auto auto; }
.forum-context { padding: .65rem .8rem; border: 1px solid var(--border); border-radius: .65rem; background: var(--well); }
.forum-context .forum-description { color: var(--muted); font-size: .88rem; }
.forum-context h1 { margin: 0 0 .14rem; }
.attachment-zip-art { display: block; width: 2.65rem; height: 2.65rem; object-fit: contain; }
@media (max-width: 27rem) {
    .site-header .site-header-actions { gap: .12rem; }
    .site-header-actions .site-account-name { max-width: 6ch; }
    .site-header-actions .site-menu summary .ui-icon { display: none; }
}

.attachment-list a.attachment-download { background: #176147; border-color: #319174; color: #fff; }
.attachment-list a.attachment-download:hover { background: #207455; color: #fff; filter: none; }
.attachment-list a.attachment-download:active { background: #164d3b; color: #fff; filter: none; }
.attachment-list a.attachment-download[aria-disabled="true"] { background: #394d47; border-color: #536b62; color: #e1eae6; pointer-events: none; }
.action-menu > summary { min-width: 2.25rem; min-height: 2rem; cursor: pointer; list-style: none; text-align: center; }
.action-menu > summary::-webkit-details-marker { display: none; }
.action-menu[open] > summary { color: var(--link); }
:is(.post-action-menu, .topic-moderation-menu) { position: relative; }
:is(.post-action-menu, .topic-moderation-menu)[open] { z-index: 3; }
.topic-moderation-menu > summary {
    display: flex;
    align-items: center;
    gap: .45rem;
    min-height: 2.5rem;
    padding: .35rem .65rem;
    border: 1px solid var(--border);
    border-radius: .5rem;
    background: var(--well);
    font-weight: 650;
}
.topic-moderation-menu > summary:hover { background: var(--raised); }
.post-menu-actions.topic-menu-actions { width: 12rem; }
.post-menu-actions {
    position: absolute;
    top: var(--post-menu-top, calc(100% + 4px));
    left: var(--post-menu-left, 0px);
    width: 9rem;
    max-width: calc(100vw - 1rem);
    max-height: calc(100dvh - 1rem);
    overflow: auto;
    padding: .25rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: .52rem;
    box-shadow: 0 .45rem 1rem rgb(0 0 0 / .45);
}
:is(.post-menu-actions > button, .post-menu-actions > a, .topic-menu-actions form > button) {
    display: flex;
    align-items: center;
    gap: .45rem;
    width: 100%;
    min-height: 2.5rem;
    padding: .35rem .55rem;
    border: 0;
    border-radius: .35rem;
    background: transparent;
    color: inherit;
    font: inherit;
    text-align: start;
    text-decoration: none;
    cursor: pointer;
}
:is(.post-menu-actions > button, .post-menu-actions > a, .topic-menu-actions form > button):is(:hover, :focus-visible) { background: var(--raised); }
.post-menu-actions > .post-menu-danger { color: #ffadb7; }
.post-action-dialog {
    width: min(28rem, calc(100vw - 2rem));
    max-height: calc(100dvh - 2rem);
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: .7rem;
    background: var(--surface);
    color: inherit;
}
.post-action-dialog::backdrop { background: rgb(5 9 17 / .72); }
.smiley-zip-preview { list-style: none; padding: 0; }
.smiley-zip-preview > li { display: grid; gap: .35rem; min-width: 0; padding: .65rem; overflow-wrap: anywhere; }

.forum-breadcrumbs ol { display: flex; flex-wrap: wrap; align-items: baseline; gap: .3rem .45rem; padding: 0; list-style: none; }
.forum-breadcrumbs li { display: flex; align-items: baseline; gap: .45rem; min-width: 0; max-width: 100%; overflow-wrap: anywhere; }
.forum-breadcrumbs li > span { color: var(--muted); flex: none; }
.forum-breadcrumbs a { text-decoration: none; }
.forum-breadcrumbs a:hover { text-decoration: underline; }
.forum-breadcrumbs [aria-current="page"] { color: #edf3fb; }


.gcaptcha {
    max-width: 680px;
    min-width: 0;
    margin: .65rem 0;
    padding: clamp(.65rem, 2vw, 1rem);
    border: 1px solid var(--border);
    border-radius: .75rem;
    background: var(--surface);
    color: var(--text);
}
.gcaptcha .gc-head, .gcaptcha .gc-foot { display: flex; justify-content: space-between; align-items: center; gap: .5rem; flex-wrap: wrap; }
.gcaptcha .gc-head span, .gcaptcha .gc-help { color: var(--muted); }
.gcaptcha p { margin: .45rem 0 .65rem; }
.gcaptcha .gc-help { display: block; margin-top: .45rem; }
.gcaptcha .gc-foot { margin-top: .65rem; }
.gcaptcha .gc-grid, .gcaptcha .gc-full, .gcaptcha .gc-order {
    display: grid;
    gap: .4rem;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}
.gcaptcha .gc-odd-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.gcaptcha .gc-full { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 600px; gap: 4px; }
.gcaptcha .gc-grid button, .gcaptcha .gc-full button, .gcaptcha .gc-order button, .gcaptcha .gc-find-refs button {
    position: relative;
    display: grid;
    place-items: center;
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    min-height: 0;
    margin: 0;
    padding: .35rem;
    border: 2px solid var(--control-border);
    border-radius: .5rem;
    background: #fff;
    cursor: pointer;
    overflow: hidden;
}
.gcaptcha .gc-grid button { height: clamp(6rem, 24vw, 9rem); }
.gcaptcha .gc-order button, .gcaptcha .gc-find-refs button { height: clamp(5rem, 18vw, 8.5rem); }
.gcaptcha .gc-grid img, .gcaptcha .gc-order img, .gcaptcha .gc-find-refs img {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    pointer-events: none;
}
.gcaptcha .gc-grid img { position: absolute; inset: .35rem; width: calc(100% - .7rem); height: calc(100% - .7rem); max-width: none; max-height: none; }
.gcaptcha .gc-full button { aspect-ratio: 2 / 1; padding: 0; border-color: transparent; border-radius: 9% / 18%; background: transparent; }
.gcaptcha .gc-full img { display: block; width: 100%; height: 100%; object-fit: contain; pointer-events: none; }
.gcaptcha :is(.gc-full, .gc-order, .gc-find-refs) button { cursor: grab; touch-action: none; user-select: none; }
.gcaptcha :is(.gc-full, .gc-order, .gc-find-refs) button:active { cursor: grabbing; }
.gcaptcha button:is(.active, .selected, .over) { border-color: var(--focus-ring); box-shadow: inset 0 0 0 2px var(--focus-ring); }
.gcaptcha button.dragging { position: relative; z-index: 20; opacity: .9; cursor: grabbing; box-shadow: 0 6px 18px rgba(0,0,0,.3); }
.gcaptcha :is(.gc-grid button.active, .gc-find-refs button.placed)::after {
    position: absolute;
    inset: .2rem .2rem auto auto;
    content: '✓';
    background: #207544;
    color: #fff;
    line-height: 1.5rem;
    width: 1.5rem;
    text-align: center;
    border-radius: 50%;
    pointer-events: none;
}
.gcaptcha .gc-find { position: relative; width: 100%; max-width: 640px; border-radius: .55rem; overflow: hidden; }
.gcaptcha .gc-find-background { display: block; width: 100%; height: auto; }
.gcaptcha button.gc-find-target {
    position: absolute;
    border: 2px dashed rgba(255, 255, 255, .95);
    border-radius: .4rem;
    background: rgba(255, 255, 255, .12);
    box-shadow: 0 0 0 1px rgba(0, 0, 0, .5), inset 0 0 0 1px rgba(0, 0, 0, .5);
    padding: 0;
    margin: 0;
    min-height: 0;
    cursor: copy;
}
.gcaptcha button.gc-find-target:is(.over, :focus-visible) { background: rgba(255, 255, 255, .35); border-style: solid; }
.gcaptcha button.gc-find-target.found { border-style: solid; border-color: #2fa35f; }
.gcaptcha .gc-find-target.found::after {
    position: absolute;
    inset: 50% auto auto 50%;
    transform: translate(-50%, -50%);
    content: '✓';
    background: #207544;
    color: #fff;
    border-radius: 50%;
    width: 1.65rem;
    line-height: 1.65rem;
    text-align: center;
    pointer-events: none;
}
.gcaptcha .gc-find-refs button.placed { pointer-events: none; }
.gcaptcha .gc-find-refs { display: flex; gap: .5rem; margin-top: .5rem; }
.gcaptcha .gc-find-refs button { width: min(23%, 118px); max-height: 96px; }
.gcaptcha .gc-math-clean { display: flex; flex-wrap: nowrap; align-items: center; gap: .45rem; }
.gcaptcha .gc-fruit { border-radius: .45rem; background: #fff; max-width: calc(100% - 2rem); }
.gcaptcha .gc-fruit { flex: 1 1 0; min-width: 0; max-width: 168px; }
.gcaptcha .gc-fruit img { display: block; width: 168px; max-width: 100%; height: auto; }
.gcaptcha .gc-math-clean input[data-math] { width: 4.25rem; text-align: center; }
@media (max-width: 530px) {
    .gcaptcha :is(.gc-grid, .gc-odd-grid) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.gcaptcha .find-v0 .target-a,.gcaptcha .find-v2 .target-a{left:51.7%;top:4.7%;width:10.5%;height:21.1%}
.gcaptcha .find-v0 .target-b,.gcaptcha .find-v1 .target-b{left:75.6%;top:66.7%;width:12.8%;height:28.1%}
.gcaptcha .find-v1 .target-a,.gcaptcha .find-v3 .target-a{left:34.9%;top:26.9%;width:9.9%;height:23.4%}
.gcaptcha .find-v2 .target-b,.gcaptcha .find-v3 .target-b{left:86.6%;top:48.0%;width:12.8%;height:29.3%}
.gcaptcha .find-v1 .target-a{left:10%;top:54%;width:19%;height:38%}
.gcaptcha .find-v1 .target-b{left:65%;top:47%;width:22%;height:39%}
.gcaptcha .find-v2 .target-a{left:73%;top:0%;width:18%;height:23%}
.gcaptcha .find-v2 .target-b{left:57%;top:53%;width:31%;height:27%}
.gcaptcha .find-v3 .target-a{left:69%;top:60%;width:14%;height:22%}
.gcaptcha .find-v3 .target-b{left:27%;top:62%;width:33%;height:30%}


.attachment-gallery, .attachment-selection, .attachment-existing { list-style: none; padding: 0; }
.topic-solved { display: inline-block; padding: .2rem .5rem; border: 1px solid var(--border); border-radius: .45rem; color: var(--text); background: var(--well); font-size: .82rem; font-weight: 650; }
.solution-post { border-inline-start: .2rem solid var(--accent); }
.attachment-gallery { display: flex; flex-wrap: wrap; align-items: flex-start; gap: .45rem; }
.attachment-gallery li { max-width: 100%; }
.attachment-gallery a { display: block; border-radius: .45rem; overflow: hidden; background: var(--well); }
.attachment-gallery img { display: block; width: auto; height: auto; max-width: 8rem; max-height: 5rem; }
.attachment-selection, .attachment-existing { display: grid; gap: .35rem; margin: .35rem 0; }
.attachment-selection:empty { display: none; }
.attachment-selection li, .attachment-existing li { display: flex; align-items: center; flex-wrap: wrap; gap: .45rem; overflow-wrap: anywhere; }
.attachment-selection img, .attachment-existing img { width: 3rem; height: 3rem; object-fit: scale-down; }
.attachment-picker p { margin-bottom: .35rem; }
.attachment-dialog {
    max-width: calc(100vw - 1rem);
    max-height: calc(100dvh - 1rem);
    width: max-content;
    padding: .65rem;
    border: 1px solid var(--border);
    border-radius: .7rem;
    background: var(--surface);
    color: inherit;
}
.attachment-dialog::backdrop { background: rgb(5 9 17 / .72); }
.attachment-dialog figure { margin: .35rem 0; text-align: center; }
.attachment-dialog figure img { display: block; margin-inline: auto; max-width: min(calc(100vw - 2.5rem), 75rem); max-height: max(3rem, calc(100dvh - 10rem)); object-fit: contain; touch-action: pan-y pinch-zoom; }
.attachment-dialog figcaption { display: flex; width: 0; min-width: 100%; justify-content: center; gap: .5rem; margin: .4rem auto; font-size: .82rem; }
.attachment-dialog [data-gallery-caption] { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.attachment-dialog [data-gallery-count] { flex: none; }
.attachment-close { display: block; margin-inline-start: auto; }
.attachment-nav { justify-content: center; gap: .3rem; }
.attachment-nav :is(button, a), .attachment-close { padding: .3rem .55rem; font-size: .86rem; }
.attachment-nav [hidden] { display: none; }


/* Align category headers and forum rows on the same four tracks. */
.forum-category { --forum-columns: minmax(0,55fr) minmax(3.8rem,8fr) minmax(4.2rem,9fr) minmax(0,28fr); }
.forum-row, .forum-column-heading { display: grid; grid-template-columns: var(--forum-columns); align-items: stretch; }
.forum-row { overflow-wrap: anywhere; }
.forum-column-heading { background: var(--well); border-block: 1px solid var(--border); color: var(--muted); font-size: .79rem; font-weight: 650; }
.forum-row > :is(.forum-summary,.forum-count,.last-post), .forum-column-heading > span { min-width: 0; padding: .65rem .75rem; }
.forum-column-heading > span { padding-block: .4rem; }
.forum-column-heading > :nth-child(n+2), .forum-row > :is(.forum-count,.last-post) { border-inline-start: 1px solid var(--border); }
.forum-row + .forum-row { border-block-start: 1px solid var(--border); }
.forum-column-heading > :is(:nth-child(2),:nth-child(3)) { text-align: center; padding-inline: .12rem; }
.forum-row > .forum-count { display: grid; place-content: center; margin: 0; padding-inline: .2rem; text-align: center; }
.forum-row .last-post { justify-content: center; }
@media (min-width: 761px) {
    .forum-row .forum-count dt, .forum-row .last-post-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
}
@media (max-width: 760px) {
    .forum-column-heading { display: none; }
    .forum-row { grid-template-columns: 1fr 1fr 2fr; }
    .forum-row .forum-summary { grid-column: 1 / -1; padding: .62rem .65rem; }
    .forum-row > :is(.forum-count,.last-post) { border-block-start: 1px solid var(--border); padding-block: .4rem; }
    .forum-row > .forum-count-topics { border-inline-start: 0; }
    .forum-row .last-post { padding-inline: .45rem; }
}
.smiley-scroll { max-height: min(55dvh, 25rem); overflow: auto; border: 1px solid var(--border); border-radius: .5rem; }
.smiley-table { width: 100%; table-layout: fixed; border-spacing: 0; font-size: .92rem; }
.smiley-table thead { position: sticky; top: 0; z-index: 1; background: var(--raised); }
.smiley-table :is(th,td) { text-align: start; padding: .42rem .45rem; border-bottom: 1px solid var(--border); overflow-wrap: anywhere; }
.smiley-table tbody tr:last-child td { border-bottom: 0; }
.smiley-table th:nth-child(1) { width: 23%; }
.smiley-table th:nth-child(2) { width: 15%; }
.smiley-table th:nth-child(3) { width: 17%; }
.smiley-table th:nth-child(4) { width: 45%; }
.smiley-identity, .smiley-actions { display: flex; flex-wrap: wrap; gap: .26rem .38rem; align-items: center; }
.smiley-identity .smiley-tile { flex: 0 0 1.8rem; width: 1.8rem; height: 1.8rem; }
.smiley-identity .smiley-tile img { width: 100%; height: 100%; }
.smiley-actions form { display: inline; margin: 0; }
.smiley-actions button { min-height: 0; padding: .26rem .43rem; font-size: .79rem; }
.smiley-table .account-state { font-size: .79rem; }
.smiley-add-unicode { margin-top: .65rem; }
.smiley-manager dialog form + button { margin-top: .6rem; }
@media (max-width: 540px) {
    .smiley-table { font-size: .78rem; }
    .smiley-table :is(th,td) { padding-inline: .22rem; }
    .smiley-table .note { font-size: .68rem; }
    .smiley-actions button { padding-inline: .24rem; }
}
.admin-activity { margin: 0 0 .65rem; padding: .42rem .65rem; border: 1px solid var(--border); border-radius: .55rem; background: var(--well); }
.admin-activity figcaption { display: flex; justify-content: space-between; flex-wrap: wrap; align-items: baseline; gap: .12rem .55rem; font-weight: 650; font-size: .85rem; line-height: 1.35; }
.admin-activity svg { display: block; width: 100%; height: 58px; overflow: visible; }
@media (max-width: 540px) {
    .admin-activity svg { height: 48px; }
}
@media (max-width: 360px) {
    .admin-activity { padding-block: .3rem; }
    .admin-activity svg { height: 38px; }
}
.admin-activity polyline, .admin-activity .activity-grid { fill: none; stroke-width: 1.7px; }
.admin-activity .activity-grid { stroke: var(--border); stroke-width: 1px; }
.activity-posts { color: #69dfd0; }
.activity-topics { color: #f3cf72; }
.activity-logins { color: #cba5ff; }
.permission-state-list li > strong { margin-inline-start: auto; }
.library-tile > button { margin-top: .3rem; }
.admin-activity polyline { stroke: currentColor; }
.admin-activity .activity-point { stroke: currentColor; stroke-width: 4px; stroke-linecap: round; }
.admin-activity polyline.activity-topics { stroke-dasharray: 4 2; }
.admin-activity polyline.activity-logins { stroke-dasharray: 1 3; stroke-linecap: round; }
.activity-dates, .activity-legend { font-size: .74rem; line-height: 1.35; color: var(--muted); }
.activity-dates { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: baseline; padding-inline: 3%; gap: .35rem; }
.activity-coverage { text-align: center; }
.activity-legend { display: flex; gap: .15rem .65rem; flex-wrap: wrap; font-weight: 400; list-style: none; padding: 0; margin: 0; }
.activity-legend li { white-space: nowrap; }
.activity-legend li span { display: inline-block; width: .8rem; margin-inline-end: .25rem; border-top: 2px solid currentColor; vertical-align: middle; }
.activity-legend li .activity-topics { border-top-style: dashed; }
.activity-legend li .activity-logins { border-top-style: dotted; }
.site-footer { width: min(100% - 2rem, 75rem); margin: .75rem auto 1rem; text-align: end; font-size: .82rem; }
.site-footer .site-copyright { margin: 0 0 .35rem; text-align: center; color: var(--muted); }
.site-footer a { color: var(--muted); }
.site-footer a:is(:hover,:focus-visible) { color: var(--link-hover); }

/* Member management details reuse the current cards and palette. */
.account-facts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
    gap: .75rem 1.25rem;
    margin: .75rem 0 1rem;
}
.account-facts > div { min-width: 0; }
.account-facts dt { color: var(--muted); font-size: .875rem; }
.account-facts dd { margin: .2rem 0 0; font-size: 1rem; overflow-wrap: anywhere; }
.account-group-list form,
#group-members .topic-list form { margin: 0; }
.account-sanction-form { margin-top: 1rem; }
.sanction-current { padding-bottom: .5rem; border-bottom: 1px solid var(--border); }

.group-overview > li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: .6rem 1rem;
}
.group-overview > li > div:first-child { display: grid; gap: .15rem; }

/* One banner component, following the current member palette. */
.banner-settings { min-width: 0; }
.banner-settings > label { margin-top: .75rem; }
.admin-branding-sections .branding-card { min-width: 0; }
.admin-branding-sections .actions { gap: .6rem; margin-top: .85rem; }
.banner-editor-block { margin-top: 1.25rem; padding-top: 1.25rem; border-top: 1px solid var(--border); min-width: 0; }
.banner-editor-block > h3 { margin: 0 0 .85rem; font-size: 1.05rem; }
.banner-editor-block > label, .banner-text-control > label { margin-top: .85rem; }
.banner-text-control { margin: 1rem 0; padding: .9rem; background: var(--well); border-radius: .6rem; min-width: 0; }
.banner-text-control > label:first-child { margin-top: 0; }
.admin-branding-sections .branding-banner { width: 100%; }
.banner-settings [data-banner-intro-preview] { margin-top: .85rem; overflow-wrap: anywhere; }
.banner-save-actions { padding-top: 1rem; border-top: 1px solid var(--border); }
.banner-library-picker { margin-bottom: 1rem; }
.banner-library-picker .image-library { max-height: 22rem; overflow-y: auto; padding: .5rem; }
.banner-library-choice { display: grid; gap: .5rem; cursor: pointer; overflow-wrap: anywhere; }
.banner-library-choice img { width: 100%; height: 5rem; object-fit: contain; background: var(--well); border-radius: .4rem; }
.banner-library-choice:has(input:checked) { outline: 2px solid var(--accent-ui); outline-offset: .3rem; border-radius: .3rem; }
.banner-settings [data-banner-preview] .site-banner-shell { width: 100%; margin: 0; }
.banner-settings #banner-settings-form { margin: 0; }
.site-banner-shell.banner-dynamic {
    overflow: hidden;
    isolation: isolate;
    min-height: 12rem;
    border-radius: .6rem;
    border: 1px solid var(--border);
    background:
        radial-gradient(ellipse at 92% 5%, color-mix(in srgb, var(--accent) 34%, transparent), transparent 65%),
        linear-gradient(115deg, var(--well), var(--raised));
}
.banner-dynamic::before, .banner-dynamic::after {
    content: "";
    position: absolute;
    z-index: -1;
    pointer-events: none;
    border: 1px solid color-mix(in srgb, var(--accent-ui) 45%, transparent);
    border-radius: 2.5rem;
    transform: rotate(-25deg);
}
.banner-dynamic::before {
    width: 20rem; height: 20rem; right: -2rem; top: -12rem;
    box-shadow: 0 0 0 1.7rem color-mix(in srgb, var(--accent) 8%, transparent),
        0 0 0 1.75rem color-mix(in srgb, var(--accent-ui) 20%, transparent),
        0 0 0 4rem color-mix(in srgb, var(--accent) 5%, transparent);
}
.banner-dynamic::after { width: 10rem; height: 10rem; right: 5%; bottom: -7rem; }
.banner-copy { position: relative; min-width: 0; padding: clamp(1rem,3vw,2rem); overflow-wrap: anywhere; color: var(--text); }
.banner-copy p { margin: 0; white-space: pre-wrap; }
.banner-copy p + p { margin-top: .4rem; }
.banner-copy .banner-title { font-size: clamp(calc(1.3rem * var(--banner-title-scale,1)),calc(3.5vw * var(--banner-title-scale,1)),calc(2.15rem * var(--banner-title-scale,1))); font-weight: 650; line-height: 1.2; }
.banner-copy .banner-subtitle { font-size: calc(1.05rem * var(--banner-subtitle-scale,1)); color: var(--text); }
.banner-size-controls label > span { display: flex; justify-content: space-between; gap: .6rem; }
.banner-size-controls output { white-space: nowrap; font-variant-numeric: tabular-nums; color: var(--text); }
.banner-size-controls input[type="range"] { width: 100%; padding: 0; min-height: 2rem; border: 0; accent-color: var(--accent-ui); }
@media (max-width: 767px) {
    .banner-copy .banner-subtitle { font-size: min(calc(1.05rem * var(--banner-subtitle-scale,1)),calc(.525rem + .525rem * var(--banner-subtitle-scale,1))); }
}
.banner-copy .banner-description { font-size: .9rem; color: var(--muted); }
.banner-align-center .banner-copy { text-align: center; }
.banner-align-right .banner-copy { text-align: right; }
.banner-dynamic.banner-has-text .banner-copy { padding-bottom: 1rem; background: color-mix(in srgb, var(--well) 60%, transparent); }
.banner-image.banner-has-text { overflow: hidden; border-radius: .6rem; }
.banner-image.banner-has-text .site-banner { position: absolute; inset: 0; height: 100%; max-height: none; object-fit: cover; }
.banner-image.banner-has-text .banner-copy {
    min-height: 10rem;
    background: color-mix(in srgb, var(--well) 92%, transparent);
}
:is(.banner-dynamic,.banner-has-text) .site-banner-link {
    position: relative;
    inset: auto;
    align-self: flex-end;
    margin: auto 1rem 1rem;
    max-width: calc(100% - 2rem);
    background: var(--accent-action);
    color: var(--accent-ink);
    border-color: var(--primary-outline);
    padding: .45rem .75rem;
}
.banner-dynamic, .banner-image.banner-has-text { display: flex; flex-direction: column; }
:is(.banner-dynamic,.banner-image.banner-has-text) .banner-copy { flex: 1; }
:is(.banner-dynamic,.banner-has-text) .site-banner-link span { overflow: visible; text-overflow: clip; white-space: normal; overflow-wrap: anywhere; }
:is(.banner-dynamic,.banner-has-text) .site-banner-link:is(:hover,:focus-visible) { background: var(--accent-action); color: var(--accent-ink); box-shadow: 0 0 0 2px var(--border); }

/* Individual reading preferences. UI controls and heading hierarchy keep their own sizes. */
[data-reading-font="default"] { --reading-font: Inter, system-ui, sans-serif; }
[data-reading-font="arial"] { --reading-font: Arial, Helvetica, sans-serif; }
[data-reading-font="verdana"] { --reading-font: Verdana, Geneva, sans-serif; }
[data-reading-font="tahoma"] { --reading-font: Tahoma, Geneva, sans-serif; }
[data-reading-font="georgia"] { --reading-font: Georgia, "Times New Roman", serif; }
[data-reading-font="trebuchet"] { --reading-font: "Trebuchet MS", Arial, sans-serif; }
[data-reading-font="times"] { --reading-font: "Times New Roman", Times, serif; }
[data-reading-font="courier"] { --reading-font: "Courier New", Courier, monospace; }
[data-reading-size="small"] { --reading-size: .9375rem; }
[data-reading-size="normal"] { --reading-size: 1rem; }
[data-reading-size="large"] { --reading-size: 1.125rem; }
[data-reading-size="xlarge"] { --reading-size: 1.25rem; }
[data-reading-weight="normal"] { --reading-weight: 400; }
[data-reading-weight="bold"] { --reading-weight: 700; }
body, .typography-preview { font-family: var(--reading-font, Inter, system-ui, sans-serif); }
html:not([data-reading-size="normal"]) main p,
html:not([data-reading-size="normal"]) .message-body { font-size: var(--reading-size); }
html[data-reading-weight="bold"] main p,
html[data-reading-weight="bold"] .message-body { font-weight: 700; }
.appearance-page .typography-preview p { font-size: var(--reading-size, 1rem); font-weight: var(--reading-weight, 400); }
.message-body :is(strong,b), .typography-preview strong { font-weight: bolder; }
.typography-preview { margin-block: .8rem; padding: 1rem; border: 1px solid var(--border); border-radius: .5rem; background: var(--well); }
.typography-preview h3 { font-size: 1.1rem; font-weight: 620; }

/* Member colors describe real roles or an explicitly selected public principal group. */
.member-name[data-member-color] { color: var(--member-name-color, #c9d6e5); }
.member-name[data-member-role="admin"] { --member-name-color: #f9c8ce; }
.member-name[data-member-role="moderator"] { --member-name-color: #b7e4c9; }
a.member-name[data-member-color]:is(:hover,:focus-visible) { color: var(--member-name-color, #c9d6e5); text-decoration: underline; }
[data-group-color-editor] input[type="color"] { width: 4.5rem; height: 2.5rem; padding: .2rem; cursor: pointer; }

/* Compact controls only while the moderator enables topic reordering. */
.topic-order-actions { display: flex; flex: 0 0 auto; gap: .2rem; margin: 0; }
.topic-order-actions button { min-width: 2rem; padding: .3rem .45rem; line-height: 1.2; }
@media (max-width: 600px) {
    .topic-order-actions { flex-direction: column; }
}
