/* Landing: dark scoreboard hero with a live on-court panel, then competitions by status, then a how-to strip */
:root {
  --bg: #F2F4F7; --surface: #FFFFFF; --ink: #142033; --muted: #5B6779; --line: #D9DEE6;
  --accent: #1F4FD1; --accent-ink: #FFFFFF; --accent-soft: #E6ECFB;
  --live: #D9342B; --qual: #0F8A5F; --qual-bg: #E3F4EC; --gold: #A8730C; --gold-bg: #FBF1DC;
  --men: #2459C9; --women: #C23C78; --mixed: #7A4FC4;
  --hero: #0D1B36; --hero-2: #13264A; --hero-ink: #F3F6FB; --hero-muted: #A9B6CC; --hero-line: rgba(255,255,255,.12); --volt: #D7F34A;
  --f-display: "Black Han Sans", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  --f-body: "IBM Plex Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
  --f-num: "IBM Plex Mono", ui-monospace, Consolas, monospace;
  --max: 1200px;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #0B111B; --surface: #141C29; --ink: #E7ECF3; --muted: #93A0B4; --line: #263244;
  --accent: #7D9DFF; --accent-ink: #0E141E; --accent-soft: #1D2A48; --live: #F0675E;
  --qual: #4BC995; --qual-bg: #143327; --gold: #E2B651; --gold-bg: #34290F;
  --men: #7EA4FF; --women: #F08AB8; --mixed: #B59AF0; --hero: #070D18; --hero-2: #0F1A2E; color-scheme: dark } }
:root[data-theme="dark"] {
  --bg: #0B111B; --surface: #141C29; --ink: #E7ECF3; --muted: #93A0B4; --line: #263244;
  --accent: #7D9DFF; --accent-ink: #0E141E; --accent-soft: #1D2A48; --live: #F0675E;
  --qual: #4BC995; --qual-bg: #143327; --gold: #E2B651; --gold-bg: #34290F;
  --men: #7EA4FF; --women: #F08AB8; --mixed: #B59AF0; --hero: #070D18; --hero-2: #0F1A2E; color-scheme: dark }

* { box-sizing: border-box }
html { scroll-behavior: smooth; scroll-padding-top: 72px }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--f-body); font-size: 15px; line-height: 1.55 }
a { color: inherit }
button { font: inherit; color: inherit; cursor: pointer }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px }
.in { max-width: var(--max); margin: 0 auto; padding-left: max(20px, env(safe-area-inset-left, 0px)); padding-right: max(20px, env(safe-area-inset-right, 0px)) }

/* nav */
.nav { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--hero) 92%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--hero-line); color: var(--hero-ink) }
.nav .in { display: flex; align-items: center; gap: 20px; height: 60px }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; min-width: 0 }
.brand .mark { width: 30px; height: 30px; flex: none }
.brand .logo { height: 30px; width: auto; flex: none; display: block }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap }
.brand b { font-family: var(--f-display); font-weight: 400; font-size: 21px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis }
.links { display: flex; gap: 4px; margin-left: auto }
.links a { text-decoration: none; padding: 7px 12px; border-radius: 8px; font-size: 14px; font-weight: 600; color: var(--hero-muted) }
.links a:hover { color: var(--hero-ink); background: rgba(255,255,255,.07) }
.tools { display: flex; gap: 8px; align-items: center }
.ibtn { width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid var(--hero-line); border-radius: 10px; background: transparent; color: var(--hero-ink); padding: 0 }
.ibtn:hover { border-color: var(--hero-muted) }
.ibtn svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round }
.ibtn .sun { display: none }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .ibtn .sun { display: block } :root:not([data-theme="light"]) .ibtn .moon { display: none } }
:root[data-theme="dark"] .ibtn .sun { display: block }
:root[data-theme="dark"] .ibtn .moon { display: none }
.oplink { font-size: 13px; font-weight: 600; text-decoration: none; padding: 8px 12px; border-radius: 9px; border: 1px solid var(--hero-line); color: var(--hero-ink); white-space: nowrap }
.oplink:hover { border-color: var(--hero-muted) }

