/* 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); }

/* ---------- 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; }

/* ---------- 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)); }
}
@media (max-width: 760px) {
  body { font-size: 14.5px; }
  .wrap { padding: 0 14px; }
  .topbar .wrap { height: 58px; gap: 10px; }
  .nav, .who { display: none; }
  .menu-btn { display: block; margin-left: auto; }
  .top-actions .btn { display: none; }
  .nav.open { display: flex; flex-direction: column; position: absolute; top: 58px; left: 0; right: 0; background: #fff; padding: 10px 14px; border-bottom: 1px solid var(--line); box-shadow: var(--shadow); }
  .nav.open a.active::after { display: none; }
  .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-template-columns: repeat(4, 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); }
  .table-wrap { overflow-x: auto; }
}
@media print {
  .topbar, .bottomnav, .hero::after, .no-print, footer.site { display: none !important; }
  body { background: #fff; }
}
