/* Foos App — T3 big events: the Event board and the event TV wall.
   Direction: docs/design/T3_BIG_EVENTS_DIRECTION.md (§4, §5, §7, §11.1). Loads after td.css
   and composes T1's classes; everything here is a new class, or a variant only an event sets.
   Tokens only. */

/* ---------- The board's panes (§4.1, §4.2) ---------- */
@media (max-width: 1023.98px) {
  .board[data-view="today"] [data-pane]:not([data-pane~="today"]),
  .board[data-view="tournaments"] [data-pane]:not([data-pane~="tournaments"]),
  .board[data-view="players"] [data-pane]:not([data-pane~="players"]) { display: none; }
  .board .board-lanes { order: 5; }
  .board .here-today { order: 6; }
  .board .board-by { order: 7; }
  .board .board-join { order: 8; }
  .board .desk-links { order: 9; }
  .board .board-money { order: 10; }
}
@media (min-width: 1024px) {
  .board[data-desk-view="today"] .desk [data-desk]:not([data-desk~="today"]) { display: none; }
  .con-main--lanes-first > .board-lanes { order: -1; }
}
.board-lanes { display: flex; flex-direction: column; }

/* a group head with a 44px menu at its end (TABLES) */
.con-floor > .group-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.con-floor > .group-head > .con-menu { flex: none; margin: -10px -10px -6px 0; }
.con-floor > .group-head > .con-menu > .icon-btn { color: var(--ink-2); }

/* the Days track: a day per stage, the ball on today */
.track--days { --n: 3; }
.track--days .track__stages > li[aria-current="date"] { color: var(--ink); }

/* a tertiary menu row: "Change it on the board" under a disabled row */
.con-menu__item--tertiary {
  color: var(--ink); font-weight: 600; text-decoration: underline;
  text-decoration-thickness: 1px; text-underline-offset: 3px;
}

/* ---------- Tiles at event scope (§5.3) ---------- */
.tt--pick .tt__team { font-weight: 500; color: var(--ink-2); }
.tt__pin-next { font-weight: 700; }
/* the laptop-only menu on an open tile: a phone taps the tile for the table sheet */
@media (max-width: 1023.98px) {
  .tt__menu--laptop { display: none; }
}
/* drag states: a card over a busy tile says PIN HERE, a tile over an open one MOVE HERE */
.board[data-dragging="tile"] .tt.is-drop .tt__drop:not(.tt__drop--move),
.board[data-dragging="card"] .tt.is-drop .tt__drop--move { display: none; }
.board[data-dragging="card"] .tt.is-drop:has(.tt__drop--pin) { border-style: dashed; }

/* compact density: more than 8 tables on a laptop, more than 6 on a phone */
@media (max-width: 1023.98px) {
  .tiles--compact-p .tt { min-height: 0; padding: 10px; }
  .tiles--compact-p .tt__head { min-height: 24px; }
  .tiles--compact-p .tt__plate { white-space: nowrap; }
  .tiles--compact-p .tt__num { font-weight: 800; font-size: var(--fs-figure); letter-spacing: 0.02em; }
  .tiles--compact-p .tt__teams { margin-top: 4px; }
  .tiles--compact-p .tt__team { padding: 4px 0; }
  .tiles--compact-p .tt__status { padding-top: 4px; }
  .tiles--compact-p .tt__action { padding-top: 8px; }
  .tiles--compact-p .tt__pin { margin: 6px -10px -10px; padding: 6px 10px 7px; }
}
@media (min-width: 1024px) {
  .tiles--compact-l .tt { min-height: 0; padding: 10px; }
  .tiles--compact-l .tt__head { min-height: 24px; }
  .tiles--compact-l .tt__plate { white-space: nowrap; }
  .tiles--compact-l .tt--menu .tt__head { padding-right: 26px; }
  .tiles--compact-l .tt__num { font-weight: 800; font-size: var(--fs-figure); letter-spacing: 0.02em; }
  .tiles--compact-l .tt__teams { margin-top: 4px; }
  .tiles--compact-l .tt__team { padding: 4px 0; }
  .tiles--compact-l .tt__status { padding-top: 4px; }
  .tiles--compact-l .tt__action { padding-top: 8px; }
  .tiles--compact-l .tt__pin { margin: 6px -10px -10px; padding: 6px 10px 7px; }
}
@media (min-width: 1920px) {
  .board .tiles { --per-row: var(--per-row-7, 7); }
}

