/* Pool HQ — minimalist system (Apple Sports calm + Linear precision). Team palette drives --accent. */
:root {
  --bg: #F4F5F7; --surface: #FFFFFF; --sunken: #ECEEF1; --ink: #0D1015; --ink-2: #3A404A; --muted: #6A7280; --line: #E3E6EB; --line-2: #D5D9E0;
  --good: #11875A; --warn: #B45309; --bad: #C8322B;
  --glass: rgb(255 255 255 / .74); --glass-line: rgb(15 20 30 / .08); --shadow: 0 10px 30px rgb(15 20 30 / .10), 0 2px 6px rgb(15 20 30 / .06);
  --c1: #AF1E2D; --c2: #192168; --accent: #AF1E2D; --accent-ink: #FFFFFF; --tint: #AF1E2D1A; --lg1: #AF1E2D; --lg2: #192168;
  --font: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif; --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #0A0C10; --surface: #13161C; --sunken: #0E1116; --ink: #EDEFF3; --ink-2: #C3C8D1; --muted: #8B93A0; --line: #20252E; --line-2: #2A303A;
    --good: #3DD68C; --warn: #F5B544; --bad: #FF6B63; --glass: rgb(22 26 33 / .74); --glass-line: rgb(255 255 255 / .08); --shadow: 0 12px 34px rgb(0 0 0 / .45), 0 2px 8px rgb(0 0 0 / .3); color-scheme: dark; }
}
* { box-sizing: border-box; }
html, body { background: var(--bg); overflow-x: hidden; }
body { margin: 0; color: var(--ink); font: 16px/1.45 var(--font); -webkit-font-smoothing: antialiased; letter-spacing: -.005em; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
h1, h2, h3 { margin: 0; letter-spacing: -.02em; text-wrap: balance; }
h2 { font-size: 22px; font-weight: 700; letter-spacing: -.025em; } h3 { font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 0 0 8px; }
.num, .r { font-variant-numeric: tabular-nums; } .num { font-family: var(--mono); letter-spacing: -.02em; }
.muted { color: var(--muted); } .small { font-size: 13px; } .tiny { font-size: 12px; } .warn { color: var(--bad); } .good { color: var(--good); }
.pad { padding: 16px 4px; } .mt { margin-top: 16px; } .nowrap { white-space: nowrap; }
.i { width: 20px; height: 20px; display: inline-block; flex-shrink: 0; vertical-align: middle; } .i svg { width: 100%; height: 100%; display: block; fill: currentColor; }

.wrap { max-width: 1120px; margin: 0 auto; padding-inline: 16px; padding-block: 0 120px; }
main { padding-top: 8px; }

/* header */
.top { position: sticky; top: 0; z-index: 20; margin-inline: -16px; padding: calc(env(safe-area-inset-top) + 12px) 16px 10px; display: flex; align-items: center; gap: 12px;
  background: color-mix(in srgb, var(--bg) 90%, transparent); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-bottom: .5px solid transparent; transition: border-color .2s; }
.top.scrolled { border-bottom-color: var(--line-2); }
.leaguemark { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--lg1); color: #fff; font: 700 11px var(--mono); }
.titles { flex: 1; min-width: 0; } .lname { font-weight: 650; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .season { font-size: 12px; color: var(--muted); }
.badges { display: flex; gap: 6px; } .pill { display: inline-flex; align-items: center; gap: 4px; font: 600 12px var(--mono); padding: 3px 8px; border-radius: 999px; background: var(--sunken); color: var(--muted); }
.pill .i { width: 13px; height: 13px; } .pill.human { color: var(--good); } .pill.ai { color: var(--warn); }
@media (max-width: 520px) { .top .badges { display: none; } }

/* dock */
.dock { position: fixed; left: 50%; bottom: calc(14px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 40; display: flex; gap: 2px; padding: 6px; border-radius: 30px;
  background: var(--glass); border: 1px solid var(--glass-line); box-shadow: var(--shadow); backdrop-filter: blur(22px) saturate(1.6); -webkit-backdrop-filter: blur(22px) saturate(1.6); }
.dock button { position: relative; width: 66px; height: 52px; border: 0; border-radius: 22px; background: none; color: var(--muted); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 10.5px; font-weight: 500; transition: color .2s; }
.dock button .i { width: 22px; height: 22px; } .dock button.on { color: var(--ink); } .dock button.on .i { color: var(--accent); }
.dock .dot { position: absolute; top: 8px; right: 17px; width: 8px; height: 8px; border-radius: 50%; background: var(--bad); box-shadow: 0 0 0 2px var(--surface); }
@media (max-width: 360px) { .dock button { width: 58px; } }

/* sheet */
.scrim { position: fixed; inset: 0; z-index: 50; background: rgb(8 10 14 / .38); opacity: 0; pointer-events: none; transition: opacity .25s; } .scrim.on, .scrim.open { opacity: 1; pointer-events: auto; }
.sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; max-height: 88%; overflow-y: auto; background: var(--surface); border-radius: 24px 24px 0 0; padding: 10px 16px calc(24px + env(safe-area-inset-bottom));
  transform: translateY(calc(100% + 60px)); transition: transform .32s cubic-bezier(.2,.8,.2,1); box-shadow: 0 -10px 40px rgb(0 0 0 / .2); }
@media (min-width: 700px) { .sheet { left: 50%; right: auto; width: 520px; margin-left: -260px; bottom: 24px; border-radius: 24px; } }
.sheet.on { transform: none; } .grab { width: 38px; height: 5px; border-radius: 3px; background: var(--line-2); margin: 0 auto 12px; }
.sheet-t { margin-bottom: 12px; } .sheet-foot { display: flex; justify-content: center; margin-top: 14px; }
.menu { display: flex; flex-direction: column; background: var(--sunken); border-radius: 16px; padding-inline: 14px; }
.menu button { display: flex; align-items: center; gap: 12px; padding: 13px 0; border: 0; border-top: .5px solid var(--line-2); background: none; text-align: left; }
.menu button:first-child { border-top: 0; } .menu button > div { flex: 1; } .menu button > .i:last-child { width: 16px; height: 16px; color: var(--muted); }

/* layout primitives */
.grid2 { display: grid; gap: 32px; grid-template-columns: 1fr; } @media (min-width: 900px) { .grid2 { grid-template-columns: 1.3fr 1fr; align-items: start; } }
.stack-lg { display: flex; flex-direction: column; gap: 32px; } .airy { margin-top: 8px; }
.sec-h { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 0 4px 10px; } .sec-h.sm { margin-top: 20px; } .sec-note { font-size: 13px; color: var(--muted); }
.group { background: var(--surface); border-radius: 16px; padding-inline: 16px; } .group.pad-y { padding-block: 4px; }
.li { display: grid; grid-template-columns: 22px 10px minmax(0, 1fr) auto auto; align-items: center; gap: 12px; min-height: 48px; padding-block: 10px; border-top: .5px solid var(--line-2); }
.li:first-child { border-top: 0; } .li.two { grid-template-columns: 28px minmax(0, 1fr) auto; } .li.two:has(.icon-btn) { grid-template-columns: 28px minmax(0, 1fr) auto auto; }
.li .rk { color: var(--muted); font-size: 14px; text-align: right; } .li .tname { font-weight: 500; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.li.me .tname, .li.me .li-val { color: var(--accent); font-weight: 650; }
.li-main { min-width: 0; } .li-right { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.li-val { font-size: 17px; font-weight: 600; } .li-val.neg { color: var(--bad); } .li-note { font-size: 13px; color: var(--muted); }
.pname { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .pname.big { font-size: 18px; font-weight: 650; }
.statline { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tdot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
.owner { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); white-space: nowrap; } .owner .tdot { width: 6px; height: 6px; }
.mult { font-size: 13px; font-weight: 700; color: var(--good); }
.logo { width: 28px; height: 28px; display: grid; place-items: center; } .logo img { width: 28px; height: auto; }
.seg-ios, .seg { display: flex; background: var(--sunken); border-radius: 10px; padding: 2px; margin-bottom: 10px; }
.seg-ios button, .seg button { flex: 1; height: 32px; border: 0; border-radius: 8px; background: none; font-size: 13px; font-weight: 500; color: var(--ink-2); white-space: nowrap; }
.seg-ios button.on, .seg button.on { background: var(--surface); color: var(--ink); font-weight: 600; box-shadow: 0 1px 3px rgb(0 0 0 / .12); }
.me-sum { padding: 4px 4px 0; } .me-h { display: flex; align-items: center; gap: 10px; } .me-name { flex: 1; font-size: 17px; font-weight: 650; }
.bignum { font-size: 64px; font-weight: 600; letter-spacing: -.05em; line-height: 1; margin: 14px 0 6px; }
.me-sub { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 15px; margin-bottom: 16px; } .dotsep { width: 3px; height: 3px; border-radius: 50%; background: var(--muted); }
.me-sum .group { margin-inline: -4px; }
.todo button { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 12px 0; border: 0; border-top: .5px solid var(--line-2); background: none; }
.todo button:first-child { border-top: 0; } .todo .grow { flex: 1; min-width: 0; } .todo b { font-weight: 550; } .todo .i:last-child { width: 16px; height: 16px; color: var(--muted); }
.foot { font-size: 13px; color: var(--muted); margin: 10px 4px 0; } .foot b { color: var(--ink); }

/* team badges */
.tb { --b1: var(--muted); --b2: var(--muted); width: 36px; height: 36px; border-radius: 11px; display: inline-grid; place-items: center; flex-shrink: 0; background: color-mix(in srgb, var(--b1) 12%, var(--surface)); }
.tb svg { width: 64%; height: 64%; } .tb .d { fill: var(--b2); opacity: .9; } .tb .p { fill: var(--b1); }
.tb.sm { width: 28px; height: 28px; border-radius: 9px; } .tb.lg { width: 52px; height: 52px; border-radius: 16px; }
.tb.mono { color: var(--b1); font: 700 11px var(--mono); }

/* controls */
input, select, textarea { height: 42px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--surface); padding: 0 12px; min-width: 0; }
button { border: 0; border-radius: 12px; background: var(--ink); color: var(--bg); padding: 0 14px; height: 40px; font-weight: 600; font-size: 14px; }
button.ghost, button.sm.ghost { background: var(--sunken); color: var(--ink); }
button.sm { height: 32px; padding: 0 12px; border-radius: 10px; font-size: 13px; }
button:disabled { opacity: .45; cursor: default; }
.btn.primary, button.go { background: var(--accent); color: var(--accent-ink); }
button.go { border-radius: 999px; padding: 0 22px; }
button.danger { background: var(--bad); color: #fff; }
button.icon { width: 34px; height: 34px; padding: 0; border-radius: 999px; background: var(--sunken); color: var(--muted); }
.icon-btn { width: 34px; height: 34px; padding: 0; border-radius: 10px; background: none; color: var(--accent); display: grid; place-items: center; }
button.star, button.dnd { background: none; height: auto; padding: 2px 3px; font-size: 16px; color: var(--line-2); font-weight: 400; }
button.star.on { color: #E6A700; } button.dnd.on { color: var(--bad); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
button.chip, span.chip { height: 32px; padding: 0 13px; border-radius: 999px; background: var(--sunken); color: var(--ink-2); font-size: 13px; font-weight: 500; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
button.chip.on { background: var(--ink); color: var(--bg); }
.row { display: flex; gap: 8px; align-items: center; margin: 8px 0; } .row.between { justify-content: space-between; }
.field { display: flex; flex-direction: column; gap: 5px; } .field label { font-size: 12px; color: var(--muted); font-weight: 500; }
.form2 { display: grid; grid-template-columns: 2fr 1fr; gap: 12px; margin: 16px 0 4px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.grid label { display: flex; flex-direction: column; gap: 5px; font-size: 12px; color: var(--muted); } .grid .wide { grid-column: 1 / -1; }
.actions { display: flex; justify-content: flex-end; margin-top: 20px; }
.toast { position: fixed; left: 50%; bottom: calc(92px + env(safe-area-inset-bottom)); transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 999px; font-size: 14px; font-weight: 500; z-index: 80; white-space: nowrap; max-width: 92vw; overflow: hidden; text-overflow: ellipsis; }
.toast.bad { background: var(--bad); color: #fff; }

/* sections, tables (league, draft lists) */
section { margin: 0 0 28px; }
section > h3 { margin: 0 4px 8px; }
.card { background: var(--surface); border-radius: 16px; padding: 14px 16px; margin-bottom: 14px; }
details.card > summary, details > summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; }
details > summary::-webkit-details-marker { display: none; }
details > summary::after { content: "›"; color: var(--muted); font-size: 18px; transform: rotate(90deg); transition: transform .15s; } details:not([open]) > summary::after { transform: none; }
details[open] > summary { margin-bottom: 6px; } details > summary h3 { margin: 0; }
table { width: 100%; border-collapse: collapse; } td, th { padding: 10px 6px; border-top: .5px solid var(--line-2); text-align: left; } tr:first-child td { border-top: 0; }
th { font-size: 11px; font-weight: 600; color: var(--muted); letter-spacing: .05em; text-transform: uppercase; border-top: 0; }
.r { text-align: right; } .num { color: inherit; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 8px; margin-bottom: 14px; }
.kpis div { background: var(--surface); border-radius: 14px; padding: 12px; } .kpis b { display: block; font: 600 22px var(--mono); } .kpis span { font-size: 12px; color: var(--muted); }
.tag { display: inline-flex; align-items: center; font-size: 11.5px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--sunken); color: var(--ink-2); } .tag.human { color: var(--accent); }
.badge { font: 600 10.5px var(--mono); padding: 1px 5px; border-radius: 5px; }
.pos-C { background: #3b82f624; color: #3b82f6; } .pos-LW { background: #10b98124; color: #0f9f71; } .pos-RW { background: #f59e0b26; color: #c77c05; } .pos-D { background: #8b5cf626; color: #8b5cf6; } .pos-G { background: #ef444424; color: #e0413e; }
.chem { background: color-mix(in srgb, var(--good) 16%, transparent); color: var(--good); border-radius: 6px; padding: 1px 6px; font-size: 12px; font-weight: 600; }
.stand td { padding: 11px 6px; } .mine-row td { color: var(--accent); font-weight: 600; } tr[data-night] { cursor: pointer; }
.slot { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 9px 0; border-top: .5px solid var(--line-2); font-size: 14px; }

/* draft room */
.sticky { position: sticky; top: calc(env(safe-area-inset-top) + 54px); z-index: 5; background: var(--bg); padding: 6px 0 8px; margin-bottom: 8px; }
.clock { display: flex; justify-content: space-between; align-items: center; gap: 12px; background: var(--surface); border-radius: 16px; padding: 12px 16px; margin-bottom: 8px; }
.clock h2 { margin-top: 2px; font-size: 20px; } .clock.mine { box-shadow: inset 0 0 0 2px var(--accent); } .clock-r { display: flex; align-items: center; gap: 8px; }
.timer { font: 600 30px var(--mono); } .timer.urgent { color: var(--bad); } .timer.idle { font: 500 13px var(--font); color: var(--muted); background: var(--sunken); border-radius: 999px; padding: 5px 12px; }
.strip { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--muted); padding: 2px 4px 6px; } .strip b { color: var(--ink); font: 600 14px var(--mono); }
.bar { height: 3px; background: var(--sunken); border-radius: 99px; overflow: hidden; margin: 0 4px 10px; } .bar i { display: block; height: 100%; background: var(--accent); } .bar i.hot { background: var(--bad); }
.layout.with-side { display: block; } .side { display: none; } .only-phone { display: block; } .only-desk { display: none; }
@media (min-width: 1000px) { .layout.with-side { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 24px; align-items: start; } .side { display: block; position: sticky; top: 220px; } .only-phone { display: none; } .only-desk { display: block; } }
.rec { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; align-items: center; padding: 10px 0; border-top: .5px solid var(--line-2); } .rec:first-of-type { border-top: 0; }
.rec .icons { display: flex; align-items: center; gap: 2px; }
.filters { display: flex; flex-direction: column; gap: 8px; margin-bottom: 8px; } .filters input { width: 100%; }
.scroll { overflow-x: auto; } .scroll.tall { max-height: none; }
table.list { background: var(--surface); border-radius: 16px; } table.list thead th { position: sticky; top: 0; background: var(--surface); }
table.list td.icons { white-space: nowrap; width: 1%; }
.sortable { cursor: pointer; user-select: none; } th.on { color: var(--ink); }
.dim { opacity: .38; }
.board { background: var(--surface); border-radius: 16px; } .board td, .board th { font-size: 11px; min-width: 76px; padding: 5px; border: .5px solid var(--line); vertical-align: top; }
.board td.cur { outline: 2px solid var(--accent); outline-offset: -2px; } .board th.me { color: var(--accent); }
.board .pos-C, .board .pos-LW, .board .pos-RW, .board .pos-D, .board .pos-G { color: inherit; }
.teamcard { margin-top: 10px; } .posgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin-top: 8px; }
.poscol { background: var(--surface); border-radius: 16px; padding: 12px 14px; } .poscol h3 { display: flex; align-items: center; gap: 6px; margin: 0; }
.scroll-x { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 6px; } .qa { white-space: nowrap; text-align: right; } .qa button { margin-left: 4px; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(360px, 88vw); background: var(--surface); padding: calc(env(safe-area-inset-top) + 12px) 16px 16px; transform: translateX(100%); transition: transform .22s ease; z-index: 61; overflow-y: auto; } .drawer.open { transform: none; }
@media (max-width: 999px) {
  table.list { table-layout: fixed; }
  table.list th:nth-child(1), table.list td:nth-child(1) { width: 46px; }
  table.list th:nth-child(3), table.list td:nth-child(3), table.list th:nth-child(4), table.list td:nth-child(4), table.list th:nth-child(8), table.list td:nth-child(8) { display: none; }
  table.list th:nth-child(5), table.list td:nth-child(5), table.list th:nth-child(6), table.list td:nth-child(6) { width: 44px; }
  table.list th:nth-child(7), table.list td:nth-child(7) { width: 66px; } table.list th:nth-child(9), table.list td:nth-child(9) { width: 64px; }
  table.list td:nth-child(2) { overflow-wrap: anywhere; } .posgrid { grid-template-columns: 1fr; } .scroll-x { flex-wrap: wrap; }
}

/* lineup */
.lu-head { padding-bottom: 8px; margin-bottom: 12px; } .lu-head .scroll-x { margin: 8px 0; }
.unit { background: var(--surface); border-radius: 18px; padding: 10px; margin-bottom: 10px; }
.unit-h { display: flex; align-items: center; gap: 8px; font: 600 12px var(--mono); color: var(--muted); padding: 0 4px 8px; } .unit-h .small { margin-left: auto; }
.unit-row { display: grid; gap: 6px; } .unit-row.three { grid-template-columns: repeat(3, minmax(0, 1fr)); } .unit-row.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.slotbtn { height: auto; display: flex; flex-direction: column; align-items: flex-start; gap: 1px; text-align: left; background: var(--sunken); color: var(--ink); border: 1.5px solid transparent; border-radius: 13px; padding: 8px 9px; min-width: 0; font-weight: 400; }
.slotbtn .pname { font-weight: 600; font-size: 14.5px; max-width: 100%; } .slotbtn .small { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11.5px; }
.slotlbl { font: 600 10px var(--mono); color: var(--muted); letter-spacing: .06em; }
.slotbtn.sel { border-color: var(--accent); background: var(--tint); } .slotbtn.offpos { border-style: dashed; border-color: color-mix(in srgb, var(--warn) 70%, transparent); }
.scratch { display: flex; justify-content: space-between; align-items: center; width: 100%; height: auto; background: var(--surface); color: var(--ink); border-radius: 0; border-top: .5px solid var(--line-2); padding: 12px 16px; text-align: left; font-weight: 400; }
.scratch:first-of-type { border-radius: 16px 16px 0 0; border-top: 0; } .scratch:last-of-type { border-radius: 0 0 16px 16px; } .scratch.target { background: var(--tint); }

/* GM */
.offer { border-top: .5px solid var(--line-2); padding: 12px 0; display: flex; flex-direction: column; gap: 4px; } .offer:first-of-type { border-top: 0; }
.tradegrid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; } @media (max-width: 700px) { .tradegrid { grid-template-columns: 1fr; } }
.pickrow { display: flex; gap: 8px; align-items: baseline; padding: 8px 0; border-top: .5px solid var(--line-2); font-size: 14px; } .pickrow input { height: auto; flex-shrink: 0; }
.preview { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; background: var(--sunken); border-radius: 12px; padding: 12px; margin: 12px 0; font-size: 14px; }
#tmsg { width: 100%; margin-bottom: 8px; } select.dropsel { max-width: 130px; font-size: 12px; height: 32px; padding: 0 6px; }
@media (max-width: 600px) { select.dropsel { max-width: 96px; } }

/* identity pickers */
.icongrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(48px, 1fr)); gap: 6px; }
.icongrid button { aspect-ratio: 1; height: auto; padding: 0; border-radius: 12px; display: grid; place-items: center; background: var(--surface); border: 1.5px solid transparent; }
.icongrid button svg { width: 60%; height: 60%; } .icongrid .d { fill: var(--c2); opacity: .9; } .icongrid .p { fill: var(--c1); } .icongrid button.on { border-color: var(--accent); background: var(--tint); }
.teamgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 6px; }
.tsw { height: auto; border-radius: 12px; padding: 7px; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; background: var(--surface); color: var(--ink); border: 1.5px solid transparent; font-weight: 400; }
.tsw .bars { display: flex; height: 18px; width: 100%; border-radius: 6px; overflow: hidden; box-shadow: inset 0 0 0 1px var(--line); } .tsw .bars i { flex: 1; }
.tsw .ab { font: 600 11.5px var(--mono); } .tsw.on { border-color: var(--ink); }

/* commissioner danger zone */
.danger-zone { border: 1px solid color-mix(in srgb, var(--bad) 50%, transparent); border-radius: 16px; padding: 0 14px; margin-top: 32px; background: var(--surface); }
.danger-zone summary { padding: 14px 0; color: var(--bad); font-weight: 600; }
.dz-item { display: flex; gap: 12px; justify-content: space-between; align-items: center; border-top: .5px solid var(--line-2); padding: 12px 0; }
.dz-item.col { flex-direction: column; align-items: stretch; } .dz-item p { margin: 2px 0 0; font-size: 13px; } .dz-item button { flex-shrink: 0; }
pre { white-space: pre-wrap; font: 12px var(--mono); }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* fixes: header clear of the status bar, lower dock, legible text on transparent buttons */
.top { padding-top: calc(env(safe-area-inset-top) + 22px); backdrop-filter: none; -webkit-backdrop-filter: none; background: var(--bg); }
.top.scrolled { background: color-mix(in srgb, var(--bg) 94%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.dock { bottom: calc(env(safe-area-inset-bottom) * .45 + 8px); }
.menu button, .todo button, .scratch, .tsw, .icongrid button, .slotbtn { color: var(--ink); }
.menu button b { font-weight: 600; }
.sheet { color: var(--ink); }

/* sign-in */
body.signed-out .top, body.signed-out .dock { display: none; }
.welcome { max-width: 440px; margin: 0 auto; padding: calc(env(safe-area-inset-top) + 56px) 4px 40px; display: flex; flex-direction: column; gap: 14px; }
.w-mark { width: 48px; height: 48px; border-radius: 14px; background: var(--lg1); color: #fff; display: grid; place-items: center; font: 700 15px var(--mono); margin-bottom: 18px; }
.w-title { font-size: 30px; font-weight: 700; letter-spacing: -.03em; } .w-sub { margin: -6px 0 8px; color: var(--muted); font-size: 16px; }
.w-form { display: flex; flex-direction: column; gap: 12px; } .w-form .field span { font-size: 13px; color: var(--muted); } .w-form input { height: 50px; font-size: 17px; border-radius: 14px; }
.w-go { height: 50px; border-radius: 14px; font-size: 16px; }
.w-back { align-self: flex-start; display: inline-flex; align-items: center; gap: 2px; background: none; color: var(--accent); padding: 0; height: auto; font-weight: 500; }
.w-back .i { transform: rotate(180deg); width: 16px; height: 16px; }
.w-link { background: none; color: var(--accent); height: auto; padding: 6px 0; font-weight: 500; align-self: center; } .w-note { color: var(--muted); font-size: 13px; text-align: center; }
.w-team { display: flex; align-items: center; gap: 14px; margin-bottom: 6px; } .w-team .w-sub { margin: 2px 0 0; }
button.li.pick { width: 100%; height: auto; background: none; color: var(--ink); border-radius: 0; padding-inline: 0; text-align: left; font-weight: 400; grid-template-columns: 28px minmax(0, 1fr) auto; }
button.li.pick .i { width: 16px; height: 16px; color: var(--muted); }
.sheet-me { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 14px; padding: 0 4px; font-size: 13px; color: var(--muted); } .sheet-me b { color: var(--ink); }
.li.mem { grid-template-columns: 28px minmax(0, 1fr) auto; } .li.mem .acts { display: flex; gap: 6px; }
.invite-box { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 12px 0; } .invite-box > div { background: var(--sunken); border-radius: 12px; padding: 12px; }
.invite-box b { display: block; font-size: 20px; margin-top: 4px; }
.pool-id { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: var(--surface); border-radius: 16px; padding: 12px 16px; margin: 12px 0 6px; }
.pool-id b { display: block; font-size: 24px; letter-spacing: .08em; margin-top: 2px; }
.icon-tabs { overflow-x: auto; } .icon-tabs button { flex: 0 0 auto; padding: 0 12px; }
/* creation wizard */
.w-steps { display: flex; gap: 4px; } .w-steps i { flex: 1; height: 3px; border-radius: 2px; background: var(--line-2); } .w-steps i.on { background: var(--accent); }
.eyebrow-s { margin: 0; font-size: 12px; color: var(--muted); letter-spacing: .06em; text-transform: uppercase; }
.w-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; } .w-grid.four { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); } .w-grid.five { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.w-grid input { width: 100%; } .w-h { margin: 8px 0 -4px; }
.w-toggle { display: flex; align-items: center; gap: 10px; font-size: 15px; padding: 6px 0; } .w-toggle input { width: 20px; height: 20px; accent-color: var(--accent); }
.w-note.left { text-align: left; margin: -4px 0 0; }
.review .li.rv { grid-template-columns: 1fr; min-height: 0; } .pname.wrap { white-space: normal; }
.w-form select { height: 50px; border-radius: 14px; font-size: 16px; }
/* review step */
.rv { display: flex; flex-direction: column; gap: 10px; }
.rv-sec { background: var(--surface); border-radius: 16px; padding: 12px 14px; }
.rv-h { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.rv-h span { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
button.rv-edit { background: none; color: var(--accent); height: auto; padding: 0; font-size: 13px; font-weight: 500; }
.rv dl { display: grid; grid-template-columns: minmax(80px, auto) 1fr; gap: 6px 14px; margin: 0; font-size: 14.5px; align-items: baseline; }
.rv dt { color: var(--muted); white-space: nowrap; } .rv dd { margin: 0; text-align: right; min-width: 0; } .rv dt:empty { display: none; } .rv dt:empty + dd { grid-column: 1 / -1; text-align: left; }
.rv-sw { display: inline-flex; margin-right: 6px; vertical-align: -2px; } .rv-sw i { width: 12px; height: 12px; border-radius: 3px; margin-left: 2px; box-shadow: inset 0 0 0 1px var(--line); }
.rv-abbr { font: 600 12px var(--mono); background: var(--sunken); border-radius: 6px; padding: 1px 6px; margin-left: 4px; }
.rv-chip { font: 500 12.5px var(--mono); background: var(--sunken); border-radius: 6px; padding: 1px 6px; margin-left: 4px; }
.rv-score { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.rv-score span { background: var(--sunken); border-radius: 8px; padding: 5px 7px; font: 600 13px var(--mono); display: flex; justify-content: space-between; } .rv-score em { font-style: normal; color: var(--muted); font-weight: 500; }
.w-grid.team { grid-template-columns: 1fr 96px; } .w-grid.team input#cabbr { text-transform: uppercase; font-family: var(--mono); letter-spacing: .1em; }
#idAbbr { text-transform: uppercase; font-family: var(--mono); letter-spacing: .1em; }
/* commissioner panel */
.cm { display: flex; flex-direction: column; gap: 0; }
.cm-head { display: flex; align-items: center; justify-content: space-between; margin: 4px 4px 18px; }
.phase { font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px; background: var(--sunken); color: var(--ink-2); }
.phase.pre { color: var(--warn); } .phase.draft { color: var(--bad); } .phase.season { color: var(--good); }
.cm .sec-h h2.sm { font-size: 17px; }
button.setrow { width: 100%; height: auto; background: none; color: var(--ink); border-radius: 0; padding-inline: 0; text-align: left; font-weight: 400; grid-template-columns: 30px minmax(0, 1fr) auto; }
button.setrow:not(:has(.set-ic)):not(:has(.tb)) { grid-template-columns: minmax(0, 1fr) auto; }
button.setrow:disabled { opacity: .4; }
.set-ic { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; background: var(--sunken); color: var(--accent); } .set-ic .i { width: 18px; height: 18px; }
.set-val { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 14px; white-space: nowrap; max-width: 46vw; overflow: hidden; text-overflow: ellipsis; }
.set-val .i { width: 15px; height: 15px; }
.danger-row .set-ic { color: var(--bad); } .danger-t { color: var(--bad); }
.cm-title { margin: 8px 4px 16px; font-size: 26px; }
.lock-note { display: flex; align-items: center; gap: 12px; background: var(--sunken); border-radius: 14px; padding: 12px 14px; margin-bottom: 16px; } .lock-note > div { flex: 1; } .lock-note .i { color: var(--warn); }
.ck .ck-dot { width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--line-2); display: grid; place-items: center; } .ck .ck-dot.ok { background: var(--good); border-color: var(--good); color: #fff; } .ck .ck-dot .i { width: 13px; height: 13px; }
.li.ck { grid-template-columns: 24px minmax(0, 1fr); }
.wide-btn { width: 100%; height: 48px; border-radius: 14px; margin-top: 12px; }
.ctl-row { display: flex; gap: 8px; margin: 10px 0; } .ctl-row > button { flex: 1; }
.field.inline { flex-direction: row; align-items: center; justify-content: space-between; background: var(--surface); border-radius: 14px; padding: 8px 8px 8px 14px; } .field.inline input { width: 80px; }
.appr { padding: 12px 0; border-top: .5px solid var(--line-2); display: flex; flex-direction: column; gap: 4px; } .appr:first-child { border-top: 0; }
.appr-h { display: flex; align-items: center; gap: 8px; font-size: 14px; } .appr-h .tag { margin-left: auto; }
label.toggle-row { grid-template-columns: minmax(0, 1fr) auto; cursor: pointer; } .statline.wrap { white-space: normal; }
input.switch { appearance: none; -webkit-appearance: none; width: 51px; height: 31px; border-radius: 999px; background: var(--line-2); position: relative; border: 0; padding: 0; cursor: pointer; transition: background .2s; flex-shrink: 0; }
input.switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%; background: #fff; box-shadow: 0 2px 4px rgb(0 0 0 / .2); transition: transform .2s; }
input.switch:checked { background: var(--good); } input.switch:checked::after { transform: translateX(20px); }
h2.sm { font-size: 17px; }

/* desktop sidebar (dock stays on phones/narrow windows) */
.sidenav { display: none; }
@media (min-width: 1000px) {
  .dock { display: none; }
  .top { display: none; }
  .sidenav { display: flex; flex-direction: column; gap: 4px; position: fixed; top: 0; left: 0; bottom: 0; width: 248px; z-index: 30; padding: 22px 14px 16px;
    background: var(--surface); border-right: .5px solid var(--line-2); overflow-y: auto; }
  .wrap { margin-left: 248px; max-width: none; padding-inline: 40px; padding-block: 28px 48px; }
  main { max-width: 1120px; margin: 0 auto; }
  .sticky { top: 0; }
  .toast { bottom: 28px; }
  .sn-brand { display: flex; align-items: center; gap: 10px; padding: 0 8px 18px; }
  .sn-brand .lname { font-size: 15px; } .sn-brand .season { font-size: 12px; color: var(--muted); }
  .sn-group { display: flex; flex-direction: column; gap: 2px; }
  .sn-label { font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 18px 10px 6px; }
  button.sn-item { position: relative; display: flex; align-items: center; gap: 12px; width: 100%; height: 38px; padding: 0 10px; border-radius: 9px; background: none; color: var(--ink-2); font-size: 14.5px; font-weight: 500; text-align: left; }
  button.sn-item .i { width: 19px; height: 19px; color: var(--muted); }
  button.sn-item:hover { background: var(--sunken); }
  button.sn-item.on { background: var(--tint); color: var(--ink); font-weight: 600; } button.sn-item.on .i { color: var(--accent); }
  .sn-item .dot { position: absolute; right: 12px; top: 50%; margin-top: -4px; width: 8px; height: 8px; border-radius: 50%; background: var(--bad); }
  .sn-foot { margin-top: auto; display: flex; flex-direction: column; gap: 10px; padding: 14px 6px 0; border-top: .5px solid var(--line-2); }
  .sn-me { display: flex; align-items: center; gap: 10px; font-size: 14px; } .sn-me b { font-weight: 600; }
  body.signed-out .sidenav { display: none; } body.signed-out .wrap { margin-left: 0; }
}

/* home v3: team card, roster first, league on the right */
.team-card { position: relative; overflow: hidden; border-radius: 22px; padding: 18px; margin: 4px 0 28px; color: #fff;
  background: radial-gradient(120% 120% at 100% 0%, color-mix(in srgb, var(--tc2) 55%, transparent), transparent 60%), linear-gradient(150deg, var(--tc1), color-mix(in srgb, var(--tc1) 72%, #000)); }
.tc-top { display: flex; align-items: center; gap: 14px; } .tc-top .tb { background: rgb(255 255 255 / .95); }
.tc-name { flex: 1; min-width: 0; } .tc-name h1 { font-size: 24px; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .tc-name span { font-size: 13px; opacity: .8; }
.tc-rank { text-align: right; } .tc-rank b { display: block; font-size: 34px; line-height: 1; font-weight: 600; } .tc-rank span { font-size: 12px; opacity: .8; }
.tc-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 16px; }
.tc-stats > div { background: rgb(255 255 255 / .13); border-radius: 12px; padding: 10px 12px; } .tc-stats b { display: block; font-size: 22px; font-weight: 600; letter-spacing: -.03em; } .tc-stats span { font-size: 11.5px; opacity: .8; }
.tc-duo { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
.tc-duo > div { background: rgb(0 0 0 / .16); border-radius: 12px; padding: 8px 12px; display: grid; grid-template-columns: 1fr auto; gap: 0 8px; align-items: baseline; min-width: 0; }
.tc-duo span { grid-column: 1 / -1; font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; opacity: .75; } .tc-duo b { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .tc-duo em { font-style: normal; font-weight: 600; font-size: 14px; }
@media (max-width: 600px) { .tc-stats { grid-template-columns: 1fr 1fr; } .tc-stats b { font-size: 20px; } }
.home-grid { display: grid; gap: 32px; grid-template-columns: 1fr; } .home-main, .home-side { display: flex; flex-direction: column; gap: 28px; min-width: 0; }
.home-main section, .home-side section { margin: 0; }
@media (min-width: 900px) { .home-grid { grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); align-items: start; } }
.units { display: grid; gap: 12px; grid-template-columns: 1fr; } @media (min-width: 1200px) { .units { grid-template-columns: 1fr 1fr; } }
.unit-card .uc-h { display: flex; align-items: center; gap: 8px; margin: 0 4px 6px; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.unit-card .uc-t { margin-left: auto; font-size: 13px; color: var(--ink); letter-spacing: 0; }
.li.rp { min-height: 52px; } .li.rp .badge { font-size: 9.5px; vertical-align: 1px; }
.scratches { margin-top: 12px; } .scratches summary { margin: 0 4px 6px; }
button.link-btn { background: none; color: var(--accent); height: auto; padding: 0; font-size: 14px; font-weight: 500; display: inline-flex; align-items: center; gap: 2px; } button.link-btn .i { width: 14px; height: 14px; }
.neg-t { color: var(--bad); }
.night-box { background: none; } .night-box > summary { margin: 0 4px 10px; } .night-box > summary h3 { margin: 0; }
/* home roster: units read left to right */
.units { grid-template-columns: 1fr; } @media (min-width: 1200px) { .units { grid-template-columns: 1fr; } }
.ptiles { display: grid; gap: 6px; } .ptiles.n3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .ptiles.n2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ptile { background: var(--surface); border-radius: 14px; padding: 10px 10px 9px; min-width: 0; display: flex; flex-direction: column; }
.ptile.empty { opacity: .45; min-height: 96px; }
.pt-top { display: flex; align-items: center; justify-content: space-between; } .pt-top .logo, .pt-top .logo img { width: 22px; height: 22px; }
.pt-slot { font: 600 10.5px var(--mono); color: var(--muted); letter-spacing: .05em; }
.pt-name { font-weight: 650; font-size: 15px; margin-top: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pt-first { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pt-foot { display: flex; align-items: baseline; justify-content: space-between; gap: 6px; margin-top: 8px; }
.pt-foot b { font-size: 19px; font-weight: 600; letter-spacing: -.03em; } .pt-foot span { font-size: 11px; color: var(--muted); white-space: nowrap; }
@media (max-width: 420px) { .pt-foot { flex-direction: column; gap: 0; } .pt-foot b { font-size: 17px; } .ptile { padding: 9px 8px 8px; } }
.team-card.sm { margin-top: 12px; } .team-card.sm .tc-stats { margin-top: 14px; }
button.lg-row { grid-template-columns: 22px 28px minmax(0, 1fr) auto; } button.lg-row.me .pname, button.lg-row.me .li-val { color: var(--accent); font-weight: 650; }
.rv-score.lg { grid-template-columns: repeat(4, minmax(0, 1fr)); } .rv-score.lg span { background: var(--surface); padding: 8px 10px; }
/* lineup editor tiles (same component as home) */
button.ptile.slotbtn { height: auto; align-items: stretch; text-align: left; font-weight: 400; background: var(--surface); color: var(--ink); border: 1.5px solid transparent; }
button.ptile.slotbtn.sel { border-color: var(--accent); background: var(--tint); }
button.ptile.slotbtn.offpos { border-style: dashed; border-color: color-mix(in srgb, var(--warn) 70%, transparent); }
button.scratch-row.target { background: var(--tint); }
.lu-head .sec-h { margin-bottom: 6px; } .lu-head .strip { padding: 4px 4px 8px; }
.li.fa-row { grid-template-columns: 28px minmax(0, 1fr) auto; } .fa-act { display: flex; align-items: center; gap: 10px; }
.fa-act select.dropsel { width: 40px; max-width: 40px; height: 34px; padding: 0; text-align: center; border-radius: 10px; background: var(--tint); color: var(--accent); border: 0; font-weight: 700; appearance: none; -webkit-appearance: none; text-align-last: center; }
.gm-wrap .card h3 { margin-bottom: 6px; }
.group button.li.two.lg-row { grid-template-columns: 22px 28px minmax(0, 1fr) auto; }
.group .li.kv-row { grid-template-columns: minmax(0, 1fr); min-height: 0; padding-block: 9px; }
.group .li.kv-row .pname { white-space: normal; }

/* draft room v2 */
.dclock { display: flex; align-items: center; justify-content: space-between; gap: 12px; border-radius: 20px; padding: 14px 16px; margin-bottom: 10px; color: var(--ink); background: var(--surface); }
.dclock.live { color: #fff; background: radial-gradient(120% 120% at 100% 0%, color-mix(in srgb, var(--tc2) 55%, transparent), transparent 60%), linear-gradient(150deg, var(--tc1), color-mix(in srgb, var(--tc1) 72%, #000)); }
.dclock.mine { box-shadow: 0 0 0 3px var(--accent); }
.dc-l { min-width: 0; } .dc-eyebrow { font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; opacity: .8; }
.dc-team { display: flex; align-items: center; gap: 10px; margin-top: 4px; min-width: 0; } .dc-team h2 { font-size: 21px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: inherit; }
.dclock.live .tb { background: rgb(255 255 255 / .95); }
.dc-you { font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 999px; background: #fff; color: var(--tc1); white-space: nowrap; }
.dclock .timer { font-size: 34px; color: inherit; } .dclock .timer.urgent { color: #fff; animation: blink 1s steps(2) infinite; } @keyframes blink { 50% { opacity: .45; } }
.dstats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin-bottom: 8px; }
.dstats > div { background: var(--surface); border-radius: 12px; padding: 8px 10px; min-width: 0; } .dstats b { display: block; font-size: 16px; font-weight: 600; white-space: nowrap; } .dstats b small { font-size: 11px; color: var(--muted); }
.dstats span { font-size: 10.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.sticky .seg-ios { margin-bottom: 0; }
.li.drow { grid-template-columns: 28px minmax(0, 1fr) auto auto; gap: 10px; }
.d-val { text-align: right; min-width: 38px; } .d-val b { display: block; font-size: 17px; font-weight: 600; } .d-val span { font-size: 9.5px; color: var(--muted); letter-spacing: .05em; }
.d-act { display: flex; align-items: center; gap: 2px; } .d-act button.sm { margin-left: 4px; }
.rec-why { font-weight: 500; color: var(--good); }
.sort-chips { align-items: center; } .sort-chips .chip { height: 28px; padding: 0 10px; font-size: 12px; }
.round-box { margin-bottom: 12px; } .round-box > summary { margin: 0 4px 8px; }
.posgrid section { margin: 0; } .posgrid .sec-h h3 { display: flex; align-items: center; gap: 6px; margin: 0; }
.drawer .sec-h { margin-bottom: 12px; }
@media (max-width: 520px) {
  .dstats b { font-size: 14px; } .li.drow { grid-template-columns: 24px minmax(0, 1fr) auto; } .li.drow .d-act { grid-column: 2 / -1; justify-content: flex-end; margin-top: -4px; }
  .li.drow .d-act:empty { display: none; }
}

/* Apple Sports / database look: calm team header + box-score roster */
.team-head { background: var(--surface); border-radius: 18px; padding: 16px; margin: 4px 0 24px; box-shadow: inset 3px 0 0 var(--tc1); }
.th-top { display: flex; align-items: center; gap: 10px; } .th-name { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.th-name b { font-size: 16px; font-weight: 650; } .th-name span { font-size: 12.5px; color: var(--muted); }
.th-rank { font-size: 13px; color: var(--muted); } .th-rank b { font-size: 22px; color: var(--ink); font-weight: 600; }
.th-big { font-size: 48px; font-weight: 600; letter-spacing: -.045em; line-height: 1; margin-top: 16px; } .th-sub { font-size: 13px; color: var(--muted); margin-top: 4px; }
.th-cols { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 16px; border-top: .5px solid var(--line-2); padding-top: 12px; gap: 8px; }
.th-cols > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; } .th-cols span { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.th-cols b { font-size: 17px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .th-cols em { font-style: normal; color: var(--muted); font-size: 13px; }
@media (max-width: 520px) { .th-cols { grid-template-columns: 1fr 1fr; row-gap: 12px; } }
.boxscore { background: var(--surface); border-radius: 16px; padding: 4px 14px 8px; overflow-x: auto; }
.boxscore table { width: 100%; border-collapse: collapse; font-size: 14px; }
.boxscore th { font-size: 11px; font-weight: 500; color: var(--muted); text-transform: none; letter-spacing: 0; padding: 10px 6px 6px; text-align: left; }
.boxscore th.num, .boxscore td.num { text-align: right; font-family: var(--mono); font-variant-numeric: tabular-nums; }
.boxscore td { padding: 7px 6px; border-top: .5px solid var(--line); vertical-align: middle; }
.boxscore td.strong { font-weight: 600; color: var(--ink); }
.boxscore tr.grp td { padding: 14px 6px 4px; border-top: 0; font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.boxscore tr.grp td.num { font-size: 12px; letter-spacing: 0; color: var(--ink-2); }
.boxscore tr.grp + tr td { border-top: 0; }
.c-slot { width: 34px; font: 600 11px var(--mono); color: var(--muted); white-space: nowrap; } .c-slot i { font-style: normal; color: var(--warn); margin-left: 3px; }
.c-name { display: flex; align-items: center; gap: 8px; min-width: 0; } .c-name .logo, .c-name .logo img { width: 20px; height: 20px; }
.c-name > span { display: flex; flex-direction: column; min-width: 0; } .c-name b { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .c-name em { font-style: normal; font-size: 11px; color: var(--muted); }
@media (max-width: 520px) { .boxscore .opt { display: none; } .boxscore { padding-inline: 10px; } .boxscore td, .boxscore th { padding-inline: 4px; } .c-name em { display: none; } }
.team-card.sm { background: var(--surface); color: var(--ink); box-shadow: inset 3px 0 0 var(--tc1); }
.team-card.sm .tc-name h1 { color: var(--ink); font-size: 20px; } .team-card.sm .tc-name span, .team-card.sm .tc-rank span, .team-card.sm .tc-stats span { color: var(--muted); opacity: 1; }
.team-card.sm .tb { background: color-mix(in srgb, var(--b1) 12%, var(--surface)); }
.team-card.sm .tc-stats { border-top: .5px solid var(--line-2); padding-top: 12px; } .team-card.sm .tc-stats > div { background: none; padding: 0; }
/* line chart table: one unit per row, players left to right */
.boxscore { padding: 6px 12px 10px; }
table.lines { width: 100%; border-collapse: collapse; table-layout: fixed; margin-top: 6px; }
table.lines thead th { font-size: 11px; font-weight: 600; color: var(--muted); letter-spacing: .05em; padding: 10px 6px 6px; text-align: left; text-transform: uppercase; }
table.lines th.lh { width: 26px; font: 600 11px var(--mono); color: var(--muted); text-align: left; padding-left: 2px; vertical-align: middle; }
table.lines thead th.lh { width: auto; } table.lines thead tr th:first-child { width: 26px; }
table.lines thead th:first-child { white-space: nowrap; overflow: visible; }
table.lines th.num, table.lines td.num { text-align: right; width: 52px; }
table.lines td { border-top: .5px solid var(--line); padding: 8px 6px; vertical-align: top; min-width: 0; }
table.lines td.lc + td.lc { border-left: .5px solid var(--line); }
table.lines td.lt { font: 600 14px var(--mono); vertical-align: middle; color: var(--ink-2); }
.lc-top { display: flex; align-items: center; gap: 6px; min-width: 0; } .lc-top .logo, .lc-top .logo img { width: 18px; height: 18px; flex-shrink: 0; }
.lc-top b { font-weight: 550; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; } .lc-top i { font: normal 600 10px var(--mono); color: var(--warn); }
.lc-num { display: flex; align-items: baseline; gap: 6px; margin-top: 3px; padding-left: 24px; } .lc-num .strong { font-size: 15px; font-weight: 600; } .lc-num span:not(.strong) { font-size: 11px; }
.scr { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: baseline; border-top: .5px solid var(--line); margin-top: 8px; padding: 10px 2px 2px; font-size: 13px; }
.scr > span:first-child { font-size: 11px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); width: 100%; }
.scr-p i { font: normal 600 10px var(--mono); color: var(--muted); } .scr-p b { font-weight: 600; margin-left: 2px; }
@media (max-width: 520px) {
  .boxscore { padding-inline: 8px; } table.lines td { padding: 7px 4px; } table.lines th.num, table.lines td.num { width: 40px; } table.lines td.lt { font-size: 12.5px; }
  .lc-top .logo { display: none; } .lc-num { padding-left: 0; } .lc-top b { font-size: 13px; } .lc-num .strong { font-size: 14px; }
}
table.lines caption { text-align: left; font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); padding: 12px 2px 0; }
table.lines thead th { padding-top: 6px; }
.boxscore.roster table { width: 100%; border-collapse: collapse; }
.boxscore.roster tr.grp td { padding-top: 14px; }
.w-link.left { align-self: flex-start; padding-left: 0; }
.roster-filter { margin-bottom: 8px; } .roster-filter .chip .muted { font-size: 11px; margin-left: 2px; } .roster-filter .chip.on .muted { color: var(--bg); opacity: .7; }
.boxscore.roster th.sortable { cursor: pointer; user-select: none; } .boxscore.roster th.on { color: var(--ink); }
.boxscore.roster .c-name b .badge { font-size: 9.5px; vertical-align: 1px; }
.boxscore.roster tr.tot td { border-top: .5px solid var(--line-2); font-size: 12px; color: var(--muted); padding-top: 10px; }
.c-name .badge { display: inline; padding: 1px 5px; }
/* standing as the headline */
.th-standing { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 20px; align-items: center; margin-top: 12px; }
.th-rankbig .rb-line { display: flex; align-items: flex-start; gap: 2px; line-height: 1; }
.th-rankbig .rb-line b { font-size: 72px; font-weight: 600; letter-spacing: -.06em; }
.th-rankbig sup { font-size: 22px; font-weight: 600; margin-top: 8px; color: var(--ink-2); }
.mv { font: 600 13px var(--mono); padding: 3px 7px; border-radius: 999px; margin: 10px 0 0 10px; align-self: flex-start; }
.mv.up { color: var(--good); background: color-mix(in srgb, var(--good) 14%, transparent); } .mv.down { color: var(--bad); background: color-mix(in srgb, var(--bad) 14%, transparent); }
.th-rankbig .th-sub { margin-top: 6px; font-size: 13.5px; } .th-rankbig .th-sub b { color: var(--ink); font-weight: 600; }
.th-near { display: flex; flex-direction: column; border-left: .5px solid var(--line-2); padding-left: 16px; min-width: 0; }
.nr { display: grid; grid-template-columns: 20px 10px minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 5px 0; font-size: 14px; color: var(--ink-2); }
.nr .rk { color: var(--muted); font-size: 12px; text-align: right; } .nr .nm { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .nr .gp { font-size: 13px; color: var(--muted); }
.nr.me { color: var(--ink); font-weight: 650; } .nr.me .gp { color: var(--ink); font-weight: 600; }
@media (max-width: 520px) { .th-standing { grid-template-columns: 1fr; gap: 12px; } .th-near { border-left: 0; padding-left: 0; border-top: .5px solid var(--line-2); padding-top: 8px; } .th-rankbig .rb-line b { font-size: 64px; } }
.th-recs { display: flex; flex-direction: column; border-left: .5px solid var(--line-2); padding-left: 16px; min-width: 0; }
.th-recs-h { font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
button.rc { display: grid; grid-template-columns: 28px minmax(0, 1fr) 14px; align-items: center; gap: 10px; width: 100%; height: auto; padding: 8px 0; background: none; color: var(--ink); border-radius: 0; text-align: left; font-weight: 400; border-top: .5px solid var(--line); }
.th-recs-h + .rc { border-top: 0; }
.rc-ic { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; background: var(--sunken); color: var(--accent); } .rc-ic .i { width: 15px; height: 15px; }
.rc-ic.good { color: var(--good); } .rc-ic.warn { color: var(--warn); }
.rc-t { display: flex; flex-direction: column; min-width: 0; } .rc-t b { font-weight: 550; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .rc-t b i { font: normal 600 10px var(--mono); color: var(--muted); }
.rc-t em { font-style: normal; font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } button.rc > .i { width: 14px; height: 14px; color: var(--muted); }
@media (max-width: 520px) { .th-recs { border-left: 0; padding-left: 0; border-top: .5px solid var(--line-2); padding-top: 8px; } }
/* VORP explainer */
.vi-steps { margin: 14px 0; padding-left: 0; list-style: none; display: flex; flex-direction: column; gap: 12px; }
.vi-steps li { display: flex; flex-direction: column; gap: 4px; } .vi-steps b { font-size: 15px; } .vi-steps span { font-size: 14px; color: var(--ink-2); }
.vi-w { margin-top: 6px; } .vi-w span { background: var(--sunken); }
.vi-t { width: 100%; border-collapse: collapse; margin-top: 6px; font-size: 13.5px; } .vi-t th { font-size: 11px; color: var(--muted); font-weight: 500; text-transform: none; letter-spacing: 0; padding: 4px 6px; } .vi-t td { padding: 6px; border-top: .5px solid var(--line); }
.vi-t .num { text-align: right; font-family: var(--mono); }
.vi-ex { background: var(--sunken); border-radius: 12px; padding: 12px; margin: 6px 0 10px; display: flex; flex-direction: column; gap: 4px; } .vi-ex .num { font-size: 14px; }
.info-chip { color: var(--accent) !important; } .sec-actions { display: inline-flex; gap: 14px; }
.adp { font-family: var(--mono); font-weight: 600; color: var(--ink-2); }
.legal-note { margin: 2px 4px 0; }
.needs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 8px; }
button.need { height: 28px; padding: 0 10px; border-radius: 999px; background: color-mix(in srgb, var(--warn) 14%, transparent); color: var(--warn); font-size: 12.5px; font-weight: 600; }
button.need b { font-weight: 600; } button.need.ok { background: color-mix(in srgb, var(--good) 14%, transparent); color: var(--good); }
button.need.on { box-shadow: inset 0 0 0 1.5px currentColor; }
.need-sum { margin-left: auto; font-size: 12px; color: var(--muted); white-space: nowrap; }
@media (max-width: 520px) { .need-sum { width: 100%; margin-left: 2px; } }
/* under = yellow, exact = green, one over = blue, more = red */
button.need.under { background: color-mix(in srgb, #eab308 18%, transparent); color: #ca8a04; }
button.need.ok { background: color-mix(in srgb, var(--good) 16%, transparent); color: var(--good); }
button.need.plus1 { background: color-mix(in srgb, #3b82f6 16%, transparent); color: #3b82f6; }
button.need.over { background: color-mix(in srgb, var(--bad) 16%, transparent); color: var(--bad); }
@media (prefers-color-scheme: dark) { button.need.under { color: #facc15; } button.need.plus1 { color: #60a5fa; } }
/* pull to refresh */
.ptr { position: fixed; top: calc(env(safe-area-inset-top) + 6px); left: 50%; transform: translate(-50%, 0); z-index: 90; width: 34px; height: 34px; border-radius: 50%;
  background: var(--surface); box-shadow: var(--shadow); display: grid; place-items: center; opacity: 0; transition: transform .2s, opacity .2s; pointer-events: none; }
.ptr-dot { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--line-2); border-top-color: var(--accent); }
.ptr.ready .ptr-dot { border-color: var(--accent); } .ptr.spin .ptr-dot { animation: ptrspin .7s linear infinite; border-color: var(--line-2); border-top-color: var(--accent); }
@keyframes ptrspin { to { transform: rotate(360deg); } }

/* Landing: two choices; on desktop a hero column beside them */
.welcome.home .w-title.big { font-size: 40px; }
.w-feats { list-style: none; padding: 0; margin: 4px 0 10px; display: none; flex-direction: column; gap: 10px; color: var(--muted); font-size: 15px; }
.w-feats li { display: flex; align-items: center; gap: 10px; } .w-feats .i { color: var(--accent); width: 18px; height: 18px; }
.w-choices { display: flex; flex-direction: column; gap: 12px; }
.w-card { display: grid; grid-template-columns: 44px 1fr; grid-template-rows: auto auto; column-gap: 14px; align-items: center; text-align: left; height: auto;
  padding: 18px; border-radius: 18px; background: var(--card); border: 1px solid var(--line); color: var(--text); }
.w-card:hover { border-color: var(--accent); }
.w-card .w-ic { grid-row: span 2; width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: color-mix(in srgb, var(--accent) 15%, transparent); color: var(--accent); }
.w-card b { font-size: 17px; } .w-card > span:last-child { color: var(--muted); font-size: 14px; }
@media (min-width: 900px) {
  .welcome.home { max-width: 980px; display: grid; grid-template-columns: 1.1fr 1fr; column-gap: 64px; align-items: center; padding-top: 14vh; }
  .welcome.home .w-mark { grid-column: 1 / -1; }
  .welcome.home .w-title.big { font-size: 56px; } .welcome.home .w-sub { font-size: 18px; margin-bottom: 18px; }
  .w-feats { display: flex; }
  .w-card { padding: 22px; }
}
