:root {
  --bg: #08090a;
  --panel: #101213;
  --panel-2: #14171a;
  --line: #1f2427;
  --line-2: #2a3034;
  --ink: #eef2ee;
  --muted: #9aa39d;
  --faint: #6f7872;
  --accent: #a6ff4d;
  --accent-ink: #0b1205;
  --accent-soft: rgba(166, 255, 77, 0.12);
  --red: #ff6b6b;
  --red-soft: rgba(255, 107, 107, 0.12);
  --amber: #ffc163;
  --amber-soft: rgba(255, 193, 99, 0.12);
  --radius: 16px;
  --tile: 84px;
  --gap: 14px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.5 "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: "";
  position: fixed;
  inset: -20% -10% auto -10%;
  height: 70vh;
  background: radial-gradient(60% 60% at 50% 0%, rgba(166, 255, 77, 0.07), transparent 70%);
  pointer-events: none;
  z-index: -1;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }
.num { font-variant-numeric: tabular-nums; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }

/* header */
header.top {
  position: sticky; top: 0; z-index: 20;
  background: linear-gradient(var(--bg) 60%, rgba(8, 9, 10, 0));
}
.bar { display: flex; align-items: center; gap: 18px; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: 0.08em; font-size: 15px; }
.brand svg { width: 28px; height: 28px; }
nav.links { display: flex; gap: 4px; margin-left: 8px; }
nav.links a { color: var(--muted); padding: 6px 12px; border-radius: 999px; font-size: 14px; transition: color 0.15s, background 0.15s; }
nav.links a:hover, nav.links a.on { color: var(--ink); background: var(--panel-2); }
.bar .spacer { flex: 1; }
.ca {
  display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 12px;
  border: 1px solid var(--line-2); border-radius: 999px; background: var(--panel);
  color: var(--muted); font: 500 13px/1 "JetBrains Mono", ui-monospace, monospace; cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}
.ca b { color: var(--accent); font-family: "Inter", sans-serif; font-weight: 600; letter-spacing: 0.04em; }
.ca:hover { border-color: var(--faint); color: var(--ink); }
.ca.copied { border-color: var(--accent); color: var(--accent); }
.btn {
  display: inline-flex; align-items: center; height: 34px; padding: 0 16px; border-radius: 999px;
  background: var(--accent); color: var(--accent-ink); font-weight: 600; font-size: 14px;
}
.btn:hover { filter: brightness(1.06); }
.xlink { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--panel); color: var(--muted); transition: color 0.15s, border-color 0.15s; }
.xlink:hover { color: var(--ink); border-color: var(--faint); }

/* hero */
.hero { padding: 34px 0 18px; text-align: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--faint); }
.dot.live { background: var(--accent); box-shadow: 0 0 0 0 rgba(166, 255, 77, 0.5); animation: pulse 2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(166, 255, 77, 0.45); } 70% { box-shadow: 0 0 0 8px rgba(166, 255, 77, 0); } 100% { box-shadow: 0 0 0 0 rgba(166, 255, 77, 0); } }
h1 { font-size: clamp(30px, 4.6vw, 50px); line-height: 1.08; letter-spacing: -0.025em; margin: 14px auto 12px; max-width: 820px; font-weight: 700; }
h1 em { font-style: normal; color: var(--accent); }
h1 .nb { white-space: nowrap; }
.lede { color: var(--muted); max-width: 600px; margin: 0 auto; font-size: 16px; }

