:root {
  --bg: #06030d;
  --glass: rgba(20, 12, 38, 0.72);
  --glass-2: rgba(32, 20, 58, 0.78);
  --line: rgba(167, 139, 250, 0.18);
  --line-strong: rgba(167, 139, 250, 0.38);
  --text: #f1ecff;
  --muted: #a69cc6;
  --accent: #8b5cf6;
  --accent-2: #c084fc;
  --pink: #ec4899;
  --good: #4ade80;
  --bad: #f87171;
  --warn: #fbbf24;
  --radius: 12px;
  --display: 'Orbitron', 'Inter', sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 15px/1.55 Inter, system-ui, sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}
#bg { position: fixed; inset: 0; z-index: -1; image-rendering: pixelated; }
::selection { background: var(--accent); color: #fff; }
a { color: var(--accent-2); text-decoration: none; }
a:hover { color: #e9d5ff; }
h1, h2, h3 { font-family: var(--display); font-weight: 700; line-height: 1.2; margin: 0 0 .5em; letter-spacing: .02em; }
h1 { font-size: 1.7rem; }
h2 { font-size: 1.2rem; display: flex; align-items: center; gap: 10px; }
h2::before { content: ''; width: 10px; height: 10px; background: var(--accent); box-shadow: 0 0 10px var(--accent); flex: none; }
h3 { font-size: .98rem; }
.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 16px; }
main { flex: 1; }
main#app { padding-top: 32px; padding-bottom: 56px; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.mono { font-family: ui-monospace, Consolas, monospace; font-size: .85em; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.loading, .empty { color: var(--muted); padding: 40px 0; text-align: center; font-family: var(--display); }
.loading::after { content: ''; display: inline-block; width: 8px; height: 8px; margin-left: 10px; background: var(--accent-2); animation: blink 1s steps(2) infinite; }
.error { background: rgba(127, 29, 29, .55); border: 1px solid #b91c1c; color: #fecaca; padding: 12px 14px; border-radius: 10px; margin: 12px 0; backdrop-filter: blur(8px); }

@keyframes blink { 50% { opacity: 0; } }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(74, 222, 128, .6); } 100% { box-shadow: 0 0 0 8px rgba(74, 222, 128, 0); } }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes shimmer { to { background-position: 200% center; } }
@keyframes float { 50% { transform: translateY(-6px); } }

/* ---------- top bar ---------- */
.topbar { position: sticky; top: 0; z-index: 20; background: rgba(6, 3, 13, .6); backdrop-filter: blur(14px) saturate(140%); border-bottom: 1px solid var(--line); }
.topbar-inner { display: flex; align-items: center; gap: 16px; height: 64px; }
.brand { display: flex; align-items: center; gap: 12px; font: 800 1.12rem var(--display); letter-spacing: .04em; color: var(--text); }
.brand:hover { color: var(--text); }
.brand-orb { width: 22px; height: 22px; background: #000; box-shadow: 0 0 0 3px var(--accent), 0 0 18px 2px var(--accent), inset 0 0 6px var(--pink); animation: float 4s ease-in-out infinite; }
.nav { margin-left: auto; display: flex; gap: 4px; }
.nav a { color: var(--muted); padding: 8px 14px; border-radius: 8px; font-weight: 500; position: relative; transition: color .15s, background .15s; }
.nav a:hover { color: var(--text); background: rgba(139, 92, 246, .12); }
.nav a.active { color: var(--text); background: rgba(139, 92, 246, .2); }
.nav a.active::after { content: ''; position: absolute; left: 14px; right: 14px; bottom: 3px; height: 2px; background: var(--accent-2); box-shadow: 0 0 8px var(--accent-2); }
.nav-admin.logged-in::before { content: ''; display: inline-block; width: 7px; height: 7px; background: var(--good); margin-right: 7px; vertical-align: middle; }
.nav-toggle { display: none; margin-left: auto; background: none; border: 1px solid var(--line); color: var(--text); border-radius: 8px; padding: 6px 10px; font-size: 1.1rem; cursor: pointer; }
@media (max-width: 700px) {
  .nav-toggle { display: block; }
  .nav { display: none; position: absolute; top: 64px; left: 0; right: 0; flex-direction: column; background: rgba(10, 6, 20, .96); border-bottom: 1px solid var(--line); padding: 8px 16px; }
  body.nav-open .nav { display: flex; }
}
.footer { color: var(--muted); font-size: .85rem; padding-top: 22px; padding-bottom: 22px; border-top: 1px solid var(--line); background: rgba(6, 3, 13, .55); backdrop-filter: blur(8px); max-width: none; text-align: center; }

/* ---------- cards & layout ---------- */
.card {
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  backdrop-filter: blur(10px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, .35), inset 0 1px 0 rgba(255, 255, 255, .04);
  animation: rise .4s ease both;
}
.grid { display: grid; gap: 16px; }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); }
.grid > .card:nth-child(2) { animation-delay: .05s; }
.grid > .card:nth-child(3) { animation-delay: .1s; }
.grid > .card:nth-child(4) { animation-delay: .15s; }
.section { margin-top: 32px; }
.section-head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; justify-content: space-between; margin-bottom: 14px; }
.section-head h1, .section-head h2 { margin: 0; }