/* hero */
.hero { position: relative; overflow: hidden; background: radial-gradient(1200px 500px at 85% -10%, var(--hero-2), transparent 60%), var(--hero); color: var(--hero-ink) }
.court { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .5; pointer-events: none }
.hero .in { position: relative; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 40px; align-items: center; padding-top: 64px; padding-bottom: 72px }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-family: var(--f-num); font-size: 12px; font-weight: 600; letter-spacing: .14em; color: var(--volt); text-transform: uppercase }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--live); box-shadow: 0 0 0 0 rgba(217,52,43,.6) }
@media (prefers-reduced-motion: no-preference) { .dot { animation: ping 1.6s infinite } @keyframes ping { 70% { box-shadow: 0 0 0 9px rgba(217,52,43,0) } 100% { box-shadow: 0 0 0 0 rgba(217,52,43,0) } } }
.hero h1 { margin: 14px 0 14px; font-family: var(--f-display); font-weight: 400; font-size: clamp(36px, 5.4vw, 64px); line-height: 1.08; letter-spacing: -.01em; text-wrap: balance }
.hero h1 em { font-style: normal; color: var(--volt) }
.hero p.lead { margin: 0; max-width: 46ch; color: var(--hero-muted); font-size: 16px }
.cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px }
.btn { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; font-weight: 700; font-size: 15px; padding: 12px 18px; border-radius: 11px; border: 1px solid transparent }
.btn.primary { background: var(--volt); color: #0D1B36 }
.btn.primary:hover { filter: brightness(1.05) }
.btn.ghost { border-color: var(--hero-line); color: var(--hero-ink) }
.btn.ghost:hover { border-color: var(--hero-muted) }

/* live panel: what is on court right now */
.panel { background: rgba(255,255,255,.04); border: 1px solid var(--hero-line); border-radius: 18px; padding: 18px; backdrop-filter: blur(2px) }
.panel h2 { margin: 0; display: flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 700 }
.panel h2 small { margin-left: auto; font-family: var(--f-num); font-size: 12px; font-weight: 500; color: var(--hero-muted) }
.onc { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; max-height: 360px; overflow: auto }
.oc { display: grid; grid-template-columns: 54px minmax(0, 1fr); gap: 12px; align-items: center; padding: 10px 12px; border-radius: 12px; background: rgba(255,255,255,.05); text-decoration: none }
.oc:hover { background: rgba(255,255,255,.09) }
.oc .ct { text-align: center; border-right: 1px solid var(--hero-line); padding-right: 10px }
.oc .ct b { display: block; font-family: var(--f-num); font-size: 26px; line-height: 1; color: var(--volt) }
.oc .ct span { font-size: 11px; color: var(--hero-muted) }
.oc .meta { font-size: 12px; color: var(--hero-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis }
.oc .vs { font-weight: 700; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis }
.oc .vs i { font-style: normal; font-weight: 500; color: var(--hero-muted); margin: 0 6px }
.calm { margin-top: 14px; padding: 22px 16px; text-align: center; border-radius: 12px; background: rgba(255,255,255,.04); color: var(--hero-muted); font-size: 14px }
.calm b { display: block; color: var(--hero-ink); font-size: 15px; margin-bottom: 4px }

/* stats strip, overlapping the hero edge */
.stats { position: relative; margin-top: -34px; z-index: 2 }
.stats .grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 14px 40px rgba(13,27,54,.10) }
.stat { padding: 18px 22px; border-left: 1px solid var(--line) }
.stat:first-child { border-left: 0 }
.stat b { display: block; font-family: var(--f-num); font-size: 30px; font-weight: 600; line-height: 1.1; font-variant-numeric: tabular-nums }
.stat span { font-size: 13px; color: var(--muted) }

/* sections */
section.sec { padding: 56px 0 8px }
.sech { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 18px }
.sech h2 { margin: 0; font-family: var(--f-display); font-weight: 400; font-size: 30px; letter-spacing: -.01em }
.sech .count { font-family: var(--f-num); font-size: 14px; color: var(--muted) }
.sech p { margin: 0 0 0 auto; color: var(--muted); font-size: 14px }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 16px }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 20px; display: flex; flex-direction: column; gap: 12px; text-decoration: none; transition: transform .15s, box-shadow .15s, border-color .15s }
.card:hover { transform: translateY(-2px); border-color: var(--accent); box-shadow: 0 12px 30px rgba(13,27,54,.10) }
.card .top { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start }
.card h3 { margin: 0; font-size: 19px; font-weight: 700; line-height: 1.3; text-wrap: balance }
.card .date { font-size: 13px; color: var(--muted); margin-top: 3px }
.badge { flex: none; font-size: 12px; font-weight: 700; border-radius: 99px; padding: 3px 10px; white-space: nowrap }
.badge.live { color: #fff; background: var(--live); display: inline-flex; gap: 6px; align-items: center }
.badge.live::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #fff }
.badge.soon { color: var(--accent); background: var(--accent-soft) }
.badge.done { color: var(--gold); background: var(--gold-bg) }
.badge.lock { color: var(--muted); border: 1px solid var(--line) }
.tags { display: flex; flex-wrap: wrap; gap: 6px }
.tag { font-size: 12px; font-weight: 700; padding: 1px 9px; border-radius: 99px; border: 1px solid currentColor }
.tag.men { color: var(--men) } .tag.women { color: var(--women) } .tag.mixed { color: var(--mixed) } .tag.other { color: var(--accent) }
.prog { display: flex; flex-direction: column; gap: 6px }
.prog .bar { height: 8px; border-radius: 99px; background: var(--bg); overflow: hidden }
.prog .bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--qual)); border-radius: inherit }
.prog .lbl { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums }
.prog .lbl b { color: var(--ink) }
.facts { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; color: var(--muted) }
.facts b { color: var(--ink); font-family: var(--f-num) }
.facts .on { color: var(--live); font-weight: 700 }
.go { margin-top: auto; font-weight: 700; font-size: 14px; color: var(--accent) }
.champs { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px; border-radius: 12px; background: var(--gold-bg) }
.champs div { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.4fr); gap: 10px; font-size: 13px }
.champs span { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis }
.champs b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
.champs b::before { content: "🏆 "; }
.empty { border: 1px dashed var(--line); border-radius: 16px; padding: 28px; text-align: center; color: var(--muted) }

