:root {
  --bg: #0B0B12; --surface: #151520; --surface-2: #1D1D2B; --line: #2C2C40; --text: #F4F4F8; --muted: #A9A9BE;
  --accent: #D4FF3A; --gold: #FFC21A; --rare: #E07BFF; --normal: #5CC8FF; --danger: #FF6A5C; --twitch: #9146FF;
  --num: 'Space Grotesk', 'Zen Kaku Gothic New', sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: 'Zen Kaku Gothic New', system-ui, sans-serif; font-size: 15px; }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
a { color: var(--accent); }
.bar {
  position: sticky; top: 0; z-index: 5; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px;
  padding: 12px 20px; background: rgba(11, 11, 18, .92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line);
}
.brand { display: flex; flex-direction: column; }
.brand strong { font-family: 'Dela Gothic One', sans-serif; font-weight: 400; font-size: 18px; }
.eyebrow { font-family: var(--num); font-size: 11px; font-weight: 700; letter-spacing: .2em; color: var(--muted); }
.tabs { display: flex; flex-wrap: wrap; gap: 4px; flex: 1; }
.tabs button { min-height: 44px; padding: 0 14px; border: 0; border-radius: 10px; background: none; color: var(--muted); font-weight: 700; cursor: pointer; }
.tabs button[aria-selected="true"] { background: var(--surface-2); color: var(--text); }
.who { display: flex; align-items: center; gap: 12px; margin-left: auto; color: var(--muted); font-size: 14px; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 24px 20px 64px; }
h2 { font-size: 18px; margin: 28px 0 12px; }
.tab > h2:first-child, .row-head h2 { margin-top: 0; }
.row-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; }
.hint { color: var(--muted); font-size: 13px; line-height: 1.7; margin: 0 0 14px; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 18px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface-2); font-weight: 700; cursor: pointer; text-decoration: none; color: var(--text); }
.btn.primary { background: var(--accent); color: #0B0B12; border-color: var(--accent); }
.btn.twitch { background: var(--twitch); border-color: var(--twitch); color: #fff; }
.btn.ghost { background: transparent; }
.btn.danger { color: var(--danger); background: transparent; }
.btn.small { min-height: 36px; padding: 0 12px; font-size: 13px; }
.gate { max-width: 520px; margin: 64px auto; padding: 28px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); line-height: 1.8; }
.gate h2 { margin-top: 0; }
.gate code { background: var(--surface-2); padding: 2px 6px; border-radius: 6px; }
.warn { padding: 14px 16px; border-radius: 12px; border: 1px solid #8A5A00; background: #2A1E05; color: #FFD27A; margin-bottom: 16px; line-height: 1.7; font-size: 14px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); gap: 12px; }
.stat { padding: 18px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; }
.stat .k { color: var(--muted); font-size: 13px; }
.stat .v { font-family: var(--num); font-weight: 700; font-size: 28px; }
.stat .v.small { font-size: 18px; }
.tab { overflow-x: auto; }
.table { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
.table th, .table td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line); font-size: 14px; white-space: nowrap; vertical-align: middle; }
.table th { color: var(--muted); font-weight: 700; font-size: 12px; }
.table .num { text-align: right; font-family: var(--num); }
.table tr:last-child td { border-bottom: 0; }
.thumb { width: 36px; height: 50px; border-radius: 5px; object-fit: cover; background: var(--surface-2); display: block; }
.badge { display: inline-block; padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--surface-2); }
.badge.jackpot { color: var(--gold); } .badge.rare { color: var(--rare); } .badge.normal { color: var(--normal); }
.badge.off { color: var(--muted); } .badge.ban { color: var(--danger); }
.user-cell { display: flex; align-items: center; gap: 10px; }
.user-cell img { width: 28px; height: 28px; border-radius: 999px; background: var(--surface-2); }
.user-cell small { color: var(--muted); }
.form { display: flex; flex-direction: column; gap: 14px; max-width: 640px; }
.form label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); font-weight: 700; }
.form input:not([type=checkbox]):not([type=radio]):not([type=file]), .form select, .form textarea, .search {
  min-height: 44px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface-2); color: var(--text); font-weight: 400;
}
.form fieldset { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; }
.form legend { color: var(--muted); font-size: 13px; font-weight: 700; padding: 0 6px; }
.form .radio, .form .check { flex-direction: row; align-items: center; gap: 10px; color: var(--text); font-weight: 400; font-size: 15px; min-height: 40px; }
.form .radio input, .form .check input { width: 20px; height: 20px; accent-color: var(--accent); }
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(150px, 100%), 1fr)); gap: 12px; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.msg { font-size: 14px; color: var(--muted); }
.msg.err { color: var(--danger); }
.msg.ok { color: var(--accent); }
.dlg { width: min(94vw, 560px); max-height: 92dvh; overflow: auto; padding: 24px; border-radius: 18px; border: 1px solid var(--line); background: var(--surface); color: var(--text); }
.dlg::backdrop { background: rgba(0, 0, 0, .65); }
.dlg h2 { margin: 0 0 4px; }
.img-pick { display: grid; grid-template-columns: 96px 1fr; grid-template-rows: auto auto; gap: 6px 14px; align-items: center; }
.img-pick img, .img-pick .ph { grid-row: span 2; width: 96px; height: 134px; border-radius: 8px; object-fit: cover; background: var(--surface-2); display: grid; place-items: center; color: var(--muted); font-size: 12px; }
.img-pick .file { position: relative; justify-self: start; }
.img-pick .file input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.img-pick .hint { margin: 0; }
.search { min-width: 220px; }
.filters { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.inline { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); font-weight: 700; }
.inline select { min-height: 44px; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface-2); color: var(--text); }
.inline.check { color: var(--text); font-weight: 400; font-size: 14px; min-height: 44px; }
.inline.check input { width: 20px; height: 20px; accent-color: var(--accent); }