.stat { position: relative; overflow: hidden; transition: transform .2s, border-color .2s; }
.stat:hover { transform: translateY(-3px); border-color: var(--line-strong); }
.stat .label { color: var(--muted); font-size: .76rem; text-transform: uppercase; letter-spacing: .08em; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.stat .value { font: 700 1.6rem var(--display); margin-top: 6px; }
.stat .sub { color: var(--muted); font-size: .85rem; }
.stat .ore-icon { width: 18px; height: 18px; }

/* ---------- hero ---------- */
.hero { text-align: center; padding: 28px 0 24px; animation: rise .5s ease both; }
.hero-icon { width: 88px; height: 88px; image-rendering: pixelated; border: 3px solid #000; outline: 3px solid var(--accent); box-shadow: 0 0 40px rgba(139, 92, 246, .6); animation: float 5s ease-in-out infinite; }
.hero-title {
  font-size: clamp(2rem, 7vw, 4.2rem);
  font-weight: 900;
  letter-spacing: .03em;
  margin: 18px 0 6px;
  background: linear-gradient(90deg, #e9d5ff, #c084fc, #f0abfc, #a78bfa, #e9d5ff);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(4px 4px 0 #2e1065) drop-shadow(0 0 24px rgba(168, 85, 247, .45));
  animation: shimmer 6s linear infinite;
}
.hero h1.hero-title::before { display: none; }
.hero .motd { color: #d8ccf5; max-width: 620px; margin: 0 auto; white-space: pre-line; font-family: var(--display); font-size: .9rem; letter-spacing: .04em; text-shadow: 0 2px 8px rgba(0, 0, 0, .8); }
.hero-status { margin: 16px 0 6px; display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 22px; }
.ip-box { display: inline-flex; align-items: center; gap: 12px; background: rgba(0, 0, 0, .55); border: 2px solid #000; outline: 1px solid var(--line-strong); padding: 6px 6px 6px 16px; font: 700 .95rem var(--display); letter-spacing: .03em; backdrop-filter: blur(8px); }

/* ---------- pills ---------- */
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 6px; font-size: .78rem; font-weight: 600; background: rgba(139, 92, 246, .16); color: #d6c8ff; white-space: nowrap; border: 1px solid rgba(139, 92, 246, .25); }
.pill.good { background: rgba(74, 222, 128, .12); color: var(--good); border-color: rgba(74, 222, 128, .3); }
.pill.bad { background: rgba(248, 113, 113, .14); color: var(--bad); border-color: rgba(248, 113, 113, .35); }
.pill.warn { background: rgba(251, 191, 36, .12); color: var(--warn); border-color: rgba(251, 191, 36, .3); }
.pill.fortune { background: rgba(34, 211, 238, .12); color: #22d3ee; border-color: rgba(34, 211, 238, .35); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.pill.good .dot { animation: pulse 1.6s infinite; }

/* ---------- buttons & inputs ---------- */
button, .btn {
  font: inherit; cursor: pointer; border-radius: 8px; border: 1px solid var(--line-strong);
  background: rgba(32, 20, 58, .85); color: var(--text); padding: 7px 14px; transition: border-color .15s, background .15s, transform .1s;
}
button:hover { border-color: var(--accent-2); background: rgba(60, 36, 110, .9); }
button:disabled { opacity: .45; cursor: default; }
/* Minecraft-style beveled button */
.btn-primary, .btn-mc {
  font: 700 .82rem var(--display); color: #fff; letter-spacing: .06em;
  background: #7c3aed; border: 2px solid #000; border-radius: 0; padding: 8px 18px;
  box-shadow: inset -3px -4px 0 #4c1d95, inset 3px 3px 0 #a78bfa;
  text-shadow: 2px 2px 0 #3b0764;
}
.btn-primary:hover, .btn-mc:hover { background: #8b5cf6; border-color: #000; box-shadow: inset -3px -4px 0 #5b21b6, inset 3px 3px 0 #c4b5fd, 0 0 18px rgba(139, 92, 246, .6); }
.btn-primary:active, .btn-mc:active { transform: translateY(1px); box-shadow: inset 3px 4px 0 #4c1d95; }
.btn-mc.secondary { background: #3f3f50; box-shadow: inset -3px -4px 0 #24242f, inset 3px 3px 0 #6b6b80; text-shadow: 2px 2px 0 #111; }
.btn-mc.secondary:hover { background: #4d4d62; box-shadow: inset -3px -4px 0 #2b2b38, inset 3px 3px 0 #8585a0, 0 0 14px rgba(255, 255, 255, .15); }
a.btn-mc { display: inline-flex; align-items: center; gap: 8px; }
a.btn-mc:hover { color: #fff; }
input, select { font: inherit; background: rgba(6, 3, 13, .7); color: var(--text); border: 1px solid var(--line-strong); border-radius: 8px; padding: 7px 12px; }
input:focus, select:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
.controls { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.check { display: inline-flex; gap: 6px; align-items: center; color: var(--muted); cursor: pointer; }

.tabs { display: inline-flex; background: rgba(6, 3, 13, .7); border: 1px solid var(--line); border-radius: 10px; padding: 3px; gap: 2px; flex-wrap: wrap; backdrop-filter: blur(8px); }
.tabs button { border: 0; background: transparent; color: var(--muted); padding: 6px 14px; }
.tabs button:hover { color: var(--text); background: rgba(139, 92, 246, .12); }
.tabs button.active { background: linear-gradient(180deg, #7c3aed, #5b21b6); color: #fff; box-shadow: 0 0 14px rgba(139, 92, 246, .45); }

/* ---------- game modes ---------- */
.modes { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); margin-top: 36px; }
.mode { display: flex; gap: 14px; align-items: center; transition: transform .2s, border-color .2s, box-shadow .2s; }
.mode:hover { transform: translateY(-4px); border-color: var(--line-strong); box-shadow: 0 16px 36px rgba(0, 0, 0, .45), 0 0 24px rgba(139, 92, 246, .25); }
.mode .sprite { width: 48px; height: 48px; flex: none; filter: drop-shadow(3px 3px 0 rgba(0, 0, 0, .6)); }
.mode:hover .sprite { animation: float 1.2s ease-in-out infinite; }
.mode h3 { margin: 0 0 2px; }
.mode p { margin: 0; color: var(--muted); font-size: .88rem; }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--glass); backdrop-filter: blur(10px); box-shadow: 0 12px 32px rgba(0, 0, 0, .35); }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
td.wrap-text { white-space: normal; min-width: 220px; }
th { color: var(--muted); font-weight: 600; font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; background: rgba(12, 7, 24, .92); position: sticky; top: 0; z-index: 1; }
th.num .ore-head { justify-content: flex-end; }
th.sortable { cursor: pointer; user-select: none; }
th.sortable:hover { color: var(--text); }
th.sorted { color: var(--accent-2); }
tbody tr { transition: background .12s; }
tbody tr:hover { background: rgba(139, 92, 246, .1); }
tbody tr:last-child td { border-bottom: 0; }
tr.flagged { background: rgba(248, 113, 113, .08); box-shadow: inset 3px 0 0 var(--bad); }
td.zero { color: #4f466b; }

.player { display: inline-flex; align-items: center; gap: 10px; color: var(--text); font-weight: 500; }
a.player:hover { color: var(--accent-2); }
.player img { width: 24px; height: 24px; image-rendering: pixelated; background: rgba(139, 92, 246, .2); box-shadow: 0 0 0 2px rgba(0, 0, 0, .5); }

.ore-icon { width: 16px; height: 16px; flex: none; image-rendering: pixelated; vertical-align: middle; filter: drop-shadow(1px 1px 0 rgba(0, 0, 0, .6)); }
.ore-head { display: inline-flex; align-items: center; gap: 6px; }

/* ---------- leaderboards ---------- */
.board ol { list-style: none; padding: 0; margin: 0; }
.board li { display: flex; align-items: center; gap: 10px; padding: 8px 6px; border-bottom: 1px solid var(--line); border-radius: 6px; transition: background .12s; }
.board li:hover { background: rgba(139, 92, 246, .1); }
.board li:last-child { border-bottom: 0; }
.board .rank { width: 26px; height: 22px; display: grid; place-items: center; font: 700 .72rem var(--display); color: var(--muted); }
.board li:nth-child(1) .rank { color: #1c1300; background: #fbbf24; box-shadow: inset -2px -2px 0 #b45309, inset 2px 2px 0 #fde68a; }
.board li:nth-child(2) .rank { color: #111; background: #cbd5e1; box-shadow: inset -2px -2px 0 #64748b, inset 2px 2px 0 #f1f5f9; }
.board li:nth-child(3) .rank { color: #1a0d00; background: #d97706; box-shadow: inset -2px -2px 0 #7c2d12, inset 2px 2px 0 #fbbf24; }
.board .val { margin-left: auto; font: 600 .82rem var(--display); color: #d8ccf5; }

/* ---------- ore bars & cards ---------- */
.ore-bars { display: grid; gap: 12px; }
.ore-bar { display: grid; grid-template-columns: 150px 1fr 90px; align-items: center; gap: 12px; }
.ore-bar > span:first-child { display: inline-flex; align-items: center; gap: 8px; }
.ore-bar .track { height: 12px; background: rgba(0, 0, 0, .5); border: 1px solid #000; overflow: hidden; }
.ore-bar .fill { height: 100%; box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .3), inset 0 2px 0 rgba(255, 255, 255, .3); transition: width .8s ease; }
@media (max-width: 500px) { .ore-bar { grid-template-columns: 110px 1fr 70px; } }

.ore-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.ore-card { display: flex; align-items: center; gap: 12px; background: var(--glass-2); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; border-bottom: 3px solid var(--c); backdrop-filter: blur(10px); transition: transform .15s; }
.ore-card:hover { transform: translateY(-2px); }
.ore-card .ore-icon { width: 32px; height: 32px; }
.ore-card .value { font: 700 1.15rem var(--display); }
.ore-card .label { color: var(--muted); font-size: .8rem; }

/* ---------- misc ---------- */
.login { width: 100%; max-width: 400px; margin: 0 auto; }
.login form { display: grid; gap: 12px; }
.login label { display: grid; gap: 6px; color: var(--muted); font-size: .85rem; }
.pager { display: flex; gap: 8px; align-items: center; justify-content: flex-end; margin-top: 12px; color: var(--muted); }
.player-head { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.player-head img { width: 80px; height: 80px; image-rendering: pixelated; border: 3px solid #000; outline: 2px solid var(--accent); box-shadow: 0 0 24px rgba(139, 92, 246, .5); }
.player-head h1::before { display: none; }
.back { display: inline-block; margin-bottom: 14px; color: var(--muted); font-family: var(--display); }
.note { color: var(--muted); font-size: .85rem; margin-top: 10px; }
.online-list { display: flex; flex-wrap: wrap; gap: 10px; }
.online-list .player { background: rgba(0, 0, 0, .35); border: 1px solid var(--line); padding: 4px 10px 4px 4px; border-radius: 6px; }

/* ---------- live updates ---------- */
.live-status { display: inline-flex; align-items: center; gap: 7px; font-size: .8rem; font-weight: 600; color: var(--muted);
  padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line); background: rgba(6, 3, 13, .6); }
.live-status::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: #6b6480; }
.live-status.on { color: var(--good); border-color: rgba(74, 222, 128, .3); }
.live-status.on::before { background: var(--good); animation: pulse 1.6s infinite; }
.live-status.reconnecting { color: var(--warn); }
.live-status.reconnecting::before { background: var(--warn); }

#toasts { position: fixed; bottom: 16px; right: 16px; z-index: 50; display: flex; flex-direction: column-reverse; gap: 10px; width: min(380px, calc(100vw - 32px)); }
.toast { display: flex; gap: 12px; align-items: center; cursor: pointer; padding: 12px 14px; border-radius: 10px;
  background: rgba(20, 12, 38, .92); border: 1px solid var(--line-strong); border-left: 4px solid var(--c);
  backdrop-filter: blur(12px); box-shadow: 0 14px 34px rgba(0, 0, 0, .5), 0 0 18px rgba(139, 92, 246, .25);
  animation: toast-in .35s ease both; transition: opacity .4s, transform .4s; }
.toast:hover { border-color: var(--accent-2); }
.toast .ore-icon { width: 30px; height: 30px; }
.toast.out { opacity: 0; transform: translateX(20px); }
@keyframes toast-in { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: none; } }

tr.row-new td { animation: row-flash 3s ease; }
.drop-part + .drop-part { margin-top: 4px; }
@keyframes row-flash { from { background: rgba(139, 92, 246, .45); } to { background: transparent; } }

/* ---------- admin dashboard ---------- */
.admin { display: grid; grid-template-columns: 236px minmax(0, 1fr); gap: 22px; align-items: start; }
.admin-side { position: sticky; top: 96px; padding: 16px; display: flex; flex-direction: column; gap: 14px; }
.admin-side .live-status { align-self: flex-start; }
.me { display: flex; align-items: center; gap: 12px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.me img { width: 44px; height: 44px; image-rendering: pixelated; border: 2px solid #000; outline: 2px solid var(--accent); box-shadow: 0 0 16px rgba(139, 92, 246, .5); }
.me b { display: block; font-family: var(--display); font-size: .85rem; letter-spacing: .03em; }
.side-nav { display: grid; gap: 4px; }
.side-nav button { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 10px 12px; border-radius: 10px;
  background: transparent; border: 1px solid transparent; color: var(--muted); font-weight: 500; }
.side-nav button:hover { background: rgba(139, 92, 246, .12); color: var(--text); border-color: transparent; }
.side-nav button.active { color: #fff; background: linear-gradient(90deg, rgba(124, 58, 237, .4), rgba(124, 58, 237, .06));
  border-color: var(--line-strong); box-shadow: inset 3px 0 0 var(--accent-2); }
.side-nav .sprite, .side-nav .ore-icon { width: 20px; height: 20px; flex: none; filter: drop-shadow(1px 1px 0 rgba(0, 0, 0, .6)); }
.nav-badge { margin-left: auto; min-width: 22px; text-align: center; background: var(--pink); color: #fff; font-size: .72rem; font-weight: 700;
  padding: 1px 7px; border-radius: 999px; box-shadow: 0 0 12px rgba(236, 72, 153, .6); animation: pulse-pink 1.8s infinite; }
@keyframes pulse-pink { 50% { box-shadow: 0 0 2px rgba(236, 72, 153, .2); } }
.side-logout { margin-top: 4px; color: var(--muted); }
.admin-main { min-width: 0; }
.admin-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.admin-head h1 { margin: 0; font-size: 1.65rem; letter-spacing: .03em; }
.admin-head h1::before { display: none; }
.admin-head p { margin: 4px 0 0; }

.kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 1200px) { .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.kpi { position: relative; overflow: hidden; display: flex; align-items: center; gap: 14px; padding: 18px; transition: transform .2s, border-color .2s; }
.kpi:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--c) 55%, transparent); }
.kpi::after { content: ''; position: absolute; right: -40px; top: -40px; width: 130px; height: 130px; border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--c) 30%, transparent), transparent 70%); pointer-events: none; }
.kpi .ico { width: 50px; height: 50px; flex: none; display: grid; place-items: center; border-radius: 12px;
  background: color-mix(in srgb, var(--c) 16%, transparent); border: 1px solid color-mix(in srgb, var(--c) 45%, transparent); }
.kpi .ico svg { width: 28px; height: 28px; }
.kpi .label { color: var(--muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; font-weight: 600; }
.kpi .value { font: 700 1.5rem var(--display); line-height: 1.15; color: color-mix(in srgb, var(--c) 35%, #fff); }
.kpi .sub { color: var(--muted); font-size: .8rem; }
.kpi.alert { border-color: rgba(239, 68, 68, .5); box-shadow: 0 0 24px rgba(239, 68, 68, .2), 0 12px 32px rgba(0, 0, 0, .35); }

.panel-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(400px, 100%), 1fr)); gap: 16px; margin-top: 16px; align-items: start; }
.feed-sub { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 2px; }
.feed-sub .pill { padding: 1px 8px; font-size: .72rem; }
.panel h3 { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.panel h3 > svg { width: 20px; height: 20px; }
.panel h3 > a, .panel h3 > .muted { margin-left: auto; font-family: Inter, sans-serif; font-weight: 500; }
.feed { list-style: none; margin: 0; padding: 0; }
.feed li { display: flex; align-items: center; gap: 12px; padding: 9px 6px; border-bottom: 1px solid var(--line); border-radius: 8px; }
.feed li:last-child { border-bottom: 0; }
.feed li:hover { background: rgba(139, 92, 246, .08); }
.feed li > .ore-icon { width: 26px; height: 26px; }
.feed-main { flex: 1; min-width: 0; }
.feed-main a { color: var(--text); }
.feed-time { white-space: nowrap; }
.suspect-meters { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.all-clear { display: flex; align-items: center; gap: 14px; padding: 18px; border-radius: 10px; background: rgba(74, 222, 128, .08); border: 1px dashed rgba(74, 222, 128, .35); }
.all-clear svg { width: 34px; height: 34px; filter: hue-rotate(110deg) saturate(.8); }
.rank-badge { width: 24px; height: 22px; flex: none; display: grid; place-items: center; font: 700 .7rem var(--display); color: var(--muted); }
.rank-badge.r1 { color: #1c1300; background: #fbbf24; box-shadow: inset -2px -2px 0 #b45309, inset 2px 2px 0 #fde68a; }
.rank-badge.r2 { color: #111; background: #cbd5e1; box-shadow: inset -2px -2px 0 #64748b, inset 2px 2px 0 #f1f5f9; }
.rank-badge.r3 { color: #1a0d00; background: #d97706; box-shadow: inset -2px -2px 0 #7c2d12, inset 2px 2px 0 #fbbf24; }
.bar { height: 8px; background: rgba(0, 0, 0, .5); border: 1px solid #000; overflow: hidden; }
.bar > span { display: block; height: 100%; background: linear-gradient(90deg, #22d3ee, #a78bfa); box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .3); }

.meter-cell { display: inline-flex; align-items: center; gap: 8px; justify-content: flex-end; }
.meter { display: inline-block; width: 64px; height: 7px; border-radius: 99px; background: rgba(0, 0, 0, .55); overflow: hidden; vertical-align: middle; }
.meter > span { display: block; height: 100%; border-radius: 99px; }
.meter.low > span { background: var(--good); }
.meter.mid > span { background: var(--warn); }
.meter.high > span { background: var(--bad); box-shadow: 0 0 8px var(--bad); }
.meter-val { margin-left: 6px; font-variant-numeric: tabular-nums; }
.meter-val.mid { color: var(--warn); }
.meter-val.high { color: var(--bad); }
.sticky-col { position: sticky; left: 0; z-index: 2; background: rgba(16, 10, 30, .97); }
thead .sticky-col { z-index: 3; }

.lookup-hero { display: flex; align-items: center; gap: 14px; padding: 18px 20px; }
.lookup-hero > svg { width: 34px; height: 34px; flex: none; }
.lookup-hero input { flex: 1; min-width: 0; font-size: 1.05rem; padding: 10px 14px; }
.player-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr)); gap: 12px; }
.player-card { display: flex; align-items: center; gap: 14px; padding: 14px; color: var(--text); transition: transform .15s, border-color .15s; }
.player-card:hover { transform: translateY(-3px); border-color: var(--line-strong); color: var(--text); }
.player-card img { width: 48px; height: 48px; image-rendering: pixelated; box-shadow: 0 0 0 2px #000; }
.player-card.flagged { border-color: rgba(239, 68, 68, .45); }
.player-card .ore-icon { width: 14px; height: 14px; }
.player-head img.skin { width: auto; height: 130px; border: 0; outline: 0; box-shadow: none; filter: drop-shadow(0 0 18px rgba(139, 92, 246, .55)); }
.player-head.flagged { border-color: rgba(239, 68, 68, .5); box-shadow: 0 0 26px rgba(239, 68, 68, .18); }

/* finds table: wraps instead of scrolling sideways */
.finds-table th, .finds-table td { white-space: normal; padding: 9px 10px; }
.finds-table .player, .finds-table .ore-head { white-space: nowrap; }
.finds-table [data-tip] { cursor: help; }
.finds-table .player { cursor: pointer; }
.tip { position: fixed; z-index: 100; pointer-events: none; max-width: 320px; padding: 6px 10px; border-radius: 8px;
  background: rgba(12, 7, 24, .97); border: 1px solid var(--line-strong); color: var(--text); font-size: .82rem;
  box-shadow: 0 8px 22px rgba(0, 0, 0, .5); opacity: 0; transform: translateY(4px); transition: opacity .12s, transform .12s; }
.tip.show { opacity: 1; transform: none; }
.finds-table td.drops { min-width: 160px; }
.finds-table td.loc .mono { font-size: .82rem; white-space: nowrap; }
.tp-btn { font: 700 .7rem var(--display); letter-spacing: .06em; padding: 6px 11px; min-width: 42px; }
/* a name (or value) followed by a tag, centred on one line */
.name-row { display: inline-flex; align-items: center; gap: 8px; vertical-align: middle; }
.name-row .pill { line-height: 1.3; }
.m-time { display: none; }
/* phones: every find becomes a small card */
@media (max-width: 700px) {
  .finds-table thead { display: none; }
  .finds-table, .finds-table tbody { display: block; }
  .finds-table tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; padding: 12px 14px;
    border-bottom: 1px solid var(--line);
    grid-template-areas: "player tp" "ore vein" "drops drops" "loc loc"; }
  .finds-table tr:last-child { border-bottom: 0; }
  .finds-table td { display: block; padding: 0; border: 0; min-width: 0; }
  .finds-table .c-player { grid-area: player; }
  .finds-table .c-ore { grid-area: ore; }
  .finds-table .c-vein { grid-area: vein; align-self: center; }
  .finds-table .c-drops { grid-area: drops; min-width: 0; }
  .finds-table .c-loc { grid-area: loc; display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
  .finds-table .c-tp { grid-area: tp; align-self: center; }
  .m-time { display: inline; }
}
.show-more { text-align: center; margin-top: 12px; }
.show-more button { padding: 8px 22px; }
/* ore tracker: one stacked bar per player */
.ore-mix-head { width: 46%; }
.ore-mix { display: flex; align-items: center; gap: 10px; min-width: 170px; }
/* phones: each player becomes a card - name, ore bar, then the numbers with labels */
@media (max-width: 700px) {
  .ore-table thead { display: none; }
  .ore-table, .ore-table tbody { display: block; }
  .ore-table tr { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 10px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
  .ore-table tr:last-child { border-bottom: 0; }
  .ore-table td { display: block; padding: 0; border: 0; text-align: left; }
  .ore-table td.sticky-col, .ore-table td.c-mix { grid-column: 1 / -1; position: static; background: none; }
  .ore-table td[data-label]::before { content: attr(data-label); display: block; color: var(--muted); font-size: .7rem; text-transform: uppercase; letter-spacing: .05em; margin-bottom: 2px; }
  .ore-table .meter-cell { justify-content: flex-start; }
  .ore-table .meter { width: 36px; }
  .ore-mix { min-width: 0; }
}
.ore-track { flex: 1; height: 14px; background: rgba(0, 0, 0, .5); border: 1px solid #000; overflow: hidden; }
.ore-stack { display: flex; height: 100%; }
.ore-stack .seg { min-width: 3px; height: 100%; cursor: help; border-right: 1px solid rgba(0, 0, 0, .45);
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .3), inset 0 2px 0 rgba(255, 255, 255, .3); transition: filter .12s, opacity .15s; }
.ore-stack .seg:last-child { border-right: 0; }
.ore-stack .seg:hover { filter: brightness(1.4); }
.ore-stack.dim .seg:not(.hl) { opacity: .25; }
.ore-total { min-width: 52px; text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.ore-legend { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.ore-legend button { display: inline-flex; align-items: center; gap: 7px; padding: 4px 11px; font-size: .8rem; border-radius: 999px;
  background: rgba(6, 3, 13, .65); color: var(--muted); border-color: var(--line); }
.ore-legend button:hover { color: var(--text); border-color: var(--c); background: rgba(6, 3, 13, .8); }
.ore-legend button.active { color: #fff; border-color: var(--c); box-shadow: 0 0 12px color-mix(in srgb, var(--c) 45%, transparent); }
.ore-legend .dot { width: 10px; height: 10px; border-radius: 2px; background: var(--c); box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .3); }
.ore-table th, .ore-table td { padding: 10px 11px; }
.ore-table .ore-head .ore-icon { width: 20px; height: 20px; }
.ore-table .meter { width: 44px; }

@media (max-width: 900px) {
  .admin { grid-template-columns: minmax(0, 1fr); }
  .admin-side { position: static; min-width: 0; flex-direction: row; flex-wrap: wrap; align-items: center; }
  .me { border: 0; padding: 0; }
  .side-nav { order: 3; min-width: 0; width: 100%; grid-auto-flow: column; grid-auto-columns: max-content; overflow-x: auto; padding-bottom: 4px; }
  .side-logout { margin: 0 0 0 auto; padding: 6px 12px; }
  .admin-head h1 { font-size: 1.4rem; }
}
@media (max-width: 560px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .kpi { flex-direction: column; align-items: flex-start; gap: 8px; padding: 14px; }
  .kpi .ico { width: 38px; height: 38px; }
  .kpi .ico svg { width: 22px; height: 22px; }
  .kpi .value { font-size: 1.25rem; }
  .feed li { gap: 8px; }
}

/* ---------- ban appeals ---------- */
.appeal { width: 100%; max-width: 760px; margin: 0 auto; }
/* pages that sit centred between the top bar and the footer (appeal form + status) */
body.page-center main#app { display: flex; flex-direction: column; justify-content: center; padding-top: 32px; padding-bottom: 32px; }
.appeal-card { display: grid; gap: 16px; padding: 26px; }
.appeal-head { display: flex; gap: 16px; align-items: center; }
.appeal-head > svg { width: 52px; height: 52px; flex: none; filter: drop-shadow(3px 3px 0 rgba(0, 0, 0, .6)); }
.appeal-head h1 { margin: 0 0 4px; }
.appeal-head h1::before { display: none; }
.appeal-head p { margin: 0; }
.ap-find { display: flex; gap: 10px; flex-wrap: wrap; }
.ap-find input { flex: 1; min-width: 200px; font-size: 1.05rem; padding: 10px 14px; }
.ban-box { display: flex; gap: 16px; align-items: flex-start; padding: 16px; border-radius: 12px;
  background: rgba(127, 29, 29, .18); border: 1px solid rgba(248, 113, 113, .3); }
.ban-box img { width: 48px; height: 48px; image-rendering: pixelated; box-shadow: 0 0 0 2px #000; flex: none; }
.ban-box > div { flex: 1; min-width: 0; }
.ban-name { font-family: var(--display); font-size: 1.05rem; letter-spacing: .03em; }
.ban-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px 18px; margin-top: 10px; }
.ban-facts div { display: grid; }
.ban-facts .muted { font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; }
.ap-form { display: grid; gap: 14px; }
.ap-form label { display: grid; gap: 6px; color: var(--muted); font-size: .9rem; }
.ap-form textarea, .ai-decide textarea { font: inherit; resize: vertical; background: rgba(6, 3, 13, .7); color: var(--text);
  border: 1px solid var(--line-strong); border-radius: 8px; padding: 10px 12px; }
.ap-form textarea:focus, .ai-decide textarea:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
.ap-count { justify-self: end; }
.ap-form > .btn-mc { justify-self: start; }
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.ap-note { display: flex; gap: 14px; align-items: center; padding: 14px 16px; border-radius: 10px;
  background: rgba(139, 92, 246, .1); border: 1px solid var(--line-strong); }
.ap-note > svg { width: 32px; height: 32px; flex: none; }
.ap-note.good { background: rgba(74, 222, 128, .08); border-color: rgba(74, 222, 128, .35); }
.ap-note.bad { background: rgba(248, 113, 113, .08); border-color: rgba(248, 113, 113, .35); }
.ap-link { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 8px; padding: 8px 10px; border-radius: 8px; background: rgba(0, 0, 0, .4); }
.ap-link .mono { word-break: break-all; }
.ap-reply { padding: 14px 16px; border-left: 3px solid var(--accent-2); background: rgba(139, 92, 246, .08); border-radius: 0 10px 10px 0; }
.ap-reply p, .ap-yours p { margin: 6px 0 0; white-space: pre-wrap; }
.ap-yours summary { cursor: pointer; color: var(--muted); }

.appeal-list { display: grid; gap: 14px; }
.appeal-item { display: grid; gap: 12px; }
.appeal-item.pending { border-color: rgba(251, 191, 36, .35); }
.ai-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ai-when { margin-left: auto; cursor: help; }
.ai-ban { display: flex; gap: 8px 14px; flex-wrap: wrap; align-items: center; font-size: .9rem; }
.ai-msg { margin: 0; padding: 12px 14px; white-space: pre-wrap; border-left: 3px solid var(--line-strong); background: rgba(0, 0, 0, .25); border-radius: 0 8px 8px 0; }
.ai-decide { display: grid; gap: 10px; }
.ai-buttons { display: flex; gap: 10px; }
.ai-decided { padding-top: 10px; border-top: 1px solid var(--line); }
.ai-resp { margin-top: 4px; font-style: italic; }
.ap-act { font-weight: 600; font-size: .9rem; }
.ap-act.good { color: var(--good); }
.ap-act.bad { color: var(--bad); }
.ap-act.warn { color: var(--warn); }
.btn-mc.green { background: #16a34a; box-shadow: inset -3px -4px 0 #14532d, inset 3px 3px 0 #4ade80; text-shadow: 2px 2px 0 #14532d; }
.btn-mc.green:hover { background: #22c55e; box-shadow: inset -3px -4px 0 #166534, inset 3px 3px 0 #86efac, 0 0 16px rgba(34, 197, 94, .5); }
.btn-mc.red { background: #b91c1c; box-shadow: inset -3px -4px 0 #7f1d1d, inset 3px 3px 0 #f87171; text-shadow: 2px 2px 0 #450a0a; }
.btn-mc.red:hover { background: #dc2626; box-shadow: inset -3px -4px 0 #991b1b, inset 3px 3px 0 #fca5a5, 0 0 16px rgba(239, 68, 68, .5); }
.toast > svg { width: 30px; height: 30px; flex: none; }

/* ---------- confirmation box ---------- */
.modal-backdrop { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 16px;
  background: rgba(4, 2, 10, .72); backdrop-filter: blur(5px); opacity: 0; transition: opacity .18s; }
.modal-backdrop.open { opacity: 1; }
.modal { width: min(440px, 100%); padding: 26px; text-align: center; animation: none;
  border-color: var(--line-strong); box-shadow: 0 24px 60px rgba(0, 0, 0, .6), 0 0 40px rgba(139, 92, 246, .25);
  transform: translateY(10px) scale(.97); transition: transform .18s; }
.modal-backdrop.open .modal { transform: none; }
.modal-icon { width: 64px; height: 64px; margin: 0 auto 14px; display: grid; place-items: center; border-radius: 14px;
  background: rgba(139, 92, 246, .14); border: 1px solid var(--line-strong); }
.modal-icon svg { width: 36px; height: 36px; }
.modal h3 { font-size: 1.1rem; margin: 0 0 8px; }
.modal-body { color: var(--muted); display: grid; gap: 10px; }
.modal-body p { margin: 0; color: var(--text); }
.modal-quote { text-align: left; padding: 10px 12px; border-left: 3px solid var(--accent-2); background: rgba(139, 92, 246, .08); border-radius: 0 8px 8px 0; }
.modal-quote p { margin: 4px 0 0; white-space: pre-wrap; font-style: italic; }
.modal-actions { display: flex; gap: 10px; justify-content: center; margin-top: 20px; }
.modal-actions button { min-width: 120px; }
.modal-cancel { padding: 8px 18px; }

/* ---------- team ---------- */
.team-form { display: grid; gap: 12px; }
.team-form label, .modal-fields label { display: grid; gap: 6px; color: var(--muted); font-size: .85rem; text-align: left; }
.pw-row { display: flex; gap: 8px; }
.pw-row input { flex: 1; min-width: 0; }
.team-form > .btn-mc { justify-self: start; }
.role-list li { gap: 12px; }
.role-list .pill { min-width: 92px; justify-content: center; }
.member-list { display: grid; gap: 10px; }
.member { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 14px 16px; }
.member > img { width: 44px; height: 44px; image-rendering: pixelated; box-shadow: 0 0 0 2px #000; }
.member-main { flex: 1; min-width: 200px; }
.member-main b { font-family: var(--display); font-size: .9rem; letter-spacing: .03em; }
.member-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.member-actions button, .member-actions select { padding: 6px 12px; font-size: .85rem; }
.member.disabled { opacity: .6; }
button.danger { color: var(--bad); border-color: rgba(248, 113, 113, .4); }
button.danger:hover { background: rgba(248, 113, 113, .15); border-color: var(--bad); }
button.linkish { background: none; border: 0; padding: 0; color: var(--accent-2); cursor: pointer; display: block; }
button.linkish:hover { text-decoration: underline; background: none; }
.cred-box { text-align: left; margin: 0; padding: 12px 14px; border-radius: 8px; background: rgba(0, 0, 0, .45); border: 1px solid var(--line-strong);
  font: .9rem ui-monospace, Consolas, monospace; color: var(--text); white-space: pre-wrap; user-select: all; }
.modal-fields { display: grid; gap: 10px; margin-top: 6px; }
.modal-error { color: var(--bad); font-size: .85rem; min-height: 1em; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
