:root {
  color-scheme: dark;
  --bg: #080a0f;
  --panel: #10131b;
  --panel-2: #151a24;
  --line: #272d3a;
  --muted: #8d96a8;
  --text: #eef2f8;
  --accent: #7c8cff;
  --green: #7ddf9a;
  --yellow: #f1c75b;
  --red: #ff7373;
  --drafted: #626b7a;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--text); }
body { overflow: hidden; }
a { color: inherit; }
button, input, select { font: inherit; }
.shell { height: 100vh; display: grid; grid-template-rows: auto 1fr; padding: 14px; gap: 12px; }
.topbar { position: sticky; top: 0; z-index: 5; display: grid; grid-template-columns: minmax(240px, 1fr) auto minmax(360px, 1.35fr); align-items: center; gap: 16px; padding: 12px 14px; background: #0c0f16; border: 1px solid var(--line); border-radius: 14px; }
.brand h1 { margin: 1px 0 0; font-size: 17px; letter-spacing: .01em; }
.eyebrow, .meta, .reason, .subtle { color: var(--muted); font-size: 12px; }
.tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.tabs a { min-height: 36px; display: inline-flex; align-items: center; padding: 0 14px; text-decoration: none; border: 1px solid var(--line); border-radius: 10px; color: var(--muted); }
.tabs a.active { color: var(--text); border-color: var(--accent); background: rgba(124,140,255,.12); }
.tabs a.backup-link { border-color: rgba(125,223,154,.45); color: var(--green); }
.status { color: var(--yellow); font-size: 12px; line-height: 1.35; justify-self: end; text-align: right; }
.app { min-height: 0; }
.layout-auction { height: 100%; display: grid; grid-template-columns: minmax(720px, 1fr) 390px; gap: 12px; }
.layout-snake { height: 100%; display: grid; grid-template-columns: 1fr; }
.panel { min-height: 0; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.panel-header { padding: 12px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; gap: 12px; align-items: start; }
.panel-title { margin: 0; font-size: 15px; }
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--line); background: #0d1119; }
.search { flex: 1 1 220px; min-width: 180px; }
.input, select { min-height: 36px; border: 1px solid var(--line); border-radius: 9px; background: #090c12; color: var(--text); padding: 0 10px; }
.check, .button { min-height: 36px; display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--line); border-radius: 9px; background: var(--panel-2); color: var(--text); padding: 0 10px; cursor: pointer; }
.button.danger { border-color: rgba(255,115,115,.5); color: #ffd0d0; }
.table-wrap { height: calc(100% - 109px); overflow: auto; }
table { width: 100%; border-collapse: collapse; font-size: 12px; }
th { position: sticky; top: 0; background: #10141d; z-index: 2; text-align: left; color: var(--muted); font-weight: 650; border-bottom: 1px solid var(--line); }
th, td { padding: 8px 10px; border-bottom: 1px solid rgba(39,45,58,.72); vertical-align: middle; }
tr.drafted { color: var(--drafted); }
tr.quarantine { background: rgba(255,115,115,.08); }
.name { font-weight: 700; color: var(--text); }
.badges { display: flex; gap: 5px; flex-wrap: wrap; }
.badge { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 999px; padding: 2px 7px; font-size: 11px; color: var(--muted); white-space: nowrap; }
.badge.plan { color: var(--accent); border-color: rgba(124,140,255,.5); }
.badge.value { color: var(--green); border-color: rgba(125,223,154,.45); }
.badge.warn { color: var(--yellow); border-color: rgba(241,199,91,.45); }
.badge.stop { color: var(--red); border-color: rgba(255,115,115,.45); }
.draft-btn { min-height: 30px; border: 1px solid var(--line); border-radius: 8px; background: #0a0d14; color: var(--text); cursor: pointer; }
.draft-btn[aria-pressed="true"] { color: var(--drafted); border-style: dashed; }
.mobile-team { display: none; }
.roster { height: 100%; overflow: auto; padding: 12px; }
.roster-section { display: grid; gap: 8px; margin-bottom: 12px; }
.slot { border: 1px solid var(--line); border-radius: 12px; background: var(--panel-2); padding: 9px; display: grid; gap: 4px; }
.slot .top { display: flex; justify-content: space-between; gap: 8px; }
.slot .player { font-weight: 750; }
.slot .lane { color: var(--muted); font-size: 11px; }
details { border: 1px solid var(--line); border-radius: 12px; background: #0d1119; padding: 8px; }
summary { cursor: pointer; color: var(--accent); }
.notice { margin: 0 0 10px; padding: 9px; border: 1px solid var(--line); border-radius: 11px; color: var(--yellow); background: rgba(241,199,91,.07); font-size: 12px; }
.reason { max-width: 360px; }
.loading, .error { padding: 24px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); }
@media (max-width: 760px) {
  body { overflow: auto; }
  .shell { min-height: 100vh; height: auto; padding: 10px; }
  .topbar { grid-template-columns: 1fr; gap: 10px; }
  .status { justify-self: stretch; text-align: left; }
  .tabs a, .button, .check, .input, select { min-height: 44px; }
  .layout-auction, .layout-snake { height: auto; display: grid; grid-template-columns: 1fr; }
  .panel { min-height: 420px; }
  .table-wrap { height: 560px; overflow: auto; }
  th, td { padding: 9px 8px; }
  .hide-mobile { display: none; }
  .snake-pos { display: none; }
  .snake-team { display: none; }
  .mobile-team { display: inline; color: var(--muted); font-size: 10px; }
  .snake-table { table-layout: fixed; }
  .snake-table th:nth-child(1) { width: 38px; }
  .snake-table th:nth-child(2) { width: 130px; }
  .snake-table th:nth-child(5) { width: 48px; }
  .snake-table th:nth-child(6) { width: 82px; }
  .snake-table th:nth-child(7) { width: 58px; }
  .snake-table th, .snake-table td { padding-left: 6px; padding-right: 6px; }
  .draft-btn { min-width: 48px; font-size: 0; }
  .draft-btn::after { content: "Draft"; font-size: 11px; }
  .draft-btn[aria-pressed="true"]::after { content: "Done"; }
}
