/* Rows are written out: rows that only come from grid-template-areas stretch to fill a tall main (body is a flex column). */
/* Tournaments: the maker (/tournaments/new) and a tournament's page (/tournament). The game client's look: tokens,
   .mode, .panel, .lobby__center and .lobby__side come from lobby.css. Tournaments wear orange (Play's Tournaments). */
main.tour {
  --cup: #ff9f1c; --gold: #ffc93c; --silver: #d9dde3; --bronze: #d38a4f;
  display: grid; gap: 16px; align-items: start; align-content: start; width: min(100% - 2 * var(--gutter), 1440px); margin: 0 auto;
  padding: 18px 0 calc(var(--tabbar) + 40px); color: var(--text);
}
.tour--maker { grid-template-columns: 260px minmax(0, 1fr) minmax(300px, 380px); grid-template-rows: auto auto; grid-template-areas: "top top top" "rail board side"; }
.tour--page { grid-template-columns: minmax(0, 6fr) minmax(300px, 4fr); grid-template-rows: auto auto auto; grid-template-areas: "head head" "menu menu" "board side"; }
.tour__top { grid-area: top; }
.tour .lobbycity__name { text-shadow: -5px 4px 0 var(--cup), 5px -3px 0 var(--cyan); }
.tnote { font-size: 13.5px; line-height: 1.45; color: var(--muted); }
.tour .lobby__side { grid-area: side; }
.tour .lobby__center { grid-area: board; }

/* ---------- the maker: the rail of steps ---------- */
.trail { grid-area: rail; position: sticky; top: 16px; }
.trail ol { list-style: none; display: grid; gap: 6px; }
.trail__step {
  display: grid; grid-template-columns: 30px minmax(0, 1fr); align-items: center; gap: 10px; width: 100%; padding: 10px 12px; text-align: left;
  color: var(--muted); background: var(--panel); border: 1px solid var(--hair); border-left: 4px solid var(--hair); cursor: pointer;
  transition: transform var(--fast) var(--out), border-color var(--fast), color var(--fast);
}
.trail__step:hover:not(:disabled), .trail__step:focus-visible { transform: translateX(3px); color: var(--text); }
.trail__step:disabled { opacity: 0.45; cursor: default; }
.trail__step[aria-current="step"] { color: var(--text); border-color: var(--hair); border-left-color: var(--cup); box-shadow: inset 0 -4px 0 var(--cup); background: var(--panel-2); }
.trail__step.is-done { border-left-color: var(--lime); }
.trail__n { display: grid; place-items: center; width: 28px; height: 28px; font: 800 12px/1 var(--mono); color: var(--text); border: 2px solid var(--hair); }
.trail__step[aria-current="step"] .trail__n { color: var(--ink); background: var(--cup); border-color: var(--ink); }
.trail__step.is-done .trail__n { color: var(--ink); background: var(--lime); border-color: var(--ink); }
.trail__words { display: grid; gap: 3px; min-width: 0; }
.trail__words b { font: 800 11.5px/1 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; }
.trail__words span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; color: var(--muted); }

/* ---------- the maker: the question ---------- */
.tmaker { gap: 18px; padding: 24px 24px 20px; }
.tmaker__n { font: 700 11px/1 var(--mono); letter-spacing: 0.18em; text-transform: uppercase; color: var(--cup); }
.tmaker__ask { margin-top: -8px; font-family: var(--poster); font-weight: 900; font-stretch: 50%; font-size: clamp(38px, 5vw, 60px); line-height: 0.9; text-transform: uppercase; color: var(--paper); outline: none; }
.tmaker__body { display: grid; gap: 22px; animation: tstep-in 220ms var(--out) both; }
@keyframes tstep-in { from { opacity: 0; transform: translateX(10px); } to { opacity: 1; transform: none; } }
.tmaker__problem { min-height: 1.2em; font-weight: 700; font-size: 14px; color: var(--pink); }
.tmaker__nav { display: flex; justify-content: space-between; gap: 10px; padding-top: 14px; border-top: 1px dashed var(--hair); }
.tmaker__nav [data-next] { display: inline-flex; align-items: center; gap: 8px; margin-left: auto; }
.tmaker__nav [data-next]:disabled { opacity: 0.45; cursor: not-allowed; transform: none; box-shadow: 4px 4px 0 var(--pink); }
.tmaker__nav [hidden] { display: none; }