/* spinner */
.stage { margin-top: 26px; background: var(--panel); border: 1px solid var(--line); border-radius: 22px; padding: 26px 0 22px; position: relative; overflow: hidden; }
.reel {
  position: relative; height: calc(var(--tile) + 44px); overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 16%, #000 84%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 16%, #000 84%, transparent 100%);
}
.tile {
  position: absolute; top: 22px; left: 0; width: var(--tile); height: var(--tile);
  will-change: transform;
}
.face {
  width: 100%; height: 100%; border-radius: 50%; overflow: hidden; background: var(--panel-2); border: 2px solid var(--line-2);
  transition: border-color 0.3s, box-shadow 0.4s, opacity 0.4s, scale 0.5s cubic-bezier(0.2, 1.4, 0.4, 1);
}
.face img { width: 100%; height: 100%; object-fit: cover; }
.tile.win { z-index: 1; }
.tile.win .face { border-color: var(--accent); scale: 1.16; box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px var(--accent), 0 10px 40px rgba(166, 255, 77, 0.28); }
.reel.landed .tile:not(.win) .face { opacity: 0.45; }
.lens {
  position: absolute; left: 50%; top: 50%; width: calc(var(--tile) + 16px); height: calc(var(--tile) + 16px);
  transform: translate(-50%, -50%); border-radius: 50%; pointer-events: none; z-index: 2;
  box-shadow: inset 0 0 0 1.5px rgba(166, 255, 77, 0.55); transition: opacity 0.3s;
}
.reel.landed .lens { opacity: 0; }
.result { min-height: 92px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 10px 20px 0; }
.result .who { font-size: 22px; font-weight: 650; letter-spacing: -0.01em; }
.result .who a:hover { color: var(--accent); }
.result .what { color: var(--muted); font-size: 14px; margin-top: 4px; }
.result .what a { color: var(--accent); }
.result .tag { display: inline-block; font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); margin-bottom: 6px; }
.result.idle .tag { color: var(--faint); }
.fade-in { animation: fadein 0.45s ease both; }
@keyframes fadein { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.meter { max-width: 460px; margin: 16px auto 0; padding: 0 20px; }
.meter .row { display: flex; justify-content: space-between; color: var(--muted); font-size: 13px; margin-bottom: 7px; }
.meter .row b { color: var(--ink); font-weight: 600; }
.track { height: 8px; background: #191d20; border-radius: 99px; overflow: hidden; box-shadow: inset 0 0 0 1px var(--line-2); }
.fill { height: 100%; width: 0; background: var(--accent); border-radius: 99px; transition: width 0.8s cubic-bezier(0.2, 0.8, 0.2, 1); }

/* stats */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 14px; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 18px 16px; min-width: 0; }
.stat .k { color: var(--muted); font-size: 13px; }
.stat .v { font-size: 32px; font-weight: 700; letter-spacing: -0.02em; margin-top: 6px; line-height: 1.1; white-space: nowrap; }
.stat .v small { font-size: 16px; color: var(--muted); font-weight: 600; margin-left: 4px; }
.stat .s { color: var(--faint); font-size: 13px; margin-top: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat.accent .v { color: var(--accent); }
.subline { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 26px; color: var(--muted); font-size: 13.5px; margin: 16px 0 0; }
.subline b { color: var(--ink); font-weight: 600; }

/* list */
section.kols { margin-top: 56px; }
.head { display: flex; align-items: end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
h2 { font-size: 24px; letter-spacing: -0.015em; margin: 0; }
.head p { color: var(--muted); margin: 4px 0 0; font-size: 14px; }
.tools { display: flex; gap: 10px; align-items: center; margin-top: 18px; flex-wrap: wrap; }
.search { flex: 1 1 260px; position: relative; }
.search input {
  width: 100%; height: 40px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--panel);
  color: var(--ink); padding: 0 14px 0 38px; font: inherit; font-size: 14px; outline: none; transition: border-color 0.15s;
}
.search input:focus { border-color: var(--faint); }
.search svg { position: absolute; left: 13px; top: 12px; width: 16px; height: 16px; color: var(--faint); }
.seg { display: flex; gap: 4px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 3px; overflow-x: auto; scrollbar-width: none; }
.seg::-webkit-scrollbar { display: none; }
.seg button {
  border: 0; background: transparent; color: var(--muted); font: inherit; font-size: 13px; font-weight: 500;
  height: 32px; padding: 0 12px; border-radius: 9px; cursor: pointer; white-space: nowrap;
}
.seg button span { color: var(--faint); margin-left: 5px; font-variant-numeric: tabular-nums; }
.seg button.on { background: var(--panel-2); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-2); }
select {
  height: 40px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--panel); color: var(--ink);
  padding: 0 34px 0 12px; font: inherit; font-size: 14px; appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238a938d' stroke-width='2.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
}
.table { margin-top: 14px; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--panel); }
.tr { display: grid; grid-template-columns: minmax(0, 2.3fr) 1.15fr 0.9fr 0.9fr 0.9fr 0.9fr 1fr; gap: 12px; align-items: center; padding: 12px 18px; border-top: 1px solid var(--line); }
.tr:first-child { border-top: 0; }
.th { color: var(--muted); font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.07em; padding-top: 12px; padding-bottom: 12px; background: var(--panel-2); }
.tr:not(.th):hover { background: rgba(255, 255, 255, 0.018); }
.tr .r { text-align: right; }
.kol { display: flex; align-items: center; gap: 12px; min-width: 0; }
.kol img, .kol .ph { width: 38px; height: 38px; border-radius: 50%; flex: none; background: var(--panel-2); object-fit: cover; }
.kol .t { min-width: 0; }
.kol .n { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kol .h { color: var(--faint); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kol .h a:hover { color: var(--accent); }
.pill { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 99px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.pill.waiting { color: var(--muted); background: var(--panel-2); box-shadow: inset 0 0 0 1px var(--line-2); }
.pill.holding { color: var(--accent); background: var(--accent-soft); }
.pill.sold { color: var(--red); background: var(--red-soft); }
.pill.moved { color: var(--amber); background: var(--amber-soft); }
.pill.sending { color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.plus { display: inline-block; margin-left: 6px; font-size: 12px; color: var(--accent); font-weight: 600; }
.cell { font-size: 14px; }
.cell.muted, .cell .muted { color: var(--faint); }
.lbl { display: none; }
.more { display: flex; justify-content: center; padding: 14px; border-top: 1px solid var(--line); }
.more button { border: 1px solid var(--line-2); background: transparent; color: var(--ink); font: inherit; font-size: 14px; height: 36px; padding: 0 18px; border-radius: 99px; cursor: pointer; }
.more button:hover { border-color: var(--faint); }
.empty { padding: 40px 18px; text-align: center; color: var(--faint); }

/* footer */
footer { margin-top: 72px; border-top: 1px solid var(--line); padding: 28px 0 40px; color: var(--muted); font-size: 13px; }
footer .cols { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
footer a:hover { color: var(--ink); }
footer .mono { font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 12px; word-break: break-all; }
footer p { margin: 6px 0; }

/* about */
.doc { max-width: 720px; margin: 0 auto; padding: 36px 0 0; }
.doc h1 { text-align: left; margin: 10px 0 14px; font-size: clamp(30px, 4vw, 42px); }
.doc .lede { margin: 0; text-align: left; }
.doc h2 { margin: 44px 0 12px; font-size: 20px; }
.doc p, .doc li { color: #c7cec9; font-size: 15.5px; }
.doc p { margin: 10px 0; }
.doc ol, .doc ul { padding-left: 22px; margin: 10px 0; }
.doc li { margin: 8px 0; }
.doc li b, .doc p b { color: var(--ink); }
.doc code, .doc .mono { font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 13px; background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; word-break: break-all; }
.doc .card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; margin: 14px 0; }
.doc dl { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 10px 16px; margin: 0; }
.doc dt { color: var(--muted); font-size: 14px; }
.doc dd { margin: 0; font-size: 14px; color: var(--ink); }
.doc .fine { color: var(--faint); font-size: 13.5px; }
.doc a.u { color: var(--accent); }

@media (max-width: 900px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .th { display: none; }
  .tr { grid-template-columns: minmax(0, 1fr) auto; gap: 8px 12px; padding: 14px 16px; }
  .tr .kol { grid-column: 1; }
  .tr .stc { grid-column: 2; grid-row: 1; justify-self: end; }
  .tr .cell:not(.kol):not(.stc) { grid-column: span 1; text-align: left; font-size: 13px; }
  .tr .cells { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px 10px; }
  .lbl { display: block; color: var(--faint); font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; }
  .tr .r { text-align: left; }
  .tr.wait .cells { display: none; }
  .tr.wait { padding-top: 10px; padding-bottom: 10px; }
}
@media (min-width: 901px) { .cells { display: contents; } }
@media (max-width: 640px) {
  :root { --tile: 68px; --gap: 12px; }
  .wrap { padding: 0 16px; }
  nav.links { display: none; }
  .ca .full { display: none; }
  .stat .v { font-size: 26px; }
  .stat { padding: 14px; }
  .stat .s { white-space: normal; font-size: 12.5px; line-height: 1.35; }
  .result .who { font-size: 19px; }
  .tile.win .face { scale: 1.08; box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--accent), 0 8px 30px rgba(166, 255, 77, 0.28); }
  .meter { padding: 0 16px; }
  .meter .row { font-size: 12px; gap: 10px; }
  .seg { flex-wrap: wrap; overflow: visible; flex: 1 1 100%; }
  .tools select { flex: 1 1 100%; }
  footer .mono { display: block; font-size: 11px; margin-top: 2px; }
  .doc dl { grid-template-columns: 1fr; gap: 2px; }
  .doc dd { margin-bottom: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .dot.live { animation: none; }
  .fade-in { animation: none; }
}
