:root {
  --bg: #0b0f1a;
  --bg-elev: #12182a;
  --bg-card: #161e33;
  --border: rgba(148, 163, 255, 0.18);
  --text: #eef2ff;
  --muted: #9aa6c5;
  --accent: #1a9fff;
  --accent-2: #0b6fd4;
  --green: #34d399;
  --amber: #fbbf24;
  --rose: #fb7185;
  --court: #2dd4bf;
  --radius: 16px;
  --shadow: 0 18px 50px rgba(0,0,0,.45);
  --font: "Segoe UI", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(124,156,255,.22), transparent 60%),
    radial-gradient(900px 500px at 90% 0%, rgba(167,139,250,.18), transparent 55%),
    var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.5;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, .btn {
  font: inherit;
  cursor: pointer;
  border: none;
  border-radius: 999px;
  padding: .7rem 1.15rem;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #0b0f1a;
  font-weight: 650;
  transition: transform .15s ease, filter .15s ease;
}
button:hover, .btn:hover { transform: translateY(-1px); filter: brightness(1.05); }
.btn.ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}
.btn.soft {
  background: rgba(124,156,255,.15);
  color: #c7d2fe;
}

.wrap { width: min(1120px, calc(100% - 2rem)); margin: 0 auto; }

/* Nav */
.nav {
  position: sticky; top: 0; z-index: 40;
  backdrop-filter: blur(14px);
  background: rgba(11,15,26,.72);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding: .9rem 0;
}
.brand {
  display: flex; align-items: center; gap: .65rem; font-weight: 750; letter-spacing: .02em;
}
.logo {
  width: 34px; height: 34px; border-radius: 10px;
  background: linear-gradient(145deg, #7c9cff, #a78bfa 55%, #34d399);
  box-shadow: 0 0 24px rgba(124,156,255,.45);
}
.nav-links { display: flex; gap: .35rem; flex-wrap: wrap; align-items: center; }
.nav-links a {
  padding: .45rem .8rem; border-radius: 999px; color: var(--muted); font-size: .95rem;
}
.nav-links a:hover, .nav-links a.active { color: var(--text); background: rgba(255,255,255,.05); }

/* Hero */
.hero { padding: 3.5rem 0 2rem; }
.hero-grid {
  display: grid; grid-template-columns: 1.2fr .8fr; gap: 2rem; align-items: center;
}
@media (max-width: 860px) { .hero-grid { grid-template-columns: 1fr; } }
.eyebrow {
  display: inline-flex; gap: .4rem; align-items: center;
  color: #c4b5fd; font-size: .85rem; font-weight: 600;
  background: rgba(167,139,250,.12); border: 1px solid rgba(167,139,250,.28);
  padding: .35rem .7rem; border-radius: 999px; margin-bottom: 1rem;
}
.hero h1 {
  font-size: clamp(2rem, 4vw, 3.1rem); line-height: 1.08; margin: 0 0 1rem;
}
.hero p.lead { color: var(--muted); font-size: 1.1rem; margin: 0 0 1.5rem; max-width: 38rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .7rem; }
.hero-card {
  background: linear-gradient(180deg, rgba(255,255,255,.04), transparent), var(--bg-card);
  border: 1px solid var(--border); border-radius: calc(var(--radius) + 4px);
  padding: 1.2rem; box-shadow: var(--shadow);
}
.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: .7rem; margin-top: 1rem; }
.stat {
  background: rgba(0,0,0,.25); border-radius: 12px; padding: .85rem; text-align: center;
}
.stat b { display: block; font-size: 1.25rem; }
.stat span { color: var(--muted); font-size: .8rem; }

/* Sections */
section { padding: 1.5rem 0 2.5rem; }
.section-title {
  display: flex; justify-content: space-between; align-items: end; gap: 1rem;
  margin-bottom: 1rem; flex-wrap: wrap;
}
.section-title h2 { margin: 0; font-size: 1.45rem; }
.section-title p { margin: 0; color: var(--muted); }

.card-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1rem;
}
.card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; transition: border-color .15s ease, transform .15s ease;
}
.card:hover { border-color: rgba(124,156,255,.45); transform: translateY(-2px); }
.card-media {
  height: 140px;
  background:
    linear-gradient(135deg, rgba(45,212,191,.35), rgba(124,156,255,.25)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80' viewBox='0 0 80 80'%3E%3Cpath fill='none' stroke='rgba(255,255,255,.12)' stroke-width='2' d='M10 40h60M40 10v60'/%3E%3Ccircle cx='40' cy='40' r='18' fill='none' stroke='rgba(255,255,255,.15)' stroke-width='2'/%3E%3C/svg%3E");
  background-size: cover, 60px;
}
.card-body { padding: 1rem 1.1rem 1.2rem; }
.pill {
  display: inline-block; font-size: .75rem; font-weight: 650; padding: .2rem .55rem;
  border-radius: 999px; background: rgba(52,211,153,.15); color: var(--green);
}
.pill.soon { background: rgba(251,191,36,.14); color: var(--amber); }
.pill.live { background: rgba(251,113,133,.16); color: var(--rose); }
.pill.published { background: rgba(26,159,255,.16); color: #60b8ff; }
html[data-theme="light"] .pill.published { color: var(--accent-2); }
.card h3 { margin: .55rem 0 .35rem; font-size: 1.1rem; }
.meta { color: var(--muted); font-size: .9rem; }
.meta-row { display: flex; flex-wrap: wrap; gap: .55rem .9rem; margin-top: .7rem; color: var(--muted); font-size: .85rem; }

/* Tournament page */
.tour-hero {
  padding: 2rem 0 1rem;
  display: grid; grid-template-columns: 1.4fr .9fr; gap: 1.25rem;
}
@media (max-width: 900px) { .tour-hero { grid-template-columns: 1fr; } }
.tour-info {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.25rem 1.35rem; box-shadow: var(--shadow);
}
.tour-info h1 { margin: .4rem 0 .6rem; font-size: clamp(1.6rem, 3vw, 2.2rem); }
.info-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: .75rem 1rem; margin-top: 1rem;
}
@media (max-width: 560px) { .info-grid { grid-template-columns: 1fr; } }
.info-item label { display: block; color: var(--muted); font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; }
.info-item div { font-weight: 600; }
.fee-box {
  margin-top: 1rem; display: flex; flex-wrap: wrap; gap: .55rem;
}
.fee {
  background: rgba(0,0,0,.28); border: 1px solid var(--border); border-radius: 12px;
  padding: .65rem .85rem; min-width: 120px;
}
.fee strong { display: block; font-size: 1.15rem; }
.fee span { color: var(--muted); font-size: .8rem; }

/* Tabs */
.tabs {
  display: flex; gap: .4rem; flex-wrap: wrap; margin: 1.25rem 0 .9rem;
  border-bottom: 1px solid var(--border); padding-bottom: .55rem;
}
.tab {
  background: transparent; color: var(--muted); border: 1px solid transparent;
  padding: .55rem .95rem;
}
.tab.active {
  color: var(--text); background: rgba(124,156,255,.12); border-color: var(--border);
}
.panel { display: none; }
.panel.active { display: block; }

.dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--rose);
  box-shadow: 0 0 10px var(--rose); display: inline-block; margin-right: .35rem;
}

/* Pools & standings */
.pools {
  display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 1rem;
}
@media (max-width: 800px) { .pools { grid-template-columns: 1fr; } }
.pool {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden;
}
.pool-head {
  padding: .85rem 1rem; border-bottom: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: center;
  background: rgba(255,255,255,.02);
}
.pool-head h3 { margin: 0; font-size: 1rem; }
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th, td { padding: .65rem .8rem; text-align: left; border-bottom: 1px solid rgba(255,255,255,.05); }
th { color: var(--muted); font-weight: 600; font-size: .78rem; text-transform: uppercase; letter-spacing: .03em; }
tr:last-child td { border-bottom: none; }
.rank { color: var(--muted); width: 2rem; }
.qualify { color: var(--green); font-weight: 650; }

.note {
  color: var(--muted); font-size: .9rem; margin: .75rem 0 0;
}

/* Director / forms */
.form-grid { display: grid; gap: 1rem; }
.form-card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.15rem;
}
.form-card h3 { margin: 0 0 .85rem; }
.fields { display: grid; gap: .75rem; }
.field label { display: block; font-size: .85rem; color: var(--muted); margin-bottom: .3rem; }
.field input, .field select, .field textarea {
  width: 100%; background: #0a0e19; border: 1px solid var(--border); color: var(--text);
  border-radius: 10px; padding: .7rem .8rem; font: inherit;
}
.field textarea { min-height: 90px; resize: vertical; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
@media (max-width: 640px) { .row2 { grid-template-columns: 1fr; } }
.player-table { margin-top: .5rem; }
.chip {
  display: inline-flex; align-items: center; gap: .35rem;
  background: rgba(124,156,255,.12); color: #c7d2fe; border-radius: 999px;
  padding: .15rem .55rem; font-size: .78rem; font-weight: 600;
}

footer {
  border-top: 1px solid var(--border); margin-top: 2rem; padding: 1.5rem 0 2rem; color: var(--muted); font-size: .9rem;
}
.footer-inner { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }

.banner {
  background: rgba(124,156,255,.1); border: 1px solid var(--border); border-radius: 12px;
  padding: .8rem 1rem; color: #c7d2fe; font-size: .92rem; margin-bottom: 1rem;
}

.paid { color: var(--green); font-weight: 650; }
.unpaid { color: var(--rose); font-weight: 650; }

/* Site logo (transparent PNG): no tile, larger, "floating". Dark theme: a soft light rim + blue glow keeps the dark
   gear visible; light theme: a faint shadow. */
.brand img.logo-img {
  width: 52px; height: 52px; object-fit: contain; flex: none; display: block;
  background: none; padding: 0; border-radius: 0; box-shadow: none;
  filter: drop-shadow(0 0 1px rgba(255,255,255,.55)) drop-shadow(0 0 7px rgba(110,185,255,.35));
}
html[data-theme="light"] .brand img.logo-img { filter: drop-shadow(0 1px 2px rgba(15,23,42,.22)); }
.nav-inner { padding: .6rem 0; }
@media (max-width: 640px) { .brand img.logo-img { width: 38px; height: 38px; } .brand { gap: .5rem; } }
.brand .logo { display: none; }

/* Account menu (organizer only) */
.account-menu { position: relative; }
.account-menu > summary {
  list-style: none; cursor: pointer;
  display: inline-flex; align-items: center;
}
.account-menu > summary::-webkit-details-marker { display: none; }
.account-menu[open] > summary .chip { background: rgba(26,159,255,.25); }
.account-dropdown {
  position: absolute; right: 0; top: calc(100% + .45rem);
  min-width: 240px; z-index: 50;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 14px; box-shadow: var(--shadow); padding: .45rem;
}
.account-dropdown a,
.account-dropdown button.menu-item {
  display: flex; width: 100%; align-items: center; justify-content: space-between;
  gap: .75rem; text-align: left; background: transparent; color: var(--text);
  border: none; border-radius: 10px; padding: .65rem .75rem; font: inherit; cursor: pointer;
}
.account-dropdown a:hover,
.account-dropdown button.menu-item:hover { background: rgba(255,255,255,.06); }
.account-dropdown .menu-sep {
  height: 1px; background: var(--border); margin: .35rem .4rem;
}
.account-dropdown .menu-label {
  color: var(--muted); font-size: .75rem; text-transform: uppercase;
  letter-spacing: .04em; padding: .35rem .75rem .15rem;
}
.lang-pills { display: flex; gap: .35rem; }
.lang-pills button {
  padding: .25rem .55rem; border-radius: 999px; font-size: .8rem; font-weight: 650;
  background: rgba(255,255,255,.06); color: var(--muted); border: 1px solid transparent;
}
.lang-pills button.active {
  color: var(--text); border-color: var(--border); background: rgba(26,159,255,.18);
}

/* Light mode (organizer preference) */
html[data-theme="light"] {
  --bg: #f4f7fb;
  --bg-elev: #ffffff;
  --bg-card: #ffffff;
  --border: rgba(15, 40, 80, 0.12);
  --text: #0f172a;
  --muted: #5b6b86;
  --shadow: 0 18px 50px rgba(15, 40, 80, .12);
}
html[data-theme="light"] body {
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(26,159,255,.12), transparent 60%),
    radial-gradient(900px 500px at 90% 0%, rgba(11,111,212,.08), transparent 55%),
    var(--bg);
}
html[data-theme="light"] .nav {
  background: rgba(244,247,251,.85);
}
html[data-theme="light"] .field input,
html[data-theme="light"] .field select,
html[data-theme="light"] .field textarea {
  background: #f8fafc; color: var(--text);
}

.account-dropdown .submenu {
  display: none; margin: .15rem 0 .25rem .5rem;
  border-left: 1px solid var(--border); padding-left: .35rem;
}
.account-dropdown .submenu.open { display: block; }
.account-dropdown .submenu button {
  display: block; width: 100%; text-align: left;
  background: transparent; color: var(--text); border: none;
  border-radius: 8px; padding: .5rem .75rem; font: inherit; cursor: pointer;
}
.account-dropdown .submenu button:hover { background: rgba(255,255,255,.06); }
.account-dropdown .submenu button.active { color: var(--accent); font-weight: 650; }
html[data-theme="light"] .account-dropdown .submenu button:hover { background: rgba(15,40,80,.06); }

/* Yes/No choice row */
.choice-row { display: flex; gap: .75rem; flex-wrap: wrap; margin-top: .35rem; }
.choice {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .45rem .85rem; border-radius: 999px;
  border: 1px solid var(--border); background: rgba(255,255,255,.04);
  cursor: pointer; font-weight: 600; font-size: .9rem;
}
.choice:has(input:checked) {
  border-color: rgba(26,159,255,.55); background: rgba(26,159,255,.15); color: var(--text);
}
.choice input { accent-color: var(--accent); }

/* Paid / DUPR tags after each name */
.name-line { display: inline-flex; flex-wrap: wrap; align-items: center; gap: .3rem .4rem; }
.tag {
  display: inline-flex; align-items: center;
  border-radius: 999px; padding: .12rem .45rem;
  font-size: .72rem; font-weight: 700; letter-spacing: .01em;
}
.tag.paid { background: rgba(52,211,153,.15); color: var(--green); }
.tag.unpaid { background: rgba(251,113,133,.15); color: var(--rose); }
.tag.dupr { background: rgba(26,159,255,.15); color: #93c5fd; }
.tag.muted { background: rgba(148,163,184,.12); color: var(--muted); }

/* Danger zone + modal */
.danger-zone {
  border-color: rgba(251,113,133,.35);
  background: linear-gradient(180deg, rgba(251,113,133,.06), transparent 60%);
}
.btn.danger {
  background: #e11d48; color: #fff; border: none;
}
.btn.danger:hover { filter: brightness(1.08); }
.modal-backdrop {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(2,6,23,.65); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  padding: 1rem;
}
.modal-backdrop[hidden] { display: none !important; }
.modal {
  width: min(440px, 100%);
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 16px; box-shadow: var(--shadow);
  padding: 1.25rem 1.35rem;
}
.modal h3 { margin: 0 0 .5rem; font-size: 1.15rem; }
.modal p { margin: 0; color: var(--muted); font-size: .95rem; line-height: 1.45; }
html[data-theme="light"] .choice { background: #f8fafc; }
html[data-theme="light"] .modal-backdrop { background: rgba(15,23,42,.4); }

/* Event format */
.choice.block.format-choice,
.choice.format-choice {
  display: inline-flex;
  width: auto;
  flex: 1 1 0;
  align-items: center;
  justify-content: space-between;
  gap: .55rem;
  border-radius: 12px;
  padding: .45rem .7rem;
  font-size: .88rem;
  white-space: nowrap;
}
.choice.format-choice input {
  margin: 0;
  flex-shrink: 0;
  width: 1.05rem;
  height: 1.05rem;
}
.choice-stack {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap;
  gap: .4rem;
  margin-top: .35rem;
  align-items: stretch;
}
@media (max-width: 800px) {
  .choice-stack { flex-wrap: wrap; }
  .choice.format-choice { flex: 1 1 100%; white-space: normal; }
}
.format-panel {
  margin-top: .35rem;
  padding: .85rem 1rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(26,159,255,.06);
}
.format-panel[hidden] { display: none !important; }
.subhead {
  margin: 0 0 .65rem;
  font-size: .85rem;
  font-weight: 700;
  letter-spacing: .03em;
  text-transform: uppercase;
  color: var(--muted);
}
.row3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: .75rem; }
@media (max-width: 640px) { .row3 { grid-template-columns: 1fr; } }
.money {
  display: flex; align-items: center; gap: .35rem;
  background: rgba(255,255,255,.04);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0 .65rem;
}
.money span { color: var(--muted); font-weight: 700; }
.money input {
  border: none !important; background: transparent !important;
  padding: .65rem 0 !important; width: 100%;
  box-shadow: none !important;
}
html[data-theme="light"] .format-panel { background: rgba(26,159,255,.08); }
html[data-theme="light"] .money { background: #f8fafc; }

.score-group { margin-top: .9rem; padding-top: .75rem; border-top: 1px solid rgba(148,163,184,.25); }
.score-group[hidden] { display: none !important; }
.score-group-title { margin: 0 0 .5rem; font-size: .95rem; font-weight: 600; }
.format-panel .hint { display: block; margin-top: .25rem; font-size: .78rem; opacity: .7; }

.pools-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: .75rem; }
.pool-card { border: 1px solid rgba(148,163,184,.3); border-radius: 12px; padding: .75rem .9rem; background: rgba(26,159,255,.06); }
.pool-card h4 { margin: 0 0 .5rem; font-size: 1rem; }
.pool-card ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .4rem; }
.pool-card li { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; font-size: .9rem; }
.seed-num { font-weight: 700; font-size: .78rem; opacity: .75; min-width: 3.4rem; }

.court-assign { display: grid; gap: .6rem; }
.court-row { display: grid; grid-template-columns: 170px 1fr; gap: .75rem; align-items: center; padding: .6rem .75rem; border: 1px solid rgba(148,163,184,.25); border-radius: 12px; }
.court-row-label { display: grid; gap: .15rem; }
.court-summary { font-size: .8rem; opacity: .7; }
.court-chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.court-chip { min-width: 2.3rem; height: 2.3rem; border-radius: 999px; border: 1px solid rgba(148,163,184,.4); background: transparent; color: inherit; font-weight: 600; cursor: pointer; }
.court-chip:hover { border-color: var(--accent); }
.court-chip.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.court-chip.taken { opacity: .35; }
@media (max-width: 640px) { .court-row { grid-template-columns: 1fr; } }

