/* PinkPill — forum styles */
:root {
  --pink: #ec4899;
  --pink-strong: #db2777;
  --pink-soft: #fce7f3;
  --pink-softer: #fdf2f8;
  --bg: #fdf6fa;
  --surface: #ffffff;
  --surface-2: #fbf1f6;
  --border: #f1d5e4;
  --border-strong: #e5b8cf;
  --text: #2a1a23;
  --muted: #86707c;
  --link: #be185d;
  --header-bg: linear-gradient(135deg, #f472b6 0%, #ec4899 45%, #c026d3 100%);
  --header-text: #fff;
  --nav-bg: #9d174d;
  --cat-bg: linear-gradient(90deg, #fce7f3, #fdf2f8);
  --cat-text: #9d174d;
  --unread: #db2777;
  --shadow: 0 1px 3px rgba(157, 23, 77, .08), 0 1px 2px rgba(0, 0, 0, .04);
  --radius: 10px;
  --admin: #c026d3;
  --mod: #2563eb;
  --danger: #dc2626;
  --ok: #059669;
  --warn: #d97706;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #150e13;
    --surface: #1f151c;
    --surface-2: #281b24;
    --border: #3a2733;
    --border-strong: #533847;
    --text: #f5e8ef;
    --muted: #b39aa8;
    --link: #f9a8d4;
    --pink-soft: #3b1a2d;
    --pink-softer: #2a1522;
    --header-bg: linear-gradient(135deg, #831843 0%, #9d174d 50%, #6b21a8 100%);
    --nav-bg: #4a0f2d;
    --cat-bg: linear-gradient(90deg, #35182a, #251520);
    --cat-text: #f9a8d4;
    --unread: #f472b6;
    --shadow: 0 1px 3px rgba(0, 0, 0, .4);
    --admin: #e879f9;
    --mod: #60a5fa;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #150e13;
  --surface: #1f151c;
  --surface-2: #281b24;
  --border: #3a2733;
  --border-strong: #533847;
  --text: #f5e8ef;
  --muted: #b39aa8;
  --link: #f9a8d4;
  --pink-soft: #3b1a2d;
  --pink-softer: #2a1522;
  --header-bg: linear-gradient(135deg, #831843 0%, #9d174d 50%, #6b21a8 100%);
  --nav-bg: #4a0f2d;
  --cat-bg: linear-gradient(90deg, #35182a, #251520);
  --cat-text: #f9a8d4;
  --unread: #f472b6;
  --shadow: 0 1px 3px rgba(0, 0, 0, .4);
  --admin: #e879f9;
  --mod: #60a5fa;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 15px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  overflow-x: hidden;
  /* clip (not hidden) so the sticky header keeps working, notably in Safari. */
  overflow-x: clip;
}
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }
h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 .4em; }
h1 { font-size: 1.6rem; }
hr { border: 0; border-top: 1px solid var(--border); margin: 1em 0; }
code { background: var(--surface-2); padding: 1px 5px; border-radius: 4px; font-size: .9em; }
.muted { color: var(--muted); }
.small { font-size: .85em; }
.block { display: block; }
.grow { flex: 1; min-width: 0; }
.nowrap { white-space: nowrap; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 8px; top: 8px; z-index: 100; background: #fff; padding: 8px; }
.container { max-width: 1280px; margin: 0 auto; padding: 0 16px; }

/* ---------- header ---------- */
.site-header { background: var(--header-bg); color: var(--header-text); position: sticky; top: 0; z-index: 40; box-shadow: 0 2px 8px rgba(0,0,0,.12); }
.header-inner { max-width: 1280px; margin: 0 auto; padding: 6px 16px; display: flex; align-items: center; gap: 14px; }
.logo { color: #fff; font-size: 1.35rem; font-weight: 400; letter-spacing: -.5px; display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.logo b { font-weight: 800; }
.logo:hover { text-decoration: none; }
.logo-pill { width: 28px; height: 15px; border-radius: 10px; background: linear-gradient(90deg, #fff 50%, #fbcfe8 50%); box-shadow: 0 0 0 2px rgba(255,255,255,.4); transform: rotate(-25deg); }
.quick-search { flex: 1; max-width: 360px; margin-left: auto; }
.quick-search input { width: 100%; border: 0; border-radius: 20px; padding: 5px 14px; background: rgba(255,255,255,.22); color: #fff; font: inherit; }
.quick-search input::placeholder { color: rgba(255,255,255,.85); }
.quick-search input:focus { outline: 2px solid #fff; background: rgba(255,255,255,.3); }
.userbar { display: flex; align-items: center; gap: 4px; }
.ub-link { color: #fff; background: none; border: 0; font: inherit; cursor: pointer; padding: 5px 9px; border-radius: 8px; display: inline-flex; align-items: center; gap: 6px; position: relative; font-size: 1rem; }
.ub-link:hover { background: rgba(255,255,255,.18); text-decoration: none; }
.ub-link--primary { background: rgba(255,255,255,.25); font-weight: 600; }
.ub-link .count, .tab .count, .ub-link .count { background: #fff; color: var(--pink-strong); border-radius: 10px; font-size: 11px; font-weight: 700; padding: 0 6px; line-height: 17px; }
.ub-link .count { position: absolute; top: 0; right: 0; }
.site-nav { background: rgba(0,0,0,.18); }
.nav-inner { max-width: 1280px; margin: 0 auto; padding: 0 16px; display: flex; gap: 2px; overflow-x: auto; }
.nav-inner a { color: #fff; padding: 6px 13px; font-size: .92rem; font-weight: 600; white-space: nowrap; border-bottom: 3px solid transparent; }
.nav-inner a:hover { text-decoration: none; background: rgba(255,255,255,.12); }
.nav-inner a.active { border-bottom-color: #fff; background: rgba(255,255,255,.15); }
.nav-toggle { display: none; background: none; border: 0; color: #fff; font-size: 1.4rem; cursor: pointer; }

/* ---------- menus ---------- */
.menu-wrap { position: relative; display: inline-block; }
.menu { display: none; position: absolute; top: calc(100% + 6px); left: 0; min-width: 220px; background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: 0 10px 30px rgba(0,0,0,.18); z-index: 60; padding: 6px 0; font-size: .92rem; }
.menu.open { display: block; }
.menu--right { left: auto; right: 0; }
.menu--wide { width: 340px; max-width: calc(100vw - 24px); }
.menu > a, .menu > button { display: block; width: 100%; text-align: left; padding: 7px 14px; background: none; border: 0; font: inherit; color: var(--text); cursor: pointer; }
.menu > a:hover, .menu > button:hover { background: var(--pink-softer); text-decoration: none; }
.menu .danger { color: var(--danger); }
.menu hr { margin: 6px 0; }
.menu-head { display: flex; gap: 10px; padding: 8px 14px 10px; border-bottom: 1px solid var(--border); margin-bottom: 6px; }
.menu-title { display: flex; justify-content: space-between; align-items: center; font-weight: 700; padding: 6px 14px 8px; border-bottom: 1px solid var(--border); }
.menu-foot { display: block; text-align: center; padding: 8px; border-top: 1px solid var(--border); margin-top: 4px; }
.menu-status { display: flex; gap: 6px; padding: 6px 14px; }
.menu-status input { flex: 1; min-width: 0; }
.menu .alerts-list { max-height: 360px; overflow-y: auto; }

/* ---------- layout ---------- */
#app { padding-top: 18px; padding-bottom: 30px; outline: none; }
.layout--sidebar { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; }
.layout-sidebar .block { font-size: .92rem; }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 6px 16px; margin-bottom: 14px; }
.page-head > h1, .page-head > p, .page-head > .thread-info, .page-head > .tags { flex-basis: 100%; margin: 0; }
.head-actions { margin-left: auto; display: flex; gap: 6px; flex-wrap: wrap; }
.page-head > .head-actions:first-of-type { margin-top: 4px; }
.breadcrumb { font-size: .88rem; margin-bottom: 10px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.breadcrumb .sep { opacity: .6; }
.row { display: flex; gap: 10px; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.account-layout { display: flex; gap: 20px; align-items: flex-start; }
.side-nav { width: 220px; flex-shrink: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; position: sticky; top: 92px; }
.side-nav a, .side-nav button { display: block; padding: 9px 14px; border-left: 3px solid transparent; color: var(--text); width: 100%; text-align: left; font: inherit; background: none; border-top: 0; border-right: 0; border-bottom: 1px solid var(--border); cursor: pointer; }
.side-nav a:hover, .side-nav button:hover { background: var(--pink-softer); text-decoration: none; }
.side-nav a.active { border-left-color: var(--pink); background: var(--pink-soft); font-weight: 600; }

/* ---------- blocks ---------- */
.block { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 16px; overflow: hidden; }
a.block:hover { text-decoration: none; border-color: var(--pink); }
.block-head { margin: 0; padding: 10px 14px; font-size: 1rem; font-weight: 700; border-bottom: 1px solid var(--border); background: var(--surface-2); display: flex; align-items: center; gap: 8px; justify-content: space-between; }
.block-head a { color: inherit; }
.block-head--cat { background: var(--cat-bg); color: var(--cat-text); font-size: 1.05rem; cursor: pointer; user-select: none; }
.block-head--cat::after { content: "▾"; opacity: .6; }
.collapsed .block-head--cat::after { content: "▸"; }
.collapsed > .block-body { display: none; }
.block-body { padding: 12px 14px; }
.block-sub { padding: 6px 14px; font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); background: var(--surface-2); border-bottom: 1px solid var(--border); }
.node-cat .block-body { padding: 0; }
.empty { padding: 24px; text-align: center; color: var(--muted); }

/* forum nodes */
.node { display: grid; grid-template-columns: 46px minmax(0, 1fr) 160px 260px; gap: 12px; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--border); }
.node:last-child { border-bottom: 0; }
.node-icon { font-size: 1.7rem; text-align: center; width: 46px; height: 46px; line-height: 46px; background: var(--pink-softer); border-radius: 12px; opacity: .75; }
.node--unread .node-icon { opacity: 1; box-shadow: 0 0 0 2px var(--pink); }
.node-title { font-weight: 600; font-size: 1.02rem; color: var(--text); }
.node--unread .node-title { font-weight: 800; }
.node-desc { font-size: .87rem; color: var(--muted); }
.node-stats, .thread-stats { display: flex; gap: 14px; margin: 0; font-size: .82rem; }
.node-stats dt, .thread-stats dt { color: var(--muted); }
.node-stats dd, .thread-stats dd { margin: 0; font-weight: 600; }
.node-last { display: flex; gap: 8px; align-items: center; min-width: 0; font-size: .87rem; }
.node-last > div { min-width: 0; }
.node-last-title { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); }

/* thread list */
.thread-row { display: grid; grid-template-columns: 44px minmax(0, 1fr) 150px 120px 32px; gap: 12px; align-items: center; padding: 10px 14px; border-bottom: 1px solid var(--border); }
.thread-row:last-child { border-bottom: 0; }
.thread-row--sticky { background: var(--pink-softer); }
.thread-title a { color: var(--text); font-weight: 500; }
.thread-row--unread .thread-title a { font-weight: 800; }
.thread-row--unread .thread-title a::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--unread); margin-right: 6px; vertical-align: middle; }
.thread-meta { display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: center; }
.thread-pages a { display: inline-block; border: 1px solid var(--border); border-radius: 4px; padding: 0 5px; font-size: .78rem; }
.thread-icons { margin-left: auto; letter-spacing: 3px; }
.thread-last { text-align: right; }
.is-ignored { opacity: .5; }
.watched-row { display: flex; align-items: center; gap: 8px; border-bottom: 1px solid var(--border); padding-right: 12px; }
.watched-row .thread-row { flex: 1; border: 0; }

.prefix { display: inline-block; background: var(--c); color: #fff; font-size: .72rem; font-weight: 700; padding: 1px 7px; border-radius: 4px; vertical-align: 2px; white-space: nowrap; }

.filter-bar { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; margin-bottom: 12px; font-size: .88rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 8px 12px; }
.filter-bar label { display: inline-flex; gap: 6px; align-items: center; }

/* pagination */
.pagination { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; margin: 10px 0; font-size: .88rem; }
.page { display: inline-block; min-width: 30px; text-align: center; padding: 4px 8px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); }
.page.current { background: var(--pink); color: #fff; border-color: var(--pink); font-weight: 700; }
.page-gap { padding: 0 4px; color: var(--muted); }
.page-of { color: var(--muted); margin-left: 8px; }

/* ---------- avatars ---------- */
.avatar { display: inline-flex; align-items: center; justify-content: center; color: #fff; font-weight: 700; border-radius: 50%; overflow: hidden; flex-shrink: 0; vertical-align: middle; text-decoration: none !important; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar-s { width: 28px; height: 28px; font-size: 13px; }
.avatar-m { width: 44px; height: 44px; font-size: 19px; }
.avatar-l { width: 96px; height: 96px; font-size: 42px; }
.avatar-xl { width: 128px; height: 128px; font-size: 56px; border: 4px solid var(--surface); }
.avatar-row { display: flex; flex-wrap: wrap; gap: 4px; }
.alert-icon { background: var(--pink-soft); color: var(--pink-strong); }
.online-dot { display: inline-block; width: 8px; height: 8px; background: #22c55e; border-radius: 50%; }

.username { font-weight: 600; color: var(--link); }
.username--admin { color: var(--admin); }
.username--mod { color: var(--mod); }
.username--banned { text-decoration: line-through; opacity: .7; }
.mention { font-weight: 600; background: var(--pink-soft); padding: 0 3px; border-radius: 3px; }
.role-banner { display: inline-block; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; padding: 2px 10px; border-radius: 4px; color: #fff; margin: 4px 0; }
.role-banner--admin { background: linear-gradient(90deg, #c026d3, #db2777); }
.role-banner--gadmin { background: linear-gradient(90deg, #b45309, #f59e0b, #fde68a); color: #422006; box-shadow: 0 0 8px rgba(245, 158, 11, .6); }
.role-banner--owner { background: #111; box-shadow: inset 0 0 0 1px rgba(255,255,255,.25); }
.role-banner--mod { background: linear-gradient(90deg, #2563eb, #7c3aed); }
.badge { display: inline-block; font-size: .72rem; font-weight: 700; padding: 1px 7px; border-radius: 10px; background: var(--pink-soft); color: var(--pink-strong); }
.badge--red { background: var(--danger); color: #fff; }

/* ---------- messages ---------- */
.message { display: grid; grid-template-columns: 170px minmax(0, 1fr); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 12px; box-shadow: var(--shadow); scroll-margin-top: 110px; transition: box-shadow .4s; }
.message--highlight { box-shadow: 0 0 0 3px var(--pink); }
.message--deleted, .message--ignored { display: block; }
.message-deleted { padding: 10px 14px; color: var(--muted); font-size: .9rem; background: var(--surface-2); border-radius: var(--radius); }
.message-user { text-align: center; padding: 14px 10px; background: var(--surface-2); border-right: 1px solid var(--border); border-radius: var(--radius) 0 0 var(--radius); position: relative; }
.message-user .avatar { margin-bottom: 6px; }
.online-badge { position: absolute; top: 90px; left: calc(50% + 30px); width: 14px; height: 14px; border-radius: 50%; background: #22c55e; border: 2px solid var(--surface-2); }
.message-username { font-size: 1.02rem; }
.message-title { font-size: .82rem; color: var(--muted); }
.message-main { padding: 10px 16px; display: flex; flex-direction: column; min-width: 0; }
.message-attribution { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--border); padding-bottom: 6px; margin-bottom: 10px; gap: 8px; }
.message-attribution-opposite { display: flex; gap: 6px; align-items: center; }
.message-content { flex: 1; overflow-wrap: anywhere; }
.message-edited { margin-top: 10px; }
.message-signature { border-top: 1px dashed var(--border); margin-top: 12px; padding-top: 8px; font-size: .85rem; color: var(--muted); max-height: 120px; overflow: hidden; }
.message-footer { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.message-actions { display: flex; flex-wrap: wrap; gap: 2px; align-items: center; }
.action { background: none; border: 0; color: var(--muted); font: inherit; font-size: .85rem; cursor: pointer; padding: 4px 8px; border-radius: 6px; }
.action:hover { background: var(--pink-softer); color: var(--link); }
.action--active { color: var(--pink-strong); font-weight: 700; }
.icon-btn { background: none; border: 0; cursor: pointer; padding: 2px 4px; opacity: .55; font-size: .95rem; }
.icon-btn:hover, .icon-btn.on { opacity: 1; }
.link { background: none; border: 0; color: var(--link); font: inherit; cursor: pointer; padding: 0; }
.rating-badge { background: #fef3c7; color: #92400e; font-size: .78rem; font-weight: 700; padding: 1px 8px; border-radius: 10px; }

.react-wrap { position: relative; display: inline-block; }
.react-picker { display: none; position: absolute; bottom: 100%; right: 0; background: var(--surface); border: 1px solid var(--border); border-radius: 24px; box-shadow: 0 6px 20px rgba(0,0,0,.18); padding: 4px 6px; white-space: nowrap; z-index: 20; }
.react-wrap:hover .react-picker, .react-wrap:focus-within .react-picker { display: flex; }
.react-picker button { background: none; border: 0; font-size: 1.35rem; cursor: pointer; padding: 2px 4px; transition: transform .12s; }
.react-picker button:hover { transform: scale(1.35) translateY(-3px); }
.reactions-bar { margin-top: 8px; background: var(--pink-softer); border: 1px solid var(--border); border-radius: 6px; padding: 5px 10px; font: inherit; font-size: .85rem; color: var(--text); cursor: pointer; text-align: left; }
.reaction-emojis { letter-spacing: -2px; margin-right: 4px; }

/* bbcode */
.bbwrap { overflow-wrap: anywhere; }
.bbwrap ul { margin: .4em 0; padding-left: 1.4em; }
.bb-img { max-height: 520px; border-radius: 8px; display: block; margin: 6px 0; cursor: zoom-in; }
.bb-quote { margin: 8px 0; border-left: 3px solid var(--pink); background: var(--pink-softer); padding: 8px 12px; border-radius: 0 6px 6px 0; }
.bb-quote-head { font-weight: 700; font-size: .85rem; color: var(--pink-strong); margin-bottom: 4px; }
.bb-spoiler { margin: 6px 0; border: 1px solid var(--border); border-radius: 6px; }
.bb-spoiler summary { cursor: pointer; padding: 4px 10px; font-weight: 600; background: var(--surface-2); font-size: .88rem; }
.bb-spoiler > div { padding: 8px 10px; }
.bb-code { background: var(--surface-2); border: 1px solid var(--border); padding: 10px; border-radius: 6px; overflow-x: auto; font-size: .88rem; white-space: pre-wrap; }
.bb-media { position: relative; padding-top: 56.25%; max-width: 640px; margin: 6px 0; }
.bb-media iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; border-radius: 8px; }

/* poll & rating */
.poll-result { display: grid; grid-template-columns: minmax(80px, 200px) 1fr 80px; gap: 10px; align-items: center; margin: 6px 0; }
.poll-result.mine .poll-label { font-weight: 700; }
.poll-bar { height: 14px; background: var(--surface-2); border-radius: 7px; overflow: hidden; }
.poll-bar span { display: block; height: 100%; background: linear-gradient(90deg, #f472b6, #c026d3); border-radius: 7px; }
.poll-option { display: block; padding: 5px 0; cursor: pointer; }
.rating-summary .block-body { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.rating-big { font-size: 2.4rem; font-weight: 800; color: var(--pink-strong); line-height: 1; }
.rating-big small { font-size: 1rem; color: var(--muted); }
.rating-dist, .bar-chart { display: flex; align-items: flex-end; gap: 4px; height: 60px; margin-left: auto; }
.rd-col, .bar { width: 16px; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; }
.rd-col span, .bar span { display: block; width: 100%; background: var(--pink); border-radius: 3px 3px 0 0; min-height: 2px; }
.rd-col em, .bar em { font-size: .65rem; font-style: normal; color: var(--muted); }
.bar-chart { height: 140px; margin: 10px 0; gap: 8px; }
.bar { width: auto; flex: 1; }

/* ---------- forms ---------- */
input, select, textarea { font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--border-strong); border-radius: 6px; padding: 7px 10px; max-width: 100%; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--pink); outline-offset: -1px; border-color: transparent; }
input[type=checkbox], input[type=radio] { accent-color: var(--pink); width: auto; }
input[type=color] { padding: 2px; width: 60px; height: 34px; }
textarea { width: 100%; resize: vertical; min-height: 60px; }
.form .field, .modal .field { display: flex; flex-direction: column; gap: 4px; margin: 10px 0; }
.field > span { font-weight: 600; font-size: .9rem; }
.field input:not([type=checkbox]):not([type=color]), .field select { width: 100%; }
.check { display: flex; gap: 8px; align-items: center; margin: 8px 0; cursor: pointer; font-size: .92rem; }
.form-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 12px; }
.input-title { font-size: 1.1rem; font-weight: 600; }
.prefix-select { flex-shrink: 0; }
.btn { display: inline-flex; align-items: center; gap: 4px; padding: 7px 14px; border-radius: 8px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); font: inherit; font-weight: 600; font-size: .9rem; cursor: pointer; white-space: nowrap; }
.btn:hover { text-decoration: none; background: var(--pink-softer); border-color: var(--pink); }
.btn:disabled { opacity: .6; cursor: wait; }
.btn-primary { background: linear-gradient(135deg, #f472b6, #db2777); border-color: #db2777; color: #fff; }
.btn-primary:hover { background: linear-gradient(135deg, #ec4899, #be185d); color: #fff; }
.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-danger:hover { background: #b91c1c; color: #fff; }
.btn-sm { padding: 4px 10px; font-size: .82rem; }
.poll-builder { border: 1px dashed var(--border-strong); border-radius: 8px; padding: 8px 12px; margin: 10px 0; }
.poll-builder summary { cursor: pointer; font-weight: 600; }
.poll-opt { display: block; width: 100%; margin: 4px 0; }
.forum-pick { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }

/* editor */
.editor { border: 1px solid var(--border-strong); border-radius: 8px; overflow: hidden; background: var(--surface); margin: 10px 0; }
.editor-toolbar { display: flex; flex-wrap: wrap; gap: 1px; padding: 4px; background: var(--surface-2); border-bottom: 1px solid var(--border); }
.tb { background: none; border: 0; min-width: 30px; height: 30px; border-radius: 5px; cursor: pointer; color: var(--text); font-size: .9rem; }
.tb:hover, .tb.active { background: var(--pink-soft); }
.editor textarea { border: 0; border-radius: 0; display: block; }
.editor textarea:focus { outline: none; }
.editor-preview { padding: 10px; min-height: 120px; }
.editor-emoji { display: flex; flex-wrap: wrap; padding: 4px; border-bottom: 1px solid var(--border); }
.editor-emoji[hidden] { display: none; }
.editor-emoji button { background: none; border: 0; font-size: 1.25rem; cursor: pointer; padding: 2px 4px; border-radius: 4px; }
.editor-emoji button:hover { background: var(--pink-soft); }
.quick-reply-inner { display: flex; gap: 12px; padding: 12px; align-items: flex-start; }
.quick-reply .editor { margin-top: 0; }

/* ---------- sidebar widgets & lists ---------- */
.pairs { margin: 0; }
.pairs > div { display: flex; justify-content: space-between; gap: 10px; padding: 3px 0; }
.pairs dt { color: var(--muted); }
.pairs dd { margin: 0; font-weight: 600; text-align: right; }
.pairs--compact { font-size: .78rem; margin-top: 8px; text-align: left; }
.pairs--row { display: flex; flex-wrap: wrap; gap: 6px 22px; margin-top: 10px; }
.pairs--row > div { flex-direction: column; gap: 0; padding: 0; }
.pairs--row dd { text-align: left; font-size: 1.1rem; }
.mini-post, .mini-user { display: flex; gap: 10px; padding: 6px 0; align-items: flex-start; border-bottom: 1px solid var(--border); }
.mini-post:last-child, .mini-user:last-child { border-bottom: 0; }
.mini-title { color: var(--text); font-weight: 500; display: block; }
.inline-list { line-height: 1.8; }
/* Compact so hundreds of online members stay readable. */
.online-names { font-size: .78rem; line-height: 1.6; }
.online-names .vip-verified, .online-names .owner-badge { font-size: .65em; }
.member-list { display: flex; flex-direction: column; }
.member-row { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.member-row:last-child { border-bottom: 0; }
.member-stat { text-align: right; }
.find-member { margin-left: auto; display: flex; gap: 6px; }
.tabs { display: flex; gap: 2px; border-bottom: 2px solid var(--border); margin-bottom: 14px; overflow-x: auto; }
.tab { padding: 8px 14px; color: var(--muted); font-weight: 600; border-bottom: 3px solid transparent; margin-bottom: -2px; white-space: nowrap; display: inline-flex; gap: 6px; align-items: center; }
.tab:hover { text-decoration: none; color: var(--text); }
.tab.active { color: var(--pink-strong); border-bottom-color: var(--pink); }
.tab .count { background: var(--pink); color: #fff; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.tag { background: var(--pink-soft); color: var(--pink-strong); font-size: .78rem; padding: 2px 9px; border-radius: 12px; font-weight: 600; }
.tag small { opacity: .7; }
.activity-item { display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.activity-item:last-child { border-bottom: 0; }
.activity-snippet { font-size: .9rem; margin: 4px 0; color: var(--text); opacity: .85; }
.trophy { display: flex; gap: 12px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--border); }
.trophy-points { width: 42px; height: 42px; border-radius: 50%; background: linear-gradient(135deg, #fbbf24, #f472b6); color: #fff; font-weight: 800; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th, .table td { padding: 8px 10px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: middle; }
.table th { background: var(--surface-2); }
section.block > .table { margin: 0; }
.block:has(> .table) { overflow-x: auto; }

/* notices */
.notice { background: var(--pink-softer); border: 1px solid var(--border); border-left: 4px solid var(--pink); border-radius: 8px; padding: 10px 14px; margin-bottom: 14px; }
.notice--error { border-left-color: var(--danger); }
.notice--welcome { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; background: var(--cat-bg); }

/* profile */
.profile-head { position: relative; }
.profile-banner { height: 150px; background: var(--banner, var(--header-bg)); background-size: cover; background-position: center; }
.profile-head-body { display: flex; gap: 18px; padding: 0 18px 16px; align-items: flex-end; flex-wrap: wrap; }
.profile-head-body > .avatar { margin-top: -60px; box-shadow: var(--shadow); }
.profile-head-body h1 { margin-top: 10px; }
.profile-actions { display: flex; gap: 6px; flex-wrap: wrap; align-self: flex-start; margin-top: 12px; }
.profile-post { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.profile-post:last-child { border-bottom: 0; }
.pp-footer { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; margin-top: 4px; }
.pp-comments { margin-top: 6px; }
.pp-comment { display: flex; gap: 8px; background: var(--surface-2); padding: 6px 10px; border-radius: 6px; margin-top: 4px; font-size: .9rem; }
.pp-comment-form { display: flex; gap: 6px; margin-top: 6px; }
.pp-new .block-body { display: flex; gap: 10px; align-items: flex-start; }
.avatar-editor { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }

/* alerts */
.alert-row { display: flex; gap: 10px; padding: 9px 14px; color: var(--text); border-bottom: 1px solid var(--border); align-items: flex-start; font-size: .9rem; }
.alert-row:hover { background: var(--pink-softer); text-decoration: none; }
.alert-row.unread { background: var(--pink-soft); }
.alerts-list > .alert-row:last-child { border-bottom: 0; }
.block-body.alerts-list { padding: 0; }

/* reports */
.report-row { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.report-target { margin-top: 6px; padding: 8px 10px; background: var(--surface-2); border-radius: 6px; font-size: .9rem; }
.report-actions { display: flex; flex-direction: column; gap: 6px; }

/* help */
.help-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; }
.help-card { padding: 16px; margin: 0; color: var(--text); }
.rules li { margin-bottom: 8px; }
.rules ul { margin: 4px 0 0; padding-left: 20px; font-weight: normal; }
.rules ul li { margin-bottom: 2px; }
.rules ul { margin: 4px 0 0; padding-left: 20px; font-weight: normal; }
.rules ul li { margin-bottom: 2px; }
.faq dt { font-weight: 700; margin-top: 12px; }
.faq dd { margin: 4px 0 0; }
.smilies { font-size: 1.8rem; display: flex; flex-wrap: wrap; gap: 8px; }
.resources li { margin-bottom: 6px; }

/* auth */
.auth-wrap { max-width: 460px; margin: 10px auto; }
.demo-users { display: flex; flex-wrap: wrap; gap: 6px; }
.demo-user { display: inline-flex; align-items: center; gap: 6px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 20px; padding: 3px 12px 3px 3px; cursor: pointer; font: inherit; color: var(--text); font-weight: 600; }
.demo-user:hover { border-color: var(--pink); }

/* member tooltip */
.user-tip { position: absolute; z-index: 70; width: 330px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: 0 10px 30px rgba(0,0,0,.2); padding: 12px; font-size: .9rem; }
.user-tip-head { display: flex; gap: 12px; }
.user-tip .avatar-l { width: 72px; height: 72px; font-size: 32px; }
.user-tip-name { font-size: 1.1rem; }

/* modal & toasts */
.modal-backdrop { position: fixed; inset: 0; background: rgba(20, 5, 15, .55); z-index: 80; display: flex; align-items: flex-start; justify-content: center; padding: 60px 16px; overflow-y: auto; }
.modal { background: var(--surface); border-radius: 12px; width: 100%; max-width: 520px; box-shadow: 0 20px 60px rgba(0,0,0,.35); }
.modal--wide { max-width: 820px; }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.modal-head h3 { margin: 0; }
.modal-close { background: none; border: 0; font-size: 1.6rem; line-height: 1; cursor: pointer; color: var(--muted); }
.modal-body { padding: 14px 16px 16px; }
.history-item { border-bottom: 1px solid var(--border); padding: 10px 0; }
.toasts { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 90; display: flex; flex-direction: column; gap: 8px; align-items: center; width: max-content; max-width: calc(100vw - 32px); }
.toast { background: #2a1a23; color: #fff; padding: 10px 18px; border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.3); font-size: .92rem; transition: opacity .4s, transform .4s; }
.toast--error { background: var(--danger); }
.toast--warn { background: var(--warn); }
.toast.hide { opacity: 0; transform: translateY(10px); }

/* footer */
.site-footer { background: var(--surface); border-top: 1px solid var(--border); padding: 18px 0; margin-top: 20px; }
.footer-inner { display: flex; flex-wrap: wrap; gap: 10px 24px; align-items: center; justify-content: space-between; }
.footer-links { display: flex; flex-wrap: wrap; gap: 14px; font-size: .9rem; }
.footer-inner p { margin: 0; flex-basis: 100%; }

/* ---------- responsive ---------- */
@media (max-width: 1000px) {
  .layout--sidebar { grid-template-columns: minmax(0, 1fr); }
  .node { grid-template-columns: 46px minmax(0, 1fr) 200px; }
  .node-stats { display: none; }
}
@media (max-width: 760px) {
  .nav-toggle { display: block; }
  .site-nav { display: none; }
  .nav-open .site-nav { display: block; }
  .nav-inner { flex-direction: column; }
  .quick-search { display: none; }
  .nav-open .quick-search { display: block; position: absolute; top: 100%; left: 16px; right: 16px; max-width: none; margin: 0; }
  .logo { font-size: 1.3rem; }
  .ub-name { display: none; }
  .userbar { margin-left: auto; }
  .node { grid-template-columns: 40px minmax(0, 1fr); }
  .node-icon { width: 40px; height: 40px; line-height: 40px; font-size: 1.4rem; }
  .node-last { grid-column: 2; }
  .thread-row { grid-template-columns: 36px minmax(0, 1fr); }
  .thread-row .avatar-m { width: 36px; height: 36px; font-size: 16px; }
  .thread-stats, .thread-last-avatar { display: none; }
  .thread-last { grid-column: 2; text-align: left; display: flex; gap: 6px; }
  .message { grid-template-columns: 1fr; }
  .message-user { display: flex; align-items: center; gap: 10px; text-align: left; border-right: 0; border-bottom: 1px solid var(--border); border-radius: var(--radius) var(--radius) 0 0; padding: 8px 12px; flex-wrap: wrap; }
  .message-user .avatar-l { width: 40px; height: 40px; font-size: 18px; margin: 0; }
  .message-user .pairs--compact, .online-badge { display: none; }
  .message-user .role-banner { margin: 0; }
  .message-main { padding: 10px 12px; }
  .grid-2 { grid-template-columns: 1fr; }
  .account-layout { flex-direction: column; }
  .side-nav { width: 100%; position: static; display: flex; overflow-x: auto; }
  .side-nav a, .side-nav button { white-space: nowrap; border-left: 0; border-bottom: 3px solid transparent; width: auto; }
  .side-nav a.active { border-bottom-color: var(--pink); }
  .poll-result { grid-template-columns: 1fr 60px; }
  .poll-bar { grid-column: 1 / -1; grid-row: 2; }
  .profile-head-body > .avatar { width: 96px; height: 96px; font-size: 42px; margin-top: -48px; }
  .find-member { margin-left: 0; width: 100%; }
  .find-member input { flex: 1; }
  .quick-reply-inner > .avatar { display: none; }
  .rating-dist { margin-left: 0; }
  .user-tip { display: none; }
  .row:not(.wrap) { flex-wrap: wrap; }
  .input-title { width: 100%; }
}

/* ---------- sub-forums ---------- */
.node-subs { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 5px; font-size: .84rem; }
.node-subs a { color: var(--muted); }
.node-subs a.unread { color: var(--link); font-weight: 700; }
.btn-sub { font-weight: 500; opacity: .9; }

/* ---------- reputation ---------- */
.rep { display: inline-block; font-weight: 800; font-size: .8rem; padding: 0 7px; border-radius: 10px; line-height: 1.6; background: var(--surface-2); color: var(--muted); }
.rep--2 { background: #dcfce7; color: #15803d; }
.rep--3 { background: #bbf7d0; color: #166534; }
.rep--4 { background: linear-gradient(90deg, #86efac, #fde68a); color: #14532d; }
.rep--5 { background: linear-gradient(90deg, #fbbf24, #f472b6); color: #fff; }
.rep--neg { background: #fee2e2; color: #b91c1c; }
.rep-post { background: #dcfce7; color: #166534; border: 0; border-radius: 10px; font: inherit; font-size: .75rem; font-weight: 700; padding: 1px 8px; cursor: pointer; }
.rep-post.neg { background: #fee2e2; color: #b91c1c; }
.rep-choice { display: flex; flex-direction: column; gap: 8px; margin: 10px 0; }
.rep-choice label { display: flex; gap: 8px; align-items: center; cursor: pointer; }
.rep-summary { display: flex; gap: 12px; align-items: center; padding-bottom: 10px; border-bottom: 1px solid var(--border); }
.rep-summary > .rep { font-size: 1.3rem; padding: 2px 14px; }

/* ---------- API integration ---------- */
#app.is-loading { opacity: .55; transition: opacity .15s; pointer-events: none; }
#app.is-loading::before { content: ""; position: fixed; top: 0; left: 0; height: 3px; width: 100%; background: linear-gradient(90deg, transparent, var(--pink), transparent); background-size: 50% 100%; background-repeat: no-repeat; animation: pp-load 1s linear infinite; z-index: 100; }
@keyframes pp-load { from { background-position: -50% 0; } to { background-position: 150% 0; } }
.hp { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.perm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 0 12px; }
.perm-grid .form-actions { grid-column: 1 / -1; }
.perm-grid .check { margin: 4px 0; font-size: .85rem; }

/* ---------- VIP ---------- */
:root { --vip: #b45309; --vip-soft: #fef3c7; --vip-grad: linear-gradient(135deg, #fbbf24, #f472b6 55%, #c026d3); }
:root[data-theme="dark"] { --vip: #fbbf24; --vip-soft: #3a2a12; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --vip: #fbbf24; --vip-soft: #3a2a12; } }
.nav-inner a.nav-vip { color: #fde68a; }
.badge--vip { background: var(--vip-soft); color: var(--vip); }
.notice--vip { border-left-color: #f59e0b; background: var(--vip-soft); }
.table-wrap { overflow-x: auto; }
.tabs--sub { border-bottom-width: 1px; font-size: .9rem; }

/* usernames & avatars */
.username--gradient { background: linear-gradient(90deg, var(--c1), var(--c2)); -webkit-background-clip: text; background-clip: text; color: transparent !important; }
.vipfx--glow { text-shadow: 0 0 6px currentColor, 0 0 12px rgba(236, 72, 153, .45); }
.username--gradient.vipfx--glow { text-shadow: none; filter: drop-shadow(0 0 4px var(--c1)); }
.vipfx--outline { -webkit-text-stroke: .6px var(--text); paint-order: stroke fill; }
.vipfx--shimmer { background-image: linear-gradient(100deg, currentColor 40%, #fff 50%, currentColor 60%); background-size: 250% 100%; background-repeat: no-repeat; -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; animation: vip-shimmer 2.8s linear infinite; }
.username--gradient.vipfx--shimmer { background-image: linear-gradient(100deg, transparent 40%, rgba(255,255,255,.8) 50%, transparent 60%), linear-gradient(90deg, var(--c1), var(--c2)); background-size: 250% 100%, 100% 100%; }
@keyframes vip-shimmer { from { background-position: 150% 0, 0 0; } to { background-position: -150% 0, 0 0; } }
.vipfx--sparkle::after { content: " ✨"; font-size: .8em; }
@media (prefers-reduced-motion: reduce) { .vipfx--shimmer { animation: none; } }
/* Owner: black circle, white check; the light ring keeps it visible on dark themes. */
.owner-badge { display: inline-flex; align-items: center; justify-content: center; width: 1.05em; height: 1.05em; margin-left: 3px; border-radius: 50%; background: #000; color: #fff; font-size: .7em; font-weight: 800; vertical-align: .1em; box-shadow: 0 0 0 1px rgba(255,255,255,.35); }
/* Staff badges: glowing purple (moderator) and glowing gold (global admin). */
.staff-badge { display: inline-flex; align-items: center; justify-content: center; width: 1.05em; height: 1.05em; margin-left: 3px; border-radius: 50%; color: #fff; font-size: .7em; font-weight: 800; vertical-align: .1em; }
.staff-badge--mod { background: #7c3aed; box-shadow: 0 0 5px 1px rgba(168, 85, 247, .85); animation: glow-mod 2.2s ease-in-out infinite alternate; }
.staff-badge--gadmin { background: linear-gradient(135deg, #fde68a, #f59e0b 55%, #b45309); color: #422006; box-shadow: 0 0 5px 1px rgba(245, 158, 11, .9); animation: glow-gold 2.2s ease-in-out infinite alternate; }
@keyframes glow-mod { to { box-shadow: 0 0 10px 3px rgba(168, 85, 247, .95); } }
@keyframes glow-gold { to { box-shadow: 0 0 10px 3px rgba(251, 191, 36, 1); } }
.staff-tag { display: inline-block; margin-left: 4px; padding: 0 6px; border-radius: 4px; font-size: .62rem; font-weight: 800; letter-spacing: .3px; text-transform: uppercase; line-height: 1.6; vertical-align: .15em; background: linear-gradient(90deg, #f59e0b, #fde68a); color: #422006; box-shadow: 0 0 6px rgba(245, 158, 11, .55); white-space: nowrap; }
.online-names .staff-tag { display: none; }

/* Owner-only special username colours and effects. */
.username--special { background-image: var(--sp); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent !important; -webkit-text-fill-color: transparent; font-weight: 700; }
.sp--rainbow { --sp: linear-gradient(90deg, #ff004c, #ff8a00, #ffe600, #2bd900, #00c8ff, #7a00ff, #ff004c); --glow: #ff4fa3; }
.sp--galaxy { --sp: linear-gradient(90deg, #7c3aed, #3b82f6, #ec4899, #7c3aed); --glow: #8b5cf6; }
.sp--inferno { --sp: linear-gradient(90deg, #dc2626, #f97316, #facc15, #dc2626); --glow: #f97316; }
.sp--frost { --sp: linear-gradient(90deg, #0ea5e9, #bae6fd, #818cf8, #0ea5e9); --glow: #38bdf8; }
.sp--royal { --sp: linear-gradient(90deg, #b45309, #fde68a, #f59e0b, #b45309); --glow: #f59e0b; }
.sp--toxic { --sp: linear-gradient(90deg, #16a34a, #bef264, #22c55e, #16a34a); --glow: #84cc16; }
.sp--sakura { --sp: linear-gradient(90deg, #ec4899, #fbcfe8, #d946ef, #ec4899); --glow: #f472b6; }
.sp--midnight { --sp: linear-gradient(90deg, #4338ca, #c7d2fe, #7c3aed, #4338ca); --glow: #6366f1; }
.sp--ocean { --sp: linear-gradient(90deg, #0369a1, #22d3ee, #0ea5e9, #0369a1); --glow: #06b6d4; }
.sp--sunset { --sp: linear-gradient(90deg, #f43f5e, #fb923c, #fde047, #f43f5e); --glow: #fb7185; }
.sp--emerald { --sp: linear-gradient(90deg, #047857, #34d399, #10b981, #047857); --glow: #10b981; }
.sp--crimson { --sp: linear-gradient(90deg, #991b1b, #f43f5e, #dc2626, #991b1b); --glow: #e11d48; }
.sp--lavender { --sp: linear-gradient(90deg, #8b5cf6, #ddd6fe, #a78bfa, #8b5cf6); --glow: #a78bfa; }
.sp--candy { --sp: linear-gradient(90deg, #f472b6, #93c5fd, #fde68a, #f472b6); --glow: #f9a8d4; }
.sp--aurora { --sp: linear-gradient(90deg, #22c55e, #06b6d4, #8b5cf6, #ec4899, #22c55e); --glow: #2dd4bf; }
.sp--chrome { --sp: linear-gradient(90deg, #64748b, #f8fafc, #94a3b8, #e2e8f0, #64748b); --glow: #cbd5e1; }
.sp--peach { --sp: linear-gradient(90deg, #fb923c, #fecdd3, #fdba74, #fb923c); --glow: #fdba74; }
.sp--cyber { --sp: linear-gradient(90deg, #00f0ff, #ff00e5, #00f0ff); --glow: #00f0ff; }
.sp--lava { --sp: linear-gradient(90deg, #7f1d1d, #ef4444, #f59e0b, #7f1d1d); --glow: #ef4444; }
.sp--mint { --sp: linear-gradient(90deg, #14b8a6, #a7f3d0, #5eead4, #14b8a6); --glow: #5eead4; }
.sp--blush { --sp: linear-gradient(90deg, #db2777, #fbcfe8, #f9a8d4, #db2777); --glow: #f472b6; }
.sp--storm { --sp: linear-gradient(90deg, #334155, #a5b4fc, #60a5fa, #334155); --glow: #818cf8; }
.sp--gold { --sp: linear-gradient(90deg, #a16207, #fef08a, #eab308, #fffbeb, #a16207); --glow: #facc15; }
.sp--nebula { --sp: linear-gradient(90deg, #6d28d9, #db2777, #2563eb, #6d28d9); --glow: #c026d3; }
.spfx--flow { animation: sp-flow 3s linear infinite; }
.spfx--glitch { animation: sp-flow 3s linear infinite, sp-glitch 1.6s steps(2, end) infinite; }
@keyframes sp-glitch { 0%, 88%, 100% { filter: none; transform: none; } 90% { filter: drop-shadow(2px 0 #ff00e5) drop-shadow(-2px 0 #00f0ff); transform: translateX(1px); } 94% { filter: drop-shadow(-2px 0 #ff00e5) drop-shadow(2px 0 #00f0ff); transform: translateX(-1px); } }
.spfx--float { display: inline-block; animation: sp-flow 3s linear infinite, sp-float 2.4s ease-in-out infinite; }
@keyframes sp-float { 50% { transform: translateY(-2px); } }
.spfx--flicker { animation: sp-flicker 2.5s linear infinite; }
@keyframes sp-flicker { 0%, 100% { opacity: 1; } 42% { opacity: 1; } 44% { opacity: .45; } 46% { opacity: 1; } 70% { opacity: .8; } 72% { opacity: 1; } }
.spfx--prism { animation: sp-prism 4s linear infinite; }
@keyframes sp-prism { to { filter: hue-rotate(360deg); } }
.spfx--shadow { filter: drop-shadow(1px 1px 0 rgba(0,0,0,.55)) drop-shadow(2px 2px 0 var(--glow)); }
.spfx--outline { filter: drop-shadow(0 0 1px var(--glow)) drop-shadow(0 0 1px var(--glow)) drop-shadow(0 0 3px var(--glow)); }
.spfx--glow { filter: drop-shadow(0 0 4px var(--glow)); }
.spfx--wave { display: inline-block; animation: sp-flow 3s linear infinite, sp-wave 2.2s ease-in-out infinite; }
@keyframes sp-wave { 25% { transform: rotate(-2deg); } 75% { transform: rotate(2deg); } }
.spfx--hearts::after, .spfx--stars::after, .spfx--fire::after { font-size: .8em; -webkit-text-fill-color: initial; color: initial; display: inline-block; margin-left: 2px; }
.spfx--hearts::after { content: "💖"; animation: sp-twinkle 1.2s ease-in-out infinite alternate; }
.spfx--stars::after { content: "⭐"; animation: sp-twinkle 1.6s ease-in-out infinite alternate; }
.spfx--fire::after { content: "🔥"; animation: sp-twinkle .7s ease-in-out infinite alternate; }
.spfx--crown::before { content: "👑"; font-size: .8em; margin-right: 2px; -webkit-text-fill-color: initial; color: initial; display: inline-block; }
@keyframes sp-flow { from { background-position: 0% 0; } to { background-position: 200% 0; } }
.spfx--pulse { animation: sp-pulse 1.8s ease-in-out infinite alternate; }
@keyframes sp-pulse { from { filter: drop-shadow(0 0 1px var(--glow)); } to { filter: drop-shadow(0 0 7px var(--glow)); } }
.spfx--neon { filter: drop-shadow(0 0 2px #fff) drop-shadow(0 0 6px var(--glow)); }
.spfx--sparkle::after { content: " ✨"; font-size: .8em; -webkit-text-fill-color: initial; color: initial; display: inline-block; animation: sp-twinkle 1.4s ease-in-out infinite alternate; }
@keyframes sp-twinkle { from { opacity: .35; transform: scale(.85); } to { opacity: 1; transform: scale(1.1); } }
/* Post-count name colours. */
.username--tier { color: hsl(var(--th) 72% 40%); }
:root[data-theme="dark"] .username--tier { color: hsl(var(--th) 85% 70%); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .username--tier { color: hsl(var(--th) 85% 70%); } }
.username--tier-max { background-image: linear-gradient(90deg, #ff2d8f, #ffb3dd, #f472b6, #ff2d8f); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent !important; -webkit-text-fill-color: transparent; font-weight: 700; animation: sp-flow 3s linear infinite, tier-glow 1.8s ease-in-out infinite alternate; }
@keyframes tier-glow { from { filter: drop-shadow(0 0 1px #ff4fa3); } to { filter: drop-shadow(0 0 6px #ff4fa3); } }
@media (prefers-reduced-motion: reduce) { .username--tier-max { animation: none; filter: drop-shadow(0 0 3px #ff4fa3); } }
.tier-table td { padding: 4px 10px; }
.owner-swatches { display: flex; flex-wrap: wrap; gap: 6px 10px; }
@media (prefers-reduced-motion: reduce) { .spfx--flow, .spfx--pulse, .spfx--sparkle::after, .spfx--glitch, .spfx--float, .spfx--flicker, .spfx--prism, .spfx--wave, .spfx--hearts::after, .spfx--stars::after, .spfx--fire::after, .staff-badge--mod, .staff-badge--gadmin { animation: none; } }
.vip-verified { display: inline-flex; align-items: center; justify-content: center; width: 1.05em; height: 1.05em; margin-left: 3px; border-radius: 50%; background: var(--vip-grad); color: #fff; font-size: .7em; font-weight: 800; vertical-align: .1em; }
.avatar.avatar--frame { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--frame); }
.avatar-l.avatar--frame, .avatar-xl.avatar--frame { box-shadow: 0 0 0 3px var(--surface), 0 0 0 6px var(--frame); }
.vip-chip { display: inline-block; margin: 4px 0; padding: 2px 10px; border-radius: 12px; background: var(--vip-grad); color: #fff; font-size: .75rem; font-weight: 700; }
.react-picker .react-vip { border-left: 1px solid var(--border); }

/* pricing */
.vip-section { margin-bottom: 22px; }
.vip-section-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin: 0 0 10px; }
.vip-section-head h2 { margin: 0; font-size: 1.3rem; }
/* Flex so an odd card out is centered at the same width instead of stretched or left alone. */
.vip-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; }
.vip-grid .block { margin-bottom: 0; }
.vip-card { display: flex; flex-direction: column; flex: 1 1 280px; max-width: 400px; border-top: 4px solid var(--pink); position: relative; }
.vip-card > .block-body { display: flex; flex-direction: column; flex: 1; }
.vip-card .vip-actions { margin-top: auto; padding-top: 12px; }
.vip-card--featured { border: 2px solid #f59e0b; border-top-width: 4px; box-shadow: 0 6px 24px rgba(245, 158, 11, .25); }
.vip-featured-tag { background: var(--vip-grad); color: #fff; font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .5px; padding: 4px 12px; text-align: center; }
.vip-methods-line { border-top: 0; justify-content: flex-start; gap: 6px 12px; margin-bottom: 8px; }
.vip-card--lifetime { border-top-color: #f59e0b; }
.vip-card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 14px 0; }
.vip-card-head h2 { margin: 0; font-size: 1.15rem; }
.vip-ribbon { font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .5px; padding: 2px 8px; border-radius: 10px; background: var(--vip-grad); color: #fff; white-space: nowrap; }
.vip-ribbon--month { background: var(--pink-soft); color: var(--pink-strong); }
.vip-price { font-size: 1.9rem; font-weight: 800; line-height: 1.1; margin-top: 4px; }
.vip-price small { font-size: .9rem; font-weight: 600; color: var(--muted); }
.vip-note { margin: 8px 0; padding: 6px 10px; border-radius: 8px; background: var(--vip-soft); color: var(--vip); font-weight: 700; font-size: .85rem; }
.vip-benefits { list-style: none; padding: 0; margin: 10px 0; font-size: .9rem; }
.vip-benefits li { padding: 3px 0 3px 22px; position: relative; }
.vip-benefits li::before { content: "✓"; position: absolute; left: 2px; color: var(--ok); font-weight: 800; }
.vip-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 10px; padding: 6px 0; border-top: 1px solid var(--border); }
.vip-methods { display: flex; flex-wrap: wrap; gap: 4px; }
.vip-method { font-size: .75rem; padding: 1px 8px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--border); white-space: nowrap; }
.vip-method--off { opacity: .5; text-decoration: line-through; }
.vip-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.vip-section .vip-grid { padding-top: 6px; }
.vip-actions .btn { flex: 1 1 auto; justify-content: center; }
.vip-actions .btn[aria-disabled] { cursor: default; opacity: .8; }
.vip-swatch { display: inline-block; flex-shrink: 0; width: 16px; height: 16px; border-radius: 50%; margin: 0 2px; vertical-align: middle; border: 2px solid var(--surface); box-shadow: 0 0 0 1px var(--border-strong); }
.vip-status-panel { border-left: 4px solid #f59e0b; }
.vip-status { display: inline-block; font-size: .75rem; font-weight: 700; padding: 1px 8px; border-radius: 10px; background: var(--surface-2); color: var(--muted); }
.vip-status--paid, .vip-status--active { background: #dcfce7; color: #166534; }
.vip-status--pending { background: #fef3c7; color: #92400e; }
.vip-status--failed, .vip-status--refunded { background: #fee2e2; color: #b91c1c; }

/* checkout */
.vip-fieldset { border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 14px; margin: 0 0 14px; }
.vip-fieldset legend { font-weight: 700; padding: 0 6px; }
.vip-choices { display: flex; flex-wrap: wrap; gap: 6px 10px; }
.vip-choices--methods { flex-direction: column; }
.vip-choice { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border: 1px solid var(--border); border-radius: 8px; cursor: pointer; background: var(--surface); }
.vip-choice:has(input:checked) { border-color: var(--pink); background: var(--pink-softer); }
.vip-choice:has(input:disabled) { opacity: .55; cursor: not-allowed; }
.vip-preview { margin-top: 10px; }
.vip-review { border: 2px solid var(--pink); border-radius: var(--radius); padding: 10px 14px; margin-bottom: 12px; background: var(--pink-softer); }
.vip-review h3 { margin: 0 0 6px; }
.vip-total { border-top: 1px solid var(--border); margin-top: 4px; padding-top: 6px !important; font-size: 1.15rem; }
.vip-result { text-align: center; }
.vip-result .pairs { max-width: 420px; margin: 10px auto; }
.vip-result .form-actions { justify-content: center; }
.vip-confirm { font-size: 3rem; }
.vip-counts { margin: 0 0 12px; }
.vip-admin-product .row > .field { flex: 1 1 160px; }
@media (max-width: 760px) {
  .vip-card { max-width: none; }
  .vip-price { font-size: 1.6rem; }
  .vip-choices--methods .vip-choice, .vip-choice { width: 100%; }
}

/* ---------- NSFW content warning ---------- */
.nsfw-tag { display: inline-block; font-size: .68rem; font-weight: 800; letter-spacing: .5px; padding: 1px 6px; border-radius: 4px; background: #dc2626; color: #fff; vertical-align: .12em; line-height: 1.4; }
.notice--nsfw { border-left-color: #dc2626; }
.nsfw-choice { border: 1px dashed var(--border-strong); border-radius: 8px; padding: 6px 12px; margin: 10px 0; }