/* how-to */
.feats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px }
.feat { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 20px }
.feat b { display: block; font-size: 16px; margin-bottom: 6px }
.feat p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.6 }
.card.info:hover { transform: none }
.card .yo summary { cursor: pointer; font-size: 14px; font-weight: 600; color: var(--accent) }
.card .yo div { white-space: pre-wrap; margin-top: 8px; font-size: 14px; line-height: 1.6; color: var(--muted); max-height: 260px; overflow: auto }
.card .acts { display: flex; gap: 8px; flex-wrap: wrap; margin-top: auto }
.btn.ghost2 { border: 1px solid var(--line); color: var(--ink); background: transparent }
.card .acts .btn { padding: 9px 14px; font-size: 14px }
/* posters: a wide strip on top of a card */
.card .cimg { display: block; width: calc(100% + 40px); margin: -20px -20px 2px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 16px 16px 0 0; background: var(--bg) }
/* 진행 중인 대회: webzine rows, poster on the left */
.wzlist { display: flex; flex-direction: column; gap: 14px }
.wz { display: grid; grid-template-columns: 156px minmax(0, 1fr); gap: 22px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 16px; text-decoration: none; color: inherit; transition: border-color .15s, box-shadow .15s }
.wz:hover { border-color: var(--accent); box-shadow: 0 12px 30px rgba(13,27,54,.10) }
.wzimg { aspect-ratio: 3 / 4; border-radius: 10px; overflow: hidden; background: linear-gradient(150deg, var(--hero-2), var(--accent)); display: grid; place-items: center; align-self: start }
.wzimg img { width: 100%; height: 100%; object-fit: cover; display: block }
.wzimg span { color: #fff; font-family: var(--f-display); font-size: 46px; line-height: 1 }
.wzbody { display: flex; flex-direction: column; gap: 10px; min-width: 0 }
.wzmeta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 13px; color: var(--muted) }
.wz h3 { margin: 0; font-size: 22px; font-weight: 700; line-height: 1.3; text-wrap: balance }
.wznow { list-style: none; margin: 0; padding: 10px 12px; background: var(--bg); border-radius: 10px; display: grid; gap: 4px; font-size: 13.5px }
.wznow li { white-space: nowrap; overflow: hidden; text-overflow: ellipsis }
.wznow b { color: var(--live); font-family: var(--f-num); margin-right: 6px } .wznow i { color: var(--muted); font-style: normal; margin: 0 5px } .wznow small { color: var(--muted) }
@media (max-width: 640px) { .wz { grid-template-columns: 92px minmax(0, 1fr); gap: 14px; padding: 12px } .wz h3 { font-size: 17px } .wz .tags { display: none } .wzimg span { font-size: 30px } }
.gsub { margin: 22px 0 12px; font-size: 16px }
.gsub:first-of-type { margin-top: 0 }
.step h3 small { font-size: 12px; color: var(--muted); font-weight: 600; margin-left: 4px }
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; counter-reset: s }
.step { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 22px }
.step::before { counter-increment: s; content: "0" counter(s); display: block; font-family: var(--f-num); font-weight: 600; color: var(--accent); font-size: 14px; margin-bottom: 10px }
.step h3 { margin: 0 0 6px; font-size: 17px }
.step p { margin: 0; color: var(--muted); font-size: 14px }

