/* LocksHub — style.css — sidebar layout */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

@font-face {
  font-family: 'Minecraftia';
  src: url('Minecraftia.ttf') format('truetype');
  font-weight: 400; font-style: normal; font-display: swap;
}

/* ── DESIGN TOKENS ── */
:root {
  --bg:       #080b11;
  --bg2:      #0d1017;
  --sur:      #111520;
  --sur2:     #171c2a;
  --bdr:      #1d2337;
  --bdr2:     #263048;
  --text:     #dde2ee;
  --muted:    #8896b4;
  --dim:      #586480;
  --gold:     #ffc200;
  --gold-bg:  rgba(255,194,0,0.08);
  --green:    #22d47c;
  --red:      #f05252;

  --font:   'Inter', 'Segoe UI', system-ui, sans-serif;
  --mono:   'JetBrains Mono', ui-monospace, 'Cascadia Mono', Consolas, monospace;
  --pixel:  'Minecraftia', 'Courier New', ui-monospace, monospace;
  --chakra: 'Chakra Petch', 'Barlow', system-ui, sans-serif;

  --nameplate:    clamp(21px, 3.2vw, 29px);
  --nameplate-sm: 13px;

  --sb-w:  220px;
  --tb-h:  48px;
  --maxw:  980px;
  --r:     5px;
}

/* ── BASE RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; overflow-x: hidden; }
body {
  font-family: var(--font);
  background-color: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  display: flex;
}

/* Background photo — isolated so filter:blur doesn't touch any content */
.bg-photo {
  position: fixed; inset: 0; z-index: -5;
  background: url('bg.webp') center top / cover no-repeat;
  filter: blur(6px);
  transform: scale(1.04); /* prevent blurry-edge halo */
  transform-origin: center;
  will-change: transform;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input { font-family: inherit; }
img { display: block; }

::selection { background: rgba(255,194,0,0.22); color: #fff; }
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--sur2); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--bdr2); }

