/* PyroPvP: classic server-site layout. Light grey page, white panels, uppercase headings,
   dark banner, amber from the flame logo. One light look on purpose. */
:root {
  color-scheme: light;
  --bg: #eceef0;
  --surface: #ffffff;
  --surface-2: #f5f6f7;
  --line: #dcdfe3;
  --fg: #26292d;
  --muted: #6c727a;
  --brand: #ffaa00;          /* logo amber */
  --accent: #d9480f;         /* buttons and links: readable on white */
  --accent-hover: #b93c0b;
  --dark: #1d1b1a;           /* banner and header strip */
  --win: #2f9e44;
  --loss: #e03131;
  --mc-4: #aa0000; --mc-c: #ff5555; --mc-3: #00aaaa; --mc-e: #ffff55; --mc-6: #ffaa00; --mc-7: #aaaaaa;
  --f-head: "Rubik", "Segoe UI", system-ui, sans-serif;
  --f-body: "Open Sans", "Segoe UI", system-ui, sans-serif;
  --shadow: 0 1px 2px rgba(20, 22, 26, .08);
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--fg); font-family: var(--f-body); font-size: 14.5px; line-height: 1.6; min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1; padding-bottom: 8px; }
a { color: var(--accent); }
img { max-width: 100%; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.wrap { max-width: 1140px; margin: 0 auto; width: 100%; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
h1, h2, h3 { font-family: var(--f-head); text-wrap: balance; margin: 0; font-weight: 700; }
h1 { font-size: 1.7rem; text-transform: uppercase; letter-spacing: .04em; }
h2 { font-size: 1.15rem; text-transform: uppercase; letter-spacing: .05em; }
h3 { font-size: .9rem; text-transform: uppercase; letter-spacing: .06em; }
.eyebrow { font-family: var(--f-head); font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 500; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Header */
header.nav { position: sticky; top: 0; z-index: 20; background: var(--surface); border-top: 3px solid var(--brand); box-shadow: var(--shadow); }
.nav .wrap { display: flex; align-items: center; gap: 26px; padding-block: 10px; }
.logo { font-family: var(--f-head); font-weight: 700; font-size: 1.15rem; letter-spacing: .12em; text-decoration: none; color: var(--fg); white-space: nowrap; display: inline-flex; align-items: center; gap: 8px; }
.logo img { width: 20px; height: 28px; }
.nav nav { display: flex; gap: 20px; flex-wrap: wrap; }
.nav nav a { font: 500 .78rem var(--f-head); letter-spacing: .08em; text-transform: uppercase; color: #4a4f55; text-decoration: none; padding: 4px 0; border-bottom: 2px solid transparent; }
.nav nav a:hover { color: var(--fg); }
.nav nav a[aria-current="page"] { color: var(--fg); border-color: var(--brand); }
.nav-right { margin-left: auto; display: flex; gap: 14px; align-items: center; }
.nav-right .text-link { font-size: .88rem; text-decoration: none; }
.menu-btn { display: none; background: none; border: 1px solid var(--line); color: var(--fg); border-radius: 3px; padding: 5px 10px; font: 500 .78rem var(--f-head); letter-spacing: .06em; text-transform: uppercase; cursor: pointer; }
.user-menu { position: relative; }
.user-menu > button { display: flex; align-items: center; gap: 8px; background: none; border: 1px solid var(--line); color: var(--fg); border-radius: 3px; padding: 3px 10px 3px 3px; cursor: pointer; font: 600 .85rem var(--f-body); }
.user-menu .drop { position: absolute; right: 0; top: calc(100% + 4px); background: var(--surface); border: 1px solid var(--line); border-radius: 3px; min-width: 180px; padding: 4px 0; display: grid; z-index: 30; box-shadow: 0 4px 12px rgba(0,0,0,.1); }
.user-menu .drop a, .user-menu .drop button { text-align: left; background: none; border: 0; color: var(--fg); padding: 8px 14px; font: 400 .88rem var(--f-body); cursor: pointer; text-decoration: none; }
.user-menu .drop a:hover, .user-menu .drop button:hover { background: var(--surface-2); }

/* Buttons and inputs */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; font: 600 .75rem var(--f-head); letter-spacing: .08em; text-transform: uppercase; border-radius: 3px; padding: 10px 16px; cursor: pointer; text-decoration: none; border: 1px solid transparent; white-space: nowrap; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-ghost { background: var(--surface); color: var(--fg); border-color: var(--line); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-outline { color: var(--accent); border-color: var(--accent); background: transparent; }
.btn-outline:hover { background: var(--accent); color: #fff; }
.btn-danger { background: var(--surface); color: var(--loss); border-color: var(--line); }
.btn-danger:hover { border-color: var(--loss); }
.btn-sm { padding: 6px 10px; font-size: .7rem; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
label.field { display: grid; gap: 5px; font-size: .85rem; font-weight: 600; }
label.field .hint { font-weight: 400; }
input[type="text"], input[type="password"], input[type="search"], select, textarea {
  font: 400 .92rem var(--f-body); background: var(--surface); color: var(--fg); border: 1px solid #c9cdd2; border-radius: 3px; padding: 9px 11px; width: 100%; min-width: 0;
}
textarea { resize: vertical; min-height: 130px; line-height: 1.55; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 15%, transparent); }
.form { display: grid; gap: 14px; }
.form-error { color: var(--loss); font-size: .86rem; min-height: 1.2em; }
.hint { font-size: .8rem; color: var(--muted); }

/* Page heading */
.page-head { padding-block: 26px 18px; }
.page-head p { color: var(--muted); margin: 6px 0 0; max-width: 64ch; }
.page-head .row { display: flex; justify-content: space-between; align-items: end; gap: 16px; flex-wrap: wrap; }
.crumbs { font-size: .8rem; color: var(--muted); display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.crumbs a { text-decoration: none; }

/* Panels: white box, title bar */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 3px; min-width: 0; box-shadow: var(--shadow); }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 16px; border-bottom: 1px solid var(--line); flex-wrap: wrap; background: var(--surface-2); }
.panel-head a { font-size: .8rem; text-decoration: none; }
.panel-body { padding: 16px; }
.chips { display: flex; gap: 0; flex-wrap: wrap; border: 1px solid var(--line); border-radius: 3px; overflow: hidden; }
.chip { font: 500 .72rem var(--f-head); letter-spacing: .06em; text-transform: uppercase; border: 0; border-right: 1px solid var(--line); background: var(--surface); color: var(--muted); padding: 6px 12px; cursor: pointer; text-decoration: none; }
.chip:last-child { border-right: 0; }
.chip[aria-pressed="true"] { background: var(--fg); color: #fff; }
.empty, .loading { color: var(--muted); padding: 26px 8px; text-align: center; font-size: .9rem; list-style: none; }

/* Rank pills (Minecraft legacy colours from the Rank enum) */
.rank { font: 700 .62rem var(--f-head); letter-spacing: .08em; text-transform: uppercase; padding: 2px 6px; border-radius: 2px; color: #1b1b1b; white-space: nowrap; display: inline-block; vertical-align: middle; line-height: 1.5; }
.rank.owner { background: var(--mc-4); color: #fff; }
.rank.admin { background: var(--mc-c); color: #fff; }
.rank.mod { background: var(--mc-3); color: #fff; }
.rank.helper { background: var(--mc-e); }
.rank.donator { background: var(--mc-6); }
.rank.member { background: #e3e5e8; color: #555; }
.name-owner { color: var(--mc-4) !important; } .name-admin { color: #e03131 !important; } .name-mod { color: #008b8b !important; }
.name-helper { color: #b59f00 !important; } .name-donator { color: #e67700 !important; }

img.head { image-rendering: pixelated; border-radius: 2px; flex: none; background: var(--surface-2); display: block; }
a.player { display: inline-flex; align-items: center; gap: 7px; text-decoration: none; font-weight: 600; color: var(--fg); min-width: 0; }
a.player:hover .nm { text-decoration: underline; }

/* Public player status, independent of rank colours. */
.presence { display: inline-flex; align-items: center; gap: 6px; font: 500 .73rem var(--f-head); color: var(--muted); white-space: nowrap; vertical-align: middle; }
.presence-dot { width: 8px; height: 8px; border-radius: 50%; background: #8b929b; box-shadow: 0 0 0 2px #eef0f2; flex: none; }
.presence.online { color: #237638; }
.presence.online .presence-dot { background: var(--win); box-shadow: 0 0 0 2px #e2f3e6; }
.presence.offline { color: #a83232; }
.presence.offline .presence-dot { background: #c64040; box-shadow: 0 0 0 2px #fbe8e8; }

/* Homepage */
.banner { position: relative; overflow: hidden; margin-top: 16px; border-radius: 3px; background-color: var(--dark);
  background-image:
    linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px),
    radial-gradient(90% 120% at 50% 110%, #4a2208 0%, transparent 70%);
  background-size: 32px 32px, 32px 32px, auto; }
.banner .inner { position: relative; display: grid; justify-items: center; text-align: center; gap: 10px; padding: 52px 20px 46px; color: #fff; }
.banner .mark { width: 68px; height: 96px; }
.banner h1 { font-size: clamp(1.8rem, 5vw, 2.6rem); letter-spacing: .14em; font-weight: 700; }
.banner h1 span { font-weight: 400; }
.banner p { margin: 0; font: 500 .78rem var(--f-head); letter-spacing: .2em; text-transform: uppercase; color: #b8b2ac; }
.strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 12px; }
.strip > * { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 8px 12px; border-radius: 3px; border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow);
  font: 600 .75rem var(--f-head); letter-spacing: .08em; text-transform: uppercase; text-decoration: none; color: var(--fg); cursor: pointer; text-align: center; }
.strip > button:hover { background: var(--surface-2); }
.strip .count { color: var(--accent); }
.strip .ok { width: 8px; height: 8px; border-radius: 50%; background: var(--win); flex: none; }
.strip > .ip-copy { justify-content: space-between; gap: 12px; padding: 6px 6px 6px 16px; text-transform: none; letter-spacing: 0; transition: border-color .15s, box-shadow .15s; }
.ip-copy:hover { border-color: var(--brand); }
.ip-copy:active { transform: translateY(1px); }
.ip-copy .ip-text { display: grid; text-align: left; font: 700 1.05rem var(--f-head); letter-spacing: .02em; line-height: 1.15; }
.ip-copy .ip-text small { font: 500 .62rem var(--f-head); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.ip-copy .ip-action { display: inline-flex; align-items: center; gap: 6px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 3px; padding: 7px 11px;
  font: 600 .7rem var(--f-head); letter-spacing: .08em; text-transform: uppercase; color: var(--fg); transition: background .15s, color .15s, border-color .15s; }
.ip-copy:hover .ip-action { background: var(--brand); border-color: var(--brand); color: #1b1b1b; }
.ip-copy svg { width: 15px; height: 15px; fill: currentColor; }
.ip-copy .i-done { display: none; }
.ip-copy.copied { border-color: var(--win); }
.ip-copy.copied .ip-action { background: var(--win); border-color: var(--win); color: #fff; }
.ip-copy.copied .i-copy { display: none; }
.ip-copy.copied .i-done { display: block; }
.strip a.store { background: var(--accent); border-color: var(--accent); color: #fff; }
.strip a.store:hover { background: var(--accent-hover); }
.home-grid { display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: 18px; margin-top: 18px; align-items: start; }
.news { display: grid; gap: 16px; }
.news article { background: var(--surface); border: 1px solid var(--line); border-radius: 3px; overflow: hidden; box-shadow: var(--shadow); }
.news article .hd { padding: 14px 18px 10px; margin: 0 18px; padding-inline: 0; border-bottom: 1px solid var(--line); }
.news article h2 { font-size: 1.2rem; letter-spacing: .06em; }
.news article h2 a { text-decoration: none; color: var(--fg); }
.news article h2 a:hover { color: var(--accent); }
.news article .by { display: flex; gap: 6px; align-items: center; font-size: .78rem; color: var(--muted); margin-top: 3px; }
.news article .by b { font-weight: 600; color: var(--fg); }
.news article .tx { padding: 12px 18px 14px; position: relative; max-height: 240px; overflow: hidden; }
.news article .tx.fade::after { content: ""; position: absolute; inset: auto 0 0; height: 60px; background: linear-gradient(rgba(255,255,255,0), #fff); }
.news article .more { display: block; text-align: center; padding: 9px; font: 600 .72rem var(--f-head); letter-spacing: .1em; text-transform: uppercase; text-decoration: none; background: var(--dark); color: #fff; }
.news article .more:hover { background: #33302d; }
.side { display: grid; gap: 16px; }
.discord { border-radius: 5px; overflow: hidden; background: var(--surface); }
.discord iframe { display: block; width: 100%; border: 0; }
.discord a.join { display: block; text-align: center; background: #5865f2; color: #fff; font: 600 .72rem var(--f-head); letter-spacing: .1em; text-transform: uppercase; padding: 10px; text-decoration: none; }
.discord a.join:hover { background: #4752c4; }
.side .links { display: grid; }
.side .links a { padding: 10px 16px; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--fg); font-size: .9rem; }
.side .links a:last-child { border-bottom: 0; }
.side .links a:hover { background: var(--surface-2); color: var(--accent); }

/* Match rows */
.matches { list-style: none; margin: 0; padding: 0; }
.match { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; padding: 11px 16px; border-bottom: 1px solid var(--line); }
.match:last-child { border-bottom: 0; }
.match.new { animation: flash 1s ease-out; }
@keyframes flash { from { background: #fff4e0; } to { background: transparent; } }
.vs { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; }
.vs .l a.player { color: var(--muted); font-weight: 400; }
.vs .x { color: var(--muted); font-size: .75rem; }
.won { font: 700 .6rem var(--f-head); letter-spacing: .08em; text-transform: uppercase; color: var(--win); margin-left: 4px; }
.delta { font-weight: 600; font-size: .78rem; font-variant-numeric: tabular-nums; }
.delta.up { color: var(--win); } .delta.down { color: var(--loss); }
.meta { grid-column: 1 / -1; display: flex; gap: 10px; flex-wrap: wrap; font-size: .78rem; color: var(--muted); align-items: center; }
.kit { font-weight: 600; color: var(--fg); }
.tag { font: 600 .6rem var(--f-head); letter-spacing: .08em; text-transform: uppercase; padding: 2px 6px; border-radius: 2px; }
.tag.ranked { background: #fff1d6; color: #a35c00; }
.tag.unranked, .tag.neutral { background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }
.tag.open { background: #ffe8dd; color: var(--accent); }
.tag.answered { background: #e3f6e8; color: var(--win); }
.tag.closed { background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }
.ago { color: var(--muted); font-size: .78rem; text-align: right; white-space: nowrap; }

/* Match and event pages */
.match-facts { display: flex; gap: 8px 16px; flex-wrap: wrap; align-items: center; margin-top: 8px; color: var(--muted); font-size: .88rem; }
.match-facts b { color: var(--fg); }
code.cmd { font-family: Consolas, ui-monospace, monospace; background: var(--surface); border: 1px solid var(--line); border-radius: 3px; padding: 1px 6px; color: var(--fg); user-select: all; }
.hp { color: var(--loss); font-weight: 600; }
.inv-layout { display: grid; grid-template-columns: minmax(0, auto) minmax(0, 1fr); gap: 18px; align-items: start; }
.inv-panel .panel-body { background: #c6c6c6; display: grid; gap: 10px; justify-content: start; }
.inv { display: flex; gap: 12px; align-items: stretch; }
.inv-skin { width: 108px; background: #000; border: 2px solid; border-color: #373737 #fff #fff #373737; display: grid; place-items: center; }
.inv-skin img { height: 150px; width: auto; image-rendering: pixelated; }
.inv-armor { display: grid; gap: 0; }
.inv-grid { display: grid; grid-template-columns: repeat(9, 40px); }
.inv-grid.hotbar { margin-top: 6px; }
.slot { position: relative; width: 40px; height: 40px; background: #8b8b8b; border: 2px solid; border-color: #373737 #fff #fff #373737; display: grid; place-items: center; outline-offset: -2px; }
.slot:not(.blank) { cursor: help; }
.slot:not(.blank):hover, .slot:focus-visible { background: #a8a8a8; }
.slot .item-icon { width: 32px; height: 32px; position: absolute; isolation: isolate; pointer-events: none; }
.item-icon canvas { width: 100%; height: 100%; image-rendering: pixelated; display: block; }
.slot .lbl { font: 700 .66rem var(--f-head); letter-spacing: .02em; width: 30px; height: 30px; border-radius: 3px; display: grid; place-items: center; color: #fff; text-shadow: 1px 1px 0 rgba(0,0,0,.5); }
.slot.has-icon .lbl { display: none; }
.lbl.fam-diamond { background: #2fb8b0; } .lbl.fam-iron { background: #9aa3ab; } .lbl.fam-gold { background: #d6a81e; }
.lbl.fam-potion { background: #c2306d; } .lbl.fam-wood { background: #8a5a2b; } .lbl.fam-food { background: #c9542c; } .lbl.fam-other { background: #5f6670; }
.item-glint { position: absolute; inset: 0; background: #8040cc url("/resources/minecraft/1.8.9/textures/misc/enchanted_item_glint.png") 0 0 / 128px 128px; background-blend-mode: multiply; mix-blend-mode: screen; opacity: .65; mask: var(--item-mask) center / 100% 100% no-repeat; image-rendering: pixelated; animation: item-glint 4s linear infinite; }
@keyframes item-glint { to { background-position: 128px -128px; } }
@media (prefers-reduced-motion: reduce) { .item-glint { animation: none; } }
.slot .amt { position: absolute; right: 1px; bottom: 1px; display: flex; gap: 2px; filter: drop-shadow(2px 2px 0 #3f3f3f); pointer-events: none; }
.amt-digit { display: block; width: 10px; height: 14px; font-size: 0; background-image: url("/resources/minecraft/1.8.9/textures/font/ascii.png"); background-size: 256px 256px; image-rendering: pixelated; }
.slot .dur { position: absolute; left: 4px; right: 4px; bottom: 3px; height: 3px; background: #000; }
.slot .dur i { display: block; height: 100%; }
.item-tip { position: fixed; z-index: 60; max-width: 260px; background: #100010; color: #fff; border: 2px solid #2a0a5e; border-radius: 3px; padding: 6px 9px; font-size: .82rem; display: grid; gap: 1px; pointer-events: none; box-shadow: 0 4px 14px rgba(0,0,0,.3); }
.item-tip b { font-weight: 600; }
.item-tip .en { color: #aaa; }
.item-tip .lo { color: #a87fdc; font-size: .78rem; }
.stat-list { margin: 0; display: grid; }
.stat-list > div { display: flex; justify-content: space-between; gap: 12px; padding: 7px 16px; border-bottom: 1px solid var(--line); font-size: .88rem; }
.stat-list > div:last-child { border-bottom: 0; }
.stat-list dt { color: var(--muted); }
.stat-list dd { margin: 0; text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.match a.details { font: 600 .66rem var(--f-head); letter-spacing: .08em; text-transform: uppercase; text-decoration: none; }

/* Tables */
.tbl { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .88rem; }
th { text-align: left; font: 600 .68rem var(--f-head); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 9px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--surface-2); }
td { padding: 9px 12px; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; white-space: nowrap; }
tbody tr:nth-child(even) td { background: #fafbfb; }
tr:last-child td { border-bottom: 0; }
td.kitname { font-weight: 600; }
.elo { color: var(--accent); font-weight: 700; }
.pos { font: 700 .9rem var(--f-head); color: var(--muted); width: 3em; }
.pos.p1 { color: #c99700; } .pos.p2 { color: #8a8f96; } .pos.p3 { color: #b0662f; }

/* Leaderboards */
.lb-layout { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 18px; align-items: start; }
.kit-list { display: grid; position: sticky; top: 70px; }
.kit-list button { text-align: left; background: none; border: 0; border-bottom: 1px solid var(--line); color: var(--fg); font: 400 .9rem var(--f-body); padding: 9px 14px; cursor: pointer; }
.kit-list button:last-child { border-bottom: 0; }
.kit-list button:hover { background: var(--surface-2); }
.kit-list button[aria-pressed="true"] { background: var(--surface-2); font-weight: 600; box-shadow: inset 3px 0 0 var(--brand); }
.kit-select { display: none; }
.podium { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; }
.podium .spot { background: var(--surface); border: 1px solid var(--line); border-radius: 3px; padding: 16px 12px; display: grid; justify-items: center; gap: 6px; text-align: center; text-decoration: none; color: var(--fg); box-shadow: var(--shadow); border-top: 3px solid var(--line); }
.podium .spot:nth-child(1) { border-top-color: #e6b800; }
.podium .spot:nth-child(2) { border-top-color: #aab0b6; }
.podium .spot:nth-child(3) { border-top-color: #c8834e; }
.podium .spot b { font: 700 1.2rem var(--f-head); font-variant-numeric: tabular-nums; }
.podium .spot img.body { height: 110px; width: auto; image-rendering: pixelated; }

/* Player profile */
.search { display: flex; gap: 8px; max-width: 480px; }
.player-layout { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 18px; align-items: start; }
.profile-main { min-width: 0; }
.profile-details { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 18px; margin-top: 18px; }
.profile-sidebar { background: var(--surface-2); min-width: 0; }
.profile-sidebar .skin { display: grid; justify-items: center; padding: 20px; gap: 18px; }
.profile-sidebar .skin img { height: 210px; width: auto; image-rendering: pixelated; }
.profile-presence { display: grid; justify-items: center; gap: 3px; text-align: center; }
.profile-presence .presence { font-weight: 700; }
.profile-presence small { font-size: .7rem; }
.profile-friends { padding: 14px 16px 18px; border-top: 1px solid var(--line); }
.friends-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.friends-heading h2 { font-size: .8rem; text-transform: none; letter-spacing: 0; }
.friends-heading > span { font-size: .75rem; font-variant-numeric: tabular-nums; }
.friends-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.profile-friend { position: relative; display: block; width: 32px; height: 32px; border-radius: 3px; }
.profile-friend > .head { display: block; width: 32px; height: 32px; }
.profile-friend .presence { position: absolute; bottom: -2px; right: -2px; }
.profile-friends p { margin: 0; font-size: .8rem; }
.profile-card { padding: 20px 22px; min-width: 0; }
.profile-card h1 { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; text-transform: none; letter-spacing: 0; font-size: 1.8rem; }
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 12px; font-size: .86rem; }
.facts div { display: grid; }
.facts dt { font: 600 .66rem var(--f-head); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.facts dd { margin: 0; }
.kpis { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); border-top: 1px solid var(--line); margin: 18px -22px -20px; }
.kpi { padding: 12px 14px; border-right: 1px solid var(--line); text-align: center; }
.kpi:last-child { border-right: 0; }
.kpi b { display: block; font: 700 1.3rem var(--f-head); font-variant-numeric: tabular-nums; }
.kpi span { font: 500 .64rem var(--f-head); color: var(--muted); letter-spacing: .08em; text-transform: uppercase; }

/* Staff: one box per rank, coloured header bar, full-body skins centred */
.staff-groups { display: grid; gap: 16px; }
.staff-group { background: var(--surface); border: 1px solid var(--line); border-radius: 3px; overflow: hidden; box-shadow: var(--shadow); }
.staff-group > h2 { font: 700 .74rem var(--f-head); letter-spacing: .16em; text-transform: uppercase; text-align: center; padding: 7px; color: #1b1b1b; border-bottom: 1px solid rgba(0,0,0,.15); }
.staff-group.owner > h2 { background: var(--mc-4); color: #fff; }
.staff-group.admin > h2 { background: var(--mc-c); color: #fff; }
.staff-group.mod > h2 { background: var(--mc-3); color: #fff; }
.staff-group.helper > h2 { background: var(--mc-e); }
.staff-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 20px 10px; padding: 26px 16px 22px; }
.member { width: 170px; display: grid; justify-items: center; gap: 4px; text-align: center; text-decoration: none; color: var(--fg); }
.member img.body { height: 150px; width: auto; image-rendering: pixelated; margin-bottom: 4px; }
.staff-group.mod .member img.body, .staff-group.helper .member img.body { height: 110px; }
.member .nm { font: 700 .98rem var(--f-head); }
.member:hover .nm { color: var(--accent); }

/* Rules */
.rules { display: grid; gap: 16px; max-width: 840px; }
.rule-group { background: var(--surface); border: 1px solid var(--line); border-radius: 3px; box-shadow: var(--shadow); }
.rule-group h2 { font-size: .85rem; padding: 10px 18px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.rule-group ol { margin: 0; padding: 14px 18px 16px 2.4em; display: grid; gap: 10px; }
.rule-group li::marker { color: var(--accent); font-weight: 700; }
.rule-group li b { font-weight: 600; }
.rule-group li span { display: block; color: var(--muted); font-size: .88rem; }
.note { background: #fff8e6; border: 1px solid #f5d98b; border-radius: 3px; padding: 12px 16px; font-size: .88rem; max-width: 840px; margin-bottom: 16px; }

/* Privacy policy */
.privacy-head { margin: 28px 0 24px; padding: 28px 32px; }
.privacy-head > a { text-decoration: none; }
.privacy-head h1 { font-size: 2.3rem; text-transform: none; letter-spacing: 0; margin: 10px 0 8px; }
.privacy-head p { color: var(--muted); margin: 0; }
.privacy-layout { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 24px; align-items: start; }
.privacy-nav { padding: 18px 24px; position: sticky; top: 86px; }
.privacy-nav h2 { font-size: .68rem; color: var(--muted); letter-spacing: .1em; margin-bottom: 12px; }
.privacy-nav a { display: block; padding: 7px 0; font-size: .85rem; color: var(--muted); text-decoration: none; }
.privacy-nav a:hover { color: var(--accent); }
.privacy-content { padding: 24px 32px; }
.privacy-content section { scroll-margin-top: 90px; }
.privacy-content section + section { margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--line); }
.privacy-content h2 { font-size: 1rem; text-transform: none; letter-spacing: 0; }
.privacy-content p { margin: 12px 0 0; color: var(--muted); line-height: 1.8; }

/* Auth */
.auth { max-width: 430px; margin: 36px auto; }
.tabs { display: grid; grid-template-columns: 1fr 1fr; border-bottom: 1px solid var(--line); }
.tabs button { background: var(--surface-2); border: 0; color: var(--muted); font: 600 .78rem var(--f-head); letter-spacing: .08em; text-transform: uppercase; padding: 13px; cursor: pointer; border-bottom: 2px solid transparent; }
.tabs button[aria-selected="true"] { color: var(--fg); background: var(--surface); border-color: var(--brand); }
.steps { font-size: .84rem; color: #5a4a1e; background: #fff8e6; border: 1px solid #f5d98b; border-radius: 3px; padding: 10px 12px; }
.steps code { font-family: Consolas, ui-monospace, monospace; color: var(--fg); background: rgba(0,0,0,.05); padding: 0 4px; border-radius: 2px; }

/* Tickets */
.ticket-list { list-style: none; margin: 0; padding: 0; }
.ticket-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 16px; padding: 12px 16px; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--fg); }
.ticket-row:hover { background: var(--surface-2); }
.ticket-row:last-child { border-bottom: 0; }
.ticket-row .subj { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ticket-row .info { grid-column: 1 / -1; display: flex; gap: 10px; flex-wrap: wrap; font-size: .78rem; color: var(--muted); align-items: center; }
.convo { display: grid; gap: 12px; }
.msg { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 12px; }
.msg .bubble { background: var(--surface); border: 1px solid var(--line); border-radius: 3px; padding: 11px 14px; min-width: 0; box-shadow: var(--shadow); }
.msg.staff .bubble { border-left: 3px solid var(--mc-3); }
.msg .who { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: .8rem; color: var(--muted); margin-bottom: 4px; }
.msg .who b { font-size: .9rem; color: var(--fg); }
.body-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.ticket-layout { display: grid; grid-template-columns: minmax(0, 1fr) 270px; gap: 18px; align-items: start; }
.side-facts { display: grid; gap: 10px; font-size: .88rem; margin: 0; }
.side-facts div { display: grid; }
.side-facts dt { font: 600 .66rem var(--f-head); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.side-facts dd { margin: 0; }

/* Staff panel */
.panel-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; }
.panel-stats button { text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: 3px; padding: 12px 16px; color: var(--fg); cursor: pointer; box-shadow: var(--shadow); border-top: 3px solid var(--line); }
.panel-stats button[data-s="open"] { border-top-color: var(--accent); }
.panel-stats button[data-s="answered"] { border-top-color: var(--win); }
.panel-stats button[aria-pressed="true"] { background: var(--surface-2); outline: 1px solid var(--fg); }
.panel-stats b { display: block; font: 700 1.5rem var(--f-head); font-variant-numeric: tabular-nums; }
.panel-stats span { font: 500 .7rem var(--f-head); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.toolbar input { max-width: 260px; }
.toolbar select { max-width: 200px; }

/* Forums */
.forum-section { margin-bottom: 18px; }
.forum-section > h2 { font: 700 .76rem var(--f-head); letter-spacing: .12em; text-transform: uppercase; color: #fff; background: var(--dark); border-radius: 3px 3px 0 0; padding: 9px 16px; }
.forum-section .panel { border-radius: 0 0 3px 3px; border-top: 0; }
.forum-row { display: grid; grid-template-columns: 34px minmax(0, 1fr) 80px 80px minmax(0, 230px); gap: 14px; padding: 13px 16px; border-bottom: 1px solid var(--line); align-items: center; }
.forum-row:last-child { border-bottom: 0; }
.forum-row .ico { width: 34px; height: 34px; border-radius: 3px; background: var(--surface-2); border: 1px solid var(--line); display: grid; place-items: center; }
.forum-row .ico img { width: 14px; height: 20px; }
.forum-row .ico.quiet img { filter: grayscale(1); opacity: .45; }
.forum-row .title a { font-weight: 700; font-size: .98rem; text-decoration: none; color: var(--fg); }
.forum-row .title a:hover { color: var(--accent); }
.forum-row .title p { margin: 1px 0 0; color: var(--muted); font-size: .84rem; }
.forum-row .count { text-align: center; }
.forum-row .count b { display: block; font-weight: 600; font-variant-numeric: tabular-nums; }
.forum-row .count span { font: 500 .62rem var(--f-head); color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.forum-row .latest { display: flex; gap: 10px; align-items: center; font-size: .8rem; min-width: 0; color: var(--muted); }
.forum-row .latest > div { min-width: 0; }
.forum-row .latest a.t { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-decoration: none; font-weight: 600; color: var(--fg); }
.forum-row .latest a.t:hover { color: var(--accent); }
.thread-row { display: grid; grid-template-columns: 32px minmax(0, 1fr) 70px 70px minmax(0, 180px); gap: 14px; padding: 11px 16px; border-bottom: 1px solid var(--line); align-items: center; }
.thread-row:last-child { border-bottom: 0; }
.thread-row.pinned { background: #fffaf0; }
.thread-row .t a { font-weight: 600; text-decoration: none; color: var(--fg); overflow-wrap: anywhere; }
.thread-row .t a:hover { color: var(--accent); }
.thread-row .t .by { font-size: .78rem; color: var(--muted); }
.thread-row .count { text-align: center; font-variant-numeric: tabular-nums; }
.thread-row .count span { display: block; font: 500 .6rem var(--f-head); color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.thread-row .last { font-size: .78rem; color: var(--muted); text-align: right; }
.thread-row .last a { color: var(--fg); text-decoration: none; font-weight: 600; }
.flag { font: 700 .58rem var(--f-head); letter-spacing: .08em; text-transform: uppercase; padding: 1px 5px; border-radius: 2px; margin-right: 6px; vertical-align: 2px; }
.flag.pin { background: var(--brand); color: #1b1b1b; }
.flag.lock { background: #e3e5e8; color: #555; }
.post { display: grid; grid-template-columns: 170px minmax(0, 1fr); border: 1px solid var(--line); border-radius: 3px; overflow: hidden; background: var(--surface); margin-bottom: 12px; box-shadow: var(--shadow); }
.post .author { background: var(--surface-2); padding: 16px 10px; display: grid; justify-items: center; align-content: start; gap: 6px; text-align: center; border-right: 1px solid var(--line); }
.post .author img.body { height: 110px; width: auto; image-rendering: pixelated; }
.post .author .nm { font-weight: 700; text-decoration: none; color: var(--fg); overflow-wrap: anywhere; }
.post .author small { color: var(--muted); font-size: .74rem; }
.post .author .mobile-head { display: none; }
.post .content { padding: 12px 16px; display: grid; grid-template-rows: auto 1fr auto; gap: 10px; min-width: 0; }
.post .content .top { display: flex; justify-content: space-between; gap: 8px; font-size: .76rem; color: var(--muted); border-bottom: 1px solid var(--line); padding-bottom: 7px; }
.post .content .top a { color: var(--muted); text-decoration: none; }
.post .actions { display: flex; gap: 8px; justify-content: flex-end; }
.pager { display: flex; gap: 4px; justify-content: center; margin: 16px 0; flex-wrap: wrap; }
.pager a, .pager span { min-width: 32px; text-align: center; padding: 4px 9px; border: 1px solid var(--line); border-radius: 3px; text-decoration: none; font-size: .85rem; background: var(--surface); color: var(--fg); }
.pager span[aria-current] { background: var(--fg); color: #fff; border-color: var(--fg); }
.mod-bar { display: flex; gap: 8px; flex-wrap: wrap; padding: 9px 14px; background: #e6f6f6; border: 1px solid #a8dede; border-radius: 3px; margin-bottom: 12px; align-items: center; font-size: .84rem; }
.mod-bar b { font: 700 .7rem var(--f-head); letter-spacing: .08em; text-transform: uppercase; color: #007575; }

footer.site { margin-top: 48px; background: var(--dark); color: #a39d97; font-size: .82rem; }
footer.site .wrap { padding-block: 22px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
footer.site nav { display: flex; gap: 18px; flex-wrap: wrap; }
footer.site a { color: #d8d3ce; text-decoration: none; }
footer.site a:hover { color: #fff; }

/* Tebex storefront */
.store-banner .inner { padding-block: 30px; }
.store-banner .mark { width: 40px; height: 56px; }
.store-categories { display: flex; flex-wrap: wrap; overflow: hidden; margin-bottom: 10px; }
.store-categories:empty { display: none; }
.store-categories button { flex: 1; border: 0; border-bottom: 3px solid transparent; padding: 17px 16px 14px; background: var(--surface); color: var(--muted); font: 600 .72rem var(--f-head); text-transform: uppercase; letter-spacing: .06em; cursor: pointer; }
.store-categories button:hover { background: var(--surface-2); }
.store-categories button[aria-pressed="true"] { border-bottom-color: var(--accent); color: var(--accent); }
.store-layout { display: grid; grid-template-columns: minmax(0, 1fr) 270px; gap: 18px; align-items: start; margin-top: 18px; }
.store-title { text-align: center; padding: 4px 8px 20px; }
.product-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.product-grid:has(> .product:only-child) { grid-template-columns: minmax(0, 420px); justify-content: center; }
.product { display: flex; flex-direction: column; align-items: center; gap: 9px; padding: 20px; border: 1px solid var(--line); border-top: 3px solid var(--brand); border-radius: 3px; text-align: center; min-width: 0; }
.product-art { height: 80px; display: grid; place-items: center; }
.product-art img { max-height: 80px; max-width: 140px; object-fit: contain; }
.product-art img.package-mark { height: 58px; }
.product h3 { font-size: 1.1rem; letter-spacing: .08em; overflow-wrap: anywhere; }
.product details { width: 100%; text-align: left; }
.product summary { cursor: pointer; font-size: .8rem; text-align: center; color: var(--muted); }
.product details > div { padding-top: 10px; }
.product-price { margin-top: auto; padding-top: 10px; font: 500 1.5rem var(--f-head); }
.product > .btn { width: 100%; }
.recent-buyers { padding: 6px 16px; }
.recent-buyers > div { display: flex; gap: 10px; align-items: center; padding: 9px 0; }
.recent-buyers small, .cart-item small { display: block; }
.cart-dialog { width: min(560px, calc(100% - 28px)); max-height: calc(100dvh - 40px); padding: 26px; border: 0; border-radius: 5px; color: var(--fg); background: var(--surface); box-shadow: 0 16px 60px #0003; }
.cart-dialog::backdrop { background: #1d262bb3; }
.cart-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.cart-heading h2 { font-size: 1.3rem; }
.cart-item { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.cart-item b { font-size: .9rem; overflow-wrap: anywhere; }
.cart-remove { border: 0; background: none; color: var(--loss); cursor: pointer; padding: 5px 0; font: inherit; font-size: .8rem; }
.cart-remove:hover { text-decoration: underline; }
@media (max-width: 980px) {
  .store-layout { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .product-grid { grid-template-columns: minmax(0, 1fr); }
  .cart-dialog { padding: 20px; }
}

.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); background: var(--dark); color: #fff; font-weight: 600; font-size: .86rem; padding: 9px 16px; border-radius: 3px; opacity: 0; transition: .2s; pointer-events: none; z-index: 50; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 980px) {
  .menu-btn { display: inline-block; order: 2; }
  .nav .wrap { flex-wrap: wrap; gap: 12px; }
  .nav-right { order: 1; }
  .nav nav { display: none; order: 3; width: 100%; flex-direction: column; gap: 0; padding: 4px 0; }
  .nav nav.open { display: flex; }
  .nav nav a { padding: 9px 0; border: 0; border-top: 1px solid var(--line); }
  .home-grid, .ticket-layout, .lb-layout, .inv-layout, .privacy-layout, .profile-details { grid-template-columns: minmax(0, 1fr); }
  .privacy-nav { position: static; display: flex; flex-wrap: wrap; gap: 0 20px; }
  .privacy-nav h2 { width: 100%; margin-bottom: 6px; }
  .strip { grid-template-columns: minmax(0, 1fr); }
  .kit-list { display: none; }
  .kit-select { display: block; margin-bottom: 12px; }
  .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .kpi:nth-child(3) { border-right: 0; }
  .kpi:nth-child(-n+3) { border-bottom: 1px solid var(--line); }
  .forum-row { grid-template-columns: 34px minmax(0, 1fr) 64px 64px; }
  .forum-row .latest { grid-column: 2 / -1; }
  .thread-row { grid-template-columns: 28px minmax(0, 1fr) 60px; }
  .thread-row .count.views, .thread-row .last { display: none; }
}
@media (max-width: 640px) {
  .privacy-head, .privacy-content { padding: 22px 20px; }
  .privacy-head h1 { font-size: 1.8rem; }
  .inv-grid { grid-template-columns: repeat(9, 34px); }
  .slot { width: 34px; height: 34px; }
  .slot img { width: 26px; height: 26px; }
  .slot .lbl { width: 24px; height: 24px; font-size: .58rem; }
  .inv-skin { width: 80px; }
  .inv-skin img { height: 120px; }
  .inv-panel .panel-body { padding: 10px; }
  .user-menu > button > span { display: none; }
  .user-menu > button { padding: 3px; }
  .player-layout { grid-template-columns: minmax(0, 1fr); }
  .profile-sidebar .skin img { height: 150px; }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi { border-bottom: 1px solid var(--line); }
  .kpi:nth-child(odd) { border-right: 1px solid var(--line); } .kpi:nth-child(even) { border-right: 0; }
  .podium { grid-template-columns: minmax(0, 1fr); }
  .panel-stats { grid-template-columns: minmax(0, 1fr); }
  .post { grid-template-columns: minmax(0, 1fr); }
  .post .author { grid-template-columns: auto 1fr; justify-items: start; text-align: left; border-right: 0; border-bottom: 1px solid var(--line); padding: 10px 12px; }
  .post .author img.body { display: none; }
  .post .author .mobile-head { display: block; }
  .forum-row { grid-template-columns: minmax(0, 1fr); }
  .forum-row .ico, .forum-row .count { display: none; }
  .forum-row .latest { grid-column: 1; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
