/* Mc.Tierlist.Asia — gold theme */
:root {
  --bg: #07080c;
  --bg-2: #0c0e14;
  --surface: #11141c;
  --surface-2: #161a24;
  --border: rgba(255, 255, 255, 0.07);
  --border-strong: rgba(255, 255, 255, 0.13);
  --text: #eceef4;
  --muted: #8b90a3;
  --dim: #5c6175;
  --gold: #f2c14e;
  --gold-2: #ffd978;
  --gold-3: #c98a12;
  --gold-grad: linear-gradient(135deg, #fff1b8 0%, #ffd46a 28%, #f2b52c 55%, #c47f0e 100%);
  --gold-glow: 0 0 0 1px rgba(242, 193, 78, 0.35), 0 10px 40px -10px rgba(242, 181, 44, 0.45);
  --silver-grad: linear-gradient(135deg, #f4f6fb 0%, #c3c9d6 45%, #8a93a6 100%);
  --bronze-grad: linear-gradient(135deg, #ffd2a6 0%, #d98b4a 45%, #8f4e1f 100%);
  --danger: #ff5a5f;
  --success: #3ddc97;
  --radius: 16px;
  --radius-sm: 10px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --font: 'Inter', system-ui, -apple-system, 'Noto Sans TC', 'Microsoft JhengHei', sans-serif;
  --font-display: 'Space Grotesk', 'Inter', 'Noto Sans TC', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
body::before {
  /* subtle pixel grid + top glow */
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(242, 181, 44, 0.13), transparent 70%),
    linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px) 0 0 / 32px 32px,
    linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px) 0 0 / 32px 32px;
  mask-image: linear-gradient(to bottom, #000 0%, #000 50%, transparent 100%);
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button, input, select { font: inherit; color: inherit; }
::selection { background: rgba(242, 193, 78, 0.35); }

.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* ---------- Top progress / loader ---------- */
.page-loader {
  position: fixed; top: 0; left: 0; height: 2px; width: 0;
  background: var(--gold-grad); z-index: 100;
  box-shadow: 0 0 12px var(--gold);
  animation: loadbar 1.1s var(--ease) forwards;
}
@keyframes loadbar { 0% { width: 0; opacity: 1; } 80% { width: 100%; opacity: 1; } 100% { width: 100%; opacity: 0; } }

/* ---------- Navigation ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  transition: background 0.3s, border-color 0.3s, backdrop-filter 0.3s;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(7, 8, 12, 0.72);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom-color: var(--border);
}
.nav-inner { display: flex; align-items: center; gap: 28px; height: 68px; }
.brand { display: flex; align-items: center; gap: 14px; white-space: nowrap; }
.brand-cube { width: 36px; height: 36px; filter: drop-shadow(0 6px 14px rgba(92, 154, 230, 0.35)); transition: transform 0.6s var(--ease); }
.brand:hover .brand-cube { transform: translateY(-3px) rotate(-6deg); }
.brand-text { display: grid; gap: 7px; line-height: 1; }
.brand-title { font: 400 17px/1 'Press Start 2P', monospace; color: #7fb3ff; letter-spacing: 0.02em; text-shadow: 0 2px 0 #2f5d9c; }
.brand-sub { font: 400 9px/1 'Press Start 2P', monospace; color: #6b7285; letter-spacing: 0.08em; }
.brand-sm .brand-cube { width: 26px; height: 26px; }
.brand-sm .brand-title { font-size: 12px; }
.brand-sm .brand-sub { font-size: 7px; }
.nav-links { display: flex; gap: 4px; position: relative; }
.nav-links a {
  position: relative; padding: 8px 14px; border-radius: 10px; color: var(--muted); font-weight: 500; font-size: 14px;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--text); }
.nav-links a.active { color: var(--text); }
.nav-links a.active::after {
  content: ''; position: absolute; left: 14px; right: 14px; bottom: 2px; height: 2px; border-radius: 2px;
  background: var(--gold-grad); box-shadow: 0 0 10px var(--gold);
  animation: underline-in 0.5s var(--ease);
}
@keyframes underline-in { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.nav-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.nav-search { position: relative; }
.nav-search input {
  width: 220px; height: 38px; padding: 0 36px 0 36px; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--border); outline: none;
  font-size: 14px; transition: border-color 0.2s, width 0.35s var(--ease), box-shadow 0.2s;
}
.nav-search input:focus { border-color: rgba(242, 193, 78, 0.5); width: 260px; box-shadow: 0 0 0 4px rgba(242, 193, 78, 0.08); }
.nav-search svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--dim); pointer-events: none; }
.nav-search kbd {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  font: 600 11px var(--font-mono); color: var(--dim); border: 1px solid var(--border-strong); border-radius: 6px; padding: 1px 6px;
}
.btn.menu-btn { display: none; }
[hidden] { display: none !important; }

/* ---------- Buttons ---------- */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 42px; padding: 0 18px; border-radius: 12px; border: 1px solid var(--border-strong);
  background: var(--surface); color: var(--text); font-weight: 600; font-size: 14px; cursor: pointer;
  transition: transform 0.2s var(--ease), border-color 0.2s, background 0.2s, box-shadow 0.3s;
  overflow: hidden; white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); border-color: rgba(255, 255, 255, 0.22); background: var(--surface-2); }
.btn:active { transform: translateY(0) scale(0.98); }
.btn:disabled { opacity: 0.5; pointer-events: none; }
.btn-gold { background: var(--gold-grad); color: #1a1204; border-color: transparent; box-shadow: 0 6px 24px -8px rgba(242, 181, 44, 0.7); }
.btn-gold:hover { background: var(--gold-grad); box-shadow: 0 12px 34px -8px rgba(242, 181, 44, 0.85); }
.btn-gold::after, .shine::after {
  content: ''; position: absolute; top: 0; left: -120%; width: 60%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.55), transparent);
  transform: skewX(-20deg); transition: left 0.7s var(--ease);
}
.btn-gold:hover::after { left: 140%; }
.btn-sm { height: 34px; padding: 0 12px; font-size: 13px; border-radius: 10px; }
.btn-ghost { background: transparent; }
.btn-danger { color: var(--danger); }
.btn-danger:hover { border-color: rgba(255, 90, 95, 0.5); background: rgba(255, 90, 95, 0.08); }
.btn-discord { background: #5865f2; border-color: transparent; color: #fff; }
.btn-discord:hover { background: #4752c4; box-shadow: 0 10px 30px -10px rgba(88, 101, 242, 0.8); }
.btn .arrow { transition: transform 0.3s var(--ease); }
.btn:hover .arrow { transform: translateX(4px); }

/* ---------- Hero ---------- */
.hero { position: relative; padding: 40px 0 20px; }
.hero-card {
  position: relative; border-radius: 24px; overflow: hidden; min-height: 540px;
  border: 1px solid var(--border);
  background:
    radial-gradient(ellipse 60% 70% at 78% 40%, rgba(242, 181, 44, 0.16), transparent 70%),
    radial-gradient(ellipse 40% 50% at 10% 100%, rgba(201, 138, 18, 0.12), transparent 70%),
    linear-gradient(160deg, #10131b 0%, #090a0f 100%);
  display: grid; grid-template-columns: 1.1fr 0.9fr; align-items: center;
}
.hero-card::before {
  /* voxel landscape silhouette */
  content: ''; position: absolute; inset: auto 0 0 0; height: 45%; opacity: 0.55; pointer-events: none;
  background:
    linear-gradient(to top, #07080c 0%, transparent 100%),
    repeating-linear-gradient(90deg, transparent 0 40px, rgba(255, 255, 255, 0.015) 40px 41px);
  -webkit-mask: linear-gradient(to top, #000, transparent);
          mask: linear-gradient(to top, #000, transparent);
}
#particles { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.hero-content { position: relative; z-index: 2; padding: 64px 56px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 8px; border-radius: 999px;
  background: rgba(242, 193, 78, 0.08); border: 1px solid rgba(242, 193, 78, 0.25);
  color: var(--gold-2); font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
}
.eyebrow .pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 0 rgba(242, 193, 78, 0.7); animation: pulse 2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(242, 193, 78, 0.7); } 70% { box-shadow: 0 0 0 10px rgba(242, 193, 78, 0); } 100% { box-shadow: 0 0 0 0 rgba(242, 193, 78, 0); } }
.hero h1 {
  margin: 22px 0 16px; font-family: var(--font-display); font-weight: 700; letter-spacing: -0.035em;
  font-size: clamp(40px, 6.2vw, 76px); line-height: 1.02;
}
.gold-text {
  background: linear-gradient(110deg, #c47f0e 0%, #ffd46a 20%, #fff5cf 32%, #ffd46a 44%, #f2b52c 60%, #c47f0e 80%, #ffd46a 100%);
  background-size: 220% auto; -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: shimmer 5s linear infinite;
}
@keyframes shimmer { to { background-position: -220% center; } }
.hero p.lead { font-size: 17px; color: #b9bdcc; max-width: 520px; margin: 0 0 30px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-emblem { position: relative; z-index: 2; display: grid; place-items: center; padding: 40px; }
.hero-emblem .emblem-wrap { position: relative; width: min(360px, 80%); aspect-ratio: 1; animation: float 6s ease-in-out infinite; }
.hero-emblem img { position: relative; width: 100%; height: 100%; filter: drop-shadow(0 30px 60px rgba(242, 181, 44, 0.35)); }
.hero-emblem .ring {
  position: absolute; inset: -8%; border-radius: 50%; border: 1px dashed rgba(242, 193, 78, 0.25);
  animation: spin 40s linear infinite;
}
.hero-emblem .ring.r2 { inset: -18%; border-style: solid; border-color: rgba(242, 193, 78, 0.08); animation-duration: 60s; animation-direction: reverse; }
.hero-emblem .glow { position: absolute; inset: 10%; border-radius: 50%; background: radial-gradient(circle, rgba(242, 181, 44, 0.35), transparent 65%); filter: blur(30px); animation: breathe 4s ease-in-out infinite; }
@keyframes float { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-14px) rotate(1.5deg); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes breathe { 0%, 100% { opacity: 0.6; transform: scale(0.95); } 50% { opacity: 1; transform: scale(1.05); } }

/* ---------- Stats ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin: 20px 0 0; }
.stat {
  position: relative; padding: 22px 22px 20px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--border); overflow: hidden;
}
.stat .num { font-family: var(--font-display); font-size: 32px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; }
.stat .lbl { margin-top: 6px; font-size: 12px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.stat .ico { position: absolute; right: 18px; top: 18px; color: var(--gold); opacity: 0.8; }

/* spotlight card (mouse-follow glow) */
.spot { position: relative; isolation: isolate; transition: transform 0.35s var(--ease), border-color 0.3s; }
.spot::before {
  content: ''; position: absolute; inset: 0; border-radius: inherit; z-index: -1; opacity: 0; transition: opacity 0.3s;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), rgba(242, 193, 78, 0.12), transparent 45%);
}
.spot::after {
  content: ''; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; opacity: 0; transition: opacity 0.3s; pointer-events: none;
  background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 50%), rgba(255, 212, 106, 0.8), transparent 50%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
}
.spot:hover { transform: translateY(-4px); }
.spot:hover::before, .spot:hover::after { opacity: 1; }

/* ---------- Sections ---------- */
section.block { padding: 64px 0 8px; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.kicker { font-size: 12px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold); margin-bottom: 6px; }
.section-head h2 { margin: 0; font-family: var(--font-display); font-size: clamp(24px, 3vw, 32px); letter-spacing: -0.02em; }
.link-more { font-size: 12px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); display: inline-flex; gap: 6px; align-items: center; transition: color 0.2s; }
.link-more:hover { color: var(--gold); }

/* tier ladder */
.tier-ladder { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.tier-col { padding: 20px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); }
.tier-col h3 { margin: 0 0 14px; font-family: var(--font-display); font-size: 18px; display: flex; align-items: center; gap: 10px; }
.tier-col h3 .dot { width: 10px; height: 10px; border-radius: 3px; transform: rotate(45deg); }
.tier-col .row { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; border-top: 1px solid var(--border); font-size: 14px; }
.tier-col .row span:last-child { color: var(--muted); font-family: var(--font-mono); font-size: 13px; }

/* feature grid */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.feature { padding: 26px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); }
.feature .f-ico {
  width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 16px;
  background: rgba(242, 193, 78, 0.1); color: var(--gold); border: 1px solid rgba(242, 193, 78, 0.22);
}
.feature h3 { margin: 0 0 6px; font-size: 17px; }
.feature p { margin: 0; color: var(--muted); font-size: 14px; }

