:root {
  --bg: #0f1b2a; --deep: #0a1522; --panel: rgba(20, 36, 56, .82); --panel-solid: #142438; --line: rgba(160, 199, 224, .22);
  --text: #e8f1f8; --muted: #9fb4c8; --accent: #8cc4e8; --gold: #e4ab58; --cta: #5865f2; --danger: #e0627a; --win: #6fd3a0;
  --radius: 18px; --font: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html { color-scheme: dark; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.6 var(--font); min-height: 100vh; display: flex; flex-direction: column; }
body::before { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(to bottom, rgba(12, 24, 41, .62), rgba(12, 25, 43, .86) 40%, var(--bg) 85%), var(--page-bg, url("/img/hero.jpg")) center top / cover no-repeat; }
a { color: var(--accent); }
img { max-width: 100%; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; font-weight: 900; }
h1 { font-size: clamp(2rem, 5vw, 3.2rem); }
code { background: var(--deep); padding: 2px 6px; border-radius: 6px; user-select: all; }
.wrap { width: min(1180px, 100% - 32px); margin-inline: auto; }
main { flex: 1; padding-bottom: 64px; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 16px; z-index: 10; background: var(--panel-solid); padding: 8px 12px; border-radius: 8px; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

/* header */
.top { position: sticky; top: 0; z-index: 5; background: rgba(10, 21, 34, .86); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.nav { display: flex; align-items: center; gap: 16px; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 900; font-size: 1.15rem; }
.brand img { border-radius: 10px; }
.nav nav { margin-left: auto; display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.nav nav > a:not(.btn) { color: var(--text); text-decoration: none; padding: 8px 12px; border-radius: 999px; font-weight: 700; }
.nav nav > a:not(.btn):hover, .nav nav a[aria-current] { background: rgba(140, 196, 232, .14); }
.menu-toggle, .menu-btn { display: none; }

/* buttons */
.btn { display: inline-flex; align-items: center; gap: 6px; border: 0; cursor: pointer; text-decoration: none; font: 800 1rem var(--font);
  color: #0a1522; background: var(--accent); padding: 12px 20px; border-radius: 999px; }
.btn:hover { filter: brightness(1.1); }
.btn.small { padding: 8px 14px; font-size: .9rem; }
.btn.ghost { background: transparent; color: var(--text); box-shadow: inset 0 0 0 2px var(--line); }
.btn.discord { background: var(--cta); color: #fff; }
.btn.danger { background: var(--danger); color: #fff; }
button.link { background: none; border: 0; color: var(--danger); cursor: pointer; font: inherit; text-decoration: underline; padding: 0; }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }

/* common */
.eyebrow { display: inline-block; font-size: .78rem; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; color: var(--gold); margin-bottom: 6px; }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 60ch; }
.muted { color: var(--muted); } .small { font-size: .9rem; }
.page-head { padding: 56px 0 24px; }
.sec { margin: 40px 0 16px; font-size: 1.5rem; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; margin-bottom: 16px; }
.empty { color: var(--muted); font-style: italic; }
.pre { white-space: pre-line; }
.tag { color: var(--muted); font-weight: 700; font-size: .85em; }
.open { color: var(--win); font-weight: 800; }
.win { color: var(--win); font-weight: 800; } .loss { color: var(--danger); font-weight: 800; }
.tier { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .78rem; font-weight: 900; vertical-align: middle; }
.tier.t1 { background: var(--gold); color: #2a1a05; } .tier.t2 { background: #ccd9e6; color: #18222e; } .tier.t3 { background: rgba(160, 199, 224, .18); color: var(--text); }
.alert { background: rgba(224, 98, 122, .15); border: 1px solid var(--danger); padding: 12px 16px; border-radius: 12px; }
.alert.ok { background: rgba(111, 211, 160, .12); border-color: var(--win); }
.two { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; } .chips span { padding: 6px 14px; border-radius: 999px; background: var(--panel); border: 1px solid var(--line); font-weight: 700; }

/* home */
.hero { position: relative; margin-top: 24px; }
.scene { height: clamp(260px, 46vh, 430px); border-radius: 34px; background: var(--deep) url("/img/hero.jpg") center / cover; }
.hero-copy { position: relative; margin: -120px 24px 0; padding: 32px; background: var(--panel); backdrop-filter: blur(8px); border: 1px solid var(--line); border-radius: 28px; max-width: 760px; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin-top: 40px; }
.card { display: block; text-decoration: none; color: var(--text); background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; transition: transform .15s, border-color .15s; }
.card:hover { transform: translateY(-3px); border-color: var(--accent); }
.card p { color: var(--muted); } .cta { font-weight: 800; color: var(--accent); }

/* crews */
.filters { display: flex; gap: 12px; flex-wrap: wrap; align-items: end; margin-bottom: 24px; }
.filters label { display: grid; gap: 4px; font-weight: 700; font-size: .9rem; }
.crew-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.crew-card { display: flex; gap: 16px; align-items: center; padding: 18px; border-radius: var(--radius); text-decoration: none; color: var(--text);
  background: linear-gradient(rgba(6, 14, 24, .45), rgba(6, 14, 24, .45)), var(--grad); border: 1px solid var(--line); transition: transform .15s; text-shadow: 0 1px 3px rgba(0, 0, 0, .6); }
.crew-card .tag, .crew-hero .tag { color: inherit; opacity: .75; }
.crew-card:hover { transform: translateY(-3px); }
.crew-card img { width: 72px; height: 72px; object-fit: cover; border-radius: 16px; background: var(--deep); flex: none; }
.crew-card h3 { margin: 0; font-size: 1.1rem; } .meta { margin: 2px 0; color: var(--muted); font-size: .9rem; }
.crew-card .meta { color: rgba(232, 241, 248, .82); }
.crew-hero { display: flex; gap: 28px; align-items: center; flex-wrap: wrap; margin: 40px 0 24px; padding: 28px; border-radius: 28px; background: linear-gradient(rgba(6, 14, 24, .45), rgba(6, 14, 24, .45)), var(--grad); text-shadow: 0 1px 3px rgba(0, 0, 0, .6); border: 1px solid var(--line); }
.crew-hero img { width: 160px; height: 160px; object-fit: cover; border-radius: 28px; background: var(--deep); }
.crew-hero .eyebrow { color: #fff; opacity: .85; }
.awards { display: flex; gap: 8px; flex-wrap: wrap; }
.award { padding: 4px 12px; border-radius: 999px; font-weight: 800; font-size: .85rem; border: 1px solid var(--c); background: color-mix(in srgb, var(--c) 22%, transparent); }
.stats { display: grid; grid-template-columns: auto 1fr; gap: 6px 24px; margin: 0; } .stats dt { color: var(--muted); } .stats dd { margin: 0; font-weight: 800; }

/* tables */
.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--line); background: var(--panel); margin-bottom: 16px; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
tr:last-child td { border-bottom: 0; }
.lb-crew { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 800; }
.lb-crew img { width: 32px; height: 32px; border-radius: 8px; object-fit: cover; }
.top5 { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 24px; }
.top5 .panel { margin: 0; } .top5 ol { margin: 0; padding-left: 20px; }
.top5 li { display: flex; justify-content: space-between; gap: 8px; } .top5 li a { color: var(--text); font-weight: 700; } .top5 li span { color: var(--gold); font-weight: 800; }

/* events, about */
.event-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.event.k-league { border-top: 4px solid var(--gold); } .event.k-cup { border-top: 4px solid #ee8397; } .event.k-onevone { border-top: 4px solid var(--accent); }
.faq details { border-top: 1px solid var(--line); padding: 12px 0; } .faq summary { cursor: pointer; font-weight: 800; }
.staff-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.staff { display: flex; gap: 16px; align-items: center; } .staff img { border-radius: 50%; width: 72px; height: 72px; object-fit: cover; } .staff h3 { margin: 0; }

/* forms */
.form { display: grid; gap: 14px; }
.form.narrow { max-width: 420px; }
.form label { display: grid; gap: 6px; font-weight: 700; }
.form label.check { display: flex; align-items: center; gap: 8px; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
input, select, textarea { font: inherit; color: var(--text); background: var(--deep); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; min-width: 0; }
input[type="color"] { padding: 2px; height: 44px; }
input[type="checkbox"] { width: 20px; height: 20px; }
textarea { resize: vertical; }
.logo-preview { width: 120px; height: 120px; object-fit: cover; border-radius: 20px; }
.hp { position: absolute; left: -9999px; }
.inline { display: inline; }
.inline-edit { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 14px; }
.inline-edit input:not([type=color]) { flex: 1 1 140px; } .inline-edit input[name=icon] { flex: 0 0 64px; } .w-sm { max-width: 90px; }

/* staff */
.staff-head { margin: 32px 0 24px; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.tabs a { padding: 8px 14px; border-radius: 999px; background: var(--panel); border: 1px solid var(--line); color: var(--text); text-decoration: none; font-weight: 700; font-size: .9rem; }
.tabs a[aria-current] { background: var(--accent); color: #0a1522; }
.app { display: flex; gap: 20px; } .app img { border-radius: 16px; object-fit: cover; flex: none; }
.app form input { flex: 1; }

/* footer */
.foot { border-top: 1px solid var(--line); background: rgba(10, 21, 34, .9); padding: 32px 0; }
.foot .wrap { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.foot p { max-width: 60ch; }
.foot-links { display: flex; gap: 16px; align-items: start; }

@media (max-width: 820px) {
  .menu-btn { display: block; margin-left: auto; font-size: 1.6rem; cursor: pointer; padding: 4px 10px; }
  .nav { flex-wrap: wrap; }
  .nav nav { display: none; width: 100%; flex-direction: column; align-items: stretch; padding-bottom: 12px; }
  .menu-toggle:checked ~ nav { display: flex; }
  .menu-toggle { display: block; position: absolute; opacity: 0; width: 1px; height: 1px; }
  .hero-copy { margin: -80px 8px 0; padding: 22px; }
  .app { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
