/* ProPage Auction: one stylesheet for every app screen and the landing page.
 *
 * Brand: royal blue #1a3a8c with white, plus a
 * gold for star players and a field green for SOLD.
 * Every text/background pair below was checked for WCAG 2.1 AA (4.5:1+);
 * the ratios are noted next to the tokens. System fonts only.
 */

/* ------------------------------------------------------------- tokens */
:root {
  color-scheme: light;
  /* spacing: 4/8 px scale */
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 64px;
  /* type scale */
  --t-xs: 0.75rem; --t-sm: 0.875rem; --t-md: 1rem; --t-lg: 1.25rem; --t-xl: 1.5rem; --t-2xl: 1.875rem; --t-3xl: 2.5rem;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --r-sm: 6px; --r-md: 10px; --r-lg: 16px; --r-full: 999px;

  /* light theme */
  --bg: #f3f5fa;
  --surface: #ffffff;
  --surface-2: #e8ecf5;
  --line: #d3d9e7;
  --line-strong: #aeb8cf;
  --text: #141a2e;          /* 15.8:1 on --bg */
  --muted: #4d5672;         /* 6.7:1 on --bg, 6.1:1 on --surface-2 */
  --brand: #1a3a8c;         /* logo blue; white on it 10.4:1 */
  --brand-hover: #142e70;
  --on-brand: #ffffff;
  --brand-ink: #1a3a8c;     /* 10.4:1 on --surface */
  --brand-tint: #e3e9f7;    /* brand-ink on it 8.5:1 */
  --success: #15703a;       /* white on it 6.2:1 */
  --success-hover: #0f5c2f;
  --success-ink: #0f6b35;   /* 6.6:1 on white, 5.7:1 on tint */
  --success-tint: #def3e6;
  --danger: #b42318;        /* white on it 6.6:1 */
  --danger-ink: #b42318;
  --danger-tint: #fde8e6;   /* danger-ink on it 5.6:1 */
  --gold: #f5b301;          /* --on-gold on it 9.7:1 */
  --on-gold: #1f1600;
  --gold-ink: #7a4f00;      /* 6.3:1 on --gold-tint */
  --gold-tint: #fdf1cf;
  --focus: #1a3a8c;
  --shadow-sm: 0 1px 2px rgba(20, 26, 46, .08);
  --shadow-md: 0 4px 12px rgba(20, 26, 46, .10), 0 1px 3px rgba(20, 26, 46, .08);
  --shadow-lg: 0 16px 40px rgba(20, 26, 46, .22);
  --backdrop: rgba(11, 16, 32, .6);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0b1020;
    --surface: #141b30;
    --surface-2: #1c2541;
    --line: #2a3556;
    --line-strong: #44517a;
    --text: #e8ecf6;          /* 16.0:1 on --bg */
    --muted: #a6b0cb;         /* 7.9:1 on --surface, 7.0:1 on --surface-2 */
    --brand: #3556b8;         /* white on it 6.6:1 */
    --brand-hover: #4566c8;
    --brand-ink: #a9bdff;     /* 9.3:1 on --surface */
    --brand-tint: #1c2b55;    /* brand-ink on it 7.5:1 */
    --success: #1d7a43;       /* white on it 5.4:1 */
    --success-hover: #23894d;
    --success-ink: #6fd99a;   /* 9.8:1 on --surface */
    --success-tint: #12301f;
    --danger: #c03424;        /* white on it 5.6:1 */
    --danger-ink: #ff9a8f;    /* 8.4:1 on --surface */
    --danger-tint: #3a1a1a;
    --gold-ink: #ffd166;      /* 11.9:1 on --surface */
    --gold-tint: #33280c;
    --focus: #a9bdff;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
    --shadow-md: 0 4px 14px rgba(0, 0, 0, .45);
    --shadow-lg: 0 20px 48px rgba(0, 0, 0, .6);
    --backdrop: rgba(0, 0, 0, .7);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0b1020; --surface: #141b30; --surface-2: #1c2541; --line: #2a3556; --line-strong: #44517a;
  --text: #e8ecf6; --muted: #a6b0cb;
  --brand: #3556b8; --brand-hover: #4566c8; --brand-ink: #a9bdff; --brand-tint: #1c2b55;
  --success: #1d7a43; --success-hover: #23894d; --success-ink: #6fd99a; --success-tint: #12301f;
  --danger: #c03424; --danger-ink: #ff9a8f; --danger-tint: #3a1a1a;
  --gold-ink: #ffd166; --gold-tint: #33280c;
  --focus: #a9bdff;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4); --shadow-md: 0 4px 14px rgba(0, 0, 0, .45); --shadow-lg: 0 20px 48px rgba(0, 0, 0, .6);
  --backdrop: rgba(0, 0, 0, .7);
}

/* --------------------------------------------------------------- base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: var(--t-md); line-height: 1.5; background: var(--bg); color: var(--text); }
h1, h2, h3 { line-height: 1.2; margin: 0; }
p { margin: 0; }
/* Never stretch an image: when both sides are fixed it fits inside the box (photos opt into cover). */
img { max-width: 100%; object-fit: contain; }
a { color: var(--brand-ink); }
code { font-family: var(--mono); font-size: .9em; background: var(--surface-2); padding: 1px 6px; border-radius: var(--r-sm); }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.num { font-variant-numeric: tabular-nums; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: var(--s2); top: -100px; z-index: 100; background: var(--brand); color: var(--on-brand); padding: var(--s2) var(--s4); border-radius: var(--r-sm); }
.skip:focus { top: var(--s2); }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
::placeholder { color: var(--muted); opacity: 1; }

/* ------------------------------------------------------------ buttons */
.btn, button { font: inherit; }
.btn[hidden] { display: none; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s2);
  min-height: 40px; padding: var(--s2) var(--s4); border-radius: var(--r-md);
  border: 1px solid transparent; font-weight: 600; font-size: var(--t-sm); line-height: 1.2;
  cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease, transform .06s ease;
}
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; }
.btn-sm { min-height: 32px; padding: var(--s1) var(--s3); }
.btn-lg { min-height: 52px; padding: var(--s3) var(--s5); font-size: var(--t-md); }
.btn-block { width: 100%; }
.btn-primary { background: var(--brand); color: var(--on-brand); }
.btn-primary:hover:not(:disabled) { background: var(--brand-hover); }
.btn-success { background: var(--success); color: #fff; }
.btn-success:hover:not(:disabled) { background: var(--success-hover); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover:not(:disabled) { filter: brightness(1.08); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line-strong); }
.btn-ghost:hover:not(:disabled) { background: var(--surface-2); }
.btn-quiet { background: var(--surface-2); color: var(--text); }
.btn-quiet:hover:not(:disabled) { background: var(--line); }
.btn-link-danger { background: transparent; color: var(--danger-ink); border-color: transparent; }
.btn-link-danger:hover:not(:disabled) { background: var(--danger-tint); }
.btn-icon {
  display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto;
  width: 40px; height: 40px; padding: 0; border-radius: var(--r-md);
  background: transparent; color: var(--muted); border: 1px solid var(--line); cursor: pointer;
}
.btn-icon:hover:not(:disabled) { color: var(--text); background: var(--surface-2); }
.spinner { width: 14px; height: 14px; border: 2px solid currentColor; border-top-color: transparent; border-radius: 50%; display: inline-block; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* -------------------------------------------------------------- forms */
.field { margin-top: var(--s4); }
.field:first-child { margin-top: 0; }
label, .label { display: block; font-size: var(--t-sm); font-weight: 600; color: var(--text); margin-bottom: var(--s1); }
.hint { font-size: var(--t-xs); color: var(--muted); margin-top: var(--s1); }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=search], input[type=tel], select, textarea {
  width: 100%; min-height: 44px; padding: var(--s2) var(--s3);
  font: inherit; font-size: var(--t-md); color: var(--text);
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--r-md);
}
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid var(--focus); outline-offset: 0; border-color: var(--focus); }
input[aria-invalid="true"] { border-color: var(--danger-ink); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s4); }
.form-grid .field { margin-top: 0; }
.form-grid .span-2 { grid-column: 1 / -1; }
.form-error { color: var(--danger-ink); font-size: var(--t-sm); min-height: 1.5em; margin-top: var(--s3); }
.form-error:empty { min-height: 0; margin: 0; }
.seg { display: inline-flex; border: 1px solid var(--line-strong); border-radius: var(--r-md); overflow: hidden; }
.seg label { margin: 0; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: inline-flex; align-items: center; min-height: 40px; padding: 0 var(--s4); font-weight: 600; font-size: var(--t-sm); cursor: pointer; color: var(--muted); }
.seg input:checked + span { background: var(--brand); color: var(--on-brand); }
.seg input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: -3px; }
.q-sort { display: flex; align-items: center; gap: var(--s3); margin: var(--s2) 0 var(--s3); }
.q-filters { margin-top: var(--s3); }
.q-filters summary { display: inline-flex; align-items: center; gap: var(--s2); min-height: 40px; font-weight: 600; font-size: var(--t-sm); cursor: pointer; color: var(--text); }
.q-filters .chips { margin-top: var(--s2); }
.q-filter-on:not(:empty) { padding: 2px var(--s2); border-radius: var(--r-full); background: var(--brand); color: var(--on-brand); font-size: var(--t-xs); }
.q-sort .label { margin: 0; }

/* ------------------------------------------------------------- gate */
body.gated { display: flex; min-height: 100vh; align-items: center; justify-content: center; padding: var(--s4);
  background: radial-gradient(1200px 600px at 20% -10%, var(--brand-tint), transparent 60%), var(--bg); }
#gate { width: 100%; max-width: 400px; }
.gate-card { background: var(--surface); border-radius: var(--r-lg); padding: var(--s6) var(--s5); box-shadow: var(--shadow-lg); }
.gate-card h1 { font-size: var(--t-xl); margin: var(--s5) 0 var(--s2); }
.gate-card > p.muted { font-size: var(--t-sm); margin-bottom: var(--s5); }
.gate-card form { display: block; }
.gate-card .btn-block { margin-top: var(--s4); }
.gate-card .btn-ghost.btn-block { margin-top: var(--s2); }
.gate-brand { display: flex; align-items: center; gap: var(--s3); font-weight: 600; font-size: var(--t-sm); color: var(--muted); }
.mark {
  display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto;
  height: 32px; padding: 0 var(--s2); border-radius: var(--r-sm);
  background: #1a3a8c; color: #fff; font-weight: 900; font-style: italic; letter-spacing: .02em; font-size: 15px;
  box-shadow: inset 0 0 0 2px #1a3a8c, inset 0 0 0 3px rgba(255, 255, 255, .85);
}

/* ----------------------------------------------------------- app bar */
#appbar { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 30; }
.appbar-inner { max-width: 1440px; margin: 0 auto; padding: var(--s2) var(--s4); display: flex; align-items: center; gap: var(--s3); flex-wrap: wrap; min-height: 60px; }
.brand { display: inline-flex; align-items: center; gap: var(--s2); text-decoration: none; color: var(--text); font-weight: 700; font-size: var(--t-lg); }
.appnav { display: flex; gap: var(--s1); flex-wrap: wrap; }
.appnav a { display: inline-flex; align-items: center; min-height: 40px; padding: 0 var(--s3); border-radius: var(--r-md); text-decoration: none; color: var(--muted); font-weight: 600; font-size: var(--t-sm); }
.appnav a:hover { color: var(--text); background: var(--surface-2); }
.appnav a[aria-current="page"] { color: var(--brand-ink); background: var(--brand-tint); }
.bar-actions { margin-left: auto; display: flex; align-items: center; gap: var(--s2); }
.who { display: flex; align-items: center; gap: var(--s2); }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--brand-tint); color: var(--brand-ink); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: var(--t-xs); }
.who-text { display: flex; flex-direction: column; line-height: 1.2; }
.who-name { font-size: var(--t-sm); font-weight: 600; }
.who-role { font-size: var(--t-xs); color: var(--muted); text-transform: capitalize; }

.page { max-width: 1440px; margin: 0 auto; padding: var(--s4); }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); flex-wrap: wrap; margin-bottom: var(--s4); }
.page-head h1 { font-size: var(--t-xl); }

/* ------------------------------------------------------------- cards */
.card { background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); border: 1px solid var(--line); padding: var(--s4); }
.card-title { font-size: var(--t-md); font-weight: 700; display: flex; align-items: center; justify-content: space-between; gap: var(--s2); margin-bottom: var(--s3); }
.card-title .muted { font-weight: 500; font-size: var(--t-sm); }
.empty-state { text-align: center; padding: var(--s7) var(--s4); color: var(--muted); }
.empty-state strong { display: block; color: var(--text); font-size: var(--t-lg); margin-bottom: var(--s1); }

/* pills / badges */
.pill { display: inline-flex; align-items: center; gap: var(--s1); padding: 2px var(--s2); border-radius: var(--r-full); font-size: var(--t-xs); font-weight: 700; letter-spacing: .02em; background: var(--surface-2); color: var(--muted); white-space: nowrap; }
.pill.sold { background: var(--success-tint); color: var(--success-ink); }
.pill.unsold { background: var(--surface-2); color: var(--muted); }
.pill.icon { background: var(--gold); color: var(--on-gold); }
.pill.no { background: var(--danger-tint); color: var(--danger-ink); }
.pill.live { background: var(--success); color: #fff; }
.pill.live .dot { width: 8px; height: 8px; border-radius: 50%; background: #fff; animation: pulse 1.4s ease-in-out infinite; }
.pill.role-owner { background: var(--brand-tint); color: var(--brand-ink); }
.pill.role-auctioneer { background: var(--gold-tint); color: var(--gold-ink); }
@keyframes pulse { 50% { opacity: .35; } }

/* toast + reconnecting */
#toast { position: fixed; left: 0; right: 0; margin: 0 auto; width: max-content; bottom: var(--s5); transform: translateY(20px); opacity: 0; pointer-events: none; z-index: 200;
  background: var(--text); color: var(--bg); padding: var(--s3) var(--s4); border-radius: var(--r-md); box-shadow: var(--shadow-lg); font-weight: 600; font-size: var(--t-sm);
  max-width: calc(100vw - 32px); transition: opacity .2s ease, transform .2s ease; }
#toast.show { opacity: 1; transform: translateY(0); }
#toast.ok { background: var(--success); color: #fff; }
#toast.err { background: var(--danger); color: #fff; }
#reconnecting { position: fixed; right: var(--s4); bottom: var(--s4); z-index: 190; display: none; align-items: center; gap: var(--s2);
  background: var(--gold-tint); color: var(--gold-ink); border: 1px solid var(--gold); padding: var(--s1) var(--s3); border-radius: var(--r-full); font-size: var(--t-xs); font-weight: 700; }
#reconnecting.show { display: inline-flex; }
#reconnecting .dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; animation: pulse 1s ease-in-out infinite; }

/* -------------------------------------------------------------- modal */
.modal-back { position: fixed; inset: 0; z-index: 100; background: var(--backdrop); display: flex; align-items: center; justify-content: center; padding: var(--s4); }
.modal { background: var(--surface); color: var(--text); border-radius: var(--r-lg); box-shadow: var(--shadow-lg); width: 100%; max-height: calc(100vh - 32px); display: flex; flex-direction: column; }
.modal:focus { outline: none; }
.modal-sm { max-width: 440px; } .modal-md { max-width: 600px; } .modal-lg { max-width: 860px; } .modal-xl { max-width: 1400px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); padding: var(--s4) var(--s5); border-bottom: 1px solid var(--line); }
.modal-head h2 { font-size: var(--t-lg); }
.modal-body { padding: var(--s5); overflow: auto; }
.modal-foot { display: flex; justify-content: flex-end; gap: var(--s2); flex-wrap: wrap; padding: var(--s4) var(--s5); border-top: 1px solid var(--line); }
.confirm-text { font-size: var(--t-md); }
.confirm-text strong { font-weight: 700; }
.secret { display: flex; gap: var(--s2); align-items: center; margin-top: var(--s3); }
.secret code { flex: 1; font-size: var(--t-lg); padding: var(--s2) var(--s3); user-select: all; overflow-wrap: anywhere; }