footer.foot { margin-top: 64px; background: var(--hero); color: var(--hero-muted); font-size: 13px }
footer.foot .in { display: flex; flex-wrap: wrap; gap: 10px 20px; justify-content: space-between; align-items: center; padding-top: 26px; padding-bottom: 30px }
footer.foot b { color: var(--hero-ink); font-family: var(--f-display); font-weight: 400; font-size: 17px }
footer.foot a { color: var(--hero-ink) }
.err { display: none; margin-top: 14px; padding: 10px 14px; border-radius: 10px; background: rgba(217,52,43,.15); color: #FFD2CE; font-size: 13px }

.onc .more { display: none; text-align: center; font-size: 13px; color: var(--hero-muted); text-decoration: none; padding: 6px }
@media (max-width: 900px) {
  /* no scroll-in-scroll on phones: the first four on court, then a link down to the competitions */
  .onc { max-height: none; overflow: visible }
  .onc .oc:nth-child(n+5) { display: none }
  .onc .more { display: block }
  .hero .in { grid-template-columns: 1fr; padding-top: 44px; padding-bottom: 64px; gap: 28px }
  .stats .grid { grid-template-columns: repeat(2, minmax(0, 1fr)) }
  .stat:nth-child(3) { border-left: 0 }
  .stat:nth-child(n+3) { border-top: 1px solid var(--line) }
  .steps, .feats { grid-template-columns: 1fr }
}
@media (max-width: 720px) {
  .links { display: none }
  .tools { margin-left: auto }
  .cards { grid-template-columns: 1fr }
  .sech p { margin-left: 0; flex-basis: 100% }
  .stat { padding: 14px 16px }
  .stat b { font-size: 24px }
}

/* 종목별 대회: one card per sport (its color along the top), and the chips that filter every list below */
.sports { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px }
.sport { background: var(--surface); border: 1px solid var(--line); border-top: 4px solid var(--sp); border-radius: 16px; padding: 16px; display: flex; flex-direction: column; gap: 8px; min-width: 0 }
.sport[aria-current="true"] { box-shadow: 0 0 0 2px var(--sp) }
.sport .ic { font-size: 28px; line-height: 1 }
.sport h3 { margin: 0; font-size: 18px }
.sport p { margin: 0; font-size: 12.5px; color: var(--muted); line-height: 1.5; flex: 1 }
.sport .nums { display: flex; gap: 10px; font-size: 12.5px; color: var(--muted) }
.sport .nums b { color: var(--ink); font-family: var(--f-num) }
.sport .acts { display: flex; gap: 6px; flex-wrap: wrap }
.sport .acts a, .sport .acts button { font: inherit; font-size: 13px; font-weight: 600; padding: 7px 10px; border-radius: 9px; text-decoration: none; cursor: pointer; border: 1px solid var(--line); background: none; color: var(--ink) }
.sport .acts .pri { background: var(--sp); border-color: var(--sp); color: #fff }
.spchips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px }
.spchips button { font: inherit; font-size: 14px; font-weight: 600; padding: 7px 14px; border-radius: 99px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer }
.spchips button[aria-pressed="true"] { background: var(--ink); color: var(--surface); border-color: var(--ink) }
.spchips small { margin-left: 4px; color: inherit; opacity: .7; font-family: var(--f-num) }
.sptag { display: inline-flex; align-items: center; gap: 3px; font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 99px; color: #fff; background: var(--sp) }
@media (max-width: 1100px) { .sports { grid-template-columns: repeat(3, minmax(0, 1fr)) } }
@media (max-width: 700px) { .sports { grid-template-columns: repeat(2, minmax(0, 1fr)) } }
@media (max-width: 400px) { .sports { grid-template-columns: 1fr } }
