:root {
  color-scheme: light;
  --bg: #eceef0;
  --surface: #ffffff;
  --surface-2: #f5f6f7;
  --line: #dcdfe3;
  --fg: #26292d;
  --on-fg: #ffffff;
  --muted: #5f656d;
  --brand: #ffaa00;
  --accent: #d9480f;
  --accent-hover: #b93c0b;
  --dark: #1d1b1a;
  --win: #2f9e44;
  --loss: #e03131;
  --mc-4: #aa0000; --mc-c: #ff5555; --mc-3: #00aaaa; --mc-e: #ffff55; --mc-6: #ffaa00; --mc-7: #aaaaaa;
  --f-head: "Raleway", "Segoe UI", system-ui, sans-serif;
  --f-body: "Raleway", "Segoe UI", system-ui, sans-serif;
  --shadow: 0 1px 2px rgba(0, 0, 0, .13);
  --shadow-lg: 0 6px 20px rgba(20, 22, 26, .12);
  --r: 6px;
  --r-sm: 4px;
  --ease: cubic-bezier(.2, .7, .3, 1);
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #15171b;
  --surface: #202329;
  --surface-2: #292d34;
  --line: #3c424c;
  --fg: #e9edf2;
  --on-fg: #15171b;
  --muted: #a8b0bc;
  --accent: #ff946b;
  --accent-hover: #ffad8e;
  --win: #63d17b;
  --loss: #ff8080;
  --shadow: 0 1px 2px rgba(0, 0, 0, .25);
}
:root[data-theme="dark"] .nav nav a { color: var(--muted); }
:root[data-theme="dark"] .nav nav a:hover, :root[data-theme="dark"] .nav nav a[aria-current="page"] { color: var(--fg); }
:root[data-theme="dark"] input, :root[data-theme="dark"] select, :root[data-theme="dark"] textarea, :root[data-theme="dark"] .editor { border-color: var(--line); }
:root[data-theme="dark"] tbody tr:nth-child(even) td, :root[data-theme="dark"] .staff-table tr.is-active td { background: var(--surface-2); }
:root[data-theme="dark"] .news article .tx.fade::after { background: linear-gradient(transparent, var(--surface)); }
:root[data-theme="dark"] .note, :root[data-theme="dark"] .steps, :root[data-theme="dark"] .notification-row.unread,
:root[data-theme="dark"] .thread-row.pinned, :root[data-theme="dark"] .history-version.current { background: #372d1d; border-color: #79602d; color: var(--fg); }
:root[data-theme="dark"] .tag.open, :root[data-theme="dark"] .tag.app-pending, :root[data-theme="dark"] .tag.st-expired,
:root[data-theme="dark"] .tag.st-closed, :root[data-theme="dark"] .tag.ranked, :root[data-theme="dark"] .ptype.t-warn { background: #372d1d; color: #ffcc6b; border-color: #79602d; }
:root[data-theme="dark"] .tag.answered, :root[data-theme="dark"] .tag.app-accepted, :root[data-theme="dark"] .tag.st-active,
:root[data-theme="dark"] .tag.st-open { background: #203a2a; }
:root[data-theme="dark"] .tag.app-denied, :root[data-theme="dark"] .ptype.t-ban, :root[data-theme="dark"] .ptype.t-ipban,
:root[data-theme="dark"] .ptype.t-blacklist { background: #42282b; border-color: #794047; }
:root[data-theme="dark"] .ptype.t-mute { background: #422d22; color: var(--accent); border-color: #79513b; }
:root[data-theme="dark"] .tag.event, :root[data-theme="dark"] .tag.st-answered { background: #24344c; color: #8abbff; }
:root[data-theme="dark"] .tag.tournament { background: #352949; color: #c8a6ff; }
:root[data-theme="dark"] .tag.bot { background: #203b3c; color: #78d5d5; border-color: #417778; }
:root[data-theme="dark"] .presence.online { color: var(--win); }
:root[data-theme="dark"] .presence.offline { color: var(--loss); }
:root[data-theme="dark"] .name-owner, :root[data-theme="dark"] .name-admin { color: #ff8585 !important; }
:root[data-theme="dark"] .name-mod { color: #64d4d4 !important; }
:root[data-theme="dark"] .name-helper { color: #f5dc65 !important; }
:root[data-theme="dark"] .name-donator { color: #ffc566 !important; }
:root[data-theme="dark"] .presence-dot, :root[data-theme="dark"] .presence.online .presence-dot, :root[data-theme="dark"] .presence.offline .presence-dot { box-shadow: 0 0 0 2px var(--surface-2); }
:root[data-theme="dark"] .mod-bar { background: #203b3c; border-color: #417778; }
:root[data-theme="dark"] .mod-bar b { color: #78d5d5; }
:root[data-theme="dark"] .reaction-chip[aria-pressed="true"], :root[data-theme="dark"] .reaction-add:hover,
:root[data-theme="dark"] .reaction-add[aria-expanded="true"], :root[data-theme="dark"] .reaction-menu-emoji[aria-pressed="true"],
:root[data-theme="dark"] a.mention { background: #49391e; color: #ffcc6b; }
:root[data-theme="dark"] a.mention:hover { background: #604b27; }
:root[data-theme="dark"] .reaction-picker-body emoji-picker, :root[data-theme="dark"] .ed-pop-emoji emoji-picker { --button-active-background: #49391e; --input-font-color: var(--fg); --input-placeholder-color: var(--muted); --category-font-color: var(--fg); }
:root[data-theme="dark"] .btn-primary, :root[data-theme="dark"] .btn-outline:hover, :root[data-theme="dark"] .strip a.store { color: var(--on-fg); }
* { 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.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: clamp(14px, 2vw, 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: clamp(12px, 1.5vw, 20px); flex-wrap: nowrap; white-space: nowrap; }
.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; white-space: nowrap; }
.nav-right .text-link { font-size: .88rem; text-decoration: none; }
/* Shared search field: nav, player lookup, match filters */
.search-box { position: relative; display: flex; align-items: center; flex: 1; min-width: 0; }
.search-box .search-icon { position: absolute; left: 10px; top: 50%; width: 14px; height: 14px; transform: translateY(-50%); color: #8a9097; pointer-events: none; z-index: 1; }
.search-box input[type="search"] { width: 100%; height: 38px; padding: 0 12px 0 32px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface-2); color: var(--fg); font: 400 .9rem var(--f-body); transition: border-color .15s, background .15s; }
.search-box input[type="search"]:focus { box-shadow: none; outline: none; border-color: var(--brand); background: var(--surface); }
.search-box input::-webkit-search-cancel-button { display: none; }
.search-box:focus-within .search-icon { color: var(--brand); }
.nav-search { flex: none; }
.nav-search input[type="search"] { width: 190px; height: 32px; font-size: .85rem; }
.nav-search .suggest { width: 240px; }
.theme-toggle { display: grid; place-items: center; width: 32px; height: 32px; padding: 0; flex: none; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); color: var(--fg); cursor: pointer; }
.theme-toggle:hover { background: var(--surface-2); color: var(--accent); }
:root:not([data-theme="dark"]) .theme-sun, :root[data-theme="dark"] .theme-moon { display: none; }
.auth-slot { display: flex; align-items: center; gap: 14px; }
.search-toggle { display: none; place-items: center; width: 36px; height: 36px; padding: 0; flex: none; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); color: var(--fg); cursor: pointer; }
.search-toggle:hover, .search-toggle[aria-expanded="true"] { background: var(--surface-2); color: var(--accent); }
.menu-icon, .nav-extra { display: none; }
.menu-btn { display: none; background: none; border: 1px solid var(--line); color: var(--fg); border-radius: var(--r); 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: var(--r); 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: var(--r); 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); }
.notifications { position: relative; display: flex; align-items: center; }
.notification-bell { position: relative; display: grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); color: var(--fg); cursor: pointer; }
.notification-bell:hover, .notification-bell[aria-expanded="true"] { background: var(--surface-2); color: var(--accent); }
.notification-count { position: absolute; top: -7px; right: -7px; min-width: 19px; padding: 1px 4px; border: 2px solid var(--surface); border-radius: 12px; background: var(--accent); color: #fff; font: 700 .75rem var(--f-body); }
.notification-panel { position: absolute; right: 0; top: calc(100% + 8px); width: 380px; max-width: calc(100vw - 32px); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: 0 4px 12px rgba(0,0,0,.1); z-index: 30; white-space: normal; }
.notification-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding: 14px; border-bottom: 1px solid var(--line); }
.notification-bulk { display: flex; gap: 12px; flex-wrap: wrap; }
.notification-heading h2 { font-size: .9rem; letter-spacing: .03em; }
.notification-heading button, .notification-error { font-size: .875rem; }
.notification-heading button:disabled { color: var(--muted); cursor: default; text-decoration: none; }
.notification-list { list-style: none; margin: 0; padding: 0; max-height: min(420px, 65dvh); overflow-y: auto; overscroll-behavior: contain; }
.notification-row { border-bottom: 1px solid var(--line); }
.notification-item { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px 5px; color: var(--fg); text-decoration: none; font-size: .875rem; overflow-wrap: anywhere; }
.notification-item > span { min-width: 0; }
.notification-row.unread { background: #fff8e6; border-left: 3px solid var(--brand); }
.notification-row.unread .notification-item { padding-left: 11px; }
.notification-actions { display: flex; gap: 14px; padding: 0 14px 12px 56px; }
.notification-actions button { font-size: .8rem; }
.notification-row.unread .notification-actions { padding-left: 53px; }
.notification-item:hover { background: var(--surface-2); }
.notification-message { display: block; }
.notification-row.unread .notification-message { font-weight: 600; }
.notification-time { display: block; margin-top: 3px; color: var(--muted); font-size: .8rem; }
.notification-error { padding: 12px 14px; color: var(--loss); }
.notification-view-all { display: block; padding: 12px 14px; border-top: 1px solid var(--line); color: var(--accent); font-size: .875rem; font-weight: 600; text-align: center; text-decoration: none; }
.notification-view-all:hover { background: var(--surface-2); text-decoration: underline; }
.notification-page .notification-list { max-height: none; overflow: visible; }
.notification-toolbar [hidden] { display: none; }
.notification-page .notification-row:last-child { border-bottom: 0; }
@media (max-width: 640px) {
  .toolbar.notification-toolbar { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .toolbar.notification-toolbar input, .toolbar.notification-toolbar select { width: 100%; max-width: none; }
  .toolbar.notification-toolbar .search-box { grid-column: 1 / -1; max-width: none; }
  .notification-panel { position: fixed; top: auto; left: 16px; right: 16px; width: auto; max-width: none; margin-top: 44px; align-self: flex-start; }
}

.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: var(--r); 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"], input[type="number"], input[type="url"], select, textarea {
  font: 400 .92rem var(--f-body); background: var(--surface); color: var(--fg); border: 1px solid #c9cdd2; border-radius: var(--r); 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-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; }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); 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; }
.lb-tools { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.server-select { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-size: .86rem; }
.server-select select { width: auto; }
.profile-server { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-top: 20px; }
.clan-tag { color: var(--muted); font-size: .8em; text-decoration: none; text-transform: none; letter-spacing: 0; }
.clan-tag:hover { text-decoration: underline; }
.chips { display: flex; gap: 0; flex-wrap: wrap; border: 1px solid var(--line); border-radius: var(--r); 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: var(--on-fg); }
.empty, .loading { color: var(--muted); padding: 26px 8px; text-align: center; font-size: .9rem; list-style: none; }
.loading { visibility: hidden; }

.rank { font: 700 .62rem var(--f-head); letter-spacing: .08em; text-transform: uppercase; padding: 2px 6px; border-radius: var(--r-sm); 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: var(--r-sm); flex: none; background: var(--surface-2); display: block; }
.player { display: inline-flex; align-items: center; vertical-align: middle; gap: 7px; font-weight: 600; min-width: 0; }
a.player { text-decoration: none; color: var(--fg); }
a.player:hover .nm { text-decoration: underline; }
h1 .player, h3 .player { font-weight: inherit; }
.chip[aria-pressed="true"] .player { color: inherit !important; }
.quoted[data-known]::before, a.mention[data-known]::before { content: ""; display: inline-block; width: 1.1em; height: 1.1em; margin-right: 4px; border-radius: var(--r-sm); vertical-align: -.2em; background: var(--head) center / cover, url(/img/head.png) center / cover; image-rendering: pixelated; }
[contenteditable] a.mention::before, [contenteditable] .quoted::before { content: none; }
:root a.mention[class*="name-"] { background: var(--surface-2); }
.notification-actor { font-weight: 600; }

.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; }

.banner { position: relative; overflow: hidden; margin-top: 16px; border-radius: var(--r); 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: var(--r); 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 .ok.down { background: var(--loss); }
.strip .ok.unknown { background: #a3a8ae; }
.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: var(--r); 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); }
.strip svg.i, .discord a.join svg.i, #cartOpen svg.i { width: 15px; height: 15px; fill: currentColor; flex: none; }
.ip-copy .ip-main { display: flex; align-items: center; gap: 12px; }
.ip-copy .ip-globe { width: 22px; height: 22px; flex: none; }
.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: var(--r); 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: var(--r); box-shadow: var(--shadow); overflow: hidden; background: var(--surface); }
.discord iframe { display: block; width: 100%; border: 0; }
.discord a.join { display: flex; align-items: center; justify-content: center; gap: 8px; 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); }

.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 { display: inline-flex; align-items: center; justify-content: center; font: 600 .6rem/1.2 var(--f-head); letter-spacing: .08em; text-transform: uppercase; padding: 3px 6px; border-radius: var(--r-sm); white-space: nowrap; }
.tag.ranked { background: #fff1d6; color: #a35c00; }
.tag.tournament { background: #efe6ff; color: #6b3fc4; }
.tag.bot { background: #e0f2f1; color: #17635f; border: 1px solid #83bcb6; vertical-align: middle; }
.tag.event { background: #e7f0ff; color: #1c64c9; }
.vs .team { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 2px 4px; }
.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-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: var(--r); 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 { width: 354px; max-width: 100%; }
.inv-panel .panel-body { padding: 0; overflow-x: auto; }
.inv { position: relative; width: 352px; height: 332px; background: url("/resources/minecraft/1.8.9/textures/gui/container/inventory.png") 0 0 / 512px 512px no-repeat; image-rendering: pixelated; }
.inv-skin { position: absolute; left: 52px; top: 16px; width: 104px; height: 140px; display: grid; place-items: center; }
.inv-skin img { height: 136px; width: auto; max-width: 100%; object-fit: contain; image-rendering: pixelated; }
.inv-skin canvas { position: absolute; left: 0; top: 0; width: 104px !important; height: 140px !important; image-rendering: pixelated; pointer-events: none; }
.inv-skin canvas[hidden], .inv-skin.ready img { display: none; }
.inv-armor { position: absolute; left: 14px; top: 14px; display: grid; }
.inv-crafting { position: absolute; left: 172px; top: 32px; color: #404040; }
.inv-grid { position: absolute; left: 14px; top: 166px; display: grid; grid-template-columns: repeat(9, 36px); }
.inv-grid.hotbar { top: 282px; }
.slot { position: relative; width: 36px; height: 36px; display: grid; place-items: center; outline-offset: -2px; }
.slot:not(.blank) { cursor: default; }
.slot:not(.blank):hover::after, .slot:focus-visible::after { content: ""; position: absolute; inset: 2px; background: #ffffff80; pointer-events: none; }
.slot .item-icon, .slot .armor-empty { width: 32px; height: 32px; position: absolute; left: 2px; top: 2px; isolation: isolate; pointer-events: none; }
.slot .armor-empty { image-rendering: pixelated; }
.item-icon canvas, .item-icon img, .item-icon .item-skull { 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: var(--r); display: none; place-items: center; color: #fff; text-shadow: 1px 1px 0 rgba(0,0,0,.5); }
.slot.icon-fallback .lbl { display: grid; }
.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; } }
.mc-text { display: inline-block; font: 16px/18px monospace; letter-spacing: 0; white-space: pre; }
.mc-text canvas { display: block; image-rendering: pixelated; }
.slot .amt { position: absolute; right: -2px; bottom: -2px; color: #fff; z-index: 2; pointer-events: none; }
.slot .dur { position: absolute; left: 6px; bottom: 4px; width: 26px; height: 4px; background: #000; }
.slot .dur i { display: block; height: 2px; }
.item-tip { position: fixed; z-index: 60; max-width: calc(100vw - 16px); overflow-x: auto; background: #100010f0; color: #fff; border: 2px solid; border-image: linear-gradient(#5000ff80, #28007f80) 1; padding: 6px; display: grid; gap: 2px; pointer-events: none; box-shadow: 0 0 0 2px #100010f0; }
.item-tip[hidden] { display: none; }
.item-tip .item-name:not(:last-child) { margin-bottom: 4px; }
.item-tip .item-line { min-height: 18px; }
.tooltip-options { display: flex; align-items: center; gap: 6px; margin-bottom: 12px; color: var(--muted); font-size: .88rem; }
.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; }

.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; }

.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; }
.stat-select, .profile-sections, .kit-more { 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: var(--r); 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; }

.search { display: flex; gap: 8px; max-width: 480px; }
.search .btn { height: 38px; padding-block: 0; }
.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-details > :only-child { grid-column: 1 / -1; }
.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-socials { padding: 14px 16px 16px; border-top: 1px solid var(--line); }
.profile-socials h2 { font-size: .8rem; text-transform: none; letter-spacing: 0; margin-bottom: 10px; }
.social-list { display: grid; gap: 8px; }
.social b { display: flex; align-items: center; gap: 5px; font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.social em { font-style: normal; font-size: .72rem; font-weight: 400; color: var(--muted); }
.social { --social: #5865f2; display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 4px; background: var(--surface); color: var(--fg); text-decoration: none; min-width: 0; }
.social:hover { border-color: var(--social); }
.social svg { flex: none; color: var(--social); }
.social.youtube { --social: #ff0000; }
.social.instagram { --social: #e1306c; }
.social.x { --social: var(--fg); }
.social.twitch { --social: #9146ff; }
.social.tiktok { --social: var(--fg); }
.social.spotify { --social: #1db954; }
.social-setting { display: grid; grid-template-columns: 90px minmax(0, 1fr) auto; align-items: center; gap: 12px; }
.social-setting-name { font-weight: 600; font-size: .85rem; }
.social-setting-value { margin: 0; font-size: .85rem; color: var(--muted); overflow-wrap: anywhere; }
.switch { position: relative; display: inline-block; width: 38px; height: 22px; flex: none; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.switch span[aria-hidden] { position: absolute; inset: 0; border-radius: 11px; background: var(--line); transition: background .15s; pointer-events: none; }
.switch span[aria-hidden]::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 2px rgba(0,0,0,.25); }
.switch input:checked + span[aria-hidden] { background: var(--brand); }
.switch input:checked + span[aria-hidden]::after { transform: translateX(16px); }
.switch input:focus-visible + span[aria-hidden] { outline: 2px solid var(--brand); outline-offset: 2px; }
.switch input:disabled, .switch input:disabled + span[aria-hidden] { opacity: .5; cursor: not-allowed; }
@media (max-width: 520px) { .social-setting { grid-template-columns: minmax(0, 1fr) auto; } .social-setting > input, .social-setting-value { grid-column: 1 / -1; grid-row: 2; } }
.social span { display: grid; min-width: 0; font-size: .85rem; font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; }
.social small { font-size: .7rem; font-weight: 400; color: var(--muted); }
.profile-clan { padding: 14px 16px 16px; border-top: 1px solid var(--line); }
.profile-clan h2 { font-size: .8rem; text-transform: none; letter-spacing: 0; margin-bottom: 10px; }
.clan-card { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 4px; background: var(--surface); color: var(--fg); text-decoration: none; min-width: 0; }
.clan-card:hover { border-color: var(--accent); }
.clan-card svg { flex: none; color: var(--accent); }
.clan-card span { display: grid; min-width: 0; font-size: .85rem; line-height: 1.3; }
.clan-card b { font-weight: 600; overflow-wrap: anywhere; }
.clan-card em { font-style: normal; font-weight: 400; color: var(--muted); }
.clan-card small { font-size: .7rem; color: var(--muted); }
.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: var(--r); }
.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; }
.kpis:has(+ .kpis) { margin-bottom: 0; }
.kpis + .kpis { margin-top: 0; }
.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-groups { display: grid; gap: 16px; }
.staff-group { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); 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; }
.staff-grid .member { width: 170px; display: grid; justify-items: center; gap: 4px; text-align: center; text-decoration: none; color: var(--fg); }
.staff-grid .member img.body { height: 150px; width: auto; image-rendering: pixelated; margin-bottom: 4px; }
.staff-group.mod .staff-grid .member img.body, .staff-group.helper .staff-grid .member img.body { height: 110px; }
.staff-grid .member .nm { font: 700 .98rem var(--f-head); }
.staff-grid .member:hover .nm { color: var(--accent); }

.rules { display: grid; gap: 16px; max-width: 840px; }
.rule-group { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); 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: var(--r); padding: 12px 16px; font-size: .88rem; max-width: 840px; margin-bottom: 16px; }

.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; }
.privacy-content ul { margin: 12px 0 0; padding-left: 1.3em; color: var(--muted); line-height: 1.7; }
.privacy-content li + li { margin-top: 6px; }
.privacy-content li b { color: var(--fg); }

.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: var(--r); 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: var(--r-sm); }

.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; }
.ticket-row > .tag { align-self: 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: var(--r); 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; }

.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: var(--r); 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; }

.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: var(--r) var(--r) 0 0; padding: 9px 16px; }
.forum-section .panel { border-radius: 0 0 var(--r) var(--r); 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: var(--r); 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: var(--r-sm); 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: var(--r); 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 .post-head { width: 72px; height: 72px; border-radius: var(--r); 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 .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; }
.live-bar { border: 1px solid var(--line); border-radius: var(--r); background: var(--surface-2); padding: 10px 14px; margin-bottom: 12px; font-size: .88rem; font-weight: 600; }
.pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 18px 0; flex-wrap: wrap; }
.pager-status { color: var(--muted); font-size: .875rem; font-variant-numeric: tabular-nums; }
.pager-links { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.pager-links a, .pager-links > span { display: inline-flex; align-items: center; justify-content: center; min-width: 40px; min-height: 40px; padding: 6px 11px; border: 1px solid var(--line); border-radius: 5px; text-decoration: none; font-size: .875rem; font-weight: 600; background: var(--surface); color: var(--fg); }
.pager-links a:hover { border-color: var(--accent); color: var(--accent); background: var(--surface-2); }
.pager-links span[aria-current] { background: var(--brand); color: var(--dark); border-color: var(--brand); box-shadow: var(--shadow); }
.pager-links .pager-disabled { color: var(--muted); background: var(--surface-2); }
.pager-links .pager-gap { min-width: 16px; padding-inline: 0; border-color: transparent; background: none; color: var(--muted); }
@media (max-width: 640px) {
  .pager { justify-content: center; gap: 8px; }
  .pager-status { width: 100%; text-align: center; }
  .pager-links { justify-content: center; gap: 3px; }
  .pager-links a, .pager-links > span { min-width: 32px; padding-inline: 7px; }
}
.mod-bar { display: flex; gap: 8px; flex-wrap: wrap; padding: 9px 14px; background: #e6f6f6; border: 1px solid #a8dede; border-radius: var(--r); 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; }

.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: var(--r); 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, .recent-buyers > a { display: flex; gap: 10px; align-items: center; padding: 9px 0; color: inherit; text-decoration: none; }
.recent-buyers > a:hover span { color: var(--accent); }
.product { position: relative; }
.product-sale { position: absolute; top: 10px; right: 10px; padding: 3px 8px; border-radius: var(--r); background: var(--accent); color: #fff; font: 700 .65rem var(--f-head); letter-spacing: .08em; text-transform: uppercase; }
.store-section { margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--line); }
.store-section .store-title h3 { font-size: 1.15rem; letter-spacing: .06em; }
.rich-text { overflow-wrap: anywhere; line-height: 1.55; }
.rich-text > :first-child { margin-top: 0; }
.rich-text > :last-child { margin-bottom: 0; }
.rich-text p, .rich-text ul, .rich-text ol, .rich-text table, .rich-text blockquote { margin: 0 0 10px; }
.rich-text ul, .rich-text ol { padding-left: 1.3em; }
.rich-text h1, .rich-text h2, .rich-text h3, .rich-text h4, .rich-text h5, .rich-text h6 { margin: 12px 0 6px; font-size: .95rem; color: var(--fg); }
.rich-text img { max-width: 100%; height: auto; }
.rich-text table { width: 100%; border-collapse: collapse; font-size: .82rem; display: block; overflow-x: auto; }
.rich-text th, .rich-text td { padding: 6px 8px; border: 1px solid var(--line); text-align: left; }
.rich-text th { background: var(--surface-2); color: var(--fg); }
.rich-text blockquote { padding: 6px 12px; border-left: 3px solid var(--brand); background: var(--surface-2); }
.store-title .rich-text { max-width: 640px; margin: 8px auto 0; }
.delivery-account { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface-2); }
.delivery-account > div { flex: 1; display: flex; align-items: center; gap: 8px; min-width: 0; }
.delivery-account small { display: block; }
.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: var(--r); opacity: 0; transition: .2s; pointer-events: none; z-index: 50; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 1060px) {
  .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); }
}
/* Phones: one row with the logo, search, account and menu. Theme and login move into the menu. */
@media (max-width: 640px) {
  .nav .wrap { gap: 8px; padding-block: 8px; }
  .nav-right { display: contents; }
  .nav-right .theme-toggle, .auth-slot.guest, .menu-text { display: none; }
  .search-toggle { display: grid; order: 1; margin-left: auto; }
  .auth-slot { order: 2; gap: 8px; }
  .menu-btn { order: 3; display: grid; place-items: center; width: 36px; height: 36px; padding: 0; }
  .menu-btn[aria-expanded="true"] { background: var(--surface-2); color: var(--accent); }
  .menu-icon { display: block; }
  .nav .nav-search { display: none; order: 4; flex: 0 0 100%; }
  .nav.search-open .nav-search { display: flex; }
  .nav-search input[type="search"] { width: 100%; height: 40px; font-size: 16px; }
  .nav .nav-search .suggest { left: 0; right: 0; width: auto; }
  .nav nav { order: 5; }
  .nav nav a { padding: 11px 0; }
  .nav-extra, .nav-account { display: flex; flex-direction: column; }
  .nav-theme { display: flex; align-items: center; gap: 10px; padding: 11px 0; background: none; border: 0; border-top: 1px solid var(--line); color: var(--fg); font: 500 .78rem var(--f-head); letter-spacing: .08em; text-transform: uppercase; cursor: pointer; }
  .nav-theme span::after { content: ": off"; }
  :root[data-theme="dark"] .nav-theme span::after { content: ": on"; }
}
@media (max-width: 360px) { .logo span { display: none; } }
/* Without scripts the menu can't open, so show everything. */
:root:not(.js) .menu-btn, :root:not(.js) .search-toggle, :root:not(.js) [data-theme-toggle] { display: none; }
:root:not(.js) .nav nav, :root:not(.js) .nav .nav-search { display: flex; }
@media (max-width: 980px) {
  .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; }
  .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 .post-head { width: 36px; height: 36px; }
  .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; }
}

.suggest-host { position: relative; }
.suggest { position: absolute; left: 0; top: calc(100% + 4px); width: min(100%, 320px); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: 0 6px 18px rgba(0,0,0,.12); z-index: 25; padding: 4px 0; }
.suggest button { display: flex; align-items: center; gap: 9px; width: 100%; background: none; border: 0; padding: 6px 12px; text-align: left; font: 600 .9rem var(--f-body); color: var(--fg); cursor: pointer; }
.suggest button:hover, .suggest button[aria-selected="true"] { background: var(--surface-2); }
.suggest button .rank { margin-left: auto; }

.profile-main > .panel + .panel { margin-top: 18px; }
.ranked-strip { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.ranked-kit { display: grid; gap: 1px; padding: 12px 16px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); text-decoration: none; color: var(--fg); }
.ranked-kit:hover { background: var(--surface-2); }
.ranked-kit .kitname { font: 600 .7rem var(--f-head); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.ranked-kit b { font: 700 1.35rem var(--f-head); font-variant-numeric: tabular-nums; }
.elo-top { display: flex; align-items: center; justify-content: space-between; gap: 12px 20px; flex-wrap: wrap; margin-bottom: 10px; }
.elo-sum { display: flex; gap: 20px; margin: 0; }
.elo-sum div { display: grid; }
.elo-sum dt { font: 600 .66rem var(--f-head); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.elo-sum dd { margin: 0; font: 700 1.05rem var(--f-head); font-variant-numeric: tabular-nums; }
.elo-sum dd.delta { font-size: 1.05rem; }
.elo-chart { position: relative; width: 100%; min-height: 200px; }
.elo-chart svg { display: block; max-width: 100%; touch-action: pan-y; }
.elo-chart svg:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.elo-chart .tick line { stroke: var(--line); stroke-dasharray: 2 3; }
.elo-chart text { font: 500 .7rem var(--f-body); fill: var(--muted); font-variant-numeric: tabular-nums; }
.elo-chart .line { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.elo-chart .area { fill: color-mix(in srgb, var(--accent) 9%, transparent); }
.elo-chart .dot { stroke: var(--surface); stroke-width: 1.5; }
.elo-chart .dot.w, .elo-chart .hl.w { fill: var(--win); }
.elo-chart .dot.l, .elo-chart .hl.l { fill: var(--loss); }
.elo-chart .hl { stroke: var(--surface); stroke-width: 2; pointer-events: none; }
.elo-chart svg [hidden] { display: none; }
.elo-chart .cursor { stroke: var(--muted); stroke-width: 1; opacity: .5; pointer-events: none; }
.elo-tip { position: absolute; pointer-events: none; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: 0 4px 12px rgba(0,0,0,.1); padding: 6px 10px; font-size: .82rem; line-height: 1.4; white-space: nowrap; z-index: 2; }
.elo-tip b { font: 700 1rem var(--f-head); font-variant-numeric: tabular-nums; }
@media (max-width: 520px) { .elo-sum { gap: 14px; } }
.profile-social { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 18px; margin-top: 18px; align-items: start; }
.wall-form { display: grid; gap: 8px; }
.wall-form textarea { resize: vertical; min-height: 72px; }
.reply-form textarea { min-height: 52px; }
.row-actions { display: flex; gap: 8px; align-items: center; justify-content: flex-end; flex-wrap: wrap; }
.row-actions .hint { margin-right: auto; }
#wallForm { border-bottom: 1px solid var(--line); }
.wall-post { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.wall-list > .wall-post:last-child { border-bottom: 0; }
.wall-post.reply { padding: 10px 0 0; border: 0; gap: 10px; }
.wall-meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: .85rem; }
.wall-meta .nm { font-weight: 700; text-decoration: none; color: var(--fg); }
.wall-body .body-text { margin-top: 2px; }
.wall-footer { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; margin-top: 10px; }
.wall-footer > .reactions { margin-top: 0; }
.wall-actions { display: flex; align-items: center; flex: none; gap: 12px; margin-left: auto; }
.link-btn { background: none; border: 0; padding: 0; font: 600 .78rem var(--f-body); color: var(--muted); cursor: pointer; }
.link-btn:hover { color: var(--accent); }
.link-btn.danger:hover { color: var(--loss); }
.wall-replies { margin-top: 6px; padding-left: 12px; border-left: 2px solid var(--line); }
.reply-form { margin-top: 10px; }
.reactions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 14px; }
.reaction-chip { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 11px 0 8px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface-2); color: var(--muted); font: 600 .82rem var(--f-body); font-variant-numeric: tabular-nums; cursor: pointer; transition: background-color .12s, border-color .12s, color .12s, transform .1s; }
.reaction-chip img { flex: none; width: 18px; height: 18px; transition: transform .15s; }
.reaction-chip[aria-pressed="true"] { background: #fff3d6; border-color: #f2b13c; color: #8a5300; }
.reaction-chip:active:not(:disabled) { transform: scale(.92); }
.reaction-chip:disabled { cursor: default; }
.reaction-chip.is-popped img { animation: reaction-pop .4s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes reaction-pop { 0% { transform: scale(.5); } 55% { transform: scale(1.35); } 100% { transform: scale(1); } }
.reaction-add { display: inline-grid; place-items: center; width: 30px; height: 30px; padding: 0; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--muted); cursor: pointer; transition: background-color .12s, border-color .12s, color .12s; }
.reaction-add[aria-expanded="true"] { background: #fff3d6; border-color: #f2b13c; color: var(--accent); }
.reaction-who, .reaction-login { border: 0; padding: 4px 2px; margin-left: 2px; background: none; color: var(--muted); font: 400 .8rem var(--f-body); cursor: pointer; text-decoration: none; }
@media (hover: hover) {
  .reaction-chip:hover:not(:disabled) { border-color: #f2b13c; color: var(--fg); }
  .reaction-chip:hover:not(:disabled) img { transform: scale(1.15); }
  .reaction-add:hover { background: #fff3d6; border-color: #f2b13c; color: var(--accent); }
  .reaction-who:hover, .reaction-login:hover { color: var(--accent); text-decoration: underline; }
}
.reaction-menu { position: fixed; z-index: 60; display: flex; align-items: center; gap: 2px; padding: 5px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; box-shadow: 0 10px 30px rgba(20, 22, 26, .18), 0 2px 6px rgba(20, 22, 26, .08); animation: reaction-menu-in .14s ease-out; }
.reaction-menu[data-side="bottom"] { animation-name: reaction-menu-in-below; }
@keyframes reaction-menu-in { from { opacity: 0; transform: translateY(6px) scale(.96); } }
@keyframes reaction-menu-in-below { from { opacity: 0; transform: translateY(-6px) scale(.96); } }
.reaction-menu button { display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 999px; background: none; color: var(--muted); cursor: pointer; transition: background-color .12s; }
.reaction-menu-emoji img { width: 26px; height: 26px; transition: transform .14s cubic-bezier(.3, 1.6, .5, 1); }
.reaction-menu-emoji:hover img, .reaction-menu-emoji:focus-visible img { transform: scale(1.28) translateY(-2px); }
.reaction-menu-emoji[aria-pressed="true"] { background: #fff3d6; box-shadow: inset 0 0 0 1px #f2b13c; }
.reaction-menu-more { position: relative; margin-left: 5px; }
.reaction-menu-more::before { content: ""; position: absolute; left: -4px; top: 9px; bottom: 9px; width: 1px; background: var(--line); }
.reaction-menu button:hover, .reaction-menu button:focus-visible { background: var(--surface-2); color: var(--fg); }
.reaction-menu button:focus-visible { outline-offset: -2px; }
.reaction-dialog { width: min(440px, calc(100% - 32px)); max-height: calc(100dvh - 32px); padding: 18px 20px 20px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--fg); box-shadow: 0 16px 48px rgba(20, 22, 26, .28); }
.reaction-dialog[open] { animation: reaction-dialog-in .16s ease-out; }
@keyframes reaction-dialog-in { from { opacity: 0; transform: translateY(8px) scale(.98); } }
.reaction-dialog::backdrop { background: #1d262b80; }
.reaction-picker-dialog { width: min(392px, calc(100% - 32px)); padding: 14px; }
.reaction-picker-body { margin-top: 10px; }
.reaction-picker-body emoji-picker, .ed-pop-emoji emoji-picker { width: 100%; height: min(400px, 60dvh); --background: var(--surface); --border-color: var(--line); --border-radius: 6px; --font-family: var(--f-body); --input-border-radius: 999px; --input-font-size: .9rem; --input-padding: .4rem .8rem; --indicator-color: var(--brand); --outline-color: var(--accent); --button-hover-background: var(--surface-2); --button-active-background: #fff3d6; }
@media (max-width: 640px) { .reaction-picker-body emoji-picker, .ed-pop-emoji emoji-picker { --num-columns: 7; } }
.reaction-dialog-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.reaction-dialog-heading h2 { font-size: 1rem; }
.reaction-close { display: grid; place-items: center; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 999px; background: none; color: var(--muted); font: 400 1.5rem/1 var(--f-body); cursor: pointer; }
.reaction-close:hover { background: var(--surface-2); color: var(--fg); }
.reaction-tabs { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 14px; border-bottom: 1px solid var(--line); }
.reaction-tab { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px 8px; margin-bottom: -1px; border: 0; border-bottom: 2px solid transparent; background: none; color: var(--muted); font: 600 .85rem var(--f-body); font-variant-numeric: tabular-nums; cursor: pointer; }
.reaction-tab img { width: 18px; height: 18px; }
.reaction-tab:hover { color: var(--fg); }
.reaction-tab[aria-pressed="true"] { border-bottom-color: var(--brand); color: var(--fg); }
.reaction-users { list-style: none; padding: 0; margin: 6px 0 12px; max-height: min(320px, 45dvh); overflow-y: auto; }
.reaction-users li { display: flex; align-items: center; gap: 10px; padding: 9px 4px; border-bottom: 1px solid var(--line); }
.reaction-users li:last-child { border-bottom: 0; }
.reaction-users a { color: var(--fg); font-weight: 600; text-decoration: none; overflow-wrap: anywhere; }
.reaction-users a:hover { color: var(--accent); }
.reaction-remove { margin-left: auto; border: 0; padding: 5px; background: none; color: var(--loss); font: 600 .875rem var(--f-body); cursor: pointer; }
.reaction-remove:hover { text-decoration: underline; }
.reaction-remove:disabled { opacity: .6; cursor: default; }
.reaction-error { color: var(--loss); font-size: .875rem; }
.reaction-error:empty { display: none; }
.ed-pop.ed-pop-emoji { width: min(360px, calc(100vw - 32px)); padding: 6px; }
@media (prefers-reduced-motion: reduce) {
  .reaction-chip, .reaction-chip img, .reaction-menu, .reaction-menu-emoji img, .reaction-dialog[open] { animation: none !important; transition: none !important; }
}
.activity { list-style: none; margin: 0; padding: 0; }
.activity li { padding: 11px 16px; border-bottom: 1px solid var(--line); }
.activity li:last-child { border-bottom: 0; }
.activity .t { font-weight: 600; color: var(--fg); text-decoration: none; overflow-wrap: anywhere; }
.activity .t:hover { color: var(--accent); }
.activity-tabs { margin: 10px 16px 4px; width: fit-content; }
.activity li.reply { border-left: 3px solid var(--line); }
.activity .re { color: var(--muted); font-weight: 500; }
.activity p { margin: 4px 0 0; font-size: .84rem; color: var(--muted); overflow-wrap: anywhere; }

.ranked-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.ranked-grid[hidden] { display: none; }
.ranked-grid > .panel { grid-column: 1 / -1; }
.ranked-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.ranked-card h2 { margin: 0; background: var(--dark); color: #fff; text-align: center; font: 700 .76rem var(--f-head); letter-spacing: .12em; text-transform: uppercase; padding: 10px; border-bottom: 3px solid var(--brand); }
.ranked-card ol { list-style: none; margin: 0; padding: 0; flex: 1; }
.ranked-card li { display: grid; grid-template-columns: 2.2em minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 7px 14px; border-bottom: 1px solid var(--line); }
.ranked-card li:nth-child(even) { background: var(--surface-2); }
.ranked-card li.empty { display: block; }
.ranked-card .pos { width: auto; font-size: .85rem; }
.ranked-card .player { display: flex; align-items: center; gap: 8px; min-width: 0; text-decoration: none; color: var(--fg); font-weight: 600; }
.ranked-card .player .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ranked-card .player:hover .nm { color: var(--accent); }
.ranked-card .elo { font-variant-numeric: tabular-nums; }
.ranked-card .more { background: none; border: 0; padding: 10px; font: 600 .86rem var(--f-body); color: var(--accent); cursor: pointer; }
.ranked-card .more:hover { background: var(--surface-2); }
.lb-layout[hidden] { display: none; }

.bb ul, .bb ol { margin: 4px 0; padding-left: 24px; white-space: normal; }
.bb li { white-space: pre-wrap; }
.bb-img { max-width: 100%; height: auto; border-radius: var(--r); vertical-align: middle; }
.bb-quote { margin: 6px 0; padding: 8px 12px; border-left: 3px solid var(--brand); background: var(--surface-2); border-radius: 0 var(--r) var(--r) 0; }
.bb-quote cite { display: block; font: 600 .78rem var(--f-body); font-style: normal; color: var(--muted); margin-bottom: 2px; }
.bb-code { margin: 6px 0; padding: 10px 12px; background: #1f2125; color: #e9ecef; border-radius: var(--r); font: .84rem/1.5 Consolas, ui-monospace, monospace; white-space: pre-wrap; overflow-x: auto; }
.bb-spoiler { margin: 6px 0; padding: 6px 12px; border: 1px dashed var(--line); border-radius: var(--r); }
.bb-spoiler summary { cursor: pointer; font-weight: 600; color: var(--muted); }
.bb-video { position: relative; max-width: 640px; aspect-ratio: 16 / 9; margin: 6px 0; }
.bb-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; border-radius: var(--r); }
.bb-size-1 { font-size: .7em; } .bb-size-2 { font-size: .85em; } .bb-size-4 { font-size: 1.2em; }
.bb-size-5 { font-size: 1.5em; } .bb-size-6 { font-size: 1.9em; line-height: 1.3; } .bb-size-7 { font-size: 2.4em; line-height: 1.2; }

.editor { position: relative; border: 1px solid #c9cdd2; border-radius: var(--r); background: var(--surface); font-weight: 400; }
.editor:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 15%, transparent); }
.ed-bar { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; padding: 5px 6px; border-bottom: 1px solid var(--line); background: var(--surface-2); border-radius: var(--r) var(--r) 0 0; position: sticky; top: 60px; z-index: 5; }
.ed-group { display: flex; gap: 1px; padding-right: 5px; margin-right: 1px; border-right: 1px solid var(--line); align-items: center; }
.ed-btn { display: inline-grid; place-items: center; min-width: 30px; height: 30px; padding: 0 6px; background: none; border: 1px solid transparent; border-radius: var(--r); color: var(--fg); cursor: pointer; font: 600 .92rem var(--f-body); }
.ed-btn svg { width: 16px; height: 16px; }
.ed-btn svg:not([fill]) { fill: currentColor; }
.ed-btn:hover { background: var(--surface); border-color: var(--line); }
.ed-btn[aria-pressed="true"], .ed-btn[aria-expanded="true"] { background: var(--surface); border-color: var(--fg); }
.ed-bar.source .ed-group { opacity: .4; pointer-events: none; }
.ed-color { position: relative; }
.ed-color i { position: absolute; left: 7px; right: 7px; bottom: 5px; height: 3px; background: var(--accent); border-radius: 1px; }
.ed-color span { margin-top: -4px; }
.ed-select select { width: auto; padding: 4px 6px; font-size: .82rem; height: 30px; }
.ed-pop-host { position: relative; }
.ed-pop { position: absolute; top: calc(100% + 6px); left: 0; z-index: 30; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: 0 6px 18px rgba(0,0,0,.14); padding: 12px; display: grid; gap: 8px; width: 270px; font-size: .85rem; }
.ed-pop[hidden] { display: none; }
.ed-pop label { display: grid; gap: 3px; font-weight: 600; }
.ed-pop p { margin: 0; }
.ed-swatches { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.ed-swatches button { aspect-ratio: 1; border: 1px solid rgba(0,0,0,.15); border-radius: var(--r); cursor: pointer; }
.ed-swatches button:hover { outline: 2px solid var(--fg); outline-offset: 1px; }
.ed-pop .ed-custom { display: flex; align-items: center; justify-content: space-between; }
.ed-custom input { width: 44px; height: 28px; padding: 2px; }
.ed-mode { margin-left: auto; background: none; border: 1px solid var(--line); border-radius: var(--r); padding: 4px 9px; font: 600 .7rem var(--f-head); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); cursor: pointer; }
.ed-mode[aria-pressed="true"] { background: var(--fg); color: var(--on-fg); border-color: var(--fg); }
.ed-area { padding: 10px 12px; outline: none; overflow-wrap: anywhere; max-height: 70vh; overflow-y: auto; white-space: normal; }
.ed-area.is-empty::before { content: attr(data-placeholder); color: var(--muted); pointer-events: none; position: absolute; }
.ed-area img { max-width: 100%; height: auto; cursor: pointer; border-radius: var(--r); }
.ed-area img.selected { outline: 2px solid var(--accent); outline-offset: 2px; }
.ed-area blockquote { margin: 6px 0; padding: 8px 12px; border-left: 3px solid var(--brand); background: var(--surface-2); }
.ed-area blockquote cite { display: block; font: 600 .78rem var(--f-body); font-style: normal; color: var(--muted); }
.ed-area pre { margin: 6px 0; padding: 10px 12px; background: #1f2125; color: #e9ecef; border-radius: var(--r); font: .84rem/1.5 Consolas, ui-monospace, monospace; white-space: pre-wrap; }
.ed-area details { margin: 6px 0; padding: 6px 12px; border: 1px dashed var(--line); border-radius: var(--r); }
.ed-area ul, .ed-area ol { padding-left: 24px; margin: 4px 0; }
.ed-area font[size="1"] { font-size: .7em; } .ed-area font[size="2"] { font-size: .85em; } .ed-area font[size="4"] { font-size: 1.2em; }
.ed-area font[size="5"] { font-size: 1.5em; } .ed-area font[size="6"] { font-size: 1.9em; } .ed-area font[size="7"] { font-size: 2.4em; }
.ed-video { display: inline-flex; flex-direction: column; width: 240px; margin: 6px 0; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: #000; color: #fff; font-size: .78rem; user-select: none; }
.ed-video img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.ed-video span { padding: 4px 8px; }
.ed-source { border: 0; border-radius: 0 0 var(--r) var(--r); font: .86rem/1.5 Consolas, ui-monospace, monospace; resize: vertical; }
.ed-source:focus { box-shadow: none; }
.img-tools { position: absolute; left: 12px; z-index: 6; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: 0 4px 12px rgba(0,0,0,.12); padding: 6px 10px; font-size: .8rem; }
.img-tools[hidden] { display: none; }
.img-tools input[type="range"] { width: 140px; padding: 0; }
.img-tools b { min-width: 52px; font-variant-numeric: tabular-nums; }
.img-tools button { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r); padding: 2px 8px; cursor: pointer; font: 600 .76rem var(--f-body); }
.img-tools button[data-w="-1"] { color: var(--loss); }
.ed-count { text-align: right; padding: 0 10px 6px; }
.ed-count:empty { display: none; }
.ed-count.over { color: var(--loss); }

.apply-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 18px; align-items: start; }
.apply-who { font-size: .9rem; color: var(--muted); }
.check { display: flex; gap: 8px; align-items: flex-start; font-size: .9rem; }
.check input { width: auto; margin-top: 4px; }
.app-list { list-style: none; margin: 0; padding: 0; }
.app-list li { padding: 12px 16px; border-bottom: 1px solid var(--line); display: grid; gap: 4px; }
.app-list li:last-child { border-bottom: 0; }
.app-reason { margin: 4px 0 0; font-size: .86rem; white-space: pre-wrap; }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.plain-list { margin: 0; padding: 12px 16px 12px 32px; font-size: .88rem; display: grid; gap: 4px; }
.tag.app-pending { background: #fff1d6; color: #a35c00; }
.tag.app-accepted { background: #e3f6e8; color: var(--win); }
.tag.app-denied { background: #ffe3e3; color: var(--loss); }
.panel-stats button[data-s="pending"] { border-top-color: var(--brand); }
.panel-stats button[data-s="accepted"] { border-top-color: var(--win); }
.panel-stats button[data-s="denied"] { border-top-color: var(--loss); }
.answers { margin: 0; }
.answers > div { padding: 14px 18px; border-bottom: 1px solid var(--line); }
.answers > div:last-child { border-bottom: 0; }
.answers dt { font-weight: 700; margin-bottom: 4px; }
.answers dd { margin: 0; color: var(--fg); }
.app-player { display: flex; gap: 12px; align-items: center; }

@media (max-width: 980px) {
  .profile-social, .apply-layout { grid-template-columns: minmax(0, 1fr); }
  .ed-bar { top: 0; }
}
@media (max-width: 640px) {
  .ranked-grid { grid-template-columns: minmax(0, 1fr); }
  .ed-pop { position: fixed; left: 16px; right: 16px; top: auto; width: auto; }
  .ed-pop.ed-pop-emoji { left: 8px; right: 8px; bottom: max(8px, env(safe-area-inset-bottom, 0px)); width: auto; border-radius: 10px; box-shadow: 0 -6px 30px rgba(0,0,0,.2); }
  .ed-group { border-right: 0; padding-right: 0; }
}

#staff-tabs:not(:empty) { margin-top: 18px; }
#staff-pane:not([hidden]) { margin-top: 18px; }
#tab-general > .profile-sections + .panel { margin-top: 18px; }
#tab-general[hidden] { display: none; }
@media (max-width: 640px) {
  .stat-select { display: block; margin-top: 8px; }
  #stats { display: none; }
  .podium { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .podium .spot { padding: 10px 6px; }
  .podium .spot > span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; font-size: .78rem; }
  .podium .spot b { font-size: 1rem; }
  .podium .spot img.body { height: 72px; }
  .lb-table th, .lb-table td { padding: 9px 8px; }
  .lb-table th:first-child, .lb-table .pos { width: 2.2em; }
  .lb-table .who { width: 100%; max-width: 0; overflow: hidden; text-overflow: ellipsis; }
  .lb-table .who .rank { display: none; }
  .lb-table .record { font-size: .78rem; }
  .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .kpis .kpi, .kpis .kpi:nth-child(odd), .kpis .kpi:nth-child(even) { border-right: 1px solid var(--line); }
  .kpis .kpi:nth-child(3n) { border-right: 0; }

  .profile-sections { display: flex; margin-top: 18px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); overflow: hidden; }
  .profile-sections button { flex: 1; min-height: 44px; padding: 6px 4px; border: 0; border-right: 1px solid var(--line); background: none; color: var(--muted); font: 600 .72rem var(--f-head); letter-spacing: .05em; text-transform: uppercase; cursor: pointer; }
  .profile-sections button:last-child { border-right: 0; }
  .profile-sections button[aria-pressed="true"] { background: var(--fg); color: var(--on-fg); }
  #tab-general[data-section] [data-part] { display: none; }
  #tab-general[data-section="ranked"] [data-part="ranked"],
  #tab-general[data-section="kits"] [data-part="kits"],
  #tab-general[data-section="matches"] [data-part="matches"] { display: block; }
  #tab-general[data-section="posts"] [data-part="posts"] { display: grid; }
  #tab-general:not([data-section="kits"]):not([data-section="matches"]) .profile-details { display: none; }

  .kit-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .kit-table, .kit-table tbody { display: block; }
  .kit-table tr { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2px 10px; align-items: center; padding: 8px 14px; border-bottom: 1px solid var(--line); }
  .kit-table tr:last-child { border-bottom: 0; }
  .kit-table td { display: block; padding: 0; border: 0; font-size: .82rem; min-width: 0; }
  .kit-table tbody tr:nth-child(even) td { background: none; }
  .kit-table tbody tr:nth-child(even) { background: var(--surface-2); }
  .kit-table td.kitname { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; font-size: .92rem; white-space: normal; }
  .kit-table td::before { content: attr(data-label); display: block; font: 600 .6rem var(--f-head); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
  .kit-table td.kitname::before { content: none; }
  .kit-table td.extra { display: none; }
  .kit-table tr.open { row-gap: 8px; }
  .kit-table tr.open td.extra { display: block; }
  .kit-more { display: grid; place-items: center; width: 44px; height: 32px; margin-right: -10px; border: 0; background: none; color: var(--muted); cursor: pointer; }
  .kit-more svg { transition: transform .15s; }
  .kit-table tr.open .kit-more svg { transform: rotate(180deg); }
}
@media (prefers-reduced-motion: reduce) { .kit-more svg { transition: none; } }
.profile-tabs { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; padding: 6px; }
.profile-tabs button { background: none; border: 0; border-radius: var(--r); padding: 7px 14px; font: 600 .74rem var(--f-head); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); cursor: pointer; }
.profile-tabs button:hover { color: var(--fg); background: var(--surface-2); }
.profile-tabs button[aria-pressed="true"] { background: var(--fg); color: var(--on-fg); }
.profile-tabs .count { display: inline-block; min-width: 18px; padding: 0 5px; margin-left: 4px; border-radius: 9px; background: var(--surface-2); color: var(--fg); font-size: .66rem; letter-spacing: 0; }
.profile-tabs button[aria-pressed="true"] .count { background: rgba(255,255,255,.2); color: #fff; }
.profile-tabs .staff-only { margin-left: auto; padding-right: 8px; font: 500 .64rem var(--f-head); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.punish-banner { display: grid; justify-items: center; padding: 8px 10px; color: #fff; text-align: center; border-radius: var(--r) var(--r) 0 0; }
.punish-banner.ban { background: var(--loss); }
.punish-banner.mute { background: #e8590c; }
.punish-banner b { font: 700 .95rem var(--f-head); letter-spacing: .12em; text-transform: uppercase; }
.punish-banner span { font: 500 .66rem var(--f-head); letter-spacing: .08em; text-transform: uppercase; opacity: .9; }
.staff-table td { vertical-align: top; }
.staff-table td.wrap { white-space: normal; min-width: 200px; overflow-wrap: anywhere; }
.staff-table tr.is-active td { background: #fff8f5; }
.ptype { display: inline-block; font: 700 .62rem var(--f-head); letter-spacing: .06em; text-transform: uppercase; padding: 2px 6px; border-radius: var(--r-sm); background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }
.ptype.t-ban, .ptype.t-ipban, .ptype.t-blacklist { background: #ffe3e3; color: var(--loss); border-color: #ffc9c9; }
.ptype.t-mute { background: #fff0e6; color: #d9480f; border-color: #ffd8bf; }
.ptype.t-warn { background: #fff9db; color: #a35c00; border-color: #ffec99; }
.tag.st-active, .tag.st-open { background: #e3f6e8; color: var(--win); }
.tag.st-answered { background: #e7f0ff; color: #1c64c9; }
.tag.st-expired, .tag.st-closed { background: #fff1d6; color: #a35c00; }
.tag.st-removed { background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }

.match-filters { display: grid; grid-template-columns: minmax(200px, 1.5fr) repeat(2, minmax(150px, 1fr)) auto; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); align-items: center; }
.match-filters .btn { padding-block: 9px; }
.match-filters label { display: block; min-width: 0; }
.match-summary { padding: 8px 16px; font-size: .82rem; color: var(--muted); border-bottom: 1px solid var(--line); }
.match-summary b { color: var(--fg); font-weight: 600; }
.matches .day-sep { list-style: none; padding: 6px 16px; background: var(--surface-2); border-bottom: 1px solid var(--line); font: 600 .66rem var(--f-head); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.matches.filterable .match .kit { cursor: pointer; }
.matches.filterable .match .kit:hover { color: var(--accent); text-decoration: underline; }
.event-name { font-weight: 700; color: var(--fg); text-decoration: none; }
.linkish { background: none; border: 0; padding: 0; font: inherit; color: var(--accent); cursor: pointer; text-decoration: underline; }
@media (max-width: 640px) {
  .match-filters { grid-template-columns: 1fr 1fr; }
  .match-filters .mf-player { grid-column: 1 / -1; }
  .match-filters .btn { grid-column: 1 / -1; }
}

.account { max-width: 640px; }
.account .panel { margin-bottom: 16px; }
.account .panel-head h2 { margin: 0; font-size: 1rem; }

.th-sort { background: none; border: 0; padding: 0; font: inherit; color: inherit; text-transform: inherit; letter-spacing: inherit; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; }
.th-sort::after { content: "↕"; opacity: .35; font-size: .85em; }
.th-sort[aria-pressed="true"] { color: var(--accent); }
.th-sort[aria-pressed="true"]::after { opacity: 1; }
.th-sort:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.leave-dialog { border: 1px solid var(--line); border-radius: 4px; padding: 0; max-width: min(440px, calc(100vw - 32px)); background: var(--surface); color: var(--fg); box-shadow: 0 12px 40px rgba(0, 0, 0, .25); }
.leave-dialog::backdrop { background: rgba(20, 22, 26, .55); }
.leave-dialog form { padding: 20px; margin: 0; }
.leave-dialog h2 { margin: 0 0 8px; font: 700 1rem var(--f-head); text-transform: uppercase; letter-spacing: .04em; }
.leave-dialog p { margin: 0 0 10px; color: var(--muted); font-size: .9rem; }
.leave-dialog .leave-host { display: block; margin: 10px 0 14px; padding: 8px 10px; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r); font-weight: 700; color: var(--fg); word-break: break-all; }
.leave-dialog .leave-url { font-size: .78rem; color: var(--muted); word-break: break-all; margin-bottom: 16px; }
.leave-dialog .leave-actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.event-kpis { margin-bottom: 14px; }
.kpis.flat { margin: 0; border-top: 0; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); }
.event-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.event-grid.one { grid-template-columns: minmax(0, 1fr); }
.event-grid > .panel:nth-child(3) { grid-column: 1 / -1; }
.team-dot { display: inline-block; width: 10px; height: 10px; border-radius: var(--r-sm); margin-right: 6px; vertical-align: -1px; border: 1px solid rgba(0,0,0,.15); }
.team-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin-bottom: 14px; }
.team-card { border-top: 3px solid var(--line); }
.team-members { display: grid; gap: 6px; padding: 10px 16px; border-bottom: 1px solid var(--line); }
.full-stats { margin-top: 18px; }
.full-stats summary { padding: 10px 16px; cursor: pointer; font: 600 .8rem var(--f-head); border-bottom: 1px solid var(--line); }
.full-stats th:first-child, .full-stats tbody td:first-child { position: sticky; left: 0; background: var(--surface); }
.full-stats th:first-child { background: var(--surface-2); }
.timeline { list-style: none; margin: 0; padding: 0; max-height: 520px; overflow-y: auto; }
.timeline li { display: flex; gap: 12px; padding: 8px 16px; border-bottom: 1px solid var(--line); font-size: .88rem; align-items: baseline; }
.timeline li:last-child { border-bottom: 0; }
.timeline .t { color: var(--muted); min-width: 3.2em; font-weight: 600; }
@media (max-width: 980px) {
  .event-grid { grid-template-columns: minmax(0, 1fr); }
  .kpis.flat .kpi { border-bottom: 1px solid var(--line); }
}
.device-list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: var(--r); }
.device-list:empty { display: none; }
.device { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.device:last-child { border-bottom: 0; }
.device-info { display: grid; gap: 2px; min-width: 0; }
.device-info b { overflow-wrap: anywhere; }
.post .content .top .edited { margin-right: auto; padding: 0; border: 0; background: none; color: var(--muted); font: 400 .76rem var(--f-body); }
.post .content .top .edited::before { content: "·"; margin-right: 8px; }
.post .content .top button.edited { cursor: pointer; text-decoration: underline dotted; text-underline-offset: 3px; }
.post .content .top button.edited:hover { color: var(--accent); }
.post.editing .reactions, .post.editing .actions { display: none; }
.post-edit { display: grid; gap: 10px; }
.post-edit-actions { display: flex; gap: 8px; justify-content: flex-end; }
.history-dialog { width: min(680px, calc(100% - 32px)); }
.history-list { display: grid; gap: 12px; margin-top: 14px; max-height: min(620px, calc(100dvh - 140px)); overflow-y: auto; }
.history-version { border: 1px solid var(--line); border-radius: 6px; padding: 12px 14px; }
.history-version.current { border-color: #f2b13c; background: #fffbf2; }
.history-version header { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; margin-bottom: 8px; font-size: .8rem; color: var(--muted); }
.history-version header b { color: var(--fg); font-family: var(--f-head); text-transform: uppercase; letter-spacing: .04em; font-size: .76rem; }
.history-version header a { color: var(--fg); font-weight: 600; text-decoration: none; }
.history-version header img { width: 22px; height: 22px; border-radius: var(--r); image-rendering: pixelated; }
.history-title { font-weight: 700; margin-bottom: 6px; }
.history-version .body-text { overflow-wrap: anywhere; }
a.mention { display: inline-block; padding: 0 3px; border-radius: 4px; background: #fff3d6; color: #8a5300; font-weight: 600; text-decoration: none; line-height: 1.45; }
a.mention:hover { background: #ffe5a8; }
.mention-box { position: absolute; z-index: 40; min-width: 200px; max-width: 280px; padding: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 10px 28px rgba(20, 22, 26, .16); }
.mention-box button { display: flex; align-items: center; gap: 8px; width: 100%; padding: 6px 8px; border: 0; border-radius: 5px; background: none; color: var(--fg); font: 600 .85rem var(--f-body); text-align: left; cursor: pointer; }
.mention-box button img { width: 22px; height: 22px; border-radius: var(--r); image-rendering: pixelated; }
.mention-box button[aria-selected="true"], .mention-box button:hover { background: var(--surface-2); }
.mention-box .rank { margin-left: auto; }
.confirm-dialog { width: min(400px, calc(100% - 32px)); padding: 20px 22px 18px; }
.confirm-dialog h2 { font-size: 1rem; }
.confirm-dialog p { margin: 10px 0 0; color: var(--muted); }
.confirm-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }
.wall-meta .edited { padding: 0; border: 0; background: none; color: var(--muted); font: 400 .78rem var(--f-body); }
.wall-meta .edited::before { content: "·"; margin-right: 8px; }
.wall-meta button.edited { cursor: pointer; text-decoration: underline dotted; text-underline-offset: 3px; }
.wall-meta button.edited:hover { color: var(--accent); }
.wall-post.editing > .wall-body > .wall-footer { display: none; }
.wall-form .editor { font-size: .92rem; }

/* Smooth, rounded look */
header.nav { background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: saturate(160%) blur(10px); -webkit-backdrop-filter: saturate(160%) blur(10px); box-shadow: 0 0 10px rgba(0, 0, 0, .14); }
.nav nav a { transition: color .2s var(--ease), border-color .2s var(--ease); }
.panel, .news article, .strip > *, .panel-stats button { border-color: transparent; box-shadow: var(--shadow); }
:root[data-theme="dark"] .panel, :root[data-theme="dark"] .news article, :root[data-theme="dark"] .strip > *, :root[data-theme="dark"] .panel-stats button { border-color: var(--line); }
.panel-head:first-child { border-radius: var(--r) var(--r) 0 0; }

.btn, .strip a, .strip > button, .theme-toggle, .search-toggle, .notification-bell, .menu-btn, .user-menu > button, .ip-copy .ip-action {
  transition: background-color .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease), box-shadow .2s var(--ease), transform .2s var(--ease), filter .2s var(--ease);
}
.btn { border-radius: var(--r); padding: 11px 18px; }
.btn-primary, .strip a.store { box-shadow: inset 0 0 1px 1px rgba(255, 255, 255, .32), 0 1px 2px rgba(0, 0, 0, .15); }
.btn-primary:hover, .strip a.store:hover { transform: translateY(-1px); box-shadow: inset 0 0 1px 1px rgba(255, 255, 255, .32), 0 4px 12px color-mix(in srgb, var(--accent) 35%, transparent); }
.btn-ghost, .btn-danger { box-shadow: var(--shadow); }
.btn-ghost:hover, .btn-danger:hover, .strip > button:hover { transform: translateY(-1px); box-shadow: var(--shadow-lg); }
.btn:active, .strip a:active, .strip > button:active { transform: translateY(0); filter: brightness(.96); }
.btn:disabled { transform: none; box-shadow: none; }

.search-box input[type="search"] { border-radius: var(--r); border-color: color-mix(in srgb, var(--line) 60%, transparent); background: var(--surface-2); transition: border-color .2s var(--ease), background-color .2s var(--ease), box-shadow .2s var(--ease); }
.search-box input[type="search"]:hover { border-color: var(--line); }
.search-box input[type="search"]:focus { border-color: var(--brand); background: var(--surface); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 22%, transparent); }
.search-box .search-icon { transition: color .2s var(--ease); }
.nav-search input[type="search"] { width: 210px; }

input[type="text"], input[type="password"], input[type="number"], input[type="url"], select, textarea { transition: border-color .2s var(--ease), box-shadow .2s var(--ease); }
.suggest, .user-menu .drop, .notification-panel { border-radius: var(--r); box-shadow: var(--shadow-lg); overflow: hidden; animation: pop-in .16s var(--ease); }
@keyframes pop-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

/* One field style everywhere: forms, filters, search */
input[type="text"], input[type="password"], input[type="search"], input[type="number"], input[type="url"], input[type="email"], select, textarea {
  background-color: var(--surface-2); border: 1px solid color-mix(in srgb, var(--line) 60%, transparent); border-radius: var(--r); color: var(--fg); font-family: var(--f-body);
  transition: border-color .2s var(--ease), background-color .2s var(--ease), box-shadow .2s var(--ease);
}
input[type="text"]:hover, input[type="password"]:hover, input[type="search"]:hover, input[type="number"]:hover, input[type="url"]:hover, input[type="email"]:hover, select:hover, textarea:hover { border-color: var(--line); }
input:focus, select:focus, textarea:focus { border-color: var(--brand); background-color: var(--surface); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 22%, transparent); }
:root[data-theme="dark"] input, :root[data-theme="dark"] select, :root[data-theme="dark"] textarea { border-color: var(--line); }
:root[data-theme="dark"] input:focus, :root[data-theme="dark"] select:focus, :root[data-theme="dark"] textarea:focus { border-color: var(--brand); }
.toolbar input, .toolbar select, .search-box input[type="search"] { height: 38px; }
.toolbar input, .toolbar select { padding-block: 0; }
.toolbar .search-box { flex: 0 1 260px; }
.toolbar .search-box input { max-width: none; }
.toolbar > .chip { border: 1px solid var(--line); border-radius: var(--r); }
.chip, .chips button, .tab, .tabs button { transition: background-color .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease); }
.editor { background-color: var(--surface); border-color: color-mix(in srgb, var(--line) 60%, transparent); }
.editor:hover { border-color: var(--line); }
.editor:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 22%, transparent); }
.editor input:focus, .editor select:focus, .editor textarea:focus, .editor [contenteditable]:focus { box-shadow: none; }
.editor textarea, .editor [contenteditable] { border: 0; background: transparent; }