.tsec { display: grid; gap: 10px; }
.tsec__title { font: 800 10.5px/1 var(--mono); letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.trow { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.tfield { display: grid; gap: 6px; }
.tfield__label { font-size: 13px; font-weight: 700; color: var(--text); }
.tfield__hint { font-size: 12.5px; color: var(--muted); }
.tinput { width: 100%; padding: 12px 14px; font: 600 16px/1.2 var(--sans); color: var(--ink); background: var(--paper); border: 2px solid var(--ink); box-shadow: 3px 3px 0 var(--hair); color-scheme: light; }
.tinput:focus-visible { outline: none; box-shadow: 4px 4px 0 var(--cup); }
.tinput--area { resize: vertical; min-height: 96px; line-height: 1.4; }
.tinput--gold { box-shadow: 4px 4px 0 var(--gold); } .tinput--silver { box-shadow: 4px 4px 0 var(--silver); }
.tinput--bronze { box-shadow: 4px 4px 0 var(--bronze); } .tinput--lime { box-shadow: 4px 4px 0 var(--lime); }

/* the choices: big pressable cards (host, mode, who signs up, courts) and small chips */
.tchoices { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.tchoices--modes { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tchoice {
  display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 12px; width: 100%; padding: 14px; text-align: left;
  color: var(--text); background: var(--panel-2); border: 1px solid var(--hair); border-left: 4px solid var(--hair); cursor: pointer;
  transition: transform var(--fast) var(--out), border-color var(--fast), background var(--fast);
}
.tchoices--modes .tchoice { grid-template-columns: minmax(0, 1fr); align-items: start; }
.tchoice:hover, .tchoice:focus-visible { transform: translateY(-2px); border-color: rgba(241, 239, 230, 0.3); }
.tchoice[aria-pressed="true"] { border-color: var(--cup); border-left-color: var(--cup); background: rgba(255, 159, 28, 0.08); box-shadow: inset 0 -4px 0 var(--cup); }
/* An edit with people in can't pick a sign-up that would hide them (tournament-core.js entryLocks): greyed, still read. */
.tchoice:disabled, .ttoggle:disabled { opacity: 0.45; cursor: not-allowed; transform: none; border-color: var(--hair); }
.tchoice__body { display: grid; gap: 4px; min-width: 0; }
.tchoice__body b { font: 800 16px/1.1 var(--brand); letter-spacing: -0.03em; }
.tchoice__body span { font-size: 13px; line-height: 1.35; color: var(--muted); }
.tchips { display: flex; flex-wrap: wrap; gap: 8px; }
.tchip {
  display: inline-flex; align-items: center; gap: 6px; padding: 10px 14px 9px; font: 800 11.5px/1 var(--mono); letter-spacing: 0.1em; text-transform: uppercase;
  color: rgba(241, 239, 230, 0.85); background: var(--panel-2); border: 1px solid var(--hair); cursor: pointer; transition: transform var(--fast) var(--out);
}
.tchip:hover, .tchip:focus-visible { transform: translateY(-2px); }
.tchip[aria-pressed="true"] { color: var(--ink); background: var(--cup); border-color: var(--ink); box-shadow: 3px 3px 0 var(--ink); }
.tchip--rule svg { opacity: 0; transition: opacity var(--fast); }
.tchip--rule[aria-pressed="true"] { background: var(--lime); }
.tchip--rule[aria-pressed="true"] svg { opacity: 1; }

.tstep { display: inline-flex; align-items: stretch; justify-self: start; border: 2px solid var(--ink); background: var(--paper); }
.tstep__b { width: 44px; font: 800 20px/1 var(--brand); color: var(--ink); background: var(--lime); border: 0; cursor: pointer; }
.tstep__b:disabled { background: rgba(16, 16, 20, 0.12); color: rgba(16, 16, 20, 0.35); cursor: default; }
.tstep__n { display: grid; place-items: center; min-width: 110px; padding: 10px 14px; font: 800 14px/1 var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink); }

.tcourts { list-style: none; display: grid; gap: 8px; max-height: 330px; overflow: auto; padding: 2px 4px 4px 2px; }
.tcourt__pin { display: grid; place-items: center; width: 38px; height: 38px; color: var(--ink); background: var(--cup); border: 2px solid var(--ink); }
.tnone { padding: 14px; color: var(--muted); border: 1px dashed var(--hair); }
.tmap { height: 220px; border: 1px solid var(--hair); }
.tmap[hidden] { display: none; }
.tmap__pin { display: grid; place-items: center; width: 34px; height: 34px; color: var(--ink); background: var(--cup); border: 2px solid var(--ink); box-shadow: 3px 3px 0 var(--ink); rotate: -4deg; }

.tpodium { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.tfee { display: inline-flex; align-items: center; justify-self: start; gap: 8px; }
.tfee__sign { font: 800 22px/1 var(--brand); color: var(--cup); }
.tfee .tinput { width: 130px; }
.tfee__per { font-size: 14px; color: var(--muted); }

.treview { list-style: none; display: grid; gap: 1px; background: var(--hair); border: 1px solid var(--hair); }
.treview__row { display: grid; grid-template-columns: 90px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 12px 14px; background: var(--panel-2); }
.treview__row.is-open { box-shadow: inset 4px 0 0 var(--pink); }
.treview__row.is-open .treview__value { color: var(--pink); }
.treview__name { font: 800 10.5px/1 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.treview__value { font-size: 14px; line-height: 1.35; }
.treview__edit { padding: 6px 10px; font: 800 10.5px/1 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--lime); background: none; border: 1px solid var(--hair); cursor: pointer; }
.treview__edit:hover, .treview__edit:focus-visible { border-color: var(--lime); }
.tagree { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; align-items: start; padding: 14px; font-size: 14px; line-height: 1.45; background: rgba(255, 159, 28, 0.07); border: 1px dashed var(--cup); cursor: pointer; }
.tagree__box { width: 20px; height: 20px; margin-top: 1px; accent-color: var(--lime); }

/* ---------- the poster on the right (maker) ---------- */
.tpreview { position: sticky; top: 16px; }
.tposter {
  position: relative; display: grid; gap: 10px; padding: 20px 18px 18px; color: var(--ink); background: var(--paper); border: 2px solid var(--ink);
  box-shadow: 7px 7px 0 var(--cup), -4px -4px 0 var(--cyan); rotate: -1deg;
}
.tposter::before { content: ""; position: absolute; top: -12px; left: 42%; width: 90px; height: 22px; background: rgba(198, 255, 61, 0.85); rotate: 3deg; }
.tposter__host { display: flex; align-items: center; gap: 8px; font: 800 10px/1 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: rgba(16, 16, 20, 0.6); }
.tposter__name { font-family: var(--poster); font-weight: 900; font-stretch: 50%; font-size: 44px; line-height: 0.88; text-transform: uppercase; overflow-wrap: anywhere; }
.tposter__name.is-empty { color: rgba(16, 16, 20, 0.28); }
.tposter__line { font-size: 13.5px; line-height: 1.35; color: rgba(16, 16, 20, 0.7); }
.tposter__meta { display: flex; align-items: center; gap: 7px; font-size: 13.5px; font-weight: 700; }
.tposter__tags { display: flex; flex-wrap: wrap; gap: 5px; }
.tposter__prize { display: flex; align-items: center; gap: 8px; padding: 8px 10px; font: 800 13px/1.2 var(--brand); letter-spacing: -0.02em; background: var(--gold); border: 2px solid var(--ink); }
.tfacts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--hair); border: 1px solid var(--hair); }
.tfacts--wide { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tfacts div { display: grid; gap: 6px; padding: 12px 14px; background: var(--panel-2); }
.tfacts dt { font: 700 9.5px/1 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.tfacts dd { font-family: var(--poster); font-weight: 900; font-stretch: 50%; font-size: 24px; line-height: 1; text-transform: uppercase; }

/* the mode, drawn: bracket columns, little group tables, a league table, ending at the cup */
.tdiag { display: flex; align-items: center; gap: 8px; height: 86px; padding: 8px 10px; color: var(--cup); background: rgba(16, 16, 20, 0.55); border: 1px solid var(--hair); }
.tposter .tdiag { background: rgba(16, 16, 20, 0.88); }
.tdiag.is-small { height: 64px; }
.tdiag__col { display: grid; align-content: space-around; gap: 6px; height: 100%; }
.tdiag__box { display: block; width: 26px; height: 9px; background: rgba(241, 239, 230, 0.75); }
.tdiag__groups { display: grid; grid-template-columns: repeat(2, auto); gap: 5px; }
.tdiag__table { display: grid; gap: 2px; padding: 3px; border: 1px solid rgba(241, 239, 230, 0.35); }
.tdiag__table--big { gap: 4px; padding: 5px; }
.tdiag__line { display: block; width: 26px; height: 3px; background: rgba(241, 239, 230, 0.7); }
.tdiag__table--big .tdiag__line { width: 90px; height: 5px; }
.tdiag__table--big .tdiag__line:first-child { background: var(--cup); }
.tdiag__arrow { font: 800 16px/1 var(--mono); color: var(--muted); }
.tdiag__cup { display: grid; place-items: center; margin-left: auto; }

/* host badge */
.thost { flex: none; object-fit: contain; }
.thost--me { display: grid; place-items: center; width: 36px; height: 36px; font: 800 13px/1 var(--brand); color: var(--ink); background: var(--paper); border: 2px solid var(--ink); }
.thost--30 { width: 30px; height: 30px; font-size: 11px; } .thost--44 { width: 44px; height: 44px; font-size: 15px; }
img.thost { width: auto; height: 36px; }

/* ---------- a tournament's page ---------- */
.thead { grid-area: head; display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 18px 28px; }
.thead__who { display: grid; gap: 8px; min-width: 0; }
.thead__kicker { display: flex; align-items: center; gap: 10px; font: 700 12px/1 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.thead__name { font-family: var(--poster); font-weight: 900; font-stretch: 50%; font-size: clamp(52px, 9vw, 120px); line-height: 0.84; text-transform: uppercase; color: var(--paper); text-shadow: -5px 4px 0 var(--cup), 5px -3px 0 var(--cyan); overflow-wrap: anywhere; }
.thead__line { max-width: 60ch; font-size: 15px; color: var(--muted); }
.thead__meta { display: flex; flex-wrap: wrap; gap: 8px 18px; font-weight: 700; font-size: 15px; }
.thead__meta span { display: inline-flex; align-items: center; gap: 7px; }
.thead__meta svg { color: var(--cup); }
.thead__status { display: grid; gap: 8px; min-width: 240px; padding: 14px 16px; background: var(--panel); border: 1px solid var(--hair); }
.tstatus { justify-self: start; padding: 5px 9px 4px; font: 800 10.5px/1 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink); border: 2px solid var(--ink); rotate: -2deg; }
.tstatus.is-open { background: var(--lime); } .tstatus.is-full { background: var(--cup); } .tstatus.is-closed { background: var(--paper); }
.tcount { font-size: 14px; color: var(--muted); }
.tcount b { font-family: var(--poster); font-weight: 900; font-stretch: 50%; font-size: 32px; color: var(--text); }
.tcount__closes { font: 700 10.5px/1 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.tmenu { grid-area: menu; display: flex; flex-wrap: wrap; gap: 8px; }
.tmenu--lime { --tone: var(--lime); } .tmenu--cyan { --tone: var(--cyan); } .tmenu--pink { --tone: var(--pink); } .tmenu--orange { --tone: var(--cup); }
.tscreen { gap: 20px; animation: tstep-in 220ms var(--out) both; }
.tblock { display: grid; gap: 12px; }
.tblock__title { font: 800 18px/1 var(--brand); letter-spacing: -0.04em; text-transform: uppercase; }

.tprizes { list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.tprize { display: grid; gap: 6px; padding: 14px; color: var(--ink); background: var(--paper); border: 2px solid var(--ink); }
.tprize--gold { box-shadow: 5px 5px 0 var(--gold); } .tprize--silver { box-shadow: 5px 5px 0 var(--silver); }
.tprize--bronze { box-shadow: 5px 5px 0 var(--bronze); } .tprize--lime { box-shadow: 5px 5px 0 var(--lime); }
.tprize--gold svg { color: #b8860b; }
.tprize__place { font: 800 10px/1 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: rgba(16, 16, 20, 0.6); }
.tprize__what { font: 800 17px/1.15 var(--brand); letter-spacing: -0.03em; }

.twhere { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 14px; align-items: stretch; }
.twhere__words { display: grid; align-content: start; gap: 6px; font-size: 14px; color: var(--muted); }
.twhere__words b { font: 800 22px/1.1 var(--brand); letter-spacing: -0.04em; color: var(--text); }
.twhere .tmap { height: 100%; min-height: 200px; }

.trun { list-style: none; display: grid; gap: 0; border-left: 3px solid var(--hair); margin-left: 6px; }
.trun li { position: relative; display: grid; grid-template-columns: 82px minmax(0, 1fr) auto; align-items: baseline; gap: 12px; padding: 9px 0 9px 18px; }
.trun li::before { content: ""; position: absolute; left: -8px; top: 13px; width: 11px; height: 11px; background: var(--panel); border: 2px solid var(--muted); border-radius: 50%; }
.trun li.is-ko::before { border-color: var(--cup); }
.trun li.is-end::before { background: var(--gold); border-color: var(--gold); }
.trun__at { font: 700 12px/1 var(--mono); color: var(--cup); }
.trun b { font-size: 15px; }
.trun span { font-size: 13px; color: var(--muted); }

.tteams { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; }
.tteam { display: grid; grid-template-columns: 34px minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 10px; align-items: center; padding: 10px 12px; background: var(--panel-2); border: 1px solid var(--hair); }
.tteam__seed { grid-row: 1 / span 2; display: grid; place-items: center; width: 32px; height: 32px; font: 800 12px/1 var(--mono); color: var(--ink); background: var(--paper); border: 2px solid var(--ink); }
.tteam__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; }
.tteam__cap { font-size: 12px; color: var(--muted); }
/* A team's second line: its captain, and how many it still needs from the pool, side by side. */
.tteam__sub { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; min-width: 0; }
.tteam__sub:empty { display: none; }
.tteam.is-open { background: none; border-style: dashed; }
.tteam.is-open .tteam__seed { color: var(--lime); background: none; border: 2px dashed var(--lime); }
.tteam.is-open .tteam__name { color: var(--muted); font-weight: 600; }

.tgroups { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.ttable { width: 100%; border-collapse: collapse; background: var(--panel-2); border: 1px solid var(--hair); font-size: 13.5px; }
.ttable caption { padding: 10px 12px; text-align: left; font: 800 11px/1 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--cup); background: var(--panel); border: 1px solid var(--hair); border-bottom: 0; }
.ttable th, .ttable td { padding: 8px 10px; border-top: 1px solid var(--hair); text-align: center; }
.ttable thead th { font: 700 9.5px/1 var(--mono); letter-spacing: 0.12em; color: var(--muted); }
.ttable tbody th, .ttable thead th:first-child { text-align: left; font-weight: 700; }
.ttable td { color: var(--muted); }
.ttable tr.is-open th { color: var(--muted); font-weight: 500; font-style: italic; }

.tbracket { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(170px, 1fr); gap: 16px; overflow-x: auto; padding-bottom: 8px; }
.tbracket__round { display: grid; grid-template-rows: auto 1fr; gap: 10px; }
.tbracket__name { font: 800 10.5px/1 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.tbracket__round ol { list-style: none; display: grid; align-content: space-around; gap: 10px; }
.tgame { display: grid; background: var(--panel-2); border: 1px solid var(--hair); border-left: 3px solid var(--cup); }
.tgame span { padding: 7px 10px; font-size: 13.5px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tgame span + span { border-top: 1px solid var(--hair); }
.tgame .is-tbd { color: var(--muted); font-weight: 500; }
.tbracket__cup { display: grid; place-items: center; align-content: center; gap: 8px; color: var(--gold); text-align: center; }
.tbracket__cup b { font: 800 14px/1.2 var(--brand); color: var(--text); }

.trules { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.trules li { display: flex; align-items: center; gap: 8px; padding: 10px 12px; font-weight: 700; font-size: 14px; background: var(--panel-2); border: 1px solid var(--hair); }
.trules svg { color: var(--lime); }
.tcustom { padding: 14px 16px; font-size: 15px; line-height: 1.5; color: var(--ink); background: var(--paper); border: 2px solid var(--ink); box-shadow: 4px 4px 0 var(--cup); rotate: -0.4deg; }

.tenter .tinput { margin-top: 2px; }
.tenter__cta, .tenter .mode--cta { display: inline-flex; justify-content: center; align-items: center; gap: 8px; width: 100%; padding-block: 15px; }
.thostcard__who { display: flex; align-items: center; gap: 12px; }
.thostcard__who > span { display: grid; gap: 3px; }
.thostcard__who b { font: 800 17px/1.1 var(--brand); letter-spacing: -0.03em; }
.thostcard__who span span { font-size: 12.5px; color: var(--muted); }
.tedit { justify-self: start; text-decoration: none; }
.tgone { grid-column: 1 / -1; justify-items: start; }

/* ---------- phone and tablet: one column ---------- */
@media (max-width: 1099px) {
  .tour--maker { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto auto auto; grid-template-areas: "top" "rail" "board" "side"; }
  .trail { position: static; }
  .trail ol { grid-auto-flow: column; grid-auto-columns: minmax(150px, 1fr); overflow-x: auto; padding-bottom: 4px; }
  .tpreview { position: static; }
}
@media (max-width: 899px) {
  .tour--page { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto auto auto; grid-template-areas: "head" "menu" "side" "board"; }
  .twhere { grid-template-columns: minmax(0, 1fr); }
  .twhere .tmap { height: 200px; }
}
@media (max-width: 599px) {
  .tchoices--modes, .trow, .tpodium, .tfacts--wide { grid-template-columns: minmax(0, 1fr); }
  .tmaker { padding: 18px 14px; }
  .thead__status { min-width: 0; width: 100%; }
}
@media (prefers-reduced-motion: reduce) { .tmaker__body, .tscreen { animation: none; } .trail__step, .tchoice, .tchip { transition: none; } }

/* ---------- Play, Tournaments: the list ---------- */
.tcups__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.tcups__head .mode--cta { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; }
.tcupcard__crest { display: grid; place-items: center; color: var(--ink); background: var(--tag-school); border: 2px solid var(--ink); }
.center__cups[hidden] { display: none; }

/* ---------- who signs up: three cards with a picture, then the free-agent settings ---------- */
.tchoices--three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tchoices--three .tchoice { grid-template-columns: minmax(0, 1fr); align-items: start; }
.tentry { display: flex; align-items: center; gap: 8px; height: 40px; }
.tentry__team { display: grid; grid-template-columns: repeat(2, 14px); gap: 3px; }
.tentry__shirt { display: block; width: 14px; height: 15px; background: var(--cyan); clip-path: polygon(25% 0, 75% 0, 100% 22%, 86% 40%, 80% 34%, 80% 100%, 20% 100%, 20% 34%, 14% 40%, 0 22%); }
.tentry__shirt.is-solo { width: 26px; height: 28px; background: var(--lime); }
.tentry__plus { font: 800 16px/1 var(--mono); color: var(--muted); }
.tagents { display: grid; gap: 14px; padding: 16px; background: rgba(198, 255, 61, 0.04); border: 1px dashed rgba(198, 255, 61, 0.35); animation: tstep-in 200ms var(--out) both; }
.ttoggles { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; }
.ttoggle { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: start; gap: 12px; padding: 12px 14px; text-align: left; color: var(--text); background: var(--panel-2); border: 1px solid var(--hair); cursor: pointer; }
.ttoggle__switch { position: relative; width: 40px; height: 22px; margin-top: 2px; background: rgba(241, 239, 230, 0.16); border: 2px solid var(--ink); transition: background var(--fast); }
.ttoggle__switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; background: var(--paper); transition: transform var(--fast) var(--pop); }
.ttoggle[aria-pressed="true"] .ttoggle__switch { background: var(--lime); }
.ttoggle[aria-pressed="true"] .ttoggle__switch::after { transform: translateX(18px); background: var(--ink); }
.ttoggle:focus-visible { outline: 2px solid var(--lime); outline-offset: 2px; }
@media (max-width: 899px) { .tchoices--three { grid-template-columns: minmax(0, 1fr); } }

/* ---------- the page: two ways in, short teams, the pool ---------- */
.tenter__ways { display: grid; gap: 8px; }
.tenter__alt { display: inline-flex; justify-content: center; align-items: center; gap: 8px; width: 100%; padding-block: 14px; --tone: var(--lime); }
.tshort { justify-self: start; padding: 3px 7px 2px; font: 800 9.5px/1.2 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink); background: var(--lime); border: 2px solid var(--ink); }
.tteam.is-short { border-color: rgba(198, 255, 61, 0.45); }
.tpool { display: grid; gap: 10px; }
.tpool__sum { display: flex; flex-wrap: wrap; gap: 8px; }
.tpool__sum span { padding: 8px 10px; font-size: 13px; background: var(--panel-2); border: 1px solid var(--hair); }
.tpool__sum b { font-family: var(--poster); font-weight: 900; font-stretch: 50%; font-size: 22px; margin-right: 4px; color: var(--lime); }
.tagentlist { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; }
.tagent { display: grid; grid-template-columns: 38px minmax(0, 1fr); column-gap: 10px; align-items: center; padding: 9px 10px; background: var(--panel-2); border: 1px solid var(--hair); border-left: 3px solid var(--lime); }
.tagent__pos { grid-row: 1 / span 2; display: grid; place-items: center; height: 30px; font: 800 10.5px/1 var(--mono); color: var(--ink); background: var(--paper); border: 2px solid var(--ink); }
.tagent b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.tagent span:last-child { font-size: 12px; color: var(--muted); }
.tpick { display: flex; flex-wrap: wrap; gap: 6px; }

/* A fee cup's payment screenshots (tournament-page.js proofLink): 72 by 96, the picture filled and clipped, with a View
   strip and the expand mark so it reads as something to tap; it opens full size. The app's TourProofThumb. */
.tproof__row { display: flex; align-items: center; gap: 12px; }
.tproof {
  position: relative; flex: none; display: block; width: 72px; height: 96px; overflow: hidden; line-height: 0;
  background: var(--panel-2); border: 1px solid var(--hair); transition: transform var(--fast) var(--out), border-color var(--fast);
}
a.tproof:hover, a.tproof:focus-visible { transform: translateY(-2px); border-color: rgba(241, 239, 230, 0.5); }
.tproof:focus-visible { outline: 3px solid var(--cyan); outline-offset: 2px; }
.tproof .tproof__img { width: 100%; height: 100%; object-fit: cover; }
.tproof__view {
  position: absolute; inset: auto 0 0; display: flex; align-items: center; justify-content: space-between; height: 20px; padding: 0 7px;
  font: 700 9.5px/1 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--text); background: rgba(18, 19, 16, 0.88);
}
.tproof__view svg { width: 10px; height: 10px; }
.tproof--none { display: grid; place-items: center; padding: 6px; font: 700 9.5px/1.25 var(--mono); letter-spacing: 0.08em; text-align: center; text-transform: uppercase; color: var(--muted); }
.tproof__row > .tproof__img { flex: none; width: 72px; height: 96px; object-fit: cover; border: 1px solid var(--hair); }   /* the entry form's preview */
.tproof__img[hidden] { display: none; }
/* The entry form's screenshot and payment note (proofField): the site's own button over a hidden file input, not the
   browser's Choose File; the preview beside it once one is read. */
.tproof__fields { display: grid; gap: 16px; }
.tproof__file[hidden] { display: none; }
.mode.tproof__add { --tone: var(--cup); flex: 0 1 auto; min-height: 44px; color: var(--text); }
.tproof__add svg { color: var(--cup); }
.tproof__add:focus-visible { outline: 3px solid var(--cyan); outline-offset: 2px; }
.tproof__add:active { transform: translateY(1px); }
.tproof__note { resize: none; line-height: 1.35; }

/* The host's Payments to check (checkPanel): one calm note, a slim rule in the tournament orange on the panel colour,
   then each entry as a club owner's join request (club-lobby.css .mlist__row, club-manage.js requestsTool): on the
   panel colour with the hairline, no stripe and no chip; Approve is the club's Accept (.mode--cta), Reject its Decline. */
.tcheckpanel { display: grid; gap: 10px; }
.tcheckfirst { padding: 10px 12px 10px 15px; font-size: 13.5px; line-height: 1.45; color: var(--text); background: var(--panel); border-left: 3px solid var(--cup); }
.tcheckfirst b { font-weight: 800; }
.tchecks { list-style: none; display: grid; gap: 6px; }
.tcheck { display: flex; align-items: flex-start; gap: 14px; padding: 10px 12px; background: var(--panel); border: 1px solid var(--hair); }
.tcheck__body { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; min-height: 96px; }
.tcheck__who { font: 800 14.5px/1.2 var(--sans); overflow-wrap: anywhere; }
.tcheck__from { font: 700 11px/1.2 var(--mono); letter-spacing: 0.06em; color: var(--muted); overflow-wrap: anywhere; }
.tcheck__paid { font-size: 13.5px; line-height: 1.45; color: var(--muted); }
.tcheck__note { font-size: 13.5px; line-height: 1.45; font-style: italic; color: var(--muted); overflow-wrap: anywhere; }   /* the sender's payment note, in quotes */
.tcheck__acts { margin-top: auto; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; padding-top: 10px; }
.tcheck__no, .treport, .tcancel {
  min-height: 40px; padding: 0; font: 800 11px/1 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted);
  background: none; border: 0; text-decoration: underline; cursor: pointer; transition: color var(--fast);
}
.tcheck__no:hover, .tcheck__no:focus-visible, .treport:hover, .treport:focus-visible, .tcancel:hover, .tcancel:focus-visible { color: var(--pink); }
.tcheck__no:focus-visible, .treport:focus-visible, .tcancel:focus-visible { outline: 3px solid var(--cyan); outline-offset: 2px; }
.tcheck__no:disabled, .tcheck .mode--cta:disabled { opacity: 0.45; cursor: progress; }
.treport { justify-self: start; }   /* under Who runs it, as the club page's Report this club */
.tcancel { justify-self: start; }   /* the host's Cancel tournament, under Edit tournament (tournament-cancel.js) */

/* A payment screenshot full size (proofSheet): the paper sheet, the picture whole, the sender's note under it. */
.tproofsheet[open] { display: grid; gap: 14px; }
.tproofsheet__img { justify-self: center; max-width: 100%; max-height: 64svh; object-fit: contain; border: 2px solid var(--ink); background: #fff; }
.tproofsheet__note { display: grid; gap: 4px; font-size: 15px; line-height: 1.45; color: var(--ink); overflow-wrap: anywhere; }
.tproofsheet__label { font: 800 10.5px/1 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: rgba(16, 16, 20, 0.62); }
.tproofsheet__open { justify-self: start; display: inline-flex; align-items: center; min-height: 44px; font-weight: 700; color: var(--ink); }
.tproofsheet__open:focus-visible { outline: 3px solid var(--cyan); outline-offset: 2px; }

/* the report sheet (profile-actions.js reportSheet), as the club page and /me have it */
.chatsheet .btn { margin-top: 20px; }
.preport { display: grid; gap: 14px; }
.preport__reasons { display: grid; gap: 8px; margin: 0; padding: 0; border: 0; }
.preport__reason { display: flex; align-items: center; gap: 10px; font-weight: 600; color: var(--ink); }
.preport textarea { width: 100%; padding: 10px; font: 600 15px/1.4 var(--body); color: var(--ink); background: #fff; border: 2px solid var(--ink); }
.lobbypin--cup .lobbypin__n { width: 34px; height: 34px; color: var(--ink); background: var(--tag-school); border-radius: 8px; }

/* ===== One layout system (same widths as Play): the tournament page goes to one column from 1100 down, the right
   column's panels side by side on tablets ===== */
@media (max-width: 1100px) {
  .tour--page { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto auto auto; grid-template-areas: "head" "menu" "side" "board"; }
}
@media (min-width: 761px) and (max-width: 1100px) {
  .tour--page .lobby__side { grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; }
}
