/* ============================================================
   PhantomWorld — dark theme (near-black + orange), square corners
   ============================================================ */
:root {
  --bg:        #0c0c0d;
  --bg-2:      #000000;
  --panel:     #111113;
  --panel-2:   #17171a;
  --panel-3:   #202023;
  --border:    #242427;
  --border-2:  #2f2f33;

  --text:      #e8e8ec;
  --muted:     #8a8a91;
  --muted-2:   #56565c;

  --accent:    #ef9f12;   /* orange — logo, primary buttons */
  --accent-2:  #ffb12e;
  --accent-3:  #f5b340;
  --on-accent: #ffffff;
  --link:      #5e93d6;   /* member usernames / links */
  --red:       #e25c5c;   /* staff usernames */
  --green:     #5aab5a;
  --gold:      #efa417;

  --shadow:    0 14px 34px -22px rgba(0,0,0,.85);
  --maxw:      1180px;
  --font: system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; border-radius: 0 !important; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font); color: var(--text); background: var(--bg); line-height: 1.55; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.ic { width: 1.15em; height: 1.15em; fill: none; stroke: currentColor; flex: none; }
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); }
.small { font-size: .82rem; }
.link { color: var(--link); }
.link:hover { text-decoration: underline; }
.uname-link { color: var(--link); font-weight: 500; }
.uname-link.is-staff { color: var(--red); }
.uname-link:hover { text-decoration: underline; }

/* ---------- buttons / forms ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5em; padding: .62em 1.1em; font: inherit; font-weight: 600; font-size: .92rem; border: 1px solid var(--border-2); cursor: pointer; background: var(--panel-2); color: var(--text); transition: transform .12s, background .2s, border-color .2s, opacity .2s; white-space: nowrap; }
.btn:hover { transform: translateY(-1px); }
.btn:disabled { opacity: .55; cursor: default; transform: none; }
.btn-primary { background: var(--accent); border-color: transparent; color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-2); }
.btn-ghost { background: transparent; }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent-3); }
.btn-block { width: 100%; }
.btn-sm { padding: .45em .8em; font-size: .85rem; }
label.field-label { display: block; font-size: .8rem; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
.input, input.input, textarea.input { width: 100%; padding: 11px 13px; font: inherit; background: #0a0a0b; border: 1px solid var(--border-2); color: var(--text); outline: 0; transition: border-color .18s, box-shadow .18s; }
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(239,159,18,.16); }
.input::placeholder { color: var(--muted-2); }
textarea.input { resize: vertical; min-height: 110px; line-height: 1.5; }

/* ---------- header (two tiers) ---------- */
.site-header { position: sticky; top: 0; z-index: 50; }
.topbar { background: var(--bg-2); border-bottom: 1px solid var(--border); }
.topbar-inner { display: flex; align-items: center; gap: 20px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.4rem; letter-spacing: -.01em; color: var(--accent); }
.brand:hover { color: var(--accent-2); }
.brand-word { line-height: 1; }
.brand-emblem { display: inline-grid; place-items: center; width: 38px; height: 38px; flex: none; }
.brand-emblem svg { width: 38px; height: 38px; }
.brand-emblem img { width: auto; height: 38px; max-width: 100%; object-fit: contain; display: block; }
.brand-emblem.sm { width: 30px; height: 30px; }
.brand-emblem.sm svg { width: 30px; height: 30px; }
.brand-emblem.sm img { height: 30px; }
@media (max-width: 720px) { .brand-word { display: none; } }
.topbar-right { display: flex; align-items: center; gap: 14px; margin-left: auto; }
.search-field { display: flex; align-items: center; gap: 8px; background: #161617; border: 1px solid var(--border-2); padding: 0 12px; color: var(--muted); width: 260px; }
.search-field input { flex: 1; background: none; border: 0; outline: 0; color: var(--text); font: inherit; padding: 9px 0; font-size: .9rem; }
.search-field .ic { width: 16px; height: 16px; }
.login-link { color: var(--accent); font-weight: 600; font-size: .92rem; }
.login-link:hover { color: var(--accent-2); }
.auth-actions { display: flex; align-items: center; gap: 16px; }

.navbar { background: #141416; border-bottom: 1px solid var(--border); }
.navbar-inner { display: flex; align-items: center; gap: 4px; height: 50px; }
.nav-link { padding: .5em .95em; color: var(--muted); font-weight: 600; font-size: .92rem; transition: color .2s, background .2s; }
.nav-link:hover { color: var(--text); }
.nav-link.is-active { color: var(--text); background: var(--bg); box-shadow: inset 0 -2px 0 var(--accent); }

/* user menu */
.user-menu { position: relative; }
.user-chip { display: flex; align-items: center; gap: 9px; padding: 4px 10px 4px 4px; background: #161617; border: 1px solid var(--border-2); color: var(--text); cursor: pointer; font: inherit; }
.user-chip:hover { border-color: var(--accent); }
.user-chip .uname { font-weight: 600; font-size: .9rem; }
.dropdown { position: absolute; right: 0; top: calc(100% + 8px); min-width: 190px; background: var(--panel); border: 1px solid var(--border-2); box-shadow: var(--shadow); padding: 6px; z-index: 60; }
.dropdown a, .dropdown button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 11px; background: none; border: 0; color: var(--text); font: inherit; font-size: .9rem; text-align: left; cursor: pointer; }
.dropdown a:hover, .dropdown button:hover { background: var(--panel-2); }
.dropdown .ic { width: 17px; height: 17px; color: var(--muted); }
.dropdown button { color: var(--red); }

.burger { display: none; flex-direction: column; gap: 4px; background: none; border: 0; cursor: pointer; padding: 8px; }
.burger span { width: 22px; height: 2px; background: var(--text); transition: .25s; }
.burger.open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.burger.open span:nth-child(2) { opacity: 0; }
.burger.open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ---------- hero ---------- */
.hero { padding: 40px 0 22px; }
.hero-inner { display: flex; align-items: center; justify-content: space-between; gap: 40px; flex-wrap: wrap; }
.hero-copy { max-width: 600px; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: .8rem; font-weight: 600; color: var(--green); background: rgba(90,171,90,.08); border: 1px solid rgba(90,171,90,.22); padding: 5px 12px; margin-bottom: 16px; }
.pulse { width: 8px; height: 8px; background: var(--green); box-shadow: 0 0 0 0 rgba(90,171,90,.6); animation: pulse 2.2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(90,171,90,.5); } 70% { box-shadow: 0 0 0 9px rgba(90,171,90,0); } 100% { box-shadow: 0 0 0 0 rgba(90,171,90,0); } }
.hero h1 { font-size: clamp(1.9rem, 4vw, 2.8rem); line-height: 1.12; margin: 0 0 14px; letter-spacing: -.03em; font-weight: 800; }
.grad { color: var(--accent); }
.hero p { color: var(--muted); font-size: 1.03rem; margin: 0 0 24px; }
.hero-ip { display: flex; align-items: stretch; gap: 12px; flex-wrap: wrap; }
.ip-box { display: flex; flex-direction: column; justify-content: center; background: var(--panel); border: 1px solid var(--border); padding: 8px 16px; min-width: 220px; }
.ip-label { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted-2); }
.ip-box code { font-size: 1.1rem; font-weight: 700; color: var(--accent-3); }
.hero-stats { display: flex; gap: 14px; flex-wrap: wrap; }
.hstat { background: var(--panel); border: 1px solid var(--border); padding: 16px 22px; text-align: center; min-width: 112px; }
.hstat b { display: block; font-size: 1.5rem; font-weight: 800; }
.hstat span { font-size: .8rem; color: var(--muted); }

