/* ==========================================================================
   Beltchecker Brackets: the organizer's app (brackets.php) and the public tournament page (bk.php).
   The Club TV world on a phone and a laptop: near black, a slow aurora, Geist, glass cards, the brand gradient on
   the one thing that moves you forward on each screen.
   ========================================================================== */
/* The palette, radii, type and the shared components: styles/bk-tokens.css (loaded first). */
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body.bk-app { min-height: 100vh; background: var(--bg); color: var(--ink); font: 15px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
.aurora { position: fixed; inset: -20%; z-index: 0; pointer-events: none; filter: blur(110px); opacity: 0.4; }
.aurora i { position: absolute; width: 46vw; height: 46vw; border-radius: 50%; animation: drift 44s ease-in-out infinite alternate; }
.aurora i:nth-child(1) { left: 0; top: 0; background: radial-gradient(circle, rgba(3, 195, 227, 0.45), transparent 65%); }
.aurora i:nth-child(2) { right: 0; top: 10%; background: radial-gradient(circle, rgba(109, 92, 240, 0.5), transparent 65%); animation-delay: -14s; }
.aurora i:nth-child(3) { left: 30%; bottom: -10%; background: radial-gradient(circle, rgba(176, 74, 192, 0.35), transparent 65%); animation-delay: -28s; }
@keyframes drift { to { transform: translate3d(5vw, 4vh, 0) scale(1.12); } }

/* top bar */
.app-top { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 18px; padding: calc(10px + env(safe-area-inset-top, 0px)) 20px 10px; background: rgba(7, 7, 11, 0.72); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 800; letter-spacing: -0.01em; flex: none; }
.brand img { width: 28px; height: 28px; }
.brand em { font: 600 11px var(--mono); font-style: normal; letter-spacing: 0.08em; text-transform: uppercase; color: var(--amber); }
.tabs { flex: 1; display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; min-width: 0; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { flex: none; text-decoration: none; padding: 8px 12px; border-radius: 10px; color: var(--muted); font-weight: 600; font-size: 14px; transition: color 0.2s, background 0.2s; }
.tabs a:hover { color: var(--ink); }
.tabs a.is-on { color: var(--ink); background: var(--card-2); }
.back { margin-left: auto; flex: none; font-size: 13px; color: var(--muted); text-decoration: none; }

.app { position: relative; z-index: 1; max-width: 1240px; margin: 0 auto; padding: 28px 20px 80px; display: grid; gap: 18px; }
.hero { padding: 26px 4px 8px; }
.hero.sm { padding-top: 8px; }
.eyebrow { margin: 0 0 8px; font: 600 12px var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--cyan); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.hero h1 { margin: 0; font-size: clamp(30px, 5vw, 56px); line-height: 1.02; letter-spacing: -0.035em; font-weight: 800; text-wrap: balance; max-width: 18ch; }
.hero.sm h1 { font-size: clamp(26px, 4vw, 40px); max-width: none; }
.lead { margin: 12px 0 0; font-size: 17px; color: var(--ink-2); max-width: 60ch; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; min-width: 0; backdrop-filter: blur(6px); animation: rise 0.5s var(--ease) both; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.card h2 { margin: 0 0 12px; font-size: 19px; letter-spacing: -0.01em; }
.card h3 { margin: 0; }
.muted { color: var(--muted); }
.warn { color: var(--amber); }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 18px; align-items: start; }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.bar h2 { margin: 0; }
.bar.wide { margin: 0; }
.btns { display: flex; gap: 8px; flex-wrap: wrap; }

/* buttons and fields */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 0 16px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--card-2); font-weight: 650; text-decoration: none; cursor: pointer; transition: transform 0.12s var(--ease), background 0.2s, border-color 0.2s; white-space: nowrap; }
.btn:hover { border-color: rgba(255, 255, 255, 0.3); }
.btn:disabled { opacity: 0.5; cursor: default; }
/* Primary as in the rest of Beltchecker (settings.css .bc-set-btn--primary): solid ink, no gradient (Christian 24 Nov 2026) */
.btn.go { background: var(--ink); border: 0; color: var(--bg); box-shadow: none; }
.btn.go:hover { filter: brightness(1.3); }
.btn.ghost { background: transparent; }
.btn.sm { min-height: 34px; padding: 0 12px; font-size: 13px; border-radius: 10px; }
.link { background: none; border: 0; padding: 0; color: var(--cyan); font-weight: 600; cursor: pointer; }
.form { display: grid; gap: 12px; }
.form.inline { grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); align-items: end; }
label { display: grid; gap: 6px; min-width: 0; }
label > span { font-size: 12px; font-weight: 600; color: var(--muted); letter-spacing: 0.02em; }
input, select, textarea { width: 100%; min-height: 42px; padding: 9px 12px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--field, rgba(0, 0, 0, 0.35)); outline: none; transition: border-color 0.2s, box-shadow 0.2s; }
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(3, 195, 227, 0.18); }
select option { background: #15151d; }
.is-saved { border-color: var(--green) !important; box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.2) !important; }
.two, .three { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: end; }
.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 640px) { .three { grid-template-columns: 1fr; } }
.checks { display: grid; gap: 8px; }
.chk { display: flex; gap: 10px; align-items: center; font-size: 14px; color: var(--ink-2); }
.chk input { width: 18px; min-height: 18px; height: 18px; accent-color: var(--violet); }
label.big input { min-height: 58px; font-size: 20px; }
.copy { display: flex; gap: 8px; }
.copy input { flex: 1; font-family: var(--mono); font-size: 13px; }

/* pills */
/* .pill and its states: styles/bk-tokens.css */
@keyframes blink { 50% { opacity: 0.3; } }