/* -------------------------------------------------------------- table */
.toolbar { display: flex; gap: var(--s2); align-items: flex-end; flex-wrap: wrap; margin-bottom: var(--s3); }
.toolbar .grow { flex: 1 1 220px; }
.toolbar .field { margin: 0; }
.toolbar .end { margin-left: auto; display: flex; gap: var(--s2); flex-wrap: wrap; }
.table-scroll { position: relative; overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: var(--t-sm); }
th, td { text-align: left; padding: var(--s2) var(--s3); border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-size: var(--t-xs); text-transform: uppercase; letter-spacing: .04em; color: var(--muted); background: var(--surface-2); font-weight: 700; white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: var(--bg); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
td.actions { text-align: right; white-space: nowrap; }
td.actions .btn + .btn { margin-left: var(--s1); }
td select { min-width: 140px; }
.th-sort {
  display: inline-flex; align-items: center; gap: 2px; margin: 0; padding: 0;
  border: 0; background: none; color: inherit; font: inherit; font-weight: 700;
  letter-spacing: inherit; text-transform: inherit; cursor: pointer; min-height: 28px;
}
.th-sort:hover, .th-sort:focus-visible { color: var(--brand-ink); }
.th-sort .th-mark { font-size: 10px; color: var(--brand-ink); min-width: 0.9em; }
.players-table { min-width: 1480px; }
.players-table .check-col { width: 40px; text-align: center; }
.players-table .check-col input { width: 18px; height: 18px; cursor: pointer; }
.players-table .cell-input {
  width: 100%; min-width: 72px; max-width: 160px; min-height: 36px;
  padding: 4px 8px; font: inherit; font-size: var(--t-sm); color: var(--text);
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--r-sm);
}
.players-table td.num .cell-input { max-width: 88px; text-align: right; }
.players-table select.cell-input { max-width: 148px; }
.players-table tr.pl-editing td { background: var(--brand-tint); vertical-align: top; }
.players-table tr.pl-selected td { background: var(--surface-2); }
.players-table tr.pl-editing.pl-selected td { background: var(--brand-tint); }
.players-table .cell-check { min-height: 36px; }
.bulk-edit {
  display: flex; flex-wrap: wrap; gap: var(--s3); align-items: flex-end;
  margin: 0 0 var(--s3); padding: var(--s3); border: 1px solid var(--line);
  border-radius: var(--r-lg); background: var(--surface);
}
.bulk-edit-fields { display: flex; flex-wrap: wrap; gap: var(--s2); flex: 1 1 480px; }
.bulk-edit-fields .field { margin: 0; min-width: 140px; }
.bulk-edit-actions { display: flex; flex-wrap: wrap; gap: var(--s2); align-items: center; margin-left: auto; }
.bulk-count { font-size: var(--t-sm); color: var(--muted); font-weight: 600; min-width: 7rem; }
#pl-inline-err:empty { display: none; }

/* Players tab: search, Filters button and view switch on one bar; Registered switch below; the
   other filters sit in a panel behind the Filters button. Card view mirrors the public Players page. */
#panel-players [hidden] { display: none !important; }
.pl-bar { display: flex; flex-wrap: wrap; gap: var(--s2); align-items: center; margin-bottom: var(--s3); }
.pl-bar .grow { flex: 1 1 240px; margin: 0; }
.pl-bar .end { margin-left: auto; display: flex; gap: var(--s2); flex-wrap: wrap; }
.pl-filter-btn { display: inline-flex; align-items: center; gap: var(--s2); min-height: 44px; }
.pl-filter-btn[aria-expanded="true"] { border-color: var(--brand-ink); color: var(--brand-ink); }
.count-badge {
  display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: var(--r-full);
  background: var(--brand); color: var(--on-brand); font-size: var(--t-xs); font-weight: 700;
}
.seg-view label > span { gap: var(--s1); min-height: 44px; padding: 0 var(--s3); }
.seg .seg-n, .seg .seg-text { display: inline; min-height: 0; padding: 0; color: inherit; cursor: inherit; }
.seg-view svg { flex: none; }
.seg-fill { display: flex; width: 100%; max-width: 760px; margin-bottom: var(--s3); }
.seg-fill label { flex: 1 1 auto; }
.seg-fill label + label > span { border-left: 1px solid var(--line-strong); }
.seg-fill label > span { justify-content: center; width: 100%; min-height: 44px; padding: 0 var(--s3); white-space: nowrap; color: var(--text); }
.pl-show-mark { height: 0; }
.pl-show {
  position: sticky; top: var(--pin-top, 0); z-index: 20; background: var(--surface);
  transition: transform .2s ease, box-shadow .2s ease;
}
.pl-show.is-stuck { box-shadow: var(--shadow-sm), 0 6px 16px rgba(0, 0, 0, .25); }
.pl-show.is-away { transform: translateY(calc(-100% - var(--pin-top, 0px) - 8px)); box-shadow: none; }
@media (prefers-reduced-motion: reduce) { .pl-show { transition: none; } }
.seg-n { margin-left: var(--s1); font-weight: 500; font-variant-numeric: tabular-nums; opacity: .85; }
.pl-filters {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: var(--s3);
  margin-bottom: var(--s3); padding: var(--s3); border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface);
}
.pl-filters .field { margin: 0; }
.pl-filters-foot { grid-column: 1 / -1; }
.pill.reg { background: var(--brand-tint); color: var(--brand-ink); }

.pl-cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: var(--s3); }
.pl-cards .empty-state { grid-column: 1 / -1; }
.pl-card { display: flex; flex-direction: column; min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.pl-card.is-out { border-color: var(--danger-ink); }
.pl-card-media { position: relative; aspect-ratio: 4 / 5; overflow: hidden; background: var(--surface-2); }
.pl-card-photo { position: absolute; inset: 0; display: block; width: 100%; height: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
.pl-card-photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.pl-card-photo:focus-visible { outline: 3px solid var(--focus); outline-offset: -3px; }
.pl-card.is-out .pl-card-photo img { filter: grayscale(1); opacity: .55; }
.pl-card-serial, .pl-card-edit { position: absolute; top: var(--s2); }
.pl-card-serial {
  left: var(--s2); padding: 2px var(--s2); border-radius: var(--r-sm); pointer-events: none;
  background: rgba(5, 11, 26, .78); color: #fff; font-size: var(--t-xs); font-weight: 700; font-variant-numeric: tabular-nums;
}
.pl-card-edit {
  right: var(--s2); display: grid; place-items: center; width: 40px; height: 40px; padding: 0; cursor: pointer;
  border: 1px solid rgba(255, 255, 255, .35); border-radius: var(--r-full); background: rgba(5, 11, 26, .72); color: #fff;
}
.pl-card-edit:hover { background: rgba(5, 11, 26, .9); }
.pl-card-edit:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.pl-card-flags { position: absolute; left: var(--s2); right: var(--s2); bottom: var(--s2); display: flex; flex-wrap: wrap; gap: var(--s1); pointer-events: none; }
.pl-card-flags .pill { box-shadow: 0 1px 4px rgba(0, 0, 0, .35); }
.pl-card-flags .pill.no, .pl-card-flags .pill.reg, .pl-card-flags .pill.sold { background: var(--surface); }
.pl-card-flags .pill.no { color: var(--danger-ink); }
.pl-card-flags .pill.reg { color: var(--brand-ink); }
.pl-card-flags .pill.sold { color: var(--success-ink); }
.pl-card-flags .pill.np { background: var(--surface); color: var(--gold-ink); }
.pill.retired { background: var(--surface-2); color: var(--text); }
.pl-card-flags .pill.retired { background: var(--text); color: var(--surface); }
.pl-card.is-selected { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand); }
.pl-card-check {
  position: absolute; top: var(--s2); left: var(--s2); z-index: 1; display: grid; place-items: center; width: 40px; height: 40px;
  border-radius: var(--r-md); background: rgba(5, 11, 26, .72); border: 1px solid rgba(255, 255, 255, .35); cursor: pointer;
}
.pl-card-check input { width: 22px; height: 22px; margin: 0; accent-color: var(--brand); cursor: pointer; }
.pl-card-check:focus-within { outline: 3px solid var(--focus); outline-offset: 2px; }
.pl-card-media .pl-card-serial { left: calc(var(--s2) + 40px + var(--s1)); top: calc(var(--s2) + 9px); }
.pl-card-bar {
  position: sticky; bottom: var(--s2); z-index: 5; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s2);
  margin-top: var(--s3); padding: var(--s2) var(--s3); border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface);
}
.pl-card-bar.has-sel { border-color: var(--brand); box-shadow: var(--shadow-lg); }
.pl-card-bar-sel, .pl-card-bar-set { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); }
.pl-card-bar .bulk-count { min-width: 6.5rem; }
.pl-card-bar-set .btn { min-height: 40px; }
.st-play { background: var(--success-tint); color: var(--success-ink); border-color: var(--success-ink); }
.st-np { background: var(--gold-tint); color: var(--gold-ink); border-color: var(--gold-ink); }
.st-out { background: var(--danger-tint); color: var(--danger-ink); border-color: var(--danger-ink); }
.st-retired { background: var(--surface-2); color: var(--text); border-color: var(--line-strong); }
.pl-card-bar-set .btn:hover:not(:disabled) { filter: brightness(.96); }
.pl-card-body { flex: 1; display: grid; align-content: start; gap: 2px; padding: var(--s2) var(--s3); }
.pl-card-name { font-size: var(--t-md); font-weight: 700; line-height: 1.25; overflow-wrap: anywhere; }
.pl-card-name .muted { font-size: var(--t-xs); font-weight: 600; white-space: nowrap; }
.pl-card-meta { font-size: var(--t-xs); color: var(--muted); }
.pl-card-cat { display: grid; gap: 2px; padding: 0 var(--s2) var(--s2); }
.pl-card-cat select { width: 100%; min-width: 0; min-height: 36px; font-size: var(--t-xs); }
.pl-card-cat select:disabled { opacity: .6; cursor: progress; }
.pl-card-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: var(--s1); padding: 0 var(--s2) var(--s2); }
.tog {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s1); min-height: 36px; padding: 0 var(--s2);
  border: 1px solid var(--line-strong); border-radius: var(--r-md); background: transparent; color: var(--text);
  font-size: var(--t-xs); font-weight: 700; white-space: nowrap; cursor: pointer;
}
.tog svg { color: var(--muted); }
.tog:hover { background: var(--surface-2); }
.tog:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; }
.tog[aria-disabled="true"] { opacity: .6; cursor: progress; }
.tog-icon[aria-pressed="true"] { background: var(--gold); border-color: var(--gold); color: var(--on-gold); }
.tog-out[aria-pressed="true"] { background: var(--danger-tint); border-color: var(--danger-ink); color: var(--danger-ink); }
.tog[aria-pressed="true"] svg { color: currentColor; }
.pl-card-contact { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s1); padding: 0 var(--s2) var(--s2); }
.contact-link {
  display: inline-grid; place-items: center; min-width: 36px; height: 36px; padding: 0 var(--s2);
  border: 1px solid var(--line-strong); border-radius: var(--r-md); text-decoration: none;
}
.contact-link:hover { background: var(--surface-2); }
.contact-link:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; }
.contact-wa { color: var(--success-ink); }
.contact-call { color: var(--brand-ink); }
.num-contact { display: inline-flex; align-items: center; justify-content: flex-end; gap: var(--s2); }
.num-contact .contact-link { min-width: 32px; height: 32px; padding: 0; }
@media (max-width: 640px) {
  .pl-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s2); }
  .pl-card-bar-set { width: 100%; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  /* Phones: one slim row until a card is ticked, then the four status buttons */
  .pl-card-bar:not(.has-sel) .pl-card-bar-set { display: none; }
  .pl-card-bar-sel { width: 100%; flex-wrap: nowrap; }
  .pl-card-bar-sel .bulk-count { min-width: 0; flex: 1 1 auto; }
  .pl-card-bar-set .btn { padding: var(--s1) var(--s2); white-space: normal; }
  .pl-bar .grow { flex: 1 1 0; min-width: 0; }
  .pl-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s2); }
  .pl-bar .end { margin-left: 0; width: 100%; }
  .pl-bar .end .btn { flex: 1 1 auto; }
  .seg-view .seg-text, .pl-filter-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .seg-fill label > span { padding: 0 var(--s2); font-size: var(--t-xs); }
  /* Four tabs (All / Registered / Playing / Not registered): count under the label */
  .pl-show label > span { flex-direction: column; gap: 0; padding: var(--s1); line-height: 1.15; white-space: normal; text-align: center; }
  .pl-show .seg-n { margin-left: 0; }
}
#pl-inline-err { margin: 0 0 var(--s3); }
.toolbar input[type=number] { width: 5.5rem; min-height: 44px; padding: var(--s2) var(--s3); font: inherit; font-size: var(--t-md); color: var(--text); background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--r-md); }
.cell-media { white-space: nowrap; display: flex; align-items: center; gap: var(--s2); min-width: 0; }
.thumb { width: 36px; height: 36px; border-radius: var(--r-sm); object-fit: cover; background: var(--surface-2); flex: 0 0 auto; }
.thumb.logo { object-fit: contain; background: #000; }
.thumb.portrait { width: 36px; height: 45px; object-position: top center; }
.thumb-btn { padding: 0; border: 0; background: none; border-radius: var(--r-sm); cursor: zoom-in; display: inline-flex; min-width: 36px; min-height: 36px; }
.sub { display: block; font-size: var(--t-xs); color: var(--muted); }
.table-foot { display: flex; justify-content: space-between; gap: var(--s3); flex-wrap: wrap; padding: var(--s3) var(--s1) 0; font-size: var(--t-sm); color: var(--muted); }
.table-foot strong { color: var(--text); }

/* tabs */
.tabs { display: flex; gap: var(--s1); border-bottom: 1px solid var(--line); margin-bottom: var(--s4); overflow-x: auto; }
.tabs [role=tab] { background: none; border: 0; border-bottom: 3px solid transparent; padding: var(--s3) var(--s4); min-height: 44px; font-weight: 600; color: var(--muted); cursor: pointer; white-space: nowrap; }
.tabs [role=tab]:hover { color: var(--text); }
.tabs [role=tab][aria-selected="true"] { color: var(--brand-ink); border-bottom-color: var(--brand-ink); }
.stat-row { display: flex; gap: var(--s3); flex-wrap: wrap; margin-bottom: var(--s4); }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: var(--s2) var(--s4); min-width: 140px; }
.stat .k { display: block; font-size: var(--t-xs); color: var(--muted); text-transform: uppercase; letter-spacing: .04em; font-weight: 700; }
.stat .v { display: block; font-size: var(--t-xl); font-weight: 800; font-variant-numeric: tabular-nums; }

/* chips */
.chips { display: flex; gap: var(--s1); flex-wrap: wrap; }
.chip { min-height: 32px; padding: 0 var(--s3); border-radius: var(--r-full); border: 1px solid var(--line-strong); background: var(--surface); color: var(--text); font-size: var(--t-xs); font-weight: 600; cursor: pointer; }
.chip:hover { background: var(--surface-2); }
.chip[aria-pressed="true"] { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }

/* =============================================================== DESK */
.desk { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s4); }
.desk > *, .desk-main > *, .current > * { min-width: 0; }
.team-strip { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: var(--s2); }
.team-chip { display: flex; align-items: center; gap: var(--s2); padding: var(--s2); border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); min-width: 0; }
.team-chip img { width: 40px; height: 40px; object-fit: contain; border-radius: var(--r-sm); background: #000; flex: 0 0 auto; }
.team-chip .tname { font-size: var(--t-xs); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.team-chip .tbal { font-weight: 800; font-variant-numeric: tabular-nums; font-size: var(--t-sm); }
.team-chip .tcount { font-size: var(--t-xs); color: var(--muted); }
.team-chip .tinfo { min-width: 0; line-height: 1.3; }
.team-chip.low .tbal { color: var(--danger-ink); }

.desk-main { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: var(--s4); align-items: start; }
.queue { position: sticky; top: 76px; display: flex; flex-direction: column; max-height: calc(100vh - 92px); }
.queue .check-row { margin: var(--s1) 0 0; }
.queue .chips { margin: var(--s2) 0 var(--s3); }
.queue-list { list-style: none; margin: 0 calc(var(--s2) * -1); padding: 0 var(--s2); overflow-y: auto; flex: 1; min-height: 120px; }
.queue-list li + li { margin-top: var(--s1); }
.q-item { width: 100%; display: flex; align-items: center; gap: var(--s3); text-align: left; padding: var(--s2); border-radius: var(--r-md); border: 1px solid transparent; background: transparent; color: var(--text); cursor: pointer; min-height: 56px; }
.q-item:hover { background: var(--surface-2); }
.q-item[aria-current="true"] { background: var(--brand-tint); border-color: var(--brand-ink); }
.q-item img { width: 44px; height: 44px; border-radius: var(--r-sm); object-fit: cover; object-position: top center; background: var(--surface-2); flex: 0 0 auto; }
.q-item .q-name { font-weight: 600; font-size: var(--t-sm); display: block; }
.q-item .q-meta { font-size: var(--t-xs); color: var(--muted); }
.q-serial { color: var(--brand-ink); font-weight: 700; font-variant-numeric: tabular-nums; margin-right: var(--s1); }
.queue-count { font-size: var(--t-xs); color: var(--muted); padding-top: var(--s2); border-top: 1px solid var(--line); margin-top: var(--s2); }

.current { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s4); }
.pcard { position: relative; display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: var(--s5); align-items: center; }
.pcard-photo { position: relative; }
.pcard-photo img { width: 160px; height: auto; aspect-ratio: 4 / 5; object-fit: cover; object-position: top center; border-radius: var(--r-md); background: var(--surface-2); display: block; }
.icon-badge { position: absolute; top: var(--s2); left: var(--s2); background: var(--gold); color: var(--on-gold); font-weight: 900; font-size: var(--t-xs); letter-spacing: .06em; padding: 2px var(--s2); border-radius: var(--r-full); box-shadow: var(--shadow-md); display: inline-flex; gap: 4px; align-items: center; }
.pcard h2 { font-size: var(--t-2xl); font-weight: 800; letter-spacing: -.01em; padding-right: var(--s7); }
.pcard .serial { color: var(--brand-ink); font-variant-numeric: tabular-nums; }
.facts { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s5); margin-top: var(--s3); }
.facts div { min-width: 0; }
.facts dt { font-size: var(--t-xs); color: var(--muted); text-transform: uppercase; letter-spacing: .04em; font-weight: 700; }
.facts dd { margin: 0; font-weight: 700; }
.facts dd.big { font-size: var(--t-xl); font-variant-numeric: tabular-nums; }
.pcard-clear { position: absolute; top: 0; right: 0; }
.sold-banner { display: flex; align-items: center; gap: var(--s4); padding: var(--s4); border-radius: var(--r-lg); background: var(--success-tint); color: var(--success-ink); border: 1px solid var(--success); }
.sold-banner img { width: 56px; height: 56px; border-radius: var(--r-md); object-fit: contain; background: #000; }
.sold-banner .label-big { font-size: var(--t-xl); font-weight: 900; letter-spacing: .04em; }
.sold-banner .amount { font-size: var(--t-xl); font-weight: 800; color: var(--text); margin-left: auto; font-variant-numeric: tabular-nums; }

.controls .amount-row { display: flex; gap: var(--s3); align-items: flex-end; flex-wrap: wrap; }
.controls .amount-row .field { flex: 1 1 220px; margin: 0; }
.controls input#bid { font-size: var(--t-xl); font-weight: 800; font-variant-numeric: tabular-nums; min-height: 52px; }
.bump { display: flex; gap: var(--s1); flex-wrap: wrap; }
.team-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: var(--s2); margin: var(--s2) 0 0; padding: 0; border: 0; }
.team-tiles legend { padding: 0; margin-bottom: var(--s2); font-size: var(--t-sm); font-weight: 600; }
.tile { position: relative; display: flex; align-items: center; gap: var(--s2); padding: var(--s2); border: 2px solid var(--line); border-radius: var(--r-md); background: var(--surface); cursor: pointer; min-height: 60px; margin: 0; font-weight: 400; }
.tile input { position: absolute; opacity: 0; pointer-events: none; }
.tile img { width: 44px; height: 44px; object-fit: contain; background: #000; border-radius: var(--r-sm); flex: 0 0 auto; }
.tile .tname { font-size: var(--t-xs); font-weight: 700; line-height: 1.25; }
.tile .tbal { font-size: var(--t-sm); font-variant-numeric: tabular-nums; color: var(--muted); }
.tile:hover { border-color: var(--line-strong); }
.tile:has(input:checked) { border-color: var(--brand-ink); background: var(--brand-tint); }
.tile:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }
.tile:has(input:disabled) { opacity: .5; cursor: not-allowed; }
.tile .check { position: absolute; top: 4px; right: 4px; width: 20px; height: 20px; border-radius: 50%; background: var(--brand); color: var(--on-brand); display: none; align-items: center; justify-content: center; }
.tile:has(input:checked) .check { display: inline-flex; }
.after-sale { margin-top: var(--s3); padding: var(--s3) var(--s4); border-radius: var(--r-md); background: var(--surface-2); font-size: var(--t-sm); display: flex; gap: var(--s5); flex-wrap: wrap; }
.after-sale strong { font-variant-numeric: tabular-nums; }
.after-sale .neg { color: var(--danger-ink); }
.action-row { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: var(--s2); margin-top: var(--s4); }
.action-row .btn { min-height: 52px; font-size: var(--t-md); }
.kbd-hint { font-size: var(--t-xs); color: var(--muted); margin-top: var(--s2); }
kbd { font-family: var(--mono); font-size: .9em; padding: 0 4px; border: 1px solid var(--line-strong); border-radius: 4px; background: var(--surface-2); }
.live-toggle .btn { min-height: 40px; }

/* ============================================================= MANAGE */
.photo-large { display: block; margin: 0 auto; max-width: 100%; max-height: 60vh; object-fit: contain; border-radius: var(--r-md); background: var(--surface-2); }
.kv { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: var(--s3); margin-top: var(--s4); }
.kv dt { font-size: var(--t-xs); color: var(--muted); text-transform: uppercase; letter-spacing: .04em; font-weight: 700; }
.kv dd { margin: 0; font-weight: 600; }
.balance-box { margin-top: var(--s4); padding: var(--s3) var(--s4); border-radius: var(--r-md); background: var(--brand-tint); font-size: var(--t-sm); display: grid; gap: var(--s1); }
.balance-box .row { display: flex; justify-content: space-between; gap: var(--s3); }
.balance-box strong { font-variant-numeric: tabular-nums; }

/* ========================================================== responsive */
@media (max-width: 1024px) {
  .desk-main { grid-template-columns: minmax(0, 1fr); }
  .queue { position: static; max-height: 460px; }
}
@media (max-width: 640px) {
  .page { padding: var(--s3); }
  .appbar-inner { padding: var(--s2) var(--s3); gap: var(--s2); }
  .who-text { display: none; }
  .brand-name { font-size: var(--t-md); }
  .bar-actions { order: 5; margin-left: 0; width: 100%; }
  .appnav { order: 4; width: 100%; }
  .brand { margin-right: auto; }
  .pcard { grid-template-columns: 96px minmax(0, 1fr); gap: var(--s3); }
  .pcard-photo img { width: 96px; }
  .pcard h2 { font-size: var(--t-xl); }
  .facts dd.big { font-size: var(--t-lg); }
  #appbar { position: static; }
  .queue { max-height: 420px; }
  .team-strip { display: flex; overflow-x: auto; scroll-snap-type: x proximity; padding-bottom: var(--s1); }
  .team-strip .team-chip { flex: 0 0 168px; scroll-snap-align: start; }
  .team-tiles { grid-template-columns: 1fr 1fr; }
  .tile { padding: var(--s1) var(--s2); gap: var(--s1); }
  .tile img { width: 32px; height: 32px; }
  .action-row { grid-template-columns: 1fr 1fr; }
  .action-row .btn:first-child { grid-column: 1 / -1; }
  .form-grid { grid-template-columns: 1fr; }
  .modal-back { padding: var(--s2); align-items: flex-end; }
  .modal-body { padding: var(--s4); }
  .modal-head, .modal-foot { padding: var(--s3) var(--s4); }
  .sold-banner { flex-wrap: wrap; }
  .sold-banner .amount { margin-left: 0; }
  .toolbar .end { margin-left: 0; }
}

/* ============================================================ DISPLAY
 * LED wall / projector view. Always dark; sized in rem with a root tied to the
 * smaller of width and height, so a 16:9 wall of any resolution scales the same
 * (16px at 1920x1080) and wide or short screens never overflow. Read from 20 m:
 * the photo and name dominate, every figure people act on is at least 1.6rem. */
html.display-root { font-size: clamp(6px, min(calc(100vw / 120), calc(100vh / 67.5)), 40px); color-scheme: dark; }

/* Type: Outfit (the brand's head face, self-hosted) with tabular figures, so prices
 * never shift as digits change. Not monospace: mono reads technical and narrow at distance.
 * Scale (rem): 1.25 meta, 1.5 labels, 2 secondary, 2.5 team figures, 6 name, 7.5 price.
 * Colour: flat near-black blue with one soft glow; no photo behind text. On an indoor LED,
 * big bright fills glare and bloom, so the price is bright type on a dark panel instead. */
@font-face { font-family: "Outfit"; src: url("../assets/fonts/outfit-latin-var.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
body.display, .modal-back.dark {
  --d-bg: #060a17; --d-text: #f4f6fb; --d-muted: rgba(226, 232, 245, .72); --d-faint: rgba(226, 232, 245, .5);
  --d-surface: rgba(255, 255, 255, .045); --d-surface-2: rgba(255, 255, 255, .08); --d-line: rgba(255, 255, 255, .11);
  --d-gold: #ffc940; --d-green: #3ddc84; --d-blue: #8fb4ff; --d-red: #ff8a80;
  font-family: "Outfit", var(--font); font-variant-numeric: tabular-nums; }
/* Night stadium behind everything, under a dark veil (heavier at the top and bottom where the header
   and team strip sit). Muted text (72% white) stays 5.4:1 or better even over a floodlight.
   72 KB WebP; phones and portrait screens get 30 KB. */
body.display { --d-veil: linear-gradient(rgba(6, 10, 23, .8), rgba(6, 10, 23, .73) 40%, rgba(6, 10, 23, .75) 70%, rgba(6, 10, 23, .9));
  background: var(--d-veil), url("../assets/stadium-bg-2560.webp") center 65% / cover no-repeat, var(--d-bg);
  background-attachment: fixed;
  color: var(--d-text); min-height: 100vh; overflow-x: hidden; }
@media (max-width: 1100px), (orientation: portrait) {
  body.display { background-image: var(--d-veil), url("../assets/stadium-bg-1280.webp"); }
}
body.display.gated #gate { font-size: 16px; font-family: var(--font); }
body.display.gated .gate-card { --surface: #141b30; --text: #e8ecf6; --muted: #a6b0cb; --surface-2: #1c2541; --line-strong: #44517a; --brand: #3556b8; --brand-hover: #4566c8; --focus: #a9bdff; --danger-ink: #ff9a8f; color: var(--text); }
.d-shade { min-height: 100vh; display: flex; flex-direction: column; }

.d-head { display: flex; align-items: center; gap: 1.5rem; padding: 1.5rem 3rem .5rem; }
.d-brand { width: auto; height: 3.5rem; flex: 0 0 auto; border-radius: .75rem; }
.d-status { display: inline-flex; align-items: center; gap: .75rem; font-size: 1.5rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; padding: .45rem 1.25rem; border-radius: 999px; background: var(--d-surface-2); color: var(--d-muted); }
.d-status .dot { width: .85rem; height: .85rem; border-radius: 50%; background: var(--d-faint); }
.d-status.live { background: rgba(61, 220, 132, .14); color: var(--d-green); }
.d-status.live .dot { background: var(--d-green); box-shadow: 0 0 .75rem var(--d-green); animation: pulse 1.4s ease-in-out infinite; }
.d-title { font-size: 1.75rem; font-weight: 600; color: var(--d-muted); }
.d-tools { margin-left: auto; display: flex; gap: .5rem; transition: opacity .3s ease; }
/* Controls and pointer show only while someone is using the mouse or keyboard. */
body.display:not(.tools-on) .d-tools { opacity: 0; pointer-events: none; }
body.display:not(.tools-on) .d-tools:focus-within { opacity: 1; pointer-events: auto; }
/* .pointer-idle is set only by the signed-in display, so the login screen keeps its pointer. */
body.display.pointer-idle, body.display.pointer-idle * { cursor: none; }
.d-tools .btn { font-size: 14px; min-height: 40px; background: var(--d-surface-2); color: #fff; border: 1px solid var(--d-line); font-family: var(--font); }
.d-tools .btn:hover { background: rgba(255, 255, 255, .16); }
body.display :focus-visible { outline: 3px solid var(--d-gold); outline-offset: 3px; }

.d-stage { flex: 1; display: flex; flex-direction: column; gap: 1.5rem; align-items: center; justify-content: center; padding: 1rem 3rem; min-height: 0; }

/* welcome / between players: season title and live auction numbers */
.welcome { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 1.5rem; width: 100%; max-width: 100rem; }
.w-logo { width: auto; height: 7rem; border-radius: 1.5rem; }
.w-kicker { font-size: 1.5rem; font-weight: 600; letter-spacing: .24em; text-transform: uppercase; color: var(--d-gold); margin-top: .5rem; }
.w-title { font-size: 6.5rem; font-weight: 800; line-height: .95; letter-spacing: -.025em; text-wrap: balance; }
.w-title span { display: block; font-size: .4em; font-weight: 500; letter-spacing: 0; color: var(--d-muted); margin-top: 1rem; }
.w-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); width: min(100%, 76rem); margin: 1.5rem 0 0; border-radius: 1.5rem; overflow: hidden; background: var(--d-surface); border: 1px solid var(--d-line); }
.w-stat { display: flex; flex-direction: column-reverse; gap: .5rem; padding: 2rem 1rem; }
.w-stat + .w-stat { border-left: 1px solid var(--d-line); }
.w-stat dt { font-size: 1.25rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--d-muted); }
.w-stat dd { margin: 0; font-size: 3.5rem; font-weight: 700; line-height: 1; }
.w-stat:last-child dd { color: var(--d-gold); }
.w-next { display: inline-flex; align-items: center; gap: 1rem; font-size: 1.75rem; font-weight: 500; color: var(--d-muted); margin-top: .5rem; }
.w-next .dot { width: 1rem; height: 1rem; border-radius: 50%; background: var(--d-green); box-shadow: 0 0 .75rem var(--d-green); animation: pulse 1.4s ease-in-out infinite; }
.d-note { font-size: 1.5rem; color: var(--d-muted); }

/* current player: photo left, name, facts and the deal panel right */
.d-player { display: grid; grid-template-columns: auto minmax(0, 62rem); justify-content: center; align-items: center; gap: 4rem; width: 100%; }
.d-photo { position: relative; justify-self: end; }
.d-photo img { display: block; height: min(60vh, 42rem); width: auto; aspect-ratio: 4 / 5; object-fit: cover; object-position: top center; border-radius: 1.5rem; background: #111;
  box-shadow: 0 0 0 1px var(--d-line), 0 2rem 5rem rgba(0, 0, 0, .55); }
.d-player.is-sold .d-photo img { box-shadow: 0 0 0 .35rem var(--d-green), 0 0 3rem rgba(61, 220, 132, .45); }
.d-icon { position: absolute; top: -1.25rem; right: -1.25rem; width: 6rem; height: 6rem; border-radius: 50%; background: var(--d-gold); border: .35rem solid var(--d-bg); display: flex; flex-direction: column; align-items: center; justify-content: center; color: #1a1300; font-weight: 800; font-size: 1.25rem; letter-spacing: .1em; animation: breathe 2.4s ease-in-out infinite; }
.d-icon svg { width: 2.25rem; height: 2.25rem; }
.d-info { display: flex; flex-direction: column; align-items: flex-start; gap: 1.5rem; min-width: 0; }
.d-serial { font-size: 1.5rem; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--d-blue); }
.d-name { font-size: 6rem; font-weight: 800; line-height: .95; letter-spacing: -.025em; text-wrap: balance; overflow-wrap: anywhere; margin-top: -.5rem; }
.d-facts { display: flex; flex-wrap: wrap; gap: 1rem 3.5rem; margin: 0; }
.d-fact { display: flex; flex-direction: column; gap: .3rem; }
.d-fact dt { font-size: 1.25rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--d-muted); }
.d-fact dd { margin: 0; font-size: 2.25rem; font-weight: 600; line-height: 1.1; }
.d-state { width: 100%; margin-top: .5rem; }
@keyframes breathe { 50% { transform: scale(1.05); } }

