/* SK Badminton Hub · Tournaments design system */
:root {
  --navy: #0b1a33;
  --navy-2: #13284d;
  --navy-3: #1d3a6b;
  --red: #e11d2e;
  --red-dark: #b81322;
  --ink: #14213d;
  --muted: #5b6475;
  --line: #e3e7ef;
  --line-soft: #eef1f6;
  --page: #f4f6fb;
  --card: #ffffff;
  --blue: #1f5fd6;
  --green: #12925a;
  --green-soft: #e3f6ec;
  --amber: #c27803;
  --amber-soft: #fff3d6;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 6px 18px rgba(16, 24, 40, .06);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  --display: "Montserrat", "Inter", system-ui, sans-serif;
  --script: "Caveat", cursive;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: var(--font); color: var(--ink); background: var(--page); font-size: 15px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
h1, h2, h3 { font-family: var(--display); line-height: 1.15; margin: 0 0 .4em; }
.wrap { max-width: 1280px; margin: 0 auto; padding: 0 24px; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- top bar ---------- */
.topbar { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 40; }
.topbar .wrap { display: flex; align-items: center; gap: 28px; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none !important; }
.brand svg { width: 34px; height: 34px; }
.brand b { font-family: var(--display); font-size: 1.25rem; letter-spacing: -.02em; }
.brand b span { color: var(--red); }
.brand small { display: block; font-size: .58rem; letter-spacing: .28em; color: var(--muted); text-transform: uppercase; margin-top: -2px; }
.nav { display: flex; gap: 6px; flex: 1; }
.nav a { color: var(--ink); padding: 8px 12px; border-radius: 8px; font-weight: 500; font-size: .95rem; text-decoration: none; position: relative; }
.nav a:hover { background: var(--line-soft); }
.nav a.active::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: -14px; height: 3px; background: var(--red); border-radius: 3px; }
.top-actions { display: flex; align-items: center; gap: 12px; }
.avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--navy); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: .9rem; }
.who { line-height: 1.15; font-size: .9rem; }
.who small { display: block; color: var(--muted); font-size: .78rem; }
.menu-btn { display: none; background: none; border: 0; font-size: 1.4rem; color: var(--ink); width: 44px; height: 44px; border-radius: 10px; cursor: pointer; }
.menu-btn:focus-visible { outline: 3px solid var(--red); outline-offset: 2px; }
.nav-account { display: none; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 18px; border-radius: 8px; border: 1px solid transparent; font-weight: 600; font-size: .95rem; cursor: pointer; text-decoration: none !important; font-family: inherit; line-height: 1.2; white-space: nowrap; }
.btn-red { background: var(--red); color: #fff; }
.btn-red:hover { background: var(--red-dark); }
.btn-line { background: #fff; color: var(--ink); border-color: #cfd6e2; }
.btn-line:hover { border-color: var(--ink); }
.btn-ghost-light { background: transparent; color: #fff; border-color: rgba(255,255,255,.6); }
.btn-navy { background: var(--navy); color: #fff; }
.btn-sm { padding: 7px 12px; font-size: .85rem; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

/* ---------- hero ---------- */
.hero { position: relative; overflow: hidden; color: #fff; background:
  radial-gradient(circle at 78% 18%, rgba(255,255,255,.16) 0 2px, transparent 3px),
  radial-gradient(circle at 64% 8%, rgba(255,255,255,.22) 0 3px, transparent 4px),
  radial-gradient(circle at 90% 30%, rgba(255,255,255,.14) 0 2px, transparent 3px),
  radial-gradient(ellipse at 70% 40%, #20437e 0%, transparent 55%),
  linear-gradient(115deg, #071226 0%, #0b1a33 45%, #13284d 100%); }
.hero::after { content: ""; position: absolute; inset: auto 0 0 0; height: 36px; background: var(--page); border-radius: 28px 28px 0 0; }
.hero .wrap { position: relative; z-index: 1; padding-top: 44px; padding-bottom: 76px; min-height: 300px; display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 24px; align-items: center; }
.hero .eyebrow { letter-spacing: .32em; font-size: .78rem; text-transform: uppercase; opacity: .9; margin-bottom: 10px; }
.hero h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); font-weight: 900; letter-spacing: -.02em; margin-bottom: 10px; }
.hero p.lead { font-size: 1.15rem; max-width: 560px; opacity: .92; margin: 0 0 22px; }
.hero-points { display: flex; flex-wrap: wrap; gap: 14px 30px; font-size: .95rem; }
.hero-points span { display: inline-flex; align-items: center; gap: 10px; }
.hero-points i { font-size: 1.3rem; }
.hero-art { position: relative; height: 230px; }
.hero-art .shuttle { position: absolute; left: 0; top: -6px; width: 128px; opacity: .95; filter: drop-shadow(0 10px 30px rgba(0,0,0,.4)); }
.hero-art .script { position: absolute; right: 0; top: 70px; font-family: var(--script); font-size: 2.6rem; line-height: .95; transform: rotate(-8deg); text-align: right; }
.hero-art .script::after { content: ""; display: block; height: 3px; background: var(--red); border-radius: 3px; margin: 8px 0 0 40px; transform: rotate(-3deg); }
.hero-art .tagwords { position: absolute; right: 0; bottom: 0; letter-spacing: .3em; font-size: .78rem; font-weight: 600; }
.hero-compact .wrap { min-height: 0; padding-top: 28px; padding-bottom: 64px; }
.hero-compact h1 { font-size: clamp(1.9rem, 4vw, 2.8rem); }
.crumb { font-size: .9rem; opacity: .9; margin-bottom: 10px; display: inline-flex; gap: 8px; align-items: center; color: #fff; }

/* ---------- page body ---------- */
main { padding-bottom: 60px; }
.page { margin-top: -16px; position: relative; z-index: 2; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-pad { padding: 20px 22px; }
.section-title { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 26px 0 14px; }
.section-title h2 { font-size: 1.45rem; margin: 0; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 22px; align-items: start; }

/* ---------- category chips ---------- */
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 8px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; display: inline-flex; align-items: center; gap: 9px; padding: 11px 18px; border-radius: 10px; background: #fff; border: 1px solid var(--line); color: var(--ink); font-weight: 600; text-decoration: none !important; font-size: .95rem; }
.chip i { color: var(--ink); }
.chip.active { background: var(--red); border-color: var(--red); color: #fff; }
.chip.active i { color: #fff; }

/* ---------- filters ---------- */
.filters { display: grid; grid-template-columns: 2fr repeat(4, minmax(130px, 1fr)) minmax(140px, .9fr) minmax(140px, .9fr) auto; gap: 10px; margin: 12px 0 4px; }
.filters-toggle { display: none; }
.detailbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 0 14px; }
.detailbar .tabs { border: 0; flex: 1; min-width: 0; }
.detailbar .acts { display: flex; gap: 10px; padding: 10px 0; flex-wrap: wrap; }
.field { position: relative; }
.field i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.input, select.input, textarea.input { width: 100%; padding: 11px 14px; border: 1px solid #d6dbe4; border-radius: 8px; font: inherit; background: #fff; color: var(--ink); }
.field .input { padding-left: 40px; }
.input:focus { outline: 2px solid rgba(31,95,214,.25); border-color: var(--blue); }
textarea.input { min-height: 110px; }
label.lbl { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 6px; }
label.lbl .req { color: var(--red); }
.hint { color: var(--muted); font-size: .82rem; margin-top: 4px; }
.form-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px 18px; }
.form-grid .span-2 { grid-column: span 2; }
.form-grid .span-3 { grid-column: 1 / -1; }
.check { display: flex; gap: 10px; align-items: flex-start; }
.check input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--red); }

/* ---------- tournament card ---------- */
.tcard { display: flex; flex-direction: column; overflow: hidden; }
.tcard-banner { position: relative; height: 92px; background: var(--navy-2); overflow: hidden; }
.tcard-banner svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.tone-navy { background: linear-gradient(120deg, #0e2550, #1d4c9a); }
.tone-teal { background: linear-gradient(120deg, #0b5d5a, #16958b); }
.tone-gold { background: linear-gradient(120deg, #3a2a08, #8a6512); }
.tone-green { background: linear-gradient(120deg, #0f4d2f, #1f8a55); }
.tone-purple { background: linear-gradient(120deg, #2e1b5c, #5b3aa8); }
.datebadge { position: absolute; left: 14px; top: 14px; background: #fff; border-radius: 10px; padding: 6px 10px; text-align: center; line-height: 1; min-width: 60px; box-shadow: 0 4px 14px rgba(0,0,0,.18); }
.datebadge .m { font-size: .72rem; font-weight: 800; letter-spacing: .08em; }
.datebadge .d { font-family: var(--display); font-size: 1.45rem; font-weight: 900; margin: 3px 0; letter-spacing: -.03em; }
.datebadge .y { font-size: .68rem; font-weight: 700; }
.ribbon { position: absolute; left: 86px; bottom: 10px; font-size: .68rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; padding: 4px 9px; border-radius: 6px; background: #fff; color: var(--ink); display: inline-flex; gap: 6px; align-items: center; }
.ribbon.acc i { color: var(--red); }
.ribbon.cat-county { background: #0f6e8c; color: #fff; }
.ribbon.cat-club { background: #f0b429; color: #3a2a08; }
.ribbon.cat-junior { background: #16a34a; color: #fff; }
.tcard-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.tcard h3 { font-size: 1.12rem; margin: 0; }
.tcard h3 a { color: var(--ink); }
.where { color: var(--ink); font-size: .9rem; display: flex; gap: 8px; }
.where i { color: var(--red); margin-top: 3px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { font-size: .74rem; font-weight: 600; padding: 3px 8px; border-radius: 6px; border: 1px solid var(--line); background: #f7f9fc; color: var(--ink); }
.tcard-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: auto; }
.tcard-foot { display: flex; justify-content: space-between; gap: 8px; color: var(--muted); font-size: .8rem; padding-top: 4px; }
.tcard-foot i { margin-right: 5px; }

/* ---------- pills / status ---------- */
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: .78rem; font-weight: 700; background: var(--line-soft); color: var(--ink); }
.pill-green { background: var(--green-soft); color: var(--green); }
.pill-amber { background: var(--amber-soft); color: var(--amber); }
.pill-red { background: #fde7e9; color: var(--red-dark); }
.pill-navy { background: var(--navy); color: #fff; }

/* ---------- info strips ---------- */
.why { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.why div { display: flex; gap: 12px; }
.why i { font-size: 1.8rem; color: var(--red); margin-top: 4px; }
.why b { color: var(--blue); display: block; }
.why span { color: var(--muted); font-size: .85rem; }
.cta { background: linear-gradient(110deg, var(--navy), var(--navy-2)); color: #fff; border-radius: var(--radius); padding: 22px 26px; display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.cta i.big { font-size: 2.4rem; opacity: .5; }
.cta h3 { margin: 0; font-size: 1.2rem; }
.cta p { margin: 2px 0 0; opacity: .85; }
.cta .acts { margin-left: auto; display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- types grid ---------- */
.typecard { padding: 18px 20px; display: flex; gap: 16px; color: var(--ink); text-decoration: none !important; transition: transform .12s, box-shadow .12s; }
.typecard:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(16,24,40,.12); }
.typecard i.ico { font-size: 2rem; color: var(--red); width: 40px; text-align: center; flex: none; }
.typecard:nth-child(3n+2) i.ico { color: var(--blue); }
.typecard h3 { font-size: 1.05rem; margin: 0 0 4px; }
.typecard p { color: var(--muted); margin: 0 0 8px; font-size: .88rem; }
.typecard .go { color: var(--blue); font-weight: 600; font-size: .88rem; }

/* ---------- detail page ---------- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.tabs a { padding: 14px 16px; color: var(--ink); font-weight: 600; white-space: nowrap; text-decoration: none; border-bottom: 3px solid transparent; }
.tabs a.active { color: var(--red); border-bottom-color: var(--red); }
.keyinfo { list-style: none; margin: 0; padding: 0; }
.keyinfo li { display: grid; grid-template-columns: 26px 1fr 1.2fr; gap: 8px; padding: 10px 0; border-bottom: 1px solid var(--line-soft); font-size: .92rem; align-items: start; }
.keyinfo li:last-child { border-bottom: 0; }
.keyinfo i { color: var(--ink); margin-top: 3px; }
.keyinfo span { color: var(--muted); }
.evgrid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.evtile { text-align: center; padding: 16px 10px; }
.evtile i { font-size: 1.7rem; }
.evtile b { display: block; margin-top: 8px; }
.evtile small { color: var(--muted); }
.ev-MS i, .ev-BS i { color: #1f5fd6; } .ev-WS i, .ev-GS i { color: #e11d2e; } .ev-MD i, .ev-BD i { color: #12925a; } .ev-WD i, .ev-GD i { color: #f08c00; } .ev-XD i { color: #7e3ff2; }
.badge-acc { display: inline-flex; gap: 8px; align-items: center; background: #fff; color: var(--ink); border-radius: 8px; padding: 6px 12px; font-weight: 800; font-size: .8rem; text-transform: uppercase; }
.badge-acc i { color: var(--red); }
.facts { display: flex; flex-wrap: wrap; gap: 10px 28px; font-size: .98rem; margin-top: 8px; }
.facts span { display: inline-flex; align-items: center; gap: 10px; }
.facts i { font-size: 1.2rem; }

/* ---------- wizard ---------- */
.stepper { display: flex; gap: 0; margin: 4px 0 22px; counter-reset: s; }
.stepper a { flex: 1; text-align: center; position: relative; color: var(--muted); font-weight: 600; font-size: .88rem; text-decoration: none; padding-top: 44px; }
.stepper a::before { counter-increment: s; content: counter(s); position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 36px; height: 36px; border-radius: 50%; background: #e7ebf2; color: var(--muted); display: flex; align-items: center; justify-content: center; font-weight: 700; z-index: 1; }
.stepper a::after { content: ""; position: absolute; top: 17px; left: calc(-50% + 22px); right: calc(50% + 22px); height: 2px; background: #dfe4ec; }
.stepper a:first-child::after { display: none; }
.stepper a.done::before { content: "✓"; background: var(--blue); color: #fff; }
.stepper a.current { color: var(--blue); }
.stepper a.current::before { background: var(--blue); color: #fff; }
.evmatrix { width: 100%; border-collapse: collapse; font-size: .9rem; }
.evmatrix th, .evmatrix td { border-bottom: 1px solid var(--line-soft); padding: 8px 6px; text-align: center; }
.evmatrix th:first-child, .evmatrix td:first-child { text-align: left; }
.evmatrix input { width: 18px; height: 18px; accent-color: var(--red); }
.table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table th { text-align: left; font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); padding: 10px 12px; border-bottom: 1px solid var(--line); }
.table td { padding: 12px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }

/* ---------- flash ---------- */
.flash { border-radius: 10px; padding: 12px 16px; margin: 14px 0; font-weight: 500; border: 1px solid; }
.flash-success { background: var(--green-soft); border-color: #b9e6cd; color: #0d6b42; }
.flash-danger { background: #fde7e9; border-color: #f6c2c8; color: #9b1020; }
.flash-info, .flash-warning { background: #eef4ff; border-color: #cddcfb; color: #1b3f8f; }
.testbed { background: #f0b429; color: #3a2a08; text-align: center; font-size: .8rem; font-weight: 700; padding: 4px; letter-spacing: .04em; }
.empty { text-align: center; color: var(--muted); padding: 40px 20px; }
.empty i { font-size: 2.2rem; display: block; margin-bottom: 10px; opacity: .5; }
footer.site { color: var(--muted); font-size: .85rem; padding: 26px 0 90px; text-align: center; }
footer.site a { color: inherit; }

/* ---------- mobile bottom tabs ---------- */
.bottomnav { display: none; }

@media (max-width: 1100px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .filters { grid-template-columns: 1fr 1fr 1fr; }
  .filters .field:first-child { grid-column: 1 / -1; }
  .why { grid-template-columns: 1fr 1fr; }
  .split { grid-template-columns: 1fr; }
  .evgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
/* iPad (2026-11-14): the full menu didn't fit - the name, Sign out and "Get the app" ran off the
   right edge and the page scrolled sideways. Up to 1240px the menu folds into the menu button
   (like phones); the rest of the page keeps its tablet layout. */
@media (max-width: 1240px) {
  .topbar .wrap { gap: 14px; }
  .brand b { white-space: nowrap; }
  .nav { display: none; }
  .top-actions { margin-left: auto; gap: 8px; }
  .top-actions .who, .top-actions .app-install { display: none !important; }
  .menu-btn { display: inline-flex; align-items: center; justify-content: center; }
  .nav.open { display: flex; flex-direction: column; position: absolute; top: 100%; left: 0; right: 0; background: #fff; padding: 8px 24px 14px; border-bottom: 1px solid var(--line); box-shadow: var(--shadow); max-height: calc(100vh - 68px); overflow-y: auto; }
  .nav.open a { padding: 12px 10px; font-size: 1rem; }
  .nav.open a.active { background: var(--line-soft); }
  .nav.open a.active::after { display: none; }
  .nav.open .nav-account { display: block; border-top: 1px solid var(--line); margin-top: 6px; padding-top: 6px; }
  .nav-account a, .nav-account button { display: flex; gap: 10px; align-items: center; width: 100%; padding: 12px 10px; color: var(--ink); text-decoration: none; background: none; border: 0; font: inherit; font-size: 1rem; text-align: left; cursor: pointer; border-radius: 8px; }
  .nav-account i { width: 18px; color: var(--muted); }
}
@media (max-width: 760px) {
  body { font-size: 14.5px; }
  .wrap { padding: 0 14px; }
  .topbar .wrap { height: 58px; gap: 10px; }
  .brand { min-width: 0; }
  .brand b { font-size: 1.12rem; white-space: nowrap; }
  .nav, .who { display: none; }
  .top-actions { margin-left: auto; gap: 6px; }             /* everything on the right, menu at the edge */
  .top-actions form, .top-actions .avatar { display: none; }
  .menu-btn { display: inline-flex; align-items: center; justify-content: center; margin-right: -8px; }
  .top-actions .btn { display: none; }
  .nav.open { display: flex; flex-direction: column; position: absolute; top: 58px; left: 0; right: 0; background: #fff; padding: 8px 14px 14px; border-bottom: 1px solid var(--line); box-shadow: var(--shadow); max-height: calc(100vh - 58px); overflow-y: auto; }
  .nav.open a { padding: 12px 10px; font-size: 1rem; }
  .nav.open a.active { background: var(--line-soft); }
  .nav.open a.active::after { display: none; }
  .nav.open .nav-account { display: block; border-top: 1px solid var(--line); margin-top: 6px; padding-top: 6px; }
  .nav-account a, .nav-account button { display: flex; gap: 10px; align-items: center; width: 100%; padding: 12px 10px; color: var(--ink); text-decoration: none; background: none; border: 0; font: inherit; font-size: 1rem; text-align: left; cursor: pointer; border-radius: 8px; }
  .nav-account i { width: 18px; color: var(--muted); }
  body { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }   /* room for the bottom bar */
  .hero .wrap { grid-template-columns: 1fr; padding-top: 26px; padding-bottom: 58px; min-height: 0; }
  .hero-art { display: none; }
  .hero p.lead { font-size: 1rem; margin-bottom: 14px; }
  .hero-points { gap: 10px 18px; font-size: .85rem; }
  .grid-4, .grid-3, .why { grid-template-columns: 1fr; }
  .filters { grid-template-columns: 1fr auto auto; }
  .filters > select, .filters > input[type=date] { display: none; }
  .filters.open { grid-template-columns: 1fr 1fr; }
  .filters.open > select, .filters.open > input[type=date] { display: block; }
  .filters.open .field { grid-column: 1 / -1; }
  .filters-toggle { display: inline-flex; }
  .detailbar { padding: 0; }
  .detailbar .tabs { flex-basis: 100%; padding: 0 6px; border-bottom: 1px solid var(--line); }
  .detailbar .acts { padding: 10px 12px 12px; width: 100%; }
  .detailbar .acts .btn { flex: 1; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .span-2 { grid-column: auto; }
  .evgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cta .acts { margin-left: 0; width: 100%; }
  .cta .acts .btn { flex: 1; }
  .stepper a { font-size: 0; padding-top: 38px; }
  .stepper a.current { font-size: .78rem; }
  .keyinfo li { grid-template-columns: 22px 1fr; }
  .keyinfo li b, .keyinfo li > :last-child { grid-column: 2; }
  .bottomnav { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); position: fixed; bottom: 0; left: 0; right: 0; background: #fff; border-top: 1px solid var(--line); z-index: 50; padding: 6px 0 calc(6px + env(safe-area-inset-bottom)); }
  .bottomnav a { text-align: center; color: var(--muted); font-size: .72rem; text-decoration: none; font-weight: 600; }
  .bottomnav a i { display: block; font-size: 1.15rem; margin-bottom: 2px; }
  .bottomnav a.active { color: var(--red); }
  /* Scan (2026-11-10): a raised red button in the middle of the bar */
  .bottomnav a.bn-scan { color: var(--red); font-weight: 800; }
  .bn-scan-dot { display: grid !important; place-items: center; width: 50px; height: 50px; margin: -24px auto 2px; border-radius: 50%; background: var(--red); color: #fff; border: 4px solid #fff; box-shadow: 0 4px 12px rgba(200, 16, 46, .35); }
  .bottomnav a .bn-scan-dot i { margin: 0; font-size: 1.25rem; color: #fff; }
  .table-wrap { overflow-x: auto; }
}
@media print {
  .topbar, .bottomnav, .hero::after, .no-print, footer.site { display: none !important; }
  body { background: #fff; }
}

/* Installed app (PWA): back button (no browser bar in the app), Install button, iPhone tip. */
.app-back { border: 0; background: none; color: var(--ink); font-size: 1.15rem; padding: 6px 4px 6px 0; margin-right: -18px; cursor: pointer; }
.app-back[hidden], .app-install[hidden], .ios-tip[hidden] { display: none !important; }
.app-install { white-space: nowrap; }
.ios-tip { position: fixed; left: 12px; right: 12px; bottom: calc(76px + env(safe-area-inset-bottom)); z-index: 60; display: flex; align-items: center; gap: 12px; background: var(--navy); color: #fff; border-radius: 14px; padding: 12px 12px 12px 14px; box-shadow: 0 10px 30px rgba(11, 26, 51, .35); font-size: .92rem; line-height: 1.35; }
.ios-tip img { border-radius: 10px; flex: none; }
.ios-tip button { margin-left: auto; flex: none; border: 0; background: rgba(255, 255, 255, .14); color: #fff; width: 32px; height: 32px; border-radius: 50%; cursor: pointer; }
.in-app footer.site { padding-bottom: calc(80px + env(safe-area-inset-bottom)); }
@media print { .app-back, .app-install, .ios-tip { display: none !important; } }

/* Folded filters (main page): just the search box until "Filters" is pressed. */
.filters.folded { grid-template-columns: 1fr auto auto; }
.filters.folded > select, .filters.folded > input[type=date] { display: none; }
.filters.folded .filters-toggle { display: inline-flex; }
.filters.folded.open { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.filters.folded.open > select, .filters.folded.open > input[type=date] { display: block; }
.filters.folded.open .field { grid-column: 1 / -1; }
@media (max-width: 380px) { .brand small { display: none; } .brand img { width: 36px; height: 36px; } }
@media (max-width: 760px) { .filters.folded.open { grid-template-columns: 1fr 1fr; } }

/* Photos (2026-10-10 redesign): a hero with a real photo behind it, darkened on the text side. */
.hero.hero-photo { background: linear-gradient(100deg, rgba(7, 18, 38, .94) 0%, rgba(7, 18, 38, .78) 42%, rgba(7, 18, 38, .35) 100%), var(--hero-img) center / cover no-repeat, #0b1a33; }
.hero.hero-photo .hero-art .shuttle { display: none; }
.tcard-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tcard-banner:has(.tcard-photo)::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(7,18,38,.05), rgba(7,18,38,.45)); }
.tcard-banner .datebadge, .tcard-banner .ribbon { z-index: 1; }
.tcard-foot { flex-wrap: wrap; }
.about-row { display: grid; grid-template-columns: minmax(0, 1fr) 180px; gap: 20px; align-items: start; }
.about-poster img { width: 100%; height: auto; border-radius: 12px; box-shadow: 0 8px 22px rgba(11, 26, 51, .18); display: block; }
.venue-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 20px; align-items: start; }
.venue-map { width: 100%; height: 220px; border: 0; border-radius: 12px; background: var(--line-soft, #eef1f6); }
@media (max-width: 760px) { .about-row, .venue-row { grid-template-columns: 1fr; } .about-poster { max-width: 200px; } }

/* Wide screens (2026-10-10): use the width instead of a 1280px column with empty sides.
   Content grows to 1600px; card grids add columns rather than stretching cards. */
@media (min-width: 1400px) {
  .wrap { max-width: 1600px; padding: 0 40px; }
  .grid-4 { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
  .split { grid-template-columns: minmax(0, 1fr) 400px; }
}
@media (min-width: 1800px) { .wrap { max-width: 1760px; } }

/* ---------- inside the SK Tournaments iPhone app ----------
   The app has its own top bar, so the site header is hidden; the menu opens from "More"
   in the bottom bar as a panel. */
.native-app .topbar { display: none; }
.native-app .bottomnav { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; bottom: 0; left: 0; right: 0; background: #fff; border-top: 1px solid var(--line); z-index: 50; padding: 6px 0 calc(6px + env(safe-area-inset-bottom)); }
.native-app .bottomnav a, .native-app .bottomnav button { text-align: center; color: var(--muted); font-size: .72rem; text-decoration: none; font-weight: 600; background: none; border: 0; font-family: inherit; padding: 0; cursor: pointer; }
.native-app .bottomnav i { display: block; font-size: 1.15rem; margin-bottom: 2px; }
.native-app .bottomnav .active { color: var(--red); }
.native-app body { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
.native-app #mainnav { display: none; }
.native-app #mainnav.open { display: flex; flex-direction: column; position: fixed; left: 0; right: 0; top: auto;
  bottom: calc(60px + env(safe-area-inset-bottom)); max-height: 72vh; overflow-y: auto; z-index: 55; background: #fff;
  padding: 10px 14px 14px; border-top: 1px solid var(--line); border-radius: 18px 18px 0 0; box-shadow: 0 -12px 30px rgba(11, 26, 51, .18); }
.native-app #mainnav.open a { padding: 12px 10px; font-size: 1rem; color: var(--ink); text-decoration: none; border-radius: 8px; }
.native-app #mainnav.open a.active { background: var(--line-soft); }
.native-app #mainnav.open a.active::after { display: none; }
.native-app #mainnav.open .nav-account { display: block; border-top: 1px solid var(--line); margin-top: 6px; padding-top: 6px; }
.native-app #mainnav .nav-account a, .native-app #mainnav .nav-account button { display: flex; gap: 10px; align-items: center; width: 100%; padding: 12px 10px; color: var(--ink); background: none; border: 0; font: inherit; font-size: 1rem; text-align: left; }

/* ---------- organiser sidebar layout (2026-11-14, owner's design) ----------
   Computers and big tablets (1000px+): a navy menu down the left (Setup / Match day / Finish)
   instead of the top bar, the big banner and the step strip. Smaller screens keep those. */
.org-side, .oh { display: none; }
@media (min-width: 1000px) {
  body.has-orgbar .topbar, body.has-orgbar .org-narrow, body.has-orgbar footer.site { display: none; }
  body.has-orgbar .org-main .day-steps, body.has-orgbar .org-main .stepper, body.has-orgbar .org-main .manage-bar { display: none; }
  .org-shell { display: grid; grid-template-columns: 252px minmax(0, 1fr); min-height: 100vh; align-items: start; }
  .org-side { display: flex; flex-direction: column; gap: 4px; position: sticky; top: 0; height: 100vh; overflow-y: auto;
              background: #0f1d3a; color: #fff; padding: 18px 12px 14px; scrollbar-width: thin; }
  .org-main.wrap { max-width: none; margin: 0; padding: 22px 28px 40px; }
  .os-brand { display: flex; gap: 10px; align-items: center; color: #fff; text-decoration: none !important; padding: 0 8px 10px;
              font-family: var(--display); font-weight: 900; font-size: 1.15rem; line-height: 1.05; }
  .os-brand img { transform: rotate(-20deg); }
  .os-brand b { font-size: 1.35rem; }
  .os-org { color: #fff; font-weight: 800; font-size: 1.1rem; padding: 6px 8px; text-decoration: none !important; border-bottom: 1px solid rgba(255,255,255,.12); }
  .os-switch { display: flex; align-items: center; gap: 8px; padding: 10px 8px; border-bottom: 1px solid rgba(255,255,255,.12); }
  .os-switch select { flex: 1; min-width: 0; background: transparent; color: #fff; border: 0; font: inherit; font-weight: 700; font-size: .95rem; cursor: pointer; }
  .os-switch select option { color: #0f1f3d; }
  .os-nav { display: grid; gap: 2px; padding-top: 4px; }
  .os-sec { font-size: .78rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: rgba(255,255,255,.6); padding: 14px 8px 4px; }
  .os-link { display: flex; align-items: center; gap: 12px; padding: 8px 12px; border-radius: 10px; color: #fff; text-decoration: none !important; font-weight: 600; }
  .os-link i { width: 20px; text-align: center; opacity: .9; }
  .os-link span { flex: 1; }
  .os-link small { font-size: .75rem; opacity: .7; font-weight: 700; }
  .os-link:hover { background: rgba(255,255,255,.08); }
  .os-link.on { background: var(--red); }
  .os-link.on small { opacity: .95; }
  .os-foot { margin-top: auto; display: grid; gap: 2px; padding-top: 12px; border-top: 1px solid rgba(255,255,255,.12); }
  .os-foot a, .os-foot button { display: flex; gap: 12px; align-items: center; padding: 7px 12px; color: rgba(255,255,255,.85); background: none; border: 0;
                                font: inherit; font-size: .9rem; text-align: left; cursor: pointer; border-radius: 10px; text-decoration: none !important; width: 100%; }
  .os-foot a:hover, .os-foot button:hover { background: rgba(255,255,255,.08); color: #fff; }
  .os-foot i { width: 20px; text-align: center; }
  .os-link span.os-step { flex: 0 0 22px; }
  .os-step { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: .72rem; font-weight: 800; background: rgba(255,255,255,.14); }
  .os-step.ok { background: #34d399; color: #0f1d3a; }
  .os-link.on .os-step { background: #fff; color: var(--red); }
  .os-link.dim { opacity: .38; cursor: default; }
  .os-link.dim:hover { background: none; }
  .os-link .lk { font-size: .72rem; opacity: .8; }
  .os-note { font-size: .74rem; color: rgba(255,255,255,.55); padding: 2px 12px 0 44px; line-height: 1.3; }
  .os-badge { background: #e0a800; color: #0f1f3d; border-radius: 999px; padding: 0 7px; font-weight: 800; }
  .oh { display: block; margin-bottom: 18px; }
  .oh-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
  .oh-name { font-size: 2.2rem; margin: 0; line-height: 1.1; }
  .oh-when { margin: 4px 0 0; font-weight: 700; color: #4a5568; font-size: 1.05rem; }
  .oh-acts { display: flex; gap: 12px; flex-wrap: wrap; }
  .oh-acts .btn { padding: 12px 20px; font-size: 1rem; }
  .oh-live { border-color: var(--red); color: var(--red); }
  .oh-crumb { margin: 18px 0 6px; color: #4a5568; font-weight: 600; display: flex; gap: 10px; align-items: center; }
  .oh-crumb a { color: inherit; } .oh-crumb i { font-size: .7rem; } .oh-crumb span { color: var(--red); }
  .oh-title { display: flex; align-items: center; gap: 14px; font-size: 2.1rem; margin: 0; }
  .oh-title i { font-size: 1.7rem; }
}
@media print { .org-side, .oh { display: none !important; } .org-shell { display: block; } }

/* setup pages (2026-11-14): step progress, and what's locked once the draw is made */
.wiz { display: flex; gap: 6px; margin: 0 0 16px; }
.wiz div { flex: 1; height: 6px; border-radius: 3px; background: #dfe4ec; } .wiz div.ok { background: #10b981; } .wiz div.now { background: var(--red); }
.lockbar { display: flex; gap: 14px; align-items: flex-start; padding: 16px 18px; border-radius: 14px; background: #fff8e1; border: 1px solid #f0d58a; margin-bottom: 16px; flex-wrap: wrap; }
.lockbar > i { font-size: 1.4rem; color: #b07d00; margin-top: 2px; } .lockbar > div { flex: 1; min-width: 220px; } .lockbar b { font-size: 1.05rem; } .lockbar p { margin: 3px 0 0; color: #5c4a12; }
.locklists { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; margin-bottom: 16px; }
.locklists h4 { margin: 0 0 8px; display: flex; gap: 8px; align-items: center; } .locklists ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.locklists li { display: flex; gap: 8px; align-items: center; } .ok-i { color: #10b981; } .lk-i { color: #b07d00; }
.lock-pill { display: inline-flex; gap: 4px; align-items: center; font-size: .75rem; font-weight: 800; color: #7a5200; background: #fff1c2; padding: 2px 8px; border-radius: 999px; }
label.is-locked { opacity: .6; cursor: not-allowed !important; }
@media (min-width: 1000px) { body.has-orgbar .org-narrow-only { display: none; } }

/* ---------- knockout bracket tree (partials/bracket.html, 2026-11-15) ---------- */
.bk-wrap { --bk-w: 196px; --bk-gap: 40px; --bk-line: #b4bed0; margin: 4px 0 18px; max-width: 100%; }
.bk-scroll { overflow-x: auto; overflow-y: hidden; max-width: 100%; -webkit-overflow-scrolling: touch; padding: 0 2px 10px; }
.bk-scroll:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.bk { display: flex; gap: var(--bk-gap); width: max-content; padding: 2px 6px 0 2px; }
.bk-col { flex: none; width: var(--bk-w); }
.bk-col.bk-final { width: calc(var(--bk-w) - 26px); }
.bk-head { height: 24px; font-size: .7rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--muted);
           text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bk-body { display: flex; flex-direction: column; }
.bk-cell { flex: 1 1 0; min-height: 0; position: relative; display: flex; align-items: center; }
.bk-box { position: relative; z-index: 1; display: block; width: 100%; background: #fff; border: 1px solid #d5dbe6; border-radius: 8px;
          font-size: .8rem; line-height: 1.2; color: var(--ink); text-decoration: none !important; box-shadow: 0 1px 2px rgba(16, 24, 40, .05); }
a.bk-box:hover { border-color: var(--navy-3); }
.bk-row { display: flex; align-items: center; gap: 6px; height: 23px; padding: 0 8px; border-left: 3px solid transparent; }
.bk-row:first-of-type { border-radius: 7px 7px 0 0; } .bk-row:last-of-type { border-radius: 0 0 7px 7px; }
.bk-row + .bk-row { border-top: 1px solid var(--line-soft); }
.bk-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bk-pts { flex: none; display: flex; gap: 5px; font-size: .74rem; font-variant-numeric: tabular-nums; color: var(--muted); }
.bk-pts span { min-width: 14px; text-align: right; }
.bk-row.win { font-weight: 800; color: #065f46; background: #ecfdf5; border-left-color: #10b981; }
.bk-row.win .bk-pts { color: #047857; }
.bk-row.lost { color: var(--muted); }
.bk-row.tbd .bk-name { color: var(--muted); font-style: italic; }
.bk-row.is-bye .bk-name { color: #98a2b3; font-style: italic; }
.bk-box.bye { background: #f8fafc; border-style: dashed; box-shadow: none; opacity: .75; }
.bk-box.bye .bk-row:not(.is-bye) { color: var(--muted); }
.bk-box.on { border-color: var(--red); box-shadow: 0 0 0 1px var(--red); }
.bk-no { position: absolute; left: 2px; top: -15px; font-size: .66rem; font-weight: 700; color: #8a94a6; font-variant-numeric: tabular-nums; }
.bk-live { position: absolute; right: 2px; top: -15px; font-size: .66rem; font-weight: 800; color: var(--red); white-space: nowrap; }
.bk-live i { font-size: .45rem; margin-right: 4px; vertical-align: 2px; animation: bk-pulse 1.4s ease-in-out infinite; }
@keyframes bk-pulse { 50% { opacity: .25; } }
.bk-champ { display: flex; align-items: center; gap: 8px; padding: 9px 10px; background: #fff6dc; border-color: #f1d488; color: #7a5200; font-weight: 800; font-size: .86rem; }
.bk-champ i { color: #c99400; }
.bk-champ.tbd { background: #fff; color: var(--muted); font-weight: 600; font-style: italic; border-style: dashed; }
/* connector lines: out of each game to the middle of the gap, then up/down to meet its pair */
.bk-cell.out::after, .bk-cell.in::before { content: ""; position: absolute; width: calc(var(--bk-gap) / 2); border: 0 solid var(--bk-line); }
.bk-cell.in::before { right: 100%; top: calc(50% - 1px); border-top-width: 2px; }
.bk-col.solo .bk-cell.out::after { left: 100%; top: calc(50% - 1px); border-top-width: 2px; }
.bk-col:not(.solo) .bk-cell.out:nth-child(odd)::after { left: 100%; top: calc(50% - 1px); bottom: -1px; border-width: 2px 2px 0 0; border-top-right-radius: 6px; }
.bk-col:not(.solo) .bk-cell.out:nth-child(even)::after { left: 100%; top: -1px; bottom: calc(50% - 1px); border-width: 0 2px 2px 0; border-bottom-right-radius: 6px; }
.bk-placing { display: flex; flex-wrap: wrap; gap: 18px 24px; margin-top: 6px; padding-top: 12px; border-top: 1px dashed var(--line); }
.bk-place { width: var(--bk-w); }
.bk-place .bk-head { text-align: left; margin-bottom: 14px; height: auto; white-space: normal; }
.bk-toggle { display: inline-flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #fff; }
.bk-toggle a { padding: 6px 14px; font-weight: 700; font-size: .85rem; color: var(--ink); text-decoration: none !important; }
.bk-toggle a.active { background: var(--navy); color: #fff; }
@media (max-width: 560px) { .bk-wrap { --bk-w: 172px; --bk-gap: 30px; } }
@media print {
  .bk-scroll { overflow: visible !important; }
  .bk-wide { zoom: .6; }
  .bk-box { box-shadow: none; }
  .bk-live i { animation: none; }
  .bk-toggle { display: none !important; }
}

/* ---------- tabs on organiser pages (partials/tabs.html + js/tabs.js, 2026-11-15) ----------
   One bar of tabs; on phones it scrolls sideways on its own, never the page. */
.tabs { display: flex; gap: 6px; overflow-x: auto; overflow-y: hidden; max-width: 100%; margin: 0 0 16px; padding: 4px;
        background: #fff; border: 1px solid var(--line); border-radius: 12px; scrollbar-width: thin; -webkit-overflow-scrolling: touch; }
.tab { display: inline-flex; align-items: center; gap: 8px; flex: none; padding: 9px 14px; border-radius: 9px; color: var(--ink);
       font-weight: 700; font-size: .92rem; white-space: nowrap; text-decoration: none !important; }
.tab i { color: var(--muted); font-size: .9rem; }
.tab:hover { background: var(--line-soft); }
.tab:focus-visible { outline: 3px solid var(--red); outline-offset: -3px; }
.tab.on { background: var(--navy); color: #fff; }
.tab.on i { color: #fff; }
.tab-badge { display: inline-grid; place-items: center; min-width: 22px; height: 20px; padding: 0 7px; border-radius: 999px;
             background: var(--line-soft); color: var(--ink); font-size: .74rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.tab.on .tab-badge { background: rgba(255, 255, 255, .18); color: #fff; }
.tab-badge.hot, .tab.on .tab-badge.hot { background: var(--red); color: #fff; }
.tab-panel[hidden] { display: none !important; }
.tab-panel { min-width: 0; }
@media (max-width: 560px) { .tab { padding: 8px 11px; font-size: .88rem; } }
@media print { .tab-panel[hidden] { display: block !important; } }
/* "Show all" lists folded after the first few */
.more-list > summary { cursor: pointer; font-weight: 700; color: var(--blue); padding: 10px 0 2px; list-style: none; }
.more-list > summary::-webkit-details-marker { display: none; }
.more-list > summary::before { content: "\25B8"; display: inline-block; margin-right: 6px; transition: transform .15s; }
.more-list[open] > summary::before { transform: rotate(90deg); }
/* jump bar to the numbered sections of a long page (Rules) */
.jump-bar { position: sticky; top: 68px; z-index: 30; display: flex; gap: 6px; overflow-x: auto; max-width: 100%; margin: 0 0 14px; padding: 6px;
            background: rgba(255, 255, 255, .96); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); scrollbar-width: thin; }
.jump-bar a { flex: none; display: inline-flex; gap: 6px; align-items: center; padding: 6px 11px; border-radius: 8px; font-weight: 700; font-size: .86rem;
              color: var(--ink); white-space: nowrap; text-decoration: none !important; }
.jump-bar a:hover { background: var(--line-soft); }
.jump-bar a b { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--navy); color: #fff; font-size: .72rem; }
@media (max-width: 760px) { .jump-bar { top: 58px; } }
.native-app .jump-bar { top: 0; }
@media (min-width: 1000px) { body.has-orgbar .jump-bar { top: 0; } }
@media print { .jump-bar { display: none; } }
/* organiser sidebar: Setup folded away once the draw is made */
.os-fold > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px; }
.os-fold > summary::-webkit-details-marker { display: none; }
.os-fold > summary .os-done { margin-left: auto; font-size: .72rem; letter-spacing: 0; text-transform: none; color: #34d399; font-weight: 800; }
.os-fold > summary::after { content: "\25B8"; font-size: .8rem; transition: transform .15s; }
.os-fold[open] > summary::after { transform: rotate(90deg); }
.os-fold > div { display: grid; gap: 2px; }