/* ---------- generic layout ---------- */
.layout { display: grid; grid-template-columns: 1fr 320px; gap: 26px; align-items: start; padding-top: 14px; padding-bottom: 60px; }
.page { padding: 24px 0 60px; }
.crumbs { font-size: .86rem; color: var(--muted); margin-bottom: 14px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.crumbs a:hover { color: var(--text); }
.crumbs span { color: var(--muted-2); }
.crumbs strong { color: var(--text); font-weight: 600; }
.page-title { font-size: 2rem; font-weight: 800; letter-spacing: -.02em; color: #cfcfd4; margin: 0 0 20px; }
.page-head { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.page-head .ic { width: 22px; height: 22px; color: var(--accent); }
.page-head h1 { margin: 0; font-size: 1.5rem; font-weight: 800; letter-spacing: -.02em; }
.page-head .sub { color: var(--muted); font-size: .9rem; margin: 2px 0 0; }
.spacer { flex: 1; }

/* ---------- forum categories (home) ---------- */
.forum-list { display: flex; flex-direction: column; gap: 20px; }
.category { background: var(--panel); border: 1px solid var(--border); overflow: hidden; box-shadow: var(--shadow); }
.category-head { display: flex; align-items: center; gap: 12px; padding: 15px 20px; background: linear-gradient(180deg, var(--panel-3), var(--panel-2)); border-bottom: 1px solid var(--border); }
.category-head .cat-bar { width: 4px; height: 18px; background: var(--accent); }
.category-head h2 { font-size: 1.02rem; font-weight: 800; margin: 0; letter-spacing: -.01em; }
.category-head .cat-count { margin-left: auto; font-size: .76rem; color: var(--muted-2); background: var(--bg-2); border: 1px solid var(--border); padding: 3px 10px; }
.forum-rows { display: flex; flex-direction: column; }
.forum-row { display: grid; grid-template-columns: 54px 1fr 110px 1.45fr; align-items: center; gap: 18px; padding: 17px 20px; border-bottom: 1px solid var(--border); position: relative; transition: background .16s; }
.forum-row::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--accent); opacity: 0; transition: opacity .16s; }
.forum-row:last-child { border-bottom: 0; }
.forum-row:hover { background: var(--panel-2); }
.forum-row:hover::before { opacity: 1; }
.forum-icon { width: 54px; height: 54px; display: grid; place-items: center; color: var(--accent); background: rgba(239,159,18,.08); border: 1px solid var(--border-2); transition: background .16s, border-color .16s; }
.forum-row:hover .forum-icon { background: rgba(239,159,18,.16); border-color: rgba(239,159,18,.45); }
.forum-icon .ic { width: 26px; height: 26px; }
.forum-main h3 { margin: 0 0 4px; font-size: 1.08rem; font-weight: 600; }
.forum-main h3 a:hover { color: var(--accent-3); }
.forum-main p { margin: 0; font-size: .86rem; color: var(--muted); line-height: 1.45; }
.forum-stat { text-align: center; }
.forum-stat b { display: block; color: var(--text); font-size: 1.35rem; font-weight: 800; line-height: 1.1; }
.forum-stat span { font-size: .74rem; color: var(--muted-2); }
.last-post { display: flex; align-items: center; gap: 11px; min-width: 0; }
.last-post.empty { color: var(--muted-2); font-size: .85rem; }
.lp-body { min-width: 0; }
.lp-title { font-size: .87rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.lp-title:hover { color: var(--accent-3); }
.lp-meta { font-size: .76rem; color: var(--muted); }

/* avatars */
.ava { display: inline-grid; place-items: center; font-weight: 700; color: #fff; object-fit: cover; border: 1px solid rgba(255,255,255,.07); overflow: hidden; vertical-align: middle; }

/* ---------- topic list (forum page) ---------- */
.topic-list { background: var(--panel); border: 1px solid var(--border); box-shadow: var(--shadow); }
.tl-head, .topic-row { display: grid; grid-template-columns: 1fr 90px 150px; gap: 14px; align-items: center; }
.tl-head { padding: 12px 20px; background: var(--panel-3); border-bottom: 1px solid var(--border); font-size: .76rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted-2); }
.topic-row { padding: 14px 20px; border-bottom: 1px solid var(--border); transition: background .16s; }
.topic-row:last-child { border-bottom: 0; }
.topic-row:hover { background: var(--panel-2); }
.topic-main { display: flex; align-items: center; gap: 12px; min-width: 0; }
.topic-main .meta { min-width: 0; }
.topic-main .t-title { font-weight: 600; font-size: .98rem; display: block; }
.topic-main .t-title:hover { color: var(--accent-3); }
.topic-main .t-sub { font-size: .77rem; color: var(--muted); }
.t-num { text-align: center; font-size: .82rem; color: var(--muted); }
.t-num b { color: var(--text); }
.t-last { font-size: .78rem; color: var(--muted); }
.empty-box { padding: 46px 24px; text-align: center; color: var(--muted); }
.empty-box .ic { width: 40px; height: 40px; color: var(--muted-2); margin: 0 auto 12px; }

/* ---------- topic page (posts) ---------- */
.posts { display: flex; flex-direction: column; gap: 16px; }
.post { display: grid; grid-template-columns: 168px 1fr; background: var(--panel); border: 1px solid var(--border); box-shadow: var(--shadow); overflow: hidden; }
.post-author { padding: 18px; border-right: 1px solid var(--border); background: var(--panel-2); text-align: center; }
.post-author .ava { margin: 0 auto 10px; }
.post-author .pa-nick { font-weight: 700; font-size: .95rem; }
.post-author .pa-posts { font-size: .76rem; color: var(--muted); margin-top: 6px; }
.post-body { padding: 16px 20px; min-width: 0; }
.post-meta { display: flex; align-items: center; gap: 10px; font-size: .78rem; color: var(--muted); padding-bottom: 12px; margin-bottom: 12px; border-bottom: 1px solid var(--border); }
.post-text { white-space: pre-wrap; word-wrap: break-word; line-height: 1.65; font-size: .96rem; }
.reply-box { margin-top: 22px; background: var(--panel); border: 1px solid var(--border); padding: 18px 20px; box-shadow: var(--shadow); }
.reply-box h3 { margin: 0 0 12px; font-size: 1rem; }
.reply-cta { margin-top: 22px; background: var(--panel); border: 1px dashed var(--border-2); padding: 22px; text-align: center; color: var(--muted); }
.reply-cta a { color: var(--accent-3); font-weight: 600; }

/* ---------- role badges ---------- */
.role-badge { font-size: .68rem; font-weight: 700; padding: 2px 8px; display: inline-block; }
.role-owner { color: var(--gold); background: rgba(239,164,23,.12); border: 1px solid rgba(239,164,23,.3); }
.role-admin { color: var(--red); background: rgba(226,92,92,.12); border: 1px solid rgba(226,92,92,.3); }
.role-mod   { color: var(--link); background: rgba(94,147,214,.12); border: 1px solid rgba(94,147,214,.3); }

/* ---------- sidebar ---------- */
.sidebar { display: flex; flex-direction: column; gap: 20px; position: sticky; top: 130px; }
.card { background: var(--panel); border: 1px solid var(--border); padding: 18px; box-shadow: var(--shadow); }
.card-title { display: flex; align-items: center; gap: 9px; font-size: .92rem; font-weight: 700; margin: 0 0 14px; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.card-title .ic { color: var(--accent); width: 18px; height: 18px; }
.stat-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stat-grid li { background: var(--panel-2); border: 1px solid var(--border); padding: 11px 13px; }
.stat-grid b { display: block; font-size: 1.16rem; font-weight: 800; }
.stat-grid span { font-size: .75rem; color: var(--muted); }
.newest { margin: 14px 0 0; font-size: .85rem; color: var(--muted); }
.team-list { display: flex; flex-direction: column; gap: 11px; }
.team-row { display: flex; align-items: center; gap: 11px; }
.team-row .meta { min-width: 0; }
.team-row .meta b { font-size: .9rem; font-weight: 600; }
.team-row .meta span { display: block; font-size: .76rem; color: var(--muted); }
.team-row .role-badge { margin-left: auto; }
.promo .muted { margin: 0 0 4px; }

/* ---------- auth pages ---------- */
.auth-wrap { min-height: calc(100vh - 114px); display: grid; place-items: center; padding: 40px 20px; }
.auth-card { width: min(440px, 100%); background: var(--panel); border: 1px solid var(--border-2); box-shadow: var(--shadow); }
.auth-head { padding: 24px 26px 0; text-align: center; }
.auth-head .brand-mark { display: inline-grid; place-items: center; width: 60px; height: 60px; margin: 0 auto 10px; }
.auth-head .brand-mark svg { width: 60px; height: 60px; }
.auth-head .brand-mark img { width: auto; height: 60px; max-width: 100%; object-fit: contain; display: block; }
.auth-head h1 { margin: 0; font-size: 1.5rem; font-weight: 800; }
.auth-head p { margin: 6px 0 0; color: var(--muted); font-size: .9rem; }
.auth-card form { padding: 22px 26px 24px; display: flex; flex-direction: column; gap: 14px; }
.pw-meter { height: 5px; background: var(--panel-3); margin-top: 8px; overflow: hidden; }
.pw-meter i { display: block; height: 100%; width: 0; transition: width .25s, background .25s; }
.pw-hint { font-size: .74rem; color: var(--muted-2); margin-top: 5px; }
.form-msg { font-size: .82rem; padding: 9px 12px; display: none; }
.form-msg.err { display: block; color: #f1b4b4; background: rgba(226,92,92,.12); border: 1px solid rgba(226,92,92,.32); }
.form-msg.ok  { display: block; color: #bfe6bf; background: rgba(90,171,90,.12); border: 1px solid rgba(90,171,90,.32); }
.auth-alt { text-align: center; font-size: .88rem; color: var(--muted); border-top: 1px solid var(--border); padding-top: 16px; }
.auth-alt a { color: var(--accent-3); font-weight: 600; }

/* ---------- profile ---------- */
.profile-head { display: flex; align-items: center; gap: 22px; background: var(--panel); border: 1px solid var(--border); padding: 26px; box-shadow: var(--shadow); flex-wrap: wrap; }
.profile-head .ava { width: 96px; height: 96px; font-size: 40px; }
.profile-id h1 { margin: 0 0 4px; font-size: 1.6rem; font-weight: 800; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.profile-id .joined { color: var(--muted); font-size: .86rem; }
.profile-bio { margin-top: 10px; color: var(--text); max-width: 560px; white-space: pre-wrap; }
.profile-stats { display: flex; gap: 26px; margin-left: auto; }
.profile-stats div { text-align: center; }
.profile-stats b { display: block; font-size: 1.4rem; font-weight: 800; }
.profile-stats span { font-size: .76rem; color: var(--muted); }
.profile-section { margin-top: 26px; }
.profile-section h2 { font-size: 1.05rem; margin: 0 0 14px; }

/* ---------- settings ---------- */
.settings-grid { display: grid; grid-template-columns: 1fr; gap: 22px; max-width: 680px; }
.settings-card { background: var(--panel); border: 1px solid var(--border); padding: 22px; box-shadow: var(--shadow); }
.settings-card h2 { margin: 0 0 4px; font-size: 1.1rem; }
.settings-card .desc { color: var(--muted); font-size: .86rem; margin: 0 0 16px; }
.avatar-row { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.avatar-row .ava { width: 84px; height: 84px; font-size: 34px; }
.field { display: block; }
.field + .field { margin-top: 14px; }

/* ---------- moderators page ---------- */
.mod-group { margin-bottom: 26px; }
.group-bar { background: var(--panel-3); border: 1px solid var(--border); padding: 13px 20px; font-weight: 700; }
.mod-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; padding: 18px; background: var(--panel); border: 1px solid var(--border); border-top: 0; }
.mod-card { display: flex; align-items: center; gap: 16px; background: var(--bg-2); border: 1px solid var(--border); padding: 16px 18px; }
.mod-card .ava { width: 56px; height: 56px; font-size: 22px; }
.mod-card .mc-name { font-weight: 700; font-size: 1.05rem; }
.mod-card .mc-role { font-size: .8rem; color: var(--muted); margin-top: 2px; }

/* ---------- leaders page ---------- */
.podium { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.leader-card { background: var(--panel); border: 1px solid var(--border); padding: 22px 16px; text-align: center; position: relative; box-shadow: var(--shadow); }
.leader-card .medal { position: absolute; top: -10px; left: 50%; transform: translateX(-50%); font-size: 1.4rem; }
.leader-card .ava { width: 84px; height: 84px; font-size: 34px; margin: 6px auto 12px; }
.leader-card .lc-name { font-weight: 700; font-size: 1.05rem; }
.leader-card .lc-role { font-size: .78rem; color: var(--muted); margin: 2px 0 14px; }
.leader-card .lc-stats { display: flex; justify-content: center; gap: 22px; padding-top: 12px; border-top: 1px solid var(--border); }
.leader-card .lc-stats b { display: block; font-size: 1.1rem; font-weight: 800; }
.leader-card .lc-stats .lab { font-size: .68rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted-2); }
.leader-rest { margin-top: 22px; background: var(--panel); border: 1px solid var(--border); }
.lr-row { display: grid; grid-template-columns: 40px 1fr 80px 80px; gap: 14px; align-items: center; padding: 12px 18px; border-bottom: 1px solid var(--border); }
.lr-row:last-child { border-bottom: 0; }
.lr-rank { font-weight: 800; color: var(--muted-2); text-align: center; }
.lr-row .who { display: flex; align-items: center; gap: 10px; }
.lr-num { text-align: center; font-size: .85rem; color: var(--muted); }
.lr-num b { color: var(--text); }

/* ---------- online page ---------- */
.online-block { background: var(--panel); border: 1px solid var(--border); box-shadow: var(--shadow); margin-bottom: 22px; }
.online-block .group-bar { border: 0; border-bottom: 1px solid var(--border); }
.online-users { display: flex; flex-wrap: wrap; gap: 8px; padding: 18px; }
.online-users a { font-size: .86rem; padding: 5px 12px; background: var(--bg-2); border: 1px solid var(--border); }
.online-users a:hover { border-color: var(--accent); }
.online-users .none { color: var(--muted); padding: 18px; }
.member-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; padding: 18px; }
.member-card { display: flex; align-items: center; gap: 12px; background: var(--bg-2); border: 1px solid var(--border); padding: 12px 14px; }
.member-card .ava { width: 40px; height: 40px; }
.member-card .mm-sub { font-size: .76rem; color: var(--muted); }

/* ---------- activity page ---------- */
.feed { position: relative; padding-left: 8px; }
.feed-day { font-weight: 700; background: var(--panel-3); border: 1px solid var(--border); display: inline-block; padding: 6px 14px; font-size: .85rem; margin: 0 0 16px; }
.feed-item { display: flex; align-items: flex-start; gap: 14px; padding: 12px 0; border-left: 2px solid var(--border); padding-left: 22px; margin-left: 10px; position: relative; }
.feed-item::before { content: ""; position: absolute; left: -7px; top: 18px; width: 12px; height: 12px; background: var(--panel-3); border: 2px solid var(--border-2); }
.feed-item .ava { width: 38px; height: 38px; }
.feed-body { flex: 1; min-width: 0; }
.feed-line { font-size: .92rem; }
.feed-line .muted { color: var(--muted); }
.feed-time { font-size: .76rem; color: var(--muted-2); margin-top: 2px; }
.feed-quote { margin-top: 8px; background: var(--panel); border: 1px solid var(--border); padding: 12px 14px; font-size: .9rem; color: var(--text); }
.feed-quote a { color: var(--accent-3); font-weight: 600; }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--border); background: var(--bg-2); margin-top: 20px; }
.footer-inner { display: flex; align-items: center; gap: 26px; flex-wrap: wrap; padding: 26px 20px; }
.footer-brand { display: flex; align-items: center; gap: 12px; }
.footer-brand strong { color: var(--accent); font-size: 1.05rem; }
.footer-brand p { margin: 2px 0 0; }
.footer-nav { display: flex; gap: 18px; flex-wrap: wrap; }
.footer-nav a { color: var(--muted); font-size: .9rem; }
.footer-nav a:hover { color: var(--text); }
.copy { margin-left: auto; }

/* ---------- toast ---------- */
.toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%) translateY(20px); background: var(--panel-3); border: 1px solid var(--border-2); color: var(--text); padding: 11px 18px; box-shadow: var(--shadow); font-size: .9rem; font-weight: 600; opacity: 0; pointer-events: none; transition: .28s; z-index: 120; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- responsive ---------- */
@media (max-width: 940px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  .navbar-inner { overflow-x: auto; }
  .search-field { width: 180px; }
  .podium { grid-template-columns: 1fr 1fr; }
  .mod-grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .topbar-inner { height: 56px; }
  .search-field { display: none; }
  .forum-row { grid-template-columns: 50px 1fr; row-gap: 10px; }
  .forum-stat, .last-post { grid-column: 1 / -1; padding-left: 68px; }
  .forum-stat { display: flex; align-items: baseline; gap: 6px; text-align: left; }
  .forum-stat b { font-size: 1rem; }
  .tl-head { display: none; }
  .topic-row { grid-template-columns: 1fr; gap: 8px; }
  .post { grid-template-columns: 1fr; }
  .post-author { display: flex; align-items: center; gap: 12px; text-align: left; border-right: 0; border-bottom: 1px solid var(--border); padding: 12px 16px; }
  .post-author .ava { width: 40px; height: 40px; margin: 0; }
  .podium { grid-template-columns: 1fr; }
  .profile-stats { margin-left: 0; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
  .copy { margin-left: 0; }
}

/* ---------- extra role badges ---------- */
.role-curator { color: #46b9c4; background: rgba(70,185,196,.12); border: 1px solid rgba(70,185,196,.3); }
.role-helper  { color: #6cc06c; background: rgba(108,192,108,.12); border: 1px solid rgba(108,192,108,.3); }
.role-media   { color: #c08ce0; background: rgba(192,140,224,.12); border: 1px solid rgba(192,140,224,.3); }

/* ---------- admin / control panel ---------- */
.role-legend { display: grid; gap: 9px; }
.role-legend > div { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.admin-list { background: var(--panel); border: 1px solid var(--border); box-shadow: var(--shadow); }
.admin-head, .admin-row { display: grid; grid-template-columns: 1fr 140px 190px; gap: 14px; align-items: center; padding: 12px 18px; }
.admin-head { background: var(--panel-3); border-bottom: 1px solid var(--border); font-size: .76rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted-2); }
.admin-row { border-bottom: 1px solid var(--border); }
.admin-row:last-child { border-bottom: 0; }
.admin-row .who { display: flex; align-items: center; gap: 11px; min-width: 0; }
.admin-row .who .ava { width: 40px; height: 40px; }
.role-select { padding: 8px 10px; }
@media (max-width: 680px) { .admin-head { display: none; } .admin-row { grid-template-columns: 1fr; gap: 10px; } }

/* ---------- animations ---------- */
main { animation: pageFade .3s ease both; }
@keyframes pageFade { from { opacity: 0; } to { opacity: 1; } }
body.is-leaving { opacity: 0; transition: opacity .17s ease; }
.reveal { opacity: 0; transform: translateY(16px); }
.reveal.in { opacity: 1; transform: none; transition: opacity .5s ease var(--rd,0ms), transform .55s cubic-bezier(.2,.7,.2,1) var(--rd,0ms); }
@media (prefers-reduced-motion: reduce) {
  main { animation: none; }
  .reveal, .reveal.in { opacity: 1 !important; transform: none !important; }
  body.is-leaving { opacity: 1 !important; }
}

/* ---------- avatar with crop (GIF-safe) ---------- */
.ava-crop { position: relative; overflow: hidden; padding: 0; }
.ava-crop img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ---------- avatar cropper (settings) ---------- */
#cropArea { margin-top: 18px; border-top: 1px solid var(--border); padding-top: 18px; }
.cropper { display: flex; gap: 22px; flex-wrap: wrap; align-items: flex-start; }
.crop-frame { width: 200px; height: 200px; max-width: 70vw; position: relative; overflow: hidden; background: #000; border: 1px solid var(--border-2); cursor: grab; touch-action: none; flex: none; }
.crop-frame:active { cursor: grabbing; }
.crop-frame img { width: 100%; height: 100%; object-fit: cover; display: block; user-select: none; -webkit-user-drag: none; pointer-events: none; transform-origin: center; }
.crop-frame::after { content: ""; position: absolute; inset: 0; box-shadow: inset 0 0 0 1px rgba(255,255,255,.18); pointer-events: none; }
.crop-controls { flex: 1; min-width: 220px; }
.zoom-range { width: 100%; accent-color: var(--accent); margin-top: 6px; }
@media (max-width: 560px) { .cropper { gap: 16px; } .crop-controls { min-width: 0; } }

/* ---------- global PillNav + server IP ---------- */
.navbar-inner { position: relative; gap: 14px; height: 58px; overflow: visible; padding-right: 238px; }
.pill-nav-container { position: relative; z-index: 99; display: flex; align-items: center; min-width: 0; }
.pill-nav {
  --nav-h: 42px;
  --pill-pad-x: 18px;
  --pill-gap: 3px;
  --base: #070708;
  --pill-bg: #161618;
  --pill-text: #e7e7ec;
  --hover-text: #111113;
  --pill-accent: #ef9f12;
  display: flex;
  align-items: center;
  width: max-content;
}
.pill-nav-items { display: flex; align-items: center; height: var(--nav-h); background: transparent; }
.pill-list { display: flex; align-items: stretch; gap: 8px; height: 100%; margin: 0; padding: 0; list-style: none; }
.pill-list > li { position: relative; display: flex; height: 100%; }
.pill { position: relative; display: inline-flex; align-items: center; justify-content: center; height: 100%; padding: 0 var(--pill-pad-x); border: 0; background: #151517; color: var(--pill-text); cursor: pointer; font-size: .82rem; font-weight: 900; letter-spacing: 0; line-height: 1; overflow: hidden; white-space: nowrap; transition: color .18s, background .18s, box-shadow .18s; }
.pill.is-active { background: #151517; color: #ef9f12; box-shadow: inset 0 -2px 0 rgba(239,159,18,.86); }
.pill-list:has(.pill:hover) .pill.is-active:not(:hover),
.pill-list:has(.pill:focus-visible) .pill.is-active:not(:focus-visible) { color: var(--pill-text); box-shadow: none; }
.pill:hover, .pill.is-hovered, .pill:focus-visible { outline: 0; }
.pill .hover-circle { position: absolute; left: 50%; bottom: calc(var(--pill-circle-delta, 12px) * -1); z-index: 1; display: block; width: var(--pill-circle-size, 96px); height: var(--pill-circle-size, 96px); background: var(--pill-accent); pointer-events: none; transform: translateX(-50%) scale(0); transform-origin: 50% var(--pill-circle-origin, 84px); transition: transform .38s cubic-bezier(.22,.8,.2,1); will-change: transform; }
.pill:hover .hover-circle, .pill.is-hovered .hover-circle, .pill:focus-visible .hover-circle { transform: translateX(-50%) scale(1.18); }
.label-stack { position: relative; z-index: 2; display: inline-block; line-height: 1; }
.pill-label, .pill-label-hover { display: inline-block; line-height: 1; transition: transform .34s cubic-bezier(.22,.8,.2,1), opacity .24s ease; will-change: transform, opacity; }
.pill-label-hover { position: absolute; left: 0; top: 0; z-index: 3; color: var(--hover-text); opacity: 0; transform: translateY(var(--pill-label-in, 54px)); }
.pill:hover .pill-label, .pill.is-hovered .pill-label, .pill:focus-visible .pill-label { transform: translateY(var(--pill-label-out, -54px)); }
.pill:hover .pill-label-hover, .pill.is-hovered .pill-label-hover, .pill:focus-visible .pill-label-hover { opacity: 1; transform: translateY(0); }
.pill-section-menu { position: absolute; left: 0; top: calc(100% + 10px); z-index: 110; display: grid; gap: 5px; width: 252px; padding: 8px; border: 1px solid rgba(255,255,255,.07); background: rgba(7,7,8,.96); box-shadow: 0 24px 48px -28px rgba(0,0,0,.96); opacity: 0; visibility: hidden; filter: blur(3px); transform: translateY(10px) scale(.96); transform-origin: top left; transition: opacity .28s cubic-bezier(.22,.8,.2,1), transform .28s cubic-bezier(.22,.8,.2,1), filter .28s ease, visibility .28s; }
.pill-has-menu.is-open .pill-section-menu { opacity: 1; visibility: visible; filter: blur(0); transform: translateY(0) scale(1); }
.pill-section-menu a { display: grid; gap: 2px; padding: 10px 12px; border: 0; background: #151517; color: var(--text); font-size: .8rem; font-weight: 900; line-height: 1.15; transition: background .18s, color .18s, transform .18s; }
.pill-section-menu a:hover { background: #ef9f12; color: #111113; transform: translateX(2px); }
.pill-section-menu small { color: var(--muted); font-size: .66rem; font-weight: 700; }
.pill-section-menu a:hover small { color: rgba(17,17,19,.72); }
.desktop-only { display: block; }
.mobile-only { display: none; }
.mobile-menu-button { position: relative; display: none; flex-direction: column; align-items: center; justify-content: center; gap: 4px; width: var(--nav-h); height: var(--nav-h); padding: 0; border: 1px solid rgba(239,159,18,.32); background: var(--base); cursor: pointer; }
.hamburger-line { width: 16px; height: 2px; background: #ef9f12; transition: transform .28s cubic-bezier(.22,.8,.2,1); transform-origin: center; }
.is-mobile-open .hamburger-line:first-child { transform: translateY(3px) rotate(45deg); }
.is-mobile-open .hamburger-line:last-child { transform: translateY(-3px) rotate(-45deg); }
.mobile-menu-popover { position: absolute; left: 0; top: calc(100% + 8px); z-index: 998; width: min(340px, calc(100vw - 32px)); padding: 5px; border: 1px solid rgba(239,159,18,.28); background: #070708; box-shadow: 0 24px 54px -30px rgba(0,0,0,.95); opacity: 0; visibility: hidden; transform: translateY(10px) scaleY(.98); transform-origin: top center; transition: opacity .22s, transform .22s, visibility .22s; }
.is-mobile-open .mobile-menu-popover { opacity: 1; visibility: visible; transform: translateY(0) scaleY(1); }
.mobile-menu-list { display: flex; flex-direction: column; gap: 3px; margin: 0; padding: 0; list-style: none; }
.mobile-menu-link { display: block; padding: 12px 16px; background: #151517; color: var(--text); font-size: .9rem; font-weight: 800; transition: background .18s, color .18s; }
.mobile-menu-link.is-section { padding-left: 28px; color: var(--muted); font-size: .82rem; }
.mobile-menu-link:hover, .mobile-menu-link.is-active { background: #ef9f12; color: #111113; }
.forum-nav-ip { display: inline-flex; align-items: center; position: absolute; right: 20px; top: 50%; margin-left: 0; padding: 2px 0; border: 0; background: transparent; color: #ef9f12; cursor: pointer; font: inherit; font-size: .9rem; font-weight: 900; font-style: normal; line-height: 1; letter-spacing: 0; white-space: nowrap; transform: translateY(-50%); text-shadow: 0 0 16px rgba(239,159,18,.28); transition: color .18s, transform .12s, text-shadow .18s; }
.forum-nav-ip:hover, .forum-nav-ip:focus-visible { color: var(--accent-2); transform: translateY(calc(-50% - 1px)); text-shadow: 0 0 20px rgba(255,207,112,.45); outline: 0; }
.forum-nav-ip::after { content: ""; position: absolute; left: 0; right: 0; bottom: -5px; height: 1px; background: linear-gradient(90deg, transparent, rgba(239,159,18,.72), transparent); opacity: .55; transform: scaleX(.72); transform-origin: center; transition: opacity .18s, transform .18s; }
.forum-nav-ip:hover::after, .forum-nav-ip:focus-visible::after { opacity: 1; transform: scaleX(1); }
.forum-ip-text { display: inline-flex; align-items: center; font-style: normal; animation: ipTextGlow 2.8s ease-in-out 1.1s infinite alternate; }
.ip-blur-letter { display: inline-block; font-style: normal; animation: ipTextBlur .7s cubic-bezier(.22,.8,.2,1) both; animation-delay: var(--ip-delay); will-change: transform, filter, opacity; }
.ip-copy-note { position: fixed; z-index: 180; padding: 8px 11px; border: 1px solid rgba(239,159,18,.6); background: #ef9f12; color: #111113; box-shadow: 0 16px 34px -22px rgba(239,159,18,.9); font-size: .8rem; font-weight: 900; white-space: nowrap; pointer-events: none; transform: translate(-50%, 0); animation: ipNote .95s ease both; }
.ip-copy-note::before { content: ""; position: absolute; left: 50%; top: -5px; width: 9px; height: 9px; background: #ef9f12; border-left: 1px solid rgba(239,159,18,.6); border-top: 1px solid rgba(239,159,18,.6); transform: translateX(-50%) rotate(45deg); }
.copy-fireworks { position: fixed; inset: 0; z-index: 170; pointer-events: none; overflow: hidden; }
.copy-fireworks i { position: absolute; left: var(--x); top: var(--y); width: 4px; height: 4px; background: var(--c); box-shadow: 0 0 10px var(--c); transform: translate(-50%, -50%); animation: fireworkBurst .72s ease-out forwards; }
@keyframes fireworkBurst { 0% { opacity: 1; transform: translate(-50%, -50%) scale(.8); } 100% { opacity: 0; transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(.25); } }
@keyframes ipTextBlur { 0% { filter: blur(10px); opacity: 0; transform: translateY(-16px); } 58% { filter: blur(5px); opacity: .55; transform: translateY(4px); } 100% { filter: blur(0); opacity: 1; transform: translateY(0); } }
@keyframes ipTextGlow { from { text-shadow: 0 0 10px rgba(239,159,18,.22); } to { text-shadow: 0 0 20px rgba(255,207,112,.42); } }
@keyframes ipNote { 0% { opacity: 0; transform: translate(-50%, -4px) scale(.96); } 16% { opacity: 1; transform: translate(-50%, 0) scale(1); } 78% { opacity: 1; transform: translate(-50%, 4px) scale(1); } 100% { opacity: 0; transform: translate(-50%, 12px) scale(.98); } }
@media (max-width: 900px) {
  .navbar-inner { padding-right: 178px; }
  .pill { padding: 0 13px; font-size: .76rem; }
}
@media (max-width: 768px) {
  .navbar-inner { height: 58px; padding-right: 152px; overflow: visible; }
  .desktop-only { display: none; }
  .mobile-only { display: block; }
  .mobile-menu-button { display: flex; }
  .forum-nav-ip { right: 12px; padding: 2px 0; font-size: .74rem; }
}