/* The deal panel: one shape for open, bid, sold and waiting. The price is the hero. */
.d-deal { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 2rem; width: 100%; max-width: 66rem; padding: 1.75rem 2.25rem;
  border-radius: 1.5rem; background: var(--d-surface); border: 2px solid var(--d-line); }
.dd-main { min-width: 0; }
.dd-head { display: flex; align-items: center; gap: 1.25rem; min-height: 2.75rem; }
.dd-label { display: inline-flex; align-items: center; gap: .75rem; font-size: 1.5rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--d-muted); }
.dd-label .dot { width: 1rem; height: 1rem; border-radius: 50%; background: currentColor; animation: pulse 1.2s ease-in-out infinite; }
.dd-count { font-size: 1.25rem; font-weight: 600; color: var(--d-faint); }
.dd-amt { font-size: 7.5rem; font-weight: 800; line-height: 1; letter-spacing: -.03em; margin-top: .5rem; white-space: nowrap; }
.dd-amt small { font-size: 1.75rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--d-muted); margin-right: 1rem; vertical-align: .35em; }
/* Team: big logo on the left, name to its right. */
.dd-team { display: flex; flex-direction: row; align-items: center; gap: 1.25rem; text-align: left; max-width: 28rem; min-width: 0; }
.d-deal .dd-logo { width: 10rem; height: 10rem; object-fit: contain; background: #000; border-radius: 1.5rem; flex: 0 0 auto; }
.d-deal .logo-fallback.dd-logo { font-size: 2.5rem; background: linear-gradient(135deg, #1a3a8c, #0b1a4d); }
.dd-team-name { font-size: 2rem; font-weight: 700; line-height: 1.12; text-wrap: balance; min-width: 0; max-width: 15rem; }
.dd-team-name small { display: block; font-size: 1.25rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--d-muted); margin-bottom: .2rem; }
.d-deal.is-open { border-color: rgba(255, 201, 64, .45); }
.d-deal.is-open .dd-label { color: var(--d-gold); }
.d-deal.is-bid { border-color: var(--d-gold); background: rgba(255, 201, 64, .07); }
.d-deal.is-bid .dd-label, .d-deal.is-bid .dd-amt { color: var(--d-gold); }
.d-deal.is-sold { border-color: var(--d-green); background: rgba(61, 220, 132, .08); animation: pop .5s cubic-bezier(.2, 1.3, .4, 1) both; }
.d-deal.is-sold .dd-amt { color: var(--d-green); }
.dd-chip { display: inline-block; font-size: 1.75rem; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; padding: .3rem 1.1rem; border-radius: .6rem; background: var(--d-green); color: #03130a; }
.d-deal.is-wait .dd-amt { color: var(--d-muted); font-size: 5rem; }
.d-trail { list-style: none; display: flex; flex-wrap: wrap; gap: .75rem; margin: 1rem 0 0; padding: 0; }
.d-trail li { display: inline-flex; gap: .75rem; align-items: baseline; padding: .5rem 1.1rem; border-radius: 999px; background: var(--d-surface-2); font-size: 1.35rem; font-weight: 500; color: var(--d-muted); }
.d-trail strong { font-weight: 700; color: var(--d-text); }
@media (prefers-reduced-motion: no-preference) { .d-deal.is-bid.up .dd-amt { animation: bidUp .45s cubic-bezier(.2, 1.4, .4, 1) both; } }
@keyframes bidUp { from { transform: scale(.92); opacity: .4; } to { transform: scale(1); opacity: 1; } }
@keyframes pop { from { transform: scale(.85); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.d-player.is-sold .d-name { color: var(--d-text); }

/* team strip: one card per team, max bid is the figure owners act on; the leader gets a gold outline */
.d-teams { padding: 1rem 3rem 2rem; }
.d-team-grid { --n: 8; display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: .75rem; }
.d-team { display: flex; flex-direction: column; align-items: stretch; gap: .5rem; padding: 1rem; border-radius: 1.25rem; background: var(--d-surface); border: 2px solid transparent; color: var(--d-text); cursor: pointer; text-align: left; font: inherit; min-width: 0;
  transition: border-color .25s ease, background-color .25s ease; }
.d-team:hover { background: var(--d-surface-2); }
/* Same height for real and skeleton cards (names up to 3 lines), so nothing moves when data lands. */
.d-team { height: 14rem; }
.d-team .thead { display: flex; align-items: center; gap: .6rem; min-width: 0; min-height: 3.4rem; }
.d-team img { width: 3rem; height: 3rem; object-fit: contain; background: #000; border-radius: .6rem; flex: 0 0 auto; }
.d-team .tname { font-size: 1.25rem; font-weight: 700; line-height: 1.12; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
.d-team .tmax { display: block; font-size: 2.5rem; font-weight: 700; line-height: 1; letter-spacing: -.01em; color: var(--d-gold); white-space: nowrap; margin-top: auto; }
.d-team .tmax small { display: block; font-size: 1rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--d-muted); margin-bottom: .3rem; }
.d-team.full .tmax { color: var(--d-red); font-size: 1.75rem; }
.d-team .tmeta { flex: 0 0 auto; display: flex; justify-content: space-between; gap: .75rem; padding-top: .55rem; border-top: 1px solid rgba(255, 255, 255, .08); }
.d-team .tm { display: flex; flex-direction: column; gap: .1rem; min-width: 0; }
.d-team .tm + .tm { text-align: right; flex: 0 0 auto; }
.d-team .tm small { font-size: .8rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--d-muted); }
.d-team .tm b { font-size: 1.3rem; font-weight: 800; color: var(--d-text); font-variant-numeric: tabular-nums; white-space: nowrap; line-height: 1.1; overflow: hidden; text-overflow: ellipsis; }
.d-team .tm b i { font-style: normal; font-weight: 600; font-size: .8em; color: var(--d-muted); margin-left: .1em; }
.d-team .tbar { position: relative; display: block; flex: 0 0 auto; height: .4rem; border-radius: 999px; background: rgba(255, 255, 255, .1); }
.d-team .tbar i { position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-radius: inherit; background: linear-gradient(90deg, #3556b8, #4d8bff); }
.d-team .tbar em { position: absolute; top: -.2rem; bottom: -.2rem; width: .2rem; margin-left: -.1rem; border-radius: 1px; background: var(--d-gold); }
.d-team.full .tbar i { background: var(--d-green); }
.d-team.lead { border-color: var(--d-gold); background: rgba(255, 201, 64, .1); }
/* Can't reach the next bid: card steps back (dimmed, grey logo) and a red tag replaces "Max bid". */
.d-team .tmax .tout { display: none; }
.d-team.out { background: transparent; border-color: rgba(255, 255, 255, .07); }
.d-team.out .thead, .d-team.out .tmeta, .d-team.out .tbar { opacity: .5; }
.d-team.out img { filter: grayscale(1); }
.d-team.out .tmax { color: var(--d-faint); }
.d-team.out .tmax .tlabel { display: none; }
.d-team.out:not(.full) .tmax .tout { display: table; margin-bottom: .4rem; padding: .2rem .6rem; border-radius: .4rem; background: var(--d-red); color: #2a0703; font-weight: 800; letter-spacing: .14em; }
.d-team.out.full .tmax { color: var(--d-red); }
.d-team.flash { animation: flash 1.2s ease-out 2; }
@keyframes flash { 0% { box-shadow: 0 0 0 0 rgba(61, 220, 132, .9); border-color: var(--d-green); } 100% { box-shadow: 0 0 0 1rem rgba(61, 220, 132, 0); } }

/* team squad sheet (popup on the display) */
.modal-back.dark { background: rgba(2, 5, 14, .86); backdrop-filter: blur(6px); font-size: clamp(6px, min(calc(100vw / 120), calc(100vh / 67.5)), 40px); }
.modal-back.dark .modal { --surface: #0d1427; --text: #f2f4fa; --muted: #b3bcd4; --line: #26314f; --surface-2: #162039; --focus: #ffd166; background: var(--surface); color: var(--text); max-width: 94vw; height: 88vh; max-height: 88vh; border: 1px solid var(--line); border-radius: 1.25rem; }
/* Fixed height: switching teams (empty or full squad) never resizes or re-centres the popup. */
.modal-back.dark .modal-head { padding: 1.5rem 2rem; }
.modal-back.dark .modal-body { padding: 1.5rem 2rem 1.75rem; flex: 1; min-height: 0; display: flex; flex-direction: column; }
.modal-back.dark .modal-head h2 .tp-title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#tp-body { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.tp-squad { flex: 1; min-height: 0; overflow-y: auto; }
.modal-back.dark .modal-head h2 { flex: 1; min-width: 0; }
.tp-head { display: flex; align-items: center; gap: 1.25rem; }
.tp-head img { width: 5rem; height: 5rem; object-fit: contain; background: #000; border-radius: .75rem; flex: 0 0 auto; }
.tp-title { display: flex; flex-direction: column; font-size: 2.5rem; font-weight: 900; line-height: 1.05; letter-spacing: -.01em; }
.tp-sub { font-size: 1.1rem; font-weight: 600; color: var(--muted); letter-spacing: .08em; text-transform: uppercase; margin-top: .4rem; }
.tp-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); grid-auto-flow: column; border: 1px solid var(--line); border-radius: 1rem; overflow: hidden; background: var(--surface-2); }
.tp-stat { display: flex; flex-direction: column; gap: .35rem; padding: 1.1rem 1.5rem; }
.tp-stat + .tp-stat { border-left: 1px solid var(--line); }
.tp-stat span { font-size: 1rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.tp-stat strong { font-size: 2.6rem; font-weight: 900; line-height: 1; font-variant-numeric: tabular-nums; }
.tp-stat strong small { font-size: .55em; font-weight: 700; color: var(--muted); }
.tp-stat.gold strong { color: #ffd166; }
.tp-progress { margin: 1.25rem 0 1.5rem; }
.tp-bar { position: relative; height: .9rem; border-radius: 999px; background: rgba(255, 255, 255, .1); }
.tp-bar .fill { position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-radius: inherit; background: linear-gradient(90deg, #3556b8, #4d8bff); }
.tp-bar .min { position: absolute; top: -.4rem; bottom: -.4rem; width: .25rem; margin-left: -.125rem; border-radius: 2px; background: #ffd166; }
.tp-progress p { font-size: 1.2rem; font-weight: 600; color: var(--muted); margin-top: .75rem; }
.tp-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .9rem; }
.tp-card { position: relative; display: flex; gap: 1rem; align-items: center; padding: .75rem; border-radius: .9rem; background: var(--surface-2); border: 1px solid var(--line); min-width: 0; }
.tp-card img { width: 5.6rem; height: 7rem; object-fit: cover; object-position: top center; border-radius: .6rem; background: #000; flex: 0 0 auto; }
.tp-card-body { min-width: 0; }
.tp-card h3 { font-size: 1.5rem; font-weight: 800; line-height: 1.15; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.tp-card .tp-meta { font-size: 1.05rem; color: var(--muted); margin-top: .15rem; }
.tp-card .tp-amt { font-size: 2rem; font-weight: 900; color: #ffd166; font-variant-numeric: tabular-nums; margin-top: .35rem; line-height: 1; }
.tp-card .tp-order { position: absolute; top: .6rem; right: .75rem; font-size: .95rem; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }
.tp-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; min-height: 12rem; gap: .5rem; padding: 3.5rem 1rem; border: 2px dashed var(--line); border-radius: 1rem; text-align: center; }
.tp-empty strong { font-size: 2rem; font-weight: 800; }
.tp-empty span { font-size: 1.3rem; color: var(--muted); }
.tp-13 { margin-top: 1rem; padding: 1.25rem; border-radius: 1rem; border: 3px solid #f5b301; background: rgba(245, 179, 1, .1); display: flex; gap: 1.5rem; align-items: center; }
.tp-13 h3 { font-size: 2rem; font-weight: 900; }
.tp-13 p { font-size: 1.3rem; font-weight: 700; color: #ffd166; margin-top: .25rem; }
.tp-13 .met { color: #6fd99a; }
.tp-nav { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: 1.5rem; flex: 0 0 auto; }
.tp-nav .muted { font-size: 1.05rem; }
.tp-nav .btn { font-size: 1.15rem; min-height: 3rem; padding: 0 1.25rem; background: var(--surface-2); color: var(--text); border: 1px solid var(--line); }
.tp-nav .btn:hover:not(:disabled) { background: var(--line); }
/* Player cards open full screen: a stretched button covers the card. */
.tp-open { position: absolute; inset: 0; width: 100%; border: 0; padding: 0; background: none; border-radius: inherit; cursor: pointer; }
.tp-card:hover { border-color: #4d8bff; }
.tp-open:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
/* Full-screen player view (from a team card) */
/* Display popups use the whole screen unless "Smaller" is chosen (then 94vw x 88vh). */
.modal-back.dark .modal.d-max { max-width: none; width: 100%; height: 100%; max-height: none; }
.modal-back.dark:has(.d-max) { padding: 1rem; }
.pv-head { display: flex; align-items: center; gap: 1.25rem; }
.pv-head .hlogo { width: 5rem; height: 5rem; object-fit: contain; background: #000; border-radius: .75rem; flex: 0 0 auto; }
.pv-head .logo-fallback.hlogo { font-size: 1.4rem; background: linear-gradient(135deg, #1a3a8c, #0b1a4d); }
.pv-body { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.pv-player { flex: 1; min-height: 0; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4rem; align-items: center; padding: 0 2rem; }
.pv-photo { height: 100%; max-height: 52rem; display: flex; align-items: center; min-height: 0; }
.pv-photo img { height: 100%; max-height: 52rem; width: auto; aspect-ratio: 4 / 5; object-fit: cover; object-position: top center; border-radius: 1.5rem; background: #000; box-shadow: 0 1.5rem 4rem rgba(0, 0, 0, .5); }
.pv-info { display: flex; flex-direction: column; gap: 1rem; min-width: 0; }
.pv-order { font-size: 1.6rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: #8fb4ff; }
.pv-name { font-size: 6.5rem; font-weight: 900; line-height: 1; letter-spacing: -.01em; overflow-wrap: anywhere; }
.pv-role { font-size: 2.2rem; font-weight: 600; color: var(--muted); }
.pv-amt { display: flex; flex-direction: column; gap: .5rem; margin-top: 2rem; font-size: 8rem; font-weight: 900; line-height: 1; color: #ffd166; font-variant-numeric: tabular-nums; }
.pv-amt small { font-size: 1.4rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
/* Players left by auction list (display, key L) */
.lv-body { flex: 1; min-height: 0; overflow-y: auto; }
.lv-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
.lv-card { display: flex; flex-direction: column; gap: .5rem; padding: 1.25rem 1.4rem; border-radius: 1rem; background: var(--surface-2); border: 1px solid var(--line); min-height: 11rem; }
.lv-card h3 { font-size: 1.35rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); line-height: 1.2; }
.lv-left { display: flex; align-items: baseline; gap: .6rem; margin-top: auto; }
.lv-left strong { font-size: 4rem; font-weight: 900; line-height: 1; color: #ffd166; font-variant-numeric: tabular-nums; }
.lv-left span { font-size: 1.4rem; font-weight: 700; }
.lv-meta { font-size: 1.15rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.lv-bar { height: .6rem; border-radius: 999px; background: rgba(255, 255, 255, .1); overflow: hidden; }
.lv-bar i { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, #3556b8, #4d8bff); }
.lv-card.done .lv-left strong { color: #6fd99a; }
.lv-card { position: relative; }
.lv-card:hover { border-color: #4d8bff; }
.modal-back.dark .modal:focus-visible { outline: none; }
/* One auction list's players (click a Players left card) */
.lp-h { font-size: 1.3rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 0 0 .9rem; }
.lp-h span { color: var(--text); margin-left: .4rem; }
.lp-body .lp-grid + .lp-h { margin-top: 2rem; }
.lp-wrap { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.lp-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 1.1rem; }
.lp-card { display: flex; flex-direction: column; gap: .3rem; min-width: 0; }
.lp-card h4, .lp-card p { margin: 0; }
.lp-card img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: top center; border-radius: .9rem; background: #000; margin-bottom: .4rem; }
.lp-card h4 { font-size: 1.5rem; font-weight: 800; line-height: 1.15; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lp-card p { font-size: 1.05rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lp-card.is-sold p { color: #6fd99a; font-weight: 600; }
/* Owner / Icon tags on display cards */
.d-tags { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .4rem; }
.d-tag { display: inline-flex; align-items: center; gap: .3rem; padding: .2rem .6rem; border-radius: 999px; font-size: .9rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; line-height: 1.3; }
.d-tag svg { width: .95em; height: .95em; }
.d-tag.icon { background: #ffd166; color: #1a1300; }
.d-tag.owner { background: #8fb4ff; color: #0a1630; }
.d-tags.big { margin-top: .25rem; gap: .75rem; }
.d-tags.big .d-tag { font-size: 1.4rem; padding: .35rem 1rem; }
/* Bigger cards view (.tp-big): stats move into the header as small cards, the player cards grow. */
.modal-back.dark .modal-head { gap: 1.25rem; }
.tp-headstats { display: none; }
.tp-bigbtn { display: inline-flex; align-items: center; gap: .6rem; font-size: 1.1rem; min-height: 3rem; padding: 0 1.1rem; background: var(--surface-2); color: var(--text); border: 1px solid var(--line); flex: 0 0 auto; }
.tp-bigbtn svg { width: 1.2rem; height: 1.2rem; }
.tp-bigbtn:hover { background: var(--line); }
.tp-bigbtn[aria-pressed="true"] { background: #ffd166; color: #1a1300; border-color: #ffd166; }
.modal.tp-big .tp-headstats { display: block; flex: 0 1 auto; min-width: 0; margin-right: auto; }
.modal-back.dark .modal.tp-big .modal-head h2 { flex: 0 1 auto; }
.modal.tp-big .tp-headstats .tp-stats { display: flex; border: 0; background: none; gap: .6rem; overflow: visible; }
.modal.tp-big .tp-headstats .tp-stat { padding: .55rem .95rem; gap: .25rem; border: 1px solid var(--line); border-radius: .75rem; background: var(--surface-2); }
.modal.tp-big .tp-headstats .tp-stat + .tp-stat { border-left: 1px solid var(--line); }
.modal.tp-big .tp-headstats .tp-stat span { font-size: .8rem; }
.modal.tp-big .tp-headstats .tp-stat strong { font-size: 2.9rem; white-space: nowrap; }
.modal.tp-big .tp-title { font-size: 2.2rem; }
.modal.tp-big #tp-body > .tp-stats, .modal.tp-big .tp-bar { display: none; }
.modal.tp-big .tp-progress { margin: 0 0 1rem; }
.modal.tp-big .tp-progress p { margin-top: 0; }
.modal.tp-big .tp-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.1rem; }
.modal.tp-big .tp-card { gap: 1.25rem; padding: 1rem; border-radius: 1.1rem; min-height: 12.4rem; }
.modal.tp-big .tp-card.sk { height: 12.4rem; }
.modal.tp-big .tp-card img { width: 8.2rem; height: 10.3rem; border-radius: .8rem; }
.modal.tp-big .tp-card h3 { font-size: 2rem; }
.modal.tp-big .tp-card .tp-meta { font-size: 1.3rem; margin-top: .25rem; }
.modal.tp-big .tp-card .tp-amt { font-size: 2.7rem; margin-top: .6rem; }
.modal.tp-big .tp-card .tp-order { font-size: 1.15rem; top: .8rem; right: 1rem; }

/* loading shimmer: skeleton blocks, and photos/logos until they arrive */
@keyframes skel { from { background-position: 150% 0; } to { background-position: -50% 0; } }
.skel, body.display img.ld, .modal-back.dark img.ld {
  background: linear-gradient(100deg, rgba(255, 255, 255, .06) 30%, rgba(255, 255, 255, .18) 50%, rgba(255, 255, 255, .06) 70%) #141c33;
  background-size: 250% 100%; animation: skel 1.3s linear infinite; }
body.display img.ld, .modal-back.dark img.ld { color: transparent; }
.skel { display: block; border-radius: .5rem; }
.sk-player { display: grid; grid-template-columns: auto minmax(0, 62rem); justify-content: center; align-items: center; gap: 4.5rem; width: 100%; }
.sk-photo { height: min(62vh, 44rem); aspect-ratio: 4 / 5; border-radius: .75rem; }
.sk-info { display: flex; flex-direction: column; gap: 1.5rem; }
.sk-line { height: 2.4rem; width: 60%; }
.sk-line.xl { height: 6.5rem; width: 85%; }
.sk-line.sm { height: 1.75rem; width: 25%; }
.sk-bar { height: 5.5rem; width: 46rem; max-width: 100%; }
.d-team.sk { cursor: default; border-color: rgba(255, 255, 255, .1); }
.tp-card.sk { height: 8.6rem; }
.tp-card { min-height: 8.6rem; }

/* confetti / sparkles */
.fx { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 60; }
.confetti { position: absolute; top: -2vh; left: var(--x); width: .75rem; height: 1.1rem; background: var(--c); border-radius: 2px; box-shadow: 0 0 .5rem var(--c);
  animation: fall var(--dur) ease-in var(--delay) forwards; }
.fx.gentle .confetti { width: .55rem; height: .8rem; opacity: .8; animation: fall var(--dur) linear var(--delay) infinite; }
.sparkle { position: absolute; left: var(--x); top: var(--y); width: var(--size); height: var(--size); border-radius: 50%; background: #fff;
  box-shadow: 0 0 calc(var(--size) * 3) var(--size) rgba(255, 255, 255, .9), 0 0 calc(var(--size) * 5) calc(var(--size) * 2) rgba(57, 255, 20, .55);
  opacity: 0; animation: twinkle 2s ease-in-out var(--delay) infinite; }
@keyframes fall { 0% { transform: translateY(0) rotate(0); opacity: 1; } 100% { transform: translateY(105vh) rotate(var(--spin, 720deg)); opacity: .2; } }
@keyframes twinkle { 0%, 100% { opacity: 0; transform: scale(0); } 50% { opacity: 1; transform: scale(1); } }

/* Portrait or narrow screens: teams wrap to 4 per row. */
@media (max-aspect-ratio: 4 / 3) {
  .d-team-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
/* Stack only on portrait screens: a landscape projector (even 1024x768) keeps the side by side layout, scaled down. */
@media (max-width: 1100px) and (orientation: portrait) {
  .w-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .d-player { grid-template-columns: 1fr; justify-items: center; text-align: center; gap: 2rem; }
  .d-photo { justify-self: center; }
  .d-info { align-items: center; }
  .d-team-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tp-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tp-stats { grid-auto-flow: row; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .modal.tp-big .modal-head { flex-wrap: wrap; }
  .modal.tp-big .tp-headstats { order: 3; flex-basis: 100%; }
  .modal.tp-big .tp-headstats .tp-stats { flex-wrap: wrap; }
  .modal.tp-big .tp-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lv-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lp-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .pv-player { grid-template-columns: 1fr; justify-items: center; text-align: center; gap: 2rem; }
  .pv-photo { height: 45vh; }
  .pv-info { align-items: center; }
}
@media (max-width: 640px) {
  html.display-root { font-size: 10px; }
  .d-team-grid, .tp-grid, .modal.tp-big .tp-grid, .lv-grid { grid-template-columns: 1fr; }
  .lp-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .d-head { flex-wrap: wrap; padding: 1rem; }
}

/* --------------------------------------------------------- motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .fx { display: none; }
  .spinner { animation: spin 1.6s linear infinite !important; animation-iteration-count: infinite !important; animation-duration: 1.6s !important; }
}
.mt-2 { margin-top: var(--s2); }

/* ============================================= team logo fallback (initials) */
.logo-fallback { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; aspect-ratio: 1;
  background: linear-gradient(135deg, #1a3a8c, #0b1a4d); color: #fff; font-weight: 900; letter-spacing: .04em; line-height: 1;
  border-radius: var(--r-sm); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .25); }
.thumb.logo-fallback { font-size: 12px; }
.team-chip .tlogo { width: 40px; height: 40px; object-fit: contain; border-radius: var(--r-sm); background: #000; flex: 0 0 auto; }
.team-chip .logo-fallback.tlogo { font-size: 14px; background: linear-gradient(135deg, #1a3a8c, #0b1a4d); }
.tile .tlogo { width: 44px; height: 44px; object-fit: contain; background: #000; border-radius: var(--r-sm); flex: 0 0 auto; }
.tile .logo-fallback.tlogo { font-size: 14px; background: linear-gradient(135deg, #1a3a8c, #0b1a4d); }
.tile .tslots { display: block; font-size: var(--t-xs); color: var(--muted); }
.sold-banner .slogo { width: 56px; height: 56px; border-radius: var(--r-md); object-fit: contain; background: #000; }
.sold-banner .logo-fallback.slogo { font-size: 18px; background: linear-gradient(135deg, #1a3a8c, #0b1a4d); }
.d-team .tlogo { width: 2.75rem; height: 2.75rem; object-fit: contain; background: #000; border-radius: .5rem; flex: 0 0 auto; }
.d-team .logo-fallback.tlogo { font-size: 1.1rem; background: linear-gradient(135deg, #1a3a8c, #0b1a4d); }
.tp-head .hlogo { width: 5rem; height: 5rem; object-fit: contain; background: #000; border-radius: .75rem; flex: 0 0 auto; }
.tp-head .logo-fallback.hlogo { font-size: 1.4rem; background: linear-gradient(135deg, #1a3a8c, #0b1a4d); }
.d-note { font-size: 1.5rem; font-weight: 700; text-align: center; padding: .75rem 1.5rem; border-radius: 1rem; background: rgba(0, 0, 0, .55); border: 1px solid rgba(255, 255, 255, .3); max-width: 60rem; }
@media (min-width: 1101px) and (max-height: 900px) { .d-team .tlogo { width: 3.75rem; height: 3.75rem; } }
@media (max-width: 640px) { .tile .tlogo { width: 32px; height: 32px; } }

/* ==================================================== manage: season + badges */
.nav-badge, .tab-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 6px; margin-left: 6px;
  border-radius: var(--r-full); background: var(--danger); color: #fff; font-size: var(--t-xs); font-weight: 800; font-variant-numeric: tabular-nums; }
.nav-badge[hidden], .tab-badge[hidden] { display: none; }
.season-box { display: flex; align-items: center; gap: var(--s3); flex-wrap: wrap; }
.season-label { display: flex; flex-direction: column; line-height: 1.25; font-size: var(--t-sm); }
.season-label .k { font-size: var(--t-xs); color: var(--muted); text-transform: uppercase; letter-spacing: .04em; font-weight: 700; }
.check-row { display: inline-flex; align-items: center; gap: var(--s2); min-height: 44px; margin: 0; font-weight: 600; cursor: pointer; }
.check-row input { width: 20px; height: 20px; margin: 0; accent-color: var(--brand); }
textarea { resize: vertical; min-height: 88px; }
.mb-3 { margin-bottom: var(--s3); }
.mt-4 { margin-top: var(--s4); }
.pill.warn { background: var(--gold-tint); color: var(--gold-ink); }
.photo-flag { display: table; margin-top: 2px; font-size: 10px; padding: 0 6px; }
td.break { overflow-wrap: anywhere; max-width: 220px; }

/* registrations */
.reg-list { display: grid; gap: var(--s4); }
.reg-card { display: grid; gap: var(--s3); }
.reg-head { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--s3); flex-wrap: wrap; }
.reg-head h3 { font-size: var(--t-lg); }
.reg-meta { font-size: var(--t-sm); color: var(--muted); margin-top: 2px; }
.reg-meta strong { color: var(--text); }
.reg-pills { display: flex; gap: var(--s1); flex-wrap: wrap; }
.pill.st-pending { background: var(--gold-tint); color: var(--gold-ink); }
.pill.st-approved { background: var(--success-tint); color: var(--success-ink); }
.pill.st-rejected { background: var(--danger-tint); color: var(--danger-ink); }
.pill.match { background: var(--brand-tint); color: var(--brand-ink); }
.pill.newp { background: var(--success-tint); color: var(--success-ink); }
.pill.edited { background: var(--surface-2); color: var(--text); border: 1px dashed var(--line-strong); }
.reg-warn { border: 1px solid var(--gold); background: var(--gold-tint); color: var(--gold-ink); border-radius: var(--r-md); padding: var(--s2) var(--s3); font-size: var(--t-sm); display: grid; gap: var(--s1); }
.reg-body { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--s4); align-items: start; }
.reg-photos { display: flex; gap: var(--s3); }
.reg-photo { margin: 0; width: 160px; }
.reg-photo-btn { display: block; padding: 0; border: 0; background: none; cursor: zoom-in; border-radius: var(--r-md); width: 100%; }
.reg-photo img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; object-position: top center; border-radius: var(--r-md); background: var(--surface-2); }
.reg-photo figcaption { font-size: var(--t-xs); color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; margin-top: var(--s1); text-align: center; }
.reg-diff th[scope=row] { font-size: var(--t-xs); text-transform: none; letter-spacing: 0; color: var(--muted); background: transparent; white-space: nowrap; }
.reg-diff-label { font-weight: 600; }
.reg-diff tr.changed td, .reg-diff tr.changed th { background: var(--gold-tint); }
.reg-diff tr.changed td:nth-child(2) { font-weight: 700; color: var(--text); }
.chg-tag { display: inline-block; font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; color: var(--gold-ink); border: 1px solid currentColor; border-radius: var(--r-full); padding: 0 6px; margin-left: 4px; vertical-align: middle; }
.chg-tag.edited { color: var(--brand-ink); }
.reg-diff td { overflow-wrap: anywhere; }
.reg-actions { display: flex; gap: var(--s2); justify-content: flex-end; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: var(--s3); }
.reg-actions .btn { min-height: 44px; }
.reg-reviewed { margin-right: auto; font-size: var(--t-sm); }
.bulk-bar { position: fixed; left: 50%; transform: translateX(-50%); bottom: var(--s4); z-index: 90; display: flex; align-items: center; gap: var(--s3); flex-wrap: wrap;
  background: var(--surface); color: var(--text); border: 1px solid var(--line-strong); border-radius: var(--r-lg); box-shadow: var(--shadow-lg); padding: var(--s2) var(--s4);
  max-width: calc(100vw - 32px); font-size: var(--t-sm); font-weight: 600; }
.bulk-bar progress { width: 140px; }
@media (max-width: 760px) {
  /* Fit one registration review under Manage chrome: thumbs beside list, one line per field. */
  .reg-card { gap: var(--s2); padding: var(--s3); }
  .reg-head {
    gap: var(--s1) var(--s2);
    align-items: flex-start;
    flex-wrap: nowrap;
  }
  .reg-head > div:first-child { min-width: 0; flex: 1; }
  .reg-head h3 { font-size: var(--t-md); }
  .reg-meta { font-size: var(--t-xs); margin-top: 0; line-height: 1.3; }
  .reg-pills { gap: 2px; flex-shrink: 0; justify-content: flex-end; max-width: 42%; }
  .reg-warn { padding: var(--s2); font-size: var(--t-xs); gap: 2px; }
  .reg-body {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--s2);
  }
  /* Tiny horizontal thumbs above the list — left rail was too small to compare and stole width. */
  .reg-photos {
    display: flex;
    flex-direction: row;
    gap: var(--s2);
    max-width: none;
  }
  .reg-photo { width: 48px; }
  .reg-photo img { aspect-ratio: 1 / 1; border-radius: var(--r-sm); }
  .reg-photo figcaption {
    margin-top: 1px;
    font-size: 10px;
    letter-spacing: .02em;
    line-height: 1.15;
  }
  .reg-diff-wrap {
    overflow: visible;
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    background: var(--surface);
  }
  .reg-diff { width: 100%; border-collapse: collapse; }
  .reg-diff thead { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
  .reg-diff tbody { display: block; }
  .reg-diff tr {
    display: grid;
    grid-template-columns: 5.5rem minmax(0, 1fr);
    column-gap: var(--s2);
    align-items: baseline;
    padding: 5px var(--s2);
    border: 0;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
    background: transparent;
  }
  .reg-diff tr:last-child { border-bottom: 0; }
  .reg-diff tr.changed {
    background: var(--gold-tint);
    box-shadow: inset 3px 0 0 var(--gold);
  }
  .reg-diff tr.changed td, .reg-diff tr.changed th { background: transparent; }
  .reg-diff th[scope=row],
  .reg-diff td {
    padding: 0;
    border: 0;
    white-space: normal;
    min-width: 0;
    overflow-wrap: break-word;
  }
  .reg-diff th[scope=row] {
    display: block;
    font-size: var(--t-xs);
    line-height: 1.25;
    color: var(--muted);
  }
  .reg-diff-label { font-weight: 700; color: var(--text); }
  .reg-diff td[data-label="Submitted"] {
    display: flex;
    align-items: baseline;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 2px var(--s1);
    font-size: var(--t-sm);
    line-height: 1.3;
    font-weight: 600;
    color: var(--text);
  }
  .reg-diff td::before { content: none; }
  .chg-tag {
    margin-left: 0;
    flex-shrink: 0;
    font-size: 10px;
    line-height: 1.2;
    padding: 0 5px;
  }
  /* Gold row + left bar already mark new fields; keep words for screen readers only. */
  .reg-diff tr.added .chg-tag:not(.edited) {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
  }
  .reg-diff tr.changed td[data-label="Submitted"] { font-weight: 700; }
  /* Unchanged / newly added: one value. Real edits: show previous on a second line. */
  .reg-diff tr:not(.changed) td[data-label="Current"],
  .reg-diff tr.added td[data-label="Current"] { display: none; }
  .reg-diff tr.changed:not(.added) {
    grid-template-rows: auto auto;
  }
  .reg-diff tr.changed:not(.added) th[scope=row] { grid-row: 1 / span 2; align-self: start; }
  .reg-diff tr.changed:not(.added) td[data-label="Submitted"] { grid-column: 2; grid-row: 1; }
  .reg-diff tr.changed:not(.added) td[data-label="Current"] {
    display: block;
    grid-column: 2;
    grid-row: 2;
    font-size: var(--t-xs);
    font-weight: 500;
    line-height: 1.25;
    color: var(--muted);
  }
  .reg-diff tr.changed:not(.added) td[data-label="Current"]::before {
    content: "was ";
    font-weight: 700;
  }
  .reg-actions {
    gap: var(--s1);
    padding-top: var(--s2);
    flex-wrap: nowrap;
  }
  .reg-actions .btn {
    flex: 1 1 0;
    min-width: 0;
    min-height: 40px;
    padding: var(--s2) var(--s3);
  }
  .reg-actions .btn-success { flex: 1.15 1 0; }
  .reg-actions .reg-reviewed { flex: 1 1 100%; margin-right: 0; }
  .season-box { width: 100%; justify-content: space-between; }
}
.tab-note { display: inline-flex; align-items: center; margin-left: var(--s2); padding: 1px var(--s2); border-radius: var(--r-full); background: var(--success-tint); color: var(--success-ink); font-size: var(--t-xs); font-weight: 700; }
.tab-note.closed { background: var(--danger-tint); color: var(--danger-ink); }
.tab-note[hidden] { display: none; }
input[type=datetime-local], input[type=date] { width: 100%; min-height: 44px; padding: var(--s2) var(--s3); font: inherit; font-size: var(--t-md); color: var(--text); background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--r-md); }

/* Player logins: temporary passwords to send on WhatsApp (shown once). */
.login-send-bar { position: sticky; top: calc(-1 * var(--s5)); z-index: 1; display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--s2) var(--s4); margin: 0 0 var(--s2); padding: var(--s3) 0; background: var(--surface); border-bottom: 1px solid var(--line); }
.login-send-bar .field { margin-top: 0; }
.login-send-progress { margin: 0 0 var(--s2); font-weight: 700; }
.login-send-bar .btn-success { margin-left: auto; }
.login-send-list { display: grid; gap: var(--s3); margin: 0; padding: 0; list-style: none; }
.login-send { display: grid; gap: var(--s2); padding: var(--s3); border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); }
.login-send.is-sent { border-color: var(--success); }
.login-send-who { overflow-wrap: anywhere; }
.login-send-state { margin-left: var(--s2); color: var(--success-ink); font-size: var(--t-xs); font-weight: 700; }
.login-send .secret { margin-top: 0; }
.login-send-actions { display: flex; flex-wrap: wrap; gap: var(--s2); }
.login-skip-wrap { margin-top: var(--s3); }
.login-skip { margin: var(--s2) 0 0; padding-left: var(--s5); font-size: var(--t-sm); }

/* Team owners in the edit dialog. Age and mobile stay here; the public site shows names only. */
.owner-set { margin: var(--s4) 0 0; padding: var(--s3) 0 0; border: 0; border-top: 1px solid var(--line); }
.owner-set legend { padding: 0; font-weight: 700; }
.owner-add { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--s2); margin-top: var(--s3); }
.owner-add .field { flex: 1 1 16rem; margin: 0; }
.owner-card { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: var(--s2); margin: 0 0 var(--s3); padding: var(--s3); background: var(--surface-2); border-radius: var(--r-md); }
.owner-card__who { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); margin: 0; }
.owner-grid { display: grid; gap: var(--s2); width: 100%; }
.owner-thumb { width: 40px; height: 50px; object-fit: cover; object-position: top center; border-radius: var(--r-sm); background: var(--surface); flex: 0 0 auto; }
/* Owner picker: search results with photos, in the flow under the search box (never clipped by the dialog). */
.owner-pick { list-style: none; margin: var(--s2) 0 0; padding: var(--s1); max-height: 18rem; overflow-y: auto; border: 1px solid var(--line-strong); border-radius: var(--r-md); background: var(--surface); }
.owner-pick[hidden] { display: none; }
.owner-pick li { display: flex; align-items: center; gap: var(--s3); padding: 6px var(--s2); border-radius: var(--r-sm); cursor: pointer; min-height: 56px; }
.owner-pick li img { width: 40px; height: 50px; object-fit: cover; object-position: top center; border-radius: var(--r-sm); background: var(--surface-2); flex: 0 0 auto; }
.owner-pick li[aria-selected="true"] { background: var(--brand-tint); }
.owner-pick li:hover { background: var(--surface-2); }
.owner-pick li[aria-selected="true"]:hover { background: var(--brand-tint); }
.owner-pick li[aria-disabled="true"] { cursor: default; opacity: .6; }
.owner-pick .op-text { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.owner-pick .op-name { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.owner-pick .op-serial { color: var(--brand-ink); font-variant-numeric: tabular-nums; }
.owner-pick .op-meta { font-size: var(--t-sm); color: var(--muted); }
.owner-pick .op-none { color: var(--muted); cursor: default; min-height: 0; padding: var(--s2); }
.owner-grid .field { margin: 0; }
@media (min-width: 720px) {
  .owner-grid { grid-template-columns: minmax(0, 1.4fr) minmax(5rem, .5fr) minmax(0, 1fr) auto; align-items: end; }
}

/* Send logins page */
.sl-count { margin: var(--s2) 0 var(--s3); font-weight: 700; }
.sl-list { display: grid; gap: var(--s3); max-width: 720px; margin: 0; padding: 0; list-style: none; }
.sl-card { display: grid; gap: var(--s2); padding: var(--s3); border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); }
.sl-card.is-ready { border-color: var(--line-strong); box-shadow: var(--shadow-sm, none); }
.sl-who { overflow-wrap: anywhere; }
.sl-actions { display: flex; flex-wrap: wrap; gap: var(--s2); }
.sl-actions .btn { flex: 1 1 auto; }
.sl-msg { margin: 0; padding: var(--s2) var(--s3); white-space: pre-wrap; overflow-wrap: anywhere; font: inherit; font-size: var(--t-sm); background: var(--surface-2); border-radius: var(--r-sm); user-select: all; }
.modal-foot .foot-left { margin-right: auto; }

/* ------------------------------------------- display: Video view (YouTube) */
body.display.video-on .d-shade { display: grid; grid-template-columns: minmax(0, 1fr) 36rem; grid-template-rows: auto minmax(0, 1fr) auto;
  grid-template-areas: "head head" "video stage" "teams teams"; height: 100vh; }
body.video-on .d-head { grid-area: head; }
/* The frame is sized from its box (container units), so it is always exactly 16:9 and hugs the picture. */
body.video-on .d-video { grid-area: video; display: flex; align-items: center; justify-content: center; padding: .5rem 0 .5rem 3rem; min-height: 0; container-type: size; }
body.video-on .d-video iframe { display: block; width: min(100cqw, 100cqh * 16 / 9); height: auto; aspect-ratio: 16 / 9; border: 0; border-radius: 1.25rem; background: #000; box-shadow: 0 0 0 1px var(--d-line), 0 2rem 5rem rgba(0, 0, 0, .55); }
body.video-on .d-stage { grid-area: stage; padding: .5rem 3rem .5rem 2.5rem; align-items: stretch; }
body.video-on .d-teams { grid-area: teams; }
/* Right panel: photo beside serial + name, then facts, the deal panel and the trail.
   .d-info steps aside (display: contents) so its parts sit on the player grid. */
body.video-on .d-player { grid-template-columns: 10rem minmax(0, 1fr); grid-template-rows: auto auto auto auto;
  grid-template-areas: "photo serial" "photo name" "facts facts" "state state"; align-items: start; gap: 0 1.5rem; }
body.video-on .d-info { display: contents; }
body.video-on .d-photo { grid-area: photo; justify-self: start; align-self: start; }
body.video-on .d-photo img { height: auto; width: 10rem; border-radius: 1rem; }
body.video-on .d-player.is-sold .d-photo img { box-shadow: 0 0 0 .25rem var(--d-green), 0 0 2rem rgba(61, 220, 132, .45); }
body.video-on .d-icon { top: -.75rem; left: -.75rem; right: auto; width: 3.75rem; height: 3.75rem; border-width: .25rem; font-size: .8rem; }
body.video-on .d-icon svg { width: 1.4rem; height: 1.4rem; }
body.video-on .d-serial { grid-area: serial; align-self: end; font-size: 1.25rem; margin-top: .5rem; }
body.video-on .d-name { grid-area: name; align-self: start; font-size: 3.25rem; margin: .4rem 0 0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; hyphens: auto; }
body.video-on .d-name.is-long { font-size: 2.4rem; }
body.video-on .d-facts { grid-area: facts; margin-top: 1.25rem; }
body.video-on .d-state { grid-area: state; margin-top: 1.25rem; }
body.video-on .d-facts { gap: .75rem 2rem; }
body.video-on .d-fact dt { font-size: 1.1rem; }
body.video-on .d-fact dd { font-size: 1.75rem; }
body.video-on .d-deal { grid-template-columns: minmax(0, 1fr); gap: 1rem; padding: 1.25rem 1.5rem; }
body.video-on .dd-amt { font-size: 4.5rem; }
body.video-on .d-deal.is-wait .dd-amt { font-size: 3.5rem; }
body.video-on .dd-label { font-size: 1.25rem; }
body.video-on .dd-chip { font-size: 1.4rem; }
body.video-on .dd-team { max-width: none; gap: 1rem; }
body.video-on .d-deal .dd-logo { width: 4rem; height: 4rem; border-radius: .8rem; }
body.video-on .dd-team-name { font-size: 1.6rem; max-width: none; }
body.video-on .d-trail { gap: .5rem; margin-top: .75rem; }
body.video-on .d-trail li { font-size: 1.2rem; }
body.video-on .welcome { gap: 1rem; }
body.video-on .w-logo { display: none; }
body.video-on .w-title { font-size: 3.5rem; }
body.video-on .w-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
body.video-on .w-stat:nth-child(3) { border-left: 0; }
body.video-on .w-stat dd { font-size: 2.5rem; }

/* ------------------------------------------------ app nav on a phone */
@media (max-width: 640px) {
  .appnav { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 calc(var(--s3) * -1); padding: 0 var(--s3); }
  .appnav::-webkit-scrollbar { display: none; }
  .appnav a { flex: 0 0 auto; }
}

/* ================================================= DESK: two screens
   List screen: team budgets, the last sale, the player queue (full width).
   Lot screen (.bidding): one dark "broadcast" column in the style of the display, the same on
   every size: glass panels with a thin light edge over the night stadium, gold for the next bid,
   green for the leader and SOLD, blue for the chaser and Raise. Always dark, whatever the theme.
   Contrast (worst case, panel #1b2c55): text 12.5:1, muted 6.7:1, gold 8.9:1, green 8.4:1,
   blue 6.8:1; white on Raise #1d4ed8 6.7:1, on SOLD #15803d 5.0:1. */
.desk:not(.bidding) .current { display: none; }
.desk:not(.bidding) .desk-main { grid-template-columns: minmax(0, 1fr); }
.desk:not(.bidding) .queue { position: static; max-height: none; }
.desk:not(.bidding) .queue-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: var(--s1) var(--s3); max-height: none; }
.desk:not(.bidding) .queue-list li + li { margin-top: 0; }
.desk:not(.bidding) .queue-list .empty-state { grid-column: 1 / -1; }
.last-sale:empty { display: none; }
.last-sale .sold-banner .muted { font-size: var(--t-xs); margin-top: 2px; }

.desk.bidding > section:first-of-type, .desk.bidding .last-sale, .desk.bidding .queue { display: none; }
.desk.bidding .desk-main { grid-template-columns: minmax(0, 1fr); max-width: 760px; width: 100%; margin: 0 auto; }
.desk.bidding .current { gap: var(--s3); }
body.lot-open { background: linear-gradient(180deg, rgba(5, 10, 28, .82), rgba(6, 14, 40, .9) 40%, rgba(4, 9, 26, .96)),
  url("../assets/stadium-bg-1280.webp") center top / cover no-repeat fixed, #050b1c; }
.desk.bidding {
  --l-text: #f1f5ff; --l-muted: #a8b6d8; --l-gold: #ffc93c; --l-green: #5ee39b; --l-blue: #8db8ff;
  --l-panel: linear-gradient(160deg, rgba(27, 44, 85, .78), rgba(12, 24, 56, .86));
  --l-edge: rgba(141, 184, 255, .22);
  --l-glow-blue: 0 0 0 1px rgba(96, 150, 255, .55), 0 0 18px rgba(59, 130, 246, .35);
  --l-glow-green: 0 0 0 1px rgba(94, 227, 155, .6), 0 0 18px rgba(34, 197, 94, .3);
  --l-glow-gold: 0 0 0 1px rgba(255, 201, 60, .7), 0 0 18px rgba(255, 190, 40, .28);
  color: var(--l-text);
}
.desk.bidding .card { background: var(--l-panel); border: 1px solid var(--l-edge); border-radius: 20px; box-shadow: 0 18px 40px rgba(0, 0, 0, .45), inset 0 1px 0 rgba(255, 255, 255, .06);
  color: var(--l-text); padding: var(--s4); }
.desk.bidding :focus-visible { outline: 3px solid var(--l-gold); outline-offset: 2px; }

/* header */
.desk.bidding #cur-card { padding: var(--s3); overflow: hidden;
  background: linear-gradient(90deg, rgba(12, 24, 56, .95) 30%, rgba(12, 24, 56, .55)), url("../assets/stadium-bg-1280.webp") center 30% / cover no-repeat; }
.lot-hero { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: var(--s4); align-items: center; }
.lot-photo { position: relative; }
.lot-photo img { display: block; width: 88px; height: 88px; object-fit: cover; object-position: top center; border-radius: 16px; background: #0c1838; box-shadow: 0 0 0 2px rgba(141, 184, 255, .35), 0 8px 20px rgba(0, 0, 0, .4); }
.lot-photo .icon-badge { top: -8px; left: -8px; font-size: 10px; padding: 1px 6px; }
.lot-id { min-width: 0; padding-left: var(--s4); border-left: 1px solid var(--l-edge); }
.lot-name { margin: 0; font-size: 1.875rem; font-weight: 900; line-height: 1.1; letter-spacing: -.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lot-facts { margin: 2px 0 var(--s2); font-size: var(--t-sm); color: var(--l-muted); font-variant-numeric: tabular-nums; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lot-state { display: inline-flex; align-items: center; gap: 6px; padding: 3px var(--s3); border-radius: var(--r-full); font-size: var(--t-xs); font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
  color: var(--l-muted); border: 1px solid var(--l-edge); background: rgba(5, 10, 28, .5); }
.lot-state .dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.lot-state.on { color: var(--l-green); border-color: rgba(94, 227, 155, .55); background: rgba(15, 42, 31, .75); }
@media (prefers-reduced-motion: no-preference) { .lot-state.on .dot { animation: lotBlink 1.4s ease-in-out infinite; } }
@keyframes lotBlink { 50% { opacity: .35; } }
.lot-close { align-self: start; width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; border-radius: 12px; cursor: pointer;
  color: var(--l-text); background: rgba(5, 10, 28, .55); border: 1px solid var(--l-edge); transition: background .15s, border-color .15s; }
.lot-close:hover { background: rgba(27, 44, 85, .9); border-color: rgba(141, 184, 255, .5); }

/* price + duel */
.lot-price { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: var(--s4); align-items: center; }
.lp-now { display: flex; flex-direction: column; gap: var(--s1); padding-right: var(--s4); border-right: 1px solid var(--l-edge); min-width: 0; }
.lp-label { font-size: var(--t-sm); font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: var(--l-muted); }
.lp-amt { display: inline-block; transform-origin: left center; font-size: clamp(1.75rem, 7.5vw, 3.25rem); font-weight: 900; line-height: 1.05; font-variant-numeric: tabular-nums; color: var(--l-gold);
  text-shadow: 0 0 24px rgba(255, 190, 40, .35); }
.lp-duel { display: grid; gap: var(--s2); min-width: 0; }
.duel-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: var(--s2); min-height: 60px; padding: var(--s2) var(--s3); border-radius: 14px;
  border: 1px solid var(--l-edge); background: rgba(5, 10, 28, .45); transition: box-shadow .25s, background .25s; }
.duel-row.lead:not(.empty) { background: linear-gradient(90deg, rgba(21, 128, 61, .38), rgba(15, 42, 31, .7)); box-shadow: var(--l-glow-green); border-color: transparent; }
.duel-row.chase:not(.empty) { background: linear-gradient(90deg, rgba(29, 78, 216, .35), rgba(16, 36, 82, .7)); box-shadow: var(--l-glow-blue); border-color: transparent; }
.duel-row .tlogo { width: 36px; height: 36px; object-fit: contain; border-radius: 10px; background: #000; flex: 0 0 auto; }
.duel-row .tlogo.ghost { background: rgba(141, 184, 255, .12); border: 1px dashed var(--l-edge); }
.duel-row .logo-fallback.tlogo { font-size: 12px; }
.dr-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.dr-name { font-weight: 800; font-size: var(--t-sm); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow-wrap: anywhere; }
.duel-row.empty .dr-name { font-weight: 600; color: var(--l-muted); }
.dr-tag { font-size: var(--t-xs); font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--l-muted); }
.duel-row.lead:not(.empty) .dr-tag { color: var(--l-green); }
.duel-row.chase:not(.empty) .dr-tag { color: var(--l-blue); }
.duel-row.empty .dr-tag { visibility: hidden; }
.dr-amt { font-weight: 900; font-size: var(--t-lg); font-variant-numeric: tabular-nums; }

/* next bid */
.lot-next { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: stretch; margin-top: var(--s4); gap: 0; }
.ln-label { display: inline-flex; align-items: center; gap: var(--s2); margin: 0; padding: 0 var(--s4); border-radius: 14px 0 0 14px; border: 1px solid rgba(255, 201, 60, .55); border-right: 0;
  background: linear-gradient(90deg, rgba(255, 201, 60, .2), rgba(255, 201, 60, .06)); color: var(--l-gold); font-size: var(--t-sm); font-weight: 900; letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; }
.ln-field { position: relative; display: flex; align-items: center; gap: var(--s1); padding: 0 var(--s3); border-radius: 14px; background: rgba(5, 10, 28, .7); box-shadow: var(--l-glow-gold); color: var(--l-gold); min-width: 0; }
.ln-cur { font-size: var(--t-2xl); font-weight: 900; color: var(--l-text); }
.desk.bidding .ln-field input#bid { flex: 1; min-width: 0; min-height: 56px; padding: 0; border: 0; background: transparent; color: var(--l-text); font-size: var(--t-2xl); font-weight: 900; font-variant-numeric: tabular-nums; box-shadow: none; outline: 0; -moz-appearance: textfield; appearance: textfield; }
.ln-field input::-webkit-outer-spin-button, .ln-field input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.ln-field:focus-within { box-shadow: 0 0 0 2px var(--l-gold), 0 0 22px rgba(255, 190, 40, .4); }
.ln-field svg { flex: 0 0 auto; }
.ln-undo { margin-left: var(--s3); padding: 0 var(--s4); gap: var(--s2); }

.lot-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 var(--s3); border-radius: 14px; cursor: pointer; font-weight: 800; font-size: var(--t-md);
  color: var(--l-text); border: 1px solid var(--l-edge); background: linear-gradient(180deg, rgba(40, 64, 120, .75), rgba(16, 30, 66, .85)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08);
  transition: transform .12s, background .15s, border-color .15s; touch-action: manipulation; }
.lot-btn:hover:not(:disabled) { border-color: rgba(141, 184, 255, .55); }
.lot-btn:active:not(:disabled) { transform: scale(.97); }
.lot-btn:disabled { opacity: .45; cursor: not-allowed; }
.lot-bump { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s3); margin-top: var(--s3); }
.lot-bump .lot-btn { font-size: var(--t-lg); font-variant-numeric: tabular-nums; }

/* raise */
.lot-raise { position: relative; margin-top: var(--s4); }
.btn-raise { display: flex; align-items: center; justify-content: center; gap: var(--s4); width: 100%; min-height: 84px; padding: var(--s2) var(--s4); border: 0; border-radius: 18px; cursor: pointer;
  color: #fff; background: linear-gradient(180deg, #2563eb, #1d4ed8 60%, #1e40af); box-shadow: 0 0 0 1px rgba(147, 197, 253, .55), 0 10px 30px rgba(37, 99, 235, .45), inset 0 1px 0 rgba(255, 255, 255, .25);
  transition: transform .12s, box-shadow .2s, filter .2s; touch-action: manipulation; }
.btn-raise:hover:not(:disabled) { filter: brightness(1.08); }
.btn-raise:active:not(:disabled) { transform: scale(.985); }
.btn-raise:disabled { cursor: not-allowed; background: linear-gradient(180deg, #2a3b66, #1e2c52); box-shadow: 0 0 0 1px var(--l-edge); color: var(--l-muted); }
.btn-raise .rz-text { display: flex; flex-direction: column; align-items: center; min-width: 0; text-align: center; line-height: 1.2; }
.btn-raise .rz-amt { font-size: var(--t-2xl); font-weight: 900; font-variant-numeric: tabular-nums; }
.btn-raise .rz-team { max-width: 100%; font-size: var(--t-md); font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.btn-raise svg { flex: 0 0 auto; width: 32px; height: 32px; }
.lot-raise .form-error { position: absolute; left: 0; right: 0; bottom: 100%; z-index: 2; margin: 0 0 var(--s1); padding: var(--s2) var(--s3); border-radius: 12px; cursor: pointer;
  background: #2a0f12; color: #ffb4ab; border: 1px solid #ff8a80; box-shadow: 0 6px 18px rgba(0, 0, 0, .45); font-size: var(--t-sm); }
.lot-raise .form-error:empty { display: none; }

/* team tiles */
.desk.bidding .bid-tiles { display: block; margin: var(--s5) 0 0; padding: 0; border: 0; min-width: 0; }
.desk.bidding .tile-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s2) var(--s3); }
.desk.bidding .bid-tiles legend { width: 100%; margin: 0 0 var(--s3); padding-left: var(--s3); border-left: 3px solid var(--l-gold); font-size: var(--t-sm); font-weight: 800;
  letter-spacing: .1em; text-transform: uppercase; color: var(--l-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.desk.bidding .bid-tiles .tile { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: var(--s3); width: 100%; min-height: 64px; margin: 0;
  padding: var(--s2) var(--s3); text-align: left; font: inherit; color: var(--l-text); cursor: pointer; border-radius: 14px; border: 1px solid var(--l-edge);
  background: linear-gradient(180deg, rgba(27, 44, 85, .7), rgba(12, 24, 56, .8)); transition: box-shadow .25s, background .25s, transform .12s, opacity .2s; touch-action: manipulation; }
.desk.bidding .bid-tiles .tile:hover:not(:disabled) { border-color: rgba(141, 184, 255, .55); }
.desk.bidding .bid-tiles .tile:active:not(:disabled) { transform: scale(.98); }
.desk.bidding .bid-tiles .tile:disabled { opacity: .45; cursor: not-allowed; }
.desk.bidding .bid-tiles .tile .tlogo { width: 40px; height: 40px; border-radius: 10px; object-fit: contain; background: #000; }
.desk.bidding .bid-tiles .ttext { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.desk.bidding .bid-tiles .tname { font-size: var(--t-md); font-weight: 800; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow-wrap: anywhere; }
.desk.bidding .bid-tiles .tslots { display: block; font-size: var(--t-sm); color: var(--l-muted); font-variant-numeric: tabular-nums; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.desk.bidding .bid-tiles .tile.lead, .desk.bidding .bid-tiles .tile.lead:disabled { opacity: 1; cursor: default; border-color: transparent; box-shadow: var(--l-glow-green); background: linear-gradient(90deg, rgba(21, 128, 61, .4), rgba(15, 42, 31, .75)); }
.desk.bidding .bid-tiles .tile.lead .tslots { color: var(--l-green); font-weight: 800; }
.desk.bidding .bid-tiles .tile.chase { border-color: transparent; box-shadow: var(--l-glow-blue), inset 0 0 0 1px rgba(147, 197, 253, .35); background: linear-gradient(90deg, rgba(29, 78, 216, .35), rgba(16, 36, 82, .8)); }
.desk.bidding .bid-tiles .tile.chase .tslots { color: var(--l-blue); font-weight: 800; }
.tcheck { width: 26px; height: 26px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: #22c55e; color: #052e16; }

/* sold / unsold */
.lot-actions { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: var(--s3); margin-top: var(--s5); }
.lot-sold { display: inline-flex; align-items: center; justify-content: center; gap: var(--s3); min-height: 64px; padding: 0 var(--s4); border: 0; border-radius: 16px; cursor: pointer;
  color: #fff; font-size: var(--t-xl); font-weight: 900; letter-spacing: .02em; font-variant-numeric: tabular-nums;
  background: linear-gradient(180deg, #16a34a, #15803d 55%, #166534); box-shadow: 0 0 0 1px rgba(134, 239, 172, .5), 0 10px 26px rgba(22, 163, 74, .35), inset 0 1px 0 rgba(255, 255, 255, .22);
  transition: transform .12s, filter .2s; touch-action: manipulation; }
.lot-sold svg { width: 26px; height: 26px; padding: 3px; border: 2px solid currentColor; border-radius: 50%; box-sizing: border-box; flex: 0 0 auto; }
.lot-sold:hover:not(:disabled) { filter: brightness(1.08); }
.lot-sold:active:not(:disabled) { transform: scale(.98); }
.lot-sold:disabled { cursor: not-allowed; background: linear-gradient(180deg, #24433a, #1a3229); box-shadow: 0 0 0 1px rgba(94, 227, 155, .25); color: var(--l-muted); }
.lot-unsold { min-height: 64px; font-size: var(--t-lg); letter-spacing: .04em; }

/* history */
.desk.bidding .bid-log { margin-top: var(--s5); }
.desk.bidding .bid-log h3 { margin: 0 0 var(--s3); padding-left: var(--s3); border-left: 3px solid var(--l-gold); font-size: var(--t-sm); font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--l-muted); }
.desk.bidding .bid-log ol { list-style: none; margin: 0; padding: 0; max-height: 15rem; overflow-y: auto; border: 1px solid var(--l-edge); border-radius: 14px; background: rgba(5, 10, 28, .45); }
.desk.bidding .bid-log li { display: flex; justify-content: space-between; gap: var(--s3); padding: var(--s3) var(--s4); font-size: var(--t-md); border-top: 1px solid var(--l-edge); }
.desk.bidding .bid-log li:first-child { border-top: 0; }
.desk.bidding .bid-log li strong { font-variant-numeric: tabular-nums; }
.desk.bidding .bid-log li.top { font-weight: 800; background: linear-gradient(90deg, rgba(21, 128, 61, .45), rgba(15, 42, 31, .6)); }
.desk.bidding .bid-log li.top strong { color: var(--l-green); }
.desk.bidding .bid-log li.none { justify-content: flex-start; color: var(--l-muted); }
@media (prefers-reduced-motion: no-preference) { .desk.bidding .bid-log li.top { animation: lotIn .3s ease-out both; } }
@keyframes lotIn { from { opacity: 0; transform: translateY(-6px); } }

/* Laptop / desktop (landscape, 1100px+): the whole lot on one screen. The header spans the top; the
   price, next bid, raise and SOLD / UNSOLD sit on the left, the team tiles and the bid history on the
   right. Phones and tablets keep the single column below. */
@media (min-width: 1100px) and (min-aspect-ratio: 4 / 3) {
  .desk.bidding { gap: var(--s3); }
  .desk.bidding .desk-main { max-width: 1320px; }
  .desk.bidding .current { gap: var(--s3); }
  .desk.bidding #cur-card { padding: var(--s2) var(--s3); }
  .desk.bidding .lot-photo img { width: 64px; height: 64px; border-radius: 12px; }
  .desk.bidding .lot-name { font-size: 1.6rem; }
  .desk.bidding .lot-facts { margin-bottom: 6px; }
  #ctl-body { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); column-gap: var(--s5);
    grid-template-areas: "price tiles" "next tiles" "bump tiles" "raise tiles" "actions log"; grid-template-rows: auto auto auto auto 1fr; align-items: start; }
  #ctl-body .lot-price { grid-area: price; }
  #ctl-body .lot-next { grid-area: next; margin-top: var(--s3); }
  #ctl-body .lot-bump { grid-area: bump; }
  #ctl-body .lot-raise { grid-area: raise; margin-top: var(--s3); }
  #ctl-body .bid-tiles { grid-area: tiles; margin: 0; align-self: stretch; }
  #ctl-body .lot-actions { grid-area: actions; margin-top: var(--s3); align-self: start; }
  #ctl-body .bid-log { grid-area: log; margin-top: var(--s3); align-self: stretch; display: flex; flex-direction: column; min-height: 0; }
  #ctl-body .bid-log h3 { margin-bottom: var(--s2); }
  .desk.bidding #ctl-body .bid-log ol { max-height: 7.5rem; }
  .desk.bidding #ctl-body .bid-log li { padding: var(--s2) var(--s3); font-size: var(--t-sm); }
  .desk.bidding .tile-grid { gap: var(--s2); }
  .desk.bidding .bid-tiles .tile { min-height: 58px; padding: 6px var(--s3); }
  .desk.bidding .bid-tiles legend { margin-bottom: var(--s2); }
  .btn-raise { min-height: 76px; }
}

/* Short laptop screens (720 to 760px tall): tighten the same layout so it still fits. */
@media (min-width: 1100px) and (min-aspect-ratio: 4 / 3) and (max-height: 760px) {
  .desk.bidding.page { padding-top: var(--s3); padding-bottom: var(--s3); }
  .desk.bidding .card { padding: var(--s3) var(--s4); }
  .duel-row { min-height: 52px; padding: 6px var(--s3); }
  .lot-bump .lot-btn { min-height: 44px; }
  .btn-raise { min-height: 64px; }
  .lot-sold, .lot-unsold { min-height: 56px; }
  .desk.bidding .bid-tiles .tile { min-height: 52px; }
  .desk.bidding #ctl-body .bid-log ol { max-height: 6rem; }
}

/* phone: same order, tighter */
@media (max-width: 640px) {
  .desk.bidding { gap: var(--s2); }
  .desk.bidding .card { padding: var(--s3); border-radius: 18px; }
  .desk.bidding .current { gap: var(--s2); }
  .lot-hero { gap: var(--s3); }
  .lot-photo img { width: 64px; height: 64px; border-radius: 12px; }
  .lot-id { padding-left: var(--s3); }
  .lot-name { font-size: var(--t-xl); }
  .lot-facts { font-size: var(--t-xs); margin-bottom: 6px; }
  .lot-price { grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: var(--s3); }
  .lp-now { padding-right: var(--s3); }
  .lp-label { font-size: var(--t-xs); letter-spacing: .12em; }
  .duel-row { min-height: 58px; padding: 6px var(--s2); gap: 6px; border-radius: 12px; }
  .dr-text { line-height: 1.15; }
  .duel-row .tlogo { width: 28px; height: 28px; border-radius: 8px; }
  .dr-name { font-size: 12px; }
  .dr-tag { font-size: 11px; }
  .dr-amt { font-size: var(--t-sm); }
  .lot-next { margin-top: var(--s3); }
  .ln-label { padding: 0 var(--s2); font-size: var(--t-xs); gap: 4px; }
  .ln-label svg { width: 14px; height: 14px; }
  .ln-field { padding: 0 var(--s2); }
  .ln-cur { font-size: var(--t-xl); }
  .desk.bidding .ln-field input#bid { min-height: 48px; font-size: var(--t-xl); }
  .ln-field svg { display: none; }
  .ln-undo { margin-left: var(--s2); padding: 0 var(--s2); min-height: 48px; font-size: var(--t-xs); line-height: 1.15; max-width: 6.5rem; text-align: left; }
  .ln-undo svg { width: 18px; height: 18px; }
  .lot-bump { gap: var(--s2); margin-top: var(--s2); }
  .lot-bump .lot-btn { min-height: 46px; font-size: var(--t-md); }
  .lot-raise { margin-top: var(--s3); }
  .btn-raise { min-height: 72px; gap: var(--s3); }
  .btn-raise .rz-amt { font-size: var(--t-xl); }
  .btn-raise .rz-team { font-size: var(--t-sm); }
  .btn-raise svg { width: 26px; height: 26px; }
  .desk.bidding .bid-tiles { margin-top: var(--s4); }
  .desk.bidding .tile-grid { gap: var(--s2); }
  .desk.bidding .bid-tiles legend { font-size: var(--t-xs); margin-bottom: var(--s2); }
  .desk.bidding .bid-tiles .tile { min-height: 60px; gap: 6px; padding: 6px var(--s2); border-radius: 12px; }
  .desk.bidding .bid-tiles .ttext { line-height: 1.15; }
  .desk.bidding .bid-tiles .tile .tlogo { width: 32px; height: 32px; border-radius: 8px; }
  .desk.bidding .bid-tiles .tname { font-size: 13px; }
  .desk.bidding .bid-tiles .tslots { font-size: var(--t-xs); }
  .tcheck { width: 22px; height: 22px; }
  .lot-actions { margin-top: var(--s4); gap: var(--s2); }
  .lot-sold { min-height: 58px; font-size: var(--t-md); gap: var(--s2); padding: 0 var(--s2); white-space: nowrap; }
  .lot-sold svg { width: 22px; height: 22px; }
  .lot-unsold { min-height: 58px; font-size: var(--t-md); }
  .desk.bidding .bid-log li { padding: var(--s2) var(--s3); font-size: var(--t-sm); }
}
@media (max-width: 360px) {
  .ln-undo span { display: none; }
}

/* Scores (scores/): match-day scoring cards */
.sc-count { margin: var(--s2) 0 var(--s3); font-weight: 700; }
.sc-day { margin-top: var(--s5, 24px); }
.sc-day h2 { font-size: var(--t-lg); margin-bottom: var(--s2); }
.sc-list { display: grid; gap: var(--s3); grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); margin: 0; padding: 0; list-style: none; }
.sc-card { display: grid; gap: var(--s2); align-content: start; padding: var(--s3); border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); }
.sc-card.is-live { border-color: var(--danger-ink); box-shadow: inset 0 0 0 1px var(--danger-ink); }
.sc-top { display: flex; justify-content: space-between; align-items: center; gap: var(--s2); font-size: var(--t-sm); }
.sc-teams { margin: 0; overflow-wrap: anywhere; }
.sc-line { display: flex; justify-content: space-between; gap: var(--s2); margin: 0; font-size: var(--t-sm); }
.sc-line strong { font-variant-numeric: tabular-nums; white-space: nowrap; }
.sc-result { margin: 0; font-weight: 700; }
.sc-by { margin: 0; font-size: var(--t-xs); }
.pill.sc-live { background: var(--danger-tint); color: var(--danger-ink); }
.sc-inn { margin: var(--s4) 0 0; padding: var(--s3); border: 1px solid var(--line); border-radius: var(--r-md); min-width: 0; }
.sc-inn legend { padding: 0 var(--s1); font-weight: 700; }
.sc-inn-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s3); }
.sc-inn-grid .field { margin: 0; }
.sc-inn-grid input { width: 100%; }
#sf .seg { display: flex; flex-wrap: wrap; }
#sf .seg label { flex: 1 1 140px; }
#sf .seg span { justify-content: center; min-height: 44px; }

/* Jersey details PDF (jersey/) */
.jp-status { margin: var(--s2) 0 var(--s3); font-weight: 700; }
.jp-actions { display: flex; flex-wrap: wrap; gap: var(--s2); margin-bottom: var(--s4); }
.jp-table { width: 100%; max-width: 560px; border-collapse: collapse; }
.jp-table th, .jp-table td { padding: var(--s2) var(--s3); border-bottom: 1px solid var(--line); text-align: left; }
.jp-table .num { text-align: right; font-variant-numeric: tabular-nums; }

/* ------------------------------------------------- platform screens
 * Sign-up, the organisation dashboard and the moderator console. */
.gate-wide { max-width: 640px; }
.gate-alt { margin-top: var(--s4); text-align: center; color: var(--muted); font-size: var(--t-sm); }
.check { display: flex; gap: var(--s2); align-items: flex-start; margin: var(--s4) 0; font-size: var(--t-sm); }
.check input { margin-top: 3px; flex: none; width: 18px; height: 18px; }
.pill.mode-practice { background: var(--gold-tint); color: var(--gold-ink); }
.pill.mode-live { background: var(--success-tint); color: var(--success-ink); }
.pill.mode-closed { background: var(--surface-2); color: var(--muted); }
.pill.mode-suspended { background: var(--danger-tint); color: var(--danger-ink); }
.notice { margin: 0 0 var(--s4); padding: var(--s3) var(--s4); border-radius: var(--r-md); background: var(--brand-tint); color: var(--text); border-left: 4px solid var(--brand); }
.notice-bad { background: var(--danger-tint); border-left-color: var(--danger); }
.auc-list { display: grid; gap: var(--s4); }
.auc-head { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--s3); }
.auc-head h2 { margin: 0; font-size: var(--t-lg); }
.auc-head p { margin: var(--s1) 0 0; }
.auc-next { margin: var(--s4) 0 var(--s3); max-width: 70ch; }
.auc-actions { display: flex; flex-wrap: wrap; gap: var(--s2); margin-top: var(--s3); }
.steps { display: flex; flex-wrap: wrap; gap: var(--s1) var(--s2); list-style: none; margin: var(--s4) 0 0; padding: 0; font-size: var(--t-sm); counter-reset: step; }
.steps li { display: flex; align-items: center; gap: var(--s2); padding: var(--s1) var(--s3); border-radius: var(--r-full); background: var(--surface-2); color: var(--muted); counter-increment: step; }
.steps li::before { content: counter(step); display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--surface); font-weight: 700; font-size: var(--t-xs); }
.steps li.done { background: var(--success-tint); color: var(--success-ink); }
.steps li.now { background: var(--brand); color: var(--on-brand); font-weight: 700; }
.steps li.now::before { color: var(--brand-ink); background: #fff; }
.quote { margin-top: var(--s4); padding: var(--s4); border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface-2); }
.quote-amount { display: flex; flex-direction: column; gap: var(--s1); }
.quote-amount strong { font-size: var(--t-2xl); line-height: 1.1; }
.quote-facts { display: flex; flex-wrap: wrap; gap: var(--s3) var(--s6); margin: var(--s3) 0; }
.quote-facts dt { font-size: var(--t-xs); color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.quote-facts dd { margin: 2px 0 0; }
.quote-form, .inline-form { display: flex; flex-wrap: wrap; gap: var(--s3); align-items: flex-end; margin-top: var(--s3); }
.quote-form .field, .inline-form .field { margin: 0; min-width: 160px; }
.inline-form .field.grow { flex: 1 1 260px; }
.quote-form .form-error, .inline-form .form-error { flex-basis: 100%; margin: 0; }
.share { margin-top: var(--s4); }
.share label { display: block; font-size: var(--t-sm); font-weight: 600; margin-bottom: var(--s1); }
.share-row { display: flex; gap: var(--s2); }
.share-row input { flex: 1; min-width: 0; }
.section-h { margin: var(--s5) 0 var(--s3); font-size: var(--t-lg); }
.section-h:first-child { margin-top: var(--s4); }
.todo { margin-bottom: var(--s3); }
.todo h3 { margin: 0 0 var(--s1); font-size: var(--t-md); }
.todo p { margin: 0 0 var(--s2); }
#panel { margin-top: var(--s4); }
#panel:focus-visible { outline: 2px solid var(--brand); outline-offset: 4px; }

/* Display: practice watermark (until the auction is approved) and the producer credit. */
.d-practice { display: none; }
body.is-practice .d-practice { display: block; position: fixed; inset: 0; z-index: 40; pointer-events: none; display: grid; place-items: center;
  font: 800 clamp(4rem, 16vw, 16rem)/1 var(--font); letter-spacing: .08em; color: rgba(255, 255, 255, .13); transform: rotate(-18deg); user-select: none; }
.d-credit { position: fixed; right: var(--s4); bottom: var(--s2); z-index: 30; margin: 0; font-size: var(--t-sm); color: rgba(255, 255, 255, .8); text-shadow: 0 1px 2px rgba(0, 0, 0, .6); }
.d-brand[hidden] { display: none; }

/* ------------------------------------------------------ landing page */
body.landing { min-height: 100vh; display: flex; flex-direction: column; }
.land-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); padding: var(--s3) var(--s4); max-width: 1100px; width: 100%; margin: 0 auto; }
.land-head nav { display: flex; gap: var(--s2); }
.land { flex: 1; width: 100%; max-width: 1100px; margin: 0 auto; padding: var(--s6) var(--s4) var(--s7); }
.land-hero { max-width: 760px; }
.land-hero h1 { font-size: clamp(1.9rem, 4.5vw, 3rem); line-height: 1.1; margin: 0 0 var(--s4); }
.land-lead { font-size: var(--t-lg); color: var(--muted); margin: 0 0 var(--s5); }
.land-cta { display: flex; flex-wrap: wrap; gap: var(--s3); margin: 0 0 var(--s3); }
.land-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: var(--s4); margin-top: var(--s7); }
.land-grid h2 { margin: 0 0 var(--s2); font-size: var(--t-lg); }
.land-grid p { margin: 0; color: var(--muted); }
.land-steps { margin-top: var(--s7); max-width: 760px; }
.land-steps ol { padding-left: var(--s5); display: grid; gap: var(--s3); }
.land-foot { padding: var(--s4); text-align: center; }