/* ---------- Tier & region badges ---------- */
.tier {
  display: inline-flex; align-items: center; justify-content: center; min-width: 46px; height: 26px; padding: 0 8px;
  border-radius: 8px; font: 800 12px/1 var(--font-mono); letter-spacing: 0.04em;
  border: 1px solid transparent;
}
.tier.t1 { background: var(--gold-grad); color: #2a1a02; box-shadow: 0 0 18px -4px rgba(242, 181, 44, 0.7); }
.tier.t2 { background: var(--silver-grad); color: #1b1f28; }
.tier.t3 { background: var(--bronze-grad); color: #2a1406; }
.tier.t4 { background: #232a3a; color: #aeb8d4; border-color: #323b52; }
.tier.t5 { background: #1a1e28; color: #7d849a; border-color: #262c3a; }
.tier.lt { filter: saturate(0.75) brightness(0.9); }
.tier.retired { opacity: 0.55; }
.tier.lg { min-width: 88px; height: 44px; font-size: 20px; border-radius: 12px; }
.region {
  display: inline-grid; place-items: center; width: 42px; height: 26px; border-radius: 8px;
  font: 800 12px/1 var(--font-mono); letter-spacing: 0.04em;
}
.region.AS { background: rgba(242, 193, 78, 0.12); color: var(--gold-2); }
.region.NA { background: rgba(255, 90, 95, 0.14); color: #ff8a8e; }
.region.EU { background: rgba(61, 220, 151, 0.12); color: #6ff0b6; }
.region.SA { background: rgba(255, 152, 67, 0.14); color: #ffb176; }
.region.OC { background: rgba(56, 189, 248, 0.14); color: #7dd3fc; }
.region.AF { background: rgba(168, 85, 247, 0.14); color: #c9a0ff; }

/* ---------- Leaderboard ---------- */
.board-shell { border-radius: 20px; background: var(--bg-2); border: 1px solid var(--border); padding: 18px; }
.mode-tabs { display: flex; gap: 8px; margin-bottom: 18px; overflow-x: auto; }
.mode-tab {
  position: relative; display: flex; align-items: center; gap: 10px; padding: 12px 18px; border-radius: 14px;
  background: var(--surface); border: 1px solid var(--border); font-weight: 700; cursor: pointer; white-space: nowrap;
}
.mode-tab.active { border-color: rgba(242, 193, 78, 0.45); background: linear-gradient(180deg, rgba(242, 193, 78, 0.12), rgba(242, 193, 78, 0.02)); box-shadow: var(--gold-glow); }
.mode-tab img, .mode-tab svg { width: 22px; height: 22px; }
.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 14px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip {
  height: 32px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface);
  font-size: 13px; font-weight: 600; color: var(--muted); cursor: pointer; transition: all 0.2s var(--ease);
}
.chip:hover { color: var(--text); border-color: var(--border-strong); }
.chip.active { color: #1a1204; background: var(--gold-grad); border-color: transparent; }
.search-inline { position: relative; margin-left: auto; }
.search-inline input {
  height: 36px; width: 220px; padding: 0 12px 0 34px; border-radius: 10px; background: var(--surface); border: 1px solid var(--border); outline: none;
}
.search-inline input:focus { border-color: rgba(242, 193, 78, 0.5); }
.search-inline svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--dim); }

.board-head, .board-row { display: grid; grid-template-columns: 150px 1fr 90px 130px; align-items: center; gap: 12px; }
.board-head { padding: 6px 12px 10px; font-size: 11px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--dim); }
.board-row {
  position: relative; margin-bottom: 8px; padding: 0 12px 0 0; min-height: 72px; border-radius: 14px;
  background: var(--surface); border: 1px solid var(--border); overflow: hidden;
  transition: transform 0.3s var(--ease), border-color 0.3s, background 0.3s;
}
.board-row:hover { transform: translateX(4px); border-color: var(--border-strong); background: var(--surface-2); }
.rank-cell { position: relative; height: 100%; min-height: 72px; display: flex; align-items: center; gap: 10px; padding-left: 20px; }
.rank-cell .n { position: relative; z-index: 1; font-family: var(--font-display); font-weight: 800; font-style: italic; font-size: 28px; width: 56px; }
.rank-cell img { position: relative; z-index: 1; width: 44px; height: 44px; border-radius: 8px; image-rendering: pixelated; }
.board-row.top .rank-cell::before {
  content: ''; position: absolute; inset: 0 12px 0 0; clip-path: polygon(0 0, 100% 0, 86% 100%, 0 100%);
}
.board-row.r1 .rank-cell::before { background: var(--gold-grad); }
.board-row.r2 .rank-cell::before { background: var(--silver-grad); }
.board-row.r3 .rank-cell::before { background: var(--bronze-grad); }
.board-row.top .rank-cell .n { color: rgba(0, 0, 0, 0.72); }
.board-row.top .rank-cell::after {
  content: ''; position: absolute; top: 0; left: -60%; width: 40%; height: 100%; z-index: 1;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.5), transparent); transform: skewX(-20deg);
  animation: sweep 3.6s ease-in-out infinite;
}
.board-row.r2 .rank-cell::after { animation-delay: 0.4s; }
.board-row.r3 .rank-cell::after { animation-delay: 0.8s; }
@keyframes sweep { 0%, 60% { left: -60%; } 100% { left: 130%; } }
.board-row.r1 { border-color: rgba(242, 193, 78, 0.35); box-shadow: 0 10px 40px -20px rgba(242, 181, 44, 0.6); }
.player-cell .pname { font-family: var(--font-display); font-size: 19px; font-weight: 700; letter-spacing: -0.01em; }
.player-cell .psub { font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.player-cell .psub b { color: var(--gold-2); font-weight: 600; }
.tier-cell { display: flex; justify-content: flex-end; }
.board-more { display: flex; justify-content: center; margin-top: 14px; }

/* ---------- Empty state ---------- */
.empty {
  display: grid; place-items: center; text-align: center; padding: 70px 20px; border-radius: 16px;
  border: 1px dashed var(--border-strong); background: repeating-linear-gradient(-45deg, transparent 0 14px, rgba(255, 255, 255, 0.012) 14px 28px);
}
.empty .e-ico { width: 72px; height: 72px; border-radius: 20px; display: grid; place-items: center; margin-bottom: 18px; background: rgba(242, 193, 78, 0.08); border: 1px solid rgba(242, 193, 78, 0.22); color: var(--gold); animation: float 4s ease-in-out infinite; }
.empty h3 { margin: 0 0 6px; font-family: var(--font-display); font-size: 20px; }
.empty p { margin: 0; color: var(--muted); max-width: 380px; }

/* skeleton */
.skeleton { background: linear-gradient(90deg, var(--surface) 0%, var(--surface-2) 50%, var(--surface) 100%); background-size: 200% 100%; animation: skel 1.3s linear infinite; border-radius: 14px; }
@keyframes skel { to { background-position: -200% 0; } }

/* ---------- Player profile ---------- */
.profile { display: grid; place-items: center; padding: 40px 0; }
.profile-card { position: relative; padding: 28px; border-radius: 20px; background: var(--surface); border: 1px solid var(--border); overflow: hidden; }
.profile-card .body-render { height: 300px; display: grid; place-items: center; background: radial-gradient(circle at 50% 60%, rgba(242, 181, 44, 0.22), transparent 60%); }
.profile-card .body-render img { height: 270px; image-rendering: pixelated; filter: drop-shadow(0 18px 30px rgba(0, 0, 0, 0.6)); animation: float 5s ease-in-out infinite; }
.profile-card h1 { margin: 16px 0 6px; font-family: var(--font-display); font-size: 30px; letter-spacing: -0.02em; text-align: center; }
.profile-meta { display: flex; justify-content: center; gap: 8px; }
.profile-main { display: grid; gap: 16px; align-content: start; }
.kv { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.mode-row { display: flex; align-items: center; justify-content: space-between; padding: 20px 22px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border); }
.mode-row .left { display: flex; align-items: center; gap: 14px; font-weight: 700; font-size: 17px; }
.mode-row .left .m-ico { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: rgba(242, 193, 78, 0.1); color: var(--gold); }

/* ---------- Docs ---------- */
.docs { display: grid; grid-template-columns: 220px 1fr; gap: 36px; padding: 40px 0 80px; }
.docs nav { position: sticky; top: 90px; align-self: start; display: grid; gap: 2px; }
.docs nav a { padding: 7px 12px; border-radius: 8px; color: var(--muted); font-size: 14px; border-left: 2px solid transparent; transition: all 0.2s; }
.docs nav a:hover, .docs nav a.active { color: var(--text); background: var(--surface); border-left-color: var(--gold); }
.docs h1 { font-family: var(--font-display); font-size: 40px; letter-spacing: -0.03em; margin: 0 0 10px; }
.docs h2 { font-family: var(--font-display); font-size: 24px; margin: 48px 0 12px; letter-spacing: -0.01em; scroll-margin-top: 90px; }
.docs h3 { font-size: 16px; margin: 26px 0 10px; }
.docs p, .docs li { color: #b9bdcc; }
.docs code { font-family: var(--font-mono); font-size: 0.88em; padding: 2px 6px; border-radius: 6px; background: var(--surface-2); color: var(--gold-2); }
.code {
  position: relative; margin: 12px 0; border-radius: 14px; background: #0a0c12; border: 1px solid var(--border); overflow: hidden;
}
.code .code-head { display: flex; justify-content: space-between; align-items: center; padding: 8px 14px; border-bottom: 1px solid var(--border); font-size: 12px; color: var(--dim); font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }
.code pre { margin: 0; padding: 16px; overflow-x: auto; font: 13px/1.65 var(--font-mono); color: #d5d9e6; }
.code pre .k { color: var(--gold-2); } .code pre .s { color: #8ee6b4; } .code pre .c { color: var(--dim); } .code pre .n { color: #9ab8ff; }
.copy-btn { border: 1px solid var(--border-strong); background: transparent; border-radius: 7px; padding: 3px 9px; font-size: 11px; color: var(--muted); cursor: pointer; transition: all 0.2s; }
.copy-btn:hover { color: var(--gold); border-color: rgba(242, 193, 78, 0.5); }
.endpoint { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); margin: 10px 0; flex-wrap: wrap; }
.method { font: 800 12px var(--font-mono); padding: 4px 8px; border-radius: 6px; background: rgba(61, 220, 151, 0.14); color: var(--success); }
.endpoint .path { font-family: var(--font-mono); font-size: 14px; }
.endpoint .desc { color: var(--muted); font-size: 14px; margin-left: auto; }
table.simple { width: 100%; border-collapse: collapse; font-size: 14px; margin: 10px 0; }
table.simple th, table.simple td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); }
table.simple th { color: var(--dim); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; }
.callout { padding: 14px 16px; border-radius: 12px; border: 1px solid rgba(242, 193, 78, 0.3); background: rgba(242, 193, 78, 0.06); color: #e7d9b1; font-size: 14px; }

/* ---------- Footer ---------- */
footer.site { margin-top: 90px; border-top: 1px solid var(--border); padding: 36px 0 44px; color: var(--dim); font-size: 13px; }
footer.site .inner { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
footer.site a:hover { color: var(--gold); }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(24px); filter: blur(4px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease), filter 0.8s var(--ease); transition-delay: var(--d, 0s); }
.reveal.in { opacity: 1; transform: none; filter: none; }

/* ---------- Toast ---------- */
.toasts { position: fixed; right: 20px; bottom: 20px; z-index: 200; display: grid; gap: 10px; }
.toast {
  padding: 12px 16px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border-strong);
  box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.6); font-size: 14px; min-width: 220px;
  animation: toast-in 0.45s var(--ease);
}
.toast.ok { border-color: rgba(61, 220, 151, 0.4); }
.toast.err { border-color: rgba(255, 90, 95, 0.5); }
.toast.out { animation: toast-out 0.3s var(--ease) forwards; }
@keyframes toast-in { from { opacity: 0; transform: translateY(16px) scale(0.96); } }
@keyframes toast-out { to { opacity: 0; transform: translateX(30px); } }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .hero-card { grid-template-columns: 1fr; }
  .hero-emblem { order: -1; padding: 40px 20px 0; }
  .hero-emblem .emblem-wrap { width: 200px; }
  .hero-content { padding: 30px 28px 44px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .tier-ladder { grid-template-columns: repeat(2, 1fr); }
  .features { grid-template-columns: 1fr; }
  .docs { grid-template-columns: 1fr; }
  .docs nav { position: static; display: flex; flex-wrap: wrap; }
}
@media (max-width: 760px) {
  .nav-links, .nav-search { display: none; }
  .btn.menu-btn { display: inline-flex; }
  .nav.open .nav-links {
    display: grid; position: absolute; top: 68px; left: 16px; right: 16px; padding: 10px;
    background: rgba(12, 14, 20, 0.96); border: 1px solid var(--border); border-radius: 14px; backdrop-filter: blur(14px);
    animation: toast-in 0.3s var(--ease);
  }
  .container { padding: 0 16px; }
  .board-head { display: none; }
  .board-row { grid-template-columns: 96px 1fr auto; }
  .board-row .region-cell { display: none; }
  .rank-cell { padding-left: 12px; gap: 6px; }
  .rank-cell .n { font-size: 20px; width: 34px; }
  .rank-cell img { width: 36px; height: 36px; }
  .player-cell .pname { font-size: 16px; }
  .search-inline { margin-left: 0; width: 100%; }
  .search-inline input { width: 100%; }
  .kv { grid-template-columns: 1fr; }
  .endpoint .desc { margin-left: 0; width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .reveal { opacity: 1; transform: none; filter: none; }
}

/* =========================== Admin =========================== */
.login-wrap { min-height: calc(100vh - 68px); display: grid; place-items: center; padding: 40px 16px; }
.login-card {
  position: relative; width: 100%; max-width: 420px; padding: 40px 32px; border-radius: 24px; text-align: center;
  background: linear-gradient(180deg, rgba(242, 193, 78, 0.07), transparent 40%), var(--surface); border: 1px solid var(--border);
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.8);
}
.login-card img { width: 84px; height: 84px; margin: 0 auto 18px; animation: float 5s ease-in-out infinite; filter: drop-shadow(0 16px 30px rgba(242, 181, 44, 0.4)); }
.login-card h1 { margin: 0 0 6px; font-family: var(--font-display); font-size: 26px; }
.login-card p { margin: 0 0 26px; color: var(--muted); font-size: 14px; }
.login-card .btn { width: 100%; height: 48px; }
.login-err { margin-top: 16px; padding: 10px 12px; border-radius: 10px; background: rgba(255, 90, 95, 0.1); border: 1px solid rgba(255, 90, 95, 0.35); color: #ff9a9d; font-size: 13px; }

.admin { display: grid; grid-template-columns: 250px 1fr; gap: 24px; padding: 28px 0 60px; }
.side { position: sticky; top: 90px; align-self: start; display: grid; gap: 14px; }
.me { display: flex; gap: 12px; align-items: center; padding: 14px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border); }
.me img { width: 42px; height: 42px; border-radius: 50%; background: var(--surface-2); }
.me .who { min-width: 0; }
.me .who b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.role { display: inline-block; font: 800 10px/1 var(--font-mono); letter-spacing: 0.08em; padding: 4px 7px; border-radius: 6px; text-transform: uppercase; }
.role.super { background: var(--gold-grad); color: #2a1a02; }
.role.admin { background: rgba(99, 132, 255, 0.16); color: #a9bbff; }
.side-nav { display: grid; gap: 4px; padding: 8px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border); }
.side-nav button {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; border: 0; background: transparent;
  color: var(--muted); font-weight: 600; text-align: left; cursor: pointer; transition: all 0.2s var(--ease);
}
.side-nav button:hover { color: var(--text); background: var(--surface-2); }
.side-nav button.active { color: #1a1204; background: var(--gold-grad); box-shadow: 0 6px 20px -8px rgba(242, 181, 44, 0.7); }
.side-nav button[hidden] { display: none; }
.panel { animation: panel-in 0.5s var(--ease); }
@keyframes panel-in { from { opacity: 0; transform: translateY(12px); } }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.panel-head h2 { margin: 0; font-family: var(--font-display); font-size: 26px; letter-spacing: -0.02em; }
.panel-head p { margin: 2px 0 0; color: var(--muted); font-size: 14px; }
.card { border-radius: 16px; background: var(--surface); border: 1px solid var(--border); overflow: hidden; }
.card-pad { padding: 20px; }
.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: 14px; }
table.data th { text-align: left; padding: 12px 16px; color: var(--dim); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; border-bottom: 1px solid var(--border); white-space: nowrap; }
table.data td { padding: 12px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
table.data tr:last-child td { border-bottom: 0; }
table.data tbody tr { transition: background 0.2s; animation: panel-in 0.4s var(--ease) both; }
table.data tbody tr:hover { background: rgba(255, 255, 255, 0.02); }
.cell-player { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.cell-player img { width: 30px; height: 30px; border-radius: 6px; image-rendering: pixelated; }
.actions { display: flex; gap: 6px; justify-content: flex-end; }
.mono { font-family: var(--font-mono); font-size: 13px; }
.muted { color: var(--muted); }
.pill { display: inline-block; white-space: nowrap; padding: 3px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.pill.on { background: rgba(61, 220, 151, 0.12); color: var(--success); }
.pill.off { background: rgba(255, 90, 95, 0.12); color: #ff8a8e; }
.audit { display: grid; }
.audit-item { display: flex; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--border); font-size: 14px; animation: panel-in 0.4s var(--ease) both; }
.audit-item:last-child { border-bottom: 0; }
.audit-item .dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 7px; background: var(--gold); box-shadow: 0 0 10px var(--gold); flex: none; }
.audit-item time { margin-left: auto; color: var(--dim); font-size: 12px; white-space: nowrap; }

.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field label { font-size: 13px; font-weight: 600; color: var(--muted); }
.input, select.input {
  height: 42px; padding: 0 12px; border-radius: 10px; background: var(--bg-2); border: 1px solid var(--border-strong); outline: none;
  transition: border-color 0.2s, box-shadow 0.2s; width: 100%;
}
.input:focus { border-color: rgba(242, 193, 78, 0.6); box-shadow: 0 0 0 4px rgba(242, 193, 78, 0.08); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.check { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); cursor: pointer; }
.check input { accent-color: var(--gold); width: 16px; height: 16px; }
.tier-picker { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.tier-picker button { height: 38px; border-radius: 10px; border: 1px solid var(--border-strong); background: var(--bg-2); font: 800 12px var(--font-mono); cursor: pointer; transition: all 0.2s var(--ease); color: var(--muted); }
.tier-picker button:hover { color: var(--text); transform: translateY(-2px); }
.tier-picker button.active { border-color: transparent; color: #1a1204; background: var(--gold-grad); box-shadow: 0 6px 18px -6px rgba(242, 181, 44, 0.8); }

.modal-bg { position: fixed; inset: 0; z-index: 150; display: grid; place-items: center; padding: 16px; background: rgba(3, 4, 7, 0.7); backdrop-filter: blur(6px); animation: fade 0.25s ease; }
.modal { width: 100%; max-width: 460px; max-height: calc(100vh - 32px); overflow: auto; padding: 26px; border-radius: 20px; background: var(--surface); border: 1px solid var(--border-strong); box-shadow: 0 40px 100px -20px rgba(0, 0, 0, 0.9); animation: pop 0.4s var(--ease); }
.modal h3 { margin: 0 0 18px; font-family: var(--font-display); font-size: 21px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }
.modal-bg.closing { animation: fade 0.2s ease reverse forwards; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(20px) scale(0.96); } }
.key-reveal { display: flex; gap: 8px; align-items: center; padding: 12px; border-radius: 12px; background: var(--bg-2); border: 1px dashed rgba(242, 193, 78, 0.5); font: 600 13px var(--font-mono); word-break: break-all; color: var(--gold-2); }

@media (max-width: 900px) {
  .admin { grid-template-columns: 1fr; }
  .side { position: static; }
  .side-nav { grid-auto-flow: column; overflow-x: auto; }
  .side-nav button { white-space: nowrap; }
  .row2 { grid-template-columns: 1fr; }
}

/* =========================== Region / filter / player card =========================== */
.region.TW { width: auto; padding: 0 10px; font-family: var(--font); font-weight: 700; background: rgba(92, 154, 230, 0.14); color: #9cc9ff; }

.select-wrap { position: relative; }
.select-wrap::after {
  content: ''; position: absolute; right: 14px; top: 50%; width: 7px; height: 7px; pointer-events: none;
  border-right: 2px solid var(--gold); border-bottom: 2px solid var(--gold); transform: translateY(-70%) rotate(45deg);
}
.select-wrap select {
  appearance: none; -webkit-appearance: none; height: 36px; min-width: 150px; padding: 0 38px 0 14px; border-radius: 10px;
  background: var(--surface); border: 1px solid var(--border-strong); font-weight: 600; font-size: 14px; cursor: pointer; outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.select-wrap select:hover { border-color: rgba(242, 193, 78, 0.4); }
.select-wrap select:focus { border-color: rgba(242, 193, 78, 0.6); box-shadow: 0 0 0 4px rgba(242, 193, 78, 0.08); }
.select-wrap option { background: var(--surface-2); }

.board-row { cursor: pointer; }

.pcard { position: relative; max-width: 480px; padding: 40px 34px 34px; text-align: center; border-radius: 26px; background: #111827; border-color: rgba(148, 163, 184, 0.18); }
.pcard-page { width: 100%; }
.pcard-close {
  position: absolute; top: 18px; right: 18px; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
  border: 1px solid rgba(148, 163, 184, 0.25); background: transparent; color: #93a3bd; cursor: pointer; transition: all 0.25s var(--ease);
}
.pcard-close:hover { color: #fff; border-color: rgba(255, 255, 255, 0.4); transform: rotate(90deg); }
.pcard-avatar {
  position: relative; width: 128px; height: 128px; margin: 0 auto 20px; border-radius: 50%; padding: 4px;
  background: conic-gradient(from 0deg, #fff1b8, #f2b52c, #c47f0e, #ffd46a, #fff1b8);
  box-shadow: 0 0 40px -6px rgba(242, 181, 44, 0.55);
  animation: pop 0.5s var(--ease);
}
.pcard-avatar img { width: 100%; height: 100%; border-radius: 50%; image-rendering: pixelated; background: #0b0d13; }
.pcard-name { margin: 0 0 14px; font-family: var(--font-display); font-size: 34px; font-weight: 700; letter-spacing: -0.02em; animation: panel-in 0.5s var(--ease) 0.05s both; }
.title-pill {
  display: inline-flex; align-items: center; gap: 10px; padding: 9px 20px; border-radius: 999px; font-weight: 700; font-size: 17px;
  border: 1.5px solid currentColor; animation: panel-in 0.5s var(--ease) 0.1s both;
}
.title-pill svg { flex: none; }
.title-pill.grandmaster { color: #ffd46a; background: rgba(242, 181, 44, 0.12); }
.title-pill.master { color: #f5c46b; background: rgba(245, 196, 107, 0.1); }
.title-pill.ace { color: #ff7a9a; background: rgba(255, 122, 154, 0.1); }
.title-pill.specialist { color: #c49bff; background: rgba(168, 120, 255, 0.14); border-color: rgba(196, 155, 255, 0.5); }
.title-pill.cadet { color: #7cb8ff; background: rgba(92, 154, 230, 0.12); }
.title-pill.novice { color: #6fe0c0; background: rgba(61, 220, 151, 0.1); }
.title-pill.rookie { color: #9aa3b8; background: rgba(154, 163, 184, 0.1); }
.pcard-region { margin: 16px 0 18px; color: #93a3bd; font-size: 17px; animation: panel-in 0.5s var(--ease) 0.15s both; }
.pcard-namemc { height: 44px; padding: 0 22px; font-size: 16px; font-weight: 500; border-radius: 12px; background: #151d2c; border-color: rgba(148, 163, 184, 0.25); color: #c5d0e0; animation: panel-in 0.5s var(--ease) 0.2s both; }
.pcard-label {
  margin: 30px 0 12px; text-align: left; font: 500 14px var(--font-mono); letter-spacing: 0.2em; color: #93a3bd;
  animation: panel-in 0.5s var(--ease) 0.25s both;
}
.pcard-label span { font-family: var(--font); letter-spacing: 0.08em; margin-left: 8px; }
.pcard-pos {
  display: flex; align-items: stretch; height: 64px; border-radius: 14px; overflow: hidden;
  background: #172033; border: 1px solid rgba(148, 163, 184, 0.16); animation: panel-in 0.5s var(--ease) 0.3s both;
}
.pos-rank { width: 70px; display: grid; place-items: center; font: italic 800 24px var(--font-mono); color: rgba(0, 0, 0, 0.75); position: relative; overflow: hidden; }
.pos-rank.r1 { background: var(--gold-grad); }
.pos-rank.r2 { background: var(--silver-grad); }
.pos-rank.r3 { background: var(--bronze-grad); }
.pos-rank.rn { background: #232c40; color: #c5d0e0; }
.pos-rank::after { content: ''; position: absolute; top: 0; left: -80%; width: 50%; height: 100%; background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.5), transparent); transform: skewX(-20deg); animation: sweep 3.6s ease-in-out infinite; }
.pos-rank.rn::after { display: none; }
.pos-info { display: flex; align-items: center; gap: 10px; padding: 0 20px; font-size: 18px; }
.pos-info b { font-weight: 700; }
.pos-info span { color: #93a3bd; }
.pos-trophy { color: var(--gold); }
.pcard-tiers {
  display: flex; flex-wrap: wrap; gap: 18px; padding: 20px 26px; border-radius: 14px; min-height: 100px;
  background: #172033; border: 1px solid rgba(148, 163, 184, 0.16); animation: panel-in 0.5s var(--ease) 0.35s both;
}
.tier-tile { display: grid; justify-items: center; gap: 8px; font: 800 15px var(--font-mono); transition: transform 0.3s var(--ease); }
.tier-tile:hover { transform: translateY(-3px); }
.tile-ico { width: 56px; height: 56px; border-radius: 12px; display: grid; place-items: center; border: 1.5px solid currentColor; background: color-mix(in srgb, currentColor 14%, transparent); }
.tile-ico img { width: 36px; height: 36px; }
.tier-tile.t1 { color: #ffc93c; }
.tier-tile.t2 { color: #d4dae6; }
.tier-tile.t3 { color: #e39a5c; }
.tier-tile.t4 { color: #8fa0c4; }
.tier-tile.t5 { color: #6b7590; }
.tier-tile.retired { opacity: 0.55; }
@media (max-width: 520px) {
  .pcard { padding: 34px 20px 24px; }
  .pcard-name { font-size: 28px; }
}

/* =========================== Auth, dropdowns, member pages =========================== */
.nav-links .nav-extra { display: none; }
.nav-links a { white-space: nowrap; }
.dropdown { position: relative; }
.dd-toggle { display: inline-flex; align-items: center; gap: 6px; }
.dd-toggle svg:last-child { transition: transform 0.25s var(--ease); opacity: 0.7; }
.dropdown.open .dd-toggle svg:last-child { transform: rotate(180deg); }
.dd-menu {
  position: absolute; right: 0; top: calc(100% + 8px); min-width: 180px; padding: 6px; z-index: 60;
  display: grid; gap: 2px; border-radius: 14px; background: rgba(17, 20, 28, 0.97); border: 1px solid var(--border-strong);
  box-shadow: 0 24px 50px -12px rgba(0, 0, 0, 0.8); backdrop-filter: blur(14px);
  opacity: 0; transform: translateY(-6px) scale(0.98); pointer-events: none; transition: opacity 0.2s, transform 0.25s var(--ease);
}
.dropdown.open .dd-menu { opacity: 1; transform: none; pointer-events: auto; }
.dd-menu a, .dd-menu button {
  display: block; width: 100%; text-align: left; padding: 9px 12px; border-radius: 9px; border: 0; background: transparent;
  color: var(--muted); font-size: 14px; font-weight: 600; cursor: pointer; transition: background 0.15s, color 0.15s;
}
.dd-menu a:hover, .dd-menu button:hover { background: var(--surface-2); color: var(--text); }
.dd-menu button.active { color: var(--gold-2); }
.dd-menu .dd-logout { color: #ff8a8e; }
.lang-dd .dd-menu { min-width: 150px; }
.user-chip {
  height: 38px; padding: 0 10px 0 4px; border-radius: 12px; border: 1px solid var(--border-strong); background: var(--surface);
  font-weight: 600; font-size: 14px; cursor: pointer; max-width: 190px; transition: border-color 0.2s;
}
.user-chip:hover { border-color: rgba(242, 193, 78, 0.45); }
.user-chip img { width: 30px; height: 30px; border-radius: 9px; }
.user-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.btn-discord svg { flex: none; }

.badge-ico { display: inline-flex; vertical-align: middle; margin-left: 6px; cursor: help; transition: transform 0.2s var(--ease); }
.badge-ico:hover { transform: translateY(-2px) scale(1.15); }
.pcard-name .badge-ico svg { width: 22px; height: 22px; }

.role.owner { background: linear-gradient(135deg, #ff9d6c, #ff5f8f); color: #2a0610; }
.role.moderator { background: rgba(61, 220, 151, 0.16); color: #6ff0b6; }
.role.helper { background: rgba(56, 189, 248, 0.16); color: #7dd3fc; }
.role.member { background: rgba(154, 163, 184, 0.14); color: #b5bdd0; }
.role.tester { background: rgba(196, 155, 255, 0.16); color: #c9a0ff; }
.chips-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 4px; }
.pill.high { background: rgba(196, 155, 255, 0.16); color: #c9a0ff; }
b.win, .win { color: var(--success); }
b.loss, .loss { color: #ff8a8e; }

.pcard-record { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; animation: panel-in 0.5s var(--ease) 0.4s both; }
.pcard-record > div { padding: 14px 8px; border-radius: 14px; background: #172033; border: 1px solid rgba(148, 163, 184, 0.16); display: grid; gap: 4px; }
.pcard-record b { font: 700 24px var(--font-display); }
.pcard-record span { color: #93a3bd; font-size: 13px; }
.pcard-locked {
  display: flex; align-items: center; justify-content: center; gap: 10px; padding: 18px; border-radius: 14px;
  border: 1px dashed rgba(148, 163, 184, 0.3); color: #93a3bd; font-weight: 600; transition: all 0.25s var(--ease);
  animation: panel-in 0.5s var(--ease) 0.4s both;
}
.pcard-locked:hover { color: #fff; border-color: #5865f2; background: rgba(88, 101, 242, 0.12); }

.me-head { display: flex; align-items: center; gap: 18px; margin-bottom: 24px; }
.me-head img { width: 72px; height: 72px; border-radius: 20px; box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.8); }
.me-head h1 { margin: 0; font-family: var(--font-display); font-size: 30px; letter-spacing: -0.02em; }
.me-grid { display: grid; grid-template-columns: 440px 1fr; gap: 24px; align-items: start; }
.me-grid .pcard-page { max-width: none; }
.kv2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.stat .num.sm { font-size: 22px; }
.stat .num.ok { color: var(--success); }
.set-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 14px 4px; border-bottom: 1px solid var(--border); }
.set-row:last-child { border-bottom: 0; }
.set-row > span { color: var(--muted); font-weight: 600; }
.login-card img { image-rendering: auto; }
@media (max-width: 980px) {
  .me-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .nav.open .nav-links .nav-extra { display: none; }
.nav-links a { white-space: nowrap; }
  .user-chip span { display: none; }
  .kv2 { grid-template-columns: 1fr; }
  .lang-dd .dd-toggle span { display: none; }
}

/* =========================== Low-key home hero =========================== */
.hero-lite { padding: 44px 0 8px; }
.hero-lite-inner { padding: 8px 0 6px; max-width: 640px; }
.hero-lite h1 { margin: 0 0 12px; font-family: var(--font-display); font-size: clamp(28px, 4vw, 42px); line-height: 1.15; letter-spacing: -0.025em; font-weight: 700; }
.hero-lite h1 .gold { color: var(--gold); }
.hero-lite .lead { margin: 0 0 22px; color: var(--muted); font-size: 16px; }
.hero-lite .hero-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.hero-lite + .block, .hero-lite ~ section.block:first-of-type { padding-top: 40px; }
.hero-lite .stats { margin-top: 34px; }

/* =========================== Server IP, bans, support =========================== */
.server-chip {
  display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 12px; border-radius: 12px; cursor: pointer;
  border: 1px solid rgba(92, 154, 230, 0.35); background: rgba(92, 154, 230, 0.08); color: #9cc9ff;
  font: 700 13px var(--font-mono); transition: all 0.2s var(--ease); white-space: nowrap;
}
.server-chip:hover { background: rgba(92, 154, 230, 0.16); transform: translateY(-1px); }
.server-card {
  display: flex; align-items: center; gap: 14px; margin-top: 22px; padding: 12px 16px; border-radius: 14px; cursor: pointer;
  border: 1px solid var(--border-strong); background: var(--surface); text-align: left; max-width: 420px; width: 100%;
  transition: border-color 0.2s, transform 0.2s var(--ease);
}
.server-card:hover { border-color: rgba(92, 154, 230, 0.5); transform: translateY(-2px); }
.server-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 0 rgba(61, 220, 151, 0.6); animation: pulse-g 2.2s infinite; flex: none; }
@keyframes pulse-g { 70% { box-shadow: 0 0 0 8px rgba(61, 220, 151, 0); } 100% { box-shadow: 0 0 0 0 rgba(61, 220, 151, 0); } }
.server-text { display: grid; line-height: 1.3; }
.server-text .muted { font-size: 12px; }
.server-text b { font: 700 16px var(--font-mono); color: #9cc9ff; }
.server-copy { margin-left: auto; font-size: 12px; color: var(--dim); }

.ban-tag { display: inline-block; margin-left: 8px; padding: 2px 8px; border-radius: 6px; vertical-align: middle; font: 700 11px var(--font); letter-spacing: 0.04em; background: rgba(255, 90, 95, 0.16); color: #ff8a8e; border: 1px solid rgba(255, 90, 95, 0.35); }
.pcard-ban { margin: -8px 0 18px; padding: 10px 14px; border-radius: 12px; background: rgba(255, 90, 95, 0.12); border: 1px solid rgba(255, 90, 95, 0.35); color: #ff9a9d; font-weight: 700; font-size: 14px; }
.pcard-avatar.banned { background: linear-gradient(135deg, #ff5a5f, #7a1f22); box-shadow: 0 0 40px -6px rgba(255, 90, 95, 0.5); }
.pcard-avatar.banned img { filter: grayscale(0.85); }

.seg { display: inline-flex; gap: 4px; padding: 4px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); flex-wrap: wrap; }
.seg button { border: 0; background: transparent; color: var(--muted); padding: 7px 12px; border-radius: 9px; font-weight: 600; font-size: 13px; cursor: pointer; transition: all 0.2s; }
.seg button:hover { color: var(--text); }
.seg button.active { background: var(--surface-2); color: var(--gold-2); box-shadow: inset 0 0 0 1px rgba(242, 193, 78, 0.35); }

.st-pill { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.st-pill.open { background: rgba(242, 193, 78, 0.14); color: var(--gold-2); }
.st-pill.in_progress { background: rgba(92, 154, 230, 0.16); color: #9cc9ff; }
.st-pill.closed { background: rgba(154, 163, 184, 0.14); color: #9aa3b8; }
.ticket-row { display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-bottom: 1px solid var(--border); transition: background 0.2s; }
.ticket-row:last-child { border-bottom: 0; }
a.ticket-row:hover { background: rgba(255, 255, 255, 0.025); }
.ticket-title { display: grid; gap: 2px; flex: 1; min-width: 0; }
.ticket-title b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ticket-title .muted { font-size: 13px; }
.ticket-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.ticket-head h2 { margin: 4px 0 0; font-family: var(--font-display); font-size: 24px; }
.thread { display: grid; gap: 12px; margin-bottom: 18px; }
.msg { max-width: 78%; padding: 12px 16px; border-radius: 16px 16px 16px 4px; background: var(--surface); border: 1px solid var(--border); animation: panel-in 0.4s var(--ease) both; }
.msg.mine { margin-left: auto; border-radius: 16px 16px 4px 16px; background: rgba(242, 193, 78, 0.08); border-color: rgba(242, 193, 78, 0.25); }
.msg.staff:not(.mine) { border-color: rgba(92, 154, 230, 0.35); }
.msg-meta { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; font-size: 13px; }
.msg-meta time { margin-left: auto; color: var(--dim); font-size: 12px; }
.msg-body { white-space: normal; word-wrap: break-word; font-size: 15px; }
.msg-images { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.msg-images img { width: 140px; height: 100px; object-fit: cover; border-radius: 10px; border: 1px solid var(--border-strong); transition: transform 0.2s var(--ease); }
.msg-images img:hover { transform: scale(1.03); }
.composer { border-radius: 16px; background: var(--surface); border: 1px solid var(--border-strong); padding: 12px; }
.composer textarea, textarea.input { width: 100%; resize: vertical; min-height: 70px; border: 0; background: transparent; outline: none; font: inherit; color: inherit; }
textarea.input { height: auto; padding: 10px 12px; border: 1px solid var(--border-strong); background: var(--bg-2); border-radius: 10px; }
.composer-bar { display: flex; align-items: center; gap: 10px; justify-content: space-between; flex-wrap: wrap; }
.file-pick { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 10px; border: 1px dashed var(--border-strong); color: var(--muted); font-size: 13px; font-weight: 600; cursor: pointer; transition: all 0.2s; }
.file-pick:hover { color: var(--text); border-color: rgba(242, 193, 78, 0.5); }
.file-names { font-size: 12px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.usage-top { display: flex; justify-content: space-between; margin-bottom: 10px; }
.usage-bar { height: 12px; border-radius: 999px; background: var(--bg-2); border: 1px solid var(--border); overflow: hidden; }
.usage-bar span { display: block; height: 100%; border-radius: inherit; background: var(--gold-grad); transition: width 0.8s var(--ease); }
.usage-bar span.hot { background: linear-gradient(90deg, #ff9d6c, #ff5a5f); }
.usage-stats { display: flex; gap: 28px; align-items: center; margin-top: 16px; flex-wrap: wrap; }
.usage-stats > div { display: grid; gap: 2px; font-size: 14px; }
.thumb { width: 64px; height: 44px; object-fit: cover; border-radius: 8px; border: 1px solid var(--border-strong); }
@media (max-width: 1180px) { .server-chip { display: none; } }
@media (max-width: 760px) { .msg { max-width: 94%; } .ticket-row { flex-wrap: wrap; } }

/* =========================== Support v2 =========================== */
.cat-ico { flex: none; width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; border: 1px solid currentColor; background: color-mix(in srgb, currentColor 12%, transparent); }
.cat-ico.bug { color: #ff9d6c; }
.cat-ico.appeal { color: #c49bff; }
.cat-ico.report { color: #ff7a8a; }
.cat-ico.other { color: #7cb8ff; }
.cat-ico.suggest { color: #ffd166; }
.st-pill { display: inline-flex; align-items: center; gap: 6px; }
.st-pill i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.st-pill.open i { animation: pulse-dot 1.8s infinite; }
@keyframes pulse-dot { 50% { opacity: 0.35; } }

.back-link { display: inline-block; margin-bottom: 16px; }
.support-hero {
  display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; margin-bottom: 18px;
  padding: 28px; border-radius: 20px; border: 1px solid var(--border);
  background: radial-gradient(ellipse 60% 120% at 100% 0%, rgba(92, 154, 230, 0.14), transparent 60%), var(--surface);
}
.support-hero h2 { margin: 2px 0 6px; font-family: var(--font-display); font-size: 28px; letter-spacing: -0.02em; }
.support-hero p { margin: 0; color: var(--muted); max-width: 560px; }
.support-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 18px; }
.sstat { padding: 14px 18px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); display: flex; align-items: baseline; gap: 10px; }
.sstat b { font: 700 24px var(--font-display); }
.sstat span { color: var(--muted); font-size: 13px; font-weight: 600; }
.sstat.open b { color: var(--gold-2); }
.sstat.in_progress b { color: #9cc9ff; }
.sstat.closed b { color: #9aa3b8; }
.ticket-list { display: grid; gap: 10px; }
.ticket-card {
  display: flex; align-items: center; gap: 16px; padding: 16px 18px; border-radius: 16px;
  background: var(--surface); border: 1px solid var(--border); transition: transform 0.25s var(--ease), border-color 0.25s, background 0.25s;
}
.ticket-card:hover { transform: translateY(-2px); border-color: var(--border-strong); background: var(--surface-2); }
.ticket-card .chev { color: var(--dim); transition: transform 0.25s var(--ease); }
.ticket-card:hover .chev { transform: translateX(3px); color: var(--text); }
.support-empty { text-align: center; padding: 56px 20px; border-radius: 18px; border: 1px dashed var(--border-strong); }
.support-empty-ico { display: grid; place-items: center; margin-bottom: 14px; }
.support-empty-ico .cat-ico { width: 64px; height: 64px; border-radius: 18px; }
.support-empty h3 { margin: 0 0 16px; font-weight: 600; color: var(--muted); }

.new-ticket { max-width: 760px; padding: 28px; border-radius: 20px; background: var(--surface); border: 1px solid var(--border); }
.new-ticket h2 { margin: 0 0 20px; font-family: var(--font-display); font-size: 24px; }
.cat-picker { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.cat-option input { position: absolute; opacity: 0; pointer-events: none; }
.cat-option > span {
  display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 16px 10px; border-radius: 14px; cursor: pointer;
  border: 1px solid var(--border-strong); background: var(--bg-2); transition: all 0.2s var(--ease); text-align: center;
}
.cat-option > span b { font-size: 14px; }
.cat-option > span:hover { transform: translateY(-2px); border-color: rgba(255, 255, 255, 0.25); }
.cat-option input:checked + span { border-color: rgba(242, 193, 78, 0.7); background: rgba(242, 193, 78, 0.07); box-shadow: 0 0 0 3px rgba(242, 193, 78, 0.12); }
.cat-option input:focus-visible + span { outline: 2px solid var(--gold); }

.drop-zone { display: flex; flex-wrap: wrap; gap: 10px; padding: 10px; border-radius: 14px; border: 1px dashed var(--border-strong); transition: border-color 0.2s, background 0.2s; }
.drop-zone.drag { border-color: var(--gold); background: rgba(242, 193, 78, 0.06); }
.drop-previews { display: contents; }
.drop-thumb { position: relative; width: 92px; height: 72px; border-radius: 10px; overflow: hidden; border: 1px solid var(--border-strong); animation: pop 0.3s var(--ease); }
.drop-thumb img { width: 100%; height: 100%; object-fit: cover; }
.drop-thumb button { position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; border-radius: 50%; border: 0; background: rgba(0, 0, 0, 0.7); color: #fff; cursor: pointer; line-height: 1; font-size: 15px; }
.drop-add { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 10px 14px; border: 0; border-radius: 10px; background: transparent; color: var(--muted); cursor: pointer; text-align: left; }
.drop-add > svg { margin-bottom: 2px; }
.drop-add span { font-weight: 600; font-size: 14px; color: var(--text); }
.drop-add small { font-size: 12px; }
.drop-add:hover span { color: var(--gold-2); }

.ticket-hero { display: flex; gap: 18px; align-items: flex-start; flex-wrap: wrap; padding: 22px; margin-bottom: 20px; border-radius: 20px; background: var(--surface); border: 1px solid var(--border); }
.ticket-hero .cat-ico { width: 54px; height: 54px; border-radius: 16px; }
.ticket-hero-main { flex: 1; min-width: 240px; }
.ticket-hero-meta { display: flex; gap: 12px; flex-wrap: wrap; color: var(--muted); font-size: 13px; }
.ticket-hero-main h2 { margin: 4px 0 14px; font-family: var(--font-display); font-size: 24px; letter-spacing: -0.01em; }
.ticket-hero-side { display: grid; gap: 10px; justify-items: end; }
.stepper { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.step { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--dim); }
.step span { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--border-strong); font-size: 12px; transition: all 0.3s; }
.step.done { color: var(--muted); }
.step.done span { background: rgba(242, 193, 78, 0.15); border-color: rgba(242, 193, 78, 0.5); color: var(--gold-2); }
.step.current { color: var(--text); }
.step.current span { background: var(--gold-grad); color: #1a1204; border-color: transparent; box-shadow: 0 0 14px -2px rgba(242, 181, 44, 0.8); }
.step-line { width: 28px; height: 1px; background: var(--border-strong); }

.msg-row { display: flex; gap: 12px; align-items: flex-end; animation: panel-in 0.4s var(--ease) both; }
.msg-row.mine { flex-direction: row-reverse; }
.msg-avatar { width: 34px; height: 34px; border-radius: 50%; flex: none; }
.msg-row .msg { max-width: min(640px, 78%); margin: 0; animation: none; }
.msg-row.mine .msg { border-radius: 16px 16px 4px 16px; background: rgba(242, 193, 78, 0.08); border-color: rgba(242, 193, 78, 0.25); }
.msg-row:not(.mine) .msg { border-radius: 16px 16px 16px 4px; }
.composer { display: grid; gap: 10px; }
.composer .drop-zone { border-style: dashed; padding: 6px; }
.composer-hint { font-size: 12px; font-family: var(--font-mono); }
@media (max-width: 760px) {
  .cat-picker { grid-template-columns: repeat(2, 1fr); }
  .support-stats { grid-template-columns: repeat(3, 1fr); }
  .sstat { flex-direction: column; gap: 2px; }
  .ticket-hero-side { justify-items: start; width: 100%; }
  .msg-row .msg { max-width: 86%; }
  .ticket-card .chev { display: none; }
}
.composer .drop-zone { border: 0; padding: 0; }
.composer .drop-add { flex-direction: row; align-items: center; gap: 8px; padding: 6px 10px; border: 1px dashed var(--border-strong); border-radius: 10px; }
.composer .drop-add > svg { margin: 0; }
.composer .drop-add small { display: none; }
.composer .drop-thumb { width: 72px; height: 56px; }

/* =========================== Keys, give result, panel editor =========================== */
.keys-box { margin-top: 34px; }
.key-create { display: flex; gap: 10px; margin-bottom: 12px; max-width: 560px; }
.key-create .input { flex: 1; }
.give-card { padding: 22px; margin-bottom: 26px; border-radius: 18px; background: var(--surface); border: 1px solid var(--border); }
.give-card .tier-picker { grid-template-columns: repeat(auto-fill, minmax(62px, 1fr)); }
.apps-toggle { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.apps-toggle h3 { margin: 0 0 8px; font-size: 17px; }
.apps-toggle.is-paused { border-color: rgba(255, 90, 95, 0.35); }
.panel-editor { display: grid; grid-template-columns: minmax(0, 1fr) 420px; gap: 20px; align-items: start; }
.color-row { display: flex; gap: 10px; align-items: center; }
.color-row input[type=color] { width: 46px; height: 42px; padding: 0; border: 1px solid var(--border-strong); border-radius: 10px; background: none; cursor: pointer; }
.dc-preview-wrap { position: sticky; top: 90px; }
#dcPreview, .dc-preview { padding: 16px; border-radius: 14px; background: #313338; font-family: 'gg sans', 'Noto Sans TC', var(--font); }
.dc-msg { display: flex; gap: 14px; }
.dc-avatar { width: 40px; height: 40px; border-radius: 50%; background: #1e1f22; padding: 6px; flex: none; }
.dc-body { min-width: 0; flex: 1; }
.dc-name { font-weight: 600; color: #f2f3f5; font-size: 15px; margin-bottom: 4px; }
.dc-bot { background: #5865f2; color: #fff; font-size: 10px; font-weight: 700; padding: 1px 5px; border-radius: 4px; vertical-align: middle; margin-left: 4px; }
.dc-embed { background: #2b2d31; border-left: 4px solid #f2c14e; border-radius: 4px; padding: 10px 14px 12px; color: #dbdee1; font-size: 14px; line-height: 1.45; }
.dc-title { font-weight: 700; color: #f2f3f5; font-size: 15px; margin-bottom: 6px; }
.dc-text { color: #dbdee1; word-wrap: break-word; }
.dc-field { margin-top: 10px; }
.dc-field b { display: block; color: #f2f3f5; margin-bottom: 2px; }
.dc-footer { margin-top: 10px; font-size: 12px; color: #949ba4; }
.dc-button { margin-top: 8px; height: 32px; padding: 0 16px; border: 0; border-radius: 4px; background: #248046; color: #fff; font-weight: 500; font-size: 14px; }
.dc-button.off { background: #4e5058; opacity: 0.6; }
@media (max-width: 1100px) { .panel-editor { grid-template-columns: 1fr; } .dc-preview-wrap { position: static; } }

/* =========================== Polish: page transitions, selects, palette, lightbox =========================== */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: vt-out 0.18s ease both; }
::view-transition-new(root) { animation: vt-in 0.32s var(--ease) both; }
@keyframes vt-out { to { opacity: 0; transform: translateY(-6px); } }
@keyframes vt-in { from { opacity: 0; transform: translateY(10px); } }
:focus-visible { outline: 2px solid rgba(242, 193, 78, 0.7); outline-offset: 2px; }
html { scrollbar-color: #2a3040 transparent; }

/* ripple */
.ripple { position: absolute; border-radius: 50%; pointer-events: none; background: currentColor; opacity: 0.18; transform: scale(0); animation: ripple 0.65s var(--ease) forwards; }
@keyframes ripple { to { transform: scale(1); opacity: 0; } }

/* custom select */
.select-wrap.has-nsel::after { display: none; }
.nsel { position: relative; display: inline-block; min-width: 170px; }
.field .nsel, .nsel:has(select.input) { display: block; width: 100%; }
.nsel select { position: absolute; opacity: 0; pointer-events: none; width: 1px; height: 1px; }
.nsel-btn {
  width: 100%; height: 40px; display: flex; align-items: center; gap: 9px; padding: 0 12px 0 14px; border-radius: 11px; cursor: pointer;
  background: var(--surface); border: 1px solid var(--border-strong); color: var(--text); font-weight: 600; font-size: 14px; text-align: left;
  transition: border-color 0.2s, box-shadow 0.25s, background 0.2s;
}
.field .nsel-btn { background: var(--bg-2); height: 42px; }
.nsel-btn:hover { border-color: rgba(242, 193, 78, 0.4); }
.nsel.open .nsel-btn { border-color: rgba(242, 193, 78, 0.65); box-shadow: 0 0 0 4px rgba(242, 193, 78, 0.1); }
.nsel-btn > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nsel-chev { color: var(--gold); transition: transform 0.3s var(--ease); flex: none; }
.nsel.open .nsel-chev { transform: rotate(180deg); }
.nsel-menu {
  position: fixed; z-index: 400; max-height: 300px; overflow-y: auto; padding: 6px;
  border-radius: 14px; background: rgba(17, 20, 28, 0.98); border: 1px solid var(--border-strong); backdrop-filter: blur(14px);
  box-shadow: 0 24px 50px -12px rgba(0, 0, 0, 0.85), 0 0 0 1px rgba(242, 193, 78, 0.05);
  opacity: 0; transform: translateY(-6px) scale(0.97); transform-origin: top; pointer-events: none;
  transition: opacity 0.18s, transform 0.28s var(--ease);
}
.nsel.up .nsel-menu { transform-origin: bottom; }
.nsel.open .nsel-menu { opacity: 1; transform: none; pointer-events: auto; }
.nsel-opt { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 9px; cursor: pointer; font-size: 14px; font-weight: 600; color: var(--muted); transition: background 0.15s, color 0.15s; }
.nsel.open .nsel-opt { animation: opt-in 0.3s var(--ease) both; animation-delay: calc(var(--i) * 22ms); }
@keyframes opt-in { from { opacity: 0; transform: translateX(-6px); } }
.nsel-opt:hover, .nsel-opt.act { background: var(--surface-2); color: var(--text); }
.nsel-opt.sel { color: var(--gold-2); }
.nsel-opt > span { flex: 1; }
.nsel-check { opacity: 0; color: var(--gold); transition: opacity 0.2s; }
.nsel-opt.sel .nsel-check { opacity: 1; }
.nsel-dot { flex: none; width: 10px; height: 10px; border-radius: 3px; transform: rotate(45deg); }
.nsel-dot.t1 { background: var(--gold-grad); box-shadow: 0 0 10px rgba(242, 181, 44, 0.6); }
.nsel-dot.t2 { background: var(--silver-grad); }
.nsel-dot.t3 { background: var(--bronze-grad); }
.nsel-dot.t4 { background: #3a4460; }
.nsel-dot.t5 { background: #2a3040; }

/* command palette */
.cmdk-bg { position: fixed; inset: 0; z-index: 300; display: flex; justify-content: center; align-items: flex-start; padding: 12vh 16px 16px; background: rgba(3, 4, 7, 0.62); backdrop-filter: blur(6px); animation: fade 0.18s ease; }
.cmdk-bg.out { animation: fade 0.18s ease reverse forwards; }
.cmdk { width: 100%; max-width: 620px; border-radius: 18px; overflow: hidden; background: rgba(15, 18, 26, 0.98); border: 1px solid var(--border-strong); box-shadow: 0 40px 100px -20px rgba(0, 0, 0, 0.95), 0 0 0 1px rgba(242, 193, 78, 0.08); animation: pop 0.32s var(--ease); }
.cmdk-bg.out .cmdk { animation: pop 0.18s ease reverse forwards; }
.cmdk-input { display: flex; align-items: center; gap: 12px; padding: 0 16px; border-bottom: 1px solid var(--border); color: var(--dim); }
.cmdk-input input { flex: 1; height: 58px; border: 0; background: transparent; outline: none; font-size: 17px; color: var(--text); }
.cmdk kbd, .cmdk-foot kbd { font: 600 11px var(--font-mono); color: var(--muted); border: 1px solid var(--border-strong); border-radius: 6px; padding: 2px 6px; background: var(--surface); }
.cmdk-list { max-height: 400px; overflow-y: auto; padding: 8px; }
.cmdk-group { padding: 10px 10px 6px; font-size: 11px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--dim); }
.cmdk-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 11px; cursor: pointer; color: var(--muted); font-weight: 600; animation: opt-in 0.28s var(--ease) both; animation-delay: calc(var(--i) * 14ms); }
.cmdk-item svg { flex: none; color: var(--dim); transition: color 0.15s; }
.cmdk-item img { width: 22px; height: 22px; border-radius: 5px; image-rendering: pixelated; }
.cmdk-item span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cmdk-item small { font: 700 11px var(--font-mono); color: var(--dim); }
.cmdk-item.act { background: linear-gradient(90deg, rgba(242, 193, 78, 0.14), rgba(242, 193, 78, 0.03)); color: var(--text); box-shadow: inset 2px 0 0 var(--gold); }
.cmdk-item.act svg { color: var(--gold); }
.cmdk-empty { padding: 28px; text-align: center; color: var(--dim); }
.cmdk-foot { display: flex; gap: 18px; padding: 10px 16px; border-top: 1px solid var(--border); font-size: 12px; color: var(--dim); }
.cmdk-foot span:last-child { margin-left: auto; }
.nav-search input { cursor: pointer; }
.nav-search kbd { white-space: nowrap; }

/* lightbox */
.lightbox { position: fixed; inset: 0; z-index: 320; display: grid; place-items: center; padding: 24px; background: rgba(0, 0, 0, 0.86); backdrop-filter: blur(8px); cursor: zoom-out; animation: fade 0.2s ease; }
.lightbox.out { animation: fade 0.2s ease reverse forwards; }
.lightbox img { max-width: min(1200px, 100%); max-height: 88vh; border-radius: 12px; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.8); animation: pop 0.35s var(--ease); }
.lightbox-open { position: absolute; top: 18px; right: 20px; width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; background: rgba(255, 255, 255, 0.1); color: #fff; font-size: 18px; }
.msg-images a, a:has(> img.thumb) { cursor: zoom-in; }

/* toasts */
.toast { position: relative; display: flex; align-items: center; gap: 10px; overflow: hidden; cursor: pointer; padding-right: 18px; backdrop-filter: blur(10px); }
.toast svg { flex: none; }
.toast.ok svg { color: var(--success); }
.toast.err svg { color: #ff8a8e; }
.toast-bar { position: absolute; left: 0; bottom: 0; height: 2px; width: 100%; transform-origin: left; animation: toast-bar 3.2s linear forwards; }
.toast.ok .toast-bar { background: var(--success); }
.toast.err .toast-bar { background: var(--danger); }
@keyframes toast-bar { to { transform: scaleX(0); } }

/* support & cards polish */
.msg-row.msg-new .msg { animation: msg-pop 0.6s var(--ease); box-shadow: 0 0 0 1px rgba(242, 193, 78, 0.45), 0 12px 30px -12px rgba(242, 181, 44, 0.45); }
@keyframes msg-pop { from { opacity: 0; transform: translateY(14px) scale(0.97); } }
.composer { transition: border-color 0.2s, box-shadow 0.25s; }
.composer:focus-within { border-color: rgba(242, 193, 78, 0.45); box-shadow: 0 0 0 4px rgba(242, 193, 78, 0.07); }
.ticket-card, .cat-option > span, .sstat, .support-hero, .ticket-hero { position: relative; overflow: hidden; }
.ticket-card::after {
  content: ''; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity 0.3s;
  background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, 0.04) 50%, transparent 70%); background-size: 250% 100%;
}
.ticket-card:hover::after { opacity: 1; animation: card-sheen 1.1s ease; }
@keyframes card-sheen { from { background-position: 150% 0; } to { background-position: -100% 0; } }
.sstat { transition: transform 0.25s var(--ease), border-color 0.25s; }
.sstat:hover { transform: translateY(-2px); border-color: var(--border-strong); }
.sstat b { animation: count-pop 0.6s var(--ease) both; }
@keyframes count-pop { from { opacity: 0; transform: translateY(8px); } }
.step.current span { animation: step-glow 2.2s ease-in-out infinite; }
@keyframes step-glow { 50% { box-shadow: 0 0 22px 0 rgba(242, 181, 44, 0.9); } }
.cat-ico { transition: transform 0.35s var(--ease); }
.ticket-card:hover .cat-ico, .cat-option > span:hover .cat-ico { transform: rotate(-6deg) scale(1.06); }
.pcard-avatar { transition: transform 0.25s ease-out; will-change: transform; }
.tier { transition: transform 0.25s var(--ease), box-shadow 0.25s; }
.board-row:hover .tier, .tier-tile:hover .tile-ico { transform: scale(1.08); }
.board-row::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--gold-grad); transform: scaleY(0); transition: transform 0.3s var(--ease); z-index: 2; }
.board-row:not(.top):hover::before { transform: scaleY(1); }
.table-wrap table.data tbody tr td:first-child { transition: box-shadow 0.2s; }
table.data tbody tr:hover td:first-child { box-shadow: inset 2px 0 0 var(--gold); }
.side-nav button svg { transition: transform 0.3s var(--ease); }
.side-nav button:hover svg { transform: translateX(2px) scale(1.08); }
.stat .ico { transition: transform 0.4s var(--ease); }
.stat:hover .ico { transform: rotate(-10deg) scale(1.15); }
.drop-zone.drag { animation: drop-pulse 1s ease-in-out infinite; }
@keyframes drop-pulse { 50% { box-shadow: inset 0 0 0 2px rgba(242, 193, 78, 0.35); } }

.nsel .nsel-dot { flex: 0 0 10px; width: 10px; height: 10px; }
.nsel-btn > span:not(.nsel-dot) { flex: 1; }

.dc-embed.with-thumb { position: relative; padding-right: 100px; }
.dc-thumb { position: absolute; top: 12px; right: 12px; width: 76px; height: auto; image-rendering: pixelated; }
.dc-inline { display: flex; gap: 40px; }
.dc-field.inline { margin-top: 10px; }
.dc-mention { background: rgba(88, 101, 242, 0.3); color: #c9cdfb; border-radius: 3px; padding: 0 2px; }
.invite-form { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.invite-form h3 { margin: 0; font-size: 17px; }
.invite-row { display: flex; gap: 8px; flex: 1; min-width: 280px; max-width: 460px; }
.invite-row .input { flex: 1; }

/* ---------- announcements ---------- */
.ann-stack { position: relative; z-index: 51; }
.ann { overflow: hidden; border-bottom: 1px solid var(--ann-bd); background: var(--ann-bg); color: var(--ann-fg); font-size: 13.5px; animation: ann-in 0.45s cubic-bezier(.2, .8, .2, 1) both; transition: height 0.3s ease, opacity 0.3s ease; }
.ann.closing { height: 0 !important; opacity: 0; border-bottom-width: 0; }
.ann-inner { display: flex; align-items: center; gap: 10px; min-height: 40px; padding-top: 8px; padding-bottom: 8px; }
.ann-inner > svg { flex: none; }
.ann-text { flex: 1; line-height: 1.5; word-break: break-word; }
.ann-text a { color: inherit; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; }
.ann-x { flex: none; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; border: 0; background: transparent; color: inherit; opacity: 0.7; cursor: pointer; transition: background 0.2s, opacity 0.2s; }
.ann-x:hover { opacity: 1; background: rgba(255, 255, 255, 0.08); }
.ann-gold { --ann-bg: linear-gradient(90deg, rgba(242, 193, 78, 0.16), rgba(242, 193, 78, 0.06)); --ann-bd: rgba(242, 193, 78, 0.28); --ann-fg: var(--gold-2); }
.ann-info { --ann-bg: linear-gradient(90deg, rgba(88, 150, 255, 0.16), rgba(88, 150, 255, 0.05)); --ann-bd: rgba(88, 150, 255, 0.3); --ann-fg: #a9c8ff; }
.ann-warn { --ann-bg: linear-gradient(90deg, rgba(255, 90, 95, 0.18), rgba(255, 90, 95, 0.06)); --ann-bd: rgba(255, 90, 95, 0.32); --ann-fg: #ffb0b3; }
.ann-preview { --ann-bg: repeating-linear-gradient(135deg, rgba(242, 193, 78, 0.1) 0 12px, rgba(242, 193, 78, 0.04) 12px 24px); --ann-bd: rgba(242, 193, 78, 0.3); --ann-fg: var(--gold); font-weight: 600; }
@keyframes ann-in { from { opacity: 0; transform: translateY(-100%); } }

/* ---------- launch countdown / maintenance page ---------- */
.gate-body { min-height: 100vh; display: grid; place-items: center; }
.gate-bg { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden;
  background: radial-gradient(ellipse 60% 50% at 50% 0%, rgba(242, 193, 78, 0.12), transparent 70%),
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px) 0 0 / 48px 48px,
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px) 0 0 / 48px 48px; }
.gate-bg i { position: absolute; width: 520px; height: 520px; border-radius: 50%; filter: blur(90px); opacity: 0.35; background: radial-gradient(circle, rgba(242, 181, 44, 0.5), transparent 65%); animation: gate-drift 16s ease-in-out infinite alternate; }
.gate-bg i:first-child { left: -160px; top: 30%; }
.gate-bg i:last-child { right: -180px; top: -120px; animation-delay: -8s; opacity: 0.22; }
@keyframes gate-drift { to { transform: translate(80px, 60px) scale(1.15); } }
.gate { position: relative; z-index: 1; width: 100%; max-width: 760px; padding: 48px 16px; text-align: center; display: flex; flex-direction: column; align-items: center; animation: panel-in 0.7s cubic-bezier(.2, .8, .2, 1) both; }
.gate-cube { width: 76px; height: 76px; margin-bottom: 22px; filter: drop-shadow(0 12px 30px rgba(242, 181, 44, 0.35)); animation: float 5s ease-in-out infinite; }
.gate-title { margin: 18px 0 12px; font-family: var(--font-display); font-weight: 700; font-size: clamp(32px, 6vw, 56px); letter-spacing: -0.035em; line-height: 1.08; }
.gate-title .gold { background: var(--gold-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.gate-lead { margin: 0 auto; max-width: 540px; color: var(--muted); font-size: 16px; }
.gate-clock { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; width: 100%; max-width: 560px; margin: 36px 0 18px; }
.gate-clock[hidden] { display: none; }
.gate-unit { position: relative; padding: 18px 6px 14px; border-radius: 18px; background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.015)); border: 1px solid var(--border); overflow: hidden; }
.gate-unit b { display: block; font-family: var(--font-display); font-weight: 700; font-size: clamp(30px, 7vw, 54px); line-height: 1; letter-spacing: -0.02em; background: var(--gold-grad); -webkit-background-clip: text; background-clip: text; color: transparent; font-variant-numeric: tabular-nums; }
.gate-unit b.tick { animation: gate-tick 0.45s cubic-bezier(.2, .8, .2, 1); }
.gate-unit span { display: block; margin-top: 8px; font-size: 12px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
@keyframes gate-tick { from { opacity: 0.2; transform: translateY(-35%) scale(0.92); filter: blur(2px); } }
.gate-when { margin: 0 0 26px; color: var(--muted); font-size: 14px; }
.gate-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.gate-foot { margin-top: 40px; display: flex; gap: 18px; align-items: center; flex-wrap: wrap; justify-content: center; font-size: 13px; }
.gate-foot a { color: var(--muted); text-decoration: none; }
.gate-foot a:hover { color: var(--gold); }
.gate-langs { display: flex; gap: 4px; }
.gate-langs button { border: 1px solid transparent; background: none; color: var(--muted); font: inherit; padding: 4px 10px; border-radius: 8px; cursor: pointer; }
.gate-langs button.active, .gate-langs button:hover { color: var(--text); border-color: var(--border); }
.gate-open .gate-unit { border-color: rgba(242, 193, 78, 0.5); box-shadow: var(--gold-glow); transition: 0.5s; }
@media (max-width: 480px) { .gate-clock { gap: 8px; } .gate-unit { padding: 14px 2px 10px; border-radius: 14px; } .gate-unit span { letter-spacing: 0.06em; } }
@media (prefers-reduced-motion: reduce) { .gate-bg i, .gate-cube, .gate-unit b.tick, .ann { animation: none; } }

/* ---------- staff: site status ---------- */
.site-grid { display: grid; gap: 20px; }
.site-card h3 { margin: 0; font-family: var(--font-display); font-size: 18px; }
.site-card .desc { margin: 4px 0 16px; font-size: 13px; color: var(--muted); }
.launch-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.launch-row .input { max-width: 260px; }
.maint-list { display: grid; gap: 8px; }
.maint-row { display: grid; grid-template-columns: 170px 1fr 220px; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--border); transition: border-color 0.2s, background 0.2s; }
.maint-row.on { border-color: rgba(255, 90, 95, 0.35); background: rgba(255, 90, 95, 0.05); }
.maint-row.all { border-style: dashed; }
.maint-row .input { padding-top: 8px; padding-bottom: 8px; }
.maint-row:not(.on) .input { opacity: 0.55; }
@media (max-width: 760px) { .maint-row { grid-template-columns: 1fr; } }
.ann-admin { display: grid; gap: 10px; }
.ann-admin .ann { border: 1px solid var(--ann-bd); border-radius: 12px; animation: none; }
.ann-admin-row { display: flex; gap: 10px; align-items: center; }
.ann-admin-row .ann { flex: 1; min-width: 0; }
.ann-admin-row .meta { display: flex; flex-direction: column; gap: 4px; align-items: flex-end; font-size: 12px; }
.site-save { display: flex; justify-content: flex-end; margin-top: 14px; }

/* ---------- Minecraft account link ---------- */
.pill.gold { background: rgba(242, 193, 78, 0.14); color: var(--gold-2); }
.mc-link { margin-bottom: 18px; }
.mc-link.linked { display: flex; gap: 16px; align-items: center; border-color: rgba(61, 220, 151, 0.25); background: linear-gradient(135deg, rgba(61, 220, 151, 0.07), transparent 60%); }
.mc-link-head { width: 64px; height: 64px; border-radius: 14px; image-rendering: pixelated; box-shadow: 0 8px 24px -8px rgba(0, 0, 0, 0.6); flex: none; }
.mc-link-body { min-width: 0; }
.mc-link-name { font-family: var(--font-display); font-size: 22px; font-weight: 700; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.mc-link-uuid { font-size: 11.5px; word-break: break-all; }
.mc-link-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.mc-link-top h3 { margin: 0; font-family: var(--font-display); font-size: 19px; }
.mc-steps { list-style: none; margin: 16px 0; padding: 0; display: grid; gap: 10px; font-size: 14px; }
.mc-steps li { display: flex; gap: 12px; align-items: flex-start; }
.mc-steps li > span { flex: none; width: 24px; height: 24px; border-radius: 8px; display: grid; place-items: center; font-size: 12px; font-weight: 800; color: #1a1204; background: var(--gold-grad); }
.mc-steps code { font-family: var(--font-mono); font-size: 12.5px; padding: 1px 6px; border-radius: 6px; background: rgba(255, 255, 255, 0.06); }
.ip-chip { border: 1px solid rgba(242, 193, 78, 0.3); background: rgba(242, 193, 78, 0.08); color: var(--gold-2); border-radius: 8px; padding: 2px 8px; font-size: 12.5px; cursor: pointer; margin-left: 4px; }
.ip-chip:hover { background: rgba(242, 193, 78, 0.16); }
.mc-code-row { display: flex; gap: 10px; }
.mc-code { flex: 1; min-width: 0; font-size: 26px !important; font-weight: 800; letter-spacing: 0.5em; text-align: center; padding: 10px 12px !important; }
.mc-code::placeholder { color: var(--dim); opacity: 0.5; }
.shake { animation: shake 0.4s; }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }

/* ---------- audit log page ---------- */
.audit-page { padding-top: 34px; padding-bottom: 80px; }
.au-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.au-head h1 { margin: 2px 0 4px; font-family: var(--font-display); font-size: clamp(28px, 4vw, 38px); letter-spacing: -0.02em; }
.au-head p { margin: 0; font-size: 14px; }
.au-stats { margin-bottom: 20px; }
.au-stats .stat { padding: 18px 20px; }
.au-topaction { font-size: 19px; }
.au-sub { font-size: 11.5px; margin-top: 4px; }
.au-charts { display: grid; grid-template-columns: 1.4fr 1fr; gap: 16px; margin-bottom: 20px; }
.au-chart h3 { margin: 0 0 12px; font-size: 13px; font-weight: 700; letter-spacing: 0.06em; color: var(--muted); }
.au-chart.wide { grid-column: span 1; }
.au-chart svg { display: block; overflow: visible; }
.au-grid { stroke: rgba(255, 255, 255, 0.06); stroke-width: 1; }
.au-axis { fill: var(--dim); font-size: 10.5px; font-family: var(--font-mono); }
.au-bar { fill: var(--gold); opacity: 0.85; transition: opacity 0.15s; }
.au-col:hover .au-bar { opacity: 1; filter: drop-shadow(0 0 6px rgba(242, 193, 78, 0.5)); }
.au-hbars { display: grid; gap: 4px; }
.au-hbar { display: grid; grid-template-columns: minmax(0, 13em) 1fr auto; gap: 10px; align-items: center; padding: 5px 6px; border: 0; border-radius: 8px; background: none; color: var(--text); font: inherit; font-size: 13px; text-align: left; cursor: pointer; }
.au-hbar:hover { background: rgba(255, 255, 255, 0.04); }
.au-hbar-label { display: flex; align-items: center; gap: 6px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.au-hbar-label svg { flex: none; color: var(--muted); }
.au-hbar-track { height: 8px; border-radius: 4px; background: rgba(255, 255, 255, 0.04); overflow: hidden; }
.au-hbar-track i { display: block; height: 100%; width: var(--w); border-radius: 4px; background: var(--gold); opacity: 0.85; animation: au-grow 0.7s var(--ease) both; }
.au-hbar-val { font-size: 12px; color: var(--muted); min-width: 3ch; text-align: right; }
@keyframes au-grow { from { width: 0; } }
.au-tip { position: fixed; left: 0; top: 0; z-index: 200; pointer-events: none; padding: 7px 10px; border-radius: 9px; background: #1b1f2a; border: 1px solid var(--border-strong); font-size: 12.5px; line-height: 1.5; box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.7); opacity: 0; transition: opacity 0.12s; }
.au-tip.on { opacity: 1; }

.au-filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 16px; position: sticky; top: 76px; z-index: 20; background: rgba(17, 20, 28, 0.92); backdrop-filter: blur(12px); }
.au-filters > input[name=q] { flex: 1 1 260px; }
.au-filters > .nsel, .au-filters > select { flex: 0 1 190px; width: auto; min-width: 150px; }
.au-date { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.au-date .input { width: 150px; padding-top: 8px; padding-bottom: 8px; }
.au-active { flex-basis: 100%; display: flex; gap: 8px; flex-wrap: wrap; }
.au-chip { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; padding: 2px 9px; border-radius: 999px; font-size: 12px; background: rgba(255, 255, 255, 0.05); border: 1px solid var(--border); color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.au-chip.on { border-color: rgba(242, 193, 78, 0.4); background: rgba(242, 193, 78, 0.08); }
.au-chip button { border: 0; background: none; color: var(--muted); cursor: pointer; padding: 0 0 0 4px; }

.au-list { display: grid; gap: 2px; }
.au-day { position: sticky; top: 150px; z-index: 5; margin: 18px 0 6px; font-size: 12px; font-weight: 700; letter-spacing: 0.08em; color: var(--gold-2); }
.au-row { display: grid; grid-template-columns: 74px minmax(0, 150px) minmax(0, 190px) minmax(0, 190px) minmax(0, 1fr) minmax(0, 170px); gap: 12px; align-items: center; width: 100%; padding: 10px 12px; border: 1px solid transparent; border-radius: 12px; background: var(--surface); color: var(--text); font: inherit; font-size: 13.5px; text-align: left; cursor: pointer; transition: border-color 0.15s, background 0.15s, transform 0.15s; animation: panel-in 0.35s var(--ease) both; }
.au-row:hover { border-color: rgba(242, 193, 78, 0.3); background: var(--surface-2); }
.au-row > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.au-time { color: var(--muted); font-size: 12px; }
.au-actor { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.au-actor img { width: 22px; height: 22px; border-radius: 50%; flex: none; }
.au-action { display: flex; align-items: center; gap: 8px; }
.au-cat { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 7px; background: rgba(242, 193, 78, 0.08); color: var(--gold); flex: none; }
.au-detail { color: var(--muted); }
.au-diffcount { font-family: var(--font-mono); font-size: 11px; padding: 1px 5px; border-radius: 5px; background: rgba(255, 255, 255, 0.06); color: var(--text); }
.au-src { display: flex; flex-direction: column; gap: 2px; align-items: flex-end; font-size: 11px; }
.au-src-badge { display: inline-block; padding: 1px 7px; border-radius: 999px; font-size: 11px; font-weight: 600; border: 1px solid var(--border-strong); color: var(--muted); }
.au-src-badge.web { color: var(--gold-2); border-color: rgba(242, 193, 78, 0.35); }
.au-src-badge.discord { color: #aab4ff; border-color: rgba(114, 137, 218, 0.45); }
.au-src-badge.api, .au-src-badge.server { color: var(--text); }
.au-more { display: block; margin: 18px auto 0; }
.au-more:disabled { opacity: 0.5; cursor: default; }
@media (max-width: 1100px) {
  .au-row { grid-template-columns: 64px minmax(0, 1fr) minmax(0, 1.2fr) auto; }
  .au-target, .au-detail { display: none; }
}
@media (max-width: 860px) { .au-charts { grid-template-columns: 1fr; } .au-filters { position: static; } .au-day { top: 64px; } }
@media (max-width: 600px) {
  .au-row { grid-template-columns: 1fr auto; row-gap: 4px; }
  .au-time { grid-column: 2; grid-row: 1; text-align: right; }
  .au-actor { grid-row: 1; grid-column: 1; }
  .au-action { grid-column: 1 / -1; }
  .au-src { display: none; }
  .au-date .input { width: 100%; }
  .au-date { flex: 1 1 140px; }
}

/* drawer */
.au-drawer { position: fixed; inset: 0; z-index: 120; pointer-events: none; }
.au-drawer-bg { position: absolute; inset: 0; background: rgba(3, 4, 8, 0.55); opacity: 0; transition: opacity 0.25s; }
.au-drawer-panel { position: absolute; right: 0; top: 0; bottom: 0; width: min(620px, 100vw); overflow-y: auto; background: var(--bg-2); border-left: 1px solid var(--border-strong); box-shadow: -30px 0 60px -30px rgba(0, 0, 0, 0.8); transform: translateX(100%); transition: transform 0.35s var(--ease); }
.au-drawer.open { pointer-events: auto; }
.au-drawer.open .au-drawer-bg { opacity: 1; }
.au-drawer.open .au-drawer-panel { transform: none; }
.au-d-head { position: sticky; top: 0; z-index: 2; display: flex; justify-content: space-between; gap: 12px; padding: 20px 22px 16px; background: rgba(12, 14, 20, 0.95); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); }
.au-d-head h2 { margin: 4px 0; font-family: var(--font-display); font-size: 22px; display: flex; align-items: center; gap: 8px; }
.au-d-head h2 svg { color: var(--gold); }
.au-d-body { padding: 18px 22px 40px; }
.au-d-body section { margin-bottom: 22px; }
.au-d-body h4 { margin: 0 0 10px; font-size: 11.5px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.au-d-detail { margin: 0 0 18px; padding: 12px 14px; border-radius: 12px; background: var(--surface); font-size: 14px; }
.au-d-card { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); }
.au-d-card > div { flex: 1; min-width: 0; }
.au-d-card img { width: 40px; height: 40px; border-radius: 50%; }
.au-d-card img.px { border-radius: 8px; image-rendering: pixelated; }
.au-diff { display: grid; grid-template-columns: minmax(90px, auto) 1fr 1fr; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; font-size: 13px; }
.au-diff > div { padding: 8px 10px; border-bottom: 1px solid var(--border); min-width: 0; word-break: break-word; }
.au-diff .h { font-size: 11px; font-weight: 700; color: var(--muted); background: var(--surface); letter-spacing: 0.06em; }
.au-diff .old { background: rgba(255, 90, 95, 0.07); color: #ffb0b3; text-decoration: line-through; text-decoration-color: rgba(255, 90, 95, 0.5); }
.au-diff .new { background: rgba(61, 220, 151, 0.07); color: #a6f0cd; }
.au-kv { display: grid; grid-template-columns: minmax(90px, auto) 1fr; gap: 1px; border-radius: 12px; overflow: hidden; border: 1px solid var(--border); background: var(--border); font-size: 13px; margin-bottom: 10px; }
.au-kv > div { padding: 8px 10px; background: var(--surface); min-width: 0; word-break: break-word; }
.au-kv .k { color: var(--muted); font-size: 12px; }
.au-ua { font-size: 11px; margin-top: 4px; word-break: break-all; white-space: normal; }
.au-code { font-family: var(--font-mono); font-size: 11.5px; word-break: break-all; }
.au-json { margin: 0 0 10px; padding: 12px 14px; max-height: 360px; overflow: auto; border-radius: 12px; background: #06070b; border: 1px solid var(--border); font: 12px/1.55 var(--font-mono); color: #d4d8e4; white-space: pre-wrap; word-break: break-word; }
.au-req { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; font-size: 13px; }
.au-method { padding: 2px 8px; border-radius: 6px; font: 700 11px var(--font-mono); background: rgba(242, 193, 78, 0.12); color: var(--gold-2); }
.au-related { display: grid; gap: 4px; }
.au-related button { display: grid; grid-template-columns: 150px 1fr auto; gap: 10px; align-items: center; padding: 8px 10px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--text); font: inherit; font-size: 12.5px; text-align: left; cursor: pointer; }
.au-related button:hover { border-color: rgba(242, 193, 78, 0.3); }
.au-raw summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--muted); padding: 6px 0; }
.au-raw[open] summary { margin-bottom: 8px; }
.au-raw .btn { margin-bottom: 8px; }

/* member profile */
.au-back { display: inline-block; margin-bottom: 16px; color: var(--muted); text-decoration: none; font-size: 14px; }
.au-back:hover { color: var(--gold); }
.au-profile { display: flex; align-items: center; gap: 18px; margin-bottom: 4px; }
.au-profile img { width: 72px; height: 72px; border-radius: 50%; box-shadow: 0 0 0 3px rgba(242, 193, 78, 0.25); }
.au-profile h1 { margin: 0; font-family: var(--font-display); font-size: 28px; }
.au-grid2 { display: grid; grid-template-columns: 1.3fr 1fr; gap: 16px; }
.au-grid2 h3 { margin: 0 0 12px; font-size: 13px; font-weight: 700; letter-spacing: 0.06em; color: var(--muted); }
.au-device { padding: 8px 0; border-bottom: 1px solid var(--border); display: grid; gap: 2px; }
@media (max-width: 860px) { .au-grid2 { grid-template-columns: 1fr; } .au-stats { grid-template-columns: repeat(2, 1fr); } }

/* ---------- player page (overview / stats / matches) ---------- */
.pf-page { padding-top: 30px; padding-bottom: 80px; }
.pf { border-radius: 24px; border: 1px solid var(--border); background: linear-gradient(180deg, rgba(255, 255, 255, 0.025), transparent 240px), var(--bg-2); padding: 26px 26px 30px; }
.pf-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; padding-bottom: 18px; margin-bottom: 22px; border-bottom: 1px solid var(--border-strong); }
.pf-name { margin: 0; display: flex; align-items: center; gap: 10px; font-family: 'Press Start 2P', var(--font-display); font-size: clamp(20px, 3.4vw, 34px); letter-spacing: 0.02em; color: #eef3ff; text-shadow: 0 0 24px rgba(242, 193, 78, 0.25); word-break: break-all; }
.pf-tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.pf-tabs button { display: inline-flex; align-items: center; gap: 7px; padding: 9px 16px; border-radius: 11px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--muted); font: 600 14px var(--font); cursor: pointer; transition: all 0.2s; }
.pf-tabs button:hover { color: var(--text); }
.pf-tabs button.active { color: var(--text); border-color: rgba(242, 193, 78, 0.55); background: rgba(242, 193, 78, 0.08); box-shadow: var(--gold-glow); }
.pf-grid { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 22px; align-items: start; }
.pf-side { position: sticky; top: 88px; display: grid; gap: 14px; justify-items: center; }
.pf-skin { width: 100%; aspect-ratio: 1 / 1.45; border-radius: 16px; border: 1px solid var(--border-strong); background: linear-gradient(180deg, #0a0c12 10%, #2b3445 100%); display: grid; place-items: center; overflow: hidden; }
.pf-skin img { height: 82%; image-rendering: pixelated; filter: drop-shadow(0 18px 24px rgba(0, 0, 0, 0.55)); animation: float 6s ease-in-out infinite; }
.pf-skin.banned img { filter: grayscale(1) drop-shadow(0 18px 24px rgba(0, 0, 0, 0.55)); }
.pf-side-links { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.pf-side-links .btn { display: inline-flex; gap: 6px; align-items: center; }
.pf-main { display: grid; gap: 16px; min-width: 0; }
.pf-main.in > * { animation: panel-in 0.4s var(--ease) both; }
.pf-main.in > *:nth-child(2) { animation-delay: 0.05s; }
.pf-main.in > *:nth-child(3) { animation-delay: 0.1s; }
.pf-main.in > *:nth-child(4) { animation-delay: 0.15s; }
.pf-cols { display: grid; grid-template-columns: 1.4fr 1fr; gap: 16px; }
.pf-card { min-width: 0; padding: 18px; border-radius: 16px; border: 1px solid var(--border); background: var(--surface); }
.pf-card h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 14px; font-family: var(--font-display); font-size: 17px; }
.pf-card h3 svg { color: var(--gold); }
.pf-card h3.center { justify-content: center; letter-spacing: 0.08em; text-transform: uppercase; font-size: 15px; }
.pf-card h3.big { font-size: 22px; margin: 2px 0 0; }
.pf-card-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; margin-bottom: 14px; }
.pf-card-head h3 { margin: 0; }
.pf-note { font-size: 12.5px; margin: 12px 0 0; }
.pf-names { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.pf-names li { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto auto 26px; gap: 10px; align-items: center; padding: 9px 12px; border-radius: 10px; background: var(--bg-2); border: 1px solid var(--border); font-size: 14px; }
.pf-names .n { color: var(--gold-2); font-weight: 700; }
.pf-names b { overflow: hidden; text-overflow: ellipsis; }
.pf-names .rel { font-size: 12px; }
.pf-copy { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 7px; border: 1px solid var(--border-strong); background: none; color: var(--muted); cursor: pointer; }
.pf-copy:hover { color: var(--gold); border-color: rgba(242, 193, 78, 0.4); }
.pf-uuid { display: flex; align-items: center; gap: 10px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border); font-size: 12.5px; min-width: 0; }
.pf-uuid code { font-family: var(--font-mono); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; min-width: 0; }
.pf-status { display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: 14px; border: 1px solid var(--border-strong); background: var(--bg-2); }
.pf-status > i { width: 10px; height: 10px; border-radius: 50%; flex: none; background: var(--dim); }
.pf-status.on { border-color: rgba(61, 220, 151, 0.4); background: linear-gradient(135deg, rgba(61, 220, 151, 0.1), transparent); }
.pf-status.on > i { background: var(--success); box-shadow: 0 0 0 0 rgba(61, 220, 151, 0.6); animation: pf-pulse 1.8s infinite; }
.pf-status > div { display: grid; gap: 2px; flex: 1; min-width: 0; }
.pf-status small { font-size: 11px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.pf-status.on small { color: var(--success); }
.pf-status b { font-size: 17px; font-family: var(--font-display); }
.pf-status span { font-size: 12px; color: var(--muted); }
@keyframes pf-pulse { 70% { box-shadow: 0 0 0 9px rgba(61, 220, 151, 0); } 100% { box-shadow: 0 0 0 0 rgba(61, 220, 151, 0); } }
.pf-rank { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.pf-rank .tier-tile { margin: 0; }
.pf-rank-info { display: flex; gap: 10px; flex-wrap: wrap; flex: 1; }
.pf-rank-info > div, .pf-mini { flex: 1 1 110px; display: grid; gap: 2px; padding: 12px 14px; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--border); }
.pf-rank-info small, .pf-tiles small { font-size: 11.5px; color: var(--muted); letter-spacing: 0.04em; }
.pf-rank-info b { font-family: var(--font-display); font-size: 20px; }
.pf-mini-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pf-mini b { font-family: var(--font-display); font-size: 20px; }
.pf-mini b.ok { color: var(--success); }
.pf-mini span { font-size: 12.5px; color: var(--muted); }
.pf-mini .btn { justify-self: start; margin-top: 6px; }
.win { color: var(--success); }
.loss { color: #ff8a8e; }
.gold { color: var(--gold-2); }
.pf-tiles { display: grid; gap: 10px; }
.pf-tiles.five { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.pf-tiles > div { display: grid; gap: 2px; justify-items: center; text-align: center; padding: 12px 8px; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--border); }
.pf-tiles b { font-family: var(--font-display); font-size: 21px; font-variant-numeric: tabular-nums; }
.pf-rows { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 14px; }
.pf-rows > div { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 10px; background: var(--bg-2); border: 1px solid var(--border); font-size: 14px; }
.pf-rows span { color: var(--muted); }
.pf-rows b { font-variant-numeric: tabular-nums; }
.pf-bars { display: grid; gap: 10px; }
.pf-bar { display: grid; grid-template-columns: 7.5em 1fr 3ch; gap: 10px; align-items: center; font-size: 13.5px; }
.pf-bar i { height: 8px; border-radius: 4px; background: linear-gradient(90deg, var(--gold) var(--w), rgba(255, 255, 255, 0.05) var(--w)); }
.pf-bar b { text-align: right; font-variant-numeric: tabular-nums; }
.pf-rivals { display: grid; gap: 6px; }
.pf-rivals a { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 10px; background: var(--bg-2); border: 1px solid var(--border); color: var(--text); text-decoration: none; font-size: 14px; }
.pf-rivals a:hover { border-color: rgba(242, 193, 78, 0.35); }
.pf-rivals img { width: 24px; height: 24px; border-radius: 6px; image-rendering: pixelated; }
.pf-rivals span { flex: 1; overflow: hidden; text-overflow: ellipsis; }
.world-thumb { width: 108px; height: 68px; border-radius: 10px; object-fit: cover; border: 1px solid rgba(255, 255, 255, 0.12); flex: none; image-rendering: pixelated; }
.world-thumb.sm { width: 76px; height: 48px; }
.world-thumb.lg { width: 180px; height: 112px; margin: 0 auto 10px; display: block; }
.pf-worlds { display: grid; gap: 8px; }
.pf-world { display: grid; grid-template-columns: 90px minmax(0, 1.4fr) repeat(5, minmax(0, 1fr)); gap: 10px; align-items: center; padding: 8px; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--border); }
.pf-world .world-thumb { width: 90px; height: 56px; }
.pf-world > div { display: grid; gap: 1px; text-align: center; min-width: 0; }
.pf-world small { font-size: 11px; color: var(--muted); }
.pf-world-name { text-align: left !important; }
.pf-world-name span { font-size: 11px; overflow: hidden; text-overflow: ellipsis; }
.pf-empty { text-align: center; padding: 30px 20px; }
.pf-empty h3 { justify-content: center; }
.pf-locked { text-align: center; padding: 40px 20px; display: grid; justify-items: center; gap: 8px; }
.pf-locked h3 { margin: 6px 0 0; font-family: var(--font-display); }
.pf-locked p { margin: 0 0 10px; }
.pf-lock-ico { width: 64px; height: 64px; border-radius: 18px; display: grid; place-items: center; background: rgba(242, 193, 78, 0.08); border: 1px solid rgba(242, 193, 78, 0.25); color: var(--gold); }
.pf-matches { display: grid; gap: 8px; }
.pf-day { margin: 16px 0 4px; font-size: 14px; font-weight: 700; color: var(--text); }
.pf-day:first-child { margin-top: 0; }
.pf-match { display: grid; grid-template-columns: 108px 64px minmax(0, 1fr) auto auto; gap: 16px; align-items: center; width: 100%; padding: 10px 16px 10px 10px; border-radius: 14px; border: 1px solid var(--border); border-left: 3px solid var(--dim); background: var(--surface); color: var(--text); font: inherit; text-align: left; cursor: pointer; transition: border-color 0.15s, background 0.15s, transform 0.15s; }
.pf-match:hover { background: var(--surface-2); transform: translateY(-1px); }
.pf-match.win { border-left-color: var(--success); }
.pf-match.loss { border-left-color: #ff5a5f; }
.pf-match.live { border-left-color: var(--gold); }
.pf-res { font-family: 'Press Start 2P', var(--font-display); font-size: 11px; letter-spacing: 0.04em; }
.pf-match.win .pf-res { color: var(--success); }
.pf-match.loss .pf-res { color: #ff8a8e; }
.pf-match.draw .pf-res { color: var(--muted); }
.pf-match.live .pf-res { color: var(--gold-2); }
.pf-vs { display: grid; gap: 2px; min-width: 0; font-size: 13px; }
.pf-vs b { font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pf-vs a { color: inherit; text-decoration: none; }
.pf-vs a:hover { color: var(--gold); }
.pf-opp img { width: 36px; height: 36px; border-radius: 8px; image-rendering: pixelated; }
.pf-score { display: flex; align-items: center; gap: 8px; font-family: 'Press Start 2P', var(--font-display); font-size: 20px; }
.pf-score i { color: var(--muted); font-style: normal; }
.pf-match.win .pf-score b:first-child, .pf-match.loss .pf-score b:last-child { color: var(--success); }
.pf-match.loss .pf-score b:first-child, .pf-match.win .pf-score b:last-child { color: #ff8a8e; }
.pf-kills { margin: -4px 0 6px 12px; padding: 10px 14px; border-left: 2px solid var(--border-strong); display: grid; gap: 6px; }
.pf-kill { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 13px; }
.pf-kill-meta { font-size: 12px; }
.pf-more { display: block; margin: 16px auto 0; }
@media (max-width: 980px) {
  .pf-grid { grid-template-columns: 1fr; }
  .pf-side { position: static; grid-template-columns: 160px 1fr; justify-items: start; align-items: center; }
  .pf-side .pf-skin { grid-row: span 3; }
  .pf-cols { grid-template-columns: 1fr; }
  .pf-tiles.five { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .pf-world { grid-template-columns: 70px minmax(0, 1fr) repeat(3, minmax(0, 1fr)); }
  .pf-world .world-thumb { width: 70px; height: 44px; }
  .pf-world > div:nth-child(n+6) { display: none; }
}
@media (max-width: 600px) {
  .pf { padding: 18px 14px 22px; border-radius: 18px; }
  .pf-tabs { width: 100%; }
  .pf-tabs button { flex: 1; justify-content: center; padding: 9px 8px; font-size: 13px; }
  .pf-side { grid-template-columns: 120px 1fr; }
  .pf-rows { grid-template-columns: 1fr; }
  .pf-tiles.five { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pf-match { grid-template-columns: 72px minmax(0, 1fr) auto; gap: 10px; }
  .pf-match .world-thumb { width: 72px; height: 46px; grid-row: span 2; }
  .pf-res { grid-column: 2; font-size: 9px; }
  .pf-vs { grid-column: 2; }
  .pf-opp { display: none; }
  .pf-score { grid-column: 3; grid-row: 1 / span 2; font-size: 15px; }
  .pf-names li { grid-template-columns: 18px minmax(0, 1fr) auto 26px; }
  .pf-names li .rel { display: none; }
  .pf-mini-grid { grid-template-columns: 1fr; }
}

/* ---------- settings page ---------- */
.set-title { margin: 4px 0; font-family: var(--font-display); font-size: 32px; }
.set-grid { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 22px; align-items: start; margin-top: 10px; padding-bottom: 60px; }
.set-nav { position: sticky; top: 88px; display: grid; gap: 4px; }
.set-nav a { padding: 9px 12px; border-radius: 10px; color: var(--muted); text-decoration: none; font-weight: 600; font-size: 14px; }
.set-nav a:hover { color: var(--text); background: var(--surface); }
.set-main { display: grid; gap: 18px; min-width: 0; }
.set-main > section { scroll-margin-top: 90px; }
.set-card h3 { margin: 0 0 14px; font-family: var(--font-display); font-size: 18px; }
.set-account { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.set-account img { width: 56px; height: 56px; border-radius: 50%; }
.set-section .mc-link { margin-bottom: 0; }
.me-solo { max-width: 720px; }
@media (max-width: 760px) { .set-grid { grid-template-columns: 1fr; } .set-nav { position: static; display: flex; flex-wrap: wrap; } }
#keys .keys-box { margin-top: 0; }

/* ---------- stats previews + full stats dialog ---------- */
.pf-more-link { display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%; margin-top: 12px; padding: 10px; border-radius: 11px; border: 1px dashed rgba(242, 193, 78, 0.35); background: rgba(242, 193, 78, 0.04); color: var(--gold-2); font: 600 13.5px var(--font); cursor: pointer; transition: background 0.2s, border-color 0.2s, transform 0.2s; }
.pf-more-link:hover { background: rgba(242, 193, 78, 0.1); border-style: solid; transform: translateY(-1px); }
.pf-rivals small { font-size: 11px; white-space: nowrap; }
.world-thumb.xs { width: 34px; height: 22px; border-radius: 5px; }
.pf-log { display: grid; gap: 6px; }
.pf-logrow { display: grid; grid-template-columns: 58px minmax(0, 1fr) minmax(0, 150px) 86px; gap: 12px; align-items: center; padding: 9px 12px; border-radius: 11px; background: var(--bg-2); border: 1px solid var(--border); border-left: 3px solid var(--dim); font-size: 14px; }
.pf-logrow.kill { border-left-color: var(--success); }
.pf-logrow.death { border-left-color: #ff5a5f; }
.pf-log-badge { font: 700 10.5px var(--font-mono); letter-spacing: 0.08em; }
.pf-logrow.kill .pf-log-badge { color: var(--success); }
.pf-logrow.death .pf-log-badge { color: #ff8a8e; }
.pf-log-main { display: grid; gap: 1px; min-width: 0; }
.pf-log-main a { color: var(--text); font-weight: 700; text-decoration: none; }
.pf-log-main a:hover { color: var(--gold); }
.pf-log-main small { font-size: 12px; }
.pf-log-world { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 12.5px; color: var(--muted); }
.pf-log-world span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pf-log-time { font-size: 11.5px; text-align: right; }

body.pfx-open { overflow: hidden; }
.pfx-bg { position: fixed; inset: 0; z-index: 150; display: grid; place-items: center; padding: 24px 16px; background: rgba(4, 5, 9, 0.62); backdrop-filter: blur(8px); animation: pfx-fade 0.28s ease both; }
.pfx { width: min(880px, 100%); max-height: min(780px, calc(100vh - 48px)); display: flex; flex-direction: column; border-radius: 22px; border: 1px solid var(--border-strong); background: linear-gradient(180deg, rgba(242, 193, 78, 0.05), transparent 140px), var(--bg-2); box-shadow: 0 40px 100px -30px rgba(0, 0, 0, 0.85), 0 0 0 1px rgba(242, 193, 78, 0.08); overflow: hidden; animation: pfx-pop 0.5s cubic-bezier(.16, 1.2, .3, 1) both; }
.pfx-bg.closing { animation: pfx-fade 0.28s ease reverse both; }
.pfx-bg.closing .pfx { animation: pfx-out 0.28s ease both; }
@keyframes pfx-fade { from { opacity: 0; } }
@keyframes pfx-pop { from { opacity: 0; transform: translateY(26px) scale(0.94); } }
@keyframes pfx-out { to { opacity: 0; transform: translateY(14px) scale(0.97); } }
.pfx-head { display: flex; align-items: center; gap: 14px; padding: 20px 22px 14px; }
.pfx-head img { width: 44px; height: 44px; border-radius: 10px; image-rendering: pixelated; box-shadow: 0 0 0 2px rgba(242, 193, 78, 0.3); }
.pfx-head h2 { margin: 2px 0 0; font-family: var(--font-display); font-size: 21px; }
.pfx-head > div { flex: 1; min-width: 0; }
.pfx-x { width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--muted); font-size: 14px; cursor: pointer; transition: all 0.2s; }
.pfx-x:hover { color: var(--text); transform: rotate(90deg); }
.pfx-tabs { position: relative; display: flex; gap: 4px; padding: 0 22px; border-bottom: 1px solid var(--border); }
.pfx-tabs button { position: relative; z-index: 1; padding: 11px 14px; border: 0; background: none; color: var(--muted); font: 600 14px var(--font); cursor: pointer; transition: color 0.2s; }
.pfx-tabs button.active { color: var(--text); }
.pfx-ink { position: absolute; left: 0; bottom: -1px; height: 2px; width: 0; border-radius: 2px; background: var(--gold-grad); box-shadow: 0 0 10px var(--gold); transition: transform 0.35s var(--ease), width 0.35s var(--ease); }
.pfx-body { flex: 1; overflow-y: auto; padding: 18px 22px 22px; overscroll-behavior: contain; }
.pfx-body.swap { animation: pfx-swap 0.35s var(--ease) both; }
@keyframes pfx-swap { from { opacity: 0; transform: translateX(14px); } }
.pfx-filters { display: grid; gap: 10px; margin-bottom: 12px; }
.pfx-filters .seg { justify-self: start; }
.pfx-row { display: flex; gap: 10px; flex-wrap: wrap; }
.pfx-row > .nsel, .pfx-row > select { flex: 1 1 170px; min-width: 150px; }
.pfx-row > input[data-f=opp] { flex: 1 1 170px; }
.pfx-date { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.pfx-date .input { width: 148px; padding-top: 8px; padding-bottom: 8px; }
.pfx-summary { display: flex; gap: 16px; flex-wrap: wrap; margin: 4px 0 12px; font-size: 13px; color: var(--muted); }
.pfx-summary b { font-family: var(--font-display); font-size: 17px; color: var(--text); margin-right: 3px; }
.pfx-summary .win b { color: var(--success); }
.pfx-summary .loss b { color: #ff8a8e; }
.pfx-list { display: grid; gap: 6px; }
.pfx-list .pf-logrow, .pfx-stagger > * { animation: pfx-row 0.4s var(--ease) both; animation-delay: calc(min(var(--i, 0), 20) * 25ms); }
@keyframes pfx-row { from { opacity: 0; transform: translateY(8px); } }
.pfx-foot { display: flex; justify-content: center; margin-top: 14px; }
.pfx-empty { text-align: center; padding: 30px 0; }
.pfx-search { margin-bottom: 12px; }
@media (max-width: 700px) {
  .pfx-bg { padding: 12px 10px; }
  .pfx { max-height: calc(100vh - 24px); border-radius: 18px; }
  .pfx-head { padding: 16px 16px 10px; }
  .pfx-tabs { padding: 0 10px; overflow-x: auto; }
  .pfx-tabs button { white-space: nowrap; padding: 10px; font-size: 13px; }
  .pfx-body { padding: 14px; }
  .pfx-date { flex: 1 1 140px; }
  .pfx-date .input { width: 100%; }
  .pf-logrow { grid-template-columns: 46px minmax(0, 1fr) auto; }
  .pf-log-world { display: none; }
}
@media (prefers-reduced-motion: reduce) { .pfx, .pfx-bg, .pfx-body.swap, .pfx-list .pf-logrow, .pfx-stagger > * { animation: none; } }
.pfx-head, .pfx-tabs { flex: none; }
.pfx { height: min(780px, calc(100vh - 48px)); }
.pf-log-main > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 700px) { .pfx { height: calc(100vh - 24px); } }

/* ---------- custom context menu ---------- */
.ctx { position: fixed; z-index: 300; min-width: 230px; max-width: 300px; padding: 6px; border-radius: 14px; border: 1px solid var(--border-strong); background: rgba(16, 19, 27, 0.9); backdrop-filter: blur(16px) saturate(1.4); box-shadow: 0 24px 60px -18px rgba(0, 0, 0, 0.85), 0 0 0 1px rgba(242, 193, 78, 0.06); opacity: 0; transform: scale(0.9); transition: opacity 0.16s ease, transform 0.22s cubic-bezier(.2, 1.3, .4, 1); user-select: none; }
.ctx.in { opacity: 1; transform: none; }
.ctx.out { opacity: 0; transform: scale(0.96); transition: opacity 0.14s ease, transform 0.14s ease; }
.ctx-nav { display: flex; gap: 4px; padding: 2px 2px 6px; margin-bottom: 4px; border-bottom: 1px solid var(--border); }
.ctx-nav button { flex: 1; display: grid; place-items: center; height: 32px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); cursor: pointer; transition: background 0.15s, color 0.15s, transform 0.15s; }
.ctx-nav button:hover:not(:disabled) { background: rgba(242, 193, 78, 0.1); color: var(--gold-2); }
.ctx-nav button:active:not(:disabled) { transform: scale(0.9); }
.ctx-nav button:disabled { opacity: 0.35; cursor: default; }
.ctx-list { position: relative; }
.ctx-hl { position: absolute; left: 0; right: 0; top: 0; height: 34px; border-radius: 9px; background: linear-gradient(90deg, rgba(242, 193, 78, 0.16), rgba(242, 193, 78, 0.06)); box-shadow: inset 0 0 0 1px rgba(242, 193, 78, 0.18); opacity: 0; pointer-events: none; transition: transform 0.18s var(--ease), height 0.18s var(--ease), opacity 0.15s; }
.ctx-item { position: relative; z-index: 1; display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 0; border-radius: 9px; background: none; color: var(--text); font: 500 13.5px var(--font); text-align: left; cursor: pointer; opacity: 0; transform: translateX(-6px); }
.ctx.in .ctx-item { animation: ctx-item 0.28s var(--ease) both; animation-delay: var(--d); }
@keyframes ctx-item { to { opacity: 1; transform: none; } }
.ctx-item svg { flex: none; color: var(--muted); transition: color 0.15s, transform 0.2s; }
.ctx-item.act svg { color: var(--gold); transform: scale(1.1); }
.ctx-item span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ctx-item kbd, .ctx-item small { font: 500 11px var(--font-mono); color: var(--dim); }
.ctx-item:disabled { color: var(--dim); cursor: default; }
.ctx-item:disabled svg { color: var(--dim); }
.ctx hr { border: 0; height: 1px; margin: 5px 6px; background: var(--border); }
.ctx-head { display: flex; align-items: center; gap: 8px; padding: 6px 10px 4px; font-size: 11.5px; font-weight: 700; letter-spacing: 0.06em; color: var(--gold-2); }
.ctx-head img { width: 18px; height: 18px; border-radius: 4px; image-rendering: pixelated; }
@media (prefers-reduced-motion: reduce) { .ctx, .ctx-item, .ctx.in .ctx-item { transition: none; animation: none; opacity: 1; transform: none; } }
.mc-ico { width: 16px; height: 16px; image-rendering: pixelated; vertical-align: -3px; flex: none; filter: drop-shadow(0 1px 0 rgba(0, 0, 0, 0.5)); }
.pf-bar > span { display: flex; align-items: center; gap: 7px; }
.pfx-filters .seg button { display: inline-flex; align-items: center; gap: 6px; }
.pf-log-main small, .pf-kill { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }

/* ================================================================ support v2 */
:root { --sp-open: #f2c14e; --sp-prog: #6fa8ff; --sp-closed: #7d8599; }
/* hero */
.sp-hero { position: relative; overflow: hidden; display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 18px; padding: 34px 32px; border-radius: 24px; border: 1px solid var(--border-strong); background: radial-gradient(120% 140% at 100% 0%, rgba(242, 193, 78, 0.14), transparent 55%), linear-gradient(160deg, #141925, #0c0f16); }
.sp-hero::after { content: ''; position: absolute; inset: 0; background: linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px) 0 0 / 28px 28px, linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px) 0 0 / 28px 28px; mask-image: linear-gradient(90deg, transparent, #000 60%); pointer-events: none; }
.sp-hero-text { position: relative; z-index: 1; max-width: 560px; }
.sp-hero h1 { margin: 6px 0 8px; font-family: var(--font-display); font-size: clamp(28px, 4vw, 40px); letter-spacing: -0.02em; }
.sp-hero p { margin: 0; color: var(--muted); }
.sp-hero-unread { display: inline-flex; align-items: center; gap: 8px; margin-top: 14px; padding: 6px 12px; border-radius: 999px; background: rgba(255, 90, 95, 0.12); border: 1px solid rgba(255, 90, 95, 0.3); color: #ffb0b3; font-size: 13px; font-weight: 600; }
.sp-hero-unread i { width: 8px; height: 8px; border-radius: 50%; background: #ff5a5f; animation: pf-pulse-red 1.6s infinite; }
@keyframes pf-pulse-red { 0% { box-shadow: 0 0 0 0 rgba(255, 90, 95, 0.6); } 70% { box-shadow: 0 0 0 8px rgba(255, 90, 95, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 90, 95, 0); } }
.sp-hero-art { position: absolute; right: 200px; top: 18px; display: flex; gap: 14px; opacity: 0.55; z-index: 0; }
.sp-hero-art span { animation: float 5s ease-in-out infinite; animation-delay: calc(var(--i) * -1.2s); }
.sp-hero-art span:nth-child(odd) { margin-top: 26px; }
.sp-new-btn { position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 8px; padding: 12px 20px; font-size: 15px; }
@media (max-width: 760px) { .sp-hero { padding: 24px 20px; } .sp-hero-art { display: none; } }
/* stats + toolbar */
.sp-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 16px; }
.sp-stat { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 12px; align-items: center; padding: 14px 16px; border-radius: 16px; border: 1px solid var(--border); background: var(--surface); color: var(--muted); font: inherit; text-align: left; cursor: pointer; transition: transform 0.2s var(--ease), border-color 0.2s, box-shadow 0.2s; }
.sp-stat:hover { transform: translateY(-2px); }
.sp-stat .sp-stat-ico { grid-row: span 2; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: color-mix(in srgb, var(--c) 14%, transparent); color: var(--c); }
.sp-stat b { font-family: var(--font-display); font-size: 24px; color: var(--text); line-height: 1.1; }
.sp-stat > span:last-child { font-size: 12.5px; }
.sp-stat.open { --c: var(--sp-open); } .sp-stat.in_progress { --c: var(--sp-prog); } .sp-stat.closed { --c: var(--sp-closed); }
.sp-stat.on { border-color: color-mix(in srgb, var(--c) 55%, transparent); box-shadow: 0 0 0 1px color-mix(in srgb, var(--c) 25%, transparent), 0 10px 30px -14px var(--c); }
.sp-toolbar { display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-bottom: 14px; }
.sp-search { flex: 1 1 260px; max-width: 420px; display: flex; align-items: center; gap: 8px; padding: 0 12px; border-radius: 12px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--muted); transition: border-color 0.2s, box-shadow 0.2s; }
.sp-search:focus-within { border-color: rgba(242, 193, 78, 0.55); box-shadow: 0 0 0 4px rgba(242, 193, 78, 0.08); }
.sp-search input { flex: 1; min-width: 0; padding: 10px 0; border: 0; background: none; color: var(--text); font: inherit; outline: none; }
/* ticket cards */
.sp-list { display: grid; gap: 10px; }
.sp-card { position: relative; display: flex; align-items: center; gap: 14px; padding: 16px 18px 16px 20px; border-radius: 16px; border: 1px solid var(--border); background: var(--surface); color: var(--text); text-decoration: none; overflow: hidden; animation: panel-in 0.4s var(--ease) both; animation-delay: calc(var(--i) * 35ms); transition: transform 0.2s var(--ease), border-color 0.2s, background 0.2s, box-shadow 0.2s; }
.sp-card::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--c, var(--sp-closed)); }
.sp-card.open { --c: var(--sp-open); } .sp-card.in_progress { --c: var(--sp-prog); } .sp-card.closed { --c: var(--sp-closed); opacity: 0.8; }
.sp-card:hover { transform: translateX(4px); border-color: rgba(242, 193, 78, 0.3); background: var(--surface-2); box-shadow: 0 12px 30px -18px rgba(0, 0, 0, 0.8); }
.sp-card:hover .chev { transform: translateX(3px); color: var(--gold); }
.sp-card .chev { color: var(--dim); transition: transform 0.2s, color 0.2s; flex: none; }
.sp-card.unread { border-color: rgba(255, 90, 95, 0.35); background: linear-gradient(90deg, rgba(255, 90, 95, 0.06), transparent 50%), var(--surface); }
.sp-card-main { flex: 1; min-width: 0; display: grid; gap: 3px; }
.sp-card-title { display: flex; align-items: center; gap: 8px; min-width: 0; }
.sp-card-title b { font-size: 15.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sp-newtag { flex: none; padding: 1px 8px; border-radius: 999px; background: #ff5a5f; color: #fff; font-size: 11px; font-weight: 700; animation: pf-pulse-red 1.6s infinite; }
.sp-card-prev { font-size: 13.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sp-card-prev b { color: var(--text); font-weight: 600; }
.sp-card-meta { display: flex; gap: 12px; flex-wrap: wrap; font-size: 12px; color: var(--dim); }
.sp-card-meta span { display: inline-flex; align-items: center; gap: 4px; }
.sp-empty { display: grid; justify-items: center; gap: 10px; padding: 50px 20px; border-radius: 18px; border: 1px dashed var(--border-strong); text-align: center; }
.sp-empty h3 { margin: 6px 0 0; font-family: var(--font-display); }
@media (max-width: 640px) { .sp-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; } .sp-stat { grid-template-columns: 1fr; padding: 12px; } .sp-stat .sp-stat-ico { display: none; } .sp-card { padding: 14px; gap: 10px; } .sp-card > .cat-ico { display: none; } .sp-card .st-pill { display: none; } }

/* new ticket */
.sp-new { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; align-items: start; padding-bottom: 40px; }
.sp-form { padding: 28px; border-radius: 22px; animation: panel-in 0.45s var(--ease) both; }
.sp-form-head h1 { margin: 4px 0 20px; font-family: var(--font-display); font-size: 28px; }
.sp-field { display: grid; gap: 8px; margin-bottom: 18px; }
.sp-field > label { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; color: var(--muted); }
.sp-field > label em { color: #ff8a8e; font-style: normal; }
.sp-count { margin-left: auto; font: 500 11.5px var(--font-mono); color: var(--dim); transition: color 0.2s; }
.sp-count.warn { color: #ffb0b3; }
.sp-field.shake { animation: shake 0.4s; }
.sp-cats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.sp-cat input { position: absolute; opacity: 0; pointer-events: none; }
.sp-cat > span { display: grid; justify-items: center; gap: 6px; padding: 16px 10px 14px; border-radius: 16px; border: 1px solid var(--border-strong); background: var(--bg-2); text-align: center; cursor: pointer; transition: transform 0.2s var(--ease), border-color 0.2s, background 0.2s, box-shadow 0.2s; }
.sp-cat > span:hover { transform: translateY(-3px); }
.sp-cat b { font-size: 14px; }
.sp-cat small { font-size: 11.5px; color: var(--dim); line-height: 1.35; }
.sp-cat input:checked + span { border-color: rgba(242, 193, 78, 0.6); background: linear-gradient(180deg, rgba(242, 193, 78, 0.1), rgba(242, 193, 78, 0.02)); box-shadow: var(--gold-glow); transform: translateY(-3px); }
.sp-cat input:checked + span .cat-ico { animation: sp-pop 0.4s cubic-bezier(.2, 1.4, .4, 1); }
@keyframes sp-pop { 40% { transform: scale(1.18) rotate(-6deg); } }
.sp-cat input:focus-visible + span { outline: 2px solid var(--gold); outline-offset: 2px; }
.sp-target-field { animation: panel-in 0.35s var(--ease) both; }
.sp-player-input { display: flex; align-items: center; gap: 10px; padding: 4px 12px 4px 4px; border-radius: 12px; border: 1px solid var(--border-strong); background: var(--bg-2); }
.sp-player-input:focus-within { border-color: rgba(242, 193, 78, 0.55); }
.sp-player-input img { width: 38px; height: 38px; border-radius: 9px; image-rendering: pixelated; }
.sp-player-input input { flex: 1; border: 0; background: none; padding: 8px 0; box-shadow: none !important; }
.sp-check { width: 20px; height: 20px; border-radius: 50%; flex: none; display: grid; place-items: center; font-size: 12px; font-weight: 800; }
.sp-check.wait { border: 2px solid var(--border-strong); border-top-color: var(--gold); animation: spin 0.7s linear infinite; }
.sp-check.good { background: rgba(61, 220, 151, 0.18); color: var(--success); }
.sp-check.good::after { content: '✓'; }
.sp-check.bad { background: rgba(255, 90, 95, 0.18); color: #ff8a8e; }
.sp-check.bad::after { content: '!'; }
.sp-dropzone { display: grid; justify-items: center; gap: 4px; width: 100%; padding: 22px; border-radius: 14px; border: 1.5px dashed var(--border-strong); background: var(--bg-2); color: var(--muted); font: inherit; cursor: pointer; transition: border-color 0.2s, background 0.2s, transform 0.2s; }
.sp-dropzone:hover, .sp-drag .sp-dropzone { border-color: rgba(242, 193, 78, 0.6); background: rgba(242, 193, 78, 0.05); color: var(--gold-2); }
.sp-drag .sp-dropzone { transform: scale(1.01); }
.sp-dropzone b { color: var(--text); font-size: 14px; }
.sp-dropzone small { font-size: 12px; }
.sp-tray { display: flex; gap: 8px; flex-wrap: wrap; }
.sp-chip { display: flex; align-items: center; gap: 8px; padding: 4px 6px 4px 4px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--border-strong); font-size: 12px; animation: panel-in 0.3s var(--ease) both; animation-delay: calc(var(--i) * 40ms); }
.sp-chip img { width: 34px; height: 34px; border-radius: 7px; object-fit: cover; }
.sp-chip button { width: 22px; height: 22px; border: 0; border-radius: 6px; background: rgba(255, 255, 255, 0.06); color: var(--muted); cursor: pointer; }
.sp-chip button:hover { background: rgba(255, 90, 95, 0.2); color: #ffb0b3; }
.sp-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 6px; }
.sp-submit { display: inline-flex; align-items: center; gap: 8px; }
.sp-submit.loading { pointer-events: none; opacity: 0.75; }
.sp-submit.loading svg { animation: sp-fly 0.8s ease-in-out infinite; }
@keyframes sp-fly { 50% { transform: translate(3px, -3px); } }
.sp-tips { position: sticky; top: 88px; padding: 22px; border-radius: 22px; background: radial-gradient(120% 90% at 100% 0%, rgba(242, 193, 78, 0.08), transparent 60%), var(--surface); }
.sp-tips-inner.in { animation: pfx-swap 0.35s var(--ease) both; }
.sp-tips h3 { margin: 12px 0 10px; font-family: var(--font-display); }
.sp-tips ul { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 9px; }
.sp-tips li { display: flex; gap: 9px; font-size: 13.5px; line-height: 1.5; }
.sp-tips li svg { flex: none; margin-top: 3px; color: var(--success); }
.sp-tips p { font-size: 12.5px; margin: 0; }
.sp-success { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; background: rgba(4, 5, 9, 0.6); backdrop-filter: blur(6px); animation: pfx-fade 0.25s both; }
.sp-success.out { animation: pfx-fade 0.35s reverse both; }
.sp-success-card { display: grid; justify-items: center; gap: 4px; padding: 30px 40px; border-radius: 22px; background: var(--bg-2); border: 1px solid rgba(61, 220, 151, 0.35); box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.8); animation: pfx-pop 0.5s cubic-bezier(.16, 1.2, .3, 1) both; }
.sp-success-card h3 { margin: 10px 0 0; font-family: var(--font-display); }
.sp-success-card p { margin: 0; }
.sp-success svg { width: 72px; height: 72px; fill: none; stroke: var(--success); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.sp-success circle { stroke-dasharray: 151; stroke-dashoffset: 151; animation: sp-draw 0.55s 0.1s ease-out forwards; }
.sp-success path { stroke-dasharray: 36; stroke-dashoffset: 36; animation: sp-draw 0.35s 0.55s ease-out forwards; }
@keyframes sp-draw { to { stroke-dashoffset: 0; } }
@media (max-width: 900px) { .sp-new { grid-template-columns: 1fr; } .sp-tips { position: static; order: -1; } .sp-cats { grid-template-columns: repeat(2, minmax(0, 1fr)); } .sp-form { padding: 20px; } }

/* conversation */
.sp-conv-host { height: min(78vh, 860px); min-height: 520px; margin-bottom: 40px; }
.sp-conv { position: relative; height: 100%; display: flex; flex-direction: column; border-radius: 22px; border: 1px solid var(--border-strong); background: var(--bg-2); overflow: hidden; animation: panel-in 0.4s var(--ease) both; }
.sp-conv.sp-drag::after { content: attr(data-drop); content: '⤓'; position: absolute; inset: 10px; z-index: 5; display: grid; place-items: center; border-radius: 18px; border: 2px dashed var(--gold); background: rgba(242, 193, 78, 0.08); color: var(--gold); font-size: 42px; pointer-events: none; animation: pfx-fade 0.2s both; }
.sp-head { flex: none; padding: 18px 20px; border-bottom: 1px solid var(--border); background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent); }
.sp-head-main { display: flex; gap: 14px; align-items: flex-start; }
.sp-head-text { flex: 1; min-width: 0; }
.sp-head-meta { display: flex; gap: 10px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.sp-head h2 { margin: 3px 0 10px; font-family: var(--font-display); font-size: 21px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sp-head-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.sp-head-extra { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.sp-target { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 3px; border-radius: 999px; background: rgba(255, 122, 138, 0.1); border: 1px solid rgba(255, 122, 138, 0.3); color: #ffb3bc; font-size: 12.5px; text-decoration: none; }
.sp-target img { width: 22px; height: 22px; border-radius: 50%; image-rendering: pixelated; }
.sp-target b { color: var(--text); }
.sp-scroll { position: relative; flex: 1; overflow-y: auto; padding: 18px 20px 10px; overscroll-behavior: contain; scroll-behavior: auto; }
.sp-thread { display: flex; flex-direction: column; gap: 3px; }
.sp-day { display: flex; align-items: center; gap: 12px; margin: 16px 0 10px; font-size: 11.5px; font-weight: 700; color: var(--dim); letter-spacing: 0.04em; }
.sp-day::before, .sp-day::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.sp-sys { align-self: center; display: flex; align-items: center; gap: 10px; margin: 8px 0; padding: 5px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); font-size: 12px; color: var(--muted); }
.sp-sys span { display: inline-flex; align-items: center; gap: 6px; }
.sp-sys time { font-family: var(--font-mono); font-size: 11px; color: var(--dim); }
.sp-sys .st-open { color: var(--sp-open); } .sp-sys .st-in_progress { color: var(--sp-prog); } .sp-sys .st-closed { color: #aab2c4; }
.sp-msg { display: flex; gap: 10px; align-items: flex-end; max-width: 78%; margin-top: 10px; }
.sp-msg.cont { margin-top: 0; }
.sp-msg.mine { align-self: flex-end; flex-direction: row-reverse; }
.sp-av, .sp-av-gap { width: 34px; height: 34px; border-radius: 50%; flex: none; }
.sp-bubble-wrap { min-width: 0; display: grid; gap: 4px; }
.sp-msg.mine .sp-bubble-wrap { justify-items: end; }
.sp-meta { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); padding: 0 4px; }
.sp-meta b { color: var(--text); font-size: 13px; }
.sp-meta time { font-family: var(--font-mono); font-size: 11px; color: var(--dim); }
.sp-badge { display: inline-flex; align-items: center; gap: 3px; padding: 1px 7px; border-radius: 999px; background: var(--gold-grad); color: #1a1204; font-size: 10.5px; font-weight: 800; box-shadow: 0 0 12px -2px rgba(242, 181, 44, 0.6); }
.sp-bubble { padding: 10px 14px; border-radius: 16px 16px 16px 6px; background: var(--surface-2); border: 1px solid var(--border); font-size: 14.5px; line-height: 1.6; word-break: break-word; }
.sp-bubble a { color: var(--gold-2); }
.sp-msg.cont .sp-bubble { border-radius: 6px 16px 16px 6px; }
.sp-msg.mine .sp-bubble { border-radius: 16px 16px 6px 16px; background: linear-gradient(160deg, rgba(242, 193, 78, 0.16), rgba(242, 193, 78, 0.06)); border-color: rgba(242, 193, 78, 0.28); }
.sp-msg.mine.cont .sp-bubble { border-radius: 16px 6px 6px 16px; }
.sp-msg.staff:not(.mine) .sp-bubble { background: linear-gradient(160deg, rgba(111, 168, 255, 0.14), rgba(111, 168, 255, 0.04)); border-color: rgba(111, 168, 255, 0.3); }
.sp-imgs { display: grid; gap: 6px; margin-top: 8px; }
.sp-imgs.n1 { grid-template-columns: minmax(0, 320px); }
.sp-imgs.n2 { grid-template-columns: repeat(2, minmax(0, 180px)); }
.sp-imgs.n3 { grid-template-columns: repeat(3, minmax(0, 140px)); }
.sp-imgs a { display: block; border-radius: 10px; overflow: hidden; border: 1px solid var(--border-strong); aspect-ratio: 4 / 3; background: #000; }
.sp-imgs img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s var(--ease); }
.sp-imgs a:hover img { transform: scale(1.05); }
.sp-in { animation: sp-in 0.45s cubic-bezier(.2, 1.1, .3, 1) both; }
.sp-msg.mine.sp-in { animation-name: sp-in-right; }
@keyframes sp-in { from { opacity: 0; transform: translate(-12px, 8px) scale(0.97); } }
@keyframes sp-in-right { from { opacity: 0; transform: translate(12px, 8px) scale(0.97); } }
.sp-jump { position: sticky; bottom: 8px; left: 50%; display: flex; align-items: center; gap: 6px; margin: 0 auto; width: max-content; padding: 7px 14px; border-radius: 999px; border: 0; background: var(--gold-grad); color: #1a1204; font: 700 12.5px var(--font); box-shadow: 0 10px 24px -8px rgba(242, 181, 44, 0.8); cursor: pointer; animation: panel-in 0.3s var(--ease) both; }
.sp-composer-wrap { flex: none; border-top: 1px solid var(--border); background: rgba(12, 14, 20, 0.9); }
.sp-composer { padding: 12px 14px 8px; display: grid; gap: 8px; }
.sp-quick { display: flex; align-items: center; gap: 6px; overflow-x: auto; padding-bottom: 2px; color: var(--gold); scrollbar-width: thin; }
.sp-quick button { flex: none; padding: 5px 11px; border-radius: 999px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--muted); font: 500 12px var(--font); cursor: pointer; transition: all 0.15s; }
.sp-quick button:hover { color: var(--text); border-color: rgba(242, 193, 78, 0.45); background: rgba(242, 193, 78, 0.08); }
.sp-quick .sp-quick-edit { border-style: dashed; color: var(--gold-2); }
.sp-input { display: flex; align-items: flex-end; gap: 8px; padding: 6px; border-radius: 16px; border: 1px solid var(--border-strong); background: var(--surface); transition: border-color 0.2s, box-shadow 0.2s; }
.sp-input:focus-within { border-color: rgba(242, 193, 78, 0.55); box-shadow: 0 0 0 4px rgba(242, 193, 78, 0.07); }
.sp-input textarea { flex: 1; min-height: 40px; max-height: 260px; padding: 9px 4px; border: 0; background: none; color: var(--text); font: 14.5px/1.5 var(--font); resize: none; outline: none; }
.sp-icon-btn { width: 40px; height: 40px; flex: none; display: grid; place-items: center; border: 0; border-radius: 12px; background: transparent; color: var(--muted); cursor: pointer; transition: all 0.15s; }
.sp-icon-btn:hover { background: rgba(242, 193, 78, 0.1); color: var(--gold-2); transform: rotate(-12deg); }
.sp-send { width: 42px; height: 42px; flex: none; display: grid; place-items: center; border: 0; border-radius: 12px; background: var(--surface-2); color: var(--dim); cursor: pointer; transition: all 0.2s var(--ease); }
.sp-send.ready { background: var(--gold-grad); color: #1a1204; box-shadow: 0 6px 18px -6px rgba(242, 181, 44, 0.8); }
.sp-send.ready:hover { transform: translateY(-2px); }
.sp-send.sending svg { animation: sp-fly 0.7s ease-in-out infinite; }
.sp-send.sent svg { animation: sp-launch 0.6s ease-in both; }
@keyframes sp-launch { 50% { transform: translate(14px, -14px); opacity: 0; } 51% { transform: translate(-14px, 14px); opacity: 0; } }
.sp-hint { font-size: 11px; color: var(--dim); padding: 0 4px; }
.sp-closed { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 16px; color: var(--muted); font-size: 13.5px; }
@media (max-width: 700px) {
  .sp-conv-host { height: calc(100vh - 150px); min-height: 460px; }
  .sp-msg { max-width: 92%; }
  .sp-head h2 { white-space: normal; font-size: 18px; }
  .sp-head-main > .cat-ico { display: none; }
  .sp-imgs.n3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .sp-imgs.n2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* staff inbox */
.inbox { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 14px; height: calc(100vh - 190px); min-height: 560px; }
.inbox-side { display: flex; flex-direction: column; gap: 10px; min-height: 0; }
.inbox-side .sp-search { max-width: none; flex: none; }
.inbox-seg { flex: none; }
.inbox-seg button { padding: 6px 9px; font-size: 12px; }
.inbox-list { flex: 1; overflow-y: auto; display: grid; align-content: start; gap: 6px; padding-right: 2px; }
.inbox-item { position: relative; display: flex; gap: 10px; align-items: flex-start; width: 100%; padding: 11px 12px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font: inherit; text-align: left; cursor: pointer; transition: border-color 0.15s, background 0.15s, transform 0.15s; }
.inbox-item:hover { background: var(--surface-2); }
.inbox-item.sel { border-color: rgba(242, 193, 78, 0.55); background: linear-gradient(90deg, rgba(242, 193, 78, 0.1), transparent 70%), var(--surface); box-shadow: inset 3px 0 0 var(--gold); }
.inbox-item img { width: 34px; height: 34px; border-radius: 50%; flex: none; }
.inbox-item-main { flex: 1; min-width: 0; display: grid; gap: 2px; }
.inbox-item-top { display: flex; gap: 8px; align-items: baseline; }
.inbox-item-top b { flex: 1; min-width: 0; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inbox-item-top time { flex: none; font-size: 11px; color: var(--dim); }
.inbox-item-prev { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inbox-item-prev b { color: var(--text); font-weight: 600; }
.inbox-item-meta { display: flex; gap: 8px; align-items: center; font-size: 11px; color: var(--dim); overflow: hidden; white-space: nowrap; }
.inbox-item-meta .cat-ico { width: 18px; height: 18px; border-radius: 5px; }
.inbox-dot { position: absolute; right: 10px; bottom: 12px; width: 8px; height: 8px; border-radius: 50%; background: var(--c, var(--sp-closed)); }
.inbox-item.open { --c: var(--sp-open); } .inbox-item.in_progress { --c: var(--sp-prog); } .inbox-item.closed { opacity: 0.75; }
.inbox-item.unread { border-color: rgba(255, 90, 95, 0.4); }
.inbox-item.unread::after { content: ''; position: absolute; top: 10px; right: 10px; width: 9px; height: 9px; border-radius: 50%; background: #ff5a5f; animation: pf-pulse-red 1.6s infinite; }
.inbox-item.unread .inbox-item-top time { margin-right: 14px; }
.inbox-main { min-width: 0; min-height: 0; }
.inbox-main .sp-conv { animation: pfx-swap 0.3s var(--ease) both; }
.inbox-empty { height: 100%; display: grid; place-content: center; justify-items: center; gap: 8px; border-radius: 22px; border: 1px dashed var(--border-strong); color: var(--muted); }
.inbox-back { display: none; }
@media (max-width: 980px) {
  .inbox { grid-template-columns: 1fr; height: auto; }
  .inbox-list { max-height: none; }
  .inbox.has-sel .inbox-side { display: none; }
  .inbox:not(.has-sel) .inbox-main { display: none; }
  .inbox-main { height: calc(100vh - 170px); min-height: 480px; }
  .inbox-back { display: inline-flex; }
}

.sp-head-main { flex-wrap: wrap; }
.sp-head-text { flex: 1 1 320px; }
.sp-head-extra { margin-left: auto; }

/* ---------- sound settings ---------- */
.snd-row { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.snd-switch { display: inline-flex; align-items: center; gap: 12px; cursor: pointer; }
.snd-switch input { position: absolute; opacity: 0; pointer-events: none; }
.snd-switch span { position: relative; width: 46px; height: 26px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border-strong); transition: background 0.25s, border-color 0.25s; }
.snd-switch span::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--muted); transition: transform 0.3s cubic-bezier(.3, 1.5, .5, 1), background 0.25s; }
.snd-switch input:checked + span { background: var(--gold-grad); border-color: transparent; box-shadow: 0 0 14px -4px rgba(242, 181, 44, 0.8); }
.snd-switch input:checked + span::after { transform: translateX(20px); background: #1a1204; }
.snd-switch input:focus-visible + span { outline: 2px solid var(--gold); outline-offset: 2px; }
.snd-vol { max-width: 460px; }
.snd-ico { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: rgba(242, 193, 78, 0.1); color: var(--gold); cursor: pointer; flex: none; transition: transform 0.2s; }
.snd-ico:hover { transform: scale(1.06); }
.snd-vol b { width: 4ch; text-align: right; color: var(--text); }
#sndVol { flex: 1; -webkit-appearance: none; appearance: none; height: 6px; border-radius: 999px; background: linear-gradient(90deg, var(--gold) var(--p, 40%), var(--surface-2) var(--p, 40%)); outline: none; cursor: pointer; }
#sndVol::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 3px solid var(--gold); box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5); transition: transform 0.15s; }
#sndVol::-webkit-slider-thumb:hover { transform: scale(1.15); }
#sndVol::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 3px solid var(--gold); }
.snd-preview { display: flex; flex-wrap: wrap; gap: 8px; }
#sound.muted-off .snd-vol, #sound.muted-off .snd-preview { opacity: 0.45; }

/* ---------- centered notice dialog (replaces toasts) ---------- */
.nt-bg { position: fixed; inset: 0; z-index: 400; display: grid; place-items: center; padding: 20px; background: rgba(4, 5, 9, 0.45); backdrop-filter: blur(3px); animation: pfx-fade 0.2s ease both; }
.nt-bg.out { animation: pfx-fade 0.2s ease reverse both; }
.nt { position: relative; width: min(380px, 100%); padding: 30px 28px 24px; border-radius: 20px; border: 1px solid var(--border-strong); background: linear-gradient(180deg, color-mix(in srgb, var(--c) 9%, transparent), transparent 140px), var(--bg-2); box-shadow: 0 30px 80px -24px rgba(0, 0, 0, 0.85), 0 0 0 1px color-mix(in srgb, var(--c) 14%, transparent); text-align: center; overflow: hidden; animation: nt-pop 0.42s cubic-bezier(.2, 1.35, .35, 1) both; }
.nt-bg.out .nt { animation: pfx-out 0.2s ease both; }
.nt-bg.ok { --c: var(--success); }
.nt-bg.err { --c: #ff5a5f; }
@keyframes nt-pop { from { opacity: 0; transform: translateY(18px) scale(0.9); } }
.nt-ico { width: 76px; height: 76px; fill: none; stroke: var(--c); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 0 14px color-mix(in srgb, var(--c) 45%, transparent)); }
.nt-ico circle { stroke-dasharray: 145; stroke-dashoffset: 145; animation: sp-draw 0.5s 0.08s ease-out forwards; }
.nt-ico path { stroke-dasharray: 48; stroke-dashoffset: 48; animation: sp-draw 0.3s 0.45s ease-out forwards; }
.nt-bg.err .nt-ico { animation: nt-shake 0.4s 0.5s; }
@keyframes nt-shake { 20%, 60% { transform: translateX(-5px); } 40%, 80% { transform: translateX(5px); } }
.nt h3 { margin: 12px 0 6px; font-family: var(--font-display); font-size: 24px; }
.nt p { margin: 0 0 20px; color: var(--muted); font-size: 15px; line-height: 1.6; word-break: break-word; white-space: pre-line; }
.nt-ok { min-width: 96px; background: var(--c); color: #0b0d12; border-color: transparent; font-weight: 800; box-shadow: 0 8px 22px -8px var(--c); }
.nt-ok:hover { background: var(--c); filter: brightness(1.08); transform: translateY(-1px); }
.nt-ok:focus-visible { outline: 3px solid color-mix(in srgb, var(--c) 45%, transparent); outline-offset: 2px; }
.nt-bar { position: absolute; left: 0; bottom: 0; height: 3px; width: 100%; background: var(--c); transform-origin: left; animation: nt-bar 2.2s linear forwards; }
.nt.hold .nt-bar { animation-play-state: paused; }
@keyframes nt-bar { to { transform: scaleX(0); } }
@media (prefers-reduced-motion: reduce) { .nt, .nt-ico circle, .nt-ico path { animation: none; stroke-dashoffset: 0; } }

/* ---------- account link detail dialog ---------- */
tr.row-link { cursor: pointer; transition: background 0.15s; }
tr.row-link:hover { background: rgba(242, 193, 78, 0.05); }
.pfx.ld { max-width: 760px; }
.ld-hero { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; padding: 16px; border-radius: 16px; background: linear-gradient(135deg, rgba(242, 193, 78, 0.07), transparent 60%), var(--surface); border: 1px solid var(--border); animation: panel-in 0.35s var(--ease) both; }
.ld-hero h3 { margin: 0 0 2px; font-family: var(--font-display); font-size: 22px; }
.ld-avatar { width: 64px; height: 64px; border-radius: 50%; box-shadow: 0 0 0 3px rgba(242, 193, 78, 0.25); }
.ld-avatar.px { border-radius: 14px; image-rendering: pixelated; }
.ld-copy { border: 0; background: none; color: var(--muted); cursor: pointer; font-size: 13px; padding: 0 4px; }
.ld-copy:hover { color: var(--gold); }
.ld-kv { display: grid; grid-template-columns: minmax(110px, auto) 1fr; gap: 1px; border-radius: 12px; overflow: hidden; border: 1px solid var(--border); background: var(--border); font-size: 13.5px; margin-bottom: 16px; }
.ld-kv > div { padding: 9px 12px; background: var(--surface); min-width: 0; word-break: break-word; }
.ld-kv .k { color: var(--muted); font-size: 12.5px; }
.ld-h { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; margin: 18px 0 10px; font-size: 12px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.ld-h small { font-size: 11px; letter-spacing: 0; text-transform: none; font-weight: 500; }
.ld-more { margin-left: auto; color: var(--gold-2); text-decoration: none; letter-spacing: 0; text-transform: none; font-weight: 600; }
.ld-roles { display: flex; flex-wrap: wrap; gap: 6px; }
.ld-role { display: inline-flex; align-items: center; gap: 7px; padding: 5px 11px 5px 9px; border-radius: 999px; background: color-mix(in srgb, var(--rc) 12%, var(--surface)); border: 1px solid color-mix(in srgb, var(--rc) 45%, transparent); font-size: 13px; font-weight: 600; animation: pfx-row 0.35s var(--ease) both; animation-delay: calc(min(var(--i), 20) * 25ms); }
.ld-role i { width: 10px; height: 10px; border-radius: 50%; background: var(--rc); box-shadow: 0 0 8px -1px var(--rc); }
.ld-names { display: flex; flex-wrap: wrap; gap: 6px; }
.ld-names span { padding: 5px 10px; border-radius: 9px; background: var(--surface); border: 1px solid var(--border); font-size: 13px; }
.ld-list { display: grid; gap: 6px; }
.ld-list > * { display: grid; grid-template-columns: auto auto minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 9px 12px; border-radius: 11px; background: var(--surface); border: 1px solid var(--border); color: var(--text); text-decoration: none; font-size: 13px; animation: pfx-row 0.3s var(--ease) both; }
.ld-list > a:hover { border-color: rgba(242, 193, 78, 0.35); }
.ld-list .muted { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ld-list time { font-size: 11.5px; color: var(--dim); white-space: nowrap; }
@media (max-width: 600px) { .ld-list > * { grid-template-columns: auto minmax(0, 1fr) auto; } .ld-list > * > .muted { display: none; } .ld-kv { grid-template-columns: 1fr; } }

/* ---------- punishments ---------- */
.pn-counts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 14px; }
.pn-count { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 12px; align-items: center; padding: 14px 16px; border-radius: 16px; border: 1px solid var(--border); background: var(--surface); color: var(--muted); font: inherit; text-align: left; cursor: pointer; transition: transform 0.2s var(--ease), border-color 0.2s; }
.pn-count:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--c) 50%, transparent); }
.pn-count .pn-ico { grid-row: span 2; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: color-mix(in srgb, var(--c) 14%, transparent); color: var(--c); }
.pn-count b { font-family: var(--font-display); font-size: 24px; color: var(--text); line-height: 1.1; }
.pn-count > span:last-child { font-size: 12.5px; }
.pn-count.ban, .pn-pill.ban, .pn-type.ban { --c: #ff5a5f; }
.pn-count.ipban, .pn-pill.ipban, .pn-type.ipban { --c: #e05bd0; }
.pn-count.mute, .pn-pill.mute, .pn-type.mute { --c: #f2a14e; }
.pn-pill.warn, .pn-type.warn { --c: #f2c14e; }
.pn-pill.kick, .pn-type.kick { --c: #6fa8ff; }
.pn-toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.pn-toolbar .sp-search { flex: 1 1 220px; }
.pn-pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 7px; border-radius: 999px; background: color-mix(in srgb, var(--c) 14%, transparent); color: var(--c); font-size: 12px; font-weight: 700; white-space: nowrap; }
.pn-pill svg { width: 14px; height: 14px; }
.pn-form { display: grid; gap: 4px; }
.pn-types { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin-bottom: 14px; }
.pn-type input { position: absolute; opacity: 0; pointer-events: none; }
.pn-type > span { display: grid; justify-items: center; gap: 6px; padding: 12px 6px; border-radius: 14px; border: 1px solid var(--border-strong); background: var(--bg-2); color: var(--muted); font-size: 12.5px; cursor: pointer; transition: all 0.2s var(--ease); }
.pn-type > span:hover { transform: translateY(-2px); color: var(--text); }
.pn-type input:checked + span { color: var(--c); border-color: color-mix(in srgb, var(--c) 60%, transparent); background: color-mix(in srgb, var(--c) 10%, var(--bg-2)); box-shadow: 0 8px 22px -12px var(--c); transform: translateY(-2px); }
.pn-type input:disabled + span { opacity: 0.35; cursor: not-allowed; transform: none; }
.pn-type b { color: inherit; }
.pn-lookup { font-size: 12.5px; min-height: 18px; }
.pn-presets { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.pn-presets button, .pn-quick button { padding: 6px 12px; border-radius: 999px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--muted); font: 600 12.5px var(--font); cursor: pointer; transition: all 0.15s; }
.pn-presets button.active, .pn-presets button:hover, .pn-quick button:hover { color: var(--text); border-color: rgba(242, 193, 78, 0.5); background: rgba(242, 193, 78, 0.1); }
.pn-presets .input { flex: 1 1 140px; padding-top: 7px; padding-bottom: 7px; }
.pn-quick { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.pn-opts { display: grid; gap: 8px; margin: 6px 0 4px; }
.pn-detail-head { display: flex; gap: 14px; align-items: center; margin-bottom: 14px; }
.pn-detail-head img { width: 56px; height: 56px; border-radius: 12px; image-rendering: pixelated; }
.pn-detail-head h3 { margin: 0 0 6px; }
@media (max-width: 640px) { .pn-types { grid-template-columns: repeat(3, minmax(0, 1fr)); } .pn-counts { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; } .pn-count { grid-template-columns: 1fr; } .pn-count .pn-ico { display: none; } }

/* ---------- game permissions ---------- */
.pm { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 16px; align-items: start; }
.pm-side { padding: 10px; position: sticky; top: 88px; }
.pm-group { padding: 10px 12px 6px; font-size: 11px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--dim); }
.pm-subjects { display: grid; gap: 2px; }
.pm-subjects button { display: flex; align-items: center; gap: 8px; width: 100%; padding: 9px 12px; border: 0; border-radius: 10px; background: none; color: var(--muted); font: 600 13.5px var(--font); text-align: left; cursor: pointer; transition: all 0.15s; }
.pm-subjects button span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pm-subjects button em { font-style: normal; font: 600 11px var(--font-mono); padding: 1px 7px; border-radius: 999px; background: var(--surface-2); color: var(--dim); }
.pm-subjects button i { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.pm-subjects button:hover { background: var(--surface-2); color: var(--text); }
.pm-subjects button.sel { background: rgba(242, 193, 78, 0.12); color: var(--gold-2); box-shadow: inset 3px 0 0 var(--gold); }
.pm-add-role { display: flex; gap: 6px; padding: 10px 6px 4px; }
.pm-add-role .input, .pm-add-role .nsel { flex: 1; min-width: 0; }
.pm-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.pm-head h3 { margin: 0 0 6px; font-family: var(--font-display); font-size: 20px; }
.pm-input { display: flex; gap: 8px; margin-bottom: 14px; }
.pm-input .input { flex: 1; }
.pm-nodes { display: flex; flex-wrap: wrap; gap: 8px; min-height: 40px; margin-bottom: 18px; }
.pm-node { display: inline-flex; align-items: center; gap: 2px; padding: 3px; border-radius: 10px; border: 1px solid rgba(61, 220, 151, 0.35); background: rgba(61, 220, 151, 0.08); animation: pfx-row 0.3s var(--ease) both; animation-delay: calc(min(var(--i), 20) * 20ms); }
.pm-node.deny { border-color: rgba(255, 90, 95, 0.4); background: rgba(255, 90, 95, 0.08); }
.pm-node code { font: 600 12.5px var(--font-mono); padding: 0 6px; }
.pm-node.deny code { text-decoration: line-through; text-decoration-color: rgba(255, 90, 95, 0.6); }
.pm-node button { width: 24px; height: 24px; border: 0; border-radius: 7px; background: rgba(255, 255, 255, 0.05); color: var(--muted); font-weight: 800; cursor: pointer; }
.pm-node button[data-toggle] { color: var(--success); }
.pm-node.deny button[data-toggle] { color: #ff8a8e; }
.pm-node button:hover { background: rgba(255, 255, 255, 0.12); }
.pm-known { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 12.5px; }
.pm-known button { padding: 4px 9px; border-radius: 8px; border: 1px dashed var(--border-strong); background: none; color: var(--muted); font: 500 11.5px var(--font-mono); cursor: pointer; }
.pm-known button:hover { color: var(--gold-2); border-color: rgba(242, 193, 78, 0.5); }
@media (max-width: 860px) { .pm { grid-template-columns: 1fr; } .pm-side { position: static; } }

/* ---------- support upgrade: category forms, appeals, staff tools ---------- */
.sp-extra { display: grid; gap: 14px; animation: sp-fade-up 0.35s var(--ease) both; }
.sp-extra[hidden] { display: none; }
@keyframes sp-fade-up { from { opacity: 0; transform: translateY(6px); } }
.sp-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 640px) { .sp-row2 { grid-template-columns: 1fr; } }
.sp-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.sp-chips label { cursor: pointer; }
.sp-chips input { position: absolute; opacity: 0; pointer-events: none; }
.sp-chips span { display: inline-block; padding: 7px 14px; border-radius: 999px; border: 1px solid var(--border-strong); background: var(--surface); font-size: 13px; color: var(--muted); transition: all 0.2s var(--ease); }
.sp-chips label:hover span { color: var(--text); border-color: var(--gold); }
.sp-chips input:checked + span { color: #1a1204; background: var(--gold-grad); border-color: transparent; font-weight: 700; transform: translateY(-1px); }
.sp-chips input:focus-visible + span { outline: 2px solid var(--gold); outline-offset: 2px; }
.sp-pn-pick { display: grid; gap: 8px; }
.sp-pn-opt { cursor: pointer; display: block; }
.sp-pn-opt input { position: absolute; opacity: 0; pointer-events: none; }
.sp-pn-opt .sp-pn { transition: border-color 0.2s, background 0.2s, transform 0.2s var(--ease); }
.sp-pn-opt:hover .sp-pn { border-color: var(--border-strong); }
.sp-pn-opt input:checked + .sp-pn { border-color: var(--gold); background: color-mix(in srgb, var(--gold) 9%, var(--surface)); transform: translateX(3px); }
.sp-pn-opt.off { cursor: not-allowed; opacity: 0.55; }
.sp-pn { --c: #ff7a8a; display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface); min-width: 0; }
.sp-pn.mute { --c: #6fa8ff; } .sp-pn.warn { --c: #f2c14e; } .sp-pn.kick { --c: #aab2c4; } .sp-pn.ipban { --c: #ff5a5f; }
.sp-pn.revoked, .sp-pn.expired { opacity: 0.7; }
.sp-pn-type { flex: none; padding: 3px 9px; border-radius: 8px; font-size: 12px; font-weight: 800; color: var(--c); background: color-mix(in srgb, var(--c) 14%, transparent); border: 1px solid color-mix(in srgb, var(--c) 40%, transparent); }
.sp-pn-main { display: grid; gap: 2px; min-width: 0; flex: 1; }
.sp-pn-main b { font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sp-pn-main small { color: var(--muted); font-size: 11.5px; }
.sp-pn-tag { flex: none; font-size: 11px; padding: 2px 8px; border-radius: 999px; background: var(--surface-2); color: var(--muted); }
.sp-pn-none { display: flex; align-items: center; gap: 10px; padding: 14px; border-radius: 14px; border: 1px dashed var(--border-strong); color: var(--muted); font-size: 13.5px; }
.sp-info { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px 16px; margin-top: 12px; padding: 12px 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); }
.sp-info-row { display: grid; gap: 3px; min-width: 0; }
.sp-info-row.wide { grid-column: 1 / -1; }
.sp-info-row > span { font-size: 11px; color: var(--dim); letter-spacing: 0.04em; }
.sp-info-row > b { font-size: 13.5px; font-weight: 600; word-break: break-word; }
.sp-info-row a { color: var(--gold-2); }
.sp-hist { display: flex; flex-wrap: wrap; gap: 6px; }
.sp-hist-item { --c: #ff7a8a; display: inline-flex; gap: 6px; align-items: center; padding: 3px 9px; border-radius: 8px; font-size: 11.5px; color: var(--muted); border: 1px solid color-mix(in srgb, var(--c) 35%, transparent); background: color-mix(in srgb, var(--c) 8%, transparent); }
.sp-hist-item b { color: var(--c); }
.sp-hist-item.mute { --c: #6fa8ff; } .sp-hist-item.warn { --c: #f2c14e; } .sp-hist-item.kick { --c: #aab2c4; }
.sp-hist-item.revoked, .sp-hist-item.expired { opacity: 0.55; }
.sp-prio { padding: 1px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; }
.sp-prio.low { color: #aab2c4; background: rgba(170, 178, 196, 0.12); }
.sp-prio.high { color: #ff9d6c; background: rgba(255, 157, 108, 0.14); }
.sp-prio.urgent { color: #fff; background: var(--danger); animation: sp-pulse 1.8s infinite; }
@keyframes sp-pulse { 50% { box-shadow: 0 0 0 4px rgba(255, 90, 95, 0.18); } }
.sp-assignee, .inbox-claim { display: inline-flex; align-items: center; gap: 4px; color: var(--gold-2); }
.inbox-claim { font-size: 11px; }
.inbox-claim.mine { font-weight: 800; }
.sp-msg.note .sp-bubble { background: repeating-linear-gradient(135deg, rgba(242, 193, 78, 0.07) 0 10px, rgba(242, 193, 78, 0.02) 10px 20px); border: 1px dashed rgba(242, 193, 78, 0.55); }
.sp-badge.note { background: transparent; color: var(--gold-2); border: 1px dashed rgba(242, 193, 78, 0.6); box-shadow: none; }
.sp-sys.ev b { color: var(--text); }
.sp-sys.ev em { font-style: normal; color: var(--text); margin-left: 4px; }
.sp-sys.ev.appeal_accept { border-color: rgba(88, 214, 141, 0.45); color: #7fe0a8; }
.sp-sys.ev.appeal_reject { border-color: rgba(255, 90, 95, 0.4); color: #ff9aa0; }
.sp-note-btn { transition: color 0.2s, background 0.2s; }
.sp-composer.noting .sp-note-btn { color: #1a1204; background: var(--gold-grad); }
.sp-composer.noting .sp-input { border-style: dashed; border-color: rgba(242, 193, 78, 0.7); background: rgba(242, 193, 78, 0.05); }
.sp-info-box { margin-top: 10px; }
.sp-info-box > summary { cursor: pointer; list-style: none; display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); user-select: none; }
.sp-info-box > summary::-webkit-details-marker { display: none; }
.sp-info-box > summary::before { content: ''; width: 6px; height: 6px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg); transition: transform 0.2s var(--ease); }
.sp-info-box[open] > summary::before { transform: rotate(45deg); }
.sp-info-box > summary:hover { color: var(--text); }
.sp-info-box .sp-info { margin-top: 8px; animation: sp-fade-up 0.3s var(--ease) both; }
