/* ---- structures (Stage 3) ---- */
table.levels { min-width: 720px; }
table.levels select { padding: 6px 8px; font-size: 14px; min-height: 0; }
table.levels input.note { text-align: left; max-width: none; width: 100%; }
table.levels .act button.danger { margin-left: 4px; }
table.levels.ro { min-width: 0; }
.chip { --chip: #888; display: inline-block; width: 1.25em; height: 1.25em; border-radius: 50%; flex: none; vertical-align: middle;
  background: radial-gradient(circle, var(--chip) 0 42%, transparent 43% 55%, var(--chip) 56%);
  box-shadow: 0 0 0 1.5px color-mix(in srgb, var(--fg) 35%, transparent); }
.chipval { display: inline-flex; align-items: center; gap: .4em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.chiplegend { display: flex; flex-wrap: wrap; gap: 10px 18px; }
.chips-edit { display: flex; flex-direction: column; gap: 8px; }
.chip-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.chip-row .chip { font-size: 22px; }
.chip-row input[type="color"] { width: 46px; height: 40px; padding: 2px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); }
.chip-row input.num { max-width: 140px; }
.savebar { position: sticky; bottom: 0; background: var(--bg); border-top: 1px solid var(--line); padding-block: 12px calc(12px + env(safe-area-inset-bottom, 0px));
  display: flex; flex-direction: column; gap: 10px; }
.savebar .row { justify-content: flex-end; }
.tv-chips { display: flex; flex-wrap: wrap; gap: .6em 1.1em; font-family: var(--display); font-size: clamp(14px, 1.6vw, 30px); color: var(--muted); }
.tv-chips .chip { font-size: 1.1em; }
.sheet { display: flex; flex-direction: column; gap: 14px; }
.sheet-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
@media print {
  :root { --bg: #fff; --panel: #fff; --panel-2: #fff; --line: #bbb; --fg: #000; --muted: #444; color-scheme: light; }
  .topbar, .noprint, body::before, .toast { display: none !important; }
  main { padding: 0 !important; max-width: none !important; }
  .sheet table.data td, .sheet table.data th { padding: 3px 6px; font-size: 11pt; }
  .sheet h1 { font-size: 20pt; }
  .chip { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* ---- players, seats, prizes (Stage 4) ---- */
.ttabs { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 0 8px; }
.statrow { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px; }
.stat { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel-2); min-width: 0; }
.stat b { font-family: var(--display); font-size: 26px; font-weight: 600; font-variant-numeric: tabular-nums; line-height: 1.1; }
.item.player .row button { min-height: 36px; padding: 6px 10px; font-size: 13px; }
textarea { font: inherit; font-size: 15px; color: var(--fg); background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; width: 100%; resize: vertical; }
.tables { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.tablecard { display: flex; flex-direction: column; gap: 8px; padding: 14px; }
ol.seats { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
ol.seats li { display: flex; gap: 10px; align-items: center; padding: 5px 0; border-bottom: 1px solid var(--line); min-width: 0; }
ol.seats li:last-child { border-bottom: 0; }
ol.seats .seatno { font-family: var(--display); font-weight: 600; width: 1.6em; color: var(--brass); text-align: right; flex: none; }
ol.seats button.link { color: var(--fg); text-decoration: none; text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list.az .item { padding: 8px 0; }
table.ladder tr.paid td { color: var(--muted); }
table.ladder td .pill { margin-left: 6px; }
.seatcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; }
.seatcard { border: 1px dashed var(--line); border-radius: 10px; padding: 14px; display: flex; flex-direction: column; gap: 4px; align-items: center; text-align: center; break-inside: avoid; }
.seatcard .big { font-family: var(--display); font-size: 30px; font-weight: 700; }
table.paysheet td.sign { width: 30%; border-bottom: 1px solid var(--fg); }
@media print { .pagebreak { break-before: page; } }

/* TV: prize pool column, seat draw screen, late-seat banner */
.tv-pool { font-family: var(--display); font-weight: 700; color: var(--brass); font-size: clamp(28px, 4vw, 72px); line-height: 1; font-variant-numeric: tabular-nums; margin-bottom: .2em; }
.tv-more { color: var(--muted); font-size: .8em; }
.tv-seats { position: absolute; inset: 0; background: var(--bg); display: grid; grid-template-rows: auto 1fr auto; gap: 2vh;
  padding: max(3vh, env(safe-area-inset-top, 0px)) max(4vw, env(safe-area-inset-right, 0px)) max(2vh, env(safe-area-inset-bottom, 0px)) max(4vw, env(safe-area-inset-left, 0px)); }
.tv-seats-title { font-family: var(--display); font-weight: 700; color: var(--brass); text-transform: uppercase; letter-spacing: .08em; font-size: clamp(28px, 4.5vw, 80px); }
.tv-seats-list { overflow: hidden; columns: 2 30vw; column-gap: 4vw; font-family: var(--display); font-size: clamp(18px, 2.5vw, 46px); font-variant-numeric: tabular-nums; }
.tv-seatrow { display: flex; justify-content: space-between; gap: 1em; padding: .12em 0; border-bottom: 1px solid var(--line); break-inside: avoid; }
.tv-seatrow .s { color: var(--brass); white-space: nowrap; }
.tv-seatrow .n { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tv-seats-strip { font-family: var(--display); font-size: clamp(18px, 2.4vw, 44px); color: var(--muted); text-align: center; font-variant-numeric: tabular-nums; }
.tv-seatpop { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(80vw, 1400px); background: var(--panel-2); border: 3px solid var(--brass);
  border-radius: 24px; padding: 4vh 4vw; text-align: center; box-shadow: 0 2vh 8vh rgba(0,0,0,.6); z-index: 5; }
.tv-seatpop-name { font-family: var(--display); font-weight: 700; font-size: clamp(36px, 6vw, 120px); line-height: 1.05; }
.tv-seatpop-seat { font-family: var(--display); font-weight: 600; color: var(--brass); font-size: clamp(30px, 5vw, 100px); font-variant-numeric: tabular-nums; }
.tv-sub { display: block; color: var(--muted); font-size: clamp(14px, 1.6vw, 30px); font-variant-numeric: tabular-nums; }