/* belts */
.belt { position: relative; flex: none; display: inline-block; width: 40px; height: 10px; border-radius: 3px; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.35); vertical-align: middle; }
.belt b { position: absolute; right: 5px; top: 0; bottom: 0; width: 14px; background: #16161c; display: flex; align-items: center; justify-content: center; gap: 2px; }
.belt b i { width: 2px; height: 6px; background: #fff; }
.belt.is-black b { background: #c62f3a; }

/* tournament list */
.tlist { display: grid; gap: 8px; }
.trow { display: grid; grid-template-columns: 56px 1fr auto; gap: 14px; align-items: center; padding: 12px; border-radius: 16px; text-decoration: none; background: var(--card); border: 1px solid var(--line); transition: border-color 0.2s, transform 0.2s var(--ease); }
.trow:hover { border-color: var(--line-2); transform: translateY(-1px); }
.trow .date { display: grid; place-items: center; height: 56px; border-radius: 14px; background: var(--card-2); font: 600 11px var(--mono); text-transform: uppercase; color: var(--muted); line-height: 1.1; }
.trow .date b { font-size: 22px; color: var(--ink); font-family: var(--font); }
.trow .ti { min-width: 0; display: grid; }
.trow .ti b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.trow .ti small { color: var(--muted); }
.sys { border-color: rgba(245, 178, 60, 0.3); }

/* overview */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.stat { padding: 18px; border-radius: var(--r); background: var(--card); border: 1px solid var(--line); animation: rise 0.5s var(--ease) both; }
.stat b { display: block; font: 800 40px/1 var(--mono); letter-spacing: -0.03em; }
.stat b small { font-size: 18px; color: var(--muted); }
.stat span { font-size: 13px; color: var(--muted); }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; counter-reset: s; }
.steps a { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 14px; text-decoration: none; background: var(--card); }
.steps i { width: 26px; height: 26px; flex: none; border-radius: 50%; border: 2px solid var(--line-2); display: grid; place-items: center; font-style: normal; font: 700 12px var(--mono); color: var(--muted); counter-increment: s; }
.steps i::before { content: counter(s); }
.steps .is-done i { background: var(--green); border-color: var(--green); color: #04130a; }
.steps .is-done i::before { content: "✓"; }
.steps .is-done span { color: var(--muted); text-decoration: line-through; text-decoration-color: rgba(255, 255, 255, 0.25); }

/* athletes */
.drawer { margin: 8px 0 14px; padding: 16px; border-radius: 16px; background: rgba(0, 0, 0, 0.3); border: 1px solid var(--line); display: grid; gap: 12px; }
.drawer[hidden] { display: none; }
.roster { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 6px; max-height: 340px; overflow: auto; }
.roster .all { grid-column: 1 / -1; }
.rr { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; background: var(--card); font-size: 14px; cursor: pointer; }
.rr input, .all input { width: 18px; min-height: 18px; height: 18px; accent-color: var(--violet); flex: none; }
.rr > span:not(.belt) { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rr em { font-style: normal; font-size: 11px; color: var(--amber); }
.rr small { color: var(--muted); }
.rr.is-in { opacity: 0.5; }
.results { display: grid; gap: 6px; }
.mres { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 12px; background: var(--card); }
.mres img, .mres > i { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; background: var(--card-2); flex: none; }
.mres > span:not(.belt) { flex: 1; min-width: 0; display: grid; }
.mres small { color: var(--muted); }
.table { overflow-x: auto; margin: 0 -20px -20px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font: 600 11px var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
th:first-child, td:first-child { padding-left: 20px; }
td { padding: 8px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
td b { display: block; white-space: nowrap; }
td small { color: var(--muted); font-size: 12px; }
td .w { width: 78px; min-height: 34px; padding: 5px 8px; font-family: var(--mono); }
td select { min-height: 34px; padding: 5px 8px; width: auto; }
td.dv { color: var(--ink-2); font-size: 13px; min-width: 200px; }
.x { width: 30px; height: 30px; border-radius: 8px; border: 0; background: transparent; color: var(--muted); font-size: 18px; cursor: pointer; }
.x:hover { background: rgba(255, 77, 94, 0.15); color: var(--red); }

/* divisions */
.preview:empty { display: none; }
.preview .sum { display: flex; gap: 18px; margin: 6px 0 12px; font-size: 14px; color: var(--muted); }
.preview .sum b { color: var(--ink); font: 800 20px var(--mono); margin-right: 4px; }
.probs { padding: 10px 12px; border-radius: 12px; background: rgba(245, 178, 60, 0.1); color: var(--amber); font-size: 13px; margin-bottom: 10px; }
.pv { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; }
.pvd { padding: 12px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); display: grid; gap: 2px; animation: rise 0.4s var(--ease) both; animation-delay: calc(var(--i) * 25ms); }
.pvd.is-confirm { border-color: rgba(245, 178, 60, 0.5); }
.pvd span { font-size: 13px; color: var(--cyan); }
.pvd small { color: var(--muted); font-size: 12px; }
.divs { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 14px; }
.div header { display: flex; justify-content: space-between; gap: 10px; align-items: start; }
.div .eyebrow { margin-bottom: 4px; }
.div h3 { font-size: 22px; letter-spacing: -0.02em; }
.div h3 span { color: var(--muted); font-weight: 600; font-size: 16px; }
.div .meta { display: flex; gap: 14px; flex-wrap: wrap; margin: 10px 0 8px; font-size: 13px; color: var(--muted); }
.prog { height: 6px; border-radius: 99px; background: var(--card-2); overflow: hidden; }
.prog i { display: block; height: 100%; background: var(--grad); border-radius: 99px; transition: width 0.6s var(--ease); }
.ppl { list-style: none; margin: 12px 0; padding: 0; display: grid; gap: 4px; max-height: 190px; overflow: auto; }
.ppl li { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.ppl small { margin-left: auto; color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 45%; }
.div .ctl { display: grid; grid-template-columns: repeat(auto-fit, minmax(80px, 1fr)); gap: 8px; }
.div .ctl input, .div .ctl select { min-height: 36px; padding: 6px 8px; }
.div .tech { margin-top: 8px; }
.div .tech input { min-height: 36px; }
.div footer { display: flex; gap: 6px; margin-top: 12px; flex-wrap: wrap; }
.note { margin: 10px 0 0; padding: 8px 10px; border-radius: 10px; background: rgba(245, 178, 60, 0.1); color: var(--amber); font-size: 13px; }

/* mats */
.mats { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.mat header { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; }
.mat h3 { font-size: 22px; }
.mat .live { display: grid; gap: 4px; padding: 12px; border-radius: 14px; background: rgba(34, 197, 94, 0.08); border: 1px solid rgba(34, 197, 94, 0.35); margin-bottom: 10px; }
.mat .live b { display: flex; justify-content: space-between; font-size: 16px; }
.mat .live em { font: 800 18px var(--mono); font-style: normal; }
.mat .live small { color: var(--muted); font-size: 12px; }
.q { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.q li { display: grid; gap: 8px; padding: 10px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); }
.q li.is-called { border-color: rgba(245, 178, 60, 0.5); background: rgba(245, 178, 60, 0.06); }
.q li b { font-size: 14px; }
.q li small { display: block; color: var(--muted); font-size: 12px; }
.q .acts { display: flex; gap: 6px; }
.q .acts select.sm { min-height: 34px; padding: 4px 8px; font-size: 13px; }
.mat h4 { margin: 14px 0 6px; font: 600 11px var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.recent { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: 13px; }
.recent li { display: flex; gap: 8px; align-items: center; justify-content: space-between; }
.recent small { color: var(--muted); }

/* weigh-in */
.weigh .results { margin-top: 12px; }
.wres { display: grid; grid-template-columns: 1fr 100px auto 110px; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); }
.wres b { display: flex; align-items: center; gap: 8px; }
.wres small { color: var(--muted); }
.wres input { font: 700 18px var(--mono); }
.wres .out { font: 700 14px var(--mono); }
.wres.is-ok { border-color: rgba(34, 197, 94, 0.5); }
.wres.is-ok .out { color: var(--green); }
.wres.is-over { border-color: rgba(245, 178, 60, 0.6); }
.wres.is-over .out { color: var(--amber); }
@media (max-width: 640px) { .wres { grid-template-columns: 1fr 90px; } .wres .out { grid-column: 1 / -1; } }
.wlist { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.wlist li { display: flex; gap: 12px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 14px; flex-wrap: wrap; }
.wlist span { font-family: var(--mono); }
.wlist small { color: var(--muted); margin-left: auto; }

/* staff and screens */
.newlink { display: grid; grid-template-columns: 140px 1fr; gap: 16px; align-items: center; margin: 12px 0; padding: 14px; border-radius: 16px; background: rgba(3, 195, 227, 0.06); border: 1px solid rgba(3, 195, 227, 0.3); }
.newlink[hidden] { display: none; }
.newlink .qr { background: #fff; border-radius: 12px; padding: 8px; }
.newlink .qr svg { width: 100%; height: auto; display: block; }
.newlink p { margin: 0 0 8px; }
.slist { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 6px; }
.slist li { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 12px; background: var(--card); font-size: 14px; }
.slist li.is-off { opacity: 0.5; }
.slist li small { color: var(--muted); margin-left: auto; }
.slist select { width: auto; min-height: 34px; padding: 4px 8px; }

/* website editor */
.wcover { display: grid; grid-template-columns: 1.2fr 1fr; gap: 20px; align-items: center; }
.wc-img { aspect-ratio: 16 / 7; border-radius: 16px; background: var(--grad); background-size: cover; background-position: center; display: grid; place-items: center; color: #fff; font-weight: 700; transition: opacity 0.3s; }
.wc-img.is-loading { opacity: 0.5; }
.wcover label.btn { display: inline-flex; margin-top: 10px; }
@media (max-width: 720px) { .wcover { grid-template-columns: 1fr; } }
.rows { display: grid; gap: 8px; }
.row2 { display: grid; grid-template-columns: 110px 1fr; gap: 8px; }
.rowq { display: grid; gap: 6px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.paybox { display: grid; gap: 6px; justify-items: start; padding: 14px; border-radius: 14px; background: var(--card-2); border: 1px solid var(--line-2); }
.paybox.ok { border-color: color-mix(in srgb, var(--green) 50%, transparent); background: color-mix(in srgb, var(--green) 8%, transparent); }
.savebar { position: sticky; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); display: flex; justify-content: flex-end; z-index: 5; }
.savebar .btn { min-height: 50px; padding: 0 26px; }

/* academy picker */
.apick { position: relative; }
.apick-list { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 5; display: grid; background: #15151d; border: 1px solid var(--line-2); border-radius: 12px; overflow: hidden; box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5); }
.apick-list:empty { display: none; }
.apick-list button { display: grid; text-align: left; gap: 2px; padding: 10px 12px; background: none; border: 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.apick-list button:hover { background: var(--card-2); }
.apick-list small { color: var(--muted); }

/* share with athletes */
.share { display: grid; grid-template-columns: 170px 1fr; gap: 20px; align-items: center; }
.share .share-qr { background: #fff; border-radius: 16px; padding: 12px; aspect-ratio: 1; }
.share .share-qr svg { width: 100%; height: 100%; display: block; }
.share .copy, .share .btns { margin-top: 10px; }
@media (max-width: 640px) { .share { grid-template-columns: 1fr; } .share .share-qr { width: 160px; } }



@media (max-width: 720px) {
  .app-top { flex-wrap: wrap; gap: 8px 14px; }
  .tabs { order: 3; flex-basis: 100%; }
  .app { padding: 18px 16px 60px; }
  .card { padding: 16px; }
  .table { margin: 0 -16px -16px; }
  th:first-child, td:first-child { padding-left: 16px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before { animation: none !important; transition: none !important; } }

/* ---------------------------------------------------------------- light (cookie bcTheme, bkThemeHead) */
:root[data-theme="light"] .aurora { opacity: 0.22; }
:root[data-theme="light"] .card, :root[data-theme="light"] .stat, :root[data-theme="light"] .trow { box-shadow: 0 1px 2px rgba(16, 16, 24, 0.04), 0 8px 24px -12px rgba(16, 16, 24, 0.12); }
:root[data-theme="light"] .app-top { background: rgba(246, 246, 250, 0.8); }
:root[data-theme="light"] input, :root[data-theme="light"] select, :root[data-theme="light"] textarea { background: var(--field); }
:root[data-theme="light"] .apick-list { background: var(--pop); color: var(--ink); }
:root[data-theme="light"] select option { background: #fff; }
:root[data-theme="light"] .drawer { background: rgba(16, 16, 24, 0.03); }
:root[data-theme="light"] .mres, :root[data-theme="light"] .rr, :root[data-theme="light"] .q li, :root[data-theme="light"] .slist li, :root[data-theme="light"] .steps a, :root[data-theme="light"] .wres, :root[data-theme="light"] .pvd { background: rgba(16, 16, 24, 0.035); }
:root[data-theme="light"] .pill.live, :root[data-theme="light"] .pill.ready { background: rgba(22, 163, 74, 0.12); }
:root[data-theme="light"] .newlink { background: rgba(8, 145, 178, 0.06); }

/* Academy picker: the logo in front of the name */
.apick-logo { flex: none; width: 32px; height: 32px; border-radius: 8px; overflow: hidden; display: grid; place-items: center; background: color-mix(in srgb, var(--bc-accent, #5b4bd1) 12%, transparent); color: var(--bc-accent, #5b4bd1); font-size: 12px; font-weight: 700; }
.apick-logo img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.apick-list button { display: flex !important; align-items: center; gap: 12px; }
.apick-list button > span:last-child { display: grid; gap: 2px; min-width: 0; }
.apick [data-apick-mark] { position: absolute; left: 6px; top: 50%; transform: translateY(-50%); pointer-events: none; }
.apick [data-apick-mark] .apick-logo { width: 30px; height: 30px; }
.apick.has-mark [data-apick-q] { padding-left: 44px; }

/* The organizer's menu on the left, like academy management (styles/club.css .cl-rail) */
.bk-shell { display: grid; grid-template-columns: 264px minmax(0, 1fr); min-height: 100vh; min-height: 100dvh; }
.bk-body { min-width: 0; position: relative; }
.rail { position: sticky; top: 0; height: 100vh; height: 100dvh; display: flex; flex-direction: column; gap: 6px; padding: calc(18px + env(safe-area-inset-top, 0px)) 12px calc(14px + env(safe-area-inset-bottom, 0px)); background: #0c0d1d; color: #fff; z-index: 30; isolation: isolate; overflow: hidden; }
.rail::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 260px; z-index: -1; pointer-events: none; background: radial-gradient(60% 80% at 10% 0%, rgba(3, 195, 227, 0.32), transparent 70%), radial-gradient(60% 80% at 90% 10%, rgba(91, 75, 209, 0.38), transparent 70%); }
.rail-brand { display: flex; align-items: center; gap: 12px; padding: 4px 6px 10px; color: #fff !important; text-decoration: none !important; }
.rail-logo { flex: none; width: 42px; height: 42px; border-radius: 12px; overflow: hidden; background: #fff; display: grid; place-items: center; }
.rail-logo img { width: 100%; height: 100%; object-fit: contain; }
.rail-name { display: grid; min-width: 0; }
.rail-name b { font-size: 15px; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.rail-name small { color: rgba(255, 255, 255, 0.6); font-size: 12px; }
.rail-tag { margin: 0 6px 6px; font: 700 10px/1 "Geist Mono", monospace; letter-spacing: 0.12em; text-transform: uppercase; color: #f5b23c; }
.rail-nav { display: grid; gap: 2px; align-content: start; flex: 1 1 auto; min-height: 0; overflow-y: auto; scrollbar-width: thin; }
.rail-link { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 12px; border-radius: 12px; color: rgba(255, 255, 255, 0.78) !important; text-decoration: none !important; font-weight: 600; font-size: 14.5px; transition: background 0.15s, color 0.15s; }
.rail-link i { width: 18px; text-align: center; opacity: 0.85; }
.rail-link:hover { background: rgba(255, 255, 255, 0.07); color: #fff !important; }
.rail-link.is-on { background: rgba(255, 255, 255, 0.12); color: #fff !important; box-shadow: inset 3px 0 0 #5b8cff; }
.rail-link.quiet { font-size: 13.5px; min-height: 38px; color: rgba(255, 255, 255, 0.62) !important; }
.rail-foot { margin-top: auto; display: grid; gap: 2px; padding-top: 12px; border-top: 1px solid rgba(255, 255, 255, 0.09); }
/* A short screen (a laptop at 900 px): the menu gets tighter, and a fade with an arrow shows there is more below */
.rail-nav { position: relative; }
.rail-more { display: none; position: relative; z-index: 2; margin: -34px auto 0; width: 34px; height: 26px; border: 0; border-radius: 13px; background: rgba(255, 255, 255, 0.14); color: #fff; font-size: 12px; cursor: pointer; }
.rail.has-more .rail-nav { -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 44px), transparent); mask-image: linear-gradient(to bottom, #000 calc(100% - 44px), transparent); }
.rail.has-more .rail-more { display: block; }
@media (max-height: 1000px) {
  .rail { gap: 4px; padding-top: calc(12px + env(safe-area-inset-top, 0px)); }
  .rail-brand { padding-bottom: 6px; }
  .rail-link { min-height: 36px; }
  .rail-link.quiet { min-height: 32px; }
  .rail-head { margin-top: 8px !important; }
  .rail-foot { padding-top: 6px; }
}
.app-top.is-slim { display: none; }
.rail-open { width: 42px; height: 42px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--card-2); color: var(--ink); font-size: 16px; cursor: pointer; }
.top-title { font-weight: 700; font-size: 16px; }
.rail-scrim { position: fixed; inset: 0; z-index: 25; background: rgba(0, 0, 0, 0.45); }
@media (max-width: 900px) {
  .bk-shell { grid-template-columns: 1fr; }
  .rail { position: fixed; left: 0; top: 0; bottom: 0; width: min(300px, 86vw); transform: translateX(-102%); transition: transform 0.28s cubic-bezier(0.2, 0.8, 0.2, 1); }
  .rail.is-open { transform: none; box-shadow: 0 0 60px rgba(0, 0, 0, 0.5); }
  .app-top.is-slim { display: flex; }
}

/* Beltchecker Score column: the dial with the number in the middle */
.sdial { position: relative; display: inline-grid; place-items: center; width: 44px; height: 44px; vertical-align: middle; }
.sdial svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.sdial b { position: relative; font: 700 13px/1 "Geist Mono", ui-monospace, monospace; color: var(--ink); }

/* Publish: the first thing on the overview */

/* Settings groups: floating weight classes and weigh-in */
.fs { border: 1px solid var(--line-2); border-radius: 14px; padding: 14px 16px 16px; margin: 0; display: grid; gap: 12px; }
.fs legend { padding: 0 6px; font-weight: 700; }
.fs .muted { margin: 0; }

/* Weigh-in desk: where each athlete stands */
.wst { font: 700 11px/1 "Geist Mono", monospace; letter-spacing: 0.06em; text-transform: uppercase; padding: 5px 8px; border-radius: 999px; background: var(--card-2); color: var(--muted); }
.wst.open { background: color-mix(in srgb, #1f9d72 18%, transparent); color: #1f9d72; }
.wst.missed { background: color-mix(in srgb, #e5533f 18%, transparent); color: #e5533f; }
.wst.early { background: color-mix(in srgb, #f5b23c 20%, transparent); color: #b7790b; }

/* Placement preview: who is in each division at a glance */
.probs { display: grid; gap: 8px; padding: 14px 16px; border-radius: 14px; background: color-mix(in srgb, #f5b23c 14%, transparent); }
.probs h3 { margin: 0; font-size: 15px; color: #b7790b; }
.probs ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.probs li { display: grid; grid-template-columns: minmax(120px, auto) 1fr auto; gap: 12px; align-items: center; }
.probs li span { color: var(--muted); font-size: 13.5px; }
.pvd { display: grid; gap: 12px; align-content: start; }
.pvd-top { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.pvd-top b { font-size: 15px; }
.pvd-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.pvd-chips span { font-size: 12px; font-weight: 600; padding: 4px 9px; border-radius: 999px; background: var(--card-2); color: var(--ink); }
.pvd-chips span:empty { display: none; }
.pvd-n { flex: none; display: grid; justify-items: center; gap: 2px; min-width: 46px; padding: 6px 8px; border-radius: 12px; background: var(--card-2); }
.pvd-n b { font: 700 20px/1 "Geist Mono", monospace; }
.pvd-n i { font-size: 11px; color: var(--muted); }
.pvd-people { display: flex; flex-wrap: wrap; gap: 6px; }
.pv-p { position: relative; width: 36px; height: 36px; }
.pv-p img, .pv-p i { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; display: grid; place-items: center; font-style: normal; font-size: 12px; font-weight: 700; background: var(--card-2); color: var(--muted); }
.pv-p em { position: absolute; left: 4px; right: 4px; bottom: -3px; height: 5px; border-radius: 3px; box-shadow: 0 0 0 2px var(--bg, #fff); }
.pv-more { display: grid; place-items: center; height: 36px; padding: 0 8px; font-size: 12px; font-weight: 700; color: var(--muted); }
.pvd-foot { display: flex; flex-wrap: wrap; gap: 6px 12px; font-size: 12.5px; color: var(--muted); }
.pvd-foot .warnc { color: #b7790b; font-weight: 600; }
.pvd-foot .bad { color: #e5533f; font-weight: 600; }
.pvd.is-alone { border-color: color-mix(in srgb, #e5533f 45%, transparent); }

/* Athletes: picture next to the name */
td.ath { display: flex; align-items: center; gap: 12px; }
td.ath > span:last-child { display: grid; min-width: 0; }
.av { flex: none; width: 38px; height: 38px; border-radius: 50%; overflow: hidden; display: grid; place-items: center; background: var(--card-2); color: var(--muted); font-size: 12px; font-weight: 700; }
.av img { width: 100%; height: 100%; object-fit: cover; }
tr:target { background: color-mix(in srgb, #f5b23c 16%, transparent); }

.addstyle { min-height: 42px; border-radius: 12px; padding: 0 12px; }

/* Division cards: settings folded away, athletes dragged between divisions */
.dset { border-top: 1px solid var(--line); padding-top: 10px; }
.dset > summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 8px; font-weight: 650; font-size: 14px; color: var(--muted); }
.dset > summary::-webkit-details-marker { display: none; }
.dset > summary small { font-weight: 500; opacity: 0.8; }
.dset[open] > summary { color: var(--ink); margin-bottom: 10px; }
.dset > footer { margin-top: 10px; }
.ppl li[data-dnd] { cursor: grab; border-radius: 8px; transition: background 0.15s, opacity 0.15s; }
.ppl li[data-dnd]:hover { background: var(--card-2); }
.ppl li .grip { opacity: 0; width: 10px; color: var(--muted); font-size: 11px; transition: opacity 0.15s; }
.ppl li:hover .grip { opacity: 0.8; }
.ppl li.is-dragging { opacity: 0.35; }
.ppl[data-drop] { min-height: 36px; border-radius: 12px; transition: background 0.15s, box-shadow 0.15s; }
.ppl.is-over { background: color-mix(in srgb, #5b8cff 12%, transparent); box-shadow: inset 0 0 0 2px color-mix(in srgb, #5b8cff 60%, transparent); }
.div.is-busy { opacity: 0.6; pointer-events: none; }
.pool.is-empty .ppl { border: 2px dashed var(--line-2); }

/* Move dialog: click an athlete, pick the division */
.mv { border: 0; padding: 0; border-radius: 20px; width: min(560px, calc(100vw - 32px)); max-height: min(80vh, 760px); background: var(--card-solid, #fff); color: var(--ink); box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35); }
.mv::backdrop { background: rgba(10, 10, 20, 0.45); backdrop-filter: blur(4px); }
.mv-in { display: grid; gap: 12px; padding: 20px; max-height: min(80vh, 760px); grid-template-rows: auto auto 1fr auto; }
.mv-in header { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.mv-in h3 { margin: 2px 0; font-size: 20px; }
.mv-in .x { border: 0; background: var(--card-2); width: 36px; height: 36px; border-radius: 10px; font-size: 20px; cursor: pointer; color: var(--ink); }
.mv-in input[type=search] { min-height: 44px; border-radius: 12px; padding: 0 14px; }
.mv-list { overflow-y: auto; display: grid; gap: 4px; align-content: start; min-height: 120px; }
.mv-list button { display: flex; justify-content: space-between; align-items: center; gap: 10px; text-align: left; padding: 11px 12px; border: 0; border-radius: 12px; background: var(--card-2); color: var(--ink); font: inherit; font-weight: 600; cursor: pointer; }
.mv-list button:hover { background: color-mix(in srgb, #5b8cff 16%, transparent); }
.mv-list button small { color: var(--muted); font-weight: 500; white-space: nowrap; }
.mv-list button[disabled] { opacity: 0.45; cursor: not-allowed; }
.mv-list button.is-here { box-shadow: inset 0 0 0 2px color-mix(in srgb, #5b8cff 60%, transparent); }
.ppl li[data-entry] { cursor: pointer; }

/* Categories editor */
.catrows { display: grid; gap: 10px; }
.catrow { display: grid; grid-template-columns: 1.3fr 1.3fr 0.8fr auto; gap: 10px; align-items: end; }
.catrow .x { width: 42px; height: 42px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--card-2); color: var(--ink); font-size: 18px; cursor: pointer; }
.catpick { display: flex; flex-wrap: wrap; gap: 8px 16px; }
@media (max-width: 700px) { .catrow { grid-template-columns: 1fr 1fr; } }

/* The Categories page (27 Nov 2026): name, rules, weight classes; prices are on Entry and payment */
.catrow { grid-template-columns: 1.3fr 1fr 1.2fr auto; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.catrow:last-child { border-bottom: 0; padding-bottom: 0; }
.catrow .catmeta { grid-column: 1 / -1; margin: -2px 0 0; }
/* An open weight row has a fourth field (Who enters): one more column, so the remove button stays on the row (QA 2 Dec 2026) */
@media (min-width: 701px) { .catrow:has(> [data-catmedal]:not([hidden])) { grid-template-columns: 1.2fr 1fr 1.1fr 0.8fr auto; } }
@media (max-width: 700px) {
	.catrow { grid-template-columns: minmax(0, 1fr) auto; }
	.catrow .x { grid-column: 2; grid-row: 1; }
	.catrow > label:nth-of-type(2), .catrow > label:nth-of-type(3), .catrow > label:nth-of-type(4) { grid-column: 1 / -1; }
	#catprices .two { grid-template-columns: 1fr; }
	.form .catprice { grid-template-columns: minmax(0, 1fr) 110px auto; }
}
.cats-foot { margin: 12px 0 0; }
/* Entry and payment: the price of each category */
.cardhead { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.cardhead h2 { margin: 0; }
.catprices { display: grid; gap: 8px; margin-top: 10px; }
.form .catprice { display: grid; grid-template-columns: minmax(0, 1fr) 130px auto; align-items: center; gap: 10px; }
.form .catprice span { font-weight: 600; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.catprice em { font-style: normal; color: var(--muted); font: 600 12px/1 "Geist Mono", monospace; }

.bybelt { font: 700 11px/1 "Geist Mono", monospace; letter-spacing: 0.06em; text-transform: uppercase; padding: 5px 8px; border-radius: 999px; background: var(--card-2); color: var(--muted); cursor: help; }

form.inl { display: inline-flex; margin: 0; }
.wrules { margin-bottom: 6px; }

.mk-custom { display: grid; grid-template-columns: 1fr 90px 1fr 90px; gap: 10px; }
.mk-custom input[type=color] { min-height: 42px; padding: 4px; }
@media (max-width: 700px) { .mk-custom { grid-template-columns: 1fr 70px; } }

.tvaddr { display: grid; grid-template-columns: 120px 1fr; gap: 14px; align-items: center; }
.tvaddr .qr { width: 120px; height: 120px; padding: 8px; background: #fff; border-radius: 12px; }
.tvaddr .qr svg { width: 100%; height: 100%; }

.cycpick { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.field.cyc { grid-column: 1 / -1; }

/* The divisions workspace: filters, a compact list, the chosen division */
.ws { display: grid; gap: 12px; }
.ws-filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; position: sticky; top: 0; z-index: 4; padding: 10px; border-radius: 16px; background: var(--card-solid, var(--card)); box-shadow: 0 8px 24px -16px rgba(0,0,0,.4); }
.ws-filters input[type=search] { flex: 1 1 220px; min-height: 40px; }
.ws-filters select { min-height: 40px; width: auto; }
.ws-filters .wsprob { white-space: nowrap; }
.ws-body { display: grid; grid-template-columns: minmax(260px, 340px) minmax(0, 1fr); gap: 16px; align-items: start; }
.ws-list { display: grid; gap: 4px; align-content: start; position: sticky; top: 76px; max-height: calc(100vh - 100px); overflow-y: auto; padding-right: 4px; }
.ws-count { margin: 0 0 4px; font-size: 12px; }
.ws-row { position: relative; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 8px; width: 100%; text-align: left; padding: 10px 12px; border-radius: 12px; border: 1px solid transparent; background: transparent; color: var(--ink); font: inherit; cursor: pointer; }
.ws-row:hover { background: var(--card-2); }
.ws-row.is-on { background: var(--card); border-color: var(--line-2); box-shadow: inset 3px 0 0 #5b8cff; }
.ws-row.is-over { background: color-mix(in srgb, #5b8cff 14%, transparent); border-color: #5b8cff; }
.ws-row .wr-l { display: grid; min-width: 0; }
.ws-row .wr-l b { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ws-row .wr-l small { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ws-row .wr-r { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; }
.ws-row .wr-r em { font: 700 14px var(--mono, monospace); font-style: normal; color: var(--ink); min-width: 22px; text-align: right; }
.ws-row .wr-warn { color: #e5a13a; }
.ws-row .wr-ghost { grid-column: 1 / -1; font-size: 12px; font-weight: 700; color: #5b8cff; }
.ws-row .wr-ghost:empty { display: none; }
.ws-detail > .div { position: relative; }
.seedhead { display: flex; justify-content: space-between; gap: 8px; align-items: center; font-size: 12px; }
.ppl.seeds { counter-reset: seed; list-style: none; padding-left: 0; }
.ppl.seeds li { counter-increment: seed; }
.ppl.seeds li::before { content: counter(seed); font: 700 12px var(--mono, monospace); color: var(--muted); width: 18px; text-align: right; flex: none; }
.ppl .pin { color: #5b8cff; font-size: 11px; }
.ws-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: end; border-top: 1px solid var(--line); padding-top: 10px; }
.mergepick { display: grid; gap: 4px; flex: 1 1 260px; }
.mergepick span { font-size: 12px; color: var(--muted); }
/* Merge into and Delete live in the division's Settings (rare, Delete is a danger action) */
.dset-struct { display: flex; flex-wrap: wrap; gap: 8px; align-items: end; margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--line); }
.dset-struct .danger { margin-left: auto; }
/* The small bracket: who meets who, who goes on */
.mini-bracket { overflow-x: auto; padding: 4px 0; }
.mb-tree { display: flex; gap: 22px; min-width: min-content; }
.mb-col { display: grid; grid-template-rows: auto 1fr; gap: 8px; min-width: 150px; }
.mb-col h5 { margin: 0; font: 700 11px var(--mono, monospace); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.mb-ms { display: flex; flex-direction: column; justify-content: space-around; gap: 10px; }
.mb-m { display: grid; border: 1px solid var(--line-2); border-radius: 10px; overflow: hidden; background: var(--card); font-size: 13px; }
.mb-m span { padding: 6px 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mb-m span + span { border-top: 1px solid var(--line); }
.mb-m .w { font-weight: 800; background: color-mix(in srgb, #1f9d72 14%, transparent); }
.mb-m .l { color: var(--muted); text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--muted) 50%, transparent); }
.mb-m.is-live { border-color: #1f9d72; box-shadow: 0 0 0 2px color-mix(in srgb, #1f9d72 30%, transparent); }
.mb-m .tbd { color: var(--muted); font-style: italic; }
.mb-rr { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; }
.mb-rrm small { display: block; font-size: 11px; color: var(--muted); margin-bottom: 3px; }
@media (max-width: 900px) { .ws-body { grid-template-columns: 1fr; } .ws-list { position: static; max-height: 40vh; } }

.divs.ws-detail { grid-template-columns: minmax(0, 1fr); }

/* Schedule: a column per mat, divisions as blocks sized by how long they take */
.inl-time { display: flex; align-items: center; gap: 8px; }
.inl-time span { font-size: 13px; color: var(--muted); }
.inl-time input { min-height: 40px; width: auto; }
.sched-cols { display: grid; grid-template-columns: repeat(var(--n), minmax(220px, 1fr)); gap: 14px; overflow-x: auto; }
.sc-col { display: grid; grid-template-rows: auto auto 1fr auto; gap: 8px; min-width: 0; padding: 12px; border-radius: 16px; background: var(--card-2); border-top: 6px solid var(--mc, #22d3ee); }
.sc-head { display: grid; gap: 2px; }
.sc-head b { font-size: 18px; }
.sc-head span { font: 700 13px var(--mono, monospace); color: var(--muted); }
.sc-head .sc-bar { height: 6px; border-radius: 3px; background: rgba(127,127,127,.18); overflow: hidden; margin-top: 4px; }
.sc-head .sc-bar i { display: block; height: 100%; background: var(--mc, #22d3ee); transition: width .35s; }
.sc-list { display: flex; flex-direction: column; gap: 6px; min-height: 80px; border-radius: 12px; transition: background .15s; }
.sc-list.is-over { background: color-mix(in srgb, #5b8cff 12%, transparent); }
/* The schedule as a calculation (27 Nov 2026): start on top, each block's start time and minutes, the sum at the bottom */
.sc-start, .sc-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 10px; font: 600 12px var(--mono, monospace); color: var(--muted); }
.sc-start b, .sc-foot b { color: var(--ink); }
.sc-start .sc-delay b { color: #b45309; }
.sc-foot { padding-top: 8px; border-top: 3px double var(--line); font-size: 13px; }
.sc-at { grid-column: 1; font: 600 12px var(--mono, monospace); color: var(--muted); white-space: nowrap; }
.sc-at b { color: var(--mc, inherit); font-size: 13px; }
.sc-at.is-live { color: #16a34a; }
.sc-div > b { grid-column: 1 / -1; }
.sc-div .sc-badge { grid-column: 1 / -1; justify-self: start; }
.sc-div { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; align-items: center; padding: 8px 10px; border-radius: 10px; background: var(--card); border: 1px solid var(--line); cursor: grab; min-height: calc(28px + var(--h, 0px)); }
.sc-div b { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sc-div small { grid-column: 1; font-size: 11px; color: var(--muted); }
.sc-div em { grid-column: 2; text-align: right; font: 700 12px var(--mono, monospace); font-style: normal; color: var(--muted); }
.sc-div.is-started { cursor: default; opacity: .7; border-style: dashed; }
.sc-div.is-dragging { opacity: .35; }
.sc-empty { margin: auto; font-size: 12px; color: var(--muted); }
/* Mats on the day: matches moved by hand */
.q li[data-dnd] { cursor: grab; }
.q li.is-pinned { box-shadow: inset 3px 0 0 #5b8cff; }
.q.is-over { background: color-mix(in srgb, #5b8cff 10%, transparent); border-radius: 12px; }

/* The drawn bracket: boxes placed by position, lines between them (SVG), drag a name onto another to swap */
.bt-scroll { overflow-x: auto; padding: 4px 2px 8px; }
.bt { position: relative; }
.bt h5 { position: absolute; top: 0; margin: 0; font: 700 11px var(--mono, monospace); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.bt svg { position: absolute; inset: 0; pointer-events: none; overflow: visible; }
.bt svg path { fill: none; stroke: var(--line-2); stroke-width: 2; stroke-linejoin: round; }
.bt svg path.is-done { stroke: color-mix(in srgb, #1f9d72 70%, transparent); }
.bt-m { position: absolute; display: grid; grid-template-rows: 1fr 1fr; border: 1px solid var(--line-2); border-radius: 12px; background: var(--card); overflow: hidden; box-shadow: 0 1px 0 rgba(0,0,0,.04), 0 6px 18px -12px rgba(0,0,0,.35); }
.bt-m.is-static { position: relative; }
.bt-m.is-live { border-color: #1f9d72; box-shadow: 0 0 0 3px color-mix(in srgb, #1f9d72 28%, transparent); }
.bt-p { display: flex; align-items: center; gap: 8px; padding: 0 10px; min-width: 0; font-size: 13px; cursor: pointer; transition: background .15s; }
.bt-p + .bt-p { border-top: 1px solid var(--line); }
.bt-p b { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bt-p small { margin-left: auto; color: var(--muted); font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 45%; }
.bt-p.tbd { color: var(--muted); font-style: italic; cursor: default; }
.bt-p.w { background: color-mix(in srgb, #1f9d72 14%, transparent); }
.bt-p.w b::after { content: " ✓"; color: #1f9d72; }
.bt-p.l { color: var(--muted); }
.bt-p.l b { text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--muted) 60%, transparent); }
.bt-p[data-dnd] { cursor: grab; }
.bt-p[data-dnd]:hover { background: color-mix(in srgb, var(--ink) 6%, transparent); }
.bt-p.is-drag { opacity: .4; }
.bt-p.is-over { background: color-mix(in srgb, #3b82f6 22%, transparent); box-shadow: inset 0 0 0 2px #3b82f6; }
.bt-belt { flex: none; width: 6px; height: 22px; border-radius: 3px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.18); }
.bt-extra { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 10px; }
.bt-extra h5 { margin: 0 0 6px; font: 700 11px var(--mono, monospace); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.bt-hint { font-size: 12px; margin: 8px 0 0; }

/* The athlete card */
dialog.ac { border: 0; padding: 0; border-radius: 20px; width: min(560px, calc(100vw - 24px)); max-height: calc(100vh - 40px); background: var(--bg); background-image: linear-gradient(var(--card), var(--card)); color: var(--ink); box-shadow: 0 30px 80px -20px rgba(0,0,0,.5); }
dialog.ac::backdrop { background: rgba(8,8,14,.55); backdrop-filter: blur(4px); }
.ac-in { padding: 22px; display: grid; gap: 18px; }
.ac-head { display: grid; grid-template-columns: 72px 1fr auto; gap: 14px; align-items: center; }
.ac-av { width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center; overflow: hidden; font-weight: 800; font-size: 22px; background: color-mix(in srgb, var(--ink) 8%, transparent); box-shadow: 0 0 0 4px var(--bc, #999); }
.ac-av img { width: 100%; height: 100%; object-fit: cover; }
.ac-head h3 { margin: 0; font-size: 22px; line-height: 1.15; }
.ac-head p { margin: 2px 0 8px; color: var(--muted); }
.ac-head .x { align-self: start; font-size: 22px; background: none; border: 0; color: var(--muted); cursor: pointer; }
.ac-score { display: grid; grid-template-columns: 96px 1fr; gap: 16px; align-items: center; padding: 14px; border-radius: 14px; background: color-mix(in srgb, var(--ink) 4%, transparent); }
.ac-score .sdial.big { width: 96px; height: 96px; }
.ac-score .sdial.big b { font-size: 22px; }
.ac-score small { display: block; color: var(--muted); }
.ac-parts { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 3px; font-size: 12px; }
.ac-parts li { display: grid; grid-template-columns: 10px 1fr auto; gap: 8px; align-items: center; }
.ac-parts i { width: 10px; height: 10px; border-radius: 50%; background: currentColor; }
.ac-parts span { color: var(--muted); }
.ac-note { margin: 0; padding: 12px 14px; border-radius: 12px; background: color-mix(in srgb, #f59e0b 12%, transparent); font-size: 13px; }
.ac-facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px 16px; margin: 0; }
.ac-facts dt { font: 700 10px var(--mono, monospace); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.ac-facts dd { margin: 2px 0 0; font-weight: 600; overflow-wrap: anywhere; }
.ac-in h4 { margin: 0 0 8px; font-size: 14px; }
.ac-div { padding: 10px 12px; border: 1px solid var(--line-2); border-radius: 12px; margin-bottom: 8px; }
.ac-div > b { display: block; margin-bottom: 4px; }
.ac-m { display: flex; justify-content: space-between; gap: 10px; margin: 2px 0; font-size: 13px; }
.ac-m .win { color: #1f9d72; font-weight: 700; }
.ac-stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.ac-stats span { display: grid; text-align: center; padding: 8px 4px; border-radius: 12px; background: color-mix(in srgb, var(--ink) 4%, transparent); font-size: 11px; color: var(--muted); }
.ac-stats b { font-size: 20px; color: var(--ink); }
.ac-stats .g b { color: #d4a017; } .ac-stats .s b { color: #9aa3ad; } .ac-stats .br b { color: #b0703a; }
.ac-medals { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 6px; font-size: 13px; }
.ac-medals li { display: grid; grid-template-columns: 12px 1fr auto; gap: 8px; align-items: center; }
.ac-medals small { color: var(--muted); }
.md { width: 12px; height: 12px; border-radius: 50%; }
.md1 { background: #d4a017; } .md2 { background: #b8c0c8; } .md3 { background: #b0703a; }
tr[data-e] td.ath, li[data-entry] { cursor: pointer; }

.sprow { grid-template-columns: 52px 1fr 1fr !important; align-items: center; }
.splogo { cursor: pointer; }
.splogo span { display: grid; place-items: center; width: 52px; height: 44px; border-radius: 10px; border: 1px dashed var(--line-2); background: #fff; color: #888; overflow: hidden; }
.splogo span img { max-width: 46px; max-height: 38px; object-fit: contain; }
.splogo span.is-busy { opacity: .4; }

/* Over the weight limit: a warning with the choices */
.overcard h2 i { color: #e0a100; }
.overrow { border: 1px solid color-mix(in srgb, #e0a100 55%, transparent); background: color-mix(in srgb, #e0a100 8%, transparent); border-radius: 14px; padding: 12px 14px; margin-top: 10px; display: grid; gap: 10px; }
.overrow.is-busy { opacity: .5; pointer-events: none; }
.overhead { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px; }
.overkg { font-weight: 800; color: #c2410c; }
.overhead small { color: var(--muted); }
.overopts { display: grid; gap: 6px; }
.overopt { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 10px; text-align: left; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--card); color: inherit; font: inherit; cursor: pointer; }
.overopt:hover { border-color: #1f9d72; }
.overopt span { display: grid; min-width: 0; }
.overopt small { color: var(--muted); font-size: 12px; }
.overopt em { font-style: normal; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: color-mix(in srgb, #1f9d72 18%, transparent); color: #1f9d72; }
.overopt i { font-style: normal; font-weight: 700; color: #1f9d72; white-space: nowrap; }
.overopt.is-best { border-color: color-mix(in srgb, #1f9d72 60%, transparent); }
.overbtns { display: flex; gap: 8px; flex-wrap: wrap; }
.btn.bad { color: #dc2626; }

.wg-opt, .overopt { grid-template-columns: 1fr auto !important; }
.wg-opt em, .overopt em { justify-self: start; margin-bottom: 4px; }

/* Athlete card: Score folded, categories with division and payment */
details.ac-score { padding: 0; background: none; display: block; }
details.ac-score summary { list-style: none; display: grid; grid-template-columns: 44px 1fr auto; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 14px; background: color-mix(in srgb, var(--ink) 4%, transparent); cursor: pointer; }
details.ac-score summary::-webkit-details-marker { display: none; }
details.ac-score summary .sdial { width: 44px; height: 44px; }
details.ac-score summary .sdial b { font-size: 12px; }
details.ac-score summary > span:nth-child(2) { display: grid; }
details.ac-score summary i { color: var(--muted); transition: transform .2s; }
details.ac-score[open] summary i { transform: rotate(180deg); }
details.ac-score .ac-parts { padding: 8px 14px 4px; }
.ac-divtop { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.ac-divtop .pay { margin-left: auto; }
.pay { font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: color-mix(in srgb, var(--ink) 6%, transparent); color: var(--muted); white-space: nowrap; }
.pay.is-paid { background: color-mix(in srgb, #1f9d72 16%, transparent); color: #1f9d72; }
.pay.is-due { background: color-mix(in srgb, #e0a100 18%, transparent); color: #a16207; }
.ac-divtop .x { background: none; border: 0; color: var(--muted); font-size: 18px; cursor: pointer; padding: 0 4px; }
.ac-divtop .x.is-armed { color: #dc2626; font-weight: 800; }
.ac-div select, select.ac-add { width: 100%; min-height: 38px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--card); color: inherit; font: inherit; padding: 0 10px; margin-bottom: 4px; }
select.ac-add { border-style: dashed; color: var(--muted); }

/* Athletes: one add form with suggestions, filters, sortable headers */
.addpanel { border: 1px solid var(--line-2); border-radius: 16px; padding: 12px; margin: 0 0 14px; display: grid; gap: 10px; }
.addpanel .drawer { margin: 0; }
.addone { display: grid; gap: 12px; }
.addwho { position: relative; }
.sugg { position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 30; display: grid; max-height: min(420px, 60vh); overflow: auto; background: #15151d; border: 1px solid var(--line-2); border-radius: 14px; box-shadow: 0 24px 48px rgba(0, 0, 0, 0.45); padding: 4px; }
.sugg[hidden] { display: none; }
.sg { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border: 0; border-radius: 10px; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; min-height: 52px; }
.sg:hover, .sg.is-hi { background: var(--card-2); }
.sg.is-in { opacity: 0.75; }
.sg img, .sg-ini { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; flex: none; background: var(--card-2); display: grid; place-items: center; font: 700 12px var(--font); font-style: normal; color: var(--muted); }
.sg-who { flex: 1; min-width: 0; display: grid; gap: 2px; }
.sg-who b { display: flex; align-items: center; gap: 8px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sg-who small { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sg-tags { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex: none; }
.sg-none { margin: 0; padding: 10px 12px; color: var(--muted); font-size: 13px; }
.srcchip { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 999px; font: 600 11px var(--font); letter-spacing: 0.02em; white-space: nowrap; background: color-mix(in srgb, var(--ink) 8%, transparent); color: var(--ink-2); }
.srcchip.is-earlier { background: color-mix(in srgb, var(--amber) 18%, transparent); color: var(--amber); }
.srcchip.is-profile { background: color-mix(in srgb, var(--cyan) 16%, transparent); color: var(--cyan); }
.srcchip.is-roster { background: color-mix(in srgb, var(--violet) 20%, transparent); color: #a99cff; }
.srcchip.is-in { background: color-mix(in srgb, #dc2626 16%, transparent); color: #f87171; }
.picked { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; padding: 10px 12px; border-radius: 12px; background: color-mix(in srgb, var(--cyan) 7%, transparent); border: 1px solid color-mix(in srgb, var(--cyan) 25%, transparent); font-size: 13px; }
.picked[hidden], .adddup[hidden] { display: none; }
.picked > span:not(.srcchip) { flex: 1 1 160px; color: var(--ink-2); }
.adddup { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 10px 12px; border-radius: 12px; background: color-mix(in srgb, var(--amber) 10%, transparent); border: 1px solid color-mix(in srgb, var(--amber) 35%, transparent); font-size: 14px; }
.adddup > span:first-child { flex: 1 1 180px; font-weight: 600; }
.adddup-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.addone input[readonly] { opacity: 0.8; }
.addnote { margin: -4px 0 0; font-size: 13px; }
.addnote[hidden], .addone [data-addf][hidden] { display: none; }
.addfoot { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; }
:root[data-theme="light"] .sugg { background: var(--pop); color: var(--ink); }
:root[data-theme="light"] .srcchip.is-roster { color: var(--violet); }
:root[data-theme="light"] .srcchip.is-earlier { color: #a16207; }
:root[data-theme="light"] .srcchip.is-profile { color: #0e7490; }
@media (max-width: 480px) { .addpanel { padding: 10px; } .sg-tags .srcchip { font-size: 10px; padding: 2px 6px; } .addfoot .btn { flex: 1 1 100%; } }
.afilters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0 0 12px; }
.afilters input[type=search] { flex: 1 1 220px; min-height: 38px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--card); color: inherit; font: inherit; padding: 0 12px; }
.afilters select { min-height: 38px; max-width: 200px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--card); color: inherit; font: inherit; padding: 0 8px; }
.afilters select:not([value=""]):valid { }
.afilters .acount { margin-left: auto; font: 600 13px var(--mono, monospace); }
th[data-sort] { cursor: pointer; user-select: none; white-space: nowrap; }
th[data-sort]:hover { color: var(--ink); }
th[data-sort]::after { content: " ↕"; opacity: .25; font-size: 11px; }
th[data-sort].is-sorted::after { content: " ↑"; opacity: 1; }
th[data-sort].is-sorted.is-desc::after { content: " ↓"; }
@media (max-width: 640px) { .afilters select { flex: 1 1 45%; max-width: none; } }

.cardlink { cursor: pointer; }
.cardlink:hover { text-decoration: underline; text-underline-offset: 3px; }

.afmore { display: contents; }
.afmore[hidden] { display: none; }

/* Divisions: the actions up by the title, the placement rule as one quiet line */
.hero.sm.has-acts { display: grid; grid-template-columns: 1fr auto; column-gap: 20px; align-items: start; }
.hero.sm.has-acts > :not(.hero-acts) { grid-column: 1; }
.hero-acts { grid-column: 2; grid-row: 1 / span 3; display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; align-self: center; max-width: 620px; }
@media (max-width: 860px) { .hero.sm.has-acts { grid-template-columns: 1fr; } .hero-acts { grid-column: 1; grid-row: auto; justify-content: flex-start; margin-top: 12px; } }
.placeline { margin: -6px 0 16px; }
.placeline > p { margin: 0; font-size: 13px; }
dialog.nd { border: 0; border-radius: 20px; padding: 0; width: min(520px, calc(100vw - 24px)); background: var(--bg); background-image: linear-gradient(var(--card), var(--card)); color: var(--ink); box-shadow: 0 30px 80px -20px rgba(0,0,0,.5); }
dialog.nd::backdrop { background: rgba(8,8,14,.55); }
dialog.nd form { padding: 20px; display: grid; gap: 12px; }
dialog.nd header { display: flex; justify-content: space-between; align-items: center; }
dialog.nd h3 { margin: 0; }
dialog.nd .x { background: none; border: 0; font-size: 22px; color: var(--muted); cursor: pointer; }

/* Toasts: an icon, the message, and a bar that runs out, so a save is never in doubt */
@keyframes tbar { to { transform: scaleX(0); } }
@keyframes tiPop { from { transform: scale(.3); } to { transform: scale(1); } }
/* Drag shows a hand; names open the card */
.ws-row[data-dnd], .ppl li[data-dnd], .bt-p[data-dnd], .sc-div[data-dnd], li[data-mmatch][data-dnd] { cursor: grab; }
.ws-row:active, .ppl li[data-dnd]:active, .bt-p[data-dnd]:active, .sc-div[data-dnd]:active { cursor: grabbing; }
.ppl li .pname, .bt-p b.cardlink { cursor: pointer; }
.ppl li .pname:hover, .bt-p b.cardlink:hover { text-decoration: underline; text-underline-offset: 3px; }
.wr-grip { color: var(--muted); opacity: .45; margin-right: 8px; }
.ws-row:hover .wr-grip { opacity: .9; }
.ws-row.is-dragging { opacity: .45; }
.ws-row.is-empty .wr-l b::after { content: " · empty"; font-weight: 500; color: var(--muted); }
.sc-badge { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: color-mix(in srgb, var(--ink) 10%, transparent); color: var(--ink); margin-bottom: 3px; }
.sc-div.is-started { opacity: .8; }

.sacts { display: inline-flex; gap: 12px; flex-wrap: wrap; }
.link.bad { color: #dc2626; }
.sedit { display: flex; gap: 8px; flex-wrap: wrap; width: 100%; margin-top: 8px; }
.sedit input, .sedit select { min-height: 36px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--card); color: inherit; font: inherit; padding: 0 10px; }
.sedit input { flex: 1 1 160px; }
/* The grip is its own narrow column, so the row keeps its two-part layout */
.ws-row { grid-template-columns: auto minmax(0, 1fr) auto; }
.ws-row .wr-grip { margin-right: 0; font-size: 12px; }
.ws-row .wr-ghost { grid-column: 2 / -1; }
.ac-head p.ac-belt { display: flex; align-items: center; gap: 10px; }
.ac-head p.ac-belt .belt { flex: none; }
/* Division rows as light cards with space between, and room between the grip and the text */
.ws-list .ws-row { column-gap: 14px; padding: 12px 14px 12px 10px; margin-bottom: 6px; background: var(--card); border: 1px solid var(--line); box-shadow: 0 1px 2px rgba(0,0,0,.04); }
.ws-list .ws-row:hover { border-color: var(--line-2); background: var(--card); }
.ws-list .ws-row.is-on { border-color: #5b8cff; box-shadow: inset 3px 0 0 #5b8cff, 0 4px 14px -8px rgba(91,140,255,.6); }
.ws-list .ws-row .wr-grip { padding: 6px 2px; }
.ppl li.is-moving { opacity: .35; }
/* Room between the division's actions and its settings below */
.ws-actions { align-items: flex-end; padding-bottom: 16px; margin-bottom: 4px; }
.ws-actions + details.dset { margin-top: 0; padding-top: 12px; }
.rail-head { margin: 14px 12px 4px; font: 700 10px var(--mono, monospace); letter-spacing: .14em; text-transform: uppercase; color: rgba(255,255,255,.45); }
.markers-card { margin-bottom: 18px; }
.markers-card .fs-top { border: 0; padding: 0; margin: 0 0 12px; }
.markers-card legend { font-size: 18px; font-weight: 800; padding: 0; margin-bottom: 4px; }

/* Cover photo: a modern drop zone with the photo as its background */
.dropzone { position: relative; display: grid; place-items: center; min-height: 220px; margin-top: 12px; border-radius: 18px; border: 2px dashed var(--line-2); background: color-mix(in srgb, var(--ink) 3%, transparent); overflow: hidden; cursor: pointer; transition: border-color .15s, background .15s; }
.dropzone:hover, .dropzone.is-over { border-color: #5b8cff; background: color-mix(in srgb, #5b8cff 8%, transparent); }
.dropzone .dz-img { position: absolute; inset: 0; background-size: cover; background-position: center; }
.dropzone.has-img { min-height: 280px; border-style: solid; }
.dropzone.has-img .dz-img::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 40%, rgba(0,0,0,.6)); }
.dropzone .dz-txt { position: relative; display: grid; justify-items: center; gap: 6px; text-align: center; padding: 20px; }
.dropzone .dz-txt i { font-size: 30px; color: #5b8cff; }
.dropzone .dz-txt small { color: var(--muted); }
.dropzone.has-img .dz-txt { align-self: end; color: #fff; }
.dropzone.has-img .dz-txt i { display: none; }
.dropzone.has-img .dz-txt small { color: rgba(255,255,255,.75); }
.dropzone .dz-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; }
.dropzone .dz-bar i { display: block; height: 100%; width: 0; background: #5b8cff; transition: width .2s; }
.dropzone.is-busy { opacity: .85; pointer-events: none; }

/* Personal data on the athlete card (functions_brackets_privacy.php): download, anonymize after the tournament */
.ac-priv { margin-top: 6px; border-top: 1px solid var(--line); padding-top: 10px; }
.ac-priv summary { cursor: pointer; color: var(--muted); font-size: 13px; list-style: none; }
.ac-priv summary::-webkit-details-marker { display: none; }
.ac-priv[open] summary { color: var(--ink); font-weight: 700; }
.ac-priv > div { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 8px; }
p.ac-priv { margin-bottom: 0; }
.ac-danger { margin-top: 6px; border-top: 1px solid var(--line); padding-top: 10px; }
.ac-danger summary { cursor: pointer; color: var(--muted); font-size: 13px; list-style: none; }
.ac-danger summary::-webkit-details-marker { display: none; }
.ac-danger[open] summary { color: #dc2626; font-weight: 700; }
.ac-danger > div { margin-top: 8px; padding: 12px; border-radius: 12px; background: color-mix(in srgb, #dc2626 8%, transparent); border: 1px solid color-mix(in srgb, #dc2626 35%, transparent); }
.ac-danger p { margin: 0 0 10px; font-size: 14px; }
.more-card { font-size: 20px; color: var(--muted); padding: 4px 10px; }
a.ac-add.ac-addlink { display: block; padding: 10px 12px; border-radius: 10px; border: 1px dashed var(--line-2); color: var(--muted); text-decoration: none; font-size: 14px; }
a.ac-add.ac-addlink:hover { color: var(--ink); border-color: #5b8cff; }

/* Several athletes at once */
th.selcol, td.selcol { width: 36px; padding-right: 0 !important; }
td.selcol input, th.selcol input { width: 18px; height: 18px; cursor: pointer; accent-color: #5b8cff; }
tr.is-picked td { background: color-mix(in srgb, #5b8cff 8%, transparent); }
.bulkbar { position: sticky; top: 8px; z-index: 6; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 12px; padding: 10px 12px; border-radius: 14px; background: var(--card); border: 1px solid #5b8cff; box-shadow: 0 10px 30px -16px rgba(0,0,0,.4); }
.bulkbar b { font-size: 14px; margin-right: 4px; }
.bulkbar select { min-height: 38px; max-width: 280px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--card); color: inherit; font: inherit; padding: 0 8px; }
.bulkbar select[hidden] { display: none; }

td.ath { display: table-cell; white-space: nowrap; }
td.ath > .av { display: inline-grid; vertical-align: middle; margin-right: 12px; }
td.ath > span:last-child { display: inline-grid; vertical-align: middle; white-space: normal; }

/* Cover: same frame shape as the website banner; drag to place, zoom below */
.dropzone { aspect-ratio: 16 / 7; min-height: 0 !important; }
.dropzone .dz-input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.dropzone.has-img { cursor: grab; }
.dropzone.has-img.is-dragging { cursor: grabbing; }
.dropzone .dz-img { background-repeat: no-repeat; background-size: cover; }
.dropzone.has-img .dz-txt { display: none; }
.dropzone .dz-hint { position: absolute; left: 12px; bottom: 12px; font-size: 12px; font-weight: 700; color: #fff; background: rgba(0,0,0,.45); padding: 4px 10px; border-radius: 999px; pointer-events: none; display: none; }
.dropzone.has-img .dz-hint { display: block; }
.dropzone.has-img .dz-img::after { display: none; }
.dz-tools { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 10px; flex-wrap: wrap; }
.dz-tools label { display: flex; align-items: center; gap: 10px; color: var(--muted); flex: 1 1 260px; }
.dz-tools input[type=range] { flex: 1; accent-color: #5b8cff; }
.dropzone { overflow: hidden; }

/* Seed list: people who are not in the bracket (no-show, withdrawn, DQ) */
.seeds li.is-out .pname { color: var(--muted); text-decoration: line-through; }
.seeds li .out-st { font-style: normal; font-size: 11px; font-weight: 700; color: #b45309; background: color-mix(in srgb, #f59e0b 16%, transparent); padding: 2px 8px; border-radius: 999px; margin-left: 8px; white-space: nowrap; }

/* Schedule: the same athlete on two mats at once */
.sc-warn { display: flex; gap: 10px; align-items: center; margin: 0 0 12px; padding: 10px 14px; border-radius: 12px; font-size: 14px; font-weight: 600; color: #92400e; background: color-mix(in srgb, #f59e0b 14%, transparent); border: 1px solid color-mix(in srgb, #f59e0b 45%, transparent); }
.sc-warn[hidden] { display: none; }
.sc-div .sc-clash { grid-column: 1 / -1; display: block; margin-top: 6px; font-size: 12px; font-weight: 600; line-height: 1.35; color: #b45309; }

/* Not in a division: pick several */
.pool-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin: 4px 0 10px; }
.pool-bar .chk { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; cursor: pointer; }
.pool-acts { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.pool-acts[hidden] { display: none; }
.pool-acts select { min-height: 34px; max-width: 320px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--card); color: inherit; font: inherit; font-size: 14px; padding: 0 8px; }
.pool-bar input[type=checkbox], .ppl .poolsel { width: 17px; height: 17px; accent-color: #5b8cff; cursor: pointer; flex: none; margin: 0 4px 0 0; }
.ppl li.is-picked { background: color-mix(in srgb, #5b8cff 9%, transparent); border-radius: 8px; }
.ctl .ctl-wide { grid-column: 1 / -1; }
.pool-acts { flex: 1 1 auto; }
.pool-bar .chk span { font-weight: 600; }

/* How athletes pay */
.paymode { border: 0; padding: 0; margin: 4px 0 6px; display: grid; gap: 8px; }
.paymode legend { font-weight: 700; font-size: 14px; margin-bottom: 6px; }
.paymode .chk { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; border: 1px solid var(--line-2); border-radius: 12px; cursor: pointer; }
.paymode .chk:has(input:checked) { border-color: #5b8cff; background: color-mix(in srgb, #5b8cff 7%, transparent); }
.paymode .chk input { margin-top: 3px; accent-color: #5b8cff; }
.paymode .chk span { display: grid; gap: 2px; }
.paymode .chk small { font-size: 13px; }
[data-payhow][hidden], [data-paybox][hidden] { display: none; }
.pay-due { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
button.pay { border: 0; font: inherit; cursor: pointer; }
button.pay:disabled { cursor: default; }

/* ---- UX review fixes (24 Nov 2026) ---- */
/* Fields in two and three columns never push out of their column (a date and time field on a phone) */
.two > *, .three > * { min-width: 0; }
input, select, textarea { min-width: 0; max-width: 100%; }
@media (max-width: 480px) { .two[data-weigh-show="window"] { grid-template-columns: 1fr; } }
/* The save bar sits on its own strip, so it never covers a field */
.savebar { margin: 14px -6px 0; padding: 12px 14px; border-radius: 16px; background: color-mix(in srgb, var(--bg) 84%, transparent); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border: 1px solid var(--line); box-shadow: 0 -6px 18px rgba(0, 0, 0, 0.08); }
/* Divisions: the hero buttons wrap as a group, smaller on narrower screens */
.hero-acts { max-width: none; flex-wrap: nowrap; }
@media (max-width: 1180px) { .hero.sm.has-acts { grid-template-columns: 1fr; } .hero-acts { grid-column: 1; grid-row: auto; justify-content: flex-start; flex-wrap: wrap; margin-top: 12px; } }
@media (max-width: 1440px) { .hero-acts .btn { min-height: 38px; padding: 0 14px; font-size: 14px; } }
/* Athletes: an athlete out of the tournament is muted in the table */
tr.is-out td.dv { opacity: 0.5; text-decoration: line-through; }
tr.is-out td.ath b { opacity: 0.6; }
/* Categories: the suggested rows are not saved data yet */
.catrow.is-suggest input, .catrow.is-suggest select { border-style: dashed; opacity: 0.7; }
small.warn { display: block; margin-top: 4px; color: var(--amber); font-size: 12px; }
/* Mat control: "vs" between the two names, the inline confirm */
.q i.vs { font-style: normal; font-weight: 500; color: var(--muted); font-size: 0.85em; }
.q .acts .is-confirm { white-space: nowrap; }
.note.warnnote { color: var(--amber); }
.wlinkline { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 4px 0; }
.checks .testchk { margin-top: 4px; }
/* Schedule on a phone: the mats one under the other, each as tall as its divisions */
@media (max-width: 720px) {
  .sched-cols { grid-template-columns: 1fr; overflow-x: visible; }
  .sc-col { grid-template-rows: auto auto auto auto; align-self: start; }
}
/* Athletes table on a phone: name, status, division and the menu fit; belt, Score, age and weight hide */
@media (max-width: 700px) {
  table[data-atable] th:nth-child(3), table[data-atable] td:nth-child(3),
  table[data-atable] th:nth-child(4), table[data-atable] td:nth-child(4),
  table[data-atable] th:nth-child(5), table[data-atable] td:nth-child(5),
  table[data-atable] th:nth-child(6), table[data-atable] td:nth-child(6) { display: none; }
  table[data-atable] td.dv { min-width: 0; font-size: 12px; }
  table[data-atable] td.ath b { white-space: normal; }
  table[data-atable] td.ath small, table[data-atable] td.ath > .av { display: none; }
  table[data-atable] td.ath { white-space: normal; min-width: 76px; }
  table[data-atable] td select { max-width: 100px; font-size: 13px; padding: 4px 6px; }
  table[data-atable] td.dv { min-width: 0; }
  table[data-atable] th { letter-spacing: 0.02em; font-size: 10px; }
  table[data-atable] td:first-child, table[data-atable] th:first-child { padding-left: 8px; padding-right: 2px; }
  table[data-atable] td.ath b { font-size: 13px; }
  table[data-atable] td.dv { font-size: 11px; }
  table[data-atable] td:last-child, table[data-atable] th:last-child { padding-left: 2px; padding-right: 8px; width: 30px; }
  table[data-atable] .more-card { padding: 4px 6px; min-width: 0; min-height: 0; }
  table[data-atable] td, table[data-atable] th { padding-left: 6px; padding-right: 6px; }
}
.q .pill.called { background: rgba(245, 178, 60, 0.16); color: #b45309; font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; display: inline-flex; gap: 6px; align-items: center; }

/* Reminder mails on the Overview (functions_brackets_notify.php) */
.remind { margin-top: 16px; }
.remind.is-off { opacity: 0.85; }
.remind .sentlist { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 6px; font-size: 14px; }
.remind .sentlist i { color: var(--green); margin-right: 6px; }
.remind .btns { margin-top: 12px; }

/* Call to the podium (Divisions, Mat control) */
.podbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 10px 0; padding: 10px 12px; border-radius: 12px; border: 1px solid rgba(229, 181, 60, 0.35); background: rgba(229, 181, 60, 0.08); font-size: 14px; }
.podbar > i { color: #e5b53c; }
.podbar > span { flex: 1; min-width: 0; }
.podbar.is-called { border-color: rgba(34, 197, 94, 0.4); background: rgba(34, 197, 94, 0.08); }
.podrow { margin-top: 8px; }
.podrow small { color: var(--muted); }

/* The computed schedule's preview on the Website page */
.sched-preview { margin: 8px 0 16px; padding: 4px 14px; border: 1px dashed var(--line-2); border-radius: 12px; }
.sched-preview .ev-sched { list-style: none; margin: 0; padding: 0; display: grid; }
.sched-preview .ev-sched li { display: grid; grid-template-columns: 96px 1fr; gap: 12px; padding: 9px 0; border-top: 1px solid var(--line); font-size: 14px; }
.sched-preview .ev-sched li:first-child { border-top: 0; }
.sched-preview .ev-sched time { font-weight: 700; font-variant-numeric: tabular-nums; }
.sched-preview .sm-mat b { margin-right: 2px; }
h3.sub { margin: 18px 0 4px; font-size: 15px; }
.sched-preview .sm-mat { display: block; }

/* Mat control: the message to all athletes */
.annbox { margin-bottom: 16px; }
/* The same athlete up next on two mats (Matches, 27 Nov 2026) */
.clashbox { margin-bottom: 16px; border: 1px solid rgba(245, 178, 60, 0.55); background: rgba(245, 178, 60, 0.08); }
.clashbox h3 { margin: 0 0 8px; color: var(--amber); }
.clashbox ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.clashbox li { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; justify-content: space-between; }
.clashbox li .btns { display: flex; flex-wrap: wrap; gap: 6px; }
.mat .clash { margin: 6px 0 0; display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; }
.mat .clash .pill { text-transform: none; letter-spacing: 0; font-family: inherit; font-weight: 600; font-size: 12px; line-height: 1.3; white-space: normal; }
.annbox h3 { margin: 0 0 10px; }
.annbox .annnow { margin: 0 0 10px; padding: 10px 12px; border-radius: 12px; background: rgba(124, 92, 255, 0.12); }
.annbox form input[name=msg] { flex: 1 1 320px; }

/* After the tournament: the results mail and the feedback (Overview) */
.aftercard { margin-top: 16px; }
.aftercard .btns { margin-top: 12px; }
.fbsum { display: flex; align-items: baseline; gap: 10px; margin-top: 16px; }
.fbavg { font-size: 34px; line-height: 1; }
.fbstars { color: #e5b53c; letter-spacing: 2px; }
.fblist { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 10px; }
.fblist li { padding: 10px 12px; border-radius: 12px; background: var(--card-2); }
.fblist p { margin: 4px 0 0; white-space: pre-wrap; }

/* Payment boxes on Entry and payment (as in Beltchecker Events) */
.pw-intro { margin: 18px 0 10px; }
.stripecard { display: grid; grid-template-columns: 56px 1fr; gap: 18px; align-items: start; padding: 22px; margin-bottom: 14px; }
.sc-ico { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; font-size: 28px; background: #635bff; color: #fff; }
.stripecard h2, .pw-own h2 { margin: 0 0 6px; display: flex; align-items: center; gap: 10px; }
.stripecard .chk { margin: 6px 0; }
.stripecard .pw-state { margin: 10px 0; display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.stripecard .btn.sc-off { color: #e5533f; }
.pw-marks { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 8px 0; color: var(--ink-2, var(--muted)); }
.pw-marks i { font-size: 26px; line-height: 1; }
.pw-marks span { font-size: 12px; font-weight: 600; padding: 3px 8px; border-radius: 999px; border: 1px solid var(--line); }
.btn.dark { background: #111; color: #fff; border-color: #111; }
.pw-own .pill.open, .stripecard .pill.open { font-size: 11px; }
@media (max-width: 560px) { .stripecard { grid-template-columns: 1fr; } }

/* Event details: the tournament's square logo (app icon, screens, mails) */
.logo-edit { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; margin-top: 12px; }
.logo-drop { position: relative; width: 132px; height: 132px; flex: none; border-radius: 28px; border: 2px dashed var(--line-2); background: color-mix(in srgb, var(--ink) 3%, transparent); display: grid; place-items: center; overflow: hidden; cursor: pointer; transition: border-color .15s, background .15s; }
.logo-drop:hover, .logo-drop.is-over { border-color: #5b8cff; background: color-mix(in srgb, #5b8cff 8%, transparent); }
.logo-drop.has-img { border-style: solid; background: #fff; }
.logo-drop .logo-img { width: 100%; height: 100%; display: grid; place-items: center; }
.logo-drop .logo-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.logo-drop .logo-img i { font-size: 30px; color: #5b8cff; }
.logo-drop.is-busy { opacity: .6; pointer-events: none; }
.logo-side { flex: 1 1 220px; display: grid; gap: 6px; }
.logo-side p { margin: 0; }
.logo-drop .dz-input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }

/* Check-in with the athlete's ticket (Weigh-in page) */
.checkin .ci-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.checkin .ci-head h2 { margin: 0; }
.ci-result { margin-top: 14px; }
.ci-card { display: grid; gap: 12px; padding: 16px; border-radius: 18px; border: 2px solid var(--line-2); background: color-mix(in srgb, var(--ink) 3%, transparent); }
.ci-card.is-in { border-color: #1f9d72; }
.ci-card.is-new { animation: ciflash .9s ease-out; }
@keyframes ciflash { from { box-shadow: 0 0 0 6px rgba(31, 157, 114, .35); } to { box-shadow: 0 0 0 0 rgba(31, 157, 114, 0); } }
.ci-who { display: grid; gap: 3px; }
.ci-who b { font-size: 22px; letter-spacing: -0.02em; display: flex; align-items: center; gap: 8px; }
.ci-who small { color: var(--muted); }
.ci-who .ci-line { color: var(--ink); font-size: 15px; }
.ci-state { display: flex; gap: 8px; flex-wrap: wrap; }
.ci-state .pill, .wres .pill { display: inline-flex; align-items: center; padding: 4px 10px; border-radius: 999px; font-size: 13px; font-weight: 700; background: color-mix(in srgb, var(--ink) 8%, transparent); }
.ci-acts { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.ci-acts .btn.big { min-height: 52px; padding: 0 28px; font-size: 17px; }
.ci-weigh { display: inline-flex; gap: 8px; align-items: center; }
.ci-weigh input { width: 110px; min-height: 44px; font-size: 18px; }
.bc-bar-scan .bc-set-btn { font: 700 15px var(--font, system-ui); border: 0; border-radius: 999px; padding: 10px 20px; background: rgba(255,255,255,.14); color: #fff; cursor: pointer; }
.atable .cimark, td.ci .cimark { color: #1f9d72; font-weight: 700; white-space: nowrap; font-size: 13px; }
a.stat { color: inherit; text-decoration: none; }

/* Overview: the cover photo as a wide header (the website's crop and zoom), the name and dates on it; same look as the Events overview */
.hero.has-pic { position: relative; overflow: hidden; isolation: isolate; border-radius: 22px; padding: 120px 28px 24px; min-height: 250px; display: flex; flex-direction: column; justify-content: flex-end; color: #fff; background: #0b0b12; }
.hero.has-pic .hero-bg { position: absolute; inset: 0; z-index: -2; background-size: cover; background-repeat: no-repeat; }
.hero.has-pic::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(0, 0, 0, 0.05) 0%, rgba(0, 0, 0, 0.25) 45%, rgba(0, 0, 0, 0.78) 100%); }
.hero.has-pic h1, .hero.has-pic .lead { color: #fff; text-shadow: 0 1px 12px rgba(0, 0, 0, 0.35); }
.hero.has-pic .lead { opacity: 0.92; }
.hero.has-pic .eyebrow .pill { background: rgba(255, 255, 255, 0.9); color: #111; }
.hero.has-pic .hero-logo { position: absolute; top: 18px; left: 18px; width: 52px; height: 52px; border-radius: 14px; object-fit: cover; background: #fff; box-shadow: 0 2px 14px rgba(0, 0, 0, 0.3); }
.hero.has-pic .hero-photo { position: absolute; top: 16px; right: 16px; display: inline-flex; align-items: center; gap: 7px; padding: 7px 12px; border-radius: 999px; font-size: 13px; font-weight: 600; color: #fff; text-decoration: none; background: rgba(0, 0, 0, 0.42); backdrop-filter: blur(6px); }
.hero.has-pic .hero-photo:hover { background: rgba(0, 0, 0, 0.62); }
@media (max-width: 700px) { .hero.has-pic { padding: 90px 18px 18px; min-height: 190px; border-radius: 18px; } .hero.has-pic .hero-logo { top: 14px; left: 14px; width: 42px; height: 42px; border-radius: 12px; } .hero.has-pic .hero-photo { top: 14px; right: 14px; } }
#cover { scroll-margin-top: 80px; }
/* Reasons: deciding or reopening a match asks why, inline (kept in the match log) */
.q .acts { flex-wrap: wrap; }
.whybox { display: flex; gap: 6px; align-items: center; flex: 1 1 220px; min-width: 0; }
.whybox input { flex: 1; min-width: 0; min-height: 34px; padding: 4px 10px; font-size: 13px; }
.whybox .btn { white-space: nowrap; }
.recent li { flex-wrap: wrap; }
.recent .racts { display: flex; gap: 10px; align-items: center; }
.recent .whybox { flex-basis: 100%; }
/* The log: one match inline, or the Activity list on the Staff page */
.alog { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 4px; font-size: 13px; }
.alog.is-inline { flex-basis: 100%; margin-top: 6px; max-height: 280px; overflow: auto; padding: 8px; border-radius: 10px; background: var(--card); border: 1px solid var(--line); }
.alog li { display: grid; grid-template-columns: 44px 1fr auto; gap: 10px; align-items: start; padding: 6px 8px; border-radius: 8px; }
.alog li.muted { display: block; }
.alog li.is-key { background: var(--card-2); }
.alog time { font: 600 12px var(--mono); color: var(--muted); padding-top: 1px; }
.alog b { font-weight: 600; }
.alog small { display: block; color: var(--muted); font-size: 12px; }
.alog q { display: block; margin-top: 2px; color: var(--amber); font-style: normal; }
.alog q::before, .alog q::after { content: ""; }
.alog .who { text-align: right; font-weight: 600; }
.audit .alog { max-height: 520px; overflow: auto; }
.mat .live .link { justify-self: start; }
@media (max-width: 640px) { .alog li { grid-template-columns: 40px 1fr; } .alog .who { grid-column: 2; text-align: left; } }
.mat .live .alog b { display: inline; font-size: 13px; }

/* Athletes: the header row stays on top while the list scrolls (owner, 26 Nov 2026). On a wide screen the page
   scrolls (the wrapper does not clip, so sticky works against the page, under the bulk bar when it shows); on a
   phone or tablet the table scrolls inside its card in both directions and the header sticks to the card's top. */
table[data-atable] thead th { position: sticky; top: 0; z-index: 4; background: linear-gradient(var(--card), var(--card)), var(--bg); box-shadow: inset 0 -1px 0 var(--line-2); }
body:has([data-bulkbar]:not([hidden])) table[data-atable] thead th { top: var(--bk-bulk-h, 74px); }
@media (min-width: 901px) {
  .table:has(> table[data-atable]) { overflow: visible; }
}
@media (max-width: 900px) {
  .table:has(> table[data-atable]) { overflow: auto; max-height: calc(100vh - 150px); max-height: calc(100dvh - 150px); overscroll-behavior: contain; }
  body:has([data-bulkbar]:not([hidden])) table[data-atable] thead th { top: 0; }
}

/* Guests on Beltchecker profiles (functions_brackets_profile.php): the mark in the athletes list, the belt history on the card */
.av.pfmark { position: relative; overflow: visible; }
.av.pfmark img { border-radius: 50%; }
.av.pfmark::after { content: "✓"; position: absolute; right: -3px; bottom: -3px; width: 16px; height: 16px; border-radius: 50%; display: grid; place-items: center; font: 800 10px/1 var(--font, system-ui); color: #fff; background: var(--cyan); box-shadow: 0 0 0 2px var(--card, #fff); }
.ac-belts h4 { display: flex; align-items: center; gap: 8px; }
.ac-bh { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 13px; }
.ac-bh li { display: grid; grid-template-columns: 56px 1fr auto; gap: 10px; align-items: center; }
.ac-bh small { color: var(--muted); }
.ac-head .pill { margin-left: 4px; }

/* Overview: one small door to the tournament app */
.appmini { display: flex; align-items: center; gap: 18px; text-decoration: none; color: inherit; }
.appmini-qr { flex: none; width: 76px; height: 76px; padding: 6px; border-radius: 12px; background: #fff; }
.appmini-qr svg { display: block; width: 100%; height: 100%; }
.appmini-t { display: grid; gap: 4px; flex: 1; min-width: 0; }
.appmini-t b { font-size: 17px; }
.appmini-t small { color: var(--muted); font-size: 14px; }
@media (max-width: 560px) { .appmini { flex-wrap: wrap; } .appmini .btn { width: 100%; justify-content: center; } }
.appsteps-list { margin: 8px 0 0; padding-left: 20px; display: grid; gap: 12px; }
.appsteps-list li span { display: block; color: var(--muted); font-size: 14px; }
.card.share { display: block; }
.card.share .btns { display: flex; flex-wrap: wrap; gap: 10px; }

/* Where a dragged athlete can go (26 Nov 2026): green fits, the best 1 to 3 tagged, dim does not fit, red refuses */
.is-fitting [data-fit] { transition: background 0.15s, border-color 0.15s, opacity 0.15s, box-shadow 0.15s; }
.is-fitting .ws-row[data-fit="good"], .is-fitting .div[data-fit="good"] { background: color-mix(in srgb, var(--green) 9%, transparent); border-color: color-mix(in srgb, var(--green) 45%, transparent); }
.is-fitting .ws-row[data-fit="best"], .is-fitting .div[data-fit="best"] { background: color-mix(in srgb, var(--green) 16%, transparent); border-color: var(--green); box-shadow: inset 3px 0 0 var(--green); }
.is-fitting .ws-row[data-fit="dim"], .is-fitting .div[data-fit="dim"] { opacity: 0.45; }
.is-fitting .ws-row[data-fit="dim"].is-over { opacity: 1; }
.is-fitting .ws-row[data-fit="lock"], .is-fitting .div[data-fit="lock"] { background: color-mix(in srgb, var(--red) 10%, transparent); border-color: color-mix(in srgb, var(--red) 55%, transparent); cursor: not-allowed; }
.is-fitting .ws-row[data-fit="sex"], .is-fitting .div[data-fit="sex"] { background: color-mix(in srgb, var(--red) 6%, transparent); border-color: color-mix(in srgb, var(--red) 40%, transparent); border-style: dashed; opacity: 0.8; }
.is-fitting .ws-row[data-fit="sex"].is-over { opacity: 1; }
.is-fitting .ws-row[data-fit="no"], .is-fitting .div[data-fit="no"] { opacity: 0.3; cursor: not-allowed; }
.is-fitting .ppl[data-fit="lock"], .is-fitting .ppl[data-fit="no"] { cursor: not-allowed; }
.is-fitting .ws-row[data-fit="lock"] .wr-l b, .is-fitting .ws-row[data-fit="lock"] .wr-l small { color: var(--muted); }
.fit-tag { display: inline-flex; align-items: center; gap: 5px; justify-self: start; margin-top: 4px; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; line-height: 1.5; letter-spacing: 0.02em; white-space: nowrap; }
.fit-tag.fit-best { background: color-mix(in srgb, var(--green) 20%, transparent); color: var(--green); }
.fit-tag.fit-lock { background: color-mix(in srgb, var(--red) 16%, transparent); color: var(--red); }
.fit-tag.fit-sex { background: color-mix(in srgb, var(--red) 10%, transparent); color: var(--red); }
.div header > div .fit-tag { margin-top: 6px; }
/* The athlete card: the best fits to tap */
.ac-best { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 8px; }
.ac-best-h { font-size: 12px; font-weight: 700; color: var(--green); margin-right: 2px; }
.ac-fit { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--green); background: color-mix(in srgb, var(--green) 12%, transparent); color: var(--ink); font-family: inherit; font-size: 13px; font-weight: 600; cursor: pointer; text-align: left; }
.ac-fit:hover { background: color-mix(in srgb, var(--green) 22%, transparent); }
.ac-fit small { color: var(--muted); font-weight: 700; }
.ac-fit:disabled { opacity: 0.5; cursor: progress; }
/* Mats (Preparation): the floor in small squares, a row per mat with its name, and where to go next */
.matsetup .ms-floor { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 150px)); gap: 10px; margin: 14px 0 18px; }
.ms-sq { aspect-ratio: 1.6; border-radius: 14px; border: 2px solid var(--c); background: color-mix(in srgb, var(--c) 14%, transparent); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 6px; text-align: center; min-width: 0; }
.ms-sq b { font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.ms-sq small { color: var(--muted); font-size: 12px; }
.ms-list { display: grid; gap: 10px; }
button.ms-sq { font: inherit; color: inherit; cursor: pointer; }
button.ms-sq:hover { background: color-mix(in srgb, var(--c) 24%, transparent); }
.ms-row { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; align-items: center; gap: 6px 12px; padding: 10px 12px; border: 1px solid var(--line); border-left: 4px solid var(--c); border-radius: 14px; }
.ms-main { display: grid; gap: 2px; min-width: 0; }
.ms-name { font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ms-dot { width: 30px; height: 30px; border-radius: 50%; background: var(--c); color: #07070b; font-weight: 700; display: grid; place-items: center; font-size: 14px; }
.ms-acts { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.ms-row > .ms-why { grid-column: 2 / -1; }
.ms-why { margin: 0; color: var(--amber, #f5b23c); }
.ms-dlg .btns { display: flex; flex-wrap: wrap; gap: 8px; }
.ms-dlg label { display: grid; gap: 4px; }
.ms-dlg label span { font-size: 12px; color: var(--muted); }
.ms-say { display: grid; gap: 6px; padding: 12px 14px; border-radius: 12px; background: color-mix(in srgb, var(--ink) 6%, transparent); }
.ms-say p { margin: 0; }
.ms-next h3 { margin: 0 0 12px; }
.ms-links { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; }
.ms-link { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; color: inherit; text-decoration: none; }
.ms-link:hover { border-color: var(--cyan); }
.ms-link i { color: var(--cyan); font-size: 18px; width: 22px; text-align: center; }
.ms-link span { display: grid; }
.ms-link small { color: var(--muted); }
@media (max-width: 560px) {
  .ms-row { grid-template-columns: 30px minmax(0, 1fr); }
  .ms-acts { grid-column: 1 / -1; justify-content: flex-start; }
  .ms-row > .ms-why { grid-column: 1 / -1; }
}

/* Sweep fixes (27 Nov 2026) */
.divchanged { border-color: color-mix(in srgb, var(--amber) 55%, transparent); background: color-mix(in srgb, var(--amber) 8%, var(--card)); }
.divchanged h2 { color: var(--amber); font-size: 18px; }
.divchanged p { margin: 6px 0; }
.dangerzone { border-color: color-mix(in srgb, var(--red) 45%, transparent); }
.dangerzone h2 { color: var(--red); }
.btn.danger { background: var(--red); border-color: var(--red); color: #fff; }
.btn.danger:disabled { opacity: 0.45; cursor: not-allowed; }
.paychip { display: inline-block; justify-self: start; margin-top: 3px; padding: 1px 7px; border-radius: 999px; font: 700 10px/1.6 var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--amber); background: color-mix(in srgb, var(--amber) 14%, transparent); border: 1px solid color-mix(in srgb, var(--amber) 40%, transparent); }
.addone [aria-invalid="true"] { border-color: var(--red) !important; box-shadow: 0 0 0 3px color-mix(in srgb, var(--red) 18%, transparent); }
.wearly { margin: 0 0 10px; }
.ghostm .pill { white-space: normal; }
.sc-idle { margin-top: 14px; padding: 12px 14px; border-radius: 14px; border: 1px dashed var(--line-2); }
.sc-idle h3 { margin: 0 0 2px; font-size: 14px; }
.sc-idle h3 small { color: var(--muted); font-weight: 600; }
.sc-idle p { margin: 0 0 8px; }
.sc-idle-list { display: flex; flex-wrap: wrap; gap: 6px; }
.sc-idle-div { display: grid; padding: 6px 10px; border-radius: 10px; background: var(--card-2); border: 1px solid var(--line); font-size: 13px; }
.sc-idle-div small { color: var(--muted); font-size: 11px; }
.annbar.is-cancelled { display: grid; gap: 2px; margin: 0 0 12px; padding: 12px 14px; border-radius: 16px; background: rgba(255, 77, 94, 0.14); border: 1px solid rgba(255, 77, 94, 0.5); }
.annbar.is-cancelled small { font: 700 11px var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--red); }
.annbar.is-cancelled span { font-weight: 600; }
.mattabs { display: none; }
@media (max-width: 700px) {
  .mattabs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; position: sticky; top: calc(62px + env(safe-area-inset-top, 0px)); z-index: 5; padding: 6px 0; background: var(--bg); }
  .mattabs::-webkit-scrollbar { display: none; }
  .mattabs button { flex: none; min-height: 40px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--card); color: var(--ink); font-weight: 700; cursor: pointer; box-shadow: inset 0 -3px 0 var(--c); }
  .mattabs button small { color: var(--muted); font-weight: 600; margin-left: 4px; }
  .mattabs button.is-on { background: color-mix(in srgb, var(--c) 22%, var(--card)); border-color: var(--c); }
  .mats.is-tabbed > .mat:not(.is-cur) { display: none; }
}

/* App and QR: ways into the app, a list with icons (not numbered steps) */
ul.appsteps-list { list-style: none; padding-left: 0; gap: 16px; }
ul.appsteps-list li { display: flex; gap: 14px; align-items: flex-start; }
ul.appsteps-list li > i { flex: none; width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: rgba(3,195,227,.12); color: #03a3bf; font-size: 15px; margin-top: 2px; }
ul.appsteps-list li span { margin: 2px 0 4px; }

/* The mats are uneven (bkMatBalance, sweep 27 Nov 2026): a calm note with Spread over the mats */
.bal-warn { display: flex; flex-wrap: wrap; gap: 10px 12px; align-items: center; margin: 0 0 14px; padding: 12px 14px; border-radius: 14px; font-size: 14px; background: color-mix(in srgb, var(--amber) 7%, var(--card)); border: 1px solid color-mix(in srgb, var(--amber) 35%, transparent); }
.bal-warn[hidden] { display: none; }
.bal-warn > i { color: var(--amber); font-size: 16px; flex: none; }
.bal-warn p { margin: 0; flex: 1 1 240px; min-width: 0; line-height: 1.45; }
.bal-warn .btns { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }
.ov-bal { margin: 14px 0 0; }
:root[data-theme="light"] .bal-warn > i { color: #b45309; }

/* Screens (27 Nov 2026): only the TVs. Pair one in two steps, then each paired screen as a card */
.scr-pair, .scr-list { margin-bottom: 18px; }
.scr-pair h3, .scr-list h3 { margin: 0 0 6px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.scr-list h3 small { font: 500 13px var(--font, inherit); }
.scr-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; margin-top: 14px; }
.scr-step { display: grid; grid-template-columns: 30px 1fr; gap: 12px; align-items: start; padding: 14px; border-radius: 14px; background: var(--card-2); min-width: 0; }
.scr-step > div { display: grid; gap: 8px; min-width: 0; }
.scr-step small { display: block; }
.scr-n { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font: 700 13px var(--mono); background: var(--card); border: 1px solid var(--line-2); }
.scr-step .tvaddr { margin-top: 4px; }
.scr-step .copy { display: flex; gap: 6px; min-width: 0; }
.scr-step .copy input { flex: 1; min-width: 0; }
.scr-form { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; align-items: end; }
.scr-form .cyc { grid-column: 1 / -1; }
.scr-form > .btn { grid-column: 1 / -1; justify-self: start; }
.scrs { list-style: none; margin: 12px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; align-items: start; }
.scr { display: grid; gap: 12px; padding: 14px; border-radius: 14px; background: var(--card-2); border: 1px solid var(--line); }
.scr.is-on { border-color: rgba(34, 197, 94, 0.35); }
.scr-top { display: grid; grid-template-columns: 40px 1fr auto; gap: 10px; align-items: center; }
.scr-ico { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: var(--card); color: var(--muted); }
.scr.is-on .scr-ico { color: var(--green); }
.scr-name { display: grid; gap: 4px; min-width: 0; }
.scr-name b { font-weight: 700; }
.scr-name small { color: var(--muted); font-size: 12px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.scr-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 10px; align-items: end; }
.scr-opts label { display: grid; gap: 4px; font-size: 12px; color: var(--muted); min-width: 0; }
.scr-opts label.chk { display: flex; grid-column: 1 / -1; color: var(--ink); font-size: 13px; }
.scr-opts select { width: 100%; min-height: 36px; padding: 4px 8px; }
.scr-note { margin: 14px 0 0; }
:root[data-theme="light"] .scr, :root[data-theme="light"] .scr-step { background: rgba(16, 16, 24, 0.035); }
/* The Log on the Matches page */
details.audit { margin-top: 18px; }
details.audit > summary { list-style: none; cursor: pointer; display: grid; gap: 4px; }
details.audit > summary::-webkit-details-marker { display: none; }
details.audit > summary h3 { margin: 0; display: flex; align-items: center; gap: 8px; }
details.audit > summary h3::after { content: "+"; margin-left: auto; font: 600 18px var(--mono); color: var(--muted); }
details.audit[open] > summary h3::after { content: "−"; }
details.audit[open] > summary { margin-bottom: 10px; }
@media (max-width: 560px) {
	.scr-step { grid-template-columns: 1fr; padding: 12px; }
	.scr-step .tvaddr { grid-template-columns: 1fr; justify-items: start; }
	.scr-step .tvaddr .copy { width: 100%; }
}

/* Overview: one guide (Christian, 27 Nov 2026). Steps done or not, the first open one is Next with its button; the day view from going live */
.guide .gs-head, .guide summary { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.guide h2 { margin: 0; }
.guide summary { cursor: pointer; list-style: none; }
.guide summary::-webkit-details-marker { display: none; }
.guide summary h2::after { content: "\25BE"; margin-left: 8px; font-size: 14px; color: var(--muted); display: inline-block; transition: transform 0.2s; }
.guide[open] summary h2::after { transform: rotate(180deg); }
.gs-count { font: 600 13px var(--mono); color: var(--muted); white-space: nowrap; }
.gs-bar { height: 6px; border-radius: 6px; background: var(--line); overflow: hidden; margin: 12px 0 14px; }
.gs-bar i { display: block; height: 100%; border-radius: 6px; background: var(--green); transition: width 0.4s var(--ease); }
.gsteps { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.gsteps > li { border-radius: 14px; background: rgba(255, 255, 255, 0.035); border: 1px solid transparent; }
:root[data-theme="light"] .gsteps > li { background: rgba(16, 16, 24, 0.035); }
.gs-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; min-width: 0; }
.gs-dot { width: 26px; height: 26px; flex: none; border-radius: 50%; border: 2px solid var(--line-2); display: grid; place-items: center; font: normal 700 12px var(--mono); color: var(--muted); }
.gs-dot b { font-size: 11px; }
.gsteps .is-done .gs-dot { background: var(--green); border-color: var(--green); color: #04130a; }
.gs-txt { flex: 1; min-width: 0; display: grid; gap: 2px; }
.gs-label { font-weight: 600; text-decoration: none; color: inherit; }
a.gs-label:hover { text-decoration: underline; }
.gsteps .is-done .gs-label { color: var(--muted); font-weight: 500; }
.gs-meta { font-size: 12.5px; color: var(--muted); overflow-wrap: anywhere; }
.gs-tools { display: flex; gap: 6px; flex: none; }
.gs-tag { flex: none; font: 700 10.5px var(--mono); letter-spacing: 0.08em; text-transform: uppercase; padding: 4px 8px; border-radius: 999px; background: var(--ink); color: var(--bg); }
.gsteps .is-next { background: var(--card); border-color: var(--ink); box-shadow: 0 6px 24px rgba(0, 0, 0, 0.12); }
.gsteps .is-next .gs-dot { border-color: var(--ink); color: var(--ink); }
.gs-act { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 12px 12px 50px; }
.gs-act .btn.go:not(.sm) { min-height: 48px; padding: 0 28px; font-size: 16px; }
.gsteps .bal-warn { margin: 0 12px 12px 50px; }
.gs-link { display: block; margin: -4px 12px 10px 50px; font-size: 13px; }
@media (max-width: 600px) {
	.gs-row { flex-wrap: wrap; }
	.gs-tools { width: 100%; padding-left: 38px; }
	.gsteps .bal-warn { margin-left: 12px; }
}
.dayview .dv-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.dayview h2 { margin: 0; display: flex; align-items: center; gap: 10px; }
.dv-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 0 color-mix(in srgb, var(--red) 60%, transparent); animation: dvpulse 1.6s infinite; }
@keyframes dvpulse { 70% { box-shadow: 0 0 0 10px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
.dv-stats { margin-bottom: 14px; }
.dv-stats .stat { padding: 14px 16px; }
.dv-stats .stat b { font-size: 32px; }
.dv-mats { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 6px; }
.dv-mats li { display: grid; grid-template-columns: minmax(70px, 140px) 1fr auto auto; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; background: rgba(255, 255, 255, 0.035); border-left: 4px solid var(--mc); }
:root[data-theme="light"] .dv-mats li { background: rgba(16, 16, 24, 0.035); }
.dv-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dv-bar { height: 6px; border-radius: 6px; background: var(--line); overflow: hidden; }
.dv-bar i { display: block; height: 100%; background: var(--mc); }
.dv-num { font: 600 13px var(--mono); color: var(--muted); white-space: nowrap; }
.dv-delay { font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.dv-delay.is-late { color: var(--amber); font-weight: 650; }
@media (max-width: 600px) { .dv-mats li { grid-template-columns: 1fr auto; } .dv-bar { grid-column: 1 / -1; grid-row: 2; } .dv-delay { grid-column: 1 / -1; } }
.dv-calls { margin: 0 0 14px; padding: 12px 14px; border-radius: 14px; background: color-mix(in srgb, var(--amber) 7%, var(--card)); border: 1px solid color-mix(in srgb, var(--amber) 35%, transparent); }
.dv-calls h3 { margin: 0 0 6px; font-size: 15px; }
.dv-calls ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 4px; font-size: 14px; }
.dv-calls .when { font-family: var(--mono); color: var(--muted); }
.dv-links { display: flex; flex-wrap: wrap; gap: 8px; }
.guide.is-folded { margin-top: 0; }
section.guide, .dayview { margin-bottom: 18px; }

/* Drag and drop (scripts/bc-bk-dnd.js, owner 27 Nov 2026): a lifted ghost, a dashed gap where the item will land,
   clear targets, a pulse after the drop. Transform and opacity only while moving. */
[data-dnd], .ws-row, .ppl li[data-entry], .sc-div[data-dnd], li[data-mmatch], .bt-p[data-swap], .stf [data-pp], .stf .seat[data-team] { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
[data-dnd] { cursor: grab; }
.bkd-on, .bkd-on * { cursor: grabbing !important; -webkit-user-select: none !important; user-select: none !important; }
.bkd-ghost { position: fixed; z-index: 2147483000; pointer-events: none; margin: 0; padding: 0; list-style: none; will-change: transform; background: transparent; }
.bkd-ghost > * { transform: rotate(-1.6deg) scale(1.04); box-shadow: 0 22px 44px -10px rgba(0, 0, 0, 0.55), 0 0 0 2px #5b8cff !important; opacity: .94; animation: bkdLift 0.16s cubic-bezier(.2, .8, .2, 1); }
.bkd-ghost.is-no > * { box-shadow: 0 22px 44px -10px rgba(0, 0, 0, 0.55), 0 0 0 2px var(--red) !important; }
@keyframes bkdLift { from { transform: none; box-shadow: 0 0 0 0 rgba(0, 0, 0, 0); } }
/* The gap the item leaves (and that moves to where it will land) */
.bkd-src { position: relative; opacity: 1 !important; background: transparent !important; box-shadow: none !important; border-color: transparent !important; }
.bkd-src > * { visibility: hidden; }
.bkd-src::after { content: ""; position: absolute; inset: 1px; border: 2px dashed color-mix(in srgb, #5b8cff 70%, transparent); border-radius: 10px; background: color-mix(in srgb, #5b8cff 9%, transparent); pointer-events: none; }
/* A finger held on an item: it gives a little before it lifts */
.bkd-press { transition: transform 0.2s; transform: scale(0.98); }
/* Targets: blue is where it goes, red refuses */
.bkd-over { outline: 2px solid #5b8cff; outline-offset: -2px; background-color: color-mix(in srgb, #5b8cff 12%, transparent); }
.bkd-no { outline: 2px solid var(--red); outline-offset: -2px; background-color: color-mix(in srgb, var(--red) 10%, transparent); cursor: not-allowed !important; }
.stf .seat.bkd-over { border: 1.5px solid var(--cyan); background: rgba(3, 195, 227, .16); box-shadow: 0 0 0 4px rgba(3, 195, 227, .22); outline: 0; }
/* After the drop: a short glow on the moved item; changed numbers flash */
.bkd-pulse { position: relative; }
.bkd-pulse::before { content: ""; position: absolute; inset: -2px; border-radius: 12px; box-shadow: 0 0 0 2px #5b8cff, 0 0 18px 2px color-mix(in srgb, #5b8cff 55%, transparent); pointer-events: none; animation: bkdPulse 1.2s ease-out forwards; z-index: 1; }
@keyframes bkdPulse { 0% { opacity: 0; } 15% { opacity: 1; } 100% { opacity: 0; } }
.bkd-flash { animation: bkdFlash 1s ease-out; border-radius: 4px; }
@keyframes bkdFlash { 0%, 30% { background-color: color-mix(in srgb, #facc15 45%, transparent); color: #fff; } 100% { background-color: transparent; } }
.bkd-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (prefers-reduced-motion: reduce) {
	.bkd-ghost > * { transform: none; animation: none; }
	.bkd-press { transition: none; transform: none; }
	.bkd-pulse::before { animation: none; opacity: 1; }
	.bkd-flash { animation: none; background-color: color-mix(in srgb, #facc15 35%, transparent); }
}

.is-fitting .ws-row[data-fit="dim"].bkd-over, .is-fitting .ws-row[data-fit="sex"].bkd-over, .is-fitting .div[data-fit="dim"]:has(.bkd-over), .is-fitting .div[data-fit="sex"]:has(.bkd-over) { opacity: 1; }
.div:has(> .ppl.bkd-over), .div:has(.ppl.bkd-over) { box-shadow: 0 0 0 2px #5b8cff; }
.div:has(.ppl.bkd-no) { box-shadow: 0 0 0 2px var(--red); }
.sc-list.bkd-over { outline: 0; background: color-mix(in srgb, #5b8cff 10%, transparent); border-radius: 10px; }
.bt-p.bkd-over { outline: 0; background: color-mix(in srgb, #3b82f6 22%, transparent); box-shadow: inset 0 0 0 2px #3b82f6; }
.is-swapping .bt-p[data-swap]:not(.bkd-src) { box-shadow: inset 0 0 0 1px color-mix(in srgb, #3b82f6 45%, transparent); }
/* A name dragged out of the drawn bracket (owner, 27 Nov 2026): round robin names pick up too; a started or locked
   division does not light up its names as swap targets; the keyboard focus ring on a bracket name */
.mb-m span[data-bkmv] { cursor: grab; -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
.mb-m span[data-bkmv]:hover { background: color-mix(in srgb, var(--ink) 6%, transparent); }
.is-swapping .bt-p[data-frozen]:not(.bkd-src) { box-shadow: none; }
.bt-p[data-frozen], .mb-m span[data-frozen] { cursor: not-allowed; }
.bt-p b.cardlink:focus-visible, .mb-m span[data-bkmv]:focus-visible { outline: 2px solid #3b82f6; outline-offset: 1px; border-radius: 4px; }
[data-dnd]:focus-visible { outline: 2px solid #5b8cff; outline-offset: 1px; }
.ws-list.bkd-over { outline: 0; background-color: transparent; }
/* Change result (Matches, Divisions; Christian 27 Nov 2026) */
dialog.crdlg { border: 0; border-radius: 20px; padding: 0; width: min(500px, calc(100vw - 24px)); background: var(--bg); background-image: linear-gradient(var(--card), var(--card)); color: var(--ink); box-shadow: 0 30px 80px -20px rgba(0,0,0,.5); }
dialog.crdlg::backdrop { background: rgba(8,8,14,.55); }
dialog.crdlg form { padding: 20px; display: grid; gap: 12px; }
dialog.crdlg header { display: flex; justify-content: space-between; align-items: center; }
dialog.crdlg h3 { margin: 0; }
dialog.crdlg .x { background: none; border: 0; font-size: 22px; color: var(--muted); cursor: pointer; }
dialog.crdlg label { display: grid; gap: 4px; }
dialog.crdlg label > span, dialog.crdlg .cr-pts > span, dialog.crdlg legend { font-size: 13px; color: var(--muted); }
dialog.crdlg .cr-who { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px 18px; }
dialog.crdlg .cr-who label { display: flex; gap: 8px; align-items: center; font-weight: 600; }
dialog.crdlg .cr-pts { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; }
dialog.crdlg .cr-pts > span { grid-column: 1 / -1; }
dialog.crdlg .cr-plan { margin: 0; padding: 12px 14px 12px 30px; border-radius: 12px; background: color-mix(in srgb, #f5a524 14%, transparent); display: grid; gap: 4px; font-size: 14px; }
dialog.crdlg .cr-plan .is-bad { color: #d9363e; list-style: none; margin-left: -16px; }
dialog.crdlg .btns { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.cr-btn { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 26px; height: 26px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--card-solid, var(--card)); color: var(--muted); font-size: 11px; cursor: pointer; display: grid; place-items: center; opacity: .75; }
.cr-btn:hover, .cr-btn:focus-visible { opacity: 1; color: var(--ink); }
.mb-m { position: relative; }

/* Schedule: the end time of each mat is what matters most; the empty divisions fold away */
.sc-foot { align-items: baseline; }
.sc-foot .sc-end { font-size: 13px; }
.sc-foot .sc-end b { font-size: 22px; font-weight: 800; letter-spacing: -0.01em; }
.sc-idle { padding: 8px 12px; border-color: var(--line); opacity: .85; }
.sc-idle summary { cursor: pointer; font-size: 13px; color: var(--muted); list-style: none; }
.sc-idle summary::-webkit-details-marker { display: none; }
.sc-idle summary::before { content: "▸ "; }
.sc-idle details[open] summary::before { content: "▾ "; }
.sc-idle summary b { color: var(--ink-2, inherit); font-weight: 700; }
.sc-idle details[open] p { margin-top: 6px; }
/* ---------------------------------------------------------------- UI sweep 27 Nov 2026: admin save bar, empty states, time zone, accessibility */
/* One Save bar per page: says when something is not saved yet */
.savebar { align-items: center; gap: 12px; }
.savebar .sb-state { margin-right: auto; font-size: 14px; font-weight: 650; color: var(--amber); display: inline-flex; align-items: center; gap: 8px; }
.savebar .sb-state:empty { display: none; }
.savebar .sb-state::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
form.is-dirty .savebar { border-color: color-mix(in srgb, var(--amber) 55%, transparent); }
.settings-form { gap: 18px; }
.settings-form .markers-card { margin-bottom: 0; }
/* Empty pages: what to do first instead of an empty table */
.empty-state { display: grid; justify-items: center; text-align: center; gap: 10px; padding: 34px 20px; }
.empty-state .es-ico { font-size: 30px; color: var(--muted); width: 64px; height: 64px; display: grid; place-items: center; border-radius: 20px; background: var(--card-2); }
.empty-state h3 { margin: 4px 0 0; font-size: 20px; }
.empty-state > p { margin: 0; max-width: 56ch; }
.empty-state .btns { justify-content: center; }
.empty-state .es-share { display: grid; gap: 8px; width: min(560px, 100%); margin-top: 12px; padding-top: 16px; border-top: 1px solid var(--line); text-align: left; }
.empty-state .es-share p { margin: 0; }
.empty-state .es-steps { margin: 4px 0; padding-left: 22px; text-align: left; max-width: 60ch; display: grid; gap: 6px; }
.empty-state.es-row { grid-template-columns: auto 1fr auto; justify-items: start; text-align: left; align-items: center; gap: 16px; padding: 20px; margin-bottom: 14px; }
.empty-state.es-row h3 { margin: 0; font-size: 17px; }
.empty-state.es-row p { margin: 2px 0 0; }
.empty-state.es-row .es-ico { width: 48px; height: 48px; font-size: 22px; border-radius: 14px; }
@media (max-width: 640px) { .empty-state.es-row { grid-template-columns: 1fr; } .empty-state .copy { flex-wrap: wrap; } .empty-state .copy input { flex-basis: 100%; } }
.q-empty { margin: 4px 0 0; }
/* Time zone: search box and list side by side */
.tzpick { display: grid; gap: 6px; }
.tzpick > label { display: block; }
.tz-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 8px; }
.tz-sug, .tzpick > p { margin: 0; }
@media (max-width: 560px) { .tz-row { grid-template-columns: 1fr; } }

/* Accessibility: one visible focus ring for keyboard users everywhere in the organizer's app */
:root { --focus-color: #2f8bff; --focus-ring: 0 0 0 3px color-mix(in srgb, var(--focus-color) 45%, transparent); }
:root[data-theme="light"] { --focus-color: #1d4ed8; }
a:focus-visible, button:focus-visible, summary:focus-visible, [tabindex]:focus-visible, .btn:focus-visible, .link:focus-visible, label.splogo:focus-within { outline: 2px solid var(--focus-color); outline-offset: 2px; }
input:focus-visible, select:focus-visible, textarea:focus-visible { border-color: var(--focus-color); box-shadow: var(--focus-ring); }
/* Labels never under 12px */
.rail-head { font-size: 12px; color: rgba(255, 255, 255, .62); }
.rr em, .mb-rrm small, .sc-div small, .bt-p small, .overopt em, .sc-badge, .seeds li .out-st, .pw-own .pill.open, .stripecard .pill.open, .sc-idle-div small, .fit-tag { font-size: 12px; }
@media (max-width: 760px) { table[data-atable] th { font-size: 12px; } table[data-atable] td.dv { font-size: 12px; } }
@media (max-width: 480px) { .sg-tags .srcchip { font-size: 12px; } }
/* Contrast (AA): the amber notes and the muted text on light cards */
:root[data-theme="light"] .note, :root[data-theme="light"] .savebar .sb-state { color: #8a4a06; }
/* Touch: row menus, icon buttons and small buttons are at least 44px to tap */
@media (pointer: coarse) {
  .btn.sm { min-height: 44px; }
  .x, .more-card, table[data-atable] .more-card { min-width: 44px; min-height: 44px; display: inline-grid; place-items: center; }
  button.link[data-addrow], .afilters .link { min-height: 44px; }
}
/* Small mono labels up to 12px (they were 10-11px) */
.brand em, .pill, th, .mat h4, .rail-tag, .wst, .bybelt, .mb-col h5, .bt h5, .bt-extra h5, .ac-facts dt, .srcchip { font-size: 12px; }
.paychip { font-size: 12px; white-space: nowrap; }
:root[data-theme="light"] .paychip { color: #8a4a06; }

/* Who organizes it (Event details, owner 27 Nov 2026): an academy or someone else */
.orgmode { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.orgopt { position: relative; display: block; cursor: pointer; }
.orgopt input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.orgopt > span { display: grid; grid-template-columns: 22px 1fr; gap: 2px 10px; align-items: center; min-height: 64px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line-2); background: var(--card); transition: border-color .15s, background .15s; }
.orgopt > span i { grid-row: span 2; color: var(--muted); font-size: 16px; }
.orgopt > span b { font-size: 14px; }
.orgopt > span small { grid-column: 2; color: var(--muted); font-size: 12px; line-height: 1.35; }
.orgopt input:checked + span { border-color: #5b8cff; background: color-mix(in srgb, #5b8cff 10%, transparent); }
.orgopt input:checked + span i { color: #5b8cff; }
.orgopt input:focus-visible + span { outline: 2px solid #5b8cff; outline-offset: 2px; }
.orgopt input:disabled + span { opacity: .45; cursor: not-allowed; }
.orgrow { display: flex; gap: 12px; align-items: flex-end; }
.orgrow .orgname { flex: 1; min-width: 0; }
.orglogo { position: relative; width: 64px; height: 64px; flex: none; border-radius: 16px; border: 2px dashed var(--line-2); display: grid; place-items: center; overflow: hidden; cursor: pointer; color: var(--muted); }
.orglogo:hover { border-color: #5b8cff; }
.orglogo img { width: 100%; height: 100%; object-fit: cover; background: #fff; }
@media (max-width: 560px) { .orgmode { grid-template-columns: 1fr; } }
.orglogo input[type=file] { position: absolute; inset: 0; opacity: 0; width: 1px; height: 1px; min-height: 0; padding: 0; border: 0; }
.orglogo > span { display: grid; place-items: center; width: 100%; height: 100%; }
/* Matches: compact queues for scanning (owner, 27 Nov 2026). One row per match: time, the two names with their
   colours, the round as a chip, the ⋯ menu; the division once over its run of matches; Call only on the next two. */
.mat { padding: 16px; }
.mat header { margin-bottom: 8px; box-shadow: inset 0 -2px 0 var(--c, transparent); padding-bottom: 6px; }
.mat h3 { font-size: 18px; }
.mat .dot { display: inline-block; flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--muted); }
.mat .dot.r { background: var(--red); }
.mat .dot.b { background: var(--blue); }
.mat .rchip { flex: none; padding: 1px 7px; border-radius: 999px; font: 700 11px/1.6 var(--mono); letter-spacing: 0.02em; color: var(--ink-2); background: var(--card-2); border: 1px solid var(--line); white-space: nowrap; }
/* The live match: still the first thing on the mat, but tight */
.mat .live { gap: 2px; padding: 8px 10px; border-radius: 12px; }
.mat .live .pill.live { display: inline-flex; gap: 6px; padding: 3px 8px; margin: 0; border: 0; border-radius: 999px; background: rgba(34, 197, 94, 0.14); }
.mat .live .lv-top { display: flex; align-items: center; gap: 8px; margin-bottom: 2px; }
.mat .live .lv-clock { margin-left: auto; font: 800 15px var(--mono); color: var(--ink-2); }
.mat .live .lv-clock.is-running { color: var(--green); }
.mat .live .lv-log { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; border: 0; background: none; color: var(--muted); cursor: pointer; }
.mat .live .lv-log:hover { color: var(--ink); background: var(--card-2); }
.mat .live .lv-side { display: flex; align-items: center; gap: 8px; }
.mat .live .lv-side b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; font-size: 15px; }
.mat .live .lv-side em { font: 800 18px var(--mono); font-style: normal; }
.mat .live small { font-size: 12px; }
/* The queue */
.q { gap: 0; grid-template-columns: minmax(0, 1fr); }
.mats > .mat { min-width: 0; }
.q li { display: block; gap: 0; padding: 0; border: 0; border-radius: 0; background: none; border-top: 1px solid var(--line); }
.q li:first-child { border-top: 0; }
:root[data-theme="light"] .q li { background: none; }
.q li .dhead { padding: 8px 4px 2px; font-size: 11px; font-weight: 600; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.q li .dhead + .mrow { padding-top: 2px; }
.q li .mrow { display: flex; align-items: center; gap: 6px; min-height: 40px; padding: 4px 4px; border-radius: 8px; }
.q li[data-dnd]:hover .mrow, .q li:focus-visible .mrow { background: var(--card-2); }
.q li:focus-visible { outline: 2px solid var(--cyan); outline-offset: -2px; border-radius: 8px; }
.q .eta { flex: none; min-width: 40px; white-space: nowrap; font: 600 12px var(--mono); /* "8:03 AM" no longer runs under the red dot (QA 2 Dec 2026) */ color: var(--muted); font-variant-numeric: tabular-nums; }
.q b.nm { flex: 1; min-width: 0; display: flex; align-items: center; gap: 4px; font-size: 14px; font-weight: 700; white-space: nowrap; overflow: hidden; }
.q b.nm .sd { display: inline-flex; align-items: center; gap: 5px; min-width: 0; }
.q b.nm .sd > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.q b.nm .vs { flex: none; }
.q li.is-next .mrow { min-height: 44px; }
.q li.is-next b.nm { font-size: 15px; }
.q li.is-wait .mrow { opacity: 0.55; }
.q li.is-wait b.nm { font-weight: 500; }
.q li.is-wait .dot { background: transparent; box-shadow: inset 0 0 0 1.5px var(--muted); }
.q li.is-called { background: none; border-color: var(--line); }
.q li.is-called .mrow { background: rgba(245, 178, 60, 0.08); box-shadow: inset 3px 0 0 var(--amber); }
.q li.is-pinned { box-shadow: none; }
.q li.is-pinned .mrow { box-shadow: inset 2px 0 0 #5b8cff; border-radius: 0 8px 8px 0; }
.q .clash-ico { flex: none; color: var(--amber); font-size: 13px; }
.q li .acts { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 0 4px 8px 52px; }
.q li .acts.nextacts .btn { min-height: 38px; }
.q li .acts.decide select.sm { min-height: 36px; }
.q li .acts.ghostm { padding-left: 4px; }
.q li > .whybox { padding: 0 4px 8px 52px; }
.mat .clash { margin: 0; padding: 0 4px 6px 52px; display: flex; flex-wrap: wrap; gap: 2px 8px; align-items: baseline; font-size: 12px; font-weight: 600; line-height: 1.35; color: var(--amber); }
.mat .live + .clash { padding: 4px 4px 8px; }
:root[data-theme="light"] .mat .clash, :root[data-theme="light"] .q .clash-ico { color: #b45309; }
.q-more { margin: 6px 4px 0; }
/* The ⋯ menu in a row */
.rmenu { position: relative; flex: none; }
.rmenu > summary { list-style: none; display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 8px; color: var(--muted); cursor: pointer; }
.rmenu > summary::-webkit-details-marker { display: none; }
.rmenu > summary:hover, .rmenu[open] > summary { color: var(--ink); background: var(--card-2); }
.rmenu > summary:focus-visible { outline: 2px solid var(--cyan); outline-offset: 0; }
.rmenu-pop { position: absolute; right: 0; top: calc(100% + 4px); z-index: 30; min-width: 220px; display: grid; padding: 6px; border-radius: 12px; background: var(--bg); border: 1px solid var(--line-2); box-shadow: 0 14px 40px -10px rgba(0, 0, 0, 0.55); }
.rmenu-pop button { display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 0 10px; border: 0; border-radius: 8px; background: none; color: var(--ink); font: 600 14px var(--font); text-align: left; cursor: pointer; white-space: nowrap; }
.rmenu-pop button i { width: 16px; text-align: center; color: var(--muted); }
.rmenu-pop button:hover, .rmenu-pop button:focus-visible { background: var(--card-2); outline: none; }
.q li:has(.rmenu[open]), .recent li:has(.rmenu[open]) { position: relative; z-index: 20; }
.mat:has(.rmenu[open]) { position: relative; z-index: 20; }
:root[data-theme="light"] .rmenu-pop { background: #fff; box-shadow: 0 14px 40px -12px rgba(16, 16, 24, 0.25); }
/* Just finished: folded, one line each, the changes in the menu */
.recentbox { margin-top: 10px; border-top: 1px solid var(--line); padding-top: 4px; }
.recentbox > summary { list-style: none; cursor: pointer; display: flex; align-items: center; min-height: 36px; }
.recentbox > summary::-webkit-details-marker { display: none; }
.recentbox > summary h4 { margin: 0; display: flex; align-items: center; gap: 6px; }
.recentbox > summary h4::before { content: "▸"; font-size: 10px; transition: transform 0.15s; }
.recentbox[open] > summary h4::before { transform: rotate(90deg); }
.recentbox .recent li { flex-wrap: wrap; justify-content: flex-start; min-height: 36px; padding: 0 4px; }
.recentbox .rc-who { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recentbox .rc-who b { font-weight: 600; }
.recentbox .racts { display: grid; gap: 0; }
.recentbox .recent li > .whybox, .recentbox .recent li > .alog { flex-basis: 100%; margin-bottom: 6px; }
@media (pointer: coarse) {
  .rmenu > summary, .mat .live .lv-log { width: 44px; height: 44px; }
  .q li .mrow { min-height: 48px; }
  .rmenu-pop button { min-height: 44px; }
  .q li .acts.nextacts .btn, .q li .acts.decide select.sm { min-height: 44px; }
  .recentbox > summary, .recentbox .recent li { min-height: 44px; }
}


/* Not in the bracket yet (27 Nov 2026): athletes moved into a bracket worked on by hand wait in the division */
.wait { margin: 10px 0 4px; padding: 12px 14px; border-radius: 14px; background: color-mix(in srgb, #5b8cff 9%, transparent); border: 1px dashed color-mix(in srgb, #5b8cff 55%, transparent); display: grid; gap: 8px; }
.wait-h { display: flex; gap: 10px; align-items: flex-start; }
.wait-h > i { color: #5b8cff; font-size: 15px; margin-top: 3px; }
.wait-h b { display: block; font-size: 14px; }
.wait-h .muted { display: block; font-size: 12px; line-height: 1.4; }
.wait .waitlist { margin: 0; max-height: 150px; padding: 2px; }
.wait .waitlist li { background: var(--card-solid, var(--card)); border-radius: 8px; padding: 4px 8px; }
.wait-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.wait-acts .muted { font-size: 12px; }
.meta .wait-n { color: #5b8cff; font-weight: 700; }
.wr-r .wr-wait { color: #5b8cff; font-size: 12px; }
.fit-tag.fit-slot { background: color-mix(in srgb, #5b8cff 16%, transparent); color: #5b8cff; }
.fit-tag.fit-wait { background: color-mix(in srgb, #f59e0b 18%, transparent); color: #b45309; }
.div header > div .fit-tag + .fit-tag { margin-left: 6px; }
/* Rebuild the bracket? What changes, then the organizer decides */
dialog.nd.rb { width: min(560px, calc(100vw - 24px)); }
dialog.nd.rb .rb-lines { margin: 0; padding: 0 0 0 20px; display: grid; gap: 8px; font-size: 15px; line-height: 1.45; }
dialog.nd.rb .rb-lines li::marker { color: #5b8cff; }
dialog.nd.rb .btns { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; margin-top: 4px; }
dialog.nd.rb .btn { min-height: 44px; }
.fit-tag.fit-style { background: color-mix(in srgb, var(--muted, #888) 16%, transparent); color: var(--ink-2, var(--muted)); }

/* While dragging, Not in a division keeps its size and place: nothing on the page may jump (Christian, 27 Nov 2026); it only lights up as a target */
/* The fit tags shown while dragging lie over the division row or card, they never take space (nothing may grow or
   jump while dragging, Christian 27 Nov 2026). The solid backing keeps a see-through tag readable over a border. */
.ws-row > .fit-tags, .div header > .fit-tags { position: absolute; z-index: 2; display: flex; gap: 4px; pointer-events: none; border-radius: 999px; background: var(--card-solid, var(--card, #fff)); }
.ws-row > .fit-tags { top: 4px; right: 10px; }
.div header { position: relative; }
.div header > .fit-tags { right: 0; top: calc(100% + 6px); }
.fit-tags:empty { display: none; }
.fit-tags .fit-tag { margin: 0 !important; padding: 1px 7px; font-size: 10.5px; line-height: 1.45; }
/* BkDnd o.hold: the mats keep their height while dragging; a column that gets the gap paints over what is below */
.bkd-hold { position: relative; z-index: 3; }
/* A checkbox with a line under it (Settings: Referees score their own mat) */
.chk:has(.chk-hint) { flex-wrap: wrap; }
.chk .chk-hint { flex-basis: 100%; padding-left: 52px; font-size: 12.5px; margin-top: -4px; }

/* The latest gear check by a name on the Matches page (functions_brackets_gear.php bkGearIcon): ✓ approved, ✗ not, tooltip with the reason */
.gear-ic { flex: none; display: inline-grid; place-items: center; width: 16px; height: 16px; margin-left: 4px; border-radius: 50%; font-style: normal; font-weight: 900; font-size: 10px; line-height: 1; vertical-align: 1px; cursor: help; }
.gear-ic.ok { background: #22c55e; color: #03150a; }
.gear-ic.no { background: #ff4d5e; color: #fff; }

/* Live in the menu pulses while the tournament runs; a big door to the Live room on the Overview (28 Nov 2026) */
.rail-link.is-live { color: #fff; }
.rail-link.is-live > i.fa-solid { color: #ff4d5e; }
.rail-live { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; padding: 2px 8px; border-radius: 999px; background: rgba(255, 77, 94, .16); color: #ff6b78; font: 700 11px/1.6 var(--mono, ui-monospace, monospace); letter-spacing: .08em; text-transform: uppercase; }
.rail-live i { width: 7px; height: 7px; border-radius: 50%; background: #ff4d5e; box-shadow: 0 0 0 0 rgba(255, 77, 94, .7); animation: bk-onair 1.4s ease-out infinite; }
@keyframes bk-onair { 0% { box-shadow: 0 0 0 0 rgba(255, 77, 94, .7); opacity: 1; } 70% { box-shadow: 0 0 0 7px rgba(255, 77, 94, 0); opacity: .75; } 100% { box-shadow: 0 0 0 0 rgba(255, 77, 94, 0); opacity: 1; } }
.liveroom-cta { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 20px; padding: 22px 26px; margin-bottom: 18px; text-decoration: none; color: #fff; border: 0; background: radial-gradient(120% 160% at 0% 0%, #3a1220 0%, #16111f 45%, #0e0f1a 100%); box-shadow: 0 20px 60px -30px rgba(255, 77, 94, .55); }
.liveroom-cta .lc-pulse { position: relative; width: 22px; height: 22px; }
.liveroom-cta .lc-pulse i { position: absolute; inset: 4px; border-radius: 50%; background: #ff4d5e; animation: bk-onair 1.4s ease-out infinite; }
.liveroom-cta .lc-t { display: grid; gap: 2px; min-width: 0; }
.liveroom-cta small { font: 700 12px var(--mono, ui-monospace, monospace); letter-spacing: .14em; text-transform: uppercase; color: #ff7a86; }
.liveroom-cta b { font-size: 26px; font-weight: 800; letter-spacing: -.02em; }
.liveroom-cta em { font-style: normal; color: rgba(255, 255, 255, .72); font-size: 14px; }
.liveroom-cta .lc-go { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: #fff; color: #0e0f1a; font-size: 18px; transition: transform .2s ease; }
.liveroom-cta:hover .lc-go { transform: translateX(4px); }
.liveroom-cta:focus-visible { outline: 3px solid #03c3e3; outline-offset: 3px; }
@media (max-width: 600px) { .liveroom-cta { padding: 18px; gap: 14px; } .liveroom-cta b { font-size: 21px; } .liveroom-cta .lc-go { width: 44px; height: 44px; } }
@media (prefers-reduced-motion: reduce) { .rail-live i, .liveroom-cta .lc-pulse i { animation: none; } }

/* Smart TV tip under Add a screen (28 Nov 2026) */
.scr-tip { display: flex; align-items: center; gap: 10px; margin: 16px 0 0; padding: 10px 14px; border-radius: 12px; background: color-mix(in srgb, #f5a524 12%, transparent); font-size: 14px; }
.scr-tip i { color: #c27c0e; }
/* Weight and birth year columns in a division's seed list (29 Nov 2026) */
.ppl.seeds .pw, .ppl.seeds .py { flex: none; font: 500 12px var(--mono, ui-monospace, monospace); font-variant-numeric: tabular-nums; color: var(--muted); text-align: right; }
.ppl.seeds .pw { width: 64px; }
.ppl.seeds .pw.is-weighed { color: var(--ink); font-weight: 700; }
.ppl.seeds .py { width: 40px; }
.ppl.seeds small { max-width: 36%; }

/* Screens: the way to the guide's screens part (29 Nov 2026) */
.scr-guide { margin: 10px 2px 0; }
.scr-guide a { color: inherit; font-weight: 600; text-decoration: none; display: inline-flex; gap: 7px; align-items: center; }
.scr-guide a:hover { text-decoration: underline; }
/* Refund an entry paid online (functions_brackets_ops.php bkRefundHtml) */
.ac-refund { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 0 0 8px; }
.ac-refund details { flex: 1 1 100%; }
.ac-refund summary { list-style: none; display: inline-flex; cursor: pointer; }
.ac-refund summary::-webkit-details-marker { display: none; }
.ac-refund-form { display: grid; gap: 8px; margin-top: 8px; padding: 12px; border-radius: 12px; border: 1px solid var(--line, rgba(0,0,0,.12)); }
.ac-refund-form label { display: grid; gap: 4px; font-size: 13px; }
.ac-refund-form input { padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line, rgba(0,0,0,.18)); font: inherit; background: transparent; color: inherit; }
.ac-refund-form p { margin: 0; font-size: 12px; }
.ac-refund-form .btn { justify-self: start; }
.pay.is-refunded { background: color-mix(in srgb, #f5b23c 18%, transparent); color: #b7791f; }
.rail-nav { scrollbar-width: none; } .rail-nav::-webkit-scrollbar { display: none; } /* no grey scrollbar in the menu; the fade and the chevron show there is more (Christian, 1 Dec 2026) */
/* Only the bracket scrolls sideways, never the page (the aurora reaches past the edges; iOS panned the page, 1 Dec 2026) */
html:has(> body.bk-app), body.bk-app { overflow-x: clip; }
/* Merge academies (Athletes, functions_brackets_trophy.php) */
.tmerge { display: grid; gap: 12px; margin: 12px 0; padding: 14px; border-radius: 14px; border: 1px solid var(--line-2); }
.tmerge .tm-row { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 12px; align-items: end; }
.tmerge .tm-row label { display: grid; gap: 6px; min-width: 0; }
.tmerge .tm-row select { width: 100%; min-width: 0; }
.tmerge .tm-arrow { padding-bottom: 12px; color: var(--muted); }
.tmerge .tm-find { position: relative; }
.tmerge .tm-find input[type=search] { width: 100%; }
.tmerge .tm-go { display: flex; justify-content: flex-end; }
.tmerge .tm-done { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.tmerge .tm-done li { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 8px 10px; border-radius: 10px; background: var(--card-2); }
.tmerge .tm-done li span { text-decoration: line-through; color: var(--muted); }
.tmerge .tm-done .tm-bc { color: var(--green, #16a34a); }
.tmerge .tm-done .link { margin-left: auto; }
@media (max-width: 560px) { .tmerge .tm-row { grid-template-columns: minmax(0, 1fr); } .tmerge .tm-arrow { display: none; } }

/* Match list: every disputed result of a mat on top, each opening its review at the head table (2 Dec 2026) */
.mat .disbox { margin: 6px 0 10px; padding: 8px; border-radius: 12px; background: rgba(245, 178, 60, 0.08); border: 1px solid rgba(245, 178, 60, 0.4); }
.mat .disbox h4 { margin: 0 0 6px; }
.mat .disbox ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.mat .disbox a { display: flex; gap: 10px; align-items: center; justify-content: space-between; min-height: 44px; padding: 6px 10px; border-radius: 10px; background: var(--card, rgba(255, 255, 255, 0.04)); border: 1px solid var(--line); color: inherit; text-decoration: none; transition: background 0.15s, border-color 0.15s; }
.mat .disbox a:hover { border-color: rgba(245, 178, 60, 0.7); }
.mat .disbox a > span { display: grid; gap: 2px; min-width: 0; }
.mat .disbox b { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mat .disbox small { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mat .disbox em { font-style: normal; font-size: 13px; font-weight: 650; white-space: nowrap; color: var(--amber, #b7791f); }

/* A page in a Live room sheet (brackets.php &embed=1, Christian 2 Dec 2026): no menu, no top bar */
body.is-embed .rail, body.is-embed .rail-scrim, body.is-embed .app-top, body.is-embed .aurora { display: none !important; }
body.is-embed .bk-shell { grid-template-columns: minmax(0, 1fr); min-height: 0; }

/* The athlete card: a child's parent or guardian, the call link and name + phone to change (full width) */
.ac-facts div:has(.ac-guard) { grid-column: 1 / -1; }
.ac-gtel { display: inline-flex; align-items: center; gap: 5px; margin-right: 6px; font-variant-numeric: tabular-nums; }
.ac-guard { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.ac-guard input { flex: 1 1 140px; min-width: 0; }
.su-guardian { display: grid; gap: 10px; }
.ac-guard select { flex: 0 0 auto; width: auto; min-width: 110px; }