/* Court buttons drawn as mini pickleball courts (top-down, landscape). */
.court-chip {
  position: relative; width: 64px; min-width: 64px; height: 36px; border-radius: 3px; padding: 0;
  border: 2px solid rgba(255,255,255,.75);
  background:
    linear-gradient(90deg, transparent calc(50% - 1px), rgba(255,255,255,.95) calc(50% - 1px), rgba(255,255,255,.95) calc(50% + 1px), transparent calc(50% + 1px)),
    linear-gradient(90deg, transparent 31%, rgba(255,255,255,.6) 31%, rgba(255,255,255,.6) calc(31% + 1px), transparent calc(31% + 1px), transparent calc(69% - 1px), rgba(255,255,255,.6) calc(69% - 1px), rgba(255,255,255,.6) 69%, transparent 69%),
    linear-gradient(180deg, transparent calc(50% - .5px), rgba(255,255,255,.6) calc(50% - .5px), rgba(255,255,255,.6) calc(50% + .5px), transparent calc(50% + .5px)),
    #2f6f4f;
  color: #fff; font-size: .85rem; font-weight: 800; text-shadow: 0 1px 2px rgba(0,0,0,.8);
  transition: transform .12s ease, box-shadow .12s ease;
}
.court-chip::after { content: ""; position: absolute; inset: 31% auto 31% 50%; }
.court-chip:hover { transform: translateY(-1px); border-color: #fff; }
.court-chip.on {
  background:
    linear-gradient(90deg, transparent calc(50% - 1px), #fff calc(50% - 1px), #fff calc(50% + 1px), transparent calc(50% + 1px)),
    linear-gradient(90deg, transparent 31%, rgba(255,255,255,.75) 31%, rgba(255,255,255,.75) calc(31% + 1px), transparent calc(31% + 1px), transparent calc(69% - 1px), rgba(255,255,255,.75) calc(69% - 1px), rgba(255,255,255,.75) 69%, transparent 69%),
    linear-gradient(180deg, transparent calc(50% - .5px), rgba(255,255,255,.75) calc(50% - .5px), rgba(255,255,255,.75) calc(50% + .5px), transparent calc(50% + .5px)),
    #1a9fff;
  border-color: #fff; box-shadow: 0 0 0 2px rgba(26,159,255,.45), 0 4px 10px rgba(26,159,255,.35);
}
.court-chip.taken { opacity: .28; filter: grayscale(.6); }
.court-chips { gap: .5rem; }

.court-chip { width: 76px; min-width: 76px; height: 42px; }
.court-num { display: inline-flex; align-items: center; justify-content: center; min-width: 1.35rem; height: 1.35rem; padding: 0 .3rem; border-radius: 999px; background: rgba(10,20,30,.85); color: #fff; font-size: .78rem; font-weight: 800; text-shadow: none; position: relative; z-index: 1; }
.court-chip.on .court-num { background: #fff; color: #0b5ea8; }
.court-chip.taken { opacity: .4; }

/* Center line only runs through the service boxes, not the kitchen. */
.court-chip, .court-chip.on {
  background-image:
    linear-gradient(90deg, transparent calc(50% - 1px), var(--net, rgba(255,255,255,.95)) calc(50% - 1px), var(--net, rgba(255,255,255,.95)) calc(50% + 1px), transparent calc(50% + 1px)),
    linear-gradient(90deg, transparent 31%, var(--ln, rgba(255,255,255,.6)) 31%, var(--ln, rgba(255,255,255,.6)) calc(31% + 1px), transparent calc(31% + 1px), transparent calc(69% - 1px), var(--ln, rgba(255,255,255,.6)) calc(69% - 1px), var(--ln, rgba(255,255,255,.6)) 69%, transparent 69%),
    linear-gradient(180deg, transparent calc(50% - .5px), var(--ln, rgba(255,255,255,.6)) calc(50% - .5px), var(--ln, rgba(255,255,255,.6)) calc(50% + .5px), transparent calc(50% + .5px)),
    linear-gradient(180deg, transparent calc(50% - .5px), var(--ln, rgba(255,255,255,.6)) calc(50% - .5px), var(--ln, rgba(255,255,255,.6)) calc(50% + .5px), transparent calc(50% + .5px));
  background-size: 100% 100%, 100% 100%, 31% 100%, 31% 100%;
  background-position: 0 0, 0 0, left top, right top;
  background-repeat: no-repeat;
  background-color: #2f6f4f;
}
.court-chip.on { --ln: rgba(255,255,255,.75); --net: #fff; background-color: #1a9fff; }


.published-banner { border-color: rgba(34,197,94,.5); background: rgba(34,197,94,.12); font-weight: 600; }
.pub-teams { margin: 0; padding-left: 1.2rem; display: grid; gap: .3rem; }
.gen-wrap { display: flex; flex-direction: column; align-items: flex-end; gap: .3rem; }
.gen-round { margin-top: .9rem; }
.gen-round-head { font-weight: 700; font-size: .85rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin-bottom: .35rem; }
.gen-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .35rem; }
.gen-match { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; padding: .45rem .6rem; border: 1px solid var(--line, rgba(255,255,255,.1)); border-radius: 10px; }
.gen-court { font-size: .75rem; font-weight: 700; padding: .15rem .5rem; border-radius: 999px; background: rgba(59,130,246,.18); color: #93c5fd; }
.gen-wait { font-size: .75rem; width: 100%; }
.gen-bye { padding: .2rem .6rem; }

/* ---------- Scores page + results (scores.js) ---------- */
.pools.sc-single { grid-template-columns: 1fr; }
.sc-small { padding: .45rem .85rem; font-size: .85rem; }
button[disabled], .btn[disabled] { opacity: .45; cursor: not-allowed; transform: none; filter: grayscale(.4); }
.sc-savebar {
  position: sticky; top: 66px; z-index: 30; display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap;
  background: var(--bg-elev); border: 1px solid var(--border); border-radius: 12px; padding: .55rem .8rem; margin-bottom: 1.25rem; box-shadow: var(--shadow);
}
.sc-save { display: inline-flex; align-items: center; gap: .75rem; }
#sc-status.on { color: var(--green); font-weight: 650; }
.sc-stage { padding: .25rem 0 1.75rem; }
.sc-body { padding: .35rem 1rem 1rem; }
.sc-list { display: grid; gap: .5rem; }
.sc-match { border: 1px solid var(--border); border-radius: 12px; padding: .55rem .7rem; background: rgba(255,255,255,.02); }
.sc-match.done { border-color: rgba(52,211,153,.45); }
.sc-match.sc-wait-teams { opacity: .8; }
.sc-head { display: flex; align-items: flex-end; gap: .45rem; margin-bottom: .35rem; }
.sc-head-l { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .45rem; }
.sc-label { font-size: .78rem; font-weight: 700; color: var(--muted); }
.sc-wait { font-size: .75rem; }
.sc-final { font-size: .7rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; padding: .12rem .5rem; border-radius: 999px; background: rgba(52,211,153,.16); color: var(--green); }
.sc-final[hidden] { display: none; }
.sc-rows { display: grid; gap: .25rem; }
.sc-row { display: flex; align-items: center; justify-content: space-between; gap: .6rem; padding: .15rem .3rem; border-radius: 8px; }
.sc-row.win { background: rgba(52,211,153,.1); color: var(--green); font-weight: 700; }
.sc-row.win .sc-team::after { content: " ✓"; }
.sc-team { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sc-seed { display: inline-flex; align-items: center; justify-content: center; min-width: 1.3rem; height: 1.3rem; margin-right: .35rem; border-radius: 6px; background: rgba(124,156,255,.15); color: #c7d2fe; font-size: .72rem; font-weight: 800; }
.sc-pending { color: var(--muted); font-weight: 400; }
.sc-games { display: inline-flex; gap: .3rem; flex-shrink: 0; }
.sc-ghs { margin-left: auto; padding-right: .3rem; align-self: flex-end; }
.sc-gh { width: 2.9rem; text-align: center; font-size: .68rem; font-weight: 700; color: var(--muted); line-height: 1.05; display: flex; flex-direction: column; justify-content: flex-end; }
.sc-gh small { font-size: .58rem; font-weight: 600; opacity: .85; }
.sc-in {
  width: 2.9rem; height: 2.1rem; text-align: center; font: inherit; font-weight: 700; font-variant-numeric: tabular-nums;
  background: #0a0e19; color: var(--text); border: 1px solid var(--border); border-radius: 8px; padding: 0;
}
.sc-in:focus { outline: 2px solid var(--accent); outline-offset: 0; }
.sc-in:disabled { opacity: .35; }
.sc-in.bad { border-color: var(--rose); box-shadow: 0 0 0 1px var(--rose); }
.sc-out { width: 2.9rem; text-align: center; font-variant-numeric: tabular-nums; color: var(--muted); }
.sc-out.hi { color: var(--text); font-weight: 800; }
.sc-row.win .sc-out.hi { color: var(--green); }
.sc-ro .sc-gh, .sc-ro .sc-out { width: 2.5rem; }
.sc-err { margin-top: .4rem; color: var(--rose); font-size: .8rem; font-weight: 600; }
.sc-err[hidden] { display: none; }
.sc-bye .sc-row { font-weight: 600; }
.sc-bye .sc-row.win .sc-team::after { content: ""; }
.sc-table td, .sc-table th { padding: .55rem .6rem; }
.sc-gen { max-width: 640px; }
.sc-gen .btn { margin-top: .75rem; }
.sc-ptag { display: inline-flex; align-items: center; height: 1.3rem; padding: 0 .3rem; margin-right: .35rem; border-radius: 6px; background: rgba(52,211,153,.14); color: #a7f3d0; font-size: .68rem; font-weight: 700; letter-spacing: .02em; }
.sc-seeds { margin: .6rem 0 0; padding-left: 1.3rem; display: grid; gap: .2rem; }
.sc-gate { max-width: 560px; margin: 2rem auto; }
/* Bracket columns */
.sc-bracket-scroll { overflow-x: auto; padding-bottom: .5rem; }
.sc-bracket { display: flex; gap: 1rem; align-items: stretch; min-width: min-content; }
.sc-bcol { flex: 0 0 310px; display: flex; flex-direction: column; }
.sc-bcol h4 { margin: 0 0 .6rem; text-align: center; font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.sc-bcol h4 small { display: block; text-transform: none; letter-spacing: 0; font-weight: 500; opacity: .85; }
.sc-bcol-body { flex: 1; display: flex; flex-direction: column; justify-content: space-around; gap: 1rem; }
.sc-bcol .sc-match { background: var(--bg-card); }
.sc-third h5 .meta { text-transform: none; letter-spacing: 0; font-weight: 500; }
.sc-third h5 { margin: 0 0 .4rem; font-size: .8rem; color: var(--amber); text-transform: uppercase; letter-spacing: .04em; }
.sc-third .sc-match { border-color: rgba(251,191,36,.4); }
.sc-champ { flex-basis: 220px; }
.sc-podium { text-align: center; border: 1px solid rgba(251,191,36,.4); border-radius: 14px; padding: 1rem; background: rgba(251,191,36,.06); }
.sc-trophy { font-size: 2rem; }
.sc-champ-name { font-weight: 800; font-size: 1.05rem; margin: .2rem 0 .35rem; }
html[data-theme="light"] .sc-in { background: #f8fafc; }
html[data-theme="light"] .sc-savebar { background: #fff; }
/* Pool play pickers (scores.html) */
.sc-viewbar { display: flex; flex-wrap: wrap; align-items: flex-end; gap: .75rem 1rem; margin: 0 0 1rem; }
.sc-pick { display: grid; gap: .25rem; font-size: .8rem; color: var(--muted); font-weight: 600; }
.sc-pick[hidden] { display: none; }
.sc-pick select { min-width: 190px; background: #0a0e19; color: var(--text); border: 1px solid var(--border); border-radius: 10px; padding: .55rem .7rem; font: inherit; font-size: .92rem; font-weight: 500; }
.sc-step { display: inline-flex; gap: .5rem; margin-left: auto; }
html[data-theme="light"] .sc-pick select { background: #f8fafc; }
.sc-single .sc-list { grid-template-columns: repeat(auto-fill, minmax(min(340px, 100%), 1fr)); align-items: start; }
.sc-single .sc-list .gen-bye { grid-column: 1 / -1; }
.save-warn { margin-top: .6rem; color: #fca5a5; font-size: .88rem; }

/* Organizer dashboard: empty state when no tournament is saved yet */
.desk-empty { text-align: center; padding: 2rem 1rem; }
.desk-empty p { margin: 0 0 1rem; color: var(--muted); font-size: 1.05rem; }
.desk-empty[hidden], #desk-table[hidden] { display: none !important; }

/* Public page: all organizer buttons together in the top bar */
.org-actions { display: flex; flex-wrap: wrap; gap: .6rem; justify-content: flex-end; align-items: center; }
.org-match-actions { display: contents; }
@media (max-width: 640px) {
  .org-actions { width: 100%; justify-content: flex-start; }
  .org-actions .btn { flex: 1 1 auto; text-align: center; }
}

/* Manage page: team editor (roster.js) */
.roster table td { vertical-align: middle; }
.roster-player { display: block; border-radius: 10px; transition: background-color .4s, box-shadow .4s; }
.roster-player .rp-main { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; }
.roster-player .rp-sub { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-top: .3rem; }
.roster-player .rp-duprid { width: 11rem; max-width: 100%; padding: .28rem .55rem; font-size: .8rem; text-transform: uppercase; letter-spacing: .02em; }
.roster-player .rp-duprid::placeholder { text-transform: none; letter-spacing: 0; }
.rp-link { font-size: .8rem; font-weight: 600; color: var(--accent); text-decoration: none; white-space: nowrap; }
.rp-link:hover { text-decoration: underline; }
.rp-link[hidden] { display: none; }
.roster-player.rp-flash { background: rgba(52,211,153,.14); box-shadow: 0 0 0 4px rgba(52,211,153,.14); }
.roster-player input, .mlp-team .rp-team {
  background: #0a0e19; border: 1px solid var(--border); color: var(--text);
  border-radius: 8px; padding: .45rem .6rem; font: inherit; font-size: .92rem;
}
.roster-player .rp-name { flex: 1 1 9rem; min-width: 7rem; }
.roster-player .rp-dupr { width: 5.2rem; flex: 0 0 auto; }
.roster-player input:focus, .mlp-team .rp-team:focus { outline: 2px solid var(--accent); outline-offset: 0; }
.roster-player input.bad { border-color: var(--rose); }
/* Rating box of a player just added from Find Player (directory has no rating): make it obvious to fill in */
.roster-player input.rp-need { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(26,159,255,.25); animation: rpNeed 1.6s ease-in-out 3; }
.roster-player input.rp-need::placeholder { color: var(--accent); opacity: 1; }
@keyframes rpNeed { 50% { box-shadow: 0 0 0 5px rgba(26,159,255,.45); } }
.rp-paid { min-width: 5.4rem; text-align: center; justify-content: center; border: none; cursor: pointer; font: inherit; font-size: .72rem; font-weight: 700; padding: .25rem .6rem; }
.rp-paid:hover { transform: none; filter: brightness(1.15); }
.rp-actions { white-space: nowrap; text-align: right; }
.rp-ask { font-size: .85rem; color: var(--muted); }
.roster-empty { padding: 1rem; text-align: center; }
.roster-empty[hidden], .roster-msg[hidden] { display: none; }
.roster-msg { margin-top: .6rem; color: #fca5a5; }
.roster-count { margin-top: .35rem; }
.roster-save-note { margin-top: .5rem; font-size: .82rem; }
html[data-theme="light"] .roster-player input { background: #fff; color: #0f172a; }
@media (max-width: 720px) {
  .roster table, .roster tbody, .roster tr, .roster td { display: block; width: 100%; }
  .roster thead { display: none; }
  .roster tr { border-bottom: 1px solid var(--border); padding: .5rem 0; }
  .roster td.rank { font-weight: 700; }
  .rp-actions { text-align: left; }
}
.roster-count .paid { color: var(--green); font-weight: 600; }
.roster-count .unpaid { color: var(--rose); font-weight: 600; }

/* Find Player modal (saved players directory) */
.modal.fp-modal { width: min(700px, 100%); max-height: calc(100vh - 2rem); display: flex; flex-direction: column; }
.fp-search {
  width: 100%; margin-top: .85rem; background: #0a0e19; border: 1px solid var(--border); color: var(--text);
  border-radius: 10px; padding: .6rem .75rem; font: inherit;
}
.fp-search:focus { outline: 2px solid var(--accent); outline-offset: 0; }
.modal .fp-count { margin-top: .5rem; font-size: .82rem; }
.fp-list { margin-top: .4rem; overflow-y: auto; min-height: 4rem; max-height: 50vh; border: 1px solid var(--border); border-radius: 12px; }
.fp-row { display: flex; align-items: center; gap: .5rem; padding: .35rem .5rem .35rem 0; border-bottom: 1px solid var(--border); }
.fp-row:last-child { border-bottom: none; }
.fp-row.fp-head { font-size: .7rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding: .5rem .5rem .5rem .75rem; }
.fp-head span:first-child, .fp-name { flex: 1 1 auto; min-width: 0; }
.fp-head span:nth-child(2), .fp-id { width: 6.2rem; flex: 0 0 auto; }
.fp-head span:nth-child(3), .fp-link { width: 7.4rem; flex: 0 0 auto; }
.fp-head span:nth-child(4) { width: 13rem; flex: 0 0 auto; }
.fp-pick {
  flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: .5rem; text-align: left;
  background: none; border: none; color: var(--text); font: inherit; padding: .45rem .75rem; border-radius: 8px; cursor: pointer;
}
.fp-pick:hover, .fp-pick:focus-visible { background: rgba(26,159,255,.1); }
.fp-row.in .fp-pick { color: var(--muted); cursor: default; }
.fp-row.in .fp-pick:hover { background: none; }
.fp-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fp-id { font-family: ui-monospace, Consolas, monospace; font-size: .85rem; color: var(--muted); }
.fp-act { width: 13rem; flex: 0 0 auto; display: flex; align-items: center; justify-content: flex-end; gap: .35rem; flex-wrap: nowrap; }
.fp-act.asking { flex-wrap: wrap; }
.fp-in { background: rgba(148,163,255,.14); color: var(--muted); white-space: nowrap; padding: .25rem .6rem; }
.fp-del { background: none; border: 1px solid transparent; color: var(--muted); font-size: 1.1rem; line-height: 1; width: 1.8rem; height: 1.8rem; border-radius: 8px; cursor: pointer; }
.fp-del:hover { border-color: var(--border); color: var(--rose); }
.fp-act .rp-ask { flex-basis: 100%; text-align: right; font-size: .78rem; }
.fp-empty { padding: 1.25rem 1rem; text-align: center; }
.modal .fp-msg { min-height: 1.3em; margin-top: .6rem; font-size: .88rem; }
.modal .fp-msg[data-kind="ok"] { color: var(--green); }
.modal .fp-msg[data-kind="warn"] { color: #fca5a5; }
.fp-foot { margin-top: .75rem; justify-content: flex-end; }
html[data-theme="light"] .fp-search { background: #fff; color: #0f172a; }
@media (max-width: 560px) {
  .fp-head { display: none !important; }
  .fp-row { flex-wrap: wrap; padding-left: 0; }
  .fp-act { width: 100%; justify-content: flex-start; padding-left: .75rem; }
  .fp-link { width: auto; padding-left: .75rem; }
  .fp-link:empty { display: none; }
}

/* Scores page: all pools at once, one Round picker (scores.js renderPoolList) */
.sc-pools { display: grid; grid-template-columns: 1fr; gap: 1rem; align-items: start; }
@media (min-width: 960px) { .sc-pools:not(.sc-single) { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.sc-pool .pool-head h3 { font-size: 1.08rem; }
.sc-pool .gen-round:first-child { margin-top: .6rem; }
.sc-pool .gen-bye { font-size: .85rem; border-left: 2px solid var(--border); margin-top: .1rem; }
.sc-pool-none { padding: .9rem 0 .2rem; }
.sc-pick-note { font-weight: 500; color: var(--muted); opacity: .85; }
@media (max-width: 560px) {
  .sc-viewbar { align-items: stretch; }
  .sc-viewbar .sc-pick, .sc-viewbar .sc-pick select { width: 100%; min-width: 0; }
  .sc-step { margin-left: 0; width: 100%; }
  .sc-step .btn { flex: 1; }
  .sc-body { padding: .35rem .6rem .8rem; }
  .sc-pool .pool-head { flex-wrap: wrap; gap: .35rem; }
}

/* Account settings: organization photo (org.js) */
.org-photo-box {
  margin-top: .35rem; min-height: 150px; display: flex; align-items: center; justify-content: center;
  border: 1px dashed var(--border); border-radius: 14px; padding: 1rem;
  background: linear-gradient(145deg, rgba(124,156,255,.12), rgba(45,212,191,.08));
}
.org-photo-box.has-photo { border-style: solid; background: rgba(255,255,255,.03); }
.org-photo-box img { display: block; max-width: 100%; max-height: 220px; object-fit: contain; border-radius: 12px; }
.org-photo-box img[hidden], .org-photo-empty[hidden] { display: none; }
.org-photo-empty { color: var(--muted); font-size: .9rem; text-align: center; max-width: 32rem; line-height: 1.45; }
.org-photo-actions { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }
.org-photo-actions [hidden] { display: none; }
.org-ask { color: var(--muted); font-size: .9rem; }
.org-photo-msg { min-height: 1.2em; margin: .1rem 0 0; }
.org-photo-msg[data-kind="ok"] { color: var(--green); }
.org-photo-msg[data-kind="warn"] { color: var(--rose); }
html[data-theme="light"] .org-photo-box.has-photo { background: #f8fafc; }

/* Public tournament page: "Hosted by" (org.js) */
.hosted-by { display: flex; align-items: center; gap: .7rem; margin: -.1rem 0 .75rem; min-width: 0; }
.hosted-logo { height: 56px; width: auto; max-width: 140px; object-fit: contain; border-radius: 12px; flex: 0 0 auto; }
.hosted-logo[hidden] { display: none; }
.hosted-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.hosted-by:not(.has-logo) .hosted-text { flex-direction: row; flex-wrap: wrap; align-items: baseline; gap: .35rem; }
.hosted-label { font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.hosted-name { font-size: 1rem; font-weight: 700; color: var(--text); overflow-wrap: anywhere; }
@media (max-width: 560px) { .hosted-logo { height: 48px; max-width: 110px; } .hosted-name { font-size: .95rem; } }

/* Account settings: Home facility "Saved" note (org.js) */
.hf-head { display: flex; align-items: baseline; justify-content: space-between; gap: .75rem; flex-wrap: wrap; }
.hf-saved { font-size: .85rem; font-weight: 650; color: var(--green); opacity: 0; transition: opacity .25s; }
.hf-saved.on { opacity: 1; }
.hf-saved[data-kind="warn"] { color: var(--rose); }

/* Supabase (db.js / login.js): save status, warnings, login messages */
.db-status {
  position: fixed; right: 1rem; bottom: 1rem; z-index: 60; max-width: min(420px, calc(100vw - 2rem));
  background: var(--bg-card); color: var(--text); border: 1px solid var(--border); border-radius: 12px;
  padding: .55rem .8rem; font-size: .85rem; box-shadow: 0 10px 30px rgba(0,0,0,.35);
  opacity: 0; transform: translateY(8px); transition: opacity .25s, transform .25s; pointer-events: none;
}
.db-status.on { opacity: 1; transform: none; pointer-events: auto; }
.db-status[data-state="saved"] { color: var(--green); }
.db-status[data-state="offline"], .db-status[data-state="error"] { border-color: rgba(251,191,36,.55); color: #fcd34d; }
.db-retry { margin-left: .4rem; background: none; border: 1px solid currentColor; color: inherit; border-radius: 8px; padding: .1rem .5rem; font: inherit; font-size: .8rem; cursor: pointer; }
.banner.db-warn { border-color: rgba(251,191,36,.5); background: rgba(251,191,36,.1); }
.auth-msg { margin: .25rem 0 0; font-size: .9rem; }
.auth-msg[data-kind="ok"] { color: var(--green); }
.auth-msg[data-kind="warn"] { color: #fca5a5; }
main > .auth-msg { margin: 0 0 1rem; padding: .7rem 1rem; border: 1px solid var(--border); border-radius: 12px; }
.auth-signed { max-width: 560px; margin-bottom: 1rem; }
.btn.is-busy { opacity: .65; cursor: progress; }
.fp-del.fp-del-off { opacity: .35; cursor: not-allowed; }
.fp-del.fp-del-off:hover { border-color: transparent; color: var(--muted); }
html[data-theme="light"] .db-status { background: #fff; color: #0f172a; }
html[data-theme="light"] .db-status[data-state="offline"], html[data-theme="light"] .db-status[data-state="error"] { color: #92400e; }
html[data-theme="light"] .auth-msg[data-kind="warn"] { color: #b91c1c; }

/* Home page: real published tournaments (home.js) */
.home-card { display: block; color: inherit; text-decoration: none; }
.home-card .card-media { height: 96px; }
.card-media.home-media-live { background-image: linear-gradient(135deg, rgba(251,113,133,.38), rgba(26,159,255,.28)), url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80' viewBox='0 0 80 80'%3E%3Cpath fill='none' stroke='rgba(255,255,255,.12)' stroke-width='2' d='M10 40h60M40 10v60'/%3E%3Ccircle cx='40' cy='40' r='18' fill='none' stroke='rgba(255,255,255,.15)' stroke-width='2'/%3E%3C/svg%3E"); }
.card-media.home-media-upcoming { background-image: linear-gradient(135deg, rgba(167,139,250,.4), rgba(251,191,36,.25)), url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80' viewBox='0 0 80 80'%3E%3Cpath fill='none' stroke='rgba(255,255,255,.12)' stroke-width='2' d='M10 40h60M40 10v60'/%3E%3Ccircle cx='40' cy='40' r='18' fill='none' stroke='rgba(255,255,255,.15)' stroke-width='2'/%3E%3C/svg%3E"); }
.card-media.home-media-complete { background-image: linear-gradient(135deg, rgba(52,211,153,.35), rgba(26,159,255,.3)), url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80' viewBox='0 0 80 80'%3E%3Cpath fill='none' stroke='rgba(255,255,255,.12)' stroke-width='2' d='M10 40h60M40 10v60'/%3E%3Ccircle cx='40' cy='40' r='18' fill='none' stroke='rgba(255,255,255,.15)' stroke-width='2'/%3E%3C/svg%3E"); }
.home-card h3, .home-hero-title { overflow-wrap: anywhere; }
.home-card .meta + .meta { margin-top: .15rem; }
.home-champ { margin-top: .55rem; color: var(--text); }
.home-host { display: flex; align-items: center; gap: .5rem; margin-top: .8rem; padding-top: .7rem; border-top: 1px solid var(--border); color: var(--muted); font-size: .85rem; min-width: 0; }
.home-host span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.home-host-img { width: 26px; height: 26px; border-radius: 7px; object-fit: cover; flex: none; background: rgba(255,255,255,.08); border: 1px solid var(--border); }
.home-hero-title { margin: .6rem 0 .35rem; font-size: 1.17rem; }
.hero-card > .home-hero-title:first-child { margin-top: 0; }
.home-tight { margin: .1rem 0; }
.home-small { margin-top: .6rem; font-size: .85rem; }
.home-small a, .home-message a { color: var(--accent); }
.home-hero-btn { margin-top: 1rem; }
.home-hero-btn .btn { width: 100%; text-align: center; display: inline-block; box-sizing: border-box; }
.home-message { max-width: 640px; }
.home-message h3 { margin: 0 0 .35rem; font-size: 1.1rem; }
.home-message p { margin: 0; }
.home-msg-btn { margin-top: .9rem; }
.home-more { margin-top: 1rem; text-align: center; }
.home-loading { display: flex; align-items: center; gap: .6rem; color: var(--muted); padding: .4rem 0; }
.home-spinner { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--border); border-top-color: var(--accent); animation: homeSpin .8s linear infinite; flex: none; }
@keyframes homeSpin { to { transform: rotate(360deg); } }
.home-skeleton .card-media { height: 96px; opacity: .45; }
.home-skeleton .card-body span { display: block; height: .8rem; border-radius: 6px; background: rgba(148,163,184,.18); margin: .55rem 0; animation: homePulse 1.2s ease-in-out infinite; }
.home-skeleton .card-body span:nth-child(1) { width: 30%; } .home-skeleton .card-body span:nth-child(2) { width: 75%; height: 1.05rem; } .home-skeleton .card-body span:nth-child(3) { width: 55%; }
.home-skeleton:hover { transform: none; border-color: var(--border); }
@keyframes homePulse { 50% { opacity: .45; } }
@media (prefers-reduced-motion: reduce) { .home-spinner, .home-skeleton .card-body span { animation: none; } }
html[data-theme="light"] .stat { background: rgba(15,40,80,.06); }
html[data-theme="light"] .home-host-img { background: #f1f5f9; }
#past[hidden], #home-featured-link[hidden] { display: none !important; }
html[data-theme="light"] .btn.soft { color: var(--accent-2); background: rgba(26,159,255,.12); }
html[data-theme="light"] .eyebrow { color: #6d28d9; }

/* Find Player: edit a shared player inline */
.fp-edit { background: none; border: 1px solid transparent; color: var(--muted); font-size: 1rem; line-height: 1; width: 1.8rem; height: 1.8rem; border-radius: 8px; cursor: pointer; padding: 0; }
.fp-edit:hover, .fp-edit:focus-visible { border-color: var(--border); color: var(--accent); }
@media (min-width: 561px) { .fp-head span:nth-child(4), .fp-act { width: 15rem; } }
.fp-row.fp-editing { display: block; padding: .6rem .75rem .7rem; background: rgba(26,159,255,.06); }
.fp-eform { display: flex; flex-wrap: wrap; align-items: flex-end; gap: .5rem .6rem; }
.fp-ef { display: grid; gap: .2rem; font-size: .72rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.fp-ef-name { flex: 1 1 14rem; min-width: 0; }
.fp-ef-id { flex: 0 1 9rem; }
.fp-ef input { font: inherit; font-size: .92rem; font-weight: 500; letter-spacing: normal; text-transform: none; color: var(--text); background: rgba(0,0,0,.25); border: 1px solid var(--border); border-radius: 9px; padding: .45rem .6rem; width: 100%; box-sizing: border-box; }
.fp-ef-id input { font-family: ui-monospace, Consolas, monospace; text-transform: uppercase; }
.fp-ef input:focus { outline: 2px solid var(--accent); outline-offset: 0; }
.fp-ef input.bad { border-color: var(--rose); }
.fp-ebtns { display: flex; gap: .4rem; }
.fp-eerr { margin: .45rem 0 0; color: #fca5a5; font-size: .85rem; }
.fp-eerr[hidden] { display: none; }
.modal .fp-enote { margin: .4rem 0 0; font-size: .8rem; }
html[data-theme="light"] .fp-ef input { background: #fff; }
html[data-theme="light"] .fp-eerr, html[data-theme="light"] .modal .fp-msg[data-kind="warn"] { color: #b91c1c; }
html[data-theme="light"] .fp-row.fp-editing { background: rgba(26,159,255,.07); }
@media (max-width: 640px) { .fp-ef-name, .fp-ef-id { flex: 1 1 100%; } .fp-ebtns { width: 100%; } .fp-ebtns .btn { flex: 1; } }
.fp-edit, .fp-del { display: inline-flex; align-items: center; justify-content: center; vertical-align: middle; }

/* ===== Organizer profiles (orgprofile-1): home search, host links, host.html ===== */
/* Home cards: the title link stretches over the whole card; "Hosted by" is its own link on top (no nested links). */
.home-card { position: relative; }
.home-card-link { color: inherit; text-decoration: none; }
.home-card-link::after { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.home-card-link:focus-visible { outline: none; }
.home-card:focus-within { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(26,159,255,.35); }
a.home-host { position: relative; z-index: 2; text-decoration: none; border-radius: 8px; transition: color .15s ease; }
a.home-host:hover span, a.home-host:focus-visible span { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
a.home-host:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.hero-card a.home-host { display: flex; }

/* Home search */
.home-search { position: relative; margin: 0 0 .9rem; max-width: 640px; }
.home-search-icon { position: absolute; left: .85rem; top: 50%; transform: translateY(-52%); color: var(--muted); font-size: 1.15rem; pointer-events: none; }
.home-q { width: 100%; box-sizing: border-box; font: inherit; font-size: 1rem; color: var(--text); background: var(--bg-card); border: 1px solid var(--border); border-radius: 999px; padding: .7rem 2.8rem .7rem 2.4rem; -webkit-appearance: none; appearance: none; }
.home-q::placeholder { color: var(--muted); opacity: .9; }
.home-q:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(26,159,255,.25); }
.home-q::-webkit-search-cancel-button { -webkit-appearance: none; display: none; }
button.home-q-clear { position: absolute; right: .4rem; top: 50%; transform: translateY(-50%); width: 2rem; height: 2rem; padding: 0; border-radius: 50%; background: rgba(148,163,184,.16); color: var(--text); font-size: 1.15rem; line-height: 1; display: inline-flex; align-items: center; justify-content: center; font-weight: 600; }
button.home-q-clear:hover { transform: translateY(-50%); background: rgba(148,163,184,.28); filter: none; }
button.home-q-clear:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.home-q-clear[hidden] { display: none; }
.home-q-count { margin: -.35rem 0 .8rem; font-size: .88rem; }
.home-q-count[hidden] { display: none; }
.home-orgs { margin: 0 0 1.1rem; }
.home-orgs-title { margin: 0 0 .5rem; font-size: .78rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.home-org-row { display: flex; flex-wrap: wrap; gap: .55rem; }
.home-org { display: inline-flex; align-items: center; gap: .55rem; max-width: 100%; padding: .4rem .85rem .4rem .45rem; border: 1px solid var(--border); border-radius: 999px; background: var(--bg-card); color: var(--text); text-decoration: none; transition: border-color .15s ease, transform .15s ease; }
.home-org:hover, .home-org:focus-visible { border-color: var(--accent); transform: translateY(-1px); outline: none; }
.home-org img, .home-org-ph { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; flex: none; border: 1px solid var(--border); background: rgba(255,255,255,.08); }
.home-org-ph { display: inline-flex; align-items: center; justify-content: center; font-weight: 750; color: var(--accent); background: rgba(26,159,255,.14); }
.home-org-txt { display: flex; flex-direction: column; min-width: 0; line-height: 1.15; }
.home-org-txt b { font-size: .92rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.home-org-txt small { font-size: .75rem; color: var(--muted); }
.home-message a.btn { color: #0b0f1a; }
.home-message a.btn.ghost { color: var(--text); }

/* Tournament page: "Hosted by" links to the organizer profile */
a.hosted-by { color: inherit; text-decoration: none; width: fit-content; max-width: 100%; border-radius: 12px; }
a.hosted-by[href] { cursor: pointer; }
a.hosted-by[href] .hosted-name::after { content: " ›"; color: var(--muted); font-weight: 600; }
a.hosted-by[href]:hover .hosted-name, a.hosted-by[href]:focus-visible .hosted-name { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
a.hosted-by:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
a.hosted-by[hidden] { display: none; }

/* Dashboard header buttons */
.desk-head-actions { display: flex; flex-wrap: wrap; gap: .6rem; }
@media (max-width: 560px) { .desk-head-actions { width: 100%; } .desk-head-actions .btn { flex: 1 1 auto; text-align: center; } }

/* host.html: public organizer profile */
.host-main { padding-top: 1.8rem; padding-bottom: 2.5rem; }
.host-loading { padding: 2rem 0; }
.host-head { display: flex; align-items: center; gap: 1.4rem; padding: 1.4rem 1.5rem; margin-bottom: 1.2rem; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.host-photo { width: 112px; height: 112px; border-radius: 22px; object-fit: contain; background: #fff; border: 1px solid var(--border); flex: none; }
.host-photo-ph { display: flex; align-items: center; justify-content: center; font-size: 2.8rem; font-weight: 800; color: var(--accent); background: rgba(26,159,255,.14); }
.host-id { min-width: 0; }
.host-id .eyebrow { margin-bottom: .55rem; }
.host-name { margin: 0 0 .3rem; font-size: clamp(1.5rem, 3.2vw, 2.2rem); line-height: 1.12; overflow-wrap: anywhere; }
.host-id .meta { margin: .1rem 0; }
.host-count { font-weight: 600; }
.host-own { display: flex; flex-wrap: wrap; gap: .35rem .6rem; align-items: center; }
.host-own a { color: var(--accent); font-weight: 650; text-decoration: underline; text-underline-offset: 2px; }
.host-group { margin: 1.6rem 0 0; }
.host-group .section-title { margin-bottom: .75rem; }
.host-group h2 { font-size: 1.3rem; display: flex; align-items: center; gap: .5rem; }
.host-n { font-size: .8rem; font-weight: 700; padding: .1rem .5rem; border-radius: 999px; background: rgba(26,159,255,.16); color: var(--accent); }
.host-empty { max-width: none; }
.host-empty .card-body { padding: .9rem 1.1rem; }
.host-empty:hover { transform: none; border-color: var(--border); }
.host-notfound { padding: 2.5rem 0; display: flex; justify-content: center; }
.host-notfound .home-message { width: 100%; }
html[data-theme="light"] .banner.host-own { color: #1e3a8a; }
html[data-theme="light"] .home-org-ph, html[data-theme="light"] .host-photo-ph { color: var(--accent-2); }
html[data-theme="light"] .host-n { color: var(--accent-2); }
@media (max-width: 560px) {
  .host-head { flex-direction: column; align-items: flex-start; gap: 1rem; padding: 1.1rem; }
  .host-photo { width: 88px; height: 88px; border-radius: 18px; }
  .home-search { max-width: none; }
  .home-q { font-size: 16px; } /* no iOS zoom on focus */
}
section.host-group { padding: 0; }
.host-group .card-grid { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }

/* host.html: total cash paid out (payouts-1) */
.host-stat { margin-left: auto; flex: none; display: flex; flex-direction: column; align-items: flex-end; text-align: right; gap: .1rem; padding: .85rem 1.1rem; border-radius: 14px; background: rgba(52,211,153,.1); border: 1px solid rgba(52,211,153,.3); min-width: 12rem; }
.host-stat-amt { font-size: clamp(1.6rem, 3vw, 2.1rem); line-height: 1.05; font-weight: 800; color: var(--green); font-variant-numeric: tabular-nums; }
.host-stat-lbl { font-size: .85rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--text); }
.host-stat-sub { font-size: .82rem; color: var(--muted); }
html[data-theme="light"] .host-stat { background: rgba(5,150,105,.08); border-color: rgba(5,150,105,.3); }
html[data-theme="light"] .host-stat-amt { color: #047857; }
@media (max-width: 720px) {
  .host-head { flex-wrap: wrap; }
  .host-stat { margin-left: 0; width: 100%; align-items: flex-start; text-align: left; flex-direction: row; flex-wrap: wrap; align-items: baseline; gap: .15rem .55rem; }
  .host-stat-sub { flex-basis: 100%; }
}

/* Manage page: roster name typeahead (typeahead-1) */
.rp-ta { position: absolute; z-index: 60; max-height: min(22rem, 60vh); overflow-y: auto; background: var(--bg-elev); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow); padding: .3rem; font-size: .92rem; -webkit-overflow-scrolling: touch; }
.rp-ta[hidden] { display: none; }
.rp-ta-opt { display: flex; align-items: center; gap: .55rem; padding: .55rem .65rem; border-radius: 9px; cursor: pointer; min-height: 2.5rem; color: var(--text); }
.rp-ta-opt:hover, .rp-ta-opt.active { background: rgba(26,159,255,.16); }
.rp-ta-opt.active { box-shadow: inset 0 0 0 1px rgba(26,159,255,.55); }
.rp-ta-name { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rp-ta-name b { color: var(--accent); font-weight: 700; }
.rp-ta-id { flex: none; font-family: ui-monospace, Consolas, monospace; font-size: .8rem; color: var(--muted); }
.rp-ta-id.none { font-family: var(--font); font-style: italic; opacity: .8; }
.rp-ta-opt.taken { cursor: not-allowed; opacity: .55; }
.rp-ta-opt.taken:hover { background: none; }
.rp-ta-opt.taken .rp-ta-name b { color: inherit; }
.rp-ta-in { flex: none; background: rgba(148,163,255,.14); color: var(--muted); font-size: .7rem; padding: .15rem .5rem; white-space: nowrap; }
.rp-ta-note { padding: .6rem .65rem; color: var(--muted); }
.rp-ta-hint { padding: .45rem .65rem .3rem; margin-top: .2rem; border-top: 1px solid var(--border); color: var(--muted); font-size: .75rem; }
html[data-theme="light"] .rp-ta { background: #fff; }
html[data-theme="light"] .rp-ta-opt:hover, html[data-theme="light"] .rp-ta-opt.active { background: rgba(26,159,255,.1); }
html[data-theme="light"] .rp-ta-name b { color: var(--accent-2); }
@media (max-width: 560px) {
  .rp-ta { font-size: .95rem; }
  .rp-ta-opt { min-height: 2.9rem; flex-wrap: wrap; row-gap: .15rem; }
  .rp-ta-name { flex-basis: 60%; }
  .rp-ta-in { order: 3; }
}
.rp-ta-opt { flex-wrap: wrap; row-gap: .2rem; }
.rp-ta-name { flex: 1 1 9rem; }
.rp-ta-opt.taken .rp-ta-in { order: 3; }
.rp-ta-opt.taken .rp-ta-id { order: 2; }

/* ---------- Public tournament page: hero photo, payouts, stream previews, live tabs (publicview-1) ---------- */
.tour-hero { align-items: start; }
.tour-info { position: relative; overflow: hidden; }
.tour-info-inner { position: relative; z-index: 1; }
/* Organizer's background photo + dark overlay. Same dark look in both themes so the text always reads. */
.tour-info.has-cover {
  --text: #f8fafc; --muted: #d0d8ea; --border: rgba(255,255,255,.2);
  color: var(--text); border-color: rgba(255,255,255,.14);
  background:
    linear-gradient(180deg, rgba(6,10,22,.6) 0%, rgba(6,10,22,.78) 50%, rgba(6,10,22,.9) 100%),
    var(--cover) center / cover no-repeat,
    #0b0f1a;
}
.tour-info.has-cover h1 { text-shadow: 0 2px 18px rgba(0,0,0,.6); }
.tour-info.has-cover .meta, .tour-info.has-cover .info-item div { text-shadow: 0 1px 8px rgba(0,0,0,.45); }
.tour-info.has-cover .fee, .tour-info.has-cover .payout { background-color: rgba(0,0,0,.42); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.tour-info.has-cover .pill { background: rgba(26,159,255,.3); color: #e0f2ff; }
.fee-box[hidden], .payout-row[hidden] { display: none; }

/* Payouts row: trophy + amount per place */
.payout-row { margin-top: 1.1rem; }
.payout-label { font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: .45rem; }
.payout-list { display: flex; flex-wrap: wrap; gap: .6rem; }
.payout {
  display: flex; align-items: center; gap: .7rem; min-width: 150px;
  padding: .55rem 1rem .55rem .6rem; border-radius: 14px; border: 1px solid var(--border); background: rgba(0,0,0,.22);
}
.payout.p1 { border-color: rgba(251,191,36,.6); background-image: linear-gradient(135deg, rgba(251,191,36,.2), transparent 70%); }
.payout.p2 { border-color: rgba(203,213,225,.55); background-image: linear-gradient(135deg, rgba(203,213,225,.16), transparent 70%); }
.payout.p3 { border-color: rgba(205,127,50,.6); background-image: linear-gradient(135deg, rgba(205,127,50,.2), transparent 70%); }
.payout-txt strong { display: block; font-size: 1.28rem; line-height: 1.1; font-variant-numeric: tabular-nums; }
.payout-txt small { color: var(--muted); font-size: .78rem; font-weight: 600; }
html[data-theme="light"] .tour-info:not(.has-cover) .payout { background-color: #fff; }
html[data-theme="light"] .tour-info:not(.has-cover) .fee { background: #f8fafc; }

/* Stream previews (right of the info card) */
.stream-previews { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .65rem; align-content: start; }
.stream-previews.sp-n1 > *, .stream-previews.sp-n2 > *, .stream-previews.sp-n3 > :first-child, .stream-previews.sp-n0 > * { grid-column: 1 / -1; }
.sp-tile { background: #05070f; border: 1px solid var(--border); border-radius: 14px; overflow: hidden; display: flex; flex-direction: column; min-width: 0; box-shadow: var(--shadow); }
.sp-screen { position: relative; aspect-ratio: 16 / 9; background: #0a0f1d; }
.sp-screen iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.sp-card {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .5rem;
  color: #fff; text-decoration: none; background: #111827 center / cover no-repeat;
}
.sp-card.sp-youtube { background-color: #2a0b10; }
.sp-card.sp-twitch { background-image: linear-gradient(135deg, #3b1d7a, #12082b); }
.sp-card.sp-facebook { background-image: linear-gradient(135deg, #0f3d91, #071a40); }
.sp-card.sp-link { background-image: linear-gradient(135deg, #1e293b, #0b1220); }
.sp-card::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.1), rgba(0,0,0,.55)); }
.sp-card > * { position: relative; }
.sp-play { width: 3.1rem; height: 3.1rem; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.92); color: #0b0f1a; box-shadow: 0 6px 24px rgba(0,0,0,.45); transition: transform .15s ease; }
.sp-youtube .sp-play { background: #ff0033; color: #fff; }
.sp-twitch .sp-play { background: #9146ff; color: #fff; }
.sp-facebook .sp-play { background: #1877f2; color: #fff; }
.sp-card:hover .sp-play, .sp-card:focus-visible .sp-play { transform: scale(1.08); }
.sp-card:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.sp-watch { font-size: .8rem; font-weight: 700; text-shadow: 0 1px 6px rgba(0,0,0,.7); }
.sp-meta { display: flex; justify-content: space-between; align-items: center; gap: .5rem; padding: .45rem .7rem; font-size: .85rem; color: #e5e9f5; }
.sp-court { font-weight: 700; display: inline-flex; align-items: center; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sp-open { color: #93c5fd; font-size: .8rem; font-weight: 600; white-space: nowrap; }
.sp-open:hover { text-decoration: underline; }
.stream-previews.sp-n3 .sp-tile:not(:first-child) .sp-play { width: 2.4rem; height: 2.4rem; }
.stream-previews.sp-n3 .sp-tile:not(:first-child) .sp-watch { font-size: .72rem; }
.sp-empty {
  border: 1px dashed var(--border); border-radius: 14px; padding: 1.6rem 1.2rem; background: var(--bg-card);
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: .4rem; color: var(--muted);
}
.sp-empty strong { color: var(--text); font-size: 1rem; }
.sp-empty .meta { max-width: 300px; font-size: .85rem; }
.sp-empty-icon { width: 3.2rem; height: 3.2rem; border-radius: 50%; display: grid; place-items: center; background: rgba(26,159,255,.12); color: var(--accent); margin-bottom: .2rem; }
@media (max-width: 600px) {
  .stream-previews { grid-template-columns: 1fr; }
  .stream-previews > * { grid-column: 1 / -1 !important; }
  .stream-previews.sp-n3 .sp-tile:not(:first-child) .sp-play { width: 3.1rem; height: 3.1rem; }
  .sp-empty { padding: 1.1rem 1rem; }
}

/* Tab "Pools and Playoff Bracket" */
.pp-live { display: inline-flex; align-items: center; margin-left: .4rem; font-size: .78rem; font-weight: 700; color: var(--rose); white-space: nowrap; }
.pp-live .dot { width: 7px; height: 7px; animation: pp-pulse 1.6s ease-in-out infinite; }
@keyframes pp-pulse { 50% { opacity: .3; } }
@media (prefers-reduced-motion: reduce) { .pp-live .dot { animation: none; } }
.pp-state { text-align: center; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 2rem 1.25rem; margin: .25rem 0 1.25rem; }
.pp-state h2 { margin: .35rem 0 .3rem; font-size: clamp(1.3rem, 2.6vw, 1.75rem); }
.pp-state-icon { font-size: 2.3rem; line-height: 1; }
.pp-wait { background: linear-gradient(135deg, rgba(26,159,255,.14), rgba(167,139,250,.1)), var(--bg-card); }
.pp-body { padding: .75rem 1rem 1rem; }
.pp-champ {
  display: flex; align-items: center; gap: .85rem; width: fit-content; max-width: 100%; margin: 0 0 1rem;
  padding: .85rem 1.2rem; border-radius: 14px; border: 1px solid rgba(251,191,36,.6);
  background: linear-gradient(135deg, rgba(251,191,36,.22), rgba(251,191,36,.04)); box-shadow: 0 0 28px rgba(251,191,36,.15);
}
.pp-champ-cup { font-size: 2.1rem; line-height: 1; }
.pp-champ small { display: block; text-transform: uppercase; letter-spacing: .08em; font-size: .72rem; font-weight: 800; color: var(--amber); }
.pp-champ strong { font-size: 1.3rem; overflow-wrap: anywhere; }
.pp-bracket.is-done .sc-podium { border-color: rgba(251,191,36,.85); background: linear-gradient(180deg, rgba(251,191,36,.24), rgba(251,191,36,.05)); box-shadow: 0 0 30px rgba(251,191,36,.25); }
.pp-bracket.is-done .sc-champ-name { color: var(--amber); font-size: 1.2rem; }
.pp-adv { max-width: 520px; margin: 1.1rem auto 0; text-align: left; }
.pp-adv h3 { font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 0 0 .45rem; }
.pp-adv-list { margin: 0; padding-left: 1.4rem; display: grid; gap: .3rem; }
.pp-table th.num, .pp-table td.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pp-champ-row td { color: var(--amber); font-weight: 750; }
html[data-theme="light"] .pp-champ small, html[data-theme="light"] .pp-champ-row td, html[data-theme="light"] .pp-bracket.is-done .sc-champ-name { color: #b45309; }
html[data-theme="light"] .sc-seed { color: #3446a8; background: rgba(52,70,168,.1); }
html[data-theme="light"] .sc-ptag { color: #047857; background: rgba(4,120,87,.1); }
html[data-theme="light"] .gen-court { color: #0b5cad; background: rgba(26,159,255,.12); }

/* Players tab */
.pl-person { white-space: nowrap; }
.pl-dupr { display: inline-block; margin-left: .15rem; padding: .05rem .4rem; border-radius: 6px; font-size: .75rem; font-weight: 700; font-variant-numeric: tabular-nums; background: rgba(26,159,255,.14); color: #7cc4ff; }
.pl-sep { color: var(--muted); }
.pl-pool { font-weight: 700; }
.pl-avgcell { text-align: right; white-space: nowrap; }
.pl-avg { font-weight: 800; font-variant-numeric: tabular-nums; }
html[data-theme="light"] .pl-dupr { color: var(--accent-2); }
@media (max-width: 560px) { .pl-person { white-space: normal; } .pl-table td, .pl-table th { padding: .55rem .5rem; } }

/* Manage page: stream court + background photo */
.stream-row { display: grid; grid-template-columns: minmax(0, 1fr) 200px; gap: .75rem; align-items: end; }
@media (max-width: 640px) { .stream-row { grid-template-columns: 1fr; gap: .5rem; } }
.cover-field .meta { margin: 0 0 .55rem; font-size: .85rem; }
.cover-box { display: grid; gap: .6rem; }
.cover-preview {
  position: relative; overflow: hidden; max-width: 640px; aspect-ratio: 16 / 6; border-radius: 12px;
  border: 1px dashed var(--border); background: rgba(255,255,255,.02) center / cover no-repeat; display: grid; place-items: center; color: var(--muted);
}
.cover-preview.has-cover { border-style: solid; }
.cover-preview.has-cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(6,10,22,.3), rgba(6,10,22,.6)); }
.cover-empty[hidden] { display: none; }
.cover-actions { margin: 0; }
.cover-actions [hidden] { display: none; }
.cover-msg { margin: 0; font-size: .88rem; }
.cover-msg.ok { color: var(--green); font-weight: 600; }
.cover-msg.warn { color: var(--rose); font-weight: 600; }

/* ---------- Sponsors round (sponsors-1): payout trophies, YouTube subscribe, promo box, Event Sponsors, card photos/prizes ---------- */
.apb-trophy { display: block; flex: none; filter: drop-shadow(0 2px 4px rgba(0,0,0,.35)); }
.payout .trophy { display: grid; place-items: center; width: 2.6rem; height: 2.6rem; flex: none; }
html[data-theme="light"] .tour-info:not(.has-cover) .apb-trophy { filter: drop-shadow(0 2px 3px rgba(15,40,80,.22)); }

/* Right column of the hero: stream previews + promo box filling the remaining height */
.tour-side { display: flex; flex-direction: column; gap: .65rem; min-width: 0; align-self: stretch; }
.tour-side > .stream-previews { flex: none; }
.promo-box[hidden] { display: none; }
.promo-box {
  position: relative; overflow: hidden; flex: 1 1 auto; min-height: 104px;
  display: flex; flex-direction: column; justify-content: center; gap: .55rem; padding: 1.1rem 1.25rem;
  border-radius: 14px; border: 1px solid rgba(26,159,255,.45); color: #f8fafc;
  background: radial-gradient(120% 140% at 0% 0%, rgba(26,159,255,.55), transparent 60%), radial-gradient(120% 140% at 100% 100%, rgba(167,139,250,.5), transparent 60%), linear-gradient(135deg, #0d2350, #1b1446);
  box-shadow: var(--shadow); transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.promo-box:hover { transform: translateY(-2px); border-color: rgba(125,200,255,.8); box-shadow: 0 18px 50px rgba(26,159,255,.25); }
.promo-box:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.promo-glow { position: absolute; width: 180px; height: 180px; right: -50px; top: -70px; border-radius: 50%; background: radial-gradient(circle, rgba(255,255,255,.22), transparent 70%); pointer-events: none; }
.promo-txt { position: relative; font-size: clamp(1.15rem, 2.1vw, 1.45rem); font-weight: 800; line-height: 1.2; letter-spacing: -.01em; overflow-wrap: anywhere; text-shadow: 0 2px 14px rgba(0,0,0,.35); }
.promo-go { position: relative; display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
.promo-host { font-size: .82rem; font-weight: 600; color: #cfe3ff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.promo-arrow { flex: none; width: 2.2rem; height: 2.2rem; border-radius: 50%; display: grid; place-items: center; background: #fff; color: #0d2350; box-shadow: 0 6px 18px rgba(0,0,0,.3); transition: transform .15s ease; }
.promo-box:hover .promo-arrow { transform: translate(2px, -2px); }
html[data-theme="light"] .promo-box {
  color: #0b1b3a; border-color: rgba(11,111,212,.35);
  background: radial-gradient(120% 140% at 0% 0%, rgba(26,159,255,.28), transparent 60%), radial-gradient(120% 140% at 100% 100%, rgba(167,139,250,.28), transparent 60%), linear-gradient(135deg, #eef6ff, #f3efff);
}
html[data-theme="light"] .promo-txt { text-shadow: none; }
html[data-theme="light"] .promo-host { color: #0b5cad; }
html[data-theme="light"] .promo-arrow { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; }
@media (max-width: 900px) { .promo-box { min-height: 92px; } }

/* YouTube Subscribe on stream previews */
.sp-meta { flex-wrap: wrap; row-gap: .3rem; }
.sp-actions { display: inline-flex; align-items: center; gap: .55rem; margin-left: auto; }
.sp-sub {
  display: inline-flex; align-items: center; gap: .3rem; padding: .2rem .6rem .2rem .45rem; border-radius: 999px;
  background: #ff0033; color: #fff; font-size: .76rem; font-weight: 800; line-height: 1.3; white-space: nowrap; transition: filter .15s ease, transform .15s ease;
}
.sp-sub:hover { filter: brightness(1.1); transform: translateY(-1px); }
.sp-sub:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.sp-sub-slot:empty { display: none; }

/* Event Sponsors (bottom of the public page) */
.sponsors-sec[hidden] { display: none; }
.sponsors-sec { margin: 2.2rem 0 1rem; padding-top: 1.4rem; border-top: 1px solid var(--border); }
.sponsors-sec .section-title { justify-content: center; text-align: center; }
.sponsor-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 220px)); justify-content: center; gap: 1rem; }
.sponsor-grid.sg-n1 { grid-template-columns: minmax(0, 260px); }
.sponsor-grid.sg-n2 { grid-template-columns: repeat(2, minmax(0, 240px)); }
.sponsor-grid.sg-n3 { grid-template-columns: repeat(3, minmax(0, 230px)); }
.sponsor-tile { display: flex; flex-direction: column; align-items: center; gap: .5rem; min-width: 0; color: var(--text); text-align: center; }
.sponsor-logo {
  width: 100%; aspect-ratio: 3 / 2; display: grid; place-items: center; padding: .9rem; border-radius: 14px;
  background: #f8fafc; border: 1px solid var(--border); box-shadow: 0 8px 24px rgba(0,0,0,.25); transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.sponsor-logo img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }
a.sponsor-tile:hover .sponsor-logo { transform: translateY(-3px); border-color: rgba(26,159,255,.6); box-shadow: 0 12px 30px rgba(26,159,255,.22); }
a.sponsor-tile:focus-visible { outline: none; }
a.sponsor-tile:focus-visible .sponsor-logo { outline: 3px solid var(--accent); outline-offset: 2px; }
.sponsor-name { font-size: .88rem; font-weight: 650; color: var(--muted); overflow-wrap: anywhere; }
a.sponsor-tile:hover .sponsor-name { color: var(--text); }
html[data-theme="light"] .sponsor-logo { background: #fff; box-shadow: 0 8px 22px rgba(15,40,80,.08); }
@media (max-width: 700px) { .sponsor-grid, .sponsor-grid.sg-n3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .sponsor-grid.sg-n1 { grid-template-columns: minmax(0, 240px); } }

/* Home / host cards: tournament photo + prize trophies */
.card-media.has-photo { background: #0b0f1a; position: relative; overflow: hidden; }
.card-media.has-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card-media.has-photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgba(0,0,0,.25)); pointer-events: none; }
.card-prizes { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .6rem; margin-top: .7rem; }
.card-prize { display: inline-flex; align-items: center; gap: .2rem; font-size: .9rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.card-prize b { font-weight: 800; }
.card-prize small { color: var(--muted); font-weight: 600; font-size: .78rem; margin-left: .1rem; }
.card-prize .apb-trophy { filter: drop-shadow(0 1px 2px rgba(0,0,0,.35)); }
html[data-theme="light"] .card-prize .apb-trophy { filter: drop-shadow(0 1px 1.5px rgba(15,40,80,.25)); }
.home-champ { display: flex; align-items: center; gap: .4rem; overflow-wrap: anywhere; }
.home-champ-ic { flex: none; display: inline-flex; }

/* Manage page: promo link fields + Event Sponsors */
.promo-fields { margin-top: .4rem; padding-top: .9rem; border-top: 1px dashed var(--border); display: grid; gap: .55rem; }
.promo-fields h4 { margin: 0; font-size: 1rem; }
.promo-fields > .meta { margin: 0; font-size: .85rem; }
.count-wrap { position: relative; }
.count-wrap input { padding-right: 3.6rem; }
.char-count { position: absolute; right: .7rem; top: 50%; transform: translateY(-50%); font-size: .78rem; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; pointer-events: none; }
.char-count.full { color: var(--amber); }
html[data-theme="light"] .char-count.full { color: #b45309; }
.field input.invalid { border-color: var(--rose); box-shadow: 0 0 0 3px rgba(251,113,133,.18); }
.field-msg { margin: 0; font-size: .86rem; }
.field-msg[hidden] { display: none; }
.field-msg.warn { color: var(--rose); font-weight: 600; }
html[data-theme="light"] .field-msg.warn, html[data-theme="light"] .cover-msg.warn { color: #be123c; }
.sponsor-list { display: grid; gap: .65rem; margin: .3rem 0 .8rem; }
.sponsor-none { margin: 0; }
.sponsor-row {
  display: grid; grid-template-columns: 120px minmax(0, 1fr) auto; gap: .85rem; align-items: center;
  padding: .7rem; border: 1px solid var(--border); border-radius: 12px; background: rgba(255,255,255,.02);
}
.sponsor-thumb { width: 120px; aspect-ratio: 3 / 2; border-radius: 10px; background: #f8fafc; border: 1px solid var(--border); display: grid; place-items: center; padding: .4rem; }
.sponsor-thumb img { max-width: 100%; max-height: 100%; object-fit: contain; }
.sponsor-fields { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; min-width: 0; }
.sponsor-btns { display: flex; gap: .35rem; }
.btn.sm { padding: .42rem .7rem; font-size: .85rem; }
.btn.sm:disabled { opacity: .4; cursor: default; transform: none; }
.sponsor-actions { margin: 0; align-items: center; }
.sponsor-actions [hidden] { display: none; }
@media (max-width: 760px) {
  .sponsor-row { grid-template-columns: 96px minmax(0, 1fr); }
  .sponsor-thumb { width: 96px; }
  .sponsor-fields { grid-template-columns: 1fr; }
  .sponsor-btns { grid-column: 1 / -1; justify-content: flex-end; }
}

/* ---------- home2 round: readable hero text, promo link previews, home page refresh ---------- */
/* Tournament hero: description lines + Where/When/Ball… values bolder, brighter, with a subtle shadow */
.tour-info .tour-summary { font-weight: 600; line-height: 1.55; color: var(--text); opacity: .92; }
.tour-info .info-item div { font-weight: 700; font-size: 1.02rem; }
.tour-info .info-item label { font-weight: 700; }
.tour-info .info-item div .meta { font-weight: 600; }
.tour-info.has-cover {
  background:
    linear-gradient(180deg, rgba(6,10,22,.66) 0%, rgba(6,10,22,.82) 45%, rgba(6,10,22,.92) 100%),
    var(--cover) center / cover no-repeat,
    #0b0f1a;
}
.tour-info.has-cover .tour-summary { color: #f1f5ff; opacity: 1; font-weight: 700; text-shadow: 0 1px 2px rgba(0,0,0,.85), 0 2px 12px rgba(0,0,0,.6); }
.tour-info.has-cover .info-item div { color: #ffffff; text-shadow: 0 1px 2px rgba(0,0,0,.85), 0 2px 12px rgba(0,0,0,.55); }
.tour-info.has-cover .info-item div .meta { color: #dfe7f7; }
.tour-info.has-cover .info-item label { color: #c7d6f2; text-shadow: 0 1px 2px rgba(0,0,0,.8); }
.tour-info.has-cover .info-grid { padding: .85rem .95rem; border-radius: 14px; background: rgba(4,8,18,.38); border: 1px solid rgba(255,255,255,.08); }
html[data-theme="light"] .tour-info:not(.has-cover) .tour-summary { color: #1e293b; }
html[data-theme="light"] .tour-info:not(.has-cover) .info-item div { color: #0b1324; }
html[data-theme="light"] .tour-info:not(.has-cover) .info-item label { color: #475569; }

/* Promo box picture (organizer upload, else the linked page's og:image) behind a dark overlay; text stays on top.
   object-fit: contain on black so logos and wide banners are not cropped. */
.promo-box.has-shot { color: #fff; border-color: rgba(255,255,255,.22); background: #000; justify-content: flex-end; min-height: 150px; }
.promo-shot { position: absolute; inset: 0; pointer-events: none; background: #000; }
.promo-shot img { width: 100%; height: 100%; object-fit: contain; display: block; transition: transform .4s ease; }
.promo-box.has-shot:hover .promo-shot img { transform: scale(1.04); }
.promo-shade { position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(0,0,0,.12) 0%, rgba(0,0,0,.28) 55%, rgba(0,0,0,.78) 100%); }
.promo-title { position: relative; font-size: .74rem; font-weight: 700; letter-spacing: .02em; color: #dbe7ff; opacity: .9; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-shadow: 0 1px 3px rgba(0,0,0,.8); }
.promo-box.has-shot .promo-txt { font-weight: 900; text-shadow: 0 2px 4px rgba(0,0,0,.85), 0 4px 22px rgba(0,0,0,.7); }
.promo-box.has-shot .promo-host { color: #e2ecff; text-shadow: 0 1px 3px rgba(0,0,0,.8); }
html[data-theme="light"] .promo-box.has-shot { color: #fff; border-color: rgba(11,27,58,.25); background: #0b0f1a; }
html[data-theme="light"] .promo-box.has-shot .promo-txt { text-shadow: 0 2px 4px rgba(0,0,0,.85), 0 4px 22px rgba(0,0,0,.7); }
html[data-theme="light"] .promo-box.has-shot .promo-host { color: #e2ecff; }
@media (max-width: 900px) { .promo-box.has-shot { min-height: 140px; } }
/* Manage: choose / remove a custom promo picture */
.promo-pic-actions { max-width: 420px; }
/* Manage: preview of the promo box */
.promo-preview-wrap[hidden] { display: none; }
.promo-preview-wrap { display: grid; gap: .45rem; margin-top: .2rem; }
.promo-preview-head { max-width: 420px; display: flex; align-items: center; justify-content: space-between; gap: .6rem; }
.promo-preview-head .label { font-size: .78rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.promo-preview-head .btn { padding: .35rem .75rem; font-size: .8rem; }
.promo-preview { max-width: 420px; min-height: 120px; }
.promo-preview.has-shot { min-height: 150px; }
.promo-preview-wrap > .meta { margin: 0; font-size: .82rem; }

/* Home hero: search bar where the two buttons were, bigger and more prominent */
.home-search-hero { max-width: 560px; margin: 0 0 1.1rem; }
.home-search-hero .home-q { font-size: 1.05rem; padding: .95rem 3rem .95rem 2.85rem; border-width: 1.5px; box-shadow: 0 10px 30px rgba(0,0,0,.25); }
.home-search-hero .home-search-icon { left: 1.05rem; display: inline-flex; transform: translateY(-50%); }
.home-search-hero button.home-q-clear { right: .55rem; }
html[data-theme="light"] .home-search-hero .home-q { box-shadow: 0 8px 24px rgba(15,40,80,.1); background: #fff; }
.hero .home-search-hero + p.lead { margin-bottom: 0; font-size: 1.02rem; }

/* Home featured box: live carousel / next up (card style like the organizer profile cards) */
.hero-card.home-feat.has-slides { padding: 1rem; display: flex; flex-direction: column; gap: .7rem; min-width: 0; }
.home-feat-head { display: flex; align-items: center; justify-content: space-between; gap: .6rem; min-height: 2.1rem; }
.home-feat-h { margin: 0; font-size: 1.05rem; font-weight: 800; letter-spacing: .01em; display: inline-flex; align-items: center; gap: .5rem; }
.home-feat-dot { width: .6rem; height: .6rem; border-radius: 50%; background: var(--rose); box-shadow: 0 0 0 0 rgba(251,113,133,.6); animation: featPulse 1.8s ease-out infinite; }
@keyframes featPulse { 70% { box-shadow: 0 0 0 .5rem rgba(251,113,133,0); } 100% { box-shadow: 0 0 0 0 rgba(251,113,133,0); } }
.home-feat-nav { display: inline-flex; align-items: center; gap: .35rem; }
button.home-feat-arrow { width: 2.1rem; height: 2.1rem; padding: 0; border-radius: 50%; display: inline-grid; place-items: center; background: rgba(148,163,184,.14); color: var(--text); border: 1px solid var(--border); }
button.home-feat-arrow:hover { background: rgba(26,159,255,.2); transform: none; }
button.home-feat-arrow:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.home-feat-count { min-width: 3.2rem; text-align: center; font-size: .85rem; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }
.home-feat-viewport { overflow: hidden; border-radius: var(--radius); }
.home-feat-track { display: flex; transition: transform .35s ease; }
.home-feat-slide { flex: 0 0 100%; min-width: 0; display: block; color: inherit; text-decoration: none; border-radius: var(--radius); border: 1px solid var(--border); overflow: hidden; background: var(--bg-card); transition: border-color .15s ease; }
.home-feat-slide:hover { border-color: rgba(124,156,255,.55); }
.home-feat-slide:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.home-feat-slide .card-media { height: 170px; }
.home-feat-body { display: block; padding: .85rem 1rem 1rem; }
.home-feat-name { display: block; margin: .5rem 0 .3rem; font-size: 1.22rem; font-weight: 800; line-height: 1.2; overflow-wrap: anywhere; }
.home-feat-line { display: block; margin: .08rem 0; }
.home-feat-body .card-prizes { display: flex; }
.home-feat-body .card-prize { font-size: .98rem; }
.home-feat-dots { display: flex; justify-content: center; gap: .4rem; }
button.home-feat-pip { width: .55rem; height: .55rem; padding: 0; border-radius: 999px; background: rgba(148,163,184,.4); transition: width .2s ease, background .2s ease; }
button.home-feat-pip.on { width: 1.4rem; background: var(--accent); }
button.home-feat-pip:hover { transform: none; }
/* Upcoming list: one row of 5 on desktop */
.home-up-grid { grid-template-columns: repeat(auto-fill, minmax(205px, 1fr)); }
@media (max-width: 860px) {
  .home-search-hero { max-width: none; }
  .home-feat-slide .card-media { height: 150px; }
  body.home-searching .hero-card.home-feat { display: none; } /* phone: search results come right after the search bar */
  .home-up-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
}
@media (max-width: 560px) { .home-search-hero .home-q { font-size: 16px; } }
@media (prefers-reduced-motion: reduce) { .home-feat-track { transition: none; } .home-feat-dot { animation: none; } }
html[data-theme="light"] button.home-feat-arrow { background: #fff; }
html[data-theme="light"] .home-feat-slide { background: #fff; }

/* ---------------- Organizer paywall (billing.js / admin.js) ---------------- */
.auth-price { margin: .55rem 0 0; font-size: .9rem; font-weight: 650; color: var(--accent); }
html[data-theme="light"] .auth-price { color: var(--accent-2); }
.billing-card {
  display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
  border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-card);
  padding: .85rem 1.1rem; margin-bottom: 1rem; transition: box-shadow .3s ease;
}
.billing-card.locked { border-color: rgba(26,159,255,.45); background: linear-gradient(135deg, rgba(26,159,255,.12), rgba(11,111,212,.05)), var(--bg-card); padding: 1.05rem 1.2rem; }
.billing-card.pulse { box-shadow: 0 0 0 3px rgba(26,159,255,.45); }
.billing-card h3 { margin: 0 0 .2rem; font-size: 1.05rem; }
.billing-card .meta { margin: 0; }
.billing-ic { font-size: 1.4rem; line-height: 1; }
.billing-main { flex: 1 1 260px; min-width: 0; }
.billing-act { display: flex; gap: .5rem; flex-wrap: wrap; }
.billing-line { margin: 0; display: flex; align-items: center; gap: .55rem; font-weight: 600; }
.billing-dot { width: .6rem; height: .6rem; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px rgba(52,211,153,.18); flex: none; }
.billing-card.warn .billing-dot { background: var(--amber); box-shadow: 0 0 0 3px rgba(251,191,36,.2); }
.billing-msg { margin: .45rem 0 0; font-size: .88rem; color: var(--muted); }
.billing-msg.ok { color: var(--green); }
.billing-msg.warn { color: #fca5a5; }
html[data-theme="light"] .billing-msg.warn { color: #b91c1c; }
html[data-theme="light"] .billing-msg.ok { color: #047857; }
.btn.is-locked { opacity: .55; filter: grayscale(.35); }
.btn.is-locked::before { content: "🔒 "; }
.billing-gate { max-width: 560px; margin: 1rem auto; text-align: center; padding: 2rem 1.5rem; }
.billing-gate h2 { margin: .5rem 0 .4rem; }
.billing-gate .billing-ic { font-size: 2rem; }
.billing-gate .hero-actions { justify-content: center; margin-top: 1.1rem; }
@media (max-width: 640px) {
  .billing-card { align-items: flex-start; }
  .billing-act, .billing-act .btn { width: 100%; }
  .billing-act .btn { text-align: center; }
}

/* Admin: organizer access */
.admin-tools { display: flex; align-items: center; gap: .9rem; flex-wrap: wrap; margin-bottom: .8rem; }
.admin-search {
  flex: 1 1 260px; max-width: 380px; font: inherit; color: var(--text); background: var(--bg-card);
  border: 1px solid var(--border); border-radius: 999px; padding: .6rem 1rem;
}
.admin-table td { vertical-align: top; }
.admin-name { font-weight: 650; display: flex; align-items: center; gap: .35rem; flex-wrap: wrap; }
.admin-name a:hover { color: var(--accent); }
.admin-email { word-break: break-all; }
.access-flag { display: inline-block; margin-top: .3rem; font-size: .75rem; font-weight: 700; letter-spacing: .02em; }
.access-flag.on { color: var(--green); }
.access-flag.off { color: var(--rose); }
html[data-theme="light"] .access-flag.on { color: #047857; }
html[data-theme="light"] .access-flag.off { color: #be123c; }
.sub-pill { display: inline-block; padding: .12rem .55rem; border-radius: 999px; font-size: .78rem; font-weight: 650; background: rgba(148,163,184,.14); color: var(--muted); margin-right: .3rem; }
.sub-pill.st-active, .sub-pill.st-trialing { background: rgba(52,211,153,.15); color: var(--green); }
.sub-pill.st-past_due, .sub-pill.st-unpaid { background: rgba(251,191,36,.16); color: var(--amber); }
.sub-pill.st-canceled, .sub-pill.st-incomplete_expired { background: rgba(251,113,133,.14); color: var(--rose); }
html[data-theme="light"] .sub-pill.st-active, html[data-theme="light"] .sub-pill.st-trialing { color: #047857; }
html[data-theme="light"] .sub-pill.st-past_due, html[data-theme="light"] .sub-pill.st-unpaid { color: #92400e; }
html[data-theme="light"] .sub-pill.st-canceled, html[data-theme="light"] .sub-pill.st-incomplete_expired { color: #be123c; }
.admin-note { display: flex; gap: .4rem; align-items: center; }
.admin-note input {
  flex: 1; min-width: 120px; font: inherit; font-size: .88rem; color: var(--text); background: transparent;
  border: 1px solid var(--border); border-radius: 10px; padding: .4rem .6rem;
}
.admin-saved { display: block; margin-top: .25rem; color: var(--green); font-size: .8rem; }
.switch { position: relative; display: inline-flex; width: 46px; height: 26px; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; z-index: 1; }
.switch-ui { width: 100%; height: 100%; border-radius: 999px; background: rgba(148,163,184,.35); transition: background .15s ease; position: relative; }
.switch-ui::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3); transition: transform .15s ease; }
.switch input:checked + .switch-ui { background: var(--green); }
.switch input:checked + .switch-ui::after { transform: translateX(20px); }
.switch input:focus-visible + .switch-ui { outline: 2px solid var(--accent); outline-offset: 2px; }
.switch input:disabled + .switch-ui { opacity: .5; }
@media (max-width: 760px) {
  .admin-table table, .admin-table tbody, .admin-table tr, .admin-table td { display: block; width: 100%; }
  .admin-table thead { display: none; }
  .admin-table tr { border-bottom: 1px solid var(--border); padding: .7rem 0; }
  .admin-table td { border: none; padding: .3rem 0; }
  .admin-table td[data-label]:not(:first-child)::before { content: attr(data-label); display: block; font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin-bottom: .15rem; }
}

/* ---------------- Top nav + footer bars: inverted from the page theme (navinv-1) ----------------
   Dark pages get a solid white bar with dark text; light pages get a solid dark-navy bar with light text. The theme
   variables are re-scoped on the bars, so everything inside (links, chips, the organizer menu) flips with them. */
.nav, body > footer {
  --text: #0f172a; --muted: #46546f; --border: rgba(15,23,42,.12);
  --bg-card: #ffffff; --bg-elev: #ffffff; --accent: #0b6fd4;
  --shadow: 0 18px 50px rgba(15,40,80,.22);
  --bar-bg: #ffffff; --bar-hover: rgba(15,23,42,.06); --bar-active: rgba(11,111,212,.11); --bar-active-text: #0a4f9a;
  --bar-chip-bg: rgba(11,111,212,.1); --bar-chip-text: #0a4f9a;
  color: var(--text);
}
html[data-theme="light"] .nav, html[data-theme="light"] body > footer {
  --text: #eef2ff; --muted: #aab5d1; --border: rgba(255,255,255,.12);
  --bg-card: #161e33; --bg-elev: #12182a; --accent: #4db5ff;
  --shadow: 0 18px 50px rgba(0,0,0,.45);
  --bar-bg: #0b0f1a; --bar-hover: rgba(255,255,255,.08); --bar-active: rgba(77,181,255,.16); --bar-active-text: #ffffff;
  --bar-chip-bg: rgba(124,156,255,.18); --bar-chip-text: #dbe3ff;
}
.nav, html[data-theme="light"] .nav {
  background: var(--bar-bg); -webkit-backdrop-filter: none; backdrop-filter: none;
  border-bottom: 1px solid var(--border); box-shadow: 0 1px 12px rgba(0,0,0,.18);
}
html[data-theme="light"] .nav { box-shadow: 0 1px 12px rgba(15,23,42,.18); }
.nav .brand { color: var(--text); }
.nav-links a { color: var(--muted); }
.nav-links a:hover { color: var(--text); background: var(--bar-hover); }
.nav-links a.active { color: var(--bar-active-text); background: var(--bar-active); font-weight: 600; }
.nav .btn.soft, html[data-theme="light"] .nav .btn.soft { background: var(--bar-chip-bg); color: var(--bar-chip-text); border: 1px solid transparent; }
.nav-links a.btn.soft.active, .nav .btn.soft:hover { background: var(--bar-active); color: var(--bar-active-text); }
.nav .chip { background: var(--bar-chip-bg); color: var(--bar-chip-text); }
.nav .account-menu > summary:hover .chip, .nav .account-menu[open] > summary .chip { background: var(--bar-active); color: var(--bar-active-text); }
.nav .account-menu > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 999px; }
.nav .account-dropdown { background: var(--bg-card); border-color: var(--border); }
.nav .account-dropdown a:hover, .nav .account-dropdown button.menu-item:hover,
.nav .account-dropdown .submenu button:hover, html[data-theme="light"] .nav .account-dropdown .submenu button:hover { background: var(--bar-hover); }
.nav .account-dropdown .submenu button.active { color: var(--accent); }
.nav .lang-pills button { background: var(--bar-hover); color: var(--muted); }
.nav .lang-pills button.active { background: var(--bar-active); color: var(--bar-active-text); border-color: var(--border); }
/* Logo: no blue glow on the white bar (a soft shadow instead); a subtle rim + glow on the dark bar. */
.nav .brand img.logo-img { filter: drop-shadow(0 1px 1.5px rgba(15,23,42,.28)); }
html[data-theme="light"] .nav .brand img.logo-img { filter: drop-shadow(0 0 1px rgba(255,255,255,.45)) drop-shadow(0 0 5px rgba(110,185,255,.22)); }
/* Footer bar: solid band pinned to the bottom of short pages. */
body { display: flex; flex-direction: column; }
body > main { flex: 1 0 auto; }
body > footer, html[data-theme="light"] body > footer { background: var(--bar-bg); color: var(--muted); border-top: 1px solid var(--border); padding: 1.25rem 0 1.5rem; }
body > footer a { color: var(--text); font-weight: 550; border-radius: 6px; }
body > footer a:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }

/* Forgot password / reset page */
.auth-link { justify-self: start; background: none; border: 0; padding: .1rem 0; font: inherit; font-size: .9rem; color: var(--accent, #7c9cff); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.auth-link:hover, .auth-link:focus-visible { text-decoration-thickness: 2px; }
.auth-link:disabled { opacity: .5; cursor: default; }
.reset-wrap { max-width: 560px; }
.reset-wrap .form-card + .form-card { margin-top: 1rem; }
.reset-hint { font-size: .85rem; color: var(--muted); margin: -.35rem 0 0; }
.fields[hidden], .auth-link[hidden] { display: none; }

/* LIVE badge on matches being played on a streamed court (public page) */
.sc-live { display: inline-flex; align-items: center; gap: .32rem; font-size: .68rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; line-height: 1.3;
  padding: .12rem .52rem .12rem .45rem; border-radius: 999px; background: rgba(251,113,133,.15); color: #fda4af; border: 1px solid rgba(251,113,133,.5);
  text-decoration: none; white-space: nowrap; cursor: pointer; }
.sc-live:hover, .sc-live:focus-visible { background: rgba(251,113,133,.28); color: #fff; text-decoration: none; }
.sc-live:focus-visible { outline: 2px solid var(--rose); outline-offset: 2px; }
.sc-live-dot { width: 7px; height: 7px; border-radius: 50%; background: #ef4444; flex: none; animation: scLivePulse 1.6s ease-out infinite; }
@keyframes scLivePulse { 0% { box-shadow: 0 0 0 0 rgba(239,68,68,.6); } 70% { box-shadow: 0 0 0 6px rgba(239,68,68,0); } 100% { box-shadow: 0 0 0 0 rgba(239,68,68,0); } }
.sc-match.is-live { border-color: rgba(251,113,133,.6); box-shadow: 0 0 0 1px rgba(251,113,133,.22), 0 0 18px rgba(251,113,133,.08); }
.sp-tile.sp-flash { animation: spFlash 2.1s ease-out; }
@keyframes spFlash { 0%, 60% { box-shadow: 0 0 0 3px var(--rose), 0 0 24px rgba(251,113,133,.45); } 100% { box-shadow: var(--shadow); } }
html[data-theme="light"] .sc-live { background: #fee2e2; color: #b91c1c; border-color: #fca5a5; }
html[data-theme="light"] .sc-live:hover, html[data-theme="light"] .sc-live:focus-visible { background: #fecaca; color: #991b1b; }
html[data-theme="light"] .sc-live-dot { background: #dc2626; }
html[data-theme="light"] .sc-match.is-live { border-color: #fca5a5; box-shadow: 0 0 0 1px rgba(220,38,38,.12); }
@media (prefers-reduced-motion: reduce) { .sc-live-dot, .sp-tile.sp-flash { animation: none; } }

/* DUPR upload CSV (Scores page, organizer only) */
.sc-dupr { display: flex; align-items: center; justify-content: space-between; gap: .75rem 1rem; flex-wrap: wrap; margin-top: 1rem; padding: .8rem 1rem;
  border: 1px dashed var(--border); border-radius: 12px; background: rgba(26,159,255,.05); }
.sc-dupr-text { display: flex; flex-direction: column; gap: .15rem; min-width: 0; flex: 1 1 260px; }
.sc-dupr-text strong { font-size: .92rem; }
.sc-dupr-msg:empty { display: none; }
.sc-dupr-msg { color: var(--green); font-weight: 600; }
.sc-dupr .btn[disabled] { opacity: .55; cursor: not-allowed; }
.sc-dupr-missing { margin: .4rem 0 .6rem; padding-left: 1.2rem; max-height: 40vh; overflow: auto; columns: 2; column-gap: 1.5rem; }
@media (max-width: 560px) { .sc-dupr-missing { columns: 1; } .sc-dupr .btn { width: 100%; } }
html[data-theme="light"] .sc-dupr { background: rgba(26,159,255,.06); }

/* Manual pool adjustments (Manage > Create pools) */
.pe-bar { display: grid; gap: .45rem; margin-bottom: .6rem; }
.pe-status { margin: 0; }
.pe-spread { margin: 0; }
.pe-actions { margin-top: .2rem; flex-wrap: wrap; }
.tag.pe-manual { background: rgba(251,191,36,.18); color: #fcd34d; }
html[data-theme="light"] .tag.pe-manual { background: #fef3c7; color: #92400e; }
.pe-note { margin: 0 0 .45rem; }
.pe-meta { margin: -.2rem 0 .55rem; font-size: .82rem; }
.pe-grid .pool-card { min-width: 0; }
.pe-grid .pool-card li { padding: .2rem 0; min-width: 0; }
.pe-move { flex: 1 1 100%; width: 100%; min-width: 0; box-sizing: border-box; max-width: 100%; text-overflow: ellipsis; min-height: 40px; font-size: .9rem; padding: .35rem .5rem; border-radius: 10px;
  border: 1px solid var(--border); background: #0a0e19; color: var(--text); font-family: inherit; }
html[data-theme="light"] .pe-move { background: #f8fafc; }
.pe-modal-warn { margin-top: .7rem !important; color: var(--rose) !important; font-weight: 600; }
html[data-theme="light"] .pe-modal-warn { color: #be123c !important; }

/* Pool adjustments: drag and drop */
.pe-grid .pool-card { transition: box-shadow .12s, border-color .12s, background .12s; }
.pe-drag-item { position: relative; cursor: grab; touch-action: pan-y; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none;
  border-radius: 10px; padding: .3rem .35rem !important; margin: 0 -.35rem; }
.pe-drag-item:hover { background: rgba(148,163,184,.08); }
.pe-handle { flex: 0 0 auto; width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center; border-radius: 8px;
  border: 1px solid var(--border); background: rgba(148,163,184,.1); color: var(--muted); font-size: 1.1rem; line-height: 1; cursor: grab;
  touch-action: none; padding: 0; }
.pe-handle:hover { color: var(--text); background: rgba(26,159,255,.15); }
.pe-dragging { opacity: .35; outline: 2px dashed rgba(148,163,184,.5); }
.pe-ghost { position: fixed; left: 0; top: 0; z-index: 1000; pointer-events: none; list-style: none; margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: .35rem;
  padding: .45rem .6rem; border-radius: 12px; background: var(--bg-card, #111827); border: 1px solid rgba(26,159,255,.7); color: var(--text); font-size: .9rem;
  box-shadow: 0 18px 40px rgba(0,0,0,.45), 0 0 0 3px rgba(26,159,255,.25); opacity: .97; }
.pe-ghost.is-bad { border-color: var(--rose); box-shadow: 0 18px 40px rgba(0,0,0,.45), 0 0 0 3px rgba(251,113,133,.3); }
.pe-ghost-tag { flex: 1 1 100%; font-size: .78rem; font-weight: 700; color: #93c5fd; }
.pe-ghost-tag.bad { color: var(--rose); }
.pe-ghost-tag.same { color: var(--muted); font-weight: 600; }
.pool-card.pe-drop-ok { border-color: #1a9fff; background: rgba(26,159,255,.14); box-shadow: 0 0 0 3px rgba(26,159,255,.3); }
.pool-card.pe-drop-bad { border-color: var(--rose); background: rgba(251,113,133,.1); box-shadow: 0 0 0 3px rgba(251,113,133,.25); cursor: not-allowed; }
.pe-swap-target { background: rgba(26,159,255,.18) !important; outline: 2px solid #1a9fff; }
.pe-swap-target::after { content: "⇄"; position: absolute; right: .4rem; top: .3rem; font-weight: 800; color: #1a9fff; }
.pe-insert { height: 0; border-top: 3px solid #1a9fff; border-radius: 3px; margin: .1rem 0; list-style: none; }
html.pe-drag-on, html.pe-drag-on * { cursor: grabbing !important; -webkit-user-select: none !important; user-select: none !important; }
html.pe-drag-on .pool-card.pe-drop-bad, html.pe-drag-on .pool-card.pe-drop-bad * { cursor: not-allowed !important; }
.pe-move { min-height: 34px !important; font-size: .8rem !important; padding: .2rem .45rem !important; opacity: .9; }
html[data-theme="light"] .pe-ghost { background: #fff; }
.pe-grid .pool-card li.pe-drag-item { padding-left: 46px !important; min-height: 40px; }
.pe-drag-item > .pe-handle { position: absolute; left: .35rem; top: 50%; transform: translateY(-50%); }
.pe-drag-item > .pe-move { flex: 0 1 auto; width: auto; max-width: 100%; }

/* Admin-only payment types (roster.js chooser + dashboard Payments) */
.rp-paid.rp-pay3 { min-width: 7.6rem; }
.rp-paid.pay-member { background: rgba(52,211,153,.18); color: var(--green); }
.rp-paid.pay-nonmember { background: rgba(26,159,255,.18); color: #60b8ff; }
.rp-paid.pay-unset { background: rgba(251,191,36,.18); color: #fbbf24; }
html[data-theme="light"] .rp-paid.pay-nonmember { color: #0b6fc2; }
html[data-theme="light"] .rp-paid.pay-unset { color: #a16207; }
.pay-unset-txt { color: #fbbf24; font-weight: 600; }
html[data-theme="light"] .pay-unset-txt { color: #a16207; }
.rp-paymenu { position: absolute; z-index: 300; min-width: 220px; max-width: calc(100vw - 16px); background: var(--bg-elev, #111827); border: 1px solid var(--border);
  border-radius: 12px; box-shadow: 0 14px 34px rgba(0,0,0,.4); padding: .35rem; display: grid; gap: .25rem; }
.rp-paymenu-h { font-size: .75rem; font-weight: 700; color: var(--muted); padding: .3rem .5rem .15rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rp-paymenu-note { font-size: .74rem; color: #fbbf24; padding: 0 .5rem .2rem; line-height: 1.3; }
.rp-payopt { display: flex; align-items: center; gap: .55rem; width: 100%; min-height: 44px; padding: .45rem .7rem; border-radius: 9px; border: 1px solid transparent;
  background: transparent; color: var(--text); font: inherit; font-size: .92rem; font-weight: 650; cursor: pointer; text-align: left; }
.rp-payopt:hover, .rp-payopt:focus-visible { background: rgba(148,163,184,.12); outline: none; border-color: rgba(148,163,184,.35); }
.rp-payopt.on { border-color: rgba(148,163,184,.45); background: rgba(148,163,184,.1); }
.rp-paydot { width: .7rem; height: .7rem; border-radius: 50%; flex: 0 0 auto; }
.rp-payopt.pay-unpaid .rp-paydot { background: var(--rose); }
.rp-payopt.pay-member .rp-paydot { background: var(--green); }
.rp-payopt.pay-nonmember .rp-paydot { background: #1a9fff; }
.rp-paycheck { margin-left: auto; color: var(--muted); }
.pay-card { margin-top: 1rem; }
.pay-head h3 { margin: 0 0 .25rem; display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.pay-admin-tag { font-size: .7rem; background: rgba(148,163,184,.15); color: var(--muted); }
.pay-table-wrap { overflow-x: auto; }
.pay-table th.num, .pay-table td.num { text-align: right; white-space: nowrap; }
.pay-table tr.pay-total td { border-top: 2px solid var(--border); }
.pay-note { margin: .5rem 0 0; }

/* Bracket: results card next to the final when it fits, otherwise below; wide brackets scroll inside a frame */
.sc-bracket-wrap { display: flex; flex-wrap: wrap; align-items: stretch; gap: 1rem; }
.sc-bracket-wrap > .sc-scroll-hint { flex: 1 0 100%; order: -1; margin: 0; font-size: .82rem; font-weight: 600; color: var(--accent); }
.sc-bracket-frame { position: relative; flex: 0 1 auto; min-width: 0; max-width: 100%; }
.sc-bracket-frame > .sc-bracket-scroll { scrollbar-width: thin; scrollbar-color: rgba(148,163,184,.55) rgba(148,163,184,.12); padding-bottom: .75rem; }
.sc-bracket-scroll::-webkit-scrollbar { height: 10px; }
.sc-bracket-scroll::-webkit-scrollbar-track { background: rgba(148,163,184,.12); border-radius: 8px; }
.sc-bracket-scroll::-webkit-scrollbar-thumb { background: rgba(148,163,184,.55); border-radius: 8px; }
.sc-bracket-scroll:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 8px; }
.sc-bracket-frame::before, .sc-bracket-frame::after { content: ""; position: absolute; top: 0; bottom: .75rem; width: 36px; pointer-events: none; opacity: 0; transition: opacity .15s; z-index: 2; }
.sc-bracket-frame::before { left: 0; background: linear-gradient(90deg, var(--bg), transparent); }
.sc-bracket-frame::after { right: 0; background: linear-gradient(270deg, var(--bg), transparent); }
.sc-bracket-frame.is-scrollable:not(.at-start)::before, .sc-bracket-frame.is-scrollable:not(.at-end)::after { opacity: .95; }
.sc-bracket-wrap > .sc-champ { flex: 0 0 240px; max-width: 100%; }
@media (max-width: 520px) { .sc-bracket-wrap > .sc-champ { flex: 1 1 100%; } }

/* Status pill: Live gets a pulsing red dot; Completed = green (default .pill colors) */
.pill.live::before { content: ""; display: inline-block; width: .5em; height: .5em; margin-right: .38em; border-radius: 50%; background: #ef4444; vertical-align: .06em; box-shadow: 0 0 0 0 rgba(239,68,68,.6); animation: pill-pulse 1.6s ease-out infinite; }
@keyframes pill-pulse { 0% { box-shadow: 0 0 0 0 rgba(239,68,68,.55); } 70% { box-shadow: 0 0 0 .45em rgba(239,68,68,0); } 100% { box-shadow: 0 0 0 0 rgba(239,68,68,0); } }
@media (prefers-reduced-motion: reduce) { .pill.live::before { animation: none; } }
.tour-info.has-cover .pill.soon { background: rgba(251,191,36,.32); color: #fff3c4; }
.tour-info.has-cover .pill.live { background: rgba(239,68,68,.34); color: #ffe4e6; }
.tour-info.has-cover .pill.done { background: rgba(16,185,129,.34); color: #d1fae5; }

/* ---------- My Team (public page button + myteam.html) ---------- */
.my-team-btn { display: inline-flex; align-items: center; gap: .35rem; margin: .7rem 0 0; padding: .5rem 1rem; font-size: .92rem; }
.my-team-btn[hidden] { display: none; }
.tour-info-inner > .pill + .my-team-btn { margin-left: .5rem; vertical-align: middle; margin-top: 0; }
/* My Team page (myteam.html): phone-first, centered column on larger screens */
.mt-app { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; overflow-x: hidden; }
.mt-app .nav-inner, .mt-app .footer-inner { padding-left: env(safe-area-inset-left); padding-right: env(safe-area-inset-right); }
.mt-app .nav { position: relative; padding-top: env(safe-area-inset-top); }
@media (max-width: 560px) {
  .mt-app .nav-inner { padding-top: .4rem; padding-bottom: .4rem; }
  .mt-app .brand { font-size: .95rem; min-height: 44px; }
  .mt-app .brand img.logo-img { width: 32px; height: 32px; }
  .mt-app .nav-links a:not(.btn) { display: none; }
  .mt-app .nav-links .btn { padding: .5rem .9rem; font-size: .88rem; min-height: 44px; display: inline-flex; align-items: center; }
}
@media (max-width: 400px) { .mt-app .brand-t { display: none; } }
.mt-app footer { margin-top: 1rem; padding-bottom: calc(1.5rem + env(safe-area-inset-bottom)); }
.mt-page { width: 100%; max-width: 680px; margin: 0 auto; font-size: 1rem; line-height: 1.45;
  padding: .6rem max(14px, env(safe-area-inset-right)) calc(1.5rem + env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left)); }
.mt-page button { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
html.mt-noscroll, html.mt-noscroll body { overflow: hidden; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.mt-label { font-size: .75rem; font-weight: 750; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.mt-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 18px; padding: 1rem; margin: 0 0 .75rem; }
html[data-theme="light"] .mt-card { box-shadow: 0 1px 3px rgba(15,23,42,.06); }
/* top bar: back to tournament + live status + refresh */
.mt-top { display: flex; align-items: center; justify-content: space-between; gap: .5rem; min-height: 44px; margin-bottom: .35rem; }
.mt-back { display: inline-flex; align-items: center; gap: .3rem; min-height: 44px; min-width: 0; flex: 1 1 auto; color: var(--accent); font-weight: 650; font-size: .95rem; }
.mt-back > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mt-back > span:first-child { font-size: 1.5rem; line-height: 1; margin-top: -.12em; }
.mt-livebar { display: flex; align-items: center; gap: .4rem; flex: none; }
.mt-livebar .pill { font-size: .72rem; }
.mt-livebar .pill.live::before { content: ""; display: inline-block; width: .45rem; height: .45rem; margin-right: .3rem; border-radius: 50%; background: currentColor; vertical-align: .05em; animation: mtBlink 1.6s ease-in-out infinite; }
@keyframes mtBlink { 50% { opacity: .35; } }
.mt-updated { font-size: .78rem; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
@media (max-width: 359px) { .mt-updated { display: none; } }
.mt-page button.mt-iconbtn { width: 44px; height: 44px; padding: 0; border-radius: 50%; display: inline-grid; place-items: center; background: rgba(148,163,184,.14); color: var(--text); border: 1px solid var(--border); font-size: 1.2rem; flex: none; }
.mt-iconbtn:hover { transform: none; background: rgba(26,159,255,.18); }
.mt-iconbtn:focus-visible, .mt-change:focus-visible, .mt-seg-b:focus-visible, .mt-subseg-b:focus-visible, .mt-opt:focus-visible, .mt-watch:focus-visible, .mt-bigbtn:focus-visible, .mt-back:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.mt-iconbtn.spin span { display: inline-block; animation: homeSpin .7s linear; }
/* team names: two lines (player / partner), each truncated */
.mt-tn { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.mt-tn1, .mt-tn2 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mt-tn2 { color: var(--muted); font-size: .92em; }
/* team header */
.mt-teamhead { display: flex; align-items: center; gap: .75rem; margin: .1rem 0 .7rem; }
.mt-th-text { flex: 1 1 auto; min-width: 0; }
.mt-myname { font-size: 1.3rem; font-weight: 780; margin-top: .1rem; }
.mt-myname .mt-tn2 { color: var(--text); font-size: 1.05rem; font-weight: 650; opacity: .8; }
.mt-page button.mt-change { flex: none; min-height: 44px; padding: .55rem 1rem; border-radius: 999px; background: rgba(26,159,255,.14); color: var(--accent); border: 1px solid rgba(26,159,255,.4); font-weight: 700; font-size: .95rem; }
html[data-theme="light"] .mt-page button.mt-change { color: var(--accent-2); }
.mt-change:hover { transform: none; background: rgba(26,159,255,.22); }
.mt-note { margin: 0 0 .7rem; padding: .6rem .85rem; border-radius: 12px; background: rgba(251,191,36,.1); border: 1px solid rgba(251,191,36,.3); font-size: .95rem; }
/* no team chosen */
.mt-prompt { text-align: center; padding: 1.6rem 1.1rem 1.3rem; }
.mt-prompt-ic { font-size: 2.4rem; line-height: 1; }
.mt-prompt h1 { font-size: 1.45rem; margin: .6rem 0 .35rem; line-height: 1.2; }
.mt-prompt p { margin: 0 0 1.1rem; color: var(--muted); }
.mt-page .mt-bigbtn, .mt-empty .mt-bigbtn { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 52px; font-size: 1.05rem; font-weight: 750; border-radius: 14px; }
.mt-empty h1 { margin-top: 0; }
/* Next Match card */
.mt-nextcard { position: relative; border-width: 2px; padding: .9rem 1rem 1rem; }
.mt-nextcard.is-now { border-color: rgba(52,211,153,.7); background: linear-gradient(180deg, rgba(52,211,153,.12), transparent 70%), var(--bg-card); }
.mt-nextcard.is-upcoming { border-color: rgba(251,191,36,.55); background: linear-gradient(180deg, rgba(251,191,36,.09), transparent 70%), var(--bg-card); }
.mt-nc-head { display: flex; justify-content: space-between; align-items: baseline; gap: .6rem; }
.mt-mlabel { font-size: .85rem; color: var(--muted); font-weight: 600; text-align: right; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mt-nc-main { display: flex; align-items: center; justify-content: space-between; gap: .8rem; margin: .5rem 0 .65rem; }
.mt-courtbox { display: flex; flex-direction: column; line-height: 1; min-width: 0; }
.mt-court-l { font-size: .8rem; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.mt-court-n { font-size: 3.6rem; font-weight: 850; letter-spacing: -.03em; font-variant-numeric: tabular-nums; margin-top: .1rem; }
.mt-court-tbd { font-size: 1.5rem; font-weight: 750; color: var(--muted); line-height: 1.2; }
.mt-status { display: inline-flex; align-items: center; gap: .5rem; padding: .55rem 1rem; border-radius: 14px; font-weight: 850; font-size: 1.35rem; letter-spacing: .06em; flex: none; }
.mt-status.now { background: var(--green); color: #052e1f; }
.mt-status.upcoming { background: rgba(251,191,36,.18); color: var(--amber); border: 1px solid rgba(251,191,36,.5); }
html[data-theme="light"] .mt-status.upcoming { color: #92400e; background: rgba(251,191,36,.22); }
html[data-theme="light"] .mt-status.now { background: #059669; color: #fff; }
.mt-now-dot { width: .6rem; height: .6rem; border-radius: 50%; background: currentColor; animation: mtBlink 1.4s ease-in-out infinite; }
.mt-opp { display: flex; align-items: center; gap: .55rem; font-size: 1.12rem; font-weight: 700; min-width: 0; }
.mt-opp .mt-tn { flex: 1 1 auto; }
.mt-vs { flex: none; color: var(--muted); font-weight: 650; font-size: .9rem; }
.mt-pending { color: var(--muted); font-weight: 600; font-style: italic; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.mt-fmtrow { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: .7rem; }
.mt-format, .mt-game { display: inline-block; padding: .3rem .65rem; border-radius: 10px; background: rgba(148,163,255,.1); border: 1px solid var(--border); font-size: .88rem; font-weight: 650; }
.mt-game { background: rgba(26,159,255,.12); border-color: rgba(26,159,255,.35); }
.mt-game strong { color: var(--accent); }
html[data-theme="light"] .mt-game strong { color: var(--accent-2); }
.mt-line2 { margin: .55rem 0 0; font-size: .95rem; }
.mt-line2.meta { font-size: .9rem; margin-top: .3rem; }
.mt-wait { font-weight: 600; }
.mt-none { margin: .45rem 0 .1rem; font-size: 1.1rem; font-weight: 700; color: var(--muted); }
.mt-watch { display: flex; align-items: center; gap: .7rem; width: 100%; min-height: 56px; margin-top: .9rem; padding: .6rem 1rem; border-radius: 14px; background: #dc2626; color: #fff; font-weight: 750; text-decoration: none; }
.mt-watch:hover { filter: brightness(1.08); }
.mt-watch-t { display: flex; flex-direction: column; line-height: 1.2; flex: 1 1 auto; min-width: 0; }
.mt-watch-t strong { font-size: 1.08rem; }
.mt-watch-t small { font-size: .82rem; font-weight: 600; opacity: .9; }
.mt-watch-go { font-size: 1.3rem; }
.mt-stream-dot { width: .7rem; height: .7rem; border-radius: 50%; background: #fff; flex: none; animation: mtBlink 1.4s ease-in-out infinite; }
/* stat chips */
.mt-chips { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; margin: 0 0 .75rem; }
.mt-chip { display: flex; flex-direction: column; min-width: 0; padding: .55rem .75rem; border-radius: 14px; background: var(--bg-card); border: 1px solid var(--border); }
.mt-chip-stage { grid-column: 1 / -1; }
.mt-chip-l { font-size: .7rem; font-weight: 750; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.mt-chip-v { font-size: 1.15rem; font-weight: 780; line-height: 1.25; font-variant-numeric: tabular-nums; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mt-chip-s { font-size: .85rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mt-chip-stage[data-stage="champion"] .mt-chip-v { color: var(--amber); }
.mt-chip-stage[data-stage="eliminated"] .mt-chip-v, .mt-chip-stage[data-stage="notAdvanced"] .mt-chip-v { color: var(--muted); }
html[data-theme="light"] .mt-chip-stage[data-stage="champion"] .mt-chip-v { color: #b45309; }
@media (min-width: 560px) { .mt-chips { grid-template-columns: 2fr 1fr 1fr; } .mt-chip-stage { grid-column: auto; } }
/* sticky Bracket / My Pool switch */
#mt-seg:not(:empty) { position: sticky; top: 0; z-index: 30; margin: 0 -14px .75rem; padding: calc(.5rem + env(safe-area-inset-top)) 14px .5rem; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.mt-seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; padding: 4px; border-radius: 14px; background: rgba(148,163,184,.14); border: 1px solid var(--border); }
.mt-page button.mt-seg-b { min-height: 44px; border-radius: 11px; background: transparent; color: var(--muted); font-weight: 700; font-size: 1rem; padding: .4rem .6rem; }
.mt-page button.mt-seg-b.on { background: var(--bg-card); color: var(--text); box-shadow: 0 1px 4px rgba(0,0,0,.25); }
.mt-seg-b:hover { transform: none; }
.mt-subseg-wrap { display: flex; justify-content: center; margin: 0 0 .65rem; }
.mt-subseg { display: inline-flex; gap: 4px; padding: 3px; border-radius: 999px; border: 1px solid var(--border); background: rgba(148,163,184,.1); }
.mt-page button.mt-subseg-b { min-height: 44px; padding: .4rem 1.05rem; border-radius: 999px; background: transparent; color: var(--muted); font-size: .95rem; font-weight: 700; }
.mt-page button.mt-subseg-b.on { background: var(--accent); color: #fff; }
.mt-subseg-b:hover { transform: none; }
.mt-pv[hidden], .mt-pathcard[hidden], .mt-bracket[hidden], .mt-sheet[hidden] { display: none !important; }
/* My path list (vertical timeline) */
.mt-pathcard { padding: .8rem .8rem .3rem; }
.mt-path-list { list-style: none; margin: 0; padding: 0; }
.mt-step { position: relative; padding: 0 0 .7rem 1.7rem; }
.mt-step::before { content: ""; position: absolute; left: .5rem; top: 1rem; bottom: -.2rem; border-left: 3px solid var(--accent); }
.mt-step.to-future::before, .mt-step.is-future::before { border-left-style: dotted; opacity: .8; }
.mt-step:last-child::before { display: none; }
.mt-step-dot { position: absolute; left: 0; top: .55rem; width: 1.1rem; height: 1.1rem; border-radius: 50%; background: var(--bg-card); border: 3px solid var(--accent); z-index: 1; }
.mt-step.is-won .mt-step-dot { background: var(--green); border-color: var(--green); }
.mt-step.is-lost .mt-step-dot { background: var(--rose); border-color: var(--rose); }
.mt-step.is-bye .mt-step-dot { background: var(--accent); }
.mt-step.is-next .mt-step-dot, .mt-step.is-now .mt-step-dot { box-shadow: 0 0 0 4px rgba(26,159,255,.3); }
.mt-step.is-now .mt-step-dot { border-color: var(--green); box-shadow: 0 0 0 4px rgba(52,211,153,.3); }
.mt-step.is-future .mt-step-dot { border-style: dashed; }
.mt-step-card { border: 1px solid var(--border); border-radius: 14px; padding: .6rem .75rem; background: rgba(148,163,184,.05); min-width: 0; }
.mt-step.is-next .mt-step-card { border-color: rgba(26,159,255,.6); background: rgba(26,159,255,.08); }
.mt-step.is-now .mt-step-card { border-color: rgba(52,211,153,.7); background: rgba(52,211,153,.1); }
.mt-step.is-future .mt-step-card { border-style: dashed; }
.mt-step.is-lost .mt-step-card { border-color: rgba(251,113,133,.5); }
.mt-step-head { display: flex; justify-content: space-between; align-items: center; gap: .5rem; }
.mt-step-round { font-weight: 750; font-size: .95rem; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mt-step-badge { flex: none; font-size: .72rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; padding: .15rem .5rem; border-radius: 999px; background: rgba(148,163,184,.16); color: var(--muted); }
.mt-step-badge.won { background: rgba(52,211,153,.16); color: var(--green); }
.mt-step-badge.lost { background: rgba(251,113,133,.16); color: var(--rose); }
.mt-step-badge.next { background: rgba(26,159,255,.16); color: var(--accent); }
.mt-step-badge.now { background: var(--green); color: #052e1f; }
.mt-step-badge.bye { background: rgba(26,159,255,.12); color: var(--accent); }
html[data-theme="light"] .mt-step-badge.won { color: #047857; }
html[data-theme="light"] .mt-step-badge.lost { color: #be123c; }
html[data-theme="light"] .mt-step-badge.next, html[data-theme="light"] .mt-step-badge.bye { color: var(--accent-2); }
.mt-step-opp { display: flex; align-items: center; gap: .45rem; margin-top: .3rem; font-size: 1rem; font-weight: 650; min-width: 0; }
.mt-step-meta { display: flex; flex-wrap: wrap; gap: .3rem .7rem; margin-top: .3rem; font-size: .88rem; font-weight: 600; }
.mt-step-score { font-variant-numeric: tabular-nums; font-weight: 750; }
.mt-step.is-won .mt-step-score { color: var(--green); }
html[data-theme="light"] .mt-step.is-won .mt-step-score { color: #047857; }
/* full bracket */
.mt-bracket { padding: .8rem .8rem .5rem; }
.mt-path-note { margin: 0 0 .6rem; font-size: .85rem; }
.mt-bracket .sc-bracket-scroll { -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; scroll-padding: 0 16px; }
.mt-bracket .sc-bracket { position: relative; }
.mt-bracket .sc-bcol { position: relative; z-index: 1; flex-basis: 270px; }
@media (max-width: 520px) { .mt-bracket .sc-bcol { flex-basis: 232px; } }
.mt-lines { position: absolute; left: 0; top: 0; z-index: 0; pointer-events: none; overflow: visible; }
.mt-line { fill: none; stroke: var(--accent); stroke-width: 3; stroke-linejoin: round; stroke-linecap: round; }
.mt-line.future { stroke-dasharray: 2 7; opacity: .85; }
.mt-bracket .sc-match.mt-path { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(26,159,255,.45); }
.mt-bracket .sc-match.mt-path-future { border-style: dashed; box-shadow: none; border-color: rgba(26,159,255,.7); }
.mt-bracket .sc-match.mt-path-lost { border-color: rgba(251,113,133,.7); box-shadow: 0 0 0 2px rgba(251,113,133,.3); }
.mt-bracket .sc-match.mt-path-next { box-shadow: 0 0 0 3px rgba(26,159,255,.55); }
.mt-bracket .sc-row.mt-me-row { background: rgba(26,159,255,.14); border-radius: 8px; box-shadow: inset 3px 0 0 var(--accent); }
.mt-bracket .sc-row.mt-me-row .sc-team { font-weight: 750; }
/* pool table: fits 360 px wide without sideways scrolling */
.mt-pool { padding: 0; overflow: hidden; }
.mt-pool-head { display: flex; justify-content: space-between; align-items: baseline; gap: .5rem; padding: .85rem 1rem .4rem; }
.mt-pool-head h3 { margin: 0; font-size: 1.1rem; }
.mt-table { width: 100%; table-layout: fixed; font-size: .95rem; }
.mt-table th, .mt-table td { padding: .6rem .3rem; text-align: center; font-variant-numeric: tabular-nums; vertical-align: middle; }
.mt-table th { font-size: .72rem; }
.mt-table th:nth-child(2), .mt-table td.tm { text-align: left; }
.mt-table .rank { width: 2rem; padding-left: .7rem; color: var(--muted); text-align: left; }
.mt-table th.num, .mt-table td.num { width: 2.35rem; }
.mt-table th:last-child, .mt-table td:last-child { width: 2.9rem; padding-right: .7rem; }
.mt-table td.tm { overflow: hidden; }
.mt-table td.tm .mt-tn { font-size: .95rem; }
.mt-table tr.qualify td.tm .mt-tn1 { color: var(--green); font-weight: 700; }
html[data-theme="light"] .mt-table tr.qualify td.tm .mt-tn1 { color: #047857; }
.mt-table tr.mt-me td { background: rgba(26,159,255,.16); font-weight: 750; }
.mt-table tr.mt-me td:first-child { box-shadow: inset 4px 0 0 var(--accent); }
html[data-theme="light"] .mt-table tr.mt-me td { background: rgba(26,159,255,.12); }
.mt-you { display: inline-block; margin-top: .15rem; padding: .02rem .45rem; border-radius: 999px; background: var(--accent); color: #fff; font-size: .68rem; font-weight: 800; }
@media (max-width: 400px) { .mt-table th.pfpa, .mt-table td.pfpa { width: 2.1rem; font-size: .85rem; } .mt-table th.num, .mt-table td.num { width: 2.05rem; } .mt-table th, .mt-table td { padding-left: .2rem; padding-right: .2rem; } }
.mt-qnote { margin: 0; padding: .55rem 1rem .85rem; font-size: .85rem; }
/* team picker: bottom sheet on phones, centered dialog on wider screens */
.mt-sheet { position: fixed; inset: 0; z-index: 100; display: flex; align-items: flex-end; justify-content: center; }
.mt-sheet-back { position: absolute; inset: 0; background: rgba(2,6,16,.55); opacity: 0; transition: opacity .18s ease; }
.mt-sheet-box { position: relative; width: 100%; max-width: 560px; max-height: calc(100% - max(28px, env(safe-area-inset-top))); height: 88vh; height: 88dvh; display: flex; flex-direction: column;
  background: var(--bg-elev); border: 1px solid var(--border); border-bottom: none; border-radius: 22px 22px 0 0; box-shadow: 0 -12px 40px rgba(0,0,0,.4);
  padding: .35rem max(14px, env(safe-area-inset-right)) 0 max(14px, env(safe-area-inset-left)); transform: translateY(100%); transition: transform .2s ease; font-size: 1rem; }
.mt-sheet.open .mt-sheet-back { opacity: 1; }
.mt-sheet.open .mt-sheet-box { transform: none; }
@media (prefers-reduced-motion: reduce) { .mt-sheet-box, .mt-sheet-back { transition: none; } .mt-now-dot, .mt-stream-dot, .mt-livebar .pill.live::before { animation: none; } }
.mt-sheet-grip { width: 42px; height: 5px; border-radius: 99px; background: rgba(148,163,184,.45); margin: .2rem auto .35rem; }
.mt-sheet-head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.mt-sheet-head h2 { margin: 0; font-size: 1.2rem; }
.mt-sheet button.mt-iconbtn { width: 44px; height: 44px; padding: 0; border-radius: 50%; display: inline-grid; place-items: center; background: rgba(148,163,184,.14); color: var(--text); border: 1px solid var(--border); font-size: 1.05rem; }
.mt-search { position: relative; display: block; margin: .6rem 0 .25rem; }
.mt-search-ic { position: absolute; left: .85rem; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 1.2rem; pointer-events: none; }
.mt-search input { width: 100%; min-height: 50px; font: inherit; font-size: 16px; color: var(--text); background: var(--bg-card); border: 1px solid var(--border); border-radius: 14px; padding: .7rem .9rem .7rem 2.4rem; -webkit-appearance: none; appearance: none; }
.mt-search input:focus { outline: 2px solid var(--accent); outline-offset: 0; }
.mt-count { margin: .2rem .2rem .35rem; font-size: .85rem; }
.mt-list { list-style: none; margin: 0 -4px; padding: 0 4px calc(1rem + env(safe-area-inset-bottom)); overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; flex: 1 1 auto; }
.mt-list li + li { margin-top: 6px; }
.mt-sheet button.mt-opt { display: flex; align-items: center; gap: .6rem; width: 100%; min-height: 60px; padding: .55rem .85rem; border-radius: 14px; text-align: left; background: var(--bg-card); border: 1px solid var(--border); color: var(--text); font-weight: 650; font-size: 1rem; }
.mt-sheet button.mt-opt:hover { transform: none; border-color: rgba(26,159,255,.5); }
.mt-sheet button.mt-opt.on { border-color: var(--accent); background: rgba(26,159,255,.12); box-shadow: 0 0 0 1px var(--accent) inset; }
.mt-opt .mt-tn { flex: 1 1 auto; }
.mt-opt-pool { flex: none; font-size: .75rem; font-weight: 750; color: var(--muted); padding: .15rem .5rem; border-radius: 999px; background: rgba(148,163,184,.14); }
.mt-opt-check { flex: none; width: 1.4rem; text-align: center; color: var(--accent); font-weight: 900; font-size: 1.15rem; }
.mt-nohits { padding: 1.2rem .5rem; text-align: center; color: var(--muted); }
@media (min-width: 720px) {
  .mt-sheet { align-items: center; padding: 2rem; }
  .mt-sheet-box { height: auto; max-height: min(720px, 86vh); border-radius: 22px; border-bottom: 1px solid var(--border); transform: translateY(16px); opacity: 0; transition: transform .18s ease, opacity .18s ease; padding-top: .8rem; }
  .mt-sheet.open .mt-sheet-box { transform: none; opacity: 1; }
  .mt-sheet-grip { display: none; }
  .mt-list { padding-bottom: 1rem; }
}
/* loading skeleton (same footprint as the real page, so nothing jumps when data arrives) */
.mt-skel { display: block; border-radius: 12px; background: linear-gradient(90deg, rgba(148,163,184,.12) 25%, rgba(148,163,184,.22) 37%, rgba(148,163,184,.12) 63%); background-size: 400% 100%; animation: mtSkel 1.3s ease infinite; }
@keyframes mtSkel { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }
@media (prefers-reduced-motion: reduce) { .mt-skel { animation: none; } }
.mt-skel-top { height: 44px; margin-bottom: .35rem; width: 60%; }
.mt-skel-head { height: 58px; margin: .1rem 0 .7rem; }
.mt-skel-card { height: 236px; margin-bottom: .75rem; border-radius: 18px; }
.mt-skel-chips { height: 118px; margin-bottom: .75rem; border-radius: 14px; }
@media (min-width: 560px) { .mt-skel-chips { height: 62px; } }
.mt-app .nav-links a, .mt-app .brand { min-height: 44px; display: inline-flex; align-items: center; }
.mt-app .brand { min-width: 44px; justify-content: center; }
/* desktop: the full bracket gets a wider frame than the 680 px column so more rounds fit */
@media (min-width: 1024px) { .mt-pv-bracket .mt-bracket { width: min(1180px, calc(100vw - 5rem)); margin-left: calc((100% - min(1180px, calc(100vw - 5rem))) / 2); } }
/* ---------- Bracket boxes: no "Final" badge inside match boxes (round headers + match labels identify them) ---------- */
.sc-bracket .sc-final { display: none !important; }
/* ---------- Finished tournament (tournament.html when Completed): condensed hero + podium + Top Finishers ---------- */
.tour-hero.is-complete { grid-template-columns: 1fr; }
.tour-hero.is-complete .tour-side, .tour-hero.is-complete .tour-summary, .tour-hero.is-complete .info-grid,
.tour-hero.is-complete .payout-row, .tour-hero.is-complete .fee-box { display: none !important; }
.tour-hero.is-complete .tour-info { max-width: 880px; width: 100%; margin: 0 auto; }
.tour-hero.is-complete .hosted-by { min-height: 44px; }
.fin-mode .nav-links a, .fin-mode .brand { min-height: 44px; display: inline-flex; align-items: center; }
.fin-mode .tabs .tab { min-height: 44px; font-size: 1rem; }
.fin-mode main { overflow-x: clip; }
.fin-hero { margin-top: .4rem; }
.fin-replays { display: flex; align-items: center; gap: .6rem; width: fit-content; max-width: 100%; min-height: 48px; padding: .6rem 1.1rem; margin: 0 0 1rem; border-radius: 14px; background: #dc2626; color: #fff !important; font-weight: 750; font-size: 1rem; text-decoration: none; }
.fin-replays:hover { filter: brightness(1.08); }
.fin-replays:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.fin-replays span:last-child { margin-left: auto; padding-left: .3rem; }
@media (max-width: 560px) { .fin-replays { width: 100%; } }
.fin-tn { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.fin-tn1, .fin-tn2 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fin-tn2 { opacity: .78; font-size: .92em; }
/* podium: champion on top (phones), then 2nd + 3rd side by side; 2-1-3 podium on wider screens */
.fin-podium { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.fin-pod { display: flex; flex-direction: column; align-items: center; text-align: center; min-width: 0; padding: .8rem .65rem .85rem; border-radius: 16px; border: 1px solid var(--border); background: rgba(148,163,184,.08); }
.tour-info.has-cover .fin-pod { background-color: rgba(0,0,0,.45); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.fin-pod.gold { grid-column: 1 / -1; border-color: rgba(251,191,36,.6); background-image: linear-gradient(180deg, rgba(251,191,36,.18), transparent 75%); }
.fin-pod.silver { border-color: rgba(203,213,225,.5); }
.fin-pod.bronze { border-color: rgba(222,141,76,.55); }
.fin-pod-cup { line-height: 0; margin-bottom: .3rem; }
.fin-pod-label { font-size: .78rem; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.fin-pod.gold .fin-pod-label { color: var(--amber); font-size: .85rem; }
.fin-pod-label small { text-transform: none; letter-spacing: 0; font-weight: 600; }
.fin-pod-team { display: flex; flex-direction: column; align-items: center; width: 100%; min-width: 0; margin-top: .35rem; font-weight: 750; font-size: 1rem; }
.fin-pod.gold .fin-pod-team { font-size: 1.25rem; }
.fin-pod-team .fin-tn { width: 100%; align-items: center; }
.fin-pod-team .fin-tn1, .fin-pod-team .fin-tn2 { max-width: 100%; }
.fin-pod-rec { margin-top: .25rem; padding: .05rem .55rem; border-radius: 999px; background: rgba(148,163,184,.18); font-size: .85rem; font-weight: 750; font-variant-numeric: tabular-nums; }
.fin-pod-pay { margin-top: .45rem; font-size: 1.15rem; font-weight: 850; color: var(--green); font-variant-numeric: tabular-nums; }
.fin-pod.gold .fin-pod-pay { font-size: 1.45rem; }
html[data-theme="light"] .tour-info:not(.has-cover) .fin-pod { background-color: #fff; }
html[data-theme="light"] .tour-info:not(.has-cover) .fin-pod.gold .fin-pod-label { color: #b45309; }
html[data-theme="light"] .tour-info:not(.has-cover) .fin-pod-pay { color: #047857; }
@media (min-width: 640px) {
  .fin-podium { grid-template-columns: 1fr 1.15fr 1fr; align-items: end; }
  .fin-pod.gold { grid-column: auto; order: 2; padding-top: 1.1rem; padding-bottom: 1.2rem; }
  .fin-pod.silver { order: 1; } .fin-pod.bronze { order: 3; }
}
/* Results panel: segmented switch, Top Finishers list, finished bracket with round chips */
.fin { font-size: 1rem; }
.fin-seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; padding: 4px; margin: .2rem 0 .9rem; border-radius: 14px; background: rgba(148,163,184,.14); border: 1px solid var(--border); max-width: 560px; }
button.fin-seg-b { min-height: 44px; border-radius: 11px; background: transparent; color: var(--muted); font-weight: 750; font-size: 1rem; padding: .4rem .6rem; }
button.fin-seg-b.on { background: var(--bg-card); color: var(--text); box-shadow: 0 1px 4px rgba(0,0,0,.25); }
button.fin-seg-b:hover { transform: none; }
.fin-seg-b:focus-visible, .fin-round-b:focus-visible, .fin-path:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.fin-pane[hidden] { display: none !important; }
.fin-top { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; max-width: 760px; }
.fin-row { display: grid; grid-template-columns: 2.4rem minmax(0, 1fr) auto; align-items: center; gap: .65rem; min-height: 64px; padding: .5rem .55rem .5rem .7rem; border-radius: 14px; border: 1px solid var(--border); background: var(--bg-card); }
.fin-row.p1 { border-color: rgba(251,191,36,.55); background-image: linear-gradient(90deg, rgba(251,191,36,.12), transparent 60%); }
.fin-row.p2 { border-color: rgba(203,213,225,.45); } .fin-row.p3 { border-color: rgba(222,141,76,.5); }
.fin-rank { display: grid; place-items: center; width: 2.4rem; height: 2.4rem; border-radius: 50%; background: rgba(148,163,184,.14); font-weight: 850; font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.fin-row.p1 .fin-rank, .fin-row.p2 .fin-rank, .fin-row.p3 .fin-rank { background: none; }
.fin-row-main { display: flex; flex-direction: column; min-width: 0; }
.fin-row-main .fin-tn { font-weight: 750; font-size: 1rem; }
.fin-row-sub { font-size: .88rem; color: var(--muted); margin-top: .1rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fin-row.p1 .fin-place { color: var(--amber); font-weight: 750; }
html[data-theme="light"] .fin-row.p1 .fin-place { color: #b45309; }
.fin-rec { font-variant-numeric: tabular-nums; font-weight: 650; }
.fin-path { display: inline-flex; align-items: center; justify-content: center; gap: .2rem; min-width: 44px; min-height: 44px; padding: 0 .75rem; border-radius: 999px; color: var(--accent); font-weight: 700; font-size: .92rem; background: rgba(26,159,255,.1); border: 1px solid rgba(26,159,255,.3); text-decoration: none; }
html[data-theme="light"] .fin-path { color: var(--accent-2); }
.fin-rounds { display: flex; gap: .4rem; overflow-x: auto; padding: 0 0 .5rem; margin: 0 0 .4rem; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.fin-rounds::-webkit-scrollbar { display: none; }
button.fin-round-b { flex: none; min-height: 44px; padding: .45rem .95rem; border-radius: 999px; background: rgba(148,163,184,.12); color: var(--text); border: 1px solid var(--border); font-weight: 700; font-size: .95rem; }
button.fin-round-b:hover { transform: none; border-color: rgba(26,159,255,.5); }
button.fin-round-b.on { background: var(--accent); color: #fff; border-color: var(--accent); }
.fin-br .sc-bracket-scroll { -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; }
/* phones: each round column fits the frame (with a peek of the next), long team names wrap instead of widening it */
/* Finished bracket columns: long names wrap (never widen a column). Phones: one full round per screen (frame width
   minus the edge gaps), scrolled column by column. Wider screens: flexible columns, so 3-4 rounds fit with no scrolling. */
.fin-br .sc-bcol, .fin-br .sc-match { min-width: 0; }
.fin-br .sc-team { white-space: normal; overflow-wrap: anywhere; line-height: 1.3; }
@media (max-width: 520px) {
  .fin-br .sc-bracket > .sc-bcol { flex: 0 0 min(420px, calc(100vw - 62px)); }
  .fin-br .sc-bcol.sc-champ { flex: 1 1 100%; }
}
@media (min-width: 521px) { .fin-br .sc-bracket > .sc-bcol { flex: 1 1 300px; min-width: 250px; max-width: 360px; } }
/* Edge fades sit over the gap between columns (scroll stops leave a 14px gap), not over seed badges / names. */
.fin-br .sc-bracket-frame::before, .fin-br .sc-bracket-frame::after, .mt-bracket .sc-bracket-frame::before, .mt-bracket .sc-bracket-frame::after { width: 14px; }
.mt-bracket .sc-bracket > .sc-bcol { min-width: 0; }
.mt-bracket .sc-match { min-width: 0; }
.mt-bracket .sc-team { white-space: normal; overflow-wrap: anywhere; line-height: 1.3; }
/* Notch-safe spacing (env() is 0 unless the page opts into viewport-fit=cover, so other pages are unchanged). */
.wrap { width: min(1120px, calc(100% - 2rem - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px))); }
body.fin-mode .nav { padding-top: env(safe-area-inset-top, 0px); }
body.fin-mode footer { padding-bottom: calc(2rem + env(safe-area-inset-bottom, 0px)); }
@media (max-width: 560px) {
  .fin-mode .nav-inner { padding-top: .4rem; padding-bottom: .4rem; }
  .fin-mode .brand { font-size: .95rem; gap: .5rem; }
  .fin-mode .brand img.logo-img { width: 32px; height: 32px; }
  .fin-mode .nav-links a:not(.btn) { display: none; } /* the logo already links Home */
  .fin-mode .nav-links .btn { padding: .5rem .9rem; font-size: .88rem; min-height: 44px; display: inline-flex; align-items: center; white-space: nowrap; }
}
/* Finished page: phone text + tap-target floor (16px body text, 44px targets) */
.fin-mode .my-team-btn { min-height: 44px; font-size: 1rem; }
.fin-row .fin-tn2 { font-size: 1em; }
.fin-row-sub { font-size: 1rem; white-space: normal; overflow: visible; line-height: 1.3; }
.fin-row-sub .fin-place, .fin-row-sub .fin-rec { white-space: nowrap; }
.fin-path { font-size: 1rem; }
.fin-pod-label { font-size: .85rem; }
.fin-pod.gold .fin-pod-label { font-size: .92rem; }
.fin-pod-rec { font-size: .95rem; }
/* My Team: both players of a team carry equal weight (same size, weight and color) everywhere */
.mt-tn .mt-tn2, .mt-myname .mt-tn2 { color: inherit; font-size: inherit; font-weight: inherit; opacity: 1; }
.mt-table tr.qualify td.tm .mt-tn2 { color: var(--green); font-weight: 700; }
html[data-theme="light"] .mt-table tr.qualify td.tm .mt-tn2 { color: #047857; }
/* My Team: Result card (completed tournament) */
.mt-resultcard { margin-bottom: .75rem; }
.mt-res-main { display: flex; align-items: center; gap: .9rem; margin-top: .35rem; min-width: 0; }
.mt-res-cup { flex: none; display: inline-flex; width: 64px; height: 64px; align-items: center; justify-content: center; }
.mt-res-cup svg, .mt-res-cup img { width: 64px; height: 64px; }
.mt-res-text { min-width: 0; }
.mt-res-place { font-size: 1.75rem; font-weight: 820; line-height: 1.15; letter-spacing: -.01em; }
.mt-res-place small { font-size: 1rem; font-weight: 650; color: var(--muted); }
.mt-res-rec { margin-top: .2rem; font-size: 1rem; color: var(--muted); font-weight: 650; }
.mt-res-pay { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin-top: .8rem; min-height: 48px; padding: .5rem .9rem; border-radius: 12px; background: rgba(52,211,153,.12); border: 1px solid rgba(52,211,153,.35); }
.mt-res-pay-l { font-size: 1rem; font-weight: 700; }
.mt-res-pay-v { font-size: 1.5rem; font-weight: 820; color: var(--green); font-variant-numeric: tabular-nums; }
html[data-theme="light"] .mt-res-pay-v { color: #047857; }
.mt-resultcard.place-1 { border-color: rgba(251,191,36,.65); background-image: linear-gradient(180deg, rgba(251,191,36,.16), transparent 70%); }
.mt-resultcard.place-1 .mt-res-place { color: var(--amber); }
html[data-theme="light"] .mt-resultcard.place-1 .mt-res-place { color: #b45309; }
.mt-resultcard.place-2 { border-color: rgba(203,213,225,.55); background-image: linear-gradient(180deg, rgba(203,213,225,.14), transparent 70%); }
.mt-resultcard.place-3 { border-color: rgba(217,119,6,.5); background-image: linear-gradient(180deg, rgba(217,119,6,.13), transparent 70%); }
/* Finished page: both players equal too (same size, weight, color), matching My Team */
.fin-tn .fin-tn2 { opacity: 1; font-size: inherit; font-weight: inherit; color: inherit; }
/* Completed page sections: Standings <-> Players, Streams, Promo (then Event Sponsors) */
.fin-mode [data-tabs] > .tabs { display: none; }
.fin-mode #panel-pools { display: block; }
.fin-sections { display: flex; flex-direction: column; gap: 0; }
.fin-sec { margin-top: 1.6rem; min-width: 0; }
.fin-sec[hidden], .fin-sec .fin-seg[hidden] { display: none; }
.fin-sec .panel { display: block; }
.fin-sec .panel[hidden] { display: none; }
.fin-sec-lists.has-seg .panel .section-title h2 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.fin-sec-lists .fin-seg { margin-bottom: .6rem; }
.fin-sec .section-title p { font-size: 1rem; }
.fin-sec-streams .stream-previews { grid-template-columns: 1fr; }
.fin-sec-streams .stream-previews > * { grid-column: 1 / -1 !important; }
@media (min-width: 720px) {
  .fin-sec-streams .stream-previews { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fin-sec-streams .stream-previews.sp-n3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .fin-sec-streams .stream-previews.sp-n2 > *, .fin-sec-streams .stream-previews.sp-n3 > * { grid-column: auto !important; }
  .fin-sec-streams .stream-previews.sp-n3 .sp-tile:not(:first-child) .sp-play { width: 3.1rem; height: 3.1rem; }
  .fin-sec-streams .stream-previews.sp-n3 .sp-tile:not(:first-child) .sp-watch { font-size: .85rem; }
}
.fin-sec-streams .sp-card, .fin-sec-streams .sp-tile a { min-height: 44px; }
.fin-sec-promo .promo-box { min-height: 96px; }
.fin-mode #sponsors { margin-top: 1.6rem; }
/* Completed page: "Pool Play Results" (round picker + that round's score cards) */
.fin-sec-lists .fin-seg-b[hidden] { display: none; }
.fin-sec-lists button.fin-seg-b { line-height: 1.15; white-space: normal; }
.fin-sec-lists.has-seg .fin-pres .section-title h2 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.fin-pres-bar { margin: .2rem 0 .9rem; }
.fin-pres-bar select { min-height: 44px; font-size: 1rem; }
@media (max-width: 719px) { .fin-pres-bar .sc-pick, .fin-pres-bar .sc-pick select { width: 100%; min-width: 0; } }

/* Finished page on desktop: use the width (phones unchanged) */
@media (min-width: 1024px) {
  .fin-mode main.wrap { width: min(1240px, calc(100% - 2.5rem - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px))); }
  .tour-hero.is-complete .tour-info { max-width: none; }
  .fin-podium { max-width: 1040px; margin: 0 auto; gap: 1rem; }
  .fin-pod { padding: 1.1rem 1rem 1.2rem; }
  .fin-top { max-width: none; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: repeat(var(--fin-rows, 4), auto); grid-auto-flow: column; column-gap: 1rem; }
  .fin-seg { max-width: 560px; }
  .fin-sec-lists .fin-seg { max-width: 560px; }
}
/* Quick-jump row under "Hosted by": one row; on phones it scrolls sideways inside the row */
.quick-nav { display: flex; gap: .5rem; margin: .75rem 0 .35rem; overflow-x: auto; overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch; scrollbar-width: none; padding: 2px 2px 4px; }
.quick-nav::-webkit-scrollbar { display: none; }
.quick-nav[hidden] { display: none; }
.qn-b { flex: none; display: inline-flex; align-items: center; gap: .45rem; min-height: 44px; padding: .5rem 1rem; border-radius: 999px; white-space: nowrap; font-size: 1rem; font-weight: 750; text-decoration: none;
  color: var(--accent); background: rgba(26,159,255,.12); border: 1px solid rgba(26,159,255,.4); }
.qn-b:hover { background: rgba(26,159,255,.2); }
.qn-b:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.qn-watch { color: #fff; background: #dc2626; border-color: #dc2626; }
.qn-watch:hover { background: #b91c1c; }
.qn-dot { width: .55rem; height: .55rem; border-radius: 50%; background: #fff; box-shadow: 0 0 0 3px rgba(255,255,255,.3); }
html[data-theme="light"] .qn-b:not(.qn-watch) { color: var(--accent-2); }
.tour-info.has-cover .qn-b:not(.qn-watch) { color: #fff; background: rgba(11,15,26,.55); border-color: rgba(255,255,255,.35); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.tour-hero.is-complete .quick-nav { margin-bottom: .9rem; }
/* Quick-jump row now sits above the tournament info card (its own row under the site header) */
main > .quick-nav { margin: 1rem 0 .1rem; }
main > .quick-nav + .tour-hero { padding-top: .75rem; }
/* Live "Pools and Playoff Bracket": round navigation (prev/next arrows + round chips), phone-first, 44px targets */
.pr-nav { margin: .2rem 0 1rem; }
.pr-bar { display: flex; align-items: center; gap: .4rem; }
.pr-chips { position: relative; flex: 1 1 auto; min-width: 0; display: flex; gap: .4rem; overflow-x: auto; padding: 2px; scrollbar-width: none; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; scroll-padding: 0 12px; }
.pr-chips::-webkit-scrollbar { display: none; }
button.pr-chip { position: relative; flex: none; display: inline-flex; align-items: center; gap: .4rem; min-height: 44px; padding: .45rem .95rem; border-radius: 999px; background: rgba(148,163,184,.12); color: var(--text); border: 1px solid var(--border); font-weight: 700; font-size: 1rem; white-space: nowrap; box-shadow: none; }
button.pr-chip:hover { transform: none; border-color: rgba(26,159,255,.5); }
button.pr-chip.on { background: var(--accent); color: #fff; border-color: var(--accent); }
button.pr-chip.is-done:not(.on) { color: var(--muted); }
.pr-check { font-size: .9em; color: var(--green, #22c55e); }
button.pr-chip.on .pr-check { color: #fff; }
.pr-dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--rose); box-shadow: 0 0 0 3px rgba(251,113,133,.22); }
button.pr-chip.on .pr-dot { background: #fff; box-shadow: 0 0 0 3px rgba(255,255,255,.3); }
button.pr-arrow { flex: none; width: 44px; height: 44px; min-height: 44px; padding: 0; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; background: rgba(148,163,184,.12); color: var(--text); border: 1px solid var(--border); box-shadow: none; }
button.pr-arrow:hover:not(:disabled) { transform: none; border-color: rgba(26,159,255,.5); color: var(--accent); }
button.pr-arrow:disabled { opacity: .35; cursor: default; }
button.pr-golive { display: inline-flex; align-items: center; gap: .5rem; min-height: 44px; margin-top: .6rem; padding: .45rem 1rem; border-radius: 999px; font-size: 1rem; font-weight: 700; color: var(--rose); background: rgba(251,113,133,.1); border: 1px solid rgba(251,113,133,.4); box-shadow: none; }
button.pr-golive:hover { transform: none; background: rgba(251,113,133,.18); }
html[data-theme="light"] button.pr-golive { color: #be123c; }
html[data-theme="light"] button.pr-chip.is-done:not(.on) { color: #475569; }
.pr-chip:focus-visible, .pr-arrow:focus-visible, .pr-golive:focus-visible, .pr-pg:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.pr-pager { display: flex; justify-content: space-between; gap: .6rem; margin-top: 1rem; }
button.pr-pg { display: inline-flex; align-items: center; gap: .35rem; min-height: 44px; padding: .45rem 1rem .45rem .7rem; border-radius: 999px; font-size: 1rem; font-weight: 700; color: var(--text); background: rgba(148,163,184,.12); border: 1px solid var(--border); box-shadow: none; }
button.pr-pg.pr-pg-next { padding: .45rem .7rem .45rem 1rem; }
button.pr-pg:hover { transform: none; border-color: rgba(26,159,255,.5); }
.pr-br .sc-bracket-scroll { -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; }
.pr-br .sc-bcol, .pr-br .sc-match { min-width: 0; }
.pr-br .sc-team { white-space: normal; overflow-wrap: anywhere; line-height: 1.3; }
.pr-br .sc-bracket-frame::before, .pr-br .sc-bracket-frame::after { width: 14px; }
@media (max-width: 520px) { .pr-chips { margin: 0 -2px; } }

/* Oct 8: Organizer dashboard table swipes sideways on phones (Players, Payments, Manage / Public View reachable) */
#desk-table.desk-scroll { overflow-x: auto; overflow-y: hidden; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; touch-action: pan-x pan-y; scroll-snap-type: none; }
#desk-table.desk-scroll table { min-width: 760px; }
#desk-table.desk-scroll td:first-child, #desk-table.desk-scroll th:first-child { position: sticky; left: 0; z-index: 1; background: var(--bg-card); min-width: 9.5rem; max-width: 12rem; box-shadow: 1px 0 0 var(--border); }
#desk-table.desk-scroll td .btn { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; }
#desk-table.desk-scroll td:first-child a { display: inline-block; min-height: 44px; padding: .55rem 0; }
.desk-swipe { display: none; margin: 0 0 .6rem; font-size: .85rem; }
@media (max-width: 820px) { .desk-swipe { display: block; } }
.desk-swipe[hidden] { display: none !important; }

/* Oct 8: organizer "About" on the public profile + Account settings field */
.host-about { padding: 1.1rem 1.5rem 1.2rem; margin: -0.4rem 0 1.2rem; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.host-about-title { margin: 0 0 .45rem; font-size: 1.05rem; }
.host-about-text { margin: 0; white-space: pre-line; line-height: 1.55; overflow-wrap: anywhere; color: var(--text); }
@media (max-width: 560px) { .host-about { padding: 1rem 1.1rem; } }
.acct-bio-field { margin-top: 1rem; }
.acct-bio-field textarea { min-height: 120px; }
.acct-bio-left { white-space: nowrap; }
@media (max-width: 560px) {
  #desk-table.desk-scroll td:first-child, #desk-table.desk-scroll th:first-child { min-width: 7.2rem; max-width: 8.2rem; font-size: .88rem; }
  #desk-table.desk-scroll td:last-child { white-space: normal !important; }
  #desk-table.desk-scroll td:last-child .btn { display: flex; width: 100%; min-width: 7.6rem; margin: .2rem 0; }
  #desk-table.desk-scroll table { min-width: 640px; }
}

/* Oct 9: All match results (results.html, organizer only) */
.rs-main { padding-top: 1.2rem; padding-bottom: 2rem; }
.rs-top { display: flex; justify-content: space-between; gap: .6rem; flex-wrap: wrap; margin-bottom: 1rem; }
.rs-top .btn { min-height: 44px; display: inline-flex; align-items: center; }
.rs-hero { margin-bottom: 1.2rem; }
.rs-hero h1 { margin: .35rem 0 .3rem; font-size: clamp(1.35rem, 5vw, 2rem); line-height: 1.2; }
.rs-champ { margin: .5rem 0 0; font-size: 1.05rem; }
.rs-hint { font-size: .82rem; }
.rs-sec { margin-top: 1.4rem; }
.rs-sec > h2 { font-size: 1.25rem; margin: 0 0 .6rem; padding-bottom: .4rem; border-bottom: 2px solid var(--border); }
.rs-round { margin: 0 0 1.1rem; break-inside: avoid-page; }
.rs-round > h3 { font-size: 1rem; margin: .4rem 0 .55rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.rs-grid { display: grid; gap: .6rem; grid-template-columns: 1fr; }
@media (min-width: 760px) { .rs-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1150px) { .rs-grid { grid-template-columns: 1fr 1fr 1fr; } }
.rs-match { background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px; padding: .6rem .75rem; break-inside: avoid; }
.rs-head { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; margin-bottom: .35rem; }
.rs-label { font-size: .8rem; color: var(--muted); font-weight: 600; }
.rs-team { display: flex; align-items: center; justify-content: space-between; gap: .6rem; padding: .35rem 0; border-top: 1px solid var(--border); }
.rs-team:first-of-type { border-top: 0; }
.rs-tn { display: flex; align-items: center; gap: .35rem; min-width: 0; flex: 1; }
.rs-players { display: flex; flex-wrap: wrap; align-items: center; gap: .15rem .35rem; min-width: 0; }
.rs-player { display: inline-flex; align-items: center; gap: .3rem; font-weight: 600; overflow-wrap: anywhere; }
.rs-amp { color: var(--muted); }
.rs-dupr { font-size: .68rem; font-weight: 700; letter-spacing: .03em; padding: .05rem .32rem; border-radius: 5px; background: rgba(26,159,255,.14); color: #93c5fd; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
html[data-theme="light"] .rs-dupr { background: rgba(29,78,216,.1); color: #1d4ed8; }
.rs-team.win .rs-name { color: var(--green); }
html[data-theme="light"] .rs-team.win .rs-name { color: #047857; }
.rs-team.lose { opacity: .85; }
.rs-check { color: var(--green); font-weight: 800; }
.rs-scores { display: flex; gap: .35rem; flex: none; }
.rs-scores b { min-width: 1.8rem; text-align: center; font-variant-numeric: tabular-nums; }
.rs-team.win .rs-scores b { color: var(--green); }
.rs-bye { margin: .45rem 0 0; }
.rs-msg { max-width: 34rem; }
.rs-msg .btn { margin-top: .6rem; min-height: 44px; display: inline-flex; align-items: center; }
/* Dashboard: results button in the Status column */
.desk-results { display: block; margin-top: .45rem; }
.desk-results .btn { min-height: 44px; display: inline-flex; align-items: center; white-space: nowrap; font-size: .85rem; padding: .4rem .7rem; }
.desk-results .btn[disabled] { opacity: .45; cursor: not-allowed; filter: grayscale(1); transform: none; }
.desk-results-hint { display: block; font-size: .74rem; margin-top: .2rem; white-space: normal; max-width: 12rem; }
@media print {
  .nav, footer, .rs-top, .rs-hint, .banner, .db-status { display: none !important; }
  body, html { background: #fff !important; color: #000 !important; }
  .rs-match { border-color: #999; background: #fff !important; color: #000; }
  .rs-grid { grid-template-columns: 1fr 1fr !important; }
  .rs-dupr { color: #000 !important; background: #eee !important; }
  .rs-team.win .rs-name, .rs-team.win .rs-scores b, .rs-check { color: #000 !important; text-decoration: underline; }
}

/* Oct 9: horizontal logo banner in the top bar (icon + wordmark). The bar is inverted from the page theme:
   white bar on dark pages -> navy logo; navy bar on light pages -> light logo. */
.brand.brand-banner { display: inline-flex; align-items: center; flex: 0 1 auto; min-width: 0; line-height: 0; padding: .25rem 0; }
.logo-banner { display: block; height: 30px; width: auto; max-width: 100%; object-fit: contain; }
.logo-banner.lb-light { display: none; }
html[data-theme="light"] .logo-banner.lb-navy { display: none; }
html[data-theme="light"] .logo-banner.lb-light { display: block; }
@media (max-width: 900px) { .logo-banner { height: 24px; } }
@media (max-width: 640px) {
  .nav-inner { flex-wrap: wrap; row-gap: .45rem; }
  .brand.brand-banner { flex: 1 1 100%; justify-content: center; }
  .logo-banner { height: auto; width: min(320px, 88vw); }
  .nav-links { width: 100%; justify-content: center; }
}

/* ---------- Saved sponsors (organizer_sponsors): Account settings library + director picker ---------- */
.splib-new {
  display: grid; grid-template-columns: 120px minmax(0, 1fr) auto; gap: .85rem; align-items: center;
  padding: .7rem; border: 1px dashed var(--border); border-radius: 12px; margin-top: .2rem;
}
.splib-new-thumb .meta, .sponsor-thumb .meta { font-size: .8rem; color: #64748b; }
.splib-new-btns { flex-direction: column; align-items: stretch; }
#sponsor-library .sponsor-btns { flex-wrap: wrap; align-items: center; justify-content: flex-end; }
#sponsor-library .org-ask { font-size: .85rem; }
.sponsor-row input.invalid, .splib-new input.invalid { border-color: var(--rose); }
.splib-pick { margin-top: 1rem; padding-top: .9rem; border-top: 1px solid var(--border); }
.splib-pick[hidden] { display: none; }
.splib-pick-head { display: flex; flex-wrap: wrap; gap: .4rem .8rem; align-items: baseline; justify-content: space-between; }
.splib-pick .meta { margin: .3rem 0 .6rem; }
.splib-manage { font-size: .88rem; color: var(--accent); }
.splib-chips { display: flex; flex-wrap: wrap; gap: .55rem; }
.splib-chip {
  display: flex; flex-direction: column; align-items: center; gap: .3rem; width: 116px; padding: .45rem; cursor: pointer;
  border: 1px solid var(--border); border-radius: 12px; background: rgba(255,255,255,.03); color: var(--text); font: inherit;
  transition: border-color .15s, transform .15s;
}
.splib-chip:hover:not(:disabled) { border-color: rgba(26,159,255,.6); transform: translateY(-2px); }
.splib-chip:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.splib-chip:disabled { cursor: default; opacity: .5; }
.splib-chip.used { opacity: .65; border-color: rgba(34,197,94,.45); }
.splib-chip-img { width: 100%; aspect-ratio: 3 / 2; border-radius: 8px; background: #f8fafc; display: grid; place-items: center; padding: .3rem; }
.splib-chip-img img { max-width: 100%; max-height: 100%; object-fit: contain; }
.splib-chip-name { font-size: .8rem; font-weight: 650; text-align: center; overflow-wrap: anywhere; line-height: 1.2; }
@media (max-width: 760px) {
  .splib-new { grid-template-columns: 96px minmax(0, 1fr); }
  .splib-new .sponsor-thumb { width: 96px; }
  .splib-new-btns { grid-column: 1 / -1; flex-direction: row; justify-content: flex-end; }
}

/* ---------- Oct 9 UX: sticky jump buttons, Share, "Now playing" strip ---------- */
main > .quick-nav { position: sticky; top: var(--hdr-h, 64px); z-index: 30; margin: .6rem -1rem .1rem; padding: .45rem 1rem .5rem; background: transparent; border-bottom: 1px solid transparent; transition: background .2s, box-shadow .2s; }
main > .quick-nav.stuck { background: rgba(10,14,30,.9); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-bottom-color: var(--border); box-shadow: 0 6px 16px rgba(0,0,0,.25); border-radius: 0 0 14px 14px; }
html[data-theme="light"] main > .quick-nav.stuck { background: rgba(255,255,255,.92); box-shadow: 0 6px 16px rgba(15,23,42,.12); }
.qn-share { margin-left: auto; gap: .4rem; }
.qn-share svg { flex: none; }
.apb-toast { position: fixed; left: 50%; bottom: calc(1.2rem + env(safe-area-inset-bottom, 0px)); transform: translate(-50%, 20px); opacity: 0; pointer-events: none; z-index: 100;
  background: #0f172a; color: #fff; padding: .7rem 1.1rem; border-radius: 12px; font-weight: 700; box-shadow: 0 12px 30px rgba(0,0,0,.35); transition: opacity .2s, transform .2s; }
.apb-toast.on { opacity: 1; transform: translate(-50%, 0); }
.now-strip { margin: .6rem 0 .2rem; padding: .9rem; border-radius: 18px; background: linear-gradient(180deg, rgba(239,68,68,.12), rgba(239,68,68,.03)); border: 1px solid rgba(239,68,68,.45); }
.now-strip[hidden] { display: none; }
.ns-head { display: flex; align-items: center; justify-content: space-between; gap: .6rem; margin-bottom: .65rem; }
.ns-head h2 { margin: 0; font-size: 1.2rem; display: flex; align-items: center; gap: .5rem; }
.ns-dot { width: 11px; height: 11px; border-radius: 50%; background: #ef4444; animation: hpPulseNs 1.6s infinite; }
@keyframes hpPulseNs { 0% { box-shadow: 0 0 0 0 rgba(239,68,68,.6); } 70% { box-shadow: 0 0 0 9px rgba(239,68,68,0); } 100% { box-shadow: 0 0 0 0 rgba(239,68,68,0); } }
.ns-all { font-weight: 700; font-size: .9rem; color: var(--accent); min-height: 44px; display: inline-flex; align-items: center; }
.ns-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: .6rem; }
.ns-card { display: flex; flex-direction: column; gap: .45rem; padding: .8rem .9rem; border-radius: 14px; background: var(--bg-card); border: 1px solid var(--border); min-width: 0; }
.ns-card.scored { border-color: rgba(239,68,68,.55); }
.ns-top { display: flex; align-items: center; gap: .45rem; flex-wrap: wrap; }
.ns-court { font-weight: 800; font-size: .95rem; }
.ns-live { display: inline-flex; align-items: center; gap: .3rem; font-size: .75rem; font-weight: 800; color: #fff; background: #dc2626; padding: .12rem .5rem; border-radius: 999px; }
.ns-label { font-size: .78rem; color: var(--muted); }
.ns-teams { display: flex; flex-direction: column; gap: .1rem; font-weight: 700; line-height: 1.3; }
.ns-vs { font-size: .72rem; font-weight: 700; color: var(--muted); text-transform: uppercase; }
.ns-team { overflow-wrap: anywhere; }
.ns-score { display: flex; flex-wrap: wrap; gap: .35rem; }
.ns-g { font-size: 1.15rem; font-weight: 800; font-variant-numeric: tabular-nums; padding: .1rem .5rem; border-radius: 8px; background: rgba(148,163,255,.12); }
.ns-soon { font-size: .85rem; color: var(--muted); }
.ns-watch { margin-top: auto; display: inline-flex; align-items: center; justify-content: center; gap: .45rem; min-height: 44px; border-radius: 12px; background: #dc2626; color: #fff; font-weight: 800; text-decoration: none; }
.ns-watch:hover { background: #b91c1c; }
@media (max-width: 640px) {
  .ns-row.multi { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: .6rem; margin: 0 -.9rem; padding: 0 .9rem .3rem; scrollbar-width: none; }
  .ns-row.multi::-webkit-scrollbar { display: none; }
  .ns-row.multi .ns-card { flex: 0 0 82%; scroll-snap-align: start; }
}
html[data-theme="light"] .now-strip { background: linear-gradient(180deg, rgba(239,68,68,.08), rgba(239,68,68,.02)); }

/* ---------- Oct 9 UX: dashboard pills, phone cards, Today's courts ---------- */
.pill.draft { background: rgba(148,163,184,.18); color: #94a3b8; }
.pill.done { background: rgba(16,185,129,.16); color: #34d399; }
html[data-theme="light"] .pill.done { color: #047857; }
html[data-theme="light"] .pill.draft { color: #475569; }
.desk-cards { display: none; }
@media (max-width: 640px) {
  .desk-cards { display: flex; flex-direction: column; gap: .75rem; }
  .desk-cards + #desk-table, #desk-swipe { display: none !important; }
}
.desk-card { padding: .9rem; border-radius: 14px; border: 1px solid var(--border); background: var(--bg-card); display: flex; flex-direction: column; gap: .35rem; }
.dc-top { display: flex; align-items: flex-start; justify-content: space-between; gap: .6rem; }
.dc-name { font-weight: 800; font-size: 1.05rem; color: var(--text); text-decoration: none; line-height: 1.3; }
.dc-top .pill { flex: none; }
.dc-btns { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; margin-top: .45rem; }
.dc-btn { min-height: 48px; display: inline-flex; align-items: center; justify-content: center; text-align: center; font-size: .95rem; padding: .5rem .7rem; }
.dc-btns .dc-btn:first-child { grid-column: 1 / -1; }
.dc-btn[disabled] { opacity: .5; cursor: not-allowed; }
.courts-card h3 { margin: 0; font-size: 1.1rem; }
.ct-block + .ct-block { margin-top: 1.2rem; padding-top: 1rem; border-top: 1px solid var(--border); }
.ct-top { display: flex; align-items: flex-start; justify-content: space-between; gap: .8rem; flex-wrap: wrap; margin-bottom: .7rem; }
.ct-top .meta { margin: .2rem 0 0; }
.ct-top .btn { min-height: 44px; }
.ct-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: .55rem; }
.ct { padding: .65rem .7rem; border-radius: 12px; border: 1px solid var(--border); background: rgba(148,163,255,.05); display: flex; flex-direction: column; gap: .35rem; min-width: 0; }
.ct-head { display: flex; align-items: center; justify-content: space-between; gap: .4rem; }
.ct-head .pill { font-size: .68rem; padding: .1rem .45rem; }
.ct-free { border-color: rgba(16,185,129,.5); background: rgba(16,185,129,.08); }
.ct-free .ct-state { color: #34d399; font-weight: 800; }
html[data-theme="light"] .ct-free .ct-state { color: #047857; }
.ct-waiting .ct-state { color: var(--muted); font-size: .88rem; }
.ct-playing.scored { border-color: rgba(239,68,68,.5); }
.ct-teams { display: flex; flex-direction: column; font-size: .88rem; font-weight: 700; line-height: 1.3; }
.ct-teams small { font-size: .68rem; color: var(--muted); text-transform: uppercase; }
.ct-teams span { overflow-wrap: anywhere; }
.ct-score b { font-variant-numeric: tabular-nums; margin-right: .3rem; }
@media (max-width: 640px) { .ct-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- Oct 9 UX: Create/Manage checklist, Duplicate last tournament, soft Publish warnings ---------- */
.dir-check { grid-column: 1 / -1; }
.ck-top { display: flex; align-items: baseline; justify-content: space-between; gap: .6rem; flex-wrap: wrap; }
.ck-top h3 { margin: 0; }
.ck-bar { height: 8px; border-radius: 999px; background: rgba(148,163,255,.15); overflow: hidden; margin: .6rem 0 .7rem; }
.ck-bar span { display: block; height: 100%; background: linear-gradient(90deg, #22c55e, #10b981); border-radius: inherit; transition: width .3s; }
.ck-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .45rem; }
.ck-step { display: inline-flex; align-items: center; gap: .45rem; min-height: 44px; padding: .35rem .8rem .35rem .45rem; border-radius: 999px; border: 1px solid var(--border); background: transparent; color: var(--text); font: inherit; font-weight: 700; cursor: pointer; }
.ck-ico { width: 26px; height: 26px; border-radius: 50%; display: inline-grid; place-items: center; font-size: .8rem; background: rgba(148,163,255,.15); color: var(--muted); }
.ck-step.done { border-color: rgba(16,185,129,.55); }
.ck-step.done .ck-ico { background: #10b981; color: #fff; }
.ck-dup { margin-top: .85rem; padding-top: .8rem; border-top: 1px dashed var(--border); display: flex; align-items: center; justify-content: space-between; gap: .6rem; flex-wrap: wrap; }
.ck-dup .btn { min-height: 44px; }
.ck-dup.open { display: block; }
.ck-dup-row { display: flex; align-items: flex-end; gap: .5rem; flex-wrap: wrap; }
.ck-dup-row .field { flex: 1 1 200px; margin: 0; }
@media (max-width: 640px) { .ck-steps { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); } .ck-step { width: 100%; } .ck-dup .btn { width: 100%; } }
.soft-warn { margin-top: .8rem; padding: .85rem 1rem; border-radius: 12px; border: 1px solid rgba(251,191,36,.55); background: rgba(251,191,36,.1); }
.soft-warn[hidden] { display: none; }
.soft-warn ul { margin: .45rem 0 .7rem 1.1rem; padding: 0; }
.soft-warn li { margin: .3rem 0; }
.soft-warn .linkish { background: none; border: 0; padding: .25rem .2rem; color: var(--accent); font: inherit; font-weight: 700; text-decoration: underline; cursor: pointer; min-height: 32px; }
.soft-warn .btn { min-height: 44px; }
.courts-card { margin-bottom: 1rem; }
#desk-dup[hidden] { display: none !important; }

/* ---------- Oct 9: in-progress game scores (same look on match cards, Now playing strip, My Team) ---------- */
.sc-out.prog { color: #f87171; font-style: italic; }
html[data-theme="light"] .sc-out.prog { color: #dc2626; }
.ns-g.prog { color: #fca5a5; outline: 1px dashed rgba(239,68,68,.6); }
html[data-theme="light"] .ns-g.prog { color: #b91c1c; }
.mt-score-now { display: flex; align-items: baseline; gap: .6rem; margin: .5rem 0 .2rem; }
.mt-score-v { font-size: 1.5rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.mt-prompt-ic svg { display: block; margin: 0 auto; }

/* Oct 10: dynamic pool courts — a pool match waiting for the next free court */
.gen-court.gen-court-next { opacity: .78; font-style: italic; }
.sc-autocourts { margin-top: .25rem; }

/* Oct 11: spectator Refresh button on the live Matches panel (44px tap target, phone-first) */
.pr-refresh-row { display: flex; align-items: center; justify-content: flex-end; gap: .6rem; margin: 0 0 .5rem; flex-wrap: wrap; }
button.pr-refresh { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; min-height: 44px; min-width: 44px; padding: .45rem 1.05rem; border-radius: 999px; font-size: 1rem; font-weight: 700; color: var(--text, #e6edf7); background: rgba(59,130,246,.16); border: 1px solid rgba(96,165,250,.45); box-shadow: none; cursor: pointer; touch-action: manipulation; }
button.pr-refresh:hover { transform: none; background: rgba(59,130,246,.26); }
button.pr-refresh:disabled { opacity: .75; cursor: progress; }
.pr-refresh-ic { font-size: 1.15rem; line-height: 1; display: inline-block; }
.pr-refresh-ic.spin { animation: prspin .9s linear infinite; }
@keyframes prspin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .pr-refresh-ic.spin { animation: none; } }
.pr-refresh-at { font-size: .85rem; }
html[data-theme="light"] button.pr-refresh { color: #0b5cad; background: rgba(26,159,255,.1); border-color: rgba(26,159,255,.4); }
@media (max-width: 600px) { .pr-refresh-row { justify-content: space-between; } .pr-refresh-row .pr-refresh-at { order: 2; } }

/* Oct 15: MLP (teams of 4) */
.mlp-team { display: grid; gap: .5rem; }
.mlp-team .rp-team { font-weight: 700; max-width: 22rem; }
.mlp-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem .9rem; }
.mlp-slot-lab { display: block; font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; opacity: .7; margin-bottom: .15rem; }
@media (max-width: 640px) { .mlp-grid { grid-template-columns: 1fr; } }
.sc-mlp .sc-row { display: flex; justify-content: space-between; gap: .5rem; align-items: center; }
.sc-mlp .mlp-sum { white-space: nowrap; }
.mlp-games { display: grid; gap: .3rem; margin-top: .45rem; }
.mlp-game { display: grid; grid-template-columns: 7.2rem minmax(0, 1fr) 2.6rem .8rem 2.6rem minmax(0, 1fr); align-items: center; gap: .35rem; font-size: .86rem; }
.mlp-gl { font-weight: 700; font-size: .78rem; opacity: .85; }
.mlp-pair { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; opacity: .85; }
.mlp-pb { text-align: right; }
.mlp-vs { text-align: center; opacity: .5; }
.mlp-game .sc-in, .mlp-game .sc-out { width: 100%; text-align: center; }
.mlp-dec { margin-top: .45rem; font-size: .85rem; font-weight: 600; }
.mlp-tie { padding: .5rem .6rem; border-radius: 10px; background: rgba(245, 158, 11, .14); border: 1px solid rgba(245, 158, 11, .5); display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
@media (max-width: 560px) {
  .mlp-game { grid-template-columns: minmax(0, 1fr) 2.4rem .6rem 2.4rem minmax(0, 1fr); }
  .mlp-gl { grid-column: 1 / -1; margin-top: .2rem; }
}
.mlp-mix { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .8rem; padding-top: .2rem; }
.mlp-mix .mlp-slot-lab { width: 100%; }
.mlp-mix select { background: #0a0e19; border: 1px solid var(--border); color: var(--text); border-radius: 8px; padding: .35rem .5rem; font: inherit; font-size: .9rem; }
.mlp-mix-lock { color: var(--amber, #f59e0b); }
.mlp-court-warn { margin: .5rem 0; padding: .55rem .7rem; border-radius: 10px; background: rgba(245, 158, 11, .14); border: 1px solid rgba(245, 158, 11, .55); font-size: .88rem; }
.mlp-gct { font-weight: 600; opacity: .75; margin-left: .25rem; }
.mt-mlp-plan { margin-top: .35rem; }

/* Oct 16: My Team for MLP (4 players, pairs, per-game progress) */
.mt-mlp-ppl{font-size:.85rem;opacity:.85;margin-top:.15rem}
.mt-mlp-pairs{list-style:none;margin:.35rem 0 0;padding:0;display:grid;grid-template-columns:1fr 1fr;gap:.15rem .75rem;font-size:.78rem}
.mt-mlp-pairs span{opacity:.65;font-weight:600}
.mt-mlp-prog{margin:.6rem 0 .2rem;display:grid;grid-template-columns:1fr 1fr;gap:.25rem .75rem}
.mt-mlp-prog .mt-label{grid-column:1/-1}
.mt-mlp-g{display:flex;justify-content:space-between;font-size:.85rem;padding:.2rem .45rem;border-radius:.4rem;background:rgba(127,127,127,.12)}
.mt-mlp-g b{white-space:nowrap;margin-left:.4rem}
.mt-mlp-g.ok b{color:var(--accent,#d9f34a)}
.mt-opt-ppl{font-size:.78rem;opacity:.75}
@media (max-width:420px){.mt-mlp-pairs{grid-template-columns:1fr}}

/* Oct 16: MLP score cards: team-colored sides + team names over each column (MLP only) */
.sc-mlp .mlp-side-0 .sc-team { border-left: 4px solid #38bdf8; padding-left: .45rem; }
.sc-mlp .mlp-side-1 .sc-team { border-left: 4px solid #fb923c; padding-left: .45rem; }
.mlp-ghead { font-size: .74rem; font-weight: 800; }
.mlp-ghead .mlp-th { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: .15rem .4rem; border-radius: 6px; }
.mlp-ghead .mlp-th-a { grid-column: 2 / 4; color: #38bdf8; background: rgba(56, 189, 248, .12); }
.mlp-ghead .mlp-th-b { grid-column: 5 / 7; color: #fb923c; background: rgba(251, 146, 60, .12); text-align: right; }
.mlp-pa { color: #7dd3fc; }
.mlp-pb { color: #fdba74; text-align: right; }
.mlp-game .sc-in[data-side="0"] { border-color: rgba(56, 189, 248, .65); }
.mlp-game .sc-in[data-side="1"] { border-color: rgba(251, 146, 60, .65); }
.mlp-game .sc-in { min-height: 2.6rem; font-size: 1.05rem; }
@media (max-width: 560px) { .mlp-ghead .mlp-gl { display: none; } .mlp-ghead .mlp-th-a { grid-column: 1 / 3; } .mlp-ghead .mlp-th-b { grid-column: 4 / 6; } }
.sc-bracket .mlp-game { grid-template-columns: minmax(0, 1fr) 2.6rem .6rem 2.6rem minmax(0, 1fr); }
.sc-bracket .mlp-gl { grid-column: 1 / -1; margin-top: .2rem; }
.sc-bracket .mlp-ghead .mlp-gl { display: none; }
.sc-bracket .mlp-ghead .mlp-th-a { grid-column: 1 / 3; }
.sc-bracket .mlp-ghead .mlp-th-b { grid-column: 4 / 6; }

.sc-mlp .mlp-pair { white-space: normal; overflow: visible; text-overflow: clip; line-height: 1.15; overflow-wrap: anywhere; }
.sc-mlp .mlp-nm { white-space: nowrap; }
@media (max-width: 560px) { .sc-mlp .mlp-nm { display: block; } .sc-mlp .mlp-amp { display: none; } }
.sc-bracket .sc-mlp .mlp-nm { display: block; } .sc-bracket .sc-mlp .mlp-amp { display: none; }

/* Oct 17: DUPR CSV buttons on the organizer match results page */
.rs-dupr { display: grid; gap: .6rem; margin: 0 0 1.2rem; }
@media print { .rs-dupr { display: none !important; } }

/* Nov 26: Scramble format (Manage page): hide bracket-only settings, show the 1-2 pools note */
.scr-only, .format-panel .hint.scr-only { display: none; } /* Nov 27: the Scramble pools note was showing for every format */
body.is-scramble .scr-only, body.is-scramble .format-panel .hint.scr-only { display: block; }
body.is-scramble .scr-hide { display: none !important; }
/* Nov 27: Pool Play + Double Elimination (Manage page) + the lower bracket (Scores, public page, My Team, Finished view) */
.de-only { display: none; }
body.is-dblelim .de-only { display: block; }
body.is-dblelim .de-hide { display: none !important; }
.sc-lower { margin-top: 1.4rem; padding-top: 1rem; border-top: 1px dashed rgba(148,163,184,.35); }
.sc-lower-h { margin: 0 0 .2rem; font-size: 1rem; letter-spacing: .02em; }
.sc-lower-h::before { content: "↓ "; color: var(--amber); }
.sc-lower-help { margin: 0 0 .7rem; font-size: .84rem; }
.sc-lower .sc-third-col h4 { color: var(--amber); }
.pr-lower .sc-lower { margin-top: 0; padding-top: 0; border-top: 0; }
#scramble-kind-field[hidden] { display: none; }
.scr-help { margin-top: .5rem; }
.checkin-solo { padding-top: .35rem; padding-bottom: .35rem; }
.format-choice[hidden], #team-type-field[hidden], .scr-help[hidden] { display: none !important; }

/* Nov 29: helpers. "Shared with you" cards on the dashboard, Helpers card on Manage. */
.help-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: .75rem; margin-top: .75rem; }
.desk-shared .help-closed { margin: .25rem 0; }
body.helper-only #billing-card, body.helper-only .desk-head-actions, body.helper-only main > .section-title,
body.helper-only main > .form-card:not(#desk-shared), body.helper-only main > .banner[data-i18n="desk.banner"],
body.helper-only #desk-courts, body.helper-only #desk-pay, body.helper-only footer a[href="director.html"] { display: none !important; }
.helpers-list { list-style: none; padding: 0; margin: .75rem 0 0; display: flex; flex-direction: column; gap: .5rem; }
.helpers-list li { display: flex; justify-content: space-between; align-items: center; gap: .75rem; flex-wrap: wrap; padding: .55rem .75rem; border: 1px solid var(--border); border-radius: 10px; }
.helpers-list .helper-email { font-weight: 600; word-break: break-all; }
.helpers-add { display: flex; gap: .5rem; flex-wrap: wrap; align-items: flex-end; margin-top: .75rem; }
.helpers-add .field { flex: 1 1 260px; margin: 0; }

/* ===== Nov 30: Team Battle (teambattle.js) ===== */
body.is-tb .tb-hide, body.is-tb #de-help { display: none !important; }
.tb-dot { display: inline-block; width: .7rem; height: .7rem; border-radius: 50%; margin-right: .4rem; vertical-align: -.05rem; flex: none; }
.tb-dot.tb-blue { background: #2563eb; box-shadow: 0 0 0 2px rgba(37,99,235,.3); }
.tb-dot.tb-black { background: #0b0f17; box-shadow: 0 0 0 2px rgba(203,213,225,.55); }
html[data-theme="light"] .tb-dot.tb-black { box-shadow: 0 0 0 2px rgba(15,23,42,.25); }
.tb-card textarea { width: 100%; min-height: 14rem; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .85rem; line-height: 1.45; }
.tb-result { margin-top: .75rem; display: grid; gap: .6rem; }
.tb-sum { margin: 0; }
.tb-msg { border-radius: 10px; padding: .55rem .75rem; font-size: .9rem; border: 1px solid var(--border); }
.tb-msg ul { margin: .3rem 0 0; padding-left: 1.1rem; }
.tb-msg.bad { border-color: rgba(244,63,94,.5); background: rgba(244,63,94,.08); }
.tb-msg.warn { border-color: rgba(251,191,36,.45); background: rgba(251,191,36,.07); }
.tb-msg.good { border-color: rgba(52,211,153,.45); background: rgba(52,211,153,.08); color: var(--green); font-weight: 600; }
.tb-rosters { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: .75rem; }
.tb-roster h5, .tb-roster h3 { display: flex; align-items: center; gap: .2rem; margin: 0 0 .35rem; }
.tb-roster ol { margin: 0; padding-left: 1.3rem; font-size: .9rem; }
.tb-pre summary { cursor: pointer; }
.tb-pre-round ul { list-style: none; margin: .25rem 0 .6rem; padding: 0; font-size: .88rem; display: grid; gap: .2rem; }
.tb-board { display: grid; grid-template-columns: 1fr auto 1fr; align-items: stretch; gap: .6rem; }
.tb-side { border: 1px solid var(--border); border-radius: 14px; padding: .8rem .9rem; text-align: center; background: rgba(255,255,255,.02); }
.tb-side.tb-blue { border-top: 4px solid #2563eb; }
.tb-side.tb-black { border-top: 4px solid #0b0f17; outline: 1px solid rgba(203,213,225,.15); }
.tb-side.lead { box-shadow: 0 0 0 2px rgba(52,211,153,.45); }
.tb-side-name { font-weight: 800; display: flex; align-items: center; justify-content: center; gap: .1rem; font-size: 1.02rem; }
.tb-side-big { font-size: 2.6rem; font-weight: 800; line-height: 1.1; margin-top: .3rem; display: flex; justify-content: center; gap: .35rem; }
.tb-side-big span { opacity: .4; }
.tb-side-cap { font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; opacity: .7; }
.tb-side-pd { margin-top: .4rem; font-size: .95rem; }
.tb-side-pd.up b, .tb-up { color: var(--green); }
.tb-side-pd.down b, .tb-down { color: var(--rose); }
.tb-side-pts { font-size: .8rem; }
.tb-vs { align-self: center; font-weight: 800; opacity: .55; font-size: .9rem; }
.tb-board-foot { text-align: center; margin: .6rem 0 0; }
.tb-h2 { margin: 1.2rem 0 .6rem; font-size: 1.15rem; }
.tb-pub .tb-h2:first-child { margin-top: 0; }
.tb-chips { display: flex; gap: .4rem; overflow-x: auto; padding: .2rem 0 .5rem; -webkit-overflow-scrolling: touch; scrollbar-width: thin; }
.tb-chip { flex: none; border: 1px solid var(--border); background: transparent; color: inherit; border-radius: 999px; padding: .35rem .8rem; font-weight: 600; font-size: .85rem; cursor: pointer; }
.tb-chip.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.tb-round h3 { margin: .9rem 0 .5rem; font-size: 1rem; }
.tb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: .6rem; }
.tb-match .sc-team { display: flex; align-items: center; min-width: 0; }
.tb-pair { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tb-live { font-size: .72rem; font-weight: 700; color: #fbbf24; margin-left: .4rem; }
.tb-save { min-height: 1.2em; margin: .1rem 0 .3rem; }
.tb-board-card { margin-bottom: .8rem; }
.tb-stats table { width: 100%; }
.tb-stats th, .tb-stats td { text-align: center; white-space: nowrap; }
.tb-stats th:nth-child(2), .tb-stats td:nth-child(2) { text-align: left; }
.tb-sort { background: none; border: 0; color: inherit; font: inherit; font-weight: 700; cursor: pointer; padding: .2rem .1rem; }
.tb-sort.on { color: var(--accent); }
.tb-rank { width: 2rem; opacity: .7; }
@media (max-width: 640px) {
  .tb-board { grid-template-columns: 1fr 1fr; }
  .tb-vs { display: none; }
  .tb-side { padding: .6rem .5rem; }
  .tb-side-name { font-size: .88rem; }
  .tb-side-big { font-size: 2rem; }
  .tb-grid { grid-template-columns: 1fr; }
  .tb-stats .tb-th-team, .tb-stats th.tb-th-played, .tb-stats td:last-child { display: none; }
  .tb-stats { overflow-x: auto; }
}
.tb-short { display: none; }
@media (max-width: 640px) {
  .tb-long { display: none; } .tb-short { display: inline; }
  .tb-stats th, .tb-stats td { padding-left: .3rem; padding-right: .3rem; }
  .tb-stats td:nth-child(2) { white-space: normal; }
  .tb-stats .pl-dupr { font-size: .7rem; }
}

/* Dec 1 (Nicholas): group sponsors (CMPBA) on the public tournament page, by tier: logo + name, or the name alone. */
.gsp { display: grid; gap: 1.3rem; margin-bottom: 1.2rem; }
.gsp-tier h3 { display: flex; align-items: center; gap: .5rem; margin: 0 0 .7rem; font-size: .95rem; letter-spacing: .08em; text-transform: uppercase; }
.gsp-tier h3 small { font-size: .72rem; padding: .05rem .5rem; border-radius: 999px; background: rgba(255,255,255,.1); color: var(--muted, #9aa4b2); letter-spacing: 0; }
.gsp-dot { width: .9rem; height: .9rem; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff3b0, #dcaa2c 55%, #a87a12); flex: none; }
.gsp-tier.silver .gsp-dot { background: radial-gradient(circle at 35% 30%, #fff, #b9bec5 55%, #7d8796); }
.gsp-tier.bronze .gsp-dot { background: radial-gradient(circle at 35% 30%, #ffd9b5, #c27a3d 55%, #7a4a22); }
.gsp-tier.equipment .gsp-dot { background: radial-gradient(circle at 35% 30%, #c9f3fb, #22a0b8 55%, #155e6e); }
.gsp-tier.charity .gsp-dot { background: radial-gradient(circle at 35% 30%, #ffd1db, #d03a58 55%, #8c1830); }
.gsp-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: .75rem; }
.gsp-item { display: flex; flex-direction: column; justify-content: center; gap: .2rem; min-height: 64px; padding: .7rem .85rem; border-radius: 12px; background: rgba(255,255,255,.04); border: 1px solid var(--border); border-top: 3px solid #dcaa2c; min-width: 0; }
.gsp-tier.silver .gsp-item { border-top-color: #b9bec5; } .gsp-tier.bronze .gsp-item { border-top-color: #c27a3d; }
.gsp-tier.equipment .gsp-item { border-top-color: #22a0b8; } .gsp-tier.charity .gsp-item { border-top-color: #d03a58; }
.gsp-item b { font-size: .95rem; line-height: 1.25; }
.gsp-item span { font-size: .82rem; color: var(--muted, #9aa4b2); }
.gsp-logo { display: flex; align-items: center; justify-content: center; height: 64px; margin-bottom: .35rem; padding: 6px; border-radius: 8px; background: #fff; }
.gsp-logo img { max-height: 52px; max-width: 100%; width: auto; height: auto; object-fit: contain; display: block; border-radius: 4px; }
@media (max-width: 520px) { .gsp-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .55rem; } .gsp-logo { height: 54px; } .gsp-logo img { max-height: 44px; } }
