/* ByteForge forum components, built on the ByteCord design language in style.css */

html { scroll-padding-top: 86px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.spacer { flex: 1; }
.mono-label { font: 600 12px ui-monospace, Consolas, monospace; color: var(--faint); }
.link-btn { background: none; border: 0; padding: 0; color: var(--accent-light); font: 700 12.5px var(--font); cursor: pointer; }
.link-btn:hover { text-decoration: none; color: var(--accent); }
.badge-accent { color: #fff; background: var(--accent); }
.badge-accent::before { display: none; }
.alert-good { border-color: var(--good); --ia: var(--good); }

input[type=email] { width: 100%; background: var(--bg); border: 1px solid var(--line-2); color: var(--text); border-radius: 10px; padding: 10px 13px; font: 600 14px var(--font); transition: border-color .12s; appearance: none; }
input[type=email]:focus { outline: none; border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
input[type=email]:hover { border-color: var(--muted); }

/* Logo: mark and split wordmark */
.logo { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); --ia: var(--ink); flex: none; }
.logo:hover { text-decoration: none; }
.logo .i { width: 32px; height: 32px; }
.logo-word { font: 800 21px/1 var(--display); letter-spacing: -.04em; color: inherit; }
.logo-word span { color: #fff; }
.logo-foot { color: var(--text); --ia: var(--accent); margin-bottom: 8px; }
.logo-foot .logo-word span { color: var(--accent-light); }
.sidebar .logo { color: var(--text); --ia: var(--accent); padding: 6px 6px 4px; }
.sidebar .logo .logo-word span { color: var(--accent-light); }
.acp-tag { display: block; font: 600 11px ui-monospace, Consolas, monospace; color: var(--faint); padding: 0 6px 12px; }

/* Top bar */
.forum-topbar { flex-wrap: wrap; min-height: 60px; row-gap: 8px; }
.version-tag { font: 700 11.500px ui-monospace, Consolas, monospace; border: 1px solid rgba(7, 10, 16, .45); border-radius: 6px; padding: 1px 7px; }
.main-nav { display: flex; align-items: center; gap: 2px; margin-left: 10px; }
.main-nav a { display: inline-flex; align-items: center; gap: 7px; padding: 7px 11px; border-radius: 8px; color: var(--ink); font-weight: 800; font-size: 14px; --ia: var(--ink); white-space: nowrap; }
.main-nav a:hover { background: rgba(7, 10, 16, .14); text-decoration: none; }
.main-nav a[aria-current] { background: var(--ink); color: #fff; --ia: var(--accent-light); }
.nav-toggle { display: none; }
.topbar a { color: var(--ink); }
.topbar a.btn:hover { color: #fff; }
.topbar .btn-primary { color: #fff; }
.top-search { width: clamp(150px, 14vw, 210px); margin: 0; }
.top-search input { background-color: var(--ink); border-color: var(--ink); color: #fff; padding-block: 8px; }
.top-search input::placeholder { color: var(--muted); }
.top-search input:hover { border-color: var(--ink); }
.top-search input:focus { border-color: #fff; box-shadow: inset 0 0 0 1px #fff; }
.topbar .btn:focus-visible, .topbar a:focus-visible, .user-button:focus-visible, .top-search input:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

.menu { position: relative; }
.bell { overflow: visible; }
.bell-count { position: absolute; top: -6px; right: -6px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 10px; background: #fff; color: var(--ink); font: 800 11px/19px var(--font); text-align: center; }
.bell-count[hidden] { display: none; }
.user-button { background: transparent; border: 0; padding: 3px 4px; border-radius: 8px; cursor: pointer; font: inherit; font-size: 13px; font-weight: 800; color: var(--ink); }
.user-button:hover { background: rgba(7, 10, 16, .14); }
.user-button .i { width: 14px; height: 14px; }
.menu-panel { position: absolute; right: 0; top: calc(100% + 10px); width: 250px; z-index: 40; background: var(--surface-2); color: var(--text); border: 1px solid var(--line-2); border-radius: 12px; box-shadow: 0 16px 34px rgba(0, 0, 0, .55); overflow: hidden; animation: menu-in .14s var(--ease); --ia: var(--accent); }
.menu-panel[hidden] { display: none; }
.notify-panel { width: min(360px, calc(100vw - 32px)); }
.menu-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 11px 14px; border-bottom: 1px solid var(--line-2); font-size: 14px; }
.menu-head strong { font-family: var(--display); }
.menu-head small { display: block; font-size: 12px; font-weight: 600; }
.menu-panel a, .menu-panel form button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 14px; color: var(--text); font: 700 13.500px var(--font); background: none; border: 0; cursor: pointer; text-align: left; }
.menu-panel a:hover, .menu-panel form button:hover { background: var(--accent); color: #fff; text-decoration: none; --ia: #fff; }
.menu-panel form { margin: 0; }
.notify-list { max-height: 340px; overflow-y: auto; }
.notify-list a { display: block; padding: 10px 14px; border-bottom: 1px solid var(--line); font-weight: 600; line-height: 1.4; }
.notify-list a small { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.notify-list a:hover small { color: #fff; }
.notify-list a.is-unread { background: var(--accent-soft); }
.menu-panel a.menu-foot { justify-content: center; color: var(--accent-light); font-size: 13px; }
.menu-panel a.menu-foot:hover { color: #fff; }

/* Avatars */
.av { width: 40px; height: 40px; flex: none; border-radius: 10px; display: inline-grid; place-items: center; object-fit: cover; font: 800 14px/1 var(--display); letter-spacing: -.02em; color: #fff; background: var(--surface-3); }
.av-xs { width: 22px; height: 22px; border-radius: 6px; font-size: 9px; }
.av-sm { width: 32px; height: 32px; border-radius: 8px; font-size: 12px; }
.av-lg { width: 84px; height: 84px; border-radius: 14px; font-size: 28px; }
.av-xl { width: 92px; height: 92px; border-radius: 16px; font-size: 32px; }
.av-t1 { background: #1877f2; } .av-t2 { background: #0f766e; } .av-t3 { background: #7c3aed; }
.av-t4 { background: #b45309; } .av-t5 { background: #be185d; } .av-t6 { background: #334155; }
.av-ghost { color: var(--faint); }
.topbar .av { outline: 2px solid var(--ink); }

/* Page head variants */
.head-compact h1 { font-size: clamp(28px, 4vw, 52px); line-height: 1.05; max-width: 22em; }
.board-head h1 { font-size: clamp(52px, 9.5vw, 132px); line-height: .92; letter-spacing: -.05em; }
.page-head a:not(.btn) { color: var(--ink); font-weight: 800; }
.page-head a:not(.btn):hover { color: #fff; }
.page-head .btn:hover { color: #fff; }
.crumbs { display: flex; flex-wrap: wrap; gap: 7px; font-weight: 700; font-size: 13.500px; margin-bottom: 10px; }
.topic-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; font-size: 14px; }
.page-head .badge::before { display: none; }

/* Board */
.board-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 30px; align-items: start; }
.category { margin-bottom: 34px; }
.category-head { display: flex; justify-content: space-between; align-items: baseline; gap: 14px; margin-bottom: 12px; }
.category-head h2 { font-size: clamp(22px, 2.400vw, 32px); margin: 0; }
.list-card { padding: 0; overflow: hidden; }
.row { display: grid; align-items: center; gap: 16px; padding: 16px 18px; border-bottom: 1px solid var(--line); transition: background .12s, box-shadow .12s; }
.row:last-child { border-bottom: 0; }
.row:hover { background: var(--surface-2); }
.row-main { min-width: 0; }
.row-main h3 { font-size: 17px; letter-spacing: -.025em; margin: 0 0 2px; overflow-wrap: anywhere; }
.row-main h3 a { color: var(--text); }
.row-main h3 a:hover { color: var(--accent-light); }
.row-main p { margin: 0; }
.forum-row { grid-template-columns: 44px minmax(0, 1fr) 128px minmax(170px, 230px); }
.forum-icon { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 10px; background: var(--accent-soft); color: var(--accent-light); --ia: var(--accent-light); }
.forum-icon .i { width: 22px; height: 22px; }
.row-counts { display: flex; gap: 18px; margin: 0; justify-content: flex-end; }
.row-counts > div { text-align: center; min-width: 46px; }
.row-counts dd { margin: 0; font: 800 17px/1.2 var(--display); letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.row-counts dt { font: 600 11px ui-monospace, Consolas, monospace; color: var(--faint); }
.row-last { display: flex; align-items: center; gap: 10px; min-width: 0; }
.row-last-text { min-width: 0; display: flex; flex-direction: column; line-height: 1.35; }
.row-last-title { font-weight: 800; font-size: 13.500px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-last-title:hover { color: var(--accent-light); }

.board-side { display: flex; flex-direction: column; gap: 18px; position: sticky; top: 78px; }
.side-title { font-size: 16px; margin: 0 0 12px; }
.side-stats { grid-template-columns: repeat(3, 1fr); margin-bottom: 12px; }
.side-stats .card.stat { padding: 14px 12px; }
.newest { display: flex; justify-content: space-between; gap: 10px; margin: 0; }
.online-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.online-list a { display: inline-flex; align-items: center; gap: 7px; padding: 4px 9px 4px 4px; border-radius: 8px; background: var(--surface-2); color: var(--text); font-size: 13px; font-weight: 700; }
.online-list a:hover { background: var(--surface-3); text-decoration: none; }
.online-list a.role-admin { box-shadow: inset 0 0 0 1px var(--accent); }
.online-list a.role-mod { box-shadow: inset 0 0 0 1px var(--good); }

/* Topic list */
.topic-row { grid-template-columns: 40px minmax(0, 1fr) 128px 170px; }
.topic-row.is-pinned { background: var(--accent-soft); }
.flag { display: inline-flex; vertical-align: -2px; color: var(--muted); margin-right: 3px; }
.flag .i { width: 16px; height: 16px; }
.flag-pin { color: var(--accent-light); --ia: var(--accent-light); }

.pager { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; margin: 16px 0; }
.pager .is-current { background: var(--accent); border-color: var(--accent); color: #fff; }
.pager-gap { color: var(--faint); padding: 0 3px; }

/* Topic stream */
.mod-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 16px; }
.mod-bar form { margin: 0; }
.post-stream { display: flex; flex-direction: column; gap: 14px; }
.post { display: grid; grid-template-columns: 190px minmax(0, 1fr); padding: 0; margin: 0; overflow: hidden; }
.post:target { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.post.is-new { animation: post-in .5s var(--ease); }
@keyframes post-in { from { opacity: 0; transform: translateY(12px); } }
.post-author { background: var(--surface-2); padding: 20px 16px; border-right: 1px solid var(--line); display: flex; flex-direction: column; align-items: flex-start; gap: 12px; min-width: 0; }
.post-author-text { display: flex; flex-direction: column; align-items: flex-start; gap: 7px; min-width: 0; width: 100%; }
.post-name { font: 800 16px var(--display); letter-spacing: -.025em; color: var(--text); overflow-wrap: anywhere; }
.post-name:hover { color: var(--accent-light); }
.post-facts { width: 100%; margin: 3px 0 0; font-size: 12.500px; }
.post-facts > div { display: flex; justify-content: space-between; gap: 8px; padding: 3px 0; border-top: 1px solid var(--line); }
.post-facts dt { color: var(--faint); font-weight: 600; }
.post-facts dd { margin: 0; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; text-align: right; }
.online-tag { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: var(--good); }
.online-dot { color: var(--good); vertical-align: 2px; }
.post-main { min-width: 0; padding: 16px 22px; display: flex; flex-direction: column; }
.post-head { display: flex; justify-content: space-between; gap: 12px; padding-bottom: 10px; margin-bottom: 12px; border-bottom: 1px solid var(--line); }
.post-link { font: 600 12px ui-monospace, Consolas, monospace; color: var(--faint); }
.post-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: auto; padding-top: 14px; }
.post-actions form { margin: 0; }
.like-btn:disabled { cursor: default; opacity: .75; }
.like-btn .like-icon { display: inline-flex; --ia: var(--accent-light); }
.like-btn.is-liked { background: var(--accent); border-color: var(--accent); color: #fff; }
.like-btn.is-liked .like-icon { --ia: #fff; }
.like-count { font-variant-numeric: tabular-nums; border-left: 1px solid currentColor; padding-left: 7px; margin-left: 1px; }
.like-btn.pop .like-icon { animation: bump .4s var(--spring); }
@keyframes bump { 40% { transform: scale(1.45); } }

.prose { font-size: 15px; line-height: 1.65; overflow-wrap: anywhere; }
.prose > :last-child { margin-bottom: 0; }
.prose p { margin: 0 0 12px; }
.prose ul { margin: 0 0 12px; padding-left: 20px; }
.prose li { margin-bottom: 3px; }
.prose blockquote { margin: 0 0 12px; padding: 10px 14px; background: var(--surface-2);  border-radius: 0 8px 8px 0; color: var(--muted); }
.prose blockquote p:last-child { margin-bottom: 0; }
.prose cite { display: block; font: 800 12.500px var(--font); font-style: normal; color: var(--text); margin-bottom: 4px; }
.prose pre.code { margin: 0 0 12px; padding: 13px 15px; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; overflow-x: auto; }
.prose pre.code code { background: none; padding: 0; overflow-wrap: normal; white-space: pre; font-size: 13px; }

.attachments { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.attach-image img { display: block; max-width: 240px; max-height: 170px; border-radius: 10px; border: 1px solid var(--line-2); }
.attach-file { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border: 1px solid var(--line-2); border-radius: 10px; color: var(--text); font-size: 13px; font-weight: 700; }
.attach-file:hover { border-color: var(--accent); text-decoration: none; }
.attach-file span { overflow-wrap: anywhere; }

/* Editor */
.fast-reply { margin-top: 18px; }
.fast-reply h2 { font-size: clamp(22px, 2.400vw, 32px); }
.fast-reply .empty .i { vertical-align: -4px; }
.reply-grid { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 14px; align-items: start; }
.reply-actions { margin-top: 12px; }
.editor-bar { display: flex; flex-wrap: wrap; gap: 2px; padding: 5px; background: var(--surface-2); border: 1px solid var(--line-2); border-bottom: 0; border-radius: 10px 10px 0 0; }
.editor-bar button { width: 32px; height: 30px; display: grid; place-items: center; background: none; border: 0; border-radius: 6px; color: var(--muted); font: 700 14px var(--display); cursor: pointer; --ia: var(--accent-light); }
.editor-bar button:hover { background: var(--surface-3); color: var(--text); }
.editor-bar .i { width: 16px; height: 16px; }
.editor textarea { border-radius: 0 0 10px 10px; min-height: 120px; display: block; }
.attach { display: inline-flex; align-items: center; gap: 8px; margin: 10px 0 0; padding: 7px 12px; border: 1px dashed var(--line-2); border-radius: 8px; font-size: 13px; color: var(--muted); cursor: pointer; }
.attach:hover, .attach:focus-within { border-color: var(--accent); color: var(--text); }
.attach input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.attach .i { width: 15px; height: 15px; }
.narrow { max-width: 860px; }

/* Members and profile */
.member-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 14px; margin-bottom: 18px; }
.member-card { display: flex; gap: 14px; align-items: center; margin: 0; padding: 16px; color: var(--text); transition: border-color .12s, background .12s; }
.member-card:hover { border-color: var(--accent); background: var(--surface-2); text-decoration: none; }
.member-text { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-width: 0; }
.member-text strong { font: 800 16px var(--display); letter-spacing: -.025em; overflow-wrap: anywhere; }
.profile-id { display: flex; align-items: center; gap: 18px; min-width: 0; }
.profile-head .av { outline: 3px solid var(--ink); }
.profile-stats { grid-template-columns: repeat(auto-fit, minmax(min(160px, 42%), 1fr)); }
.profile-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(380px, 100%), 1fr)); gap: 16px; align-items: start; }
.profile-grid > .card { margin: 0; }
.admin-user-layout { align-items: start; }
.admin-user-layout > .grid { margin-bottom: 0; }
.admin-user-media { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.admin-user-media form { flex: 1 1 220px; min-width: 0; }
.admin-user-banner { display: block; width: 100%; max-height: 180px; margin: 0 0 14px; border-radius: 12px; object-fit: cover; }
.admin-user-activity { display: grid; gap: 12px; }
.admin-user-activity > div { display: grid; gap: 3px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.admin-user-activity > div:last-child { padding-bottom: 0; border-bottom: 0; }
.admin-user-activity .muted { font-size: 12px; }
.admin-user-activity p { margin: 3px 0 0; color: var(--muted); font-size: 13px; }
.admin-user-cosmetic { display: flex; align-items: end; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); }
.admin-user-cosmetic .field { flex: 1; min-width: 0; margin: 0; }
.admin-user-details { display: grid; grid-template-columns: minmax(110px, .4fr) 1fr; gap: 9px 14px; margin: 0; }
.admin-user-details dt { color: var(--muted); }
.admin-user-details dd { margin: 0; overflow-wrap: anywhere; }
.activity { padding: 11px 0; border-top: 1px solid var(--line); }
.activity a { font-weight: 800; }
.activity p { margin: 2px 0; overflow-wrap: anywhere; }
.avatar-row { display: flex; gap: 18px; align-items: flex-start; flex-wrap: wrap; }
.avatar-row form { margin: 0; }
.avatar-row .attach { margin-top: 0; }

.tabs { display: flex; gap: 4px; margin-bottom: 12px; }
.tabs a { padding: 7px 15px; border-radius: 8px; font-weight: 800; font-size: 14px; color: var(--muted); }
.tabs a:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.tabs a[aria-selected="true"] { background: var(--accent); color: #fff; }
.notify-row { grid-template-columns: 44px minmax(0, 1fr); color: var(--text); }
.notify-row:hover { text-decoration: none; }
.notify-row .row-main { display: flex; flex-direction: column; }
.notify-row.is-unread { background: var(--accent-soft); font-weight: 700; }
.filters select { width: 100%; }

/* Footer */
.main { min-height: 100vh; }
.content { flex: 1; }
.stage { margin-bottom: -70px; }
.stage-solo .btn { --ia: var(--accent-light); }

/* ACP */
.dash-stats { grid-template-columns: repeat(auto-fit, minmax(min(150px, 42%), 1fr)); }
.acp-main-head { display: flex; align-items: center; gap: 10px; }
.status-list { margin: 0; }
.status-list > div { display: flex; justify-content: space-between; gap: 16px; padding: 9px 0; border-top: 1px solid var(--line); font-size: 14px; }
.status-list > div:first-child { border-top: 0; }
.status-list dt { color: var(--muted); font-weight: 600; }
.status-list dd { margin: 0; font-weight: 700; text-align: right; overflow-wrap: anywhere; }
.structure-cat { padding: 0; overflow: hidden; }
.structure-head { display: flex; align-items: center; gap: 10px; padding: 14px 18px; background: var(--surface-2); border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.structure-head h2 { margin: 0; font-size: 18px; flex: 1; min-width: 160px; overflow-wrap: anywhere; }
.row-tools { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; justify-content: flex-end; }
.row-tools form { margin: 0; }
.row-tools .btn-icon, .structure-head .btn-icon { width: 32px; height: 32px; border-radius: 8px; }
.row-tools .btn-icon .i, .structure-head .btn-icon .i { width: 15px; height: 15px; }
.btn[aria-disabled="true"], .btn:disabled.is-off { opacity: .35; pointer-events: none; }
.inline-form { display: flex; gap: 8px; align-items: flex-end; flex-wrap: wrap; }
.inline-form .field { flex: 1 1 220px; margin: 0; }
.user-cell { display: flex; align-items: center; gap: 10px; min-width: 170px; }
.user-cell strong { display: block; }
.role-form { display: flex; gap: 6px; align-items: center; margin: 0; min-width: 190px; }
.role-form .cs { min-width: 130px; }
.role-form .cs-btn { padding-block: 6px; min-height: 33px; font-size: 13px; }
.log-action { overflow-wrap: anywhere; min-width: 260px; }
.reveal-box code { font-size: 14px; user-select: all; }
dialog .check { margin-top: 2px; }
dialog form { margin: 0; }
.danger-zone .inline-form .field { flex: 0 1 300px; }

@media (max-width: 1080px) {
  .board-layout { grid-template-columns: 1fr; }
  .board-side { position: static; }
  .side-stats { grid-template-columns: repeat(auto-fill, minmax(min(150px, 42%), 1fr)); }
  .forum-row { grid-template-columns: 44px minmax(0, 1fr) 128px; }
  .forum-row .row-last { grid-column: 2 / -1; }
  .topic-row { grid-template-columns: 40px minmax(0, 1fr) 128px; }
  .topic-row .row-last { display: none; }
}
@media (max-width: 900px) {
  .nav-toggle { display: inline-flex; order: 3; }
  .main-nav { order: 10; width: 100%; margin: 0; flex-direction: column; align-items: stretch; display: none; }
  .main-nav.open { display: flex; }
  .top-search { order: 11; width: 100%; }
  .forum-topbar .spacer { order: 2; }
  .forum-topbar .menu, .forum-topbar > .btn:not(.nav-toggle) { order: 4; }
  .forum-topbar .hide-sm { display: none; }
  .topbar { position: sticky; }
  .menu { position: static; }
  .menu-panel { right: 16px; left: auto; top: 56px; }
}
@media (max-width: 640px) {
  .post { grid-template-columns: 1fr; }
  .post-author { flex-direction: row; align-items: center; border-right: 0; border-bottom: 1px solid var(--line); padding: 12px 14px; }
  .post-author .av { width: 48px; height: 48px; border-radius: 10px; font-size: 16px; }
  .post-author-text { flex-direction: row; flex-wrap: wrap; align-items: center; }
  .post-facts { display: flex; gap: 14px; margin: 0; }
  .post-facts > div { border: 0; padding: 0; gap: 4px; }
  .post-main { padding: 14px; }
  .forum-row { grid-template-columns: 40px minmax(0, 1fr); }
  .forum-icon { width: 40px; height: 40px; }
  .row-counts { grid-column: 2; justify-content: flex-start; }
  .row-counts > div { display: flex; align-items: baseline; gap: 5px; min-width: 0; }
  .topic-row { grid-template-columns: 40px minmax(0, 1fr); }
  .topic-row .row-counts { grid-column: 2; }
  .reply-grid { grid-template-columns: 1fr; }
  .reply-grid > .av { display: none; }
  .profile-id .av { width: 64px; height: 64px; font-size: 22px; }
  .member-grid { grid-template-columns: 1fr; }
}

/* ---- v2: subforums, footer, drag and drop, ACP lists ---- */
.uname { color: var(--role, inherit); font-weight: 800; }
.ulink:hover { text-decoration: none; filter: brightness(1.2); }
.badge-role { color: var(--role); background: color-mix(in srgb, var(--role) 16%, transparent); }
.forum-block { border-bottom: 1px solid var(--line); }
.forum-block:last-child { border-bottom: 0; }
.forum-block > .row { border-bottom: 0; }
.subforums { display: grid; gap: 1px; padding: 0 18px 14px 78px; }
.subforums-1 { grid-template-columns: 1fr; }
.subforums-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.subforums-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.subforum { display: flex; gap: 9px; align-items: flex-start; padding: 8px 10px; border-radius: 8px; min-width: 0; }
.subforum:hover { background: var(--surface-2); }
.sub-icon { color: var(--accent-light); --ia: var(--accent-light); flex: none; }
.sub-icon .i { width: 16px; height: 16px; }
.subforum-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.35; }
.subforum-name { font-weight: 800; font-size: 14px; color: var(--text); overflow-wrap: anywhere; }
.subforum-last { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-card > .subforums { padding: 12px; }
.topic-legend { display: flex; margin-top: 8px; }
.side-promo .btn { margin-top: 4px; }

.site-foot { display: block; padding: 0; margin-top: 10px; }
.foot-online { padding: 22px max(var(--gutter), calc((100% - var(--page)) / 2)); background: var(--surface); border-bottom: 1px solid var(--line); }
.foot-online-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.foot-online-head h2 { font-size: 18px; margin: 0; }
.foot-online-list { list-style: none; margin: 0 0 14px; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 14px; }
.legend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 13px; font-weight: 700; }
.legend-item { display: inline-flex; align-items: center; gap: 6px; color: var(--role, var(--muted)); }
.legend-item i { width: 10px; height: 10px; border-radius: 3px; background: var(--role); }
.topic-legend { border-top: 0; padding-top: 0; }
.foot-bottom { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; flex-wrap: wrap; padding: 22px max(var(--gutter), calc((100% - var(--page)) / 2)); }
.foot-bottom p { margin: 0; max-width: 46ch; }
.foot-bottom nav { display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: 14px; font-weight: 700; }
.foot-bottom nav a { color: var(--muted); }
.foot-bottom nav a:hover { color: var(--text); }

.nav-label { padding: 12px 10px 4px; }
.nav-count { background: var(--warn); color: var(--ink); border-radius: 9px; padding: 0 7px; font-size: 11px; font-weight: 800; }
.drag-hint { display: flex; align-items: center; gap: 6px; margin-bottom: 14px; --ia: var(--faint); }
.drag-hint .i { width: 15px; height: 15px; }
.drag-handle { flex: none; width: 28px; height: 36px; display: grid; place-items: center; background: none; border: 0; border-radius: 6px; color: var(--faint); cursor: grab; touch-action: none; --ia: var(--faint); }
.drag-handle:hover { background: var(--surface-3); --ia: var(--text); }
.drag-handle:focus-visible { outline: 2px solid var(--accent-light); outline-offset: 1px; }
body.dragging { cursor: grabbing; user-select: none; }
body.dragging * { cursor: grabbing !important; }
.is-dragging { box-shadow: 0 18px 44px rgba(0, 0, 0, .65); background: var(--surface-2); border-radius: 12px; opacity: .96; pointer-events: none; }
.drag-placeholder { border: 2px dashed var(--accent); border-radius: 10px; background: var(--accent-soft); margin: 2px 0; }
.structure-cat { margin-bottom: 16px; }
.structure-row { grid-template-columns: 28px 44px minmax(0, 1fr) auto auto; }
.structure-head h2 { flex: 1; }
.forum-list { min-height: 12px; }
.drag-forum { border-bottom: 1px solid var(--line); }
.drag-forum:last-child { border-bottom: 0; }
.drag-forum > .row { border-bottom: 0; }
.sub-list { margin-left: 56px; }
.sub-list:empty { display: none; }
.sub-list .drag-forum { border-bottom: 0; }
.sub-list .row { padding-block: 9px; }
.sub-list .forum-icon { width: 34px; height: 34px; }
.sub-list .sub-list { display: none !important; }
body.dragging .sub-list:empty { display: block; min-height: 26px; margin-block: 0 8px; border: 1px dashed var(--line-2); border-radius: 8px; }
body.dragging .sub-list.drop-active:empty, body.dragging .sub-list.drop-active { border-color: var(--accent); }
.role-row { grid-template-columns: 28px 14px minmax(0, 1fr) auto auto auto; }
.role-dot { width: 14px; height: 14px; border-radius: 4px; }
.role-flags { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.plan-row { grid-template-columns: 28px minmax(0, 1fr) auto auto; }
.store-row { grid-template-columns: 28px 120px minmax(0, 1fr) auto auto; }
.store-thumb { width: 120px; height: 72px; border-radius: 8px; overflow: hidden; }
.store-thumb .item-preview { height: 72px; border: 0; transform-origin: center; }
.store-thumb .av-lg, .store-thumb .av-frame-lg .av { width: 44px; height: 44px; font-size: 16px; }
.store-thumb .preview-name { font-size: 13px; }
.perm-title { margin: 14px 0 8px; }
.perm-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 2px 16px; margin-bottom: 16px; }
.perm { align-items: flex-start; margin-bottom: 10px; }
.perm small { display: block; font-size: 12px; font-weight: 500; }
dialog.dialog-wide { width: min(680px, calc(100vw - 32px)); }
.seo-details { margin-bottom: 14px; }
.seo-details summary { cursor: pointer; font-weight: 700; font-size: 13px; margin-bottom: 10px; }
[hidden] { display: none !important; }
input[type=url] { appearance: none; }

/* The top bar stays on one line: fitNav() in forum.js moves what does not fit into More. */
@media (min-width: 901px) {
  .forum-topbar { flex-wrap: nowrap; }
  .forum-topbar > * { flex: none; }
  .forum-topbar > .spacer { flex: 1 1 0; }
  .forum-topbar > .top-search { flex: 0 1 210px; width: auto; min-width: 150px; }
}
.main-nav { flex-wrap: nowrap; }
.nav-more-btn { display: inline-flex; align-items: center; gap: 7px; padding: 7px 11px; background: transparent; border: 0; border-radius: 8px; color: var(--ink); font: 800 14px var(--font); cursor: pointer; white-space: nowrap; --ia: var(--ink); }
.nav-more-btn:hover, .nav-more-btn[aria-expanded="true"] { background: rgba(7, 10, 16, .14); }
.nav-more.has-current .nav-more-btn { background: var(--ink); color: #fff; --ia: var(--accent-light); }
.nav-more-btn > .i:last-child { width: 14px; height: 14px; }
.nav-more-panel { left: 0; right: auto; width: 210px; }
.nav-more-panel a[aria-current] { background: var(--surface-3); }
.nav-more-btn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
@media (max-width: 900px) {
  .nav-more { display: none; }
}
@media (max-width: 760px) {
  .subforums { padding-left: 18px; }
  .subforums-2, .subforums-3 { grid-template-columns: 1fr; }
  .structure-row, .role-row, .plan-row, .store-row { grid-template-columns: 28px minmax(0, 1fr); }
  .structure-row > :not(.drag-handle):not(.row-main), .role-row > :not(.drag-handle):not(.row-main), .plan-row > :not(.drag-handle):not(.row-main), .store-row > :not(.drag-handle):not(.row-main) { grid-column: 2; justify-content: flex-start; }
  .structure-row .forum-icon { display: none; }
  .sub-list { margin-left: 16px; }
}

/* ---- v3 ---- */
.subforums { list-style: none; margin: 0; display: grid; gap: 4px 18px; padding: 0 18px 14px 78px; }
.subforums li a { display: inline-flex; align-items: center; gap: 8px; max-width: 100%; color: var(--muted); font-size: 13.500px; font-weight: 600; }
.subforums li a:hover { color: var(--text); text-decoration: none; }
.subforums .i { width: 15px; height: 15px; color: var(--faint); flex: none; }
.subforums li a:hover .i { color: var(--accent-light); }
.subforums span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-card > .subforums { padding: 14px 18px; }
a.legend-item:hover { text-decoration: none; filter: brightness(1.25); }
a.legend-item { color: var(--role); }
.online-dot { margin-right: 4px; vertical-align: 2px; }
.role-filter { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.role-filter a { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border: 1px solid var(--line-2); border-radius: 8px; color: var(--role, var(--muted)); font-weight: 700; font-size: 13px; }
.role-filter a i { width: 9px; height: 9px; border-radius: 3px; background: var(--role); }
.role-filter a:hover { background: var(--surface-2); text-decoration: none; }
.role-filter a[aria-current] { background: var(--surface-3); border-color: var(--role, var(--text)); }
.vote-group { display: inline-flex; }
.vote-group .btn { border-radius: 0; }
.vote-group .btn:first-child { border-radius: 8px 0 0 8px; }
.vote-group .btn:last-child { border-radius: 0 8px 8px 0; margin-left: -1px; }
.vote-btn:disabled { opacity: .7; cursor: default; }
.vote-up { --ia: var(--good); } .vote-down { --ia: var(--bad); }
.vote-up.is-on { background: var(--good); border-color: var(--good); color: var(--ink); --ia: var(--ink); }
.vote-down.is-on { background: var(--bad); border-color: var(--bad); color: var(--ink); --ia: var(--ink); }
.vote-btn.pop .i { animation: bump .4s var(--spring); }
.inline-editor textarea { min-height: 120px; margin-bottom: 8px; }

/* Crumbs on plain pages */
.crumbs-page { padding-top: 22px; margin-bottom: 14px; color: var(--muted); }
.crumbs-page a { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); }
.crumbs-page a:hover { color: var(--text); }
.crumbs-page .i { width: 15px; height: 15px; }
.crumbs-page [aria-current] { color: var(--text); }

/* Profile */
.profile-hero { position: relative; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; margin-bottom: 18px; background: var(--surface); }
.profile-avatar { margin-top: -46px; }
.profile-avatar form { margin: 0; }
.avatar-edit { position: absolute; right: -6px; bottom: -6px; width: 36px; height: 36px; margin: 0; display: grid; place-items: center; border-radius: 50%; background: var(--accent); color: #fff; --ia: #fff; cursor: pointer; z-index: 4; border: 3px solid var(--surface); transition: transform .15s var(--ease); }
.avatar-edit:hover { transform: scale(1.1); }
.avatar-edit .i { width: 16px; height: 16px; }
.avatar-edit input, .cover-btn input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.cover-tools { position: absolute; top: 12px; right: 12px; display: flex; gap: 6px; z-index: 4; }
.cover-tools form { margin: 0; }
.cover-btn { display: inline-flex; align-items: center; gap: 7px; margin: 0; padding: 7px 12px; border: 0; border-radius: 8px; background: rgba(7, 10, 16, .72); color: #fff; font: 700 13px var(--font); cursor: pointer; backdrop-filter: blur(6px); --ia: #fff; }
.cover-btn:hover { background: rgba(7, 10, 16, .92); text-decoration: none; color: #fff; }
.cover-btn .i { width: 15px; height: 15px; }
.is-uploading { opacity: .55; }
.profile-seen .i { width: 14px; height: 14px; vertical-align: -2px; }
.profile-actions { display: flex; gap: 8px; flex-wrap: wrap; padding-top: 14px; }
.profile-layout { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 18px; align-items: start; }
.profile-side { display: flex; flex-direction: column; gap: 14px; }
.profile-side .card { margin: 0; padding: 18px; }
.side-title { display: flex; align-items: center; gap: 8px; --ia: var(--accent-light); }
.side-title .i { color: var(--accent-light); }
.rank-bar { height: 8px; border-radius: 4px; background: var(--surface-3); overflow: hidden; margin-bottom: 8px; }
.rank-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-light)); border-radius: 4px; transition: width .4s var(--ease); }
.fact-list { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 9px; font-size: 13.500px; }
.fact-list li { display: flex; align-items: center; gap: 9px; min-width: 0; overflow-wrap: anywhere; --ia: var(--accent-light); }
.fact-list .i { width: 16px; height: 16px; color: var(--faint); flex: none; }
.ignore-list li { justify-content: space-between; }
.ignore-list form { margin: 0 0 0 auto; }
.rarity-link { font-weight: 700; }
.avatar-stack { display: flex; flex-wrap: wrap; gap: 6px; }
.tabs-icons a { display: inline-flex; align-items: center; gap: 7px; --ia: currentColor; }
.tabs-icons a .i { width: 16px; height: 16px; }
.tabs { flex-wrap: wrap; }
.tab-count { background: var(--surface-3); color: var(--text); border-radius: 6px; padding: 0 7px; font-size: 12px; }
[aria-selected="true"] > .tab-count { background: rgba(0, 0, 0, .25); color: #fff; }
.feed-card { padding: 18px 20px 8px; margin-bottom: 14px; }
.feed-item { display: flex; gap: 13px; padding: 13px 0; border-top: 1px solid var(--line); }
.feed-icon { flex: none; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px; background: var(--accent-soft); color: var(--accent-light); --ia: var(--accent-light); }
.feed-icon .i { width: 19px; height: 19px; }
.feed-body { min-width: 0; flex: 1; }
.feed-title { font: 800 15.500px var(--display); letter-spacing: -.02em; color: var(--text); overflow-wrap: anywhere; }
.feed-title:hover { color: var(--accent-light); }
.feed-excerpt { margin: 3px 0 5px; color: var(--muted); font-size: 13.500px; overflow-wrap: anywhere; }
.feed-meta { display: flex; flex-wrap: wrap; gap: 3px 14px; margin: 3px 0 0; font-size: 12.500px; color: var(--faint); font-weight: 600; }
.feed-meta > span { display: inline-flex; align-items: center; gap: 5px; --ia: var(--faint); }
.feed-meta .i { width: 14px; height: 14px; }
.feed-empty { text-align: center; padding: 34px 16px; color: var(--faint); --ia: var(--faint); }
.feed-empty > .i { width: 34px; height: 34px; margin-bottom: 8px; }
.feed-empty h2 { margin-bottom: 4px; font-size: 20px; color: var(--text); }
mark { background: var(--accent-soft); color: var(--accent-light); border-radius: 3px; padding: 0 2px; font-weight: 800; }

/* Search */
.search-hero { background: var(--accent); color: var(--ink); padding: 26px max(var(--gutter), calc((100% - var(--page)) / 2)) 26px; margin-bottom: 22px; width: 100% !important; }
.search-hero h1 { font-size: clamp(30px, 4.4vw, 56px); margin-bottom: 14px; color: var(--ink); }
.search-form { margin: 0; }
.search-main { display: flex; gap: 8px; }
.search-main input { flex: 1; min-width: 0; padding-block: 14px; font-size: 16px; background-color: var(--ink); border-color: var(--ink); color: #fff; }
.search-main input:focus { border-color: #fff; box-shadow: inset 0 0 0 1px #fff; }
.search-hero .btn { background: var(--ink); border-color: var(--ink); color: #fff; --ia: var(--accent-light); }
.search-filters { margin-top: 10px; }
.search-filters summary { display: inline-flex; align-items: center; gap: 7px; cursor: pointer; font-weight: 800; font-size: 13.500px; --ia: var(--ink); }
.search-filters summary .i { width: 16px; height: 16px; }
.search-filter-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px 12px; margin-top: 10px; }
.search-filter-grid label { color: var(--ink); }
.search-filter-grid .field { margin: 0; }
.search-filter-grid input, .search-filter-grid .cs-btn { background: var(--ink); border-color: var(--ink); color: #fff; }
.result-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.result { display: flex; gap: 14px; margin: 0; padding: 16px 18px; transition: border-color .12s; }
.result:hover { border-color: var(--line-2); }
.result-body { min-width: 0; flex: 1; }
.result-path { margin: 0 0 2px; font: 600 11.500px ui-monospace, Consolas, monospace; color: var(--faint); }
.result-path span { color: var(--line-2); }
.result h2 { font-size: 17px; margin: 0 0 3px; overflow-wrap: anywhere; }
.result h2 a { color: var(--text); }
.result h2 a:hover { color: var(--accent-light); }
.search-panel { left: 0; right: auto; width: min(420px, calc(100vw - 32px)); max-height: 70vh; overflow-y: auto; }
.top-search { position: relative; }
.search-group { padding: 8px 14px 3px; font: 600 11px ui-monospace, Consolas, monospace; color: var(--faint); }
.menu-panel .search-hit { display: block; padding: 7px 14px; font-weight: 700; font-size: 13.500px; }
.search-hit small { display: block; font-weight: 500; color: var(--muted); font-size: 12px; }
.search-hit:hover small { color: #fff; }
.user-suggest { position: relative; }
.suggest-menu { position: absolute; left: 0; right: 0; top: 100%; z-index: 30; margin-top: 4px; background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 10px; overflow: hidden; box-shadow: 0 12px 28px rgba(0, 0, 0, .5); }
.suggest-menu button { display: block; width: 100%; padding: 8px 12px; background: none; border: 0; color: var(--text); text-align: left; font: 700 13.500px var(--font); cursor: pointer; }
.suggest-menu button:hover { background: var(--accent); color: #fff; }

/* Messenger */
.messenger { display: grid; grid-template-columns: 210px 340px minmax(0, 1fr); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--surface); min-height: 620px; margin-bottom: 18px; }
.mx-folders { padding: 14px 10px; border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.mx-folders h2 { margin: 0 6px; font-size: 12px; letter-spacing: 0; }
.mx-folders nav a { display: flex; align-items: center; gap: 9px; padding: 8px 9px; border-radius: 8px; color: var(--muted); font-weight: 700; font-size: 13.500px; --ia: currentColor; }
.mx-folders nav a span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mx-folders nav a b { background: var(--accent); color: #fff; border-radius: 9px; padding: 0 7px; font-size: 11px; }
.mx-folders nav a:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.mx-folders nav a[aria-current] { background: var(--surface-3); color: var(--text); }
.mx-folders .i { width: 16px; height: 16px; flex: none; }
.mx-folder-tools { display: grid; gap: 5px; }
.mx-folder-tools form { margin: 0; }
.mx-quota { margin-top: auto; padding: 10px 6px 0; border-top: 1px solid var(--line); }
.mx-quota p { margin: 0 0 4px; }
.mx-list { border-right: 1px solid var(--line); min-width: 0; display: flex; flex-direction: column; }
.mx-list > form { margin: 0; }
.mx-search { padding: 10px; }
.mx-filters { display: flex; gap: 2px; padding: 0 10px 8px; flex-wrap: wrap; border-bottom: 1px solid var(--line); }
.mx-filters a { padding: 3px 9px; border-radius: 6px; color: var(--muted); font-size: 12.500px; font-weight: 700; }
.mx-filters a:hover { background: var(--surface-2); text-decoration: none; }
.mx-filters a[aria-current] { background: var(--accent); color: #fff; }
.mx-bulk { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; padding: 8px 10px; background: var(--surface-2); border-bottom: 1px solid var(--line); }
.mx-bulk .cs { width: 120px; }
.mx-bulk .cs-btn { padding-block: 4px; min-height: 29px; font-size: 12.500px; }
.mx-item { display: flex; align-items: center; gap: 2px; padding-left: 8px; border-bottom: 1px solid var(--line); }
.mx-item:hover { background: var(--surface-2); }
.mx-item.is-open { background: var(--surface-3); }
.mx-check { transform: scale(.65); flex: none; }
.mx-link { flex: 1; min-width: 0; display: flex; gap: 9px; align-items: flex-start; padding: 10px 10px 10px 2px; color: var(--text); }
.mx-link:hover { text-decoration: none; }
.mx-text { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.35; }
.mx-text strong { font-size: 13.500px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mx-item.is-unread .mx-text strong { font-weight: 800; color: var(--accent-light); }
.mx-people, .mx-snippet { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mx-snippet { color: var(--faint); }
.mx-time { flex: none; font-size: 11px; }
.mx-open { min-width: 0; display: flex; flex-direction: column; }
.mx-empty { margin: auto; }
.mx-open-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.mx-open-title { flex: 1; min-width: 180px; }
.mx-open-title h2 { margin: 0; font-size: 19px; overflow-wrap: anywhere; }
.mx-open-title p { margin: 0; }
.mx-back { display: none; transform: scaleX(-1); }
.mx-people-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 8px 16px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.mx-person { display: inline-flex; align-items: center; gap: 6px; padding: 2px 8px 2px 3px; border-radius: 8px; background: var(--surface); font-size: 12.500px; }
.mx-person a:hover { text-decoration: none; }
.mx-person small { font-size: 11px; }
.mx-person form { margin: 0; display: flex; }
.mx-x { display: grid; place-items: center; width: 18px; height: 18px; padding: 0; background: none; border: 0; color: var(--faint); cursor: pointer; --ia: currentColor; }
.mx-x:hover { color: var(--bad); }
.mx-x .i { width: 12px; height: 12px; }
.mx-stream { flex: 1; overflow-y: auto; max-height: 560px; padding: 18px 16px 18px 28px; display: flex; flex-direction: column; gap: 14px; }
.pm { display: flex; gap: 11px; max-width: 100%; }
.pm.is-new { animation: post-in .4s var(--ease); }
.pm-body { min-width: 0; flex: 1; background: var(--surface-2); border: 1px solid var(--line); border-radius: 4px 12px 12px 12px; padding: 9px 13px; }
.pm-own .pm-body { background: var(--accent-soft); border-color: transparent; }
.pm-head { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; margin-bottom: 3px; font-size: 13.500px; }
.pm-quote { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; opacity: 0; transition: opacity .12s; --ia: currentColor; }
.pm:hover .pm-quote, .pm-quote:focus-visible { opacity: 1; }
.pm-quote .i { width: 13px; height: 13px; }
.mx-reply { padding: 12px 16px; border-top: 1px solid var(--line); margin: 0; }

/* Themes */
.theme-picker { display: flex; align-items: center; gap: 8px; }
.theme-picker label { display: inline-flex; align-items: center; gap: 6px; margin: 0; color: var(--muted); --ia: var(--muted); }
.theme-picker .i { width: 15px; height: 15px; }
.theme-picker .cs { width: 150px; }
.theme-picker .cs-btn { padding-block: 5px; min-height: 32px; font-size: 13px; }
.theme-row { grid-template-columns: 28px 72px minmax(0, 1fr) auto; }
.theme-swatch { display: flex; gap: 4px; align-items: center; justify-content: center; height: 40px; border: 1px solid; border-radius: 8px; }
.theme-swatch i { width: 14px; height: 14px; border-radius: 50%; }
.token-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 8px; }
.token { display: flex; align-items: center; gap: 10px; padding: 7px 9px; border: 1px solid var(--line); border-radius: 10px; }
.token input[type=color] { width: 40px; height: 34px; flex: none; }
.token-text { flex: 1; min-width: 0; display: flex; flex-direction: column; font-size: 13px; }
.token-text code { background: none; padding: 0; color: var(--faint); font-size: 11px; }
.token-off { margin: 0; flex: none; }
.token-off input { transform: scale(.65); }
.code-editor { font: 500 13px/1.6 ui-monospace, Consolas, monospace; tab-size: 2; min-height: 280px; white-space: pre; overflow-x: auto; }

@media (max-width: 1080px) {
  .profile-layout { grid-template-columns: 1fr; }
  .messenger { grid-template-columns: 180px minmax(0, 1fr); }
  .messenger .mx-open { display: none; }
  .messenger.has-open { grid-template-columns: 1fr; }
  .messenger.has-open .mx-folders, .messenger.has-open .mx-list { display: none; }
  .messenger.has-open .mx-open { display: flex; }
  .mx-back { display: inline-flex; }
}
@media (max-width: 760px) {
  .messenger { grid-template-columns: 1fr; }
  .mx-folders { border-right: 0; border-bottom: 1px solid var(--line); }
  .mx-quota { display: none; }
  .subforums { padding-left: 18px; }
  .subforums-2, .subforums-3 { grid-template-columns: 1fr; }
  .search-main { flex-direction: column; }
  .cover-tools .cover-btn span { display: none; }
}
.notify-row { grid-template-columns: 44px minmax(0, 1fr) auto; }
.notify-row .row-main { color: var(--text); }
.notify-row .row-main:hover { text-decoration: none; }
@media (max-width: 480px) {
  .forum-topbar { gap: 6px; }
  .forum-topbar .logo-word { font-size: 18px; }
  .user-button > .i { display: none; }
}
.profile-hero > .fx-overlay { z-index: 3; border-radius: 0; }
.wearing { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 8px; margin-bottom: 18px; }
.wearing-slot { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); min-width: 0; --ia: var(--accent-light); }
.wearing-slot.is-on { border-color: var(--good); }
.wearing-slot .i { flex: none; color: var(--faint); }
.wearing-slot span { display: flex; flex-direction: column; min-width: 0; font-size: 13px; line-height: 1.3; }
.wearing-slot small { color: var(--faint); font-weight: 600; }
.wearing-slot strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.store-card-body .actions { margin-top: 4px; }
.store-card-body form { margin: 0; }
.equip-box { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; }
.equip-box form { margin: 0; }
/* The author's cover, faded, behind their details in the post stream */
.post-author { position: relative; overflow: hidden; isolation: isolate; }
.post-author > .profile-banner { position: absolute; inset: 0 0 auto; height: 62%; z-index: -1; opacity: .5; background: none; -webkit-mask-image: linear-gradient(to bottom, #000 35%, transparent); mask-image: linear-gradient(to bottom, #000 35%, transparent); }
.post-author > .fx-overlay { z-index: 2; opacity: .7; border-radius: 0; }
.post-author.has-cover .post-facts dt { color: var(--muted); }
@media (max-width: 640px) {
  .post-author > .profile-banner { height: 100%; }
}

/* ---- Plugins, chat, leaderboard ---- */
.board-layout.no-side { grid-template-columns: minmax(0, 1fr); }
.zone:empty { display: none; }
.zone > * { margin-bottom: 18px; }
.zone-page-bottom, .top-alerts { width: min(var(--page), calc(100% - 2 * var(--gutter))); margin-inline: auto; }
.top-alerts { display: grid; gap: 12px; margin-block: 18px; }
/* On pages whose header sits inside a wrapper that is already page-wide (profile, store), do not shrink twice. */
.content > * .top-alerts { width: auto; margin-inline: 0; }
.board-side { position: static; }
.board-side > .widget { margin: 0; }
.board-side > .card.widget { padding: 22px; }
.board-side > .card.widget .side-title { margin-bottom: 16px; }
.foot-online .widget + .widget { margin-top: 12px; }
.mini-tabs { display: flex; gap: 2px; margin-bottom: 16px; border-bottom: 1px solid var(--line); }
.mini-tabs button { flex: 1; padding: 6px 4px; background: none; border: 0; border-bottom: 2px solid transparent; color: var(--muted); font: 700 12.500px var(--font); cursor: pointer; }
.mini-tabs button:hover { color: var(--text); }
.mini-tabs button[aria-selected="true"] { color: var(--text); border-bottom-color: var(--accent); }
.mini-list { list-style: none; margin: 0 0 8px; padding: 0; display: grid; gap: 14px; }
.mini-list li + li { padding-top: 14px; border-top: 1px solid var(--line); }
.mini-list li { display: flex; align-items: flex-start; gap: 12px; min-width: 0; }
.mini-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; line-height: 1.35; font-size: 13.500px; }
.mini-text > a:first-child { font-weight: 700; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini-text > a:first-child:hover { color: var(--accent-light); }
.mini-text small { font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini-score { display: inline-flex; align-items: center; gap: 4px; flex: none; color: var(--muted); font-size: 12.500px; font-weight: 700; --ia: var(--accent-light); }
.mini-score .i { width: 13px; height: 13px; }
.rank-pos { flex: none; width: 21px; height: 21px; display: grid; place-items: center; border-radius: 6px; background: var(--surface-3); font: 800 11.500px var(--display); }
.rank-trophy { flex: none; display: grid; place-items: center; width: 24px; height: 24px; color: var(--trophy); --ia: var(--trophy); filter: drop-shadow(0 0 5px color-mix(in srgb, var(--trophy) 45%, transparent)); }
.rank-trophy .i { width: 22px; height: 22px; }
.rank-trophy .ia { fill: color-mix(in srgb, var(--trophy) 55%, transparent); }
.rank-t1 { --trophy: #ffc531; } .rank-t2 { --trophy: #cfd8e3; } .rank-t3 { --trophy: #d9935b; }

/* Plugin manager */
.plugin-features { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 8px; }
.plugin-zones { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 12px; }
.plugin-zone { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px; min-width: 0; }
.plugin-zone h3 { margin: 0 0 8px; font-size: 14px; }
.plugin-list { flex: 1; display: flex; flex-direction: column; gap: 6px; min-height: 58px; border-radius: 8px; }
.plugin-list.drop-active { outline: 2px dashed var(--accent); outline-offset: 2px; }
.plugin-card { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); min-width: 0; }
.plugin-card.is-off { opacity: .55; }
.plugin-card form { margin: 0; flex: none; }
.plugin-card .feed-icon { width: 34px; height: 34px; }
.plugin-text { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; font-size: 13.500px; }
.plugin-text small { font-size: 12px; }
.chat-row { grid-template-columns: 28px minmax(0, 1fr) auto; }
.role-chips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px !important; }
.access-table td, .access-table th { padding: 7px 10px; }
.bundle-picks { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 2px 12px; }
.bundle-picks .check { margin-bottom: 6px; font-size: 13px; }
.bundle-picks small { display: block; font-weight: 500; }

/* Chat */
.chat { padding: 0; overflow: hidden; display: flex; flex-direction: column; margin-bottom: 18px; }
.chat-head { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 12px; padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.chat-head h2 { display: flex; align-items: center; gap: 7px; font-size: 16px; margin: 0; --ia: var(--accent-light); }
.chat-tabs { display: flex; flex-wrap: wrap; gap: 3px; flex: 1; min-width: 0; }
.chat-tabs button { position: relative; padding: 4px 11px; background: none; border: 0; border-radius: 7px; color: var(--muted); font: 700 13px var(--font); cursor: pointer; }
.chat-tabs button:hover { background: var(--surface-3); color: var(--text); }
.chat-tabs button[aria-selected="true"] { background: var(--accent); color: #fff; }
.chat-tabs i { position: absolute; top: 3px; right: 3px; width: 7px; height: 7px; border-radius: 50%; background: var(--warn); }
.chat-clear { display: grid; place-items: center; width: 28px; height: 28px; padding: 0; background: none; border: 0; border-radius: 6px; color: var(--faint); cursor: pointer; --ia: currentColor; }
.chat-clear:hover { color: var(--bad); background: var(--surface-3); }
.chat-clear .i { width: 15px; height: 15px; }
.chat-log { min-height: 170px; max-height: 300px; overflow-y: auto; padding: 8px 14px; display: flex; flex-direction: column; gap: 1px; }
.chat-tall .chat-log { min-height: 240px; max-height: min(58vh, 620px); }
.chat-older { align-self: center; margin-bottom: 6px; }
.chat-empty { margin: auto; }
.chat-msg { display: flex; align-items: flex-start; gap: 8px; padding: 4px 6px; border-radius: 7px; min-width: 0; }
.chat-msg:hover { background: var(--surface-2); }
.chat-body { flex: 1; min-width: 0; font-size: 13.500px; line-height: 1.45; overflow-wrap: anywhere; }
.chat-author { margin-right: 5px; }
.chat-author .item-badge { width: 15px; height: 15px; margin-left: 2px; }
.chat-time { margin-right: 6px; font-size: 11px; color: var(--faint); font-variant-numeric: tabular-nums; }
.chat-mention { color: var(--accent-light); font-weight: 800; background: var(--accent-soft); border-radius: 4px; padding: 0 3px; }
.chat-tools { display: flex; gap: 2px; opacity: 0; flex: none; }
.chat-msg:hover .chat-tools, .chat-tools button:focus-visible { opacity: 1; }
.chat-tools button { display: grid; place-items: center; width: 22px; height: 22px; padding: 0; background: none; border: 0; border-radius: 5px; color: var(--faint); cursor: pointer; --ia: currentColor; }
.chat-tools button:hover { color: var(--bad); background: var(--surface-3); }
.chat-tools .i { width: 13px; height: 13px; }
.chat-form { display: flex; gap: 6px; align-items: center; padding: 8px 10px; border-top: 1px solid var(--line); margin: 0; }
.chat-form input[type=text] { flex: 1; min-width: 0; padding-block: 8px; }
.chat-form .btn { padding: 8px 12px; }
.chat-readonly { padding: 10px 14px; margin: 0; border-top: 1px solid var(--line); }
.chat-emoji-wrap { position: relative; flex: none; }
.chat-emoji-btn { width: 34px; height: 34px; background: none; border: 0; border-radius: 8px; font-size: 18px; cursor: pointer; }
.chat-emoji-btn:hover { background: var(--surface-3); }
.chat-emojis { position: absolute; left: 0; bottom: 40px; z-index: 20; display: grid; grid-template-columns: repeat(6, 32px); gap: 2px; padding: 6px; background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 10px; box-shadow: 0 12px 28px rgba(0, 0, 0, .5); }
.chat-emojis button { width: 32px; height: 32px; background: none; border: 0; border-radius: 6px; font-size: 17px; cursor: pointer; }
.chat-emojis button:hover { background: var(--surface-3); }
.board-side .chat-log { max-height: 240px; }
.board-side .chat-head h2 { display: none; }

/* Leaderboard */
.my-rank { display: flex; flex-direction: column; align-items: flex-end; color: var(--ink) !important; text-decoration: none !important; }
.my-rank small { font-weight: 700; }
.my-rank strong { font: 800 38px/1 var(--display); letter-spacing: -.04em; }
.podium { display: flex; justify-content: center; align-items: flex-end; gap: 10px; margin: 18px auto 22px; flex-wrap: nowrap; }
.podium-step { flex: 0 1 200px; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
.podium-step strong { font: 800 15px var(--display); overflow-wrap: anywhere; }
.podium-block { width: 100%; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 2px; padding-top: 10px; margin-top: 4px; border-radius: 10px 10px 0 0; background: var(--surface-2); border: 1px solid var(--line); border-bottom: 0; --ia: #ffb020; }
.podium-block .rank-trophy { width: 44px; height: 44px; }
.podium-block .rank-trophy .i { width: 40px; height: 40px; stroke-width: 1.4; }
.step-1 .podium-block .rank-trophy { width: 60px; height: 60px; }
.step-1 .podium-block .rank-trophy .i { width: 56px; height: 56px; }
.podium-step .av-frame { align-self: center; justify-self: center; }
.step-1 .podium-block { height: 118px; background: linear-gradient(180deg, rgba(255, 176, 32, .24), var(--surface-2)); border-color: rgba(255, 176, 32, .5); }
.step-2 .podium-block { height: 84px; }
.step-3 .podium-block { height: 62px; }
.lb-stats { grid-template-columns: repeat(auto-fit, minmax(min(150px, 42%), 1fr)); margin-bottom: 10px; }
.rank-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr)); gap: 14px; margin-bottom: 18px; }
.rank-card { margin: 0; padding: 16px 18px; }
.rank-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.rank-list li { display: flex; align-items: center; gap: 9px; min-width: 0; }
.rank-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13.500px; }
.rank-score { font: 800 14px var(--display); font-variant-numeric: tabular-nums; }
.forum-bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.forum-bars li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 3px 8px; font-size: 13.500px; font-weight: 700; }
.forum-bars a { color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.forum-bars .rank-bar { grid-column: 1 / -1; height: 6px; margin: 0; }

/* Bundles */
.bundle-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(340px, 100%), 1fr)); gap: 14px; margin-bottom: 18px; }
.bundle-look { position: relative; margin: 0; border: 0; border-radius: 0; border-bottom: 1px solid var(--line); isolation: isolate; }
.bundle-look .profile-banner { height: 110px; }
.bundle-look .mock-body { padding-block: 12px; min-height: 84px; }
.bundle-look .fx-overlay { z-index: 3; border-radius: 0; }
.bundle-stage { padding: 0; }
.bundle-stage .profile-banner { height: clamp(170px, 22vw, 260px); }
.bundle-save { margin: -6px 0 10px; }
.store-card-foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
@media (max-width: 640px) {
  .podium { gap: 4px; }
  .podium-step .av-lg, .podium-step .av { width: 54px; height: 54px; font-size: 18px; }
}

@media (max-width: 480px) {
  .forum-topbar .btn-icon { width: 34px; height: 34px; }
  .forum-topbar .logo-word { font-size: 16px; }
  .forum-topbar .user-chip-text, .forum-topbar .user-button > .i { display: none; }
}

/* ---- Search dialog ---- */
.search-dialog { width: min(640px, calc(100vw - 32px)); max-width: none; margin: 12vh auto auto; padding: 0; overflow: hidden; }
.search-dialog-form { display: flex; align-items: center; gap: 10px; padding: 10px 14px; margin: 0; }
.search-dialog-form > .i { color: var(--muted); }
.search-dialog-form input { flex: 1; min-width: 0; border: 0; background: none; padding: 8px 2px; font-size: 16px; box-shadow: none; }
.search-dialog-form input:focus, .search-dialog-form input:hover { border: 0; box-shadow: none; outline: 0; }
.search-close { display: grid; place-items: center; width: 30px; height: 30px; padding: 0; background: none; border: 0; border-radius: 7px; color: var(--muted); cursor: pointer; --ia: currentColor; }
.search-close:hover { background: var(--surface-3); color: var(--text); }
.search-results { max-height: 56vh; overflow-y: auto; border-top: 1px solid var(--line-2); padding-bottom: 6px; }
.search-results .search-hit { display: block; padding: 8px 16px; color: var(--text); font-weight: 700; font-size: 13.500px; }
.search-results .search-hit:hover { background: var(--accent); color: #fff; }
.search-results .search-hit small { display: block; font-weight: 500; color: var(--muted); }
.search-results .search-hit:hover small { color: #fff; }
.search-results .menu-foot { display: block; padding: 10px 16px; font-weight: 700; font-size: 13px; }

/* ---- Messenger menu, name suggestions ---- */
.menu-panel .menu-head a.head-icon { display: grid; place-items: center; width: 30px; height: 30px; padding: 0; border-radius: 8px; color: var(--muted); --ia: currentColor; }
.menu-panel .menu-head a.head-icon:hover { background: var(--accent); color: #fff; }
.menu-head a.head-icon .i { width: 16px; height: 16px; }
.suggest-menu { max-height: 280px; overflow-y: auto; padding: 4px; }
.suggest-menu button { display: flex; align-items: center; gap: 9px; border-radius: 7px; }
.suggest-menu button.is-active { background: var(--surface-3); }
.suggest-menu button:hover .uname { color: inherit; }
.suggest-none { margin: 0; padding: 8px 12px; color: var(--muted); font-size: 13px; }
.foot-version { margin: 4px 0 0; font: 600 11.500px ui-monospace, Consolas, monospace; color: var(--faint); }

/* ---- Member card ---- */
.user-card { position: absolute; z-index: 90; width: min(350px, calc(100vw - 24px)); padding: 0; margin: 0; overflow: hidden; box-shadow: 0 18px 44px rgba(0, 0, 0, .55); animation: pop .14s var(--ease); }
.user-card-cover { position: absolute; inset: 0 0 auto; height: 150px; overflow: hidden; -webkit-mask-image: linear-gradient(180deg, #000 45%, transparent); mask-image: linear-gradient(180deg, #000 45%, transparent); opacity: .75; }
.user-card-cover .profile-banner { position: absolute; inset: 0; height: 100%; }
.user-card-id { position: relative; display: flex; align-items: center; gap: 14px; padding: 18px 18px 6px; min-height: 104px; }
.user-card-id .av-frame { align-self: center; }
.user-card-id > div { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.user-card-name { font: 800 18px var(--display); overflow-wrap: anywhere; }
.user-card-facts { position: relative; list-style: none; margin: 0; padding: 8px 18px 12px; display: grid; gap: 6px; font-size: 13px; color: var(--muted); --ia: currentColor; }
.user-card-facts li { display: flex; align-items: center; gap: 8px; }
.user-card-facts .i { width: 15px; height: 15px; }
.user-card-facts strong { color: var(--text); }
.user-card-stats { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); margin: 0; border-block: 1px solid var(--line); }
.user-card-stats > div { display: flex; flex-direction: column-reverse; align-items: center; gap: 2px; padding: 10px 4px; }
.user-card-stats > div + div { border-left: 1px solid var(--line); }
.user-card-stats dt { font-size: 11px; font-weight: 700; color: var(--muted); }
.user-card-stats dd { margin: 0; font: 800 16px var(--display); }
.user-card-actions { position: relative; display: flex; gap: 8px; padding: 12px 18px 16px; }
.user-card-actions .btn { flex: 1; justify-content: center; }
@keyframes pop { from { opacity: 0; transform: translateY(4px) scale(.98); } }

/* ---- Avatars and covers that can be framed ---- */
.av-img { display: inline-block; overflow: hidden; padding: 0; line-height: 0; }
.av-img img { display: block; width: 100%; height: 100%; object-fit: cover; }
.cover-tools { flex-wrap: wrap; justify-content: flex-end; max-width: calc(100% - 24px); }
.avatar-edit.avatar-adjust { right: auto; left: -6px; padding: 0; border: 0; cursor: pointer; }
.profile-actions:empty { display: none; }
.is-adjusting .cover-tools, .is-adjusting .avatar-edit { display: none; }
.adjust-target { cursor: grab; touch-action: none; user-select: none; outline: 2px dashed #fff !important; outline-offset: -2px; }
.adjust-target:active { cursor: grabbing; }
.profile-banner.adjust-target { z-index: 2; }
.adjust-bar { position: absolute; top: 12px; right: 12px; z-index: 6; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 10px; background: rgba(7, 10, 16, .88); color: #fff; }
.adjust-bar label { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 12.500px; font-weight: 700; color: #fff; }
.adjust-bar input[type=range] { width: 130px; accent-color: var(--accent); }
.adjust-bar .btn-ghost { color: #fff; }

/* ---- Moderator CP ---- */
.mod-grid { align-items: start; }
.mod-toolbar { display: flex; justify-content: flex-end; margin-bottom: 12px; }
.report-row { display: flex; gap: 12px; padding: 14px 0; min-width: 0; }
.report-row + .report-row { border-top: 1px solid var(--line); }
.report-body { flex: 1; min-width: 0; }
.report-body h3 { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.report-snapshot { margin: 8px 0; padding: 10px 14px; background: var(--surface-2); border-radius: 8px; font-size: 13.500px; overflow-wrap: anywhere; white-space: pre-line; }
.report-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.report-actions form { margin: 0; }
.mod-member, .mod-ann { grid-template-columns: auto minmax(0, 1fr) auto; }
.mod-member .row-tools, .mod-ann .row-tools { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.mod-member .row-tools form, .mod-ann .row-tools form { margin: 0; }
.mod-log { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; font-size: 13.500px; }
.mod-log li { display: flex; flex-direction: column; gap: 1px; overflow-wrap: anywhere; }
.mod-log li + li { padding-top: 10px; border-top: 1px solid var(--line); }
.role-filter a[aria-current] { background: var(--surface-3); color: var(--text); }
@media (max-width: 640px) {
  .mod-member, .mod-ann { grid-template-columns: auto minmax(0, 1fr); }
  .mod-member .row-tools, .mod-ann .row-tools { grid-column: 1 / -1; justify-content: flex-start; }
}

/* ---- Announcements ---- */
.announce-list { display: grid; gap: 10px; }
.announce { --tone: var(--accent-light); position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 14px 16px 14px 20px; overflow: hidden; border-radius: 14px; background: linear-gradient(100deg, color-mix(in srgb, var(--tone) 20%, var(--surface)), var(--surface) 62%); box-shadow: 0 10px 26px rgba(0, 0, 0, .24); animation: announce-in .34s var(--ease) both; }
.announce::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: var(--tone); }
@keyframes announce-in { from { opacity: 0; transform: translateY(-6px); } }
.announce-good { --tone: var(--good); } .announce-warn { --tone: var(--warn); } .announce-bad { --tone: var(--bad); } .announce-info { --tone: var(--accent-light); }
.feed-icon.announce-good { color: var(--good); } .feed-icon.announce-warn { color: var(--warn); } .feed-icon.announce-bad { color: var(--bad); }
.announce-icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; color: var(--bg); --ia: var(--bg); background: var(--tone); }
.announce-icon .i { width: 21px; height: 21px; }
.announce-body { min-width: 0; }
.announce-kicker { display: block; margin-bottom: 1px; color: var(--tone); font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.announce-body strong { display: block; font: 800 16px/1.25 var(--display); letter-spacing: -.01em; color: var(--text); overflow-wrap: anywhere; }
.announce-body .prose { margin-top: 3px; color: var(--muted); font-size: 14px; }
.announce-body .prose p:last-child { margin-bottom: 0; }
.announce form { margin: 0; }
.announce-close { display: grid; place-items: center; width: 32px; height: 32px; padding: 0; background: rgba(255, 255, 255, .05); border: 0; border-radius: 9px; color: var(--muted); cursor: pointer; --ia: currentColor; transition: background .12s, color .12s; }
.announce-close:hover { background: var(--tone); color: var(--bg); }
@media (prefers-reduced-motion: reduce) { .announce { animation: none; } }
.ulink:hover .uname { filter: brightness(1.2); }

/* ---- Profile header: everything sits on the cover ---- */
.profile-hero { display: flex; flex-direction: column; justify-content: flex-end; min-height: clamp(220px, 23vw, 290px); }
.profile-hero > .profile-banner { position: absolute; inset: 0; height: auto; }
.profile-hero::after { content: ""; position: absolute; inset: 35% 0 0; z-index: 1; pointer-events: none; background: linear-gradient(180deg, transparent, rgba(4, 6, 10, .86)); }
.profile-over { position: relative; z-index: 4; display: flex; align-items: flex-end; flex-wrap: wrap; gap: 14px 30px; padding: 56px 24px 22px; color: #fff; }
.profile-avatar { position: relative; flex: none; margin: 0 2px; z-index: 2; }
.profile-avatar .av { width: 104px; height: 104px; font-size: 36px; border-radius: 18px; outline: 0; }
.profile-avatar .av-frame { border-radius: 18px; align-self: auto; }
.avatar-online { position: absolute; right: -4px; top: -4px; z-index: 5; width: 16px; height: 16px; border-radius: 50%; background: var(--good); border: 3px solid rgba(4, 6, 10, .9); }
.profile-id { flex: 1; min-width: min(180px, 100%); padding: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 5px; }
.profile-id h1 { font-size: clamp(22px, 2.800vw, 34px); line-height: 1.1; text-shadow: 0 1px 8px rgba(0, 0, 0, .75); }
.profile-id .custom-title { margin: 0; color: #e4e9f2; text-shadow: 0 1px 4px rgba(0, 0, 0, .8); }
.profile-id .role-badges .badge, .profile-id .badge { background: rgba(4, 6, 10, .62); }
.profile-actions { padding: 0; align-items: center; }
.avatar-edit { width: 30px; height: 30px; right: -10px; bottom: -10px; z-index: 5; }
.avatar-edit.avatar-adjust { left: -10px; right: auto; }
.avatar-edit .i { width: 14px; height: 14px; }
.is-adjusting .profile-over { pointer-events: none; }
.is-adjusting .profile-avatar .adjust-target { pointer-events: auto; }
.is-adjusting::after { display: none; }
.profile-facts { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 0 0 18px !important; padding: 11px 16px; font-size: 13px; }
.profile-facts li { display: flex; align-items: center; gap: 6px; min-width: 0; }
.profile-facts .i { width: 15px; height: 15px; color: var(--muted); }
.profile-facts strong { font-family: var(--display); font-weight: 800; }
.profile-facts time { font: inherit; }
.steam-card { padding: 16px !important; }
.steam-box { display: grid; gap: 10px; }
.steam-avatar { display: none; }
.steam-line { display: flex; align-items: center; gap: 10px; color: var(--text); min-width: 0; }
.steam-line > .i { width: 22px; height: 22px; flex: none; }
.steam-line-text { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.steam-line-text strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.steam-line-text small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.steam-on { color: var(--good); }
.steam-playing { color: #a3e36a; }
.steam-level { flex: none; display: grid; place-items: center; min-width: 28px; height: 28px; padding: 0 5px; border: 2px solid var(--accent-light); border-radius: 50%; font: 800 12px var(--display); }
.steam-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(70px, 1fr)); gap: 8px; margin: 0; }
.steam-facts > div { display: flex; flex-direction: column-reverse; min-width: 0; }
.steam-facts dt { font-size: 11px; font-weight: 700; color: var(--muted); }
.steam-facts dd { margin: 0; font: 800 15px var(--display); }
.steam-sub { margin: 4px 0 0; font-size: 12.500px; color: var(--muted); }
.steam-games { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; font-size: 13px; }
.steam-games li { display: flex; align-items: center; gap: 8px; min-width: 0; }
.steam-games img { flex: none; border-radius: 5px; }
.steam-games a { flex: 1; min-width: 0; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.steam-games small { flex: none; }
.steam-bans { display: flex; align-items: center; gap: 6px; margin: 0; color: var(--bad); --ia: var(--bad); }
.steam-group { display: grid; gap: 12px; }
.steam-group-head { display: flex; align-items: center; gap: 12px; min-width: 0; }
.steam-group-head img { flex: none; border-radius: 10px; }
.steam-group-head > div { min-width: 0; }
.steam-group-head .side-title { margin: 0 !important; overflow-wrap: anywhere; }
.steam-group-head p { margin: 2px 0 0; }
.user-card-steam { position: relative; padding: 0 18px 12px; }
.post-steam { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 7px; color: var(--muted); --ia: currentColor; }
.post-steam:hover { color: var(--text); background: var(--surface-3); }
.post-steam .i { width: 17px; height: 17px; }
.steam-login { margin-top: 10px; justify-content: center; }
.menu-panel a .nav-count { margin-left: auto; }
.user-button { position: relative; }

/* ---- Plugins fit the place they are in ---- */
.widget { min-width: 0; }
/* Wide zones: lists run in columns and blocks lie flat. */
.zone-wide > .card.widget { padding: 18px 20px; }
.zone-wide .mini-list { grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr)); gap: 14px 26px; }
.zone-wide .mini-list li + li { padding-top: 0; border-top: 0; }
.zone-wide .widget-stats, .zone-wide .foot-online-block, .zone-wide .legend { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px 20px; }
.zone-wide .widget-stats .side-stats { margin-bottom: 8px; }
.zone-wide .legend { border-top: 1px solid var(--line); }
.zone-wide .side-promo { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 8px 18px; }
.zone-wide .side-promo .side-title, .zone-wide .side-promo p { margin: 0; }
.zone-wide .side-promo .btn { width: auto; margin: 0; }
.zone-wide .steam-group { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) auto; align-items: center; gap: 12px 22px; }
.zone-wide .steam-group .btn { width: auto; }
/* Sidebar: stacked and narrow. */
.zone-sidebar .widget-stats, .zone-sidebar .foot-online-block, .zone-sidebar .legend { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 18px; }
.zone-sidebar .legend { border-top: 1px solid var(--line); }
.zone-sidebar .foot-online-head h2 { font-size: 15px; }
.zone-sidebar .foot-online-head .small { display: none; }
.zone-sidebar .foot-online-list { margin: 0; }
.zone-sidebar .announce { flex-wrap: wrap; }
/* Footer: quiet columns, no boxes, one line per entry. */
.zone-footer { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: 22px 36px; align-items: start; }
.zone-footer > * { margin: 0 !important; }
.zone-footer .card.widget { background: none; border: 0; border-radius: 0; box-shadow: none; padding: 0; }
.zone-footer .widget .side-title { font-size: 13px; margin-bottom: 10px; }
.zone-footer .widget .side-title .i { width: 15px; height: 15px; }
.zone-footer .mini-list { gap: 7px; }
.zone-footer .mini-list li { align-items: center; gap: 8px; }
.zone-footer .mini-list li + li { padding-top: 0; border-top: 0; }
.zone-footer .mini-list .av, .zone-footer .mini-list .av-frame, .zone-footer .mini-text small { display: none; }
.zone-footer .mini-text { font-size: 13px; }
.zone-footer .mini-tabs { margin-bottom: 10px; }
.zone-footer .rank-trophy, .zone-footer .rank-trophy .i { width: 16px; height: 16px; }
.zone-footer .side-stats { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0 0 6px; border: 0; }
.zone-footer .side-stats .card.stat { display: flex; flex-direction: row; background: none; border: 0; padding: 0; margin: 0; }
.zone-footer .side-stats .tile { display: none; }
.zone-footer .side-stats .stat-body { display: flex; flex-direction: row-reverse; align-items: baseline; gap: 5px; }
.zone-footer .side-stats .stat-value { font-size: 15px; }
.zone-footer .side-stats .stat-label { font-size: 12px; margin: 0; }
.zone-footer .side-promo .btn { width: auto; }
.zone-footer .steam-group { gap: 8px; }
.zone-footer .steam-group .btn { width: auto; justify-self: start; }
.zone-footer .foot-online-block, .zone-footer .legend, .zone-footer .chat, .zone-footer .announce-list { grid-column: 1 / -1; }
.zone-footer .chat-log { max-height: 150px; min-height: 110px; }
.zone-footer .legend { padding-top: 0; border-top: 0; }
.zone-footer .foot-online-list { margin-bottom: 0; }
@media (max-width: 760px) {
  .zone-wide .side-promo, .zone-wide .steam-group { grid-template-columns: minmax(0, 1fr); }
  .zone-wide .side-promo .btn, .zone-wide .steam-group .btn { width: 100%; justify-content: center; }
}

.board-side .side-stats, .zone-wide .side-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.board-side .side-stats .card.stat { padding: 12px 10px; }

/* ---- Top bar and mobile menu ---- */
.nav-more.has-current > .nav-more-btn { background: var(--ink); color: #fff; --ia: #fff; }
.main-nav .nav-more { display: block; }
.bottom-nav { display: none; }
.sheet { width: 100%; max-width: 560px; margin: auto auto 0; padding: 16px 16px calc(16px + env(safe-area-inset-bottom)); border-radius: 18px 18px 0 0; border-bottom: 0; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.sheet-me { display: flex; align-items: center; gap: 10px; color: var(--text); min-width: 0; }
.sheet-me span { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.sheet-me small { font-size: 12px; }
.sheet-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; margin-bottom: 14px; }
.sheet-grid a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 74px; padding: 10px 4px; border-radius: 12px; background: var(--surface-2); color: var(--text); font-size: 12.500px; font-weight: 700; text-align: center; }
.sheet-grid a[aria-current] { background: var(--accent); color: #fff; --ia: #fff; }
.sheet form { margin: 0; }
.sheet .actions .btn { flex: 1; justify-content: center; }
@media (max-width: 900px) {
  .forum-topbar { flex-wrap: nowrap; }
  .main-nav, .nav-toggle { display: none !important; }
  .main { padding-bottom: calc(62px + env(safe-area-inset-bottom)); }
  .bottom-nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: grid; grid-template-columns: repeat(5, 1fr); align-items: center; padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); background: var(--surface); border-top: 1px solid var(--line-2); }
  .bottom-nav > a, .bottom-nav > button { display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 0; min-height: 46px; justify-content: center; padding: 2px; background: none; border: 0; border-radius: 10px; color: var(--muted); font: 700 11px var(--font); cursor: pointer; --ia: currentColor; }
  .bottom-nav > a:hover { color: var(--text); }
  .bottom-nav > a[aria-current] { color: var(--accent-light); }
  .bottom-nav span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
  .bottom-nav .bottom-main { justify-self: center; width: 48px; height: 48px; min-height: 0; border-radius: 50%; background: var(--accent); color: #fff; box-shadow: 0 6px 18px color-mix(in srgb, var(--accent) 45%, transparent); }
  .bottom-nav .bottom-main .i { width: 22px; height: 22px; }
  .toasts { bottom: calc(72px + env(safe-area-inset-bottom)); }
}
@media (max-width: 760px) {
  .profile-over { padding: 56px 16px 16px; gap: 12px 22px; }
  .profile-avatar .av { width: 76px; height: 76px; font-size: 26px; border-radius: 14px; }
  .profile-avatar .av-frame { border-radius: 14px; }
  .profile-actions { width: 100%; }
  .profile-facts { gap: 8px 14px; padding: 10px 12px; font-size: 12.500px; }
}
@media (max-width: 420px) {
  :root { --gutter: 14px; }
  .forum-topbar .user-chip-text { display: none; }
  .profile-id { min-width: 0; flex: 1 1 120px; }
  .cover-tools { top: 8px; right: 8px; gap: 4px; }
  .cover-tools .cover-btn { padding: 6px 8px; }
  h1 { overflow-wrap: anywhere; }
  .page-head { padding-inline: var(--gutter); }
}
img, video, canvas, svg { max-width: 100%; }
.av-frame > .frame-asset { max-width: none; }
.table-wrap { overflow-x: auto; }
pre { overflow-x: auto; }

.reset-form { display: grid; gap: 14px; max-width: 720px; }
.reset-form .check { align-items: flex-start; }
.reset-form .alert { margin: 0; }
.reset-form .btn { justify-self: start; }

.theme-code { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 18px; align-items: start; margin-top: 18px; }
.theme-code-files { display: grid; gap: 2px; max-height: 760px; overflow-y: auto; padding: 14px; }
.theme-code-files .perm-title { margin: 12px 8px 4px; }
.theme-code-files .perm-title:first-child { margin-top: 0; }
.theme-code-files a { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 8px; border-radius: 8px; color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.theme-code-files a:hover { background: var(--surface-2); color: var(--text); }
.theme-code-files a[aria-current] { background: var(--accent-soft); color: var(--text); }
.theme-code-main { min-width: 0; }
.theme-code-main form { margin-top: 12px; }
.theme-code-password { max-width: 340px; margin-top: 12px; }
.theme-code-main .actions { margin-top: 12px; }
@media (max-width: 860px) {
  .theme-code { grid-template-columns: minmax(0, 1fr); }
  .theme-code-files { max-height: 260px; }
}

.theme-preview-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 10px 14px; background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 12px; font-size: 14px; }
.theme-preview-bar form { margin: 0 0 0 auto; }
.token-swatches { display: flex; flex-wrap: wrap; gap: 8px 14px; margin-bottom: 14px; }
.token-swatch { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: var(--muted); }
.token-swatch i { width: 18px; height: 18px; border-radius: 5px; border: 1px solid var(--line-2); }
.theme-file { border-top: 1px solid var(--line); }
.theme-file summary { cursor: pointer; padding: 10px 2px; font-weight: 600; font-size: 14px; overflow-wrap: anywhere; }
.theme-file-code { max-height: 420px; overflow: auto; margin: 0 0 12px; padding: 13px 15px; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; }
.theme-file-code code { background: none; padding: 0; white-space: pre; }
.theme-findings { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; font-size: 13px; }
.theme-findings li { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }
.theme-findings code { overflow-wrap: anywhere; }
.theme-import-actions { margin-top: 14px; }

@media (max-width: 720px) {
  .theme-row { grid-template-columns: 28px 72px minmax(0, 1fr); }
  .theme-row .row-tools { grid-column: 1 / -1; justify-content: flex-start; }
}

.post-img { display: block; max-width: 100%; height: auto; margin: 8px 0; border-radius: 10px; }
.import-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(230px, 100%), 1fr)); gap: 14px 18px; margin-top: 12px; }
.import-form .field { margin: 0; }
.import-wide { grid-column: 1 / -1; }
.import-options .card { margin-top: 18px; }
.import-counts { display: flex; flex-wrap: wrap; gap: 14px 30px; margin: 14px 0; }
.import-counts dd { margin: 0; font-family: var(--display); font-size: 22px; font-weight: 800; }
.import-counts dt { color: var(--muted); font-size: 13px; }
.import-forums { display: grid; gap: 8px; margin-top: 14px; max-height: 460px; overflow-y: auto; }
.import-forum { margin-left: calc(var(--depth, 0) * 22px); }
.import-groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(230px, 100%), 1fr)); gap: 12px 18px; margin: 14px 0; }
.import-groups .field { margin: 0; }
.import-bar { height: 10px; margin: 14px 0; overflow: hidden; background: var(--surface-3); border-radius: 99px; }
.import-bar i { display: block; height: 100%; background: var(--accent); border-radius: 99px; transition: width .4s; }
.import-notes { display: grid; gap: 8px; margin: 10px 0 16px; padding-left: 20px; }

/* People's own HTML stays inside its box. */
.prose img, .prose iframe, .forum-desc img, .forum-desc iframe { max-width: 100%; }
.prose img, .forum-desc img { height: auto; }
.prose iframe, .forum-desc iframe { border: 0; }
.prose table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; }
.prose td, .prose th { padding: 6px 10px; border: 1px solid var(--line); }
.prose div, .prose span, .forum-desc div, .forum-desc span { max-width: 100%; }
.forum-desc { overflow-wrap: anywhere; max-width: 100%; overflow: hidden; }
.forum-desc p { margin: 0; }
.forum-desc-head { margin-top: 8px; font-weight: 650; color: var(--ink); }
.forum-desc a { text-decoration: none; }

/* ---- Fit every screen ---- */
.grid > *, .board-main, .board-side, .profile-layout > * { min-width: 0; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr)); }
.plugin-zones { grid-template-columns: repeat(auto-fill, minmax(min(330px, 100%), 1fr)); }
.status-list > div { flex-wrap: wrap; gap: 2px 16px; }
@media (max-width: 1180px) {
  .has-sidebar .role-row { grid-template-columns: 28px 14px minmax(0, 1fr); }
  .has-sidebar .role-row > .row-tools, .has-sidebar .role-row > .badge, .has-sidebar .role-row > :not(.drag-handle):not(.role-dot):not(.row-main) { grid-column: 3; justify-content: flex-start; }
}
@media (max-width: 760px) {
  .role-row { grid-template-columns: 28px 14px minmax(0, 1fr); }
  .role-row > :not(.drag-handle):not(.role-dot):not(.row-main) { grid-column: 3; }
  .role-row > .role-dot { grid-column: 2; }
  .store-row { grid-template-columns: 28px auto minmax(0, 1fr); }
  .store-row > .store-thumb { grid-column: 2; justify-content: center; }
  .store-row > :not(.drag-handle):not(.store-thumb):not(.row-main) { grid-column: 1 / -1; }
  .theme-row { grid-template-columns: 28px minmax(0, 1fr); }
  .theme-row > .theme-swatch { grid-column: 2; }
  .theme-row > .row-main, .theme-row > .row-tools { grid-column: 1 / -1; }
}
/* Comfortable to press on a phone */
@media (max-width: 600px) {
  .legend-item, .foot-online-list a, .rarity-link, .mini-list .mini-text > a { display: inline-block; padding-block: 4px; }
  .row-last-title { display: block; padding-block: 3px; }
  .chat-tabs button, .mini-tabs button { min-height: 34px; }
  .chat-tools button { min-width: 30px; min-height: 30px; }
  .pager a, .pager span { min-width: 34px; min-height: 34px; }
}

@media (max-width: 1180px) {
  .has-sidebar .theme-row { grid-template-columns: 28px 72px minmax(0, 1fr); }
  .has-sidebar .theme-row > .row-tools { grid-column: 1 / -1; justify-content: flex-start; }
}
@media (max-width: 760px) {
  .has-sidebar .theme-row { grid-template-columns: 28px minmax(0, 1fr); }
  .has-sidebar .theme-row > .theme-swatch { grid-column: 2; }
  .has-sidebar .theme-row > .row-main { grid-column: 1 / -1; }
}
@media (max-width: 600px) {
  .crumbs a { display: inline-block; padding-block: 4px; }
}
/* On the narrowest phones an Admin CP row simply stacks */
@media (max-width: 480px) {
  .has-sidebar .list-card .row { grid-template-columns: minmax(0, 1fr) !important; }
  .has-sidebar .list-card .row > * { grid-column: 1 !important; justify-content: flex-start; }
}

/* Fields and menus */
input[type=date], input[type=datetime-local], input[type=time], input[type=email], input[type=tel] { width: 100%; background: var(--bg); border: 1px solid var(--line-2); color: var(--text); border-radius: 10px; padding: 10px 13px; font: 600 14px var(--font); color-scheme: dark; }
input[type=date]:focus, input[type=datetime-local]:focus, input[type=time]:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: var(--accent); }
input[type=date]::-webkit-calendar-picker-indicator, input[type=datetime-local]::-webkit-calendar-picker-indicator { padding: 4px; border-radius: 6px; cursor: pointer; }
input[type=date]::-webkit-calendar-picker-indicator:hover, input[type=datetime-local]::-webkit-calendar-picker-indicator:hover { background-color: var(--surface-3); }
.menu-panel:not(.notify-panel) { padding: 6px; }
.menu-panel:not(.notify-panel) a, .menu-panel:not(.notify-panel) form button { border-radius: 8px; margin-bottom: 2px; }
.menu-panel:not(.notify-panel) a:last-child, .menu-panel:not(.notify-panel) form:last-child button { margin-bottom: 0; }

/* The chat keeps its size and scrolls */
.chat-log { height: 260px; min-height: 0; max-height: 260px; overscroll-behavior: contain; }
.chat-tall .chat-log { height: min(56vh, 560px); max-height: min(56vh, 560px); }

/* Announcements: colour comes from the whole surface, not an edge */
.announce { padding: 14px 16px; border: 0; border-radius: 16px; background: linear-gradient(100deg, color-mix(in srgb, var(--tone) 16%, var(--surface)), var(--surface) 70%); box-shadow: none; }
.announce::before { content: none; }
.announce-icon { border-radius: 50%; color: var(--tone); --ia: var(--tone); background: color-mix(in srgb, var(--tone) 18%, transparent); }
.announce-close { background: transparent; }
.announce-close:hover { background: color-mix(in srgb, var(--tone) 22%, transparent); color: var(--text); }

/* Game servers */
.gs-list { display: grid; gap: 8px; }
.gs-card { --gs: var(--accent); display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 12px 16px; border-radius: 14px; background: var(--surface); color: var(--text); transition: transform .18s var(--ease), background .18s; }
.gs-card:hover { background: color-mix(in srgb, var(--gs) 8%, var(--surface-2)); color: var(--text); text-decoration: none; transform: translateY(-2px); }
.gs-card-logo { display: grid; place-items: center; flex: none; width: 44px; height: 44px; overflow: hidden; border-radius: 12px; background: color-mix(in srgb, var(--gs, var(--accent)) 22%, var(--surface-2)); color: var(--text); }
.gs-card-logo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.gs-card-logo .i { width: 22px; height: 22px; --ia: currentColor; }
.gs-card-body { display: grid; gap: 2px; min-width: 0; }
.gs-card-body strong { overflow: hidden; font: 700 15px var(--display); text-overflow: ellipsis; white-space: nowrap; }
.gs-card-body strong .i { width: 14px; height: 14px; }
.gs-card-body .small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gs-meter { display: block; height: 5px; margin-top: 4px; overflow: hidden; border-radius: 3px; background: var(--surface-3); }
.gs-meter i { display: block; height: 100%; border-radius: 3px; background: var(--gs, var(--accent)); transition: width .3s; }
.gs-card-now { display: grid; justify-items: end; gap: 2px; white-space: nowrap; }
.gs-card-now b { font: 800 16px var(--display); font-variant-numeric: tabular-nums; }
.gs-state { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12.5px; font-weight: 700; }
.gs-state i { width: 8px; height: 8px; border-radius: 50%; background: var(--bad); }
.gs-card.is-up .gs-state i, .gs-state.is-up i { background: var(--good); }
.gs-state.is-up, .gs-card.is-up .gs-state { color: var(--good); }
.gs-state.is-down, .gs-card.is-down .gs-state { color: var(--bad); }
.gs-card.is-down { opacity: .72; }
.gs-totals { margin-top: 20px; }
.gs-only-online { margin: 0 0 10px; }
.top-alerts + .gs-tabs { margin-top: 14px; }
.content > .gs-hero { --gs: var(--accent); position: relative; overflow: hidden; margin-top: 22px; border-radius: 20px; background: radial-gradient(120% 170% at 0 0, color-mix(in srgb, var(--gs) 42%, var(--surface)), var(--surface) 62%); color: var(--text); }
.gs-cover { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.gs-hero.has-cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(7, 10, 16, .94), rgba(7, 10, 16, .4)); }
.gs-hero-inner { position: relative; z-index: 1; display: flex; flex-wrap: wrap; align-items: center; gap: 18px; padding: 24px 26px; }
.gs-hero.has-cover .gs-hero-inner { padding-top: 90px; }
.gs-logo-lg { width: 76px; height: 76px; border-radius: 18px; background: color-mix(in srgb, var(--gs) 30%, var(--bg)); }
.gs-logo-lg .i { width: 36px; height: 36px; }
.gs-hero-text { flex: 1 1 280px; min-width: 0; }
.gs-hero-text h1 { margin: 8px 0 6px; overflow: hidden; font-size: clamp(26px, 3.4vw, 42px); line-height: 1.12; color: inherit; text-overflow: ellipsis; white-space: nowrap; }
.gs-hero-text p { margin: 0; color: var(--muted); font-weight: 600; overflow-wrap: anywhere; }
.gs-hero-text p a { color: var(--text); }
.gs-hero-text code { background: rgba(255, 255, 255, .08); color: var(--text); }
.gs-hero .gs-state { padding: 3px 10px; border-radius: 999px; background: rgba(255, 255, 255, .08); }
.gs-hero .badge { border-radius: 999px; background: rgba(255, 255, 255, .08); }
.gs-hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.gs-hero-actions form { display: flex; margin: 0; }
.gs-hero-actions .btn { height: 42px; padding-block: 0; border: 0; border-radius: 12px; background: rgba(255, 255, 255, .09); color: var(--text); font-size: 13.5px; --ia: currentColor; }
.gs-hero-actions .btn:hover { background: rgba(255, 255, 255, .17); color: var(--text); }
.gs-hero-actions .btn-primary { background: var(--gs); color: #fff; }
.gs-hero-actions .btn-primary:hover { background: var(--gs); filter: brightness(1.12); color: #fff; }
.gs-hero-actions .btn-icon { width: 42px; padding: 0; }
.gs-now, .gs-stat-grid { gap: 10px; padding: 0; margin-top: 14px; }
.gs-now .card.stat, .gs-stat-grid .card.stat { margin: 0; border: 0; border-radius: 14px; background: var(--surface); }
.gs-now .card.stat:hover, .gs-stat-grid .card.stat:hover { background: var(--surface-2); color: inherit; }
.gs-now .card.stat:hover .stat-label, .gs-stat-grid .card.stat:hover .stat-label, .gs-now .card.stat:hover .stat-sub, .gs-stat-grid .card.stat:hover .stat-sub { color: var(--muted); }
.gs-text { overflow: hidden; font-size: 18px; text-overflow: ellipsis; white-space: nowrap; }
.gs-tabs { flex-wrap: nowrap; overflow-x: auto; margin-top: 14px; scrollbar-width: none; }
.gs-tabs a { flex: none; display: inline-flex; align-items: center; gap: 7px; --ia: currentColor; }
.gs-columns { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 18px; align-items: start; }
.gs-facts { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 7px 14px; margin: 0 0 12px; font-size: 14px; }
.gs-facts dt { color: var(--muted); }
.gs-facts dd { margin: 0; font-weight: 700; text-align: right; overflow-wrap: anywhere; }
.gs-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.gs-strip { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 3px; margin-top: 12px; }
.gs-strip i { height: 22px; border-radius: 3px; background: var(--surface-3); }
.gs-strip .is-up { background: var(--good); }
.gs-strip .is-part { background: var(--warn); }
.gs-strip .is-down { background: var(--bad); }
.gs-bar { position: relative; display: flex; justify-content: space-between; gap: 10px; padding: 6px 9px; margin-bottom: 5px; overflow: hidden; border-radius: 7px; background: var(--surface-2); font-size: 13.5px; }
.gs-bar span, .gs-bar b { position: relative; z-index: 1; }
.gs-bar span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gs-bar i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--accent-soft); }
.gs-events { display: grid; gap: 9px; margin: 0; padding: 0; list-style: none; font-size: 14px; }
.gs-events li { display: flex; gap: 10px; }
.gs-events .i { width: 16px; height: 16px; margin-top: 2px; }
.gs-events small { display: block; font-size: 12.5px; }
.gs-range { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 14px; }
.gs-range a { padding: 5px 12px; border-radius: 7px; background: var(--surface-2); color: var(--muted); font-size: 13px; font-weight: 750; }
.gs-range a.is-on { background: var(--accent); color: #fff; }
.gs-heat-wrap { overflow-x: auto; }
.gs-heat { display: grid; grid-template-columns: 38px repeat(24, minmax(16px, 1fr)); gap: 3px; min-width: 500px; align-items: center; }
.gs-heat small { color: var(--faint); font-size: 11px; }
.gs-heat b { color: var(--muted); font-size: 12px; font-weight: 700; }
.gs-heat i { height: 22px; border-radius: 3px; background: color-mix(in srgb, var(--accent) calc(var(--heat) * 100%), var(--surface-2)); }
.gs-share { min-width: 170px; }
.gs-share .gs-meter { display: inline-block; width: 110px; margin: 0 6px 1px 0; vertical-align: middle; }
.gs-code, .gs-code-block { display: block; padding: 9px 12px; border-radius: 8px; background: var(--bg); overflow-wrap: anywhere; font: 500 13px ui-monospace, Consolas, monospace; }
.gs-code { display: inline-block; font-size: 15px; font-weight: 700; color: var(--accent-light); }
.gs-steps { margin: 0 0 14px; padding-left: 20px; line-height: 1.8; }
.gs-banner-img { display: block; max-width: 100%; height: auto; }
.gs-remove { margin: 8px 0 0; }
.gs-mine { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: center; }
.gs-mine form { margin: 0; }
.gs-role-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr)); gap: 0 16px; margin-bottom: 8px; }
.gs-acp-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; }
.gs-acp-head h2 { margin: 0; }
.gs-acp-head form { margin: 0; }
.gs-transfer { display: inline-flex; gap: 4px; }
.gs-transfer input { width: 110px; padding: 4px 8px; font-size: 12.5px; }
.gs-widget-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.gs-widget-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr)); gap: 8px; }
.gs-profile-block { margin-bottom: 18px; }
.gs-profile-note { margin-bottom: 10px; }
.gs-profile-add { margin: 12px 0; }
.gs-charts { grid-template-columns: repeat(auto-fit, minmax(min(420px, 100%), 1fr)); }
.zone-footer .gs-widget-list, .zone-sidebar .gs-widget-list { grid-template-columns: minmax(0, 1fr); }

/* Plans */
.content > .pl-hero { margin-inline: 0 !important; width: 100% !important; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 34px; align-items: center; width: 100%; max-width: none; padding: 34px max(var(--gutter), calc((100% - var(--page)) / 2)) 46px; background: var(--accent); color: var(--ink); overflow: hidden; }
.pl-hero h1 { font-size: clamp(46px, 8vw, 116px); line-height: .94; letter-spacing: -.05em; color: var(--ink); animation: pl-rise .6s var(--ease) both; }
.pl-hero-text > p { margin: 16px 0 22px; max-width: 46ch; font-size: clamp(16px, 1.6vw, 20px); font-weight: 650; animation: pl-rise .6s .08s var(--ease) both; }
.pl-hero-cta { background: var(--ink); color: #fff; border-color: var(--ink); --ia: #fff; animation: pl-rise .6s .16s var(--ease) both; }
.pl-hero-cta:hover { background: var(--surface-3); border-color: var(--surface-3); color: #fff; }
.pl-hero .pl-proof { display: flex; align-items: center; gap: 7px; margin: 14px 0 0; font-size: 14px; font-weight: 750; --ia: var(--ink); }
.pl-showcase { display: grid; justify-items: end; }
.pl-showcase .store-card { width: min(460px, 100%); color: var(--text); }
.store-card .bundle-look { margin: 0; border-radius: 0; }
.pl-showcase .bundle-look { border-bottom: 0; }
.pl-showcase .profile-banner { height: 160px; }
.pl-showcase .mock-body { padding-block: 16px; }
.pl-showcase .mock-body > div { display: grid; justify-items: start; gap: 6px; min-width: 0; }
.pl-showcase .mock-name { max-width: 100%; overflow: hidden; font-size: 24px; text-overflow: ellipsis; white-space: nowrap; }
.pl-ticker { overflow: hidden; padding: 12px 0; background: var(--surface); }
.pl-ticker-run { display: flex; gap: 30px; width: max-content; animation: pl-slide 34s linear infinite; }
.pl-ticker-run span { display: inline-flex; align-items: center; gap: 7px; font-size: 13.5px; font-weight: 700; white-space: nowrap; }
.pl-ticker-run .i { width: 15px; height: 15px; }
.pl-ticker:hover .pl-ticker-run { animation-play-state: paused; }
.pl-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(290px, 100%), 1fr)); gap: 18px; align-items: stretch; margin-top: 30px; scroll-margin-top: 80px; }
.pl-card { --mx: 50%; --my: 0; position: relative; display: flex; flex-direction: column; padding: 26px 24px; overflow: hidden; border-radius: 20px; background: var(--surface); animation: pl-rise .6s calc(var(--i) * .1s + .1s) var(--ease) both; transition: transform .25s var(--ease), box-shadow .25s; }
.pl-card::before { content: ""; position: absolute; inset: 0; background: radial-gradient(320px circle at var(--mx) var(--my), color-mix(in srgb, var(--accent) 22%, transparent), transparent 70%); opacity: 0; transition: opacity .25s; pointer-events: none; }
.pl-card:hover { transform: translateY(-6px); box-shadow: 0 24px 50px rgba(0, 0, 0, .35); }
.pl-card:hover::before { opacity: 1; }
.pl-card > * { position: relative; }
.pl-card h2 { margin: 0 0 12px; font-size: 22px; }
.pl-card.is-best { background: linear-gradient(150deg, color-mix(in srgb, var(--accent) 34%, var(--surface)), var(--surface) 62%); box-shadow: 0 18px 44px color-mix(in srgb, var(--accent) 26%, transparent); }
.pl-flag { align-self: flex-start; display: inline-flex; align-items: center; gap: 5px; padding: 4px 11px; margin-bottom: 12px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 12px; font-weight: 800; --ia: #fff; animation: pl-pulse 2.6s ease-in-out infinite; }
.pl-flag .i { width: 13px; height: 13px; }
.pl-price { margin: 0; font: 800 clamp(38px, 4vw, 52px)/1 var(--display); letter-spacing: -.05em; font-variant-numeric: tabular-nums; }
.pl-price small { color: var(--muted); font: 700 14px var(--font); letter-spacing: 0; }
.pl-deal { min-height: 22px; margin: 8px 0 12px; color: var(--muted); font-size: 13.5px; font-weight: 650; }
.pl-deal b { padding: 2px 8px; margin-right: 4px; border-radius: 999px; background: color-mix(in srgb, var(--good) 18%, transparent); color: var(--good); font-size: 12px; }
.pl-list { display: grid; gap: 9px; margin: 12px 0 20px; padding: 0; list-style: none; font-size: 14px; }
.pl-list li { display: flex; gap: 9px; animation: pl-rise .45s calc(var(--i) * .1s + var(--l) * .06s + .3s) var(--ease) both; }
.pl-list .i { width: 16px; height: 16px; margin-top: 2px; }
.pl-action { display: grid; gap: 8px; margin-top: auto; }
.pl-action .pay-buttons { display: grid; gap: 8px; margin: 0; }
.pl-card .btn-primary { transition: transform .15s, filter .15s; }
.pl-card .btn-primary:hover { filter: brightness(1.1); transform: scale(1.02); }
.pl-trust { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 26px; margin: 26px 0 8px; padding: 0; color: var(--muted); font-size: 13.5px; font-weight: 650; list-style: none; }
.pl-trust li { display: flex; align-items: center; gap: 7px; }
.pl-note { text-align: center; }
@keyframes pl-rise { from { opacity: 0; transform: translateY(16px); } }
@keyframes pl-slide { to { transform: translateX(-50%); } }
@keyframes pl-pulse { 50% { filter: brightness(1.18); } }
@media (prefers-reduced-motion: reduce) { .pl-ticker-run, .pl-flag { animation: none; } }

@media (max-width: 900px) {
  .gs-columns { grid-template-columns: minmax(0, 1fr); }
  .content > .pl-hero { grid-template-columns: minmax(0, 1fr); }
  .pl-showcase { display: none; }
}
@media (max-width: 480px) {
  .gs-card { grid-template-columns: minmax(0, 1fr) auto; }
  .gs-card-logo { display: none; }
  .gs-hero-inner .gs-card-logo { display: grid; }
  .gs-mine { grid-template-columns: minmax(0, 1fr); }
  .gs-hero-actions { width: 100%; }
}


/* Account settings workspace */
.account-workspace { display:grid; grid-template-columns:minmax(170px, .85fr) minmax(0, 3fr) minmax(170px, .9fr); align-items:start; gap:18px; margin-block:20px 32px; }
.account-navigation,.account-shortcuts { padding:14px; }
.account-navigation h2,.account-shortcuts h2 { font-size:14px; margin:0 0 10px; padding:4px 8px; }
.account-navigation a,.account-shortcuts a { display:flex; align-items:center; gap:9px; min-height:42px; border-radius:8px; padding:8px; color:var(--muted); text-decoration:none; }
.account-navigation a:hover,.account-shortcuts a:hover { color:var(--text); background:var(--surface-2); }
.account-navigation a[aria-current="page"] { color:var(--text); background:var(--surface-2); font-weight:700; }
.account-navigation .ico,.account-shortcuts .ico { flex:none; }
.account-main { min-width:0; }
.account-main > :first-child { margin-top:0; }
.account-main .profile-grid { grid-template-columns:repeat(auto-fit,minmax(min(100%, 290px),1fr)); }
.account-summary h2 { margin-bottom:8px; }
.account-summary-row { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:16px 0; }
.account-summary-row + .account-summary-row { border-top:1px solid var(--line); }
.account-summary-row strong,.account-summary-row small { display:block; overflow-wrap:anywhere; }
.account-summary-row small { color:var(--muted); margin-top:4px; }
.account-summary-row .btn { flex:none; }
.plugin-widget { min-width:0; overflow-wrap:anywhere; }
@media (max-width:1100px) {
  .account-workspace { grid-template-columns:minmax(160px,.8fr) minmax(0,3fr); }
  .account-shortcuts { grid-column:1/-1; }
  .account-shortcuts nav { display:flex; flex-wrap:wrap; gap:4px; }
}
@media (max-width:650px) {
  .account-workspace { grid-template-columns:minmax(0,1fr); gap:12px; }
  .account-navigation { display:flex; flex-wrap:wrap; gap:4px; margin-bottom:0; }
  .account-navigation h2 { flex-basis:100%; margin-bottom:2px; }
}

/* Plugin studio */
.plugin-studio { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 18px; align-items: start; }
.plugin-studio-editor .form-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); }
.plugin-studio-actions { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
@media (max-width: 960px) {
  .plugin-studio { grid-template-columns: minmax(0, 1fr); gap: 0; }
}

.plugin-studio .plugin-code { font-family: ui-monospace, Consolas, monospace; }