/* Dark overlay */
body::before {
  content: ''; position: fixed; inset: 0; z-index: -4; pointer-events: none;
  background: rgba(8, 11, 17, 0.86);
}
/* Subtle purple/pink radial tint */
body::after {
  content: ''; position: fixed; inset: 0; z-index: -3; pointer-events: none;
  opacity: 0.22;
  background: radial-gradient(circle at 70% 28%, #7060ff 0%, transparent 52%),
              radial-gradient(circle at 18% 72%, #ff6eb4 0%, transparent 52%);
}

/* ── WOOL STATUS ICONS ── */
.wool-status {
  image-rendering: pixelated; flex-shrink: 0;
  border-radius: 1px;
  filter: drop-shadow(1px 0 0 #000) drop-shadow(-1px 0 0 #000)
          drop-shadow(0 1px 0 #000)  drop-shadow(0 -1px 0 #000)
          drop-shadow(1px 2px 4px rgba(0,0,0,0.5));
  transition: filter .3s ease;
}

/* ── CHERRY BLOSSOMS ── */
.petal-field { position: fixed; inset: 0; overflow: hidden; pointer-events: none; z-index: 1; }
.petal {
  position: absolute; top: -20px; left: 0;
  border-radius: 50% 0 50% 0;
  background: #ffb7c5; opacity: 0.6; pointer-events: none;
  will-change: transform, top;
  animation-name: fall; animation-timing-function: linear; animation-iteration-count: infinite;
}
@keyframes fall {
  0%   { top: -20px; transform: translateX(0) rotate(0deg); opacity: 0; }
  8%   { opacity: 0.6; }
  25%  { transform: translateX(var(--sway, 20px)) rotate(90deg); }
  50%  { transform: translateX(calc(var(--sway, 20px) * -0.7)) rotate(180deg); }
  75%  { transform: translateX(var(--sway, 20px)) rotate(270deg); }
  90%  { opacity: 0.6; }
  100% { top: 110vh; transform: translateX(calc(var(--sway, 20px) * -0.4)) rotate(360deg); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) { .petal { display: none; } }

/* ════════════════════════════════════════════
   SIDEBAR
   ════════════════════════════════════════════ */
.sidebar {
  position: fixed; left: 0; top: 0; bottom: 0;
  width: var(--sb-w); z-index: 200;
  display: flex; flex-direction: column;
  background: rgba(8, 10, 18, 0.97);
  border-right: 1px solid var(--bdr);
  overflow-y: auto; overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: var(--bdr) transparent;
}

/* Brand */
.sb-brand {
  display: flex; align-items: center; gap: 10px;
  padding: 17px 16px 15px; flex-shrink: 0;
  border-bottom: 1px solid var(--bdr);
}
.sb-icon {
  width: 28px; height: 28px; image-rendering: pixelated;
  border-radius: 2px; flex-shrink: 0;
  filter: drop-shadow(1px 0 0 #000) drop-shadow(-1px 0 0 #000)
          drop-shadow(0 1px 0 #000)  drop-shadow(0 -1px 0 #000)
          drop-shadow(2px 4px 6px rgba(0,0,0,0.55));
}
.sb-wordmark { font-size: 17px; font-weight: 800; letter-spacing: -0.025em; line-height: 1; }
.sb-locks { color: var(--gold); }
.sb-hub   { color: var(--text); }

/* Search */
.sb-search-form {
  display: flex; align-items: center; gap: 8px;
  margin: 12px 12px 8px; flex-shrink: 0;
  background: var(--sur2); border: 1px solid var(--bdr2);
  border-radius: var(--r); padding: 7px 10px;
  transition: border-color .15s;
}
.sb-search-form:focus-within { border-color: var(--gold); }
.sb-search-ico { color: var(--dim); flex-shrink: 0; }
.sb-search-form input {
  flex: 1; min-width: 0; background: none; border: none; outline: none;
  color: var(--text); font-size: 13px;
}
.sb-search-form input::placeholder { color: rgba(255,255,255,0.26); }

/* Navigation */
.sb-nav { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; flex-shrink: 0; }
.sb-link {
  display: flex; align-items: center; gap: 9px;
  padding: 9px 10px; border-radius: var(--r);
  font-size: 13.5px; font-weight: 500; color: var(--muted);
  transition: color .14s, background .12s;
}
.sb-link svg { flex-shrink: 0; opacity: 0.65; transition: opacity .14s; }
.sb-link:hover { color: var(--text); background: rgba(255,255,255,0.04); }
.sb-link:hover svg { opacity: 1; }
.sb-link.active { color: var(--text); background: rgba(255,194,0,0.07); }
.sb-link.active svg { color: var(--gold); opacity: 1; }

/* Divider */
.sb-divider { height: 1px; background: var(--bdr); margin: 6px 0; flex-shrink: 0; }

/* Section labels */
.sb-section-label {
  font-family: var(--mono); font-size: 9.5px; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--dim); padding: 12px 16px 5px; flex-shrink: 0;
}

/* Player rows */
.sb-player-list { display: flex; flex-direction: column; padding: 0 8px 4px; flex-shrink: 0; }
.sb-prow {
  display: flex; align-items: center; gap: 9px;
  padding: 5px 9px; border-radius: 4px;
  font-size: 13px; color: var(--muted);
  transition: color .12s, background .12s;
}
.sb-prow:hover { color: var(--text); background: rgba(255,255,255,0.04); }
.sb-phead {
  width: 18px; height: 18px; border-radius: 2px;
  image-rendering: pixelated; flex-shrink: 0;
  opacity: 0; transition: opacity .3s;
}
.sb-phead.img-ready { opacity: 1; }
.sb-pname {
  flex: 1; min-width: 0; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; font-weight: 500;
}
.sb-parr { color: var(--dim); font-size: 13px; flex-shrink: 0; }
.sb-empty { display: block; padding: 4px 9px; font-size: 12px; color: var(--dim); font-style: italic; }

/* Sidebar footer */
.sb-foot {
  margin-top: auto; padding: 11px 14px;
  border-top: 1px solid var(--bdr); flex-shrink: 0;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.sb-status-row { display: flex; align-items: center; gap: 6px; }
.sb-status-label { font-family: var(--chakra); font-size: 11px; font-weight: 500; letter-spacing: 0.03em; color: var(--muted); }
.sb-ver { font-family: var(--chakra); font-size: 10px; font-weight: 500; color: var(--dim); }

/* ════════════════════════════════════════════
   MOBILE OVERLAY & TOGGLE
   ════════════════════════════════════════════ */
.sb-overlay {
  display: none; position: fixed; inset: 0; z-index: 190;
  background: rgba(0,0,0,0.55);
}
.sb-overlay.sb-open { display: block; }

.mobile-bar {
  display: none;
  position: fixed; top: 0; left: 0; right: 0; z-index: 300;
  height: 50px;
  background: rgba(8, 10, 18, 0.97);
  border-bottom: 1px solid var(--bdr);
  align-items: center; padding: 0 14px; gap: 12px;
}
.mob-toggle { color: var(--muted); display: flex; align-items: center; transition: color .15s; }
.mob-toggle:hover { color: var(--text); }
.mob-brand { font-size: 18px; font-weight: 800; letter-spacing: -0.025em; }

/* ════════════════════════════════════════════
   SHELL — the right-side column
   ════════════════════════════════════════════ */
.shell {
  margin-left: var(--sb-w);
  flex: 1;
  min-width: 0;
  display: flex; flex-direction: column;
  min-height: 100vh;
}

/* ── TOPBAR ── */
.topbar {
  position: sticky; top: 0; z-index: 100;
  height: var(--tb-h);
  background: rgba(8, 10, 18, 0.90);
  border-bottom: 1px solid var(--bdr);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px; flex-shrink: 0;
}
.breadcrumb { display: flex; align-items: center; gap: 7px; }
.bc-root {
  font-family: var(--mono); font-size: 12px; font-weight: 600;
  color: var(--muted); transition: color .14s;
}
.bc-root:hover { color: var(--text); }
.bc-sep { color: var(--dim); font-size: 14px; line-height: 1; }
.bc-cur { font-family: var(--mono); font-size: 12px; font-weight: 600; color: var(--text); }

.topbar-right { display: flex; align-items: center; gap: 12px; }
.hx-badge {
  display: flex; align-items: center; gap: 7px;
  font-family: var(--chakra); font-size: 11.5px; font-weight: 600;
  letter-spacing: 0.04em; color: var(--muted);
  background: rgba(255,255,255,0.04); border: 1px solid var(--bdr);
  padding: 4px 11px 4px 8px; border-radius: 999px;
}

/* ── APP CONTENT ── */
.app {
  flex: 1;
  max-width: var(--maxw); width: 100%;
  margin: 0 auto; padding: 24px 24px 56px;
}

/* ── FOOTER ── */
.site-footer { border-top: 1px solid var(--bdr); flex-shrink: 0; }
.footer-inner {
  max-width: var(--maxw); margin: 0 auto;
  padding: 18px 24px;
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 12px;
}
.footer-brand {
  display: flex; align-items: baseline; gap: 10px;
  font-size: 16px; font-weight: 800; letter-spacing: -0.025em;
}
.footer-tagline { font-size: 12px; font-weight: 400; color: var(--dim); letter-spacing: 0; }
.footer-links { display: flex; flex-direction: column; gap: 5px; text-align: right; }
.footer-links span {
  display: inline-block; width: fit-content; align-self: flex-end;
  color: rgba(255,255,255,0.75);
  background: rgba(255,255,255,0.055);
  border: 1px solid rgba(255,255,255,0.07);
  padding: 3px 9px; border-radius: 3px; font-size: 11.5px;
  text-shadow: 0 0 14px rgba(255,255,255,0.22);
  letter-spacing: 0.01em;
}

/* ════════════════════════════════════════════
   SECTION LABEL
   ════════════════════════════════════════════ */
.section-label {
  font-family: var(--mono);
  font-size: 10.5px; font-weight: 600; letter-spacing: 0.13em;
  text-transform: uppercase; color: var(--dim); margin-bottom: 10px;
}

/* ════════════════════════════════════════════
   HOME PAGE
   ════════════════════════════════════════════ */
.home-hero { padding: 8px 0 0; }
.home-search-wrap {
  display: flex; align-items: center;
  background: var(--sur); border: 1px solid var(--bdr2);
  border-radius: var(--r); transition: border-color .15s; margin-bottom: 28px;
}
.home-search-wrap:focus-within { border-color: var(--gold); }
.home-search-wrap input {
  flex: 1; min-width: 0; background: none; border: none; outline: none;
  color: var(--text); font-size: 15px; padding: 13px 16px;
}
.home-search-wrap input::placeholder { color: rgba(255,255,255,0.28); }
.home-search-wrap button {
  display: flex; align-items: center; gap: 6px;
  margin: 5px; padding: 0 16px; height: 36px;
  border-radius: 3px; background: var(--gold); color: #100c00;
  font-weight: 700; font-size: 13px; transition: filter .15s; flex-shrink: 0;
}
.home-search-wrap button:hover { filter: brightness(1.1); }

/* Legacy compat */
.hero-search {
  display: flex; align-items: center;
  background: var(--sur); border: 1px solid var(--bdr2);
  border-radius: var(--r); transition: border-color .15s;
}
.hero-search:focus-within { border-color: var(--gold); }
.hero-search input {
  flex: 1; min-width: 0; background: none; border: none; outline: none;
  color: var(--text); font-size: 15px; padding: 13px 16px;
}
.hero-search input::placeholder { color: rgba(255,255,255,0.28); }
.hero-search button {
  display: flex; align-items: center; gap: 7px;
  margin: 5px; padding: 0 16px; height: 36px;
  border-radius: 3px; background: var(--gold); color: #100c00;
  font-weight: 700; font-size: 13px; transition: filter .15s;
}
.hero-search button:hover { filter: brightness(1.1); }

.home-block { margin-bottom: 24px; }
.home-block-label {
  font-family: var(--mono); font-size: 10px; font-weight: 600;
  letter-spacing: 0.13em; text-transform: uppercase; color: var(--dim); margin-bottom: 8px;
}

.chip-grid { display: flex; flex-direction: column; gap: 2px; }
.pchip {
  display: flex; align-items: center; gap: 12px;
  background: var(--sur); border: 1px solid var(--bdr);
  border-radius: var(--r); padding: 10px 14px;
  transition: border-color .15s, background .12s;
}
.pchip:hover { border-color: var(--bdr2); background: var(--sur2); }
.pchip img { width: 36px; height: 36px; border-radius: 2px; image-rendering: pixelated; background: var(--sur2); flex-shrink: 0; }
.pchip-name { font-weight: 700; font-size: 15px; flex: 1; min-width: 0; }
.pchip-sub { font-size: 12px; color: var(--dim); }
.pchip-arrow { color: rgba(255,255,255,0.38); font-size: 16px; }

/* ════════════════════════════════════════════
   PLAYER HEADER
   ════════════════════════════════════════════ */
.player-page { animation: appSlide .36s cubic-bezier(0.22, 1, 0.36, 1) both; }
.phead {
  display: flex; gap: 20px; padding: 20px 22px;
  align-items: flex-end;
  background: var(--sur); border: 1px solid var(--bdr2);
  border-radius: calc(var(--r) + 2px); margin-bottom: 4px;
}
.phead-body { flex-shrink: 0; width: 112px; display: flex; align-items: flex-end; }
.phead-body img { width: 112px; height: auto; image-rendering: pixelated; }
.phead-main { flex: 1; min-width: 0; }
.phead-name-row { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 3px; }
.phead-name {
  font-family: var(--pixel); font-size: var(--nameplate); font-weight: 400;
  letter-spacing: 0.02em; line-height: 1.12; color: var(--text); word-break: break-word;
}
.phead-name-row .rank-prefix { font-size: var(--nameplate); line-height: 1.12; }
.phead-level {
  font-family: var(--mono); font-size: 11.5px; font-weight: 500; color: var(--gold);
  padding: 3px 8px; border-radius: 4px; background: var(--gold-bg);
  border: 1px solid rgba(255,194,0,0.16); font-variant-numeric: tabular-nums;
}
.status-dot { display: inline-flex; align-items: center; gap: 5px; font-family: var(--mono); font-size: 11px; font-weight: 500; color: var(--muted); }
.status-dot i { width: 7px; height: 7px; border-radius: 50%; background: var(--dim); display: inline-block; }
.status-dot.online i { background: var(--green); }
.status-dot.online { color: var(--green); }
.rank-prefix { font-family: var(--pixel); font-weight: 400; letter-spacing: 0.02em; white-space: nowrap; }
.phead-meta { display: flex; flex-wrap: wrap; gap: 6px 20px; margin-top: 12px; }
.phead-meta .mi { display: flex; flex-direction: column; gap: 1px; }
.phead-meta .mi .k { font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.11em; text-transform: uppercase; color: var(--dim); }
.phead-meta .mi .v { font-family: var(--mono); font-size: 13.5px; font-weight: 500; color: var(--text); font-variant-numeric: tabular-nums; }
.phead-meta .mi .v.sm { font-size: 12.5px; font-weight: 400; color: var(--muted); }
.guild-line { margin-top: 11px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; }
.guild-line .gtag { color: var(--gold); font-weight: 700; }
.guild-line .gname { font-weight: 600; border-bottom: 1px solid rgba(255,255,255,0.12); transition: border-color .15s; }
.guild-line .gname:hover { border-color: var(--text); }
.guild-line .glvl { color: var(--muted); }
.guild-line .gmembers { color: var(--dim); }

/* ════════════════════════════════════════════
   TABS
   ════════════════════════════════════════════ */
.tabs { display: flex; gap: 0; margin: 16px 0 14px; border-bottom: 1px solid var(--bdr); overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab {
  position: relative; padding: 9px 14px;
  font-family: var(--mono); font-size: 12.5px; font-weight: 500; letter-spacing: 0.02em;
  color: var(--muted); white-space: nowrap; transition: color .15s;
}
.tab:hover { color: var(--text); }
.tab.active { color: var(--text); }
.tab.active::after {
  content: ''; position: absolute; left: 8px; right: 8px; bottom: -1px;
  height: 2px; border-radius: 1px; background: var(--gold);
}
.tab .lvl { color: var(--gold); font-variant-numeric: tabular-nums; margin-left: 3px; }
.tab .star { color: var(--gold); }
.tab-panel { display: none; animation: panelFade .25s ease both; }
.tab-panel.active { display: block; }

/* ════════════════════════════════════════════
   STAT CARDS
   ════════════════════════════════════════════ */
.stat-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-bottom: 14px; }
.stat-grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
.stat-card {
  background: var(--sur2); border: 1px solid var(--bdr2); border-top: 2px solid var(--bdr2);
  border-radius: var(--r); padding: 16px 12px 14px; text-align: center;
  animation: cardRise .28s cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: calc(var(--card-i, 0) * 40ms);
  transition: border-color .15s, border-top-color .15s;
}
.stat-card:hover { border-color: rgba(255,194,0,0.22); border-top-color: rgba(255,194,0,0.38); }
.stat-card .mc-item { margin: 0 auto 7px; }
.stat-card .stat-label { font-family: var(--mono); font-size: 10px; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.stat-card .stat-value { font-family: var(--mono); font-size: 29px; font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; letter-spacing: -0.02em; line-height: 1.05; }
.stat-card .stat-value .star { color: var(--gold); font-size: 18px; }
.stat-card .stat-sub { font-family: var(--mono); font-size: 11px; color: var(--muted); margin-top: 4px; letter-spacing: 0.01em; }
.stat-value.q-good { color: var(--green); }
.stat-value.q-mid  { color: var(--text); }
.stat-value.q-low  { color: var(--red); }

/* ════════════════════════════════════════════
   PANELS
   ════════════════════════════════════════════ */
.panel-row { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1.3fr); gap: 10px; }
.panel { background: var(--sur); border: 1px solid var(--bdr); border-radius: var(--r); padding: 14px 16px; }
.panel-head { font-family: var(--mono); font-size: 10.5px; font-weight: 600; letter-spacing: 0.13em; text-transform: uppercase; color: var(--muted); margin-bottom: 11px; }
.kv { display: flex; flex-direction: column; }
.kv .row { display: flex; align-items: center; justify-content: space-between; padding: 6px 0; border-bottom: 1px solid rgba(255,255,255,0.03); }
.kv .row:last-child { border-bottom: none; }
.kv .row .k { font-size: 13px; color: var(--muted); }
.kv .row .v { font-family: var(--mono); font-size: 13px; font-weight: 500; color: var(--text); font-variant-numeric: tabular-nums; }
.submodes { display: flex; gap: 5px; margin-bottom: 12px; flex-wrap: wrap; }
.submode { font-family: var(--mono); font-size: 11.5px; font-weight: 500; padding: 5px 11px; border-radius: 4px; color: var(--muted); background: var(--sur2); border: 1px solid var(--bdr); transition: color .14s, border-color .14s; }
.submode:hover { color: var(--text); border-color: var(--bdr2); }
.submode.active { color: #0d0900; background: var(--gold); border-color: var(--gold); font-weight: 700; }
.mode-view { display: none; }
.mode-view.active { display: block; animation: fadeIn .2s ease both; }
.dtable { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.dtable td { padding: 7px 10px; font-size: 13px; }
.dtable td:last-child { font-family: var(--mono); }
.dtable tr:nth-child(even) { background: rgba(255,255,255,0.02); }
.dtable td:first-child { color: var(--muted); }
.dtable td:last-child { text-align: right; font-weight: 600; }

/* ════════════════════════════════════════════
   LEADERBOARDS
   ════════════════════════════════════════════ */
.lb-page {}
.lb-header { display: flex; align-items: baseline; gap: 16px; margin-bottom: 18px; }
.lb-title { font-size: 22px; font-weight: 800; letter-spacing: -0.025em; }
.lb-refresh-info { font-family: var(--mono); font-size: 11px; color: var(--dim); margin-left: auto; opacity: 0.55; }
.lb-refresh-info span { color: var(--dim); font-variant-numeric: tabular-nums; }
.lb-periods { display: flex; gap: 2px; border-bottom: 1px solid var(--bdr); margin-bottom: 16px; overflow-x: auto; scrollbar-width: none; }
.lb-periods::-webkit-scrollbar { display: none; }
.lb-period { position: relative; padding: 9px 15px; font-family: var(--mono); font-size: 12.5px; font-weight: 500; color: var(--muted); white-space: nowrap; transition: color .15s; }
.lb-period:hover { color: var(--text); }
.lb-period.active { color: var(--text); }
.lb-period.active::after { content: ''; position: absolute; left: 8px; right: 8px; bottom: -1px; height: 2px; background: var(--gold); border-radius: 1px; }
.lb-period.disabled { opacity: 0.35; cursor: default; }
.lb-games { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 22px; }
.lb-game-btn { font-family: var(--mono); font-size: 12px; font-weight: 500; padding: 6px 13px; border: 1px solid var(--bdr); border-radius: 4px; color: var(--muted); background: var(--sur); transition: color .14s, border-color .14s, background .14s; }
.lb-game-btn:hover { color: var(--text); border-color: var(--bdr2); }
.lb-game-btn.active { color: var(--gold); border-color: rgba(255,194,0,0.35); background: var(--gold-bg); }
.lb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.lb-board {
  background: var(--sur); border: 1px solid var(--bdr); border-radius: var(--r); overflow: hidden;
  animation: cardRise .3s cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: calc(var(--lb-i, 0) * 55ms);
  transition: border-color .15s;
}
.lb-board:hover { border-color: var(--bdr2); }
.lb-board-head { padding: 10px 14px; font-family: var(--mono); font-size: 10.5px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); border-bottom: 1px solid var(--bdr); }
.lb-board-row {
  display: flex; align-items: center; gap: 10px; padding: 6px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.025);
  animation: rowSlide .22s cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: calc(var(--row-i, 0) * 18ms);
  transition: background .12s;
}
.lb-board-row:last-child { border-bottom: none; }
.lb-board-row:hover { background: rgba(255,255,255,0.03); }
.lb-pos { font-family: var(--mono); font-size: 12px; font-weight: 700; color: var(--dim); width: 18px; text-align: right; flex-shrink: 0; font-variant-numeric: tabular-nums; }
.lb-board-row:nth-child(1) .lb-pos { color: var(--gold); }
.lb-board-row:nth-child(2) .lb-pos { color: #b0bcd4; }
.lb-board-row:nth-child(3) .lb-pos { color: #c8874c; }
.lb-head { width: 22px; height: 22px; border-radius: 2px; image-rendering: pixelated; background: var(--sur2); flex-shrink: 0; opacity: 0; transition: opacity .3s ease; }
.lb-head.img-ready { opacity: 1; }
.lb-name { font-family: var(--font); font-size: 13.5px; font-weight: 600; line-height: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; align-self: center; transition: color .25s; }
.lb-name.lb-resolving { color: var(--dim); }
.lb-score { margin-left: auto; flex-shrink: 0; font-family: var(--mono); font-size: 12px; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }
.lb-rank { flex-shrink: 0; display: inline-flex; align-items: center; line-height: 1; }
.lb-rank .rank-prefix { font-size: var(--nameplate-sm); line-height: 1; }
.lb-empty { padding: 48px 20px; text-align: center; color: var(--muted); font-size: 14px; }
.lb-loading-text { padding: 40px 20px; text-align: center; color: var(--dim); font-size: 14px; }
.lb-skel-row { display: flex; align-items: center; gap: 10px; padding: 7px 14px; border-bottom: 1px solid rgba(255,255,255,0.025); }
.lb-skel-row:last-child { border-bottom: none; }
.lb-skel-head { width: 22px; height: 22px; border-radius: 2px; background: var(--sur2); flex-shrink: 0; }
.lb-skel-name { height: 10px; background: var(--sur2); border-radius: 3px; flex: 1; max-width: 140px; animation: pulse 1.5s infinite ease-in-out; }

/* ── MINECRAFT ITEM ── */
.mc-item { display: inline-block; vertical-align: middle; image-rendering: pixelated; }

/* ── SKELETON ── */
.skeleton { position: relative; background: var(--sur); border-radius: var(--r); overflow: hidden; }
.skeleton::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.055) 50%, transparent 100%);
  animation: shimmer 1.6s infinite ease-in-out;
}
.sk-line { height: 13px; margin-bottom: 9px; }
.sk-body { width: 88px; height: 170px; border-radius: 3px; }
.tab-star { font-size: 12px; font-weight: 800; vertical-align: middle; margin-left: 3px; }

/* ── NOTICE / ERROR ── */
.notice { text-align: center; padding: 56px 20px; max-width: 440px; margin: 20px auto; }
.notice .face { font-size: 52px; line-height: 1; margin-bottom: 16px; }
.notice h2 { font-size: 21px; font-weight: 800; margin-bottom: 7px; letter-spacing: -0.02em; }
.notice p { color: var(--muted); font-size: 14.5px; margin-bottom: 18px; }
.notice .btn { display: inline-block; padding: 9px 18px; border-radius: var(--r); background: var(--sur); border: 1px solid var(--bdr); font-weight: 600; font-size: 13.5px; transition: border-color .15s; }
.notice .btn:hover { border-color: var(--bdr2); }

/* ════════════════════════════════════════════
   GUILD PAGE
   ════════════════════════════════════════════ */
.guild-page { padding: 0; animation: appSlide .36s cubic-bezier(0.22, 1, 0.36, 1) both; }
.guild-head { display: flex; gap: 24px; align-items: flex-start; padding: 22px 0 18px; border-bottom: 1px solid var(--bdr); margin-bottom: 18px; flex-wrap: wrap; }
.guild-head-left { flex: 1; min-width: 200px; }
.guild-name-row { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.guild-name-text { font-size: 26px; font-weight: 800; letter-spacing: -0.025em; }
.guild-tag { font-size: 16px; font-weight: 700; opacity: 0.9; }
.guild-desc { font-size: 13.5px; color: var(--muted); margin-top: 4px; max-width: 500px; line-height: 1.5; }
.guild-head-right { display: flex; gap: 8px; flex-wrap: wrap; align-items: flex-start; }
.guild-stat-block { display: flex; flex-direction: column; align-items: center; background: var(--sur); border: 1px solid var(--bdr); border-radius: var(--r); padding: 10px 16px; min-width: 80px; text-align: center; transition: border-color .15s; }
.guild-stat-block:hover { border-color: var(--bdr2); }
.gsb-val { font-family: var(--mono); font-size: 17px; font-weight: 700; color: var(--text); line-height: 1.2; font-variant-numeric: tabular-nums; }
.gsb-lbl { font-family: var(--mono); font-size: 10px; color: var(--muted); margin-top: 4px; text-transform: uppercase; letter-spacing: 0.08em; }
.guild-games-panel { margin-bottom: 12px; }
.guild-games-list { display: flex; flex-direction: column; gap: 8px; padding: 4px 0; }
.guild-game-row { display: flex; align-items: center; gap: 10px; }
.ggr-name { font-size: 13px; color: var(--muted); width: 120px; flex-shrink: 0; }
.ggr-bar-wrap { flex: 1; height: 6px; background: var(--bdr); border-radius: 3px; overflow: hidden; }
.ggr-bar { height: 100%; background: linear-gradient(90deg, #e09600, var(--gold)); border-radius: 3px; transition: width .4s ease; }
.ggr-xp { font-family: var(--mono); font-size: 13px; font-weight: 600; width: 52px; text-align: right; font-variant-numeric: tabular-nums; }
.guild-members-panel {}
.panel-count { font-family: var(--mono); font-size: 11.5px; font-weight: 500; color: var(--muted); margin-left: 6px; }
.guild-members-head { display: grid; grid-template-columns: 130px 1fr 90px 100px; padding: 8px 14px; border-bottom: 1px solid var(--bdr); }
.gm-col { font-family: var(--mono); font-size: 10px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--dim); font-weight: 600; }
.guild-members-body { display: flex; flex-direction: column; }
.gm-row { display: grid; grid-template-columns: 130px 1fr 90px 100px; align-items: center; padding: 8px 14px; border-bottom: 1px solid rgba(255,255,255,0.025); transition: background .12s; }
.gm-row:last-child { border-bottom: none; }
.gm-row:hover { background: rgba(255,255,255,0.03); }
.gm-name-col { display: flex; align-items: center; gap: 7px; overflow: hidden; }
.gm-hd-wrap { flex-shrink: 0; }
.gm-badge { flex-shrink: 0; }
.gm-name { font-size: 13.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gm-wxp-col { font-family: var(--mono); font-size: 13px; font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; }
.gm-joined-col { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.gm-guild-rank { font-size: 11.5px; color: var(--muted); }
.gm-guild-rank.gm-gm { color: var(--gold); font-weight: 700; }
.guild-loading { padding: 48px; text-align: center; color: var(--muted); }

/* ════════════════════════════════════════════
   ANIMATIONS
   ════════════════════════════════════════════ */
@keyframes fadeIn  { from { opacity: 0; transform: translateY(6px); }  to { opacity: 1; transform: none; } }
@keyframes appSlide { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes cardRise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes rowSlide { from { opacity: 0; transform: translateX(-5px); } to { opacity: 1; transform: none; } }
@keyframes panelFade { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }
@keyframes shimmer  { 0% { transform: translateX(-100%); } 100% { transform: translateX(200%); } }
@keyframes pulse    { 0%, 100% { opacity: 0.4; } 50% { opacity: 0.8; } }

#app > * { animation: appSlide .32s cubic-bezier(0.22, 1, 0.36, 1) both; }
.tab-panel.active { animation: panelFade .22s cubic-bezier(0.22, 1, 0.36, 1) both; }

/* ════════════════════════════════════════════
   RESPONSIVE
   ════════════════════════════════════════════ */
@media (max-width: 900px) {
  .sidebar {
    transform: translateX(calc(-1 * var(--sb-w)));
    transition: transform .26s cubic-bezier(0.22, 1, 0.36, 1);
  }
  .sidebar.sb-open { transform: translateX(0); }
  .shell { margin-left: 0; padding-top: 50px; }
  .mobile-bar { display: flex; }
  .topbar { top: 50px; }
  .stat-grid, .stat-grid.cols-4 { grid-template-columns: repeat(2, 1fr); }
  .panel-row { grid-template-columns: 1fr; }
  .lb-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
}
@media (max-width: 700px) {
  .phead { flex-direction: column; align-items: center; text-align: center; gap: 14px; }
  .phead-body { width: auto; }
  .phead-name-row, .guild-line, .phead-meta { justify-content: center; }
  .footer-links { text-align: left; }
  .footer-links span { align-self: flex-start; }
}
@media (max-width: 440px) {
  .stat-grid, .stat-grid.cols-4 { grid-template-columns: 1fr 1fr; }
  .stat-card .stat-value { font-size: 24px; }
  .app { padding: 18px 14px 48px; }
}