/* ---------- The Desk at event scope (§5.7) ---------- */
.joinqr { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.joinqr__code {
  flex: none; width: 160px; height: 160px; padding: 10px; border: 0; cursor: pointer;
  background: var(--field-ink); border-radius: var(--radius-control);
}
.joinqr__code svg { display: block; width: 100%; height: 100%; }
.joinqr--big { align-items: center; }
.joinqr--big .joinqr__code { width: min(320px, 80vw); height: min(320px, 80vw); padding: 16px; cursor: default; }
.joinqr__txt { align-self: stretch; min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.joinqr__txt .t-meta { color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.joinqr__txt .btn--tertiary { flex: none; font-size: var(--fs-meta); }
.here-today { display: flex; flex-direction: column; gap: 6px; }
.here-today__row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.here-today__row .group-head { margin: 0; }
.here-today__meta { color: var(--ink-2); }
.desk-links { display: flex; flex-direction: column; align-items: flex-start; }
.board-money { color: var(--ink-2); }

/* ---------- Sheets: menu rows, the table sheet (§5.11); pick rows are in td.css ---------- */
.pick-head { margin: 20px 0 0; padding-bottom: 8px; color: var(--ink-2); }
.mlist { border-top: 1px solid var(--line); }
.mlist > form { margin: 0; }
.mrow {
  display: flex; align-items: center; width: 100%; min-height: 56px; padding: 0;
  border: 0; border-bottom: 1px solid var(--line); background: none; cursor: pointer;
  color: var(--ink); font-family: var(--font); font-weight: 600; font-size: var(--fs-body); line-height: 1.3;
  text-align: left; text-decoration: none;
}
.mrow.is-destructive { color: var(--alert); }
.by-t { gap: 12px; }
.by-t__txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.by-t__txt .t-meta { color: var(--ink-2); font-weight: 500; }
.by-t .icon { flex: none; color: var(--ink-2); }
.mrow:focus-visible { outline: 2px solid var(--ink); outline-offset: -2px; }
.tsheet__queue { margin-top: 4px; }
.tsheet__call { margin: 0; }
.tsheet__call .btn { width: 100%; }
.tsheet__more { margin-top: 8px; }

/* ---------- Lanes (§5.6) ---------- */
.lanes { border-top: 1px solid var(--line); }
.lane {
  display: grid; grid-template-columns: minmax(0, 1fr) 190px 110px 116px auto; align-items: center; column-gap: 16px;
  min-height: 72px; padding: 10px 0 10px 4px; border-bottom: 1px solid var(--line);
}
.lane p, .lane-card p, .lane--line p { margin: 0; }
.lane__main { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.lane__status { display: flex; align-items: center; gap: 6px; color: var(--ink-2); white-space: nowrap; }
.lane__name { font-stretch: var(--wdth-name); font-weight: 700; font-size: var(--fs-name); line-height: 1.2; }
.lane__fmt { color: var(--ink-2); }
.lane__col { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.lane__col .t-meta { font-variant-numeric: tabular-nums; }
.lane__sub { color: var(--ink-2); }
.lane__won { font-stretch: var(--wdth-name); font-weight: 700; font-size: var(--fs-name); line-height: 1.2; }
.lane__td { display: flex; align-items: center; gap: 8px; min-width: 0; color: var(--ink-2); white-space: nowrap; }
.lane__td .t-meta { overflow: hidden; text-overflow: ellipsis; }
.lane__acts { display: flex; align-items: center; gap: 2px; }
.lane__acts .btn { height: var(--tap); padding: 0 16px; }
.lane__menu > .icon-btn { color: var(--ink-2); }
.lane__menu .con-menu__pop { right: 0; left: auto; }
.lane--done .lane__name { color: var(--ink); }
.lane--line {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  min-height: 56px; padding: 6px 0 6px 4px; border-bottom: 1px solid var(--line);
}
.lane--line .t-meta { color: var(--ink-2); }
.lane--line b { color: var(--ink); font-weight: 600; }
.lane--add {
  display: flex; align-items: center; gap: 10px; width: 100%; min-height: 56px; margin-top: 12px; padding: 0 16px;
  border: 1.5px dashed var(--line-strong); border-radius: var(--radius-card); background: none;
  color: var(--ink); font-weight: 600; font-size: var(--fs-body); text-align: left; text-decoration: none;
}
.lane--add .icon { width: 20px; height: 20px; }
.lane-group { display: flex; flex-direction: column; }
.lane-group + .lane-group { margin-top: 24px; }
.lane-group > .group-head { flex-wrap: wrap; row-gap: 2px; white-space: nowrap; }
.lane-group > .group-head .group-head__count { margin-left: 8px; }
.lane-cards { display: flex; flex-direction: column; gap: 8px; }
.lane-card {
  display: flex; flex-direction: column; gap: 4px; padding: 14px 16px 8px;
  background: var(--surface-1); border: 1px solid var(--line); border-radius: var(--radius-card);
}
.lane-card .lane__now { margin-top: 6px; display: flex; flex-direction: column; gap: 2px; }
.lane-card__foot {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: var(--tap); margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--line);
}
.lane-card__foot .lane__acts { margin-right: -10px; }

/* ---------- Tables settings, calling, plays on (§5.12, §5.13) ---------- */
.tset { border-top: 1px solid var(--line); }
.tset__row { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.tset__row > form { margin: 0; }
.tset__txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.tset__num {
  font-stretch: var(--wdth-live); font-weight: 800; font-size: var(--fs-figure); line-height: 1;
  letter-spacing: 0.02em; text-transform: uppercase; white-space: nowrap;
}
.tset__label { color: var(--ink-2); }
.tset__add-name { align-self: flex-start; min-height: 32px; font-size: var(--fs-meta); }
.tset__name { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; }
.tset__name[hidden] { display: none; }
.tset__name .input { flex: 1 1 140px; min-width: 0; height: var(--tap); font-size: var(--fs-body); }
.tset__name .btn--secondary { height: var(--tap); padding: 0 16px; }
.tset__name .form-error { flex-basis: 100%; margin: 0; font-size: var(--fs-meta); }
.tset__brand { flex: none; width: 140px; height: var(--tap); }
.tset__row .con-menu > .icon-btn { color: var(--ink-2); margin-right: -10px; }
@media (max-width: 1023.98px) {
  .tset__row.is-editing { flex-wrap: wrap; row-gap: 8px; }
  .tset__row.is-editing .tset__txt { display: contents; }
  .tset__row.is-editing .tset__num { flex: 1; }
  .tset__row.is-editing .tset__name { order: 1; flex: 1 0 100%; flex-wrap: nowrap; display: flex; gap: 8px; }
  .tset__row.is-editing .tset__name[hidden] { display: none; }
  .tset__row.is-editing .tset__name .input { flex: 1; }
  .tset__row.is-editing .tset__name .btn--secondary { flex: none; height: 44px; }
  .tset__row.is-editing .tset__name:has(.form-error) { flex-wrap: wrap; }
}
.tset-add-wrap { margin-top: 4px; }
.tset-add-wrap > summary { list-style: none; width: fit-content; }
.tset-add-wrap > summary::-webkit-details-marker { display: none; }
.tset-add { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 0; }
.tset-add__count { width: 80px; height: var(--tap); }
.tset-add .btn--secondary { height: var(--tap); padding: 0 16px; }
.tset-add .tset__brand { width: 150px; }
.tset-sec { margin-top: 24px; }
.tset-sec > .group-head { margin: 0; }
.tset-sec > .t-meta { margin: 4px 0 8px; color: var(--ink-2); }
.step-row--meta { padding: 8px 0; }
.step-row--meta .stepper__value { min-width: 72px; }
.chip-meta { margin: 8px 0 0; color: var(--ink-2); }
.ochips > form { margin: 0; }

/* ---------- Create an event, and its settings (§6.1, §6.2, §6.7) ---------- */
.evf { width: 100%; max-width: 640px; margin: 0 auto; padding: 8px 16px 48px; }
.evf__head { display: flex; align-items: center; gap: 4px; margin-left: -10px; padding: 8px 0; }
.evf__head .t-headline { margin: 0; }
.evf__from { margin: 0; color: var(--ink-2); }
.evf .csec__head .csec__num { margin: 0; }
.evf__pair { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
.evf__pair > [hidden] { display: none; }
.evf__count { margin: 0; color: var(--ink-2); text-align: right; font-variant-numeric: tabular-nums; }
.evf__desc { height: auto; min-height: 112px; padding: 12px 14px; resize: vertical; line-height: 1.5; }
.evf__num { width: 120px; }
.evf__fee .input-with-prefix { display: flex; align-items: center; gap: 8px; }
.evf__none { align-self: flex-start; width: fit-content; }
.evf__zone { position: relative; }
.evf__zone > summary { list-style: none; }
.evf__zone > summary::-webkit-details-marker { display: none; }
.evf__zone[open] > .input { margin-top: 8px; max-width: 100%; }
.evf__go { padding-top: 24px; }
.evf__delete { display: flex; justify-content: center; padding-top: 24px; margin-top: 24px; border-top: 1px solid var(--line); }
.evf .places { margin-bottom: 4px; }

/* ---------- The event TV wall (§11.1): 1920×1080, Night, never scrolls ---------- */
html.tv, .tv-body { height: 100%; margin: 0; overflow: hidden; background: var(--surface-0); }
.tv-fit { position: fixed; inset: 0; overflow: hidden; background: var(--surface-0); }
.tv-screen {
  position: absolute; left: 0; top: 0; width: 1920px; height: 1080px; overflow: hidden; transform-origin: 0 0;
  background: var(--surface-0); color: var(--ink); font-family: var(--font);
  display: grid; grid-template-rows: 96px 1fr; grid-template-columns: 1280px 640px;
}
:where(.tv-screen) p { margin: 0; }
.tv-top {
  grid-column: 1 / -1; display: flex; align-items: center; gap: 40px; padding: 0 48px;
  border-bottom: 1px solid var(--line);
}
.tv-top .wordmark { font-size: 28px; }
.tv-top__room {
  flex: 1; min-width: 0; font-stretch: var(--wdth-plate); font-weight: 700; font-size: 20px; line-height: 1;
  letter-spacing: var(--track-plate); text-transform: uppercase; color: var(--ink-2);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tv-top__live { color: var(--live); display: inline-flex; align-items: center; gap: 12px; }
.tv-top__room .live-dot { width: 14px; height: 14px; }
.tv-top__clock { font-stretch: var(--wdth-live); font-weight: 800; font-size: 40px; line-height: 1; font-variant-numeric: tabular-nums; }
.tv-floor { padding: 36px 48px 0; min-width: 0; }
.tvf { display: grid; grid-template-columns: repeat(4, 284px); grid-auto-rows: 250px; gap: 16px; }
.tvf[hidden] { display: none; }
.tvf-tile {
  display: flex; flex-direction: column; min-width: 0; padding: 18px 20px 16px; border-radius: 16px;
  background: var(--field); color: var(--field-ink);
}
.tvf-tile__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.tvf-tile__n {
  font-stretch: var(--wdth-live); font-weight: 800; font-size: 44px; line-height: 1;
  letter-spacing: 0.01em; text-transform: uppercase; white-space: nowrap;
}
.tvf-tile__state { display: inline-flex; align-items: center; gap: 10px; white-space: nowrap; }
.tvf-tile__timer { font-stretch: var(--wdth-live); font-weight: 800; font-size: 32px; line-height: 1; font-variant-numeric: tabular-nums; }
.tvf-tile__timer--now { text-transform: uppercase; }
.tvf-tile .live-dot { width: 14px; height: 14px; }
.tvf-tile__teams { display: flex; flex-direction: column; margin-top: 10px; }
.tvf-tile__team {
  padding: 4px 0; font-stretch: var(--wdth-name); font-weight: 700; font-size: 36px; line-height: 1.1;
  white-space: nowrap; overflow: hidden;
}
.tvf-tile__team + .tvf-tile__team { border-top: 1px solid var(--field-line); }
.tvf-tile__tag {
  margin-top: auto; padding-top: 8px; display: flex; flex-direction: column;
  color: var(--field-ink-2); font-weight: 500; font-size: 24px; line-height: 1.2; white-space: nowrap; overflow: hidden;
}
.tvf-tile__tag > span { overflow: hidden; text-overflow: ellipsis; }
/* T5 §2.10: the tournament in 600 over the round; past its mark the round's place says
   "Done? Report it."; another night's table is IN USE with its tournament */
.tvf-tile__tag > .tvf-tile__t1 { color: var(--field-ink); font-weight: 600; }
.tvf-tile__tag > .tvf-tile__foot { color: var(--field-ink); }
.tvf-tile--in .tvf-tile__tag { margin-top: 10px; color: var(--ink-2); }
.tvf-tile--in .tvf-tile__tag > span { font-weight: 600; }
.tvf-tile--open { background: transparent; color: var(--ink); border: 2px dashed var(--line-strong); }
.tvf-tile--off { background: var(--surface-2); color: var(--ink); }
.tvf-tile__off {
  margin-top: auto; color: var(--ink-2);
  font-stretch: var(--wdth-plate); font-weight: 700; font-size: 24px; line-height: 1.2;
  letter-spacing: var(--track-plate); text-transform: uppercase;
}
.tv-right {
  border-left: 1px solid var(--line); padding: 28px 48px 184px; min-width: 0;
  display: flex; flex-direction: column; justify-content: space-between; gap: 28px;
}
.tv-col__head {
  margin-bottom: 8px; font-stretch: var(--wdth-plate); font-weight: 700; font-size: 20px; line-height: 1;
  letter-spacing: var(--track-plate); text-transform: uppercase; color: var(--ink-2);
}
.tv-up { display: flex; flex-direction: column; }
.tv-up__row { display: flex; flex-direction: column; gap: 6px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.tv-up__row:first-of-type { border-top: 1px solid var(--line); }
.tv-up__who { font-stretch: var(--wdth-name); font-weight: 700; font-size: 36px; line-height: 1.15; white-space: nowrap; overflow: hidden; }
.tv-up__vs { color: var(--ink-2); font-weight: 500; }
.tv-up__name { font-stretch: var(--wdth-name); font-weight: 700; font-size: 36px; line-height: 1.15; }
.tv-up__empty { color: var(--ink-2); font-weight: 500; font-size: 24px; line-height: 1.3; }
.tv-up__empty:first-child { margin-top: 4px; }
.tv-up__tag { color: var(--ink-2); font-weight: 500; font-size: 24px; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tv-qrblock { display: flex; flex-direction: column; gap: 16px; }
.tv-qr { display: flex; gap: 24px; align-items: center; }
.tv-qr__code { flex: none; width: 240px; height: 240px; padding: 14px; background: var(--field-ink); border-radius: 8px; }
.tv-qr__code svg { width: 100%; height: 100%; display: block; }
.tv-qr__text { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.tv-qr__plate { font-stretch: var(--wdth-plate); font-weight: 700; font-size: 20px; line-height: 1.2; letter-spacing: var(--track-plate); text-transform: uppercase; }
.tv-qr__meta { font-weight: 500; font-size: 24px; line-height: 1.35; color: var(--ink-2); }
.tv-qr__url { font-stretch: var(--wdth-plate); font-weight: 700; font-size: 20px; line-height: 1.2; letter-spacing: var(--track-plate); text-transform: uppercase; color: var(--ink-2); white-space: nowrap; }
.tv-band {
  position: absolute; left: 0; right: 0; bottom: 0; height: 160px; z-index: 5; overflow: hidden;
  background: var(--field); color: var(--field-ink);
}
.tv-band[hidden] { display: none; }
/* calls that land together queue: one crosses at a time, 400ms crossfades between (A42 §6) */
.tv-band__item {
  position: absolute; inset: 0; display: flex; align-items: center; gap: 48px; padding: 0 56px;
  opacity: 0; transition: opacity 400ms linear;
}
.tv-band__item.is-on { opacity: 1; }
.tv-band__plate {
  flex: none; font-stretch: var(--wdth-plate); font-weight: 700; font-size: 20px; letter-spacing: var(--track-plate);
  text-transform: uppercase; color: var(--field-ink-2);
}
.tv-band__call {
  flex: none; font-stretch: var(--wdth-live); font-weight: 900; font-size: 136px; line-height: 0.88;
  text-transform: uppercase; letter-spacing: -0.01em; padding-top: 10px;
}
.tv-band__who { min-width: 0; font-stretch: var(--wdth-name); font-weight: 800; font-size: var(--fs-display); line-height: 1.05; letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; }
.tv-band__who .vs { font-weight: 500; color: var(--field-ink-2); }
.tv-band.is-playing { animation: t3-band-rise var(--dur-call) cubic-bezier(0.2, 0.8, 0.2, 1) both; }
@keyframes t3-band-rise { from { transform: translateY(100%); } to { transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .tv-band.is-playing { animation: none; }
  .tv-band__item { transition: none; }
}

/* ---------- Two table notes (§25) ---------- */
/* a tile menu sizes to its longest row, never under 240px (§25.1) */
.tt__menu .con-menu__pop { min-width: 240px; width: max-content; max-width: min(360px, 90vw); }
.tt__menu .con-menu__item { white-space: nowrap; }
.tmenu__sep { flex: none; height: 1px; margin: 4px 0; background: var(--line); }
.tvf-tile__warm { margin-top: 14px; color: var(--ink); font-weight: 500; font-size: 24px; line-height: 1.2; white-space: nowrap; }
.tvf-tile--ask .tvf-tile__off { color: var(--ink); }

/* one tournament's tables, lit (§25.2) */
.lens { margin: 6px 0 12px; }
.lens[hidden] { display: none; }
.lens .fchips { display: flex; gap: 8px; }
.lens__line { margin-top: 8px; color: var(--ink-2); }
.lens__line:empty { display: none; }
@media (max-width: 1023.98px) {
  .lens .fchips { overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 0 16px; }
  .lens .fchips::-webkit-scrollbar { display: none; }
  .lens .ochip { flex: none; }
}
@media (min-width: 1024px) { .lens .fchips { flex-wrap: wrap; row-gap: 8px; } }
.ochip__sub { margin-left: 6px; font-stretch: var(--wdth-read); font-weight: 500; font-size: var(--fs-meta); font-variant-numeric: tabular-nums; }
.tt.tt--unlit { background: var(--surface-1); border: 1px solid var(--line); color: var(--ink-2); }
.tt.tt--unlit .tt__num { color: var(--ink-2); }
.tt.tt--unlit .tt__team { font-weight: 500; color: var(--ink-2); }
.tt.tt--unlit .tt__team + .tt__team { border-top-color: var(--line); }
.tt.tt--unlit .tt__status, .tt.tt--unlit .tt__plate, .tt.tt--unlit .tt__timer, .tt.tt--unlit .tt__long,
.tt.tt--unlit .tt__called, .tt.tt--unlit .tt__dep, .tt.tt--unlit .tt__half { color: var(--ink-2); }
.tt.tt--unlit .tt__long { background: none; }
.tt.tt--unlit .live-dot { display: none; }
.tt.tt--unlit .tt__flag { color: var(--ink-2); background: none; box-shadow: inset 0 0 0 1px var(--line-strong); }
.tt.tt--unlit .tt__pin { background: var(--surface-2); color: var(--ink-2); }
.tt.tt--unlit .tt__menu > .icon-btn { color: var(--ink-2); }
.tt.tt--unlit :focus-visible { outline-color: var(--ink); }
.lane__link { position: relative; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; font: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
.lane__link::after { content: ""; position: absolute; inset: -13px -4px; }

/* ---------- The desk (§5.7–§5.10, §5.14, §8): from the mockups' t3.css ---------- */
/* ---------- The desk (§5.7, §8) ---------- */
.dtool { display: flex; flex-direction: column; gap: 12px; }
.dtool__row { display: flex; align-items: center; gap: 12px; }
.dtool__find { flex: 1; min-width: 0; }
.dtool__sel { flex: none; width: 220px; }
.dtool__row > .btn--tertiary { flex: none; }
.fchips { display: flex; gap: 8px; }
.fchips--scroll { overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 0 16px; }
.fchips--scroll::-webkit-scrollbar { display: none; }
.fchips .ochip { flex: none; }
/* the desk table: a real table, a sticky header, top-aligned cells */
.dtable { width: 100%; border-collapse: collapse; table-layout: fixed; }
.dtable th {
  position: sticky; top: 0; z-index: 2; height: 40px; padding: 0 12px; text-align: left; vertical-align: middle;
  background: var(--surface-0); border-bottom: 1px solid var(--line); color: var(--ink-2);
  font-stretch: var(--wdth-plate); font-weight: 700; font-size: var(--fs-plate); line-height: 1;
  letter-spacing: var(--track-plate); text-transform: uppercase; white-space: nowrap;
}
.dtable th.dcol-sel, .dtable td.dcol-sel { width: 44px; padding: 0; text-align: center; }
.dtable td { padding: 8px 12px; vertical-align: top; border-bottom: 1px solid var(--line); }
.dtable td.dcol-sel { padding-top: 4px; }
.dtable td.dcol-menu { padding: 4px 0 0; text-align: right; }
.dtable tr.is-picked td { background: var(--surface-2); }
.dtable tr.is-open td:first-child { box-shadow: inset 2px 0 0 var(--ink); }
.dname { display: flex; align-items: flex-start; gap: 10px; min-width: 0; width: 100%; color: var(--ink); text-align: left; }
.dname .avatar { margin-top: 2px; }
.dname__txt { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.dname__name { font-stretch: var(--wdth-name); font-weight: 700; font-size: var(--fs-name); line-height: 1.2; }
.dname__meta { color: var(--ink-2); }
.dentries { display: flex; flex-direction: column; gap: 6px; padding-top: 2px; }
/* an entry wraps under its own text in a narrow column; a name never breaks (.nm) */
.dentry { display: flex; align-items: flex-start; gap: 8px; min-width: 0; min-height: 24px; }
.dentry > .t-meta { min-width: 0; padding-top: 3px; }
.dentry .plate { height: 24px; flex: none; }
/* a chip in the table is a 24px chip with a 44px press */
.dtable .paybtn { position: relative; min-width: 0; min-height: 24px; padding: 0; flex: none; }
.dtable .paybtn::after { content: ""; position: absolute; inset: -10px -4px; }
.dnone { color: var(--ink-2); padding-top: 3px; }
.downes { padding-top: 2px; font-variant-numeric: tabular-nums; }
.dhere { display: flex; align-items: center; gap: 6px; min-height: 28px; color: var(--ink); }
.dhere .icon { width: 20px; height: 20px; }
.dhere .t-meta { white-space: nowrap; }
.dtable td .btn { height: var(--tap); padding: 0 14px; margin-top: -8px; margin-bottom: -8px; }
.dtable td .paychip { margin-top: 2px; }
/* the selector disc: a ring, then T1's check disc when selected (A-T16) */
.sel {
  display: inline-grid; place-items: center; flex: none; width: var(--tap); height: var(--tap);
  border-radius: 50%; color: var(--on-ink);
}
.sel::before {
  content: ""; grid-area: 1 / 1; width: 20px; height: 20px; border-radius: 50%;
  box-shadow: inset 0 0 0 1.5px var(--line-strong);
}
.sel > .icon { grid-area: 1 / 1; width: 14px; height: 14px; stroke-width: 3; display: none; }
.sel[aria-checked="true"]::before { background: var(--ink); box-shadow: none; }
.sel[aria-checked="true"] > .icon { display: block; }
.sel[aria-checked="mixed"]::before { box-shadow: inset 0 0 0 1.5px var(--ink); }
.sel[aria-checked="mixed"]::after {
  content: ""; grid-area: 1 / 1; width: 10px; height: 2px; border-radius: 1px; background: var(--ink);
}
/* the bulk bar: sticky at the foot of the desk table, or in the phone's dock */
.bulkbar {
  position: sticky; bottom: 0; z-index: 3; display: flex; align-items: center; gap: 12px;
  min-height: 64px; margin: 0 -24px; padding: 10px 24px;
  background: var(--surface-1); border-top: 1px solid var(--line);
}
.bulkbar__count { font-weight: 600; font-variant-numeric: tabular-nums; }
.bulkbar__acts { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.bulkbar__acts .btn { height: var(--tap); padding: 0 16px; }
.td-dock .bulkbar { position: static; margin: 0; padding: 0; min-height: 0; background: none; border: 0; }
/* the laptop Players view: the toolbar over the table, the table scrolling under a sticky head */
.desk-view { display: flex; flex-direction: column; gap: 16px; min-height: 0; }
.desk-view__table {
  flex: 1; min-height: 0; overflow: auto; margin: 0 -24px; padding: 0 12px;
  scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent;
}
/* the phone's person rows in select mode */
.rrow--select { gap: 4px; }
.rrow--select .sel { margin-left: -10px; }

/* ---------- The person panel and sheet (§5.8) ---------- */
.ppanel { position: relative; display: flex; flex-direction: column; }
.ppanel__close { position: absolute; top: -10px; right: -10px; color: var(--ink-2); }
.ppanel > .t-headline { padding-right: 40px; }
.ppanel .psec:first-of-type { margin-top: 16px; }
.pentry { display: flex; flex-direction: column; gap: 4px; padding: 12px 0; border-top: 1px solid var(--line); }
.pentry__top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.pentry__name { font-stretch: var(--wdth-name); font-weight: 700; font-size: var(--fs-name); line-height: 1.2; }
.pentry__meta { color: var(--ink-2); }
.pentry__acts { display: flex; flex-wrap: wrap; gap: 0 16px; margin-top: -2px; }
.pentry__acts .btn--tertiary { font-size: var(--fs-meta); }
.powes { display: flex; flex-direction: column; gap: 8px; padding: 14px 0 16px; border-top: 1px solid var(--line); }
.powes__row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.powes__meta { color: var(--ink-2); }
.powes .btn--tertiary { align-self: center; }
.psec--flush { padding-bottom: 4px; }

/* ---------- Walk-up, import, money (§5.9, §5.10, §5.14) ---------- */
.wu-list { margin-top: 12px; border-top: 1px solid var(--line); }
.wu-row:has(+ .wu-partner) { border-bottom: 0; }
/* the money line and its buttons stay in view at the foot of the Desk while the list scrolls */
.ppanel .wu-owes {
  position: sticky; bottom: 0; z-index: 1; margin: 16px -16px -28px; padding: 12px 16px 16px;
  background: var(--surface-0); border-top: 1px solid var(--line);
}
.wu-owes__alt { display: flex; gap: 8px; }
.wu-owes__alt .btn { flex: 1; }
.wu-row {
  display: flex; align-items: flex-start; gap: 6px; min-height: 64px; padding: 6px 0 8px; border-bottom: 1px solid var(--line);
  color: var(--ink); text-align: left; width: 100%;
}
.wu-row .sel { margin: -2px 0 0 -10px; }
.wu-row__txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; padding-top: 7px; }
.wu-row__name { font-weight: 600; }
.wu-row__meta { color: var(--ink-2); }
.wu-row.is-off { color: var(--ink-2); }
.wu-row.is-off .wu-row__name { font-weight: 500; }
.wu-row__tag { flex: none; padding-top: 10px; color: var(--ink-2); }
.wu-row__txt .btn--tertiary { position: relative; align-self: flex-start; min-height: 28px; font-size: var(--fs-meta); }
.wu-row__txt .btn--tertiary::after { content: ""; position: absolute; left: -4px; right: -4px; top: -8px; bottom: -8px; }
.wu-partner { padding: 4px 0 14px 34px; display: flex; flex-direction: column; gap: 6px; border-bottom: 1px solid var(--line); }
.wu-partner .btn--tertiary { align-self: flex-start; font-size: var(--fs-meta); }
.wu-owes { display: flex; flex-direction: column; gap: 8px; }
.wu-owes__line { color: var(--ink); }
.wu-owes .btn--tertiary { align-self: center; }
.imp-list { border-top: 1px solid var(--line); margin-top: 12px; }
.imp-row { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.imp-row__txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.imp-row__verdict { color: var(--ink-2); }
.imp-row--skip .rrow__name { font-weight: 500; color: var(--ink-2); }
.imp-row .btn { flex: none; height: var(--tap); padding: 0 14px; }
.imp-row .avatar--new { background: transparent; box-shadow: inset 0 0 0 1.5px var(--line-strong); color: var(--ink); }
.imp-row .avatar--new .icon { width: 18px; height: 18px; }
.imp-hold { color: var(--ink-2); text-align: center; }
.imp-foot { display: flex; flex-direction: column; align-items: center; gap: 10px; padding-top: 16px; }
.imp-foot .btn--block { align-self: stretch; }
.imp-csv { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; margin-top: 12px; }
.imp-csv .t-meta { color: var(--ink-2); }
.imp-to { display: flex; flex-direction: column; gap: 6px; margin-top: 16px; }
.imp-to + textarea { margin-top: 12px; }
/* the desk table's fixed columns (§5.7); Entries takes what's left */
.dtable .dcol-name { width: 200px; }
.dtable .dcol-fee { width: 120px; }
.dtable .dcol-owes { width: 72px; }
.dtable .dcol-here { width: 128px; }
.dtable th.dcol-menu { width: 44px; padding: 0; }
/* the band seats at the top of a laptop dialog, as T2 seats it in a sheet */
textarea.input.paste { height: 244px; padding: 12px 14px; resize: none; line-height: 1.5; font-variant-numeric: tabular-nums; }
.mby { border-top: 1px solid var(--line); }
.mby__row {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: 12px;
  min-height: 56px; padding: 8px 0; border-bottom: 1px solid var(--line);
}
.mby__txt { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.mby__name { font-stretch: var(--wdth-name); font-weight: 700; font-size: var(--fs-name); line-height: 1.2; }
.mby__meta { color: var(--ink-2); font-variant-numeric: tabular-nums; }
.mby__row .btn { height: var(--tap); padding: 0 14px; }
.mby__pot { color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ---------- The desk on the board (§4.2, §8.1, §8.7) ---------- */
@media (min-width: 1024px) {
  .board[data-desk-view="players"] .con-main > :not(.desk-view) { display: none; }
  .board[data-desk-view="players"] .con-main { display: flex; flex-direction: column; min-height: 0; }
  .board .desk-view { flex: 1; }
  .board .desk-view .bulkbar { margin-top: auto; }
}
@media (max-width: 1023.98px) {
  .board .desk-list { order: 4; }
  .board .board-money { order: 3; }
  .td-dock.is-bulk > :not(.bulkbar) { display: none; }
  .td-dock .bulkbar:not([hidden]) { display: flex; width: 100%; }
}
.bulkbar[hidden] { display: none; }
.bulkbar__form { margin: 0; }
.dtool__sel { position: relative; margin: 0; }
.dtool__find { position: relative; }
.dtool__find .typeahead { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 20; }
.dtable td form.button_to { margin: 0; }
.dtable .dname { text-decoration: none; }
.dtable .paybtn { text-decoration: none; }
.desk-list { display: flex; flex-direction: column; gap: 12px; }
.desk-list .typeahead { margin-top: 4px; }
.desk-group .group-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.desk-row { gap: 8px; }
.desk-row .rrow__who { flex: 1; min-width: 0; }
.desk-row .sel[hidden] { display: none; }
.desk-row__end { flex: none; display: flex; align-items: center; }
.desk-row__end form.button_to { margin: 0; }
.desk-row__end .btn { height: var(--tap); padding: 0 14px; }
.desk-row.is-picked { background: var(--surface-2); }
.desk-person .ppanel__close { top: 0; right: 0; }
.ppanel .seg__form { flex: 1; margin: 0; }
.ppanel .psec { display: flex; flex-direction: column; gap: 8px; padding: 14px 0 16px; border-top: 1px solid var(--line); }
.ppanel .psec__row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ppanel .psec__note { color: var(--ink-2); margin: 0; }
.ppanel .psec__acts { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.ppanel .pentry__acts form.button_to, .ppanel .powes form.button_to { margin: 0; }
.ppanel .powes form.button_to:has(.btn--tertiary) { align-self: center; }
.board.is-bulk .ppanel .powes .btn--primary { --btn-fg: var(--ink); background: transparent; border-color: var(--line-strong); }
.money-strip__open { margin-left: auto; }
.board-money { width: 100%; text-align: left; }
.wu-row { cursor: pointer; }
.wu-row .sel-input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.wu-row:has(.sel-input:checked) .sel::before { background: var(--ink); box-shadow: none; }
.wu-row:has(.sel-input:checked) .sel > .icon { display: block; }
.wu-row:has(.sel-input:focus-visible) .sel::before { outline: 2px solid var(--ink); outline-offset: 2px; }
.wu-row.is-off { cursor: default; }
.wu-partner[hidden] { display: none; }
.wu .wu-owes { position: sticky; bottom: 0; background: var(--surface-0); padding-top: 12px; border-top: 1px solid var(--line); margin-top: 8px; }
.wu-owes [hidden] { display: none; }
.imp-pick { flex: none; }
.imp-pick .con-menu__pop { right: 0; left: auto; min-width: 240px; }
.imp-pick form { margin: 0; }
.imp-foot form { margin: 0; align-self: stretch; display: flex; flex-direction: column; align-items: center; }

/* SPOT OPEN (§5.5): Move up, then Leave it open, side by side. */
.needs__act:has(> form + form) { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }

/* the money panel is 560 on a laptop (§5.14); its per-tournament counts are links */
@media (min-width: 1024px) { #con-player:has(.msum-stats) { max-width: 560px; width: 560px; } }
.mby__meta a, .msum-sec .t-meta a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.msum-print { align-self: flex-start; }

/* an event's photos (T3 §6.1): the add tile, a four-up grid, the cover plate */
.ph-empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  height: 120px; border: 1.5px dashed var(--line-strong); border-radius: var(--radius-card); background: var(--surface-1); cursor: pointer;
}
.ph-empty .icon { width: 24px; height: 24px; color: var(--ink-2); }
.ph-empty__txt { font-weight: 600; }
.ph-empty:focus-within, .ph-add:focus-within { outline: 2px solid var(--ink); outline-offset: 2px; }
.ph-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
@media (min-width: 600px) { .ph-grid { grid-template-columns: repeat(4, 1fr); } }
.ph-grid[hidden], .ph-empty[hidden] { display: none; }
.ph-tile, .ph-add { position: relative; aspect-ratio: 1; border-radius: var(--radius-control); }
.ph-tile { border: 1px solid var(--line); }
.ph-img { display: block; width: 100%; height: 100%; padding: 0; border: 0; border-radius: var(--radius-control); overflow: hidden; background: var(--surface-2); cursor: pointer; }
.ph-img img { display: block; width: 100%; height: 100%; object-fit: cover; }
.ph-add { display: flex; align-items: center; justify-content: center; border: 1.5px dashed var(--line-strong); color: var(--ink-2); cursor: pointer; }
.ph-add[hidden] { display: none; }
.ph-cover {
  display: none; position: absolute; left: 6px; bottom: 6px; padding: 2px 6px; border-radius: var(--radius-plate);
  background: color-mix(in srgb, var(--surface-0) 88%, transparent); color: var(--ink); pointer-events: none;
}
.ph-tile:first-child .ph-cover { display: block; }
.ph-remove {
  position: absolute; top: 0; right: 0; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center;
  padding: 0; border: 0; background: none; color: var(--ink); cursor: pointer;
}
.ph-remove .icon { width: 24px; height: 24px; padding: 4px; border-radius: 50%; background: color-mix(in srgb, var(--surface-0) 88%, transparent); }
.ph-bar { display: none; position: absolute; left: 8px; right: 8px; bottom: 8px; height: 4px; border-radius: var(--radius-full); background: color-mix(in srgb, var(--surface-0) 88%, transparent); overflow: hidden; }
.ph-bar > span { display: block; width: 8%; height: 100%; background: var(--ink); transition: width 120ms linear; }
.ph-tile.is-uploading .ph-bar { display: block; }
.ph-tile.is-uploading .ph-cover { display: none; }
.ph-tile.is-uploading .ph-img img, .ph-tile.is-failed .ph-img img { opacity: .5; }
.ph-tile.is-failed { border-color: var(--alert); }
.ph-menu {
  display: none; position: absolute; z-index: 5; top: calc(100% + 4px); left: 0; min-width: 180px; flex-direction: column;
  padding: 4px; border: 1px solid var(--line); border-radius: var(--radius-control); background: var(--surface-2);
}
.ph-tile.is-menu .ph-menu { display: flex; }
.ph-menu button { min-height: 44px; padding: 0 12px; border: 0; border-radius: var(--radius-plate); background: none; color: var(--ink); text-align: left; font: inherit; font-weight: 600; cursor: pointer; }
.ph-menu button:hover, .ph-menu button:focus-visible { background: var(--surface-1); }
.ph-err { display: flex; align-items: center; gap: 6px; margin-top: 8px; }
.ph-err[hidden], .ph-busy[hidden] { display: none; }
.ph-err .icon { width: 16px; height: 16px; flex: none; }
.ph-busy { margin-top: 8px; }
.evf__go button[disabled] { opacity: .4; }
