:root {
  --bg: #0b0f14; --panel: #121821; --panel2: #18202b; --line: #233042;
  --text: #e6edf3; --muted: #8b98a8; --blue: #3b82f6; --blue-d: #1d3a66;
  --red: #ef4444; --red-d: #5a1d1d; --gold: #e5b84b; --good: #34d399; --bad: #f87171;
  --radius: 10px;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.45 "Pretendard", "Malgun Gothic", system-ui, sans-serif; }
button { font: inherit; color: inherit; cursor: pointer; }
.muted { color: var(--muted); }
.small { font-size: 12px; }

header { display: flex; align-items: center; gap: 16px; padding: 10px 18px; border-bottom: 1px solid var(--line); background: #0e141b; position: sticky; top: 0; z-index: 5; }
.brand { font-weight: 800; font-size: 17px; letter-spacing: -.3px; }
.brand .muted { font-weight: 400; font-size: 12px; margin-left: 6px; }
.status { font-size: 13px; padding: 4px 10px; border-radius: 999px; background: var(--panel2); }
.status.on { background: #0f3b2c; color: var(--good); }
.status.off { color: var(--muted); }
.hdr-right { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.seg { display: flex; background: var(--panel2); border-radius: 8px; padding: 2px; }
.seg button { border: 0; background: none; padding: 6px 10px; border-radius: 6px; color: var(--muted); }
.seg button.on { background: var(--line); color: var(--text); }
.ghost { border: 1px solid var(--line); background: none; padding: 6px 10px; border-radius: 8px; }
.ghost:hover { background: var(--panel2); }

main { display: grid; grid-template-columns: 250px minmax(0, 1fr) 250px; gap: 14px; padding: 14px 18px; align-items: start; }
@media (max-width: 1100px) { main { grid-template-columns: 1fr 1fr; } .center { grid-column: 1 / -1; order: 3; } }
@media (max-width: 640px) { main { grid-template-columns: 1fr; padding: 12px 16px; } header { flex-wrap: wrap; } }

.team h2 { font-size: 15px; margin: 0 0 8px; display: flex; gap: 8px; align-items: center; }
.ally h2 { color: #93c5fd; } .enemy h2 { color: #fca5a5; }
.arche { font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--panel2); color: var(--text); }

.slot { display: flex; align-items: center; gap: 10px; padding: 8px; margin-bottom: 6px; border-radius: var(--radius); background: var(--panel); border: 1px solid transparent; min-height: 64px; }
.ally .slot { border-left: 3px solid var(--blue-d); }
.enemy .slot { border-left: 3px solid var(--red-d); }
.slot.me { border-color: var(--gold); box-shadow: 0 0 0 1px #e5b84b33 inset; }
.slot.active { animation: pulse 1.4s infinite; }
@keyframes pulse { 50% { background: #1b2533; } }
.slot.clickable { cursor: pointer; } .slot.clickable:hover { background: var(--panel2); }
.icon { width: 46px; height: 46px; border-radius: 8px; background: #0a0d12 center/cover; flex: none; border: 1px solid var(--line); }
.icon.hover { opacity: .45; filter: grayscale(.4); }
.icon.empty { display: grid; place-items: center; color: var(--muted); font-size: 18px; }
.slot .meta { min-width: 0; flex: 1; }
.slot .nm { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.slot .sub { font-size: 12px; color: var(--muted); }
.lanechip { display: inline-block; font-size: 11px; padding: 1px 6px; border-radius: 6px; background: var(--panel2); margin-right: 3px; border: 1px solid var(--line); }
.lanechip.fix { border-color: var(--gold); color: var(--gold); }
.lanechip.btn { cursor: pointer; } .lanechip.btn:hover { border-color: var(--muted); }
.flex { color: var(--gold); font-size: 11px; }
select.lanesel { background: var(--panel2); color: var(--text); border: 1px solid var(--line); border-radius: 6px; font-size: 12px; padding: 1px 4px; }

.notes { list-style: none; padding: 0; margin: 8px 0 0; font-size: 12px; }
.notes li { padding: 4px 8px; border-radius: 6px; background: #2a1f0f; color: #f5d18a; margin-bottom: 4px; }
.notes li.ok { background: #0f2a20; color: #86efac; }

.center { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.bans { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.bans .lbl { font-size: 12px; color: var(--muted); margin-right: 6px; }
.banrow { display: inline-flex; gap: 4px; vertical-align: middle; }
.banrow .icon { width: 30px; height: 30px; filter: grayscale(1) brightness(.7); }
.banrow .icon.empty { font-size: 12px; }
.phase { font-size: 13px; color: var(--muted); }
.rps { padding: 10px 12px; border-radius: var(--radius); background: var(--panel); font-weight: 600; }
.rps.win { border-left: 3px solid var(--good); } .rps.lose { border-left: 3px solid var(--bad); } .rps.even { border-left: 3px solid var(--muted); }
.rps:empty { display: none; }

.panel { background: var(--panel); border-radius: var(--radius); padding: 12px; }
.panel-h { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.panel-h h3 { margin: 0; font-size: 14px; }
.tabs { display: flex; gap: 4px; flex-wrap: wrap; }
.tabs button { border: 1px solid var(--line); background: none; border-radius: 6px; padding: 3px 9px; font-size: 12px; color: var(--muted); }
.tabs button.on { background: var(--line); color: var(--text); }
.tabs button.me::after { content: " ★"; color: var(--gold); }
.busy { font-size: 12px; color: var(--gold); margin-left: auto; }

.recs { display: grid; gap: 8px; }
.rec { display: grid; grid-template-columns: 46px minmax(0, 1fr) auto; gap: 10px; padding: 8px; border-radius: 8px; background: var(--panel2); align-items: start; }
.rec.pickable { cursor: pointer; } .rec.pickable:hover { outline: 1px solid var(--line); }
.rec .nm { font-weight: 700; }
.rec .rank { color: var(--muted); font-size: 12px; margin-right: 4px; }
.score { font-weight: 800; font-size: 16px; text-align: right; font-variant-numeric: tabular-nums; }
.score.pos { color: var(--good); } .score.neg { color: var(--bad); }
.chips { display: flex; flex-wrap: wrap; gap: 4px; margin: 4px 0; }
.chip { font-size: 11px; padding: 1px 6px; border-radius: 6px; background: #0e141b; border: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.chip.pos { color: var(--good); } .chip.neg { color: var(--bad); }
.why { margin: 0; padding-left: 14px; font-size: 12px; color: #c3cdd8; }
.why li.pos::marker { color: var(--good); } .why li.neg::marker { color: var(--bad); }
.why .k { color: var(--muted); }
.more summary { font-size: 12px; color: var(--muted); cursor: pointer; margin-top: 2px; }
.more summary:hover { color: var(--text); }
.empty-msg { color: var(--muted); padding: 10px; font-size: 13px; }

.banrecs { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.banrec { display: flex; gap: 8px; padding: 8px; background: var(--panel2); border-radius: 8px; }
.banrec .icon { width: 38px; height: 38px; }
.banrec .why { padding-left: 0; list-style: none; }

.traits { display: grid; gap: 4px; }
.trow { display: grid; grid-template-columns: 1fr 64px 1fr; align-items: center; gap: 8px; font-size: 12px; }
.trow .t { text-align: center; color: var(--muted); }
.bar { height: 10px; background: #0e141b; border-radius: 5px; position: relative; overflow: hidden; }
.bar i { position: absolute; top: 0; bottom: 0; border-radius: 5px; }
.bar.l i { right: 0; background: var(--blue); }
.bar.r i { left: 0; background: var(--red); }
.tlegend { display: flex; justify-content: space-between; font-size: 12px; margin-bottom: 4px; }

.picker { position: fixed; inset: 0; background: #000a; display: grid; place-items: center; z-index: 20; padding: 16px; }
.picker-box { width: min(760px, 100%); max-height: 80vh; background: var(--panel); border-radius: 12px; display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--line); }
.picker-h { display: flex; gap: 8px; padding: 10px; border-bottom: 1px solid var(--line); }
.picker-h input { flex: 1; background: var(--bg); border: 1px solid var(--line); color: var(--text); border-radius: 8px; padding: 8px 10px; font: inherit; }
.picker-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(70px, 1fr)); gap: 8px; padding: 10px; overflow: auto; }
.pc { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; cursor: pointer; padding: 4px; border-radius: 8px; border: 0; background: none; }
.pc:hover { background: var(--panel2); }
.pc.taken { opacity: .25; pointer-events: none; }
.pc .icon { width: 48px; height: 48px; }

footer { padding: 10px 18px 20px; }
[hidden] { display: none !important; }
.recs.stale, .banrecs.stale { opacity: .45; transition: opacity .2s; }
.arche:empty { display: none; }
.login-page { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.login-box { width: min(340px, 100%); background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 24px; display: grid; gap: 10px; }
.login-box h1 { margin: 0; font-size: 20px; }
.login-box p { margin: 0 0 6px; }
.login-box input { background: var(--bg); border: 1px solid var(--line); color: var(--text); border-radius: 8px; padding: 10px 12px; font: inherit; }
.login-box button { background: var(--blue); border: 0; border-radius: 8px; padding: 10px; font-weight: 700; }
.login-msg { color: var(--bad); font-size: 13px; min-height: 1em; }
.lcu-state { font-size: 12px; padding: 2px 8px; border-radius: 999px; background: var(--panel2); color: var(--muted); }
.lcu-state.on { background: #0f3b2c; color: var(--good); }
/* 데스크탑 앱 대기화면: 챔프 선택 전에는 보드 대신 이것만 */
body.waiting > :not(header):not(#lobby):not(#updateBar):not(#appVer):not(#updateAsk):not(script) { display: none !important; }
.lobby { min-height: calc(100vh - 110px); display: grid; place-items: center; padding: 16px; }
.lobby-box { text-align: center; display: grid; gap: 12px; justify-items: center; width: min(900px, 100%); }
.lobby-players { width: 100%; text-align: left; }
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch .knob { position: relative; width: 38px; height: 22px; border-radius: 999px; background: var(--panel2); border: 1px solid var(--line); transition: background .15s; }
.switch .knob::after { content: ''; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: var(--muted); transition: transform .15s, background .15s; }
.switch input:checked + .knob { background: #0f3b2c; border-color: var(--good); }
.switch input:checked + .knob::after { transform: translateX(16px); background: var(--good); }
.switch input:focus-visible + .knob { outline: 2px solid var(--blue); outline-offset: 2px; }
.lobby-side { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; }
.seg { border: 1px solid var(--line); background: none; padding: 6px 14px; border-radius: 8px; }
.seg:hover { background: var(--panel2); }
.seg[data-next="blue"]:hover { background: var(--blue-d); border-color: var(--blue); }
.seg[data-next="red"]:hover { background: var(--red-d); border-color: var(--red); }
.ask-box { width: min(380px, 100%); background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 22px; display: grid; gap: 12px; justify-items: center; text-align: center; }
.ask-box h3 { margin: 0; }
a.seg { color: var(--text); text-decoration: none; }
#updateAskGo { background: #0f3b2c; border-color: var(--good); }
.ask-box p { margin: 0; }
.series select:disabled { opacity: .6; cursor: default; }
.seg.on[data-side="blue"] { background: var(--blue-d); border-color: var(--blue); }
.seg.on[data-side="red"] { background: var(--red-d); border-color: var(--red); }
.seg.on[data-side=""] { background: var(--panel2); border-color: var(--muted); }
.lobby-players .players { margin: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.lobby-box h1 { margin: 0; font-size: 22px; }
.lobby-box p { margin: 0 0 8px; }
.lobby-pulse { width: 14px; height: 14px; border-radius: 50%; background: var(--muted); animation: lobby-pulse 1.6s ease-in-out infinite; }
.lobby-pulse.on { background: var(--good); }
@keyframes lobby-pulse { 50% { opacity: .3; transform: scale(.8); } }
.user-chip { font-size: 12px; color: var(--muted); }
.user-chip a { color: var(--muted); margin-left: 6px; }

/* ---- 대회 밴픽 ---- */
.series { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 10px 18px; border-bottom: 1px solid var(--line); font-size: 13px; }
.series label { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); }
.series select { background: var(--panel2); color: var(--text); border: 1px solid var(--line); border-radius: 6px; padding: 4px 6px; font: inherit; }
.series .chk { color: var(--text); }
.series .grow { flex: 1; }
.series button:disabled { opacity: .4; cursor: default; }
.history { display: flex; flex-wrap: wrap; gap: 8px 16px; padding: 6px 18px 0; align-items: center; font-size: 12px; }
.history:empty { display: none; }
.hgame { display: inline-flex; align-items: center; gap: 6px; }
.hside { display: inline-flex; gap: 2px; padding: 2px; border-radius: 6px; }
.hside.blue { background: #13233d; } .hside.red { background: #3a1717; }
.icon.xs { width: 22px; height: 22px; border-radius: 4px; }
.icon.sm { width: 30px; height: 30px; border-radius: 6px; }
.icon.gone { filter: grayscale(1) brightness(.6); }
.team.blue h2 { color: #93c5fd; } .team.red h2 { color: #fca5a5; }
.team.blue .slot { border-left: 3px solid var(--blue-d); } .team.red .slot { border-left: 3px solid var(--red-d); }
.team .banrow { display: flex; gap: 4px; margin-bottom: 8px; }
.team .banrow .icon { width: 34px; height: 34px; filter: grayscale(1) brightness(.7); }
.team .banrow .icon.empty { filter: none; font-size: 14px; }
.ban.active .icon { outline: 2px solid var(--gold); filter: none; cursor: pointer; }
.plabel { font-size: 11px; font-weight: 800; color: var(--muted); width: 22px; text-align: center; flex: none; }
.slot.active { border-color: var(--gold) !important; }
.step { padding: 10px 12px; border-radius: var(--radius); background: var(--panel); border-left: 4px solid var(--muted); }
.step.blue { border-left-color: var(--blue); } .step.red { border-left-color: var(--red); } .step.done { border-left-color: var(--good); }
.step-h { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.step .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--gold); animation: pulse 1.4s infinite; }
.step-hint { font-size: 13px; color: #c3cdd8; margin-top: 4px; }
.pairs { display: grid; gap: 6px; }
.pair { display: grid; grid-template-columns: 38px 38px minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 8px; border-radius: 8px; background: var(--panel2); cursor: pointer; }
.pair .icon { width: 38px; height: 38px; }
.pair:hover, .banrec.pickable:hover { outline: 1px solid var(--line); }
.banrec.pickable { cursor: pointer; }
.duos { display: grid; gap: 6px; }
.duo { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 6px 8px; border-radius: 8px; background: var(--panel2); font-size: 13px; }
.duo.blue { border-left: 3px solid var(--blue); } .duo.red { border-left: 3px solid var(--red); }
.duo .pos { color: var(--good); } .duo .neg { color: var(--bad); }
.fearless { display: grid; gap: 6px; }
.frow, .fused { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.flane { width: 34px; font-size: 12px; font-weight: 700; }
.fused { margin-top: 6px; }

.pools { display: flex; flex-wrap: wrap; gap: 8px 20px; padding: 8px 18px 0; font-size: 12px; }
.pool { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.pool .lbl { color: var(--muted); margin-right: 4px; }
.poolc { cursor: pointer; }
.ghost.sm { padding: 2px 8px; font-size: 12px; }

.curve-svg { width: 100%; height: auto; display: block; }
.plan { font-size: 13px; padding: 4px 8px; margin-top: 4px; border-radius: 6px; background: var(--panel2); }

.mapchip { font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 999px; }
.mapchip.blue { background: #13233d; color: #93c5fd; } .mapchip.red { background: #3a1717; color: #fca5a5; }
.mapnote { padding: 6px 18px 0; }

.movers { display: grid; gap: 6px; }
.mrow { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.mgrp { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.mgrp.down { margin-left: auto; }
.mv { display: inline-flex; align-items: center; gap: 3px; font-size: 12px; font-variant-numeric: tabular-nums; }
.mv.gone { opacity: .35; }
.mv .pos { color: var(--good); } .mv .neg { color: var(--bad); }
.pn { font-size: 10px; padding: 0 4px; border-radius: 4px; background: var(--line); }
.pn.buff { background: #0f3b2c; color: var(--good); } .pn.nerf { background: #3a1717; color: var(--bad); }

.step-focus { font-size: 12px; color: var(--gold); margin-top: 4px; }

.players { padding: 8px 18px 0; font-size: 13px; }
.players-h { color: var(--muted); }
.prow { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 8px 0 14px; }
.prow .lbl { width: 48px; color: var(--muted); font-size: 12px; }
.pinputs { display: flex; flex-wrap: wrap; gap: 8px; }
.pin { display: inline-flex; flex-direction: column; gap: 3px; }
.pin input { width: 150px; background: var(--bg); border: 1px solid var(--line); color: var(--text); border-radius: 6px; padding: 4px 6px; font: inherit; font-size: 12px; }
.pin .flane { width: auto; font-size: 11px; color: var(--muted); }
.ptop { display: flex; gap: 3px; min-height: 22px; align-items: center; }
.ptop span { display: inline-flex; flex-direction: column; align-items: center; }
.ptop small { font-size: 9px; color: var(--muted); line-height: 1; }

.paste { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 8px; }
@media (max-width: 640px) { .paste { grid-template-columns: 1fr; } }
.pteam { display: flex; flex-direction: column; gap: 6px; }
.pteam.blue b { color: #93c5fd; } .pteam.red b { color: #fca5a5; }
.pteam textarea { background: var(--bg); border: 1px solid var(--line); color: var(--text); border-radius: 8px; padding: 6px 8px; font: inherit; font-size: 12px; resize: none; }
.roster { display: grid; gap: 4px; }
.rrow { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.rid { font-size: 12px; min-width: 120px; }

.baninfo { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-bottom: 8px; align-items: center; }
.baninfo > div { display: inline-flex; align-items: center; gap: 4px; }
.btags { display: flex; flex-wrap: wrap; gap: 3px; margin: 2px 0; }
.btag { font-size: 11px; font-weight: 700; padding: 1px 6px; border-radius: 6px; background: #3a2a0f; color: var(--gold); }
.lobby-opts { display: grid; grid-template-columns: auto auto; gap: 10px 14px; align-items: center; }
.lobby-opts > .muted { text-align: right; }
.lobby-opts .lobby-side { justify-content: flex-start; }
.series-opts { color: var(--muted); }
.room-code { width: 72px; background: var(--bg); border: 1px solid var(--line); color: var(--text); border-radius: 8px; padding: 6px 10px; font: inherit; text-transform: uppercase; letter-spacing: 2px; text-align: center; }
.room-name { font-size: 18px; letter-spacing: 3px; color: var(--good); }
.hdr-right #roomOut, .hdr-right #roomIn { gap: 6px; flex-wrap: nowrap; }
.hdr-right .seg { padding: 4px 10px; font-size: 13px; }
.hdr-right .room-code { width: 64px; padding: 4px 8px; }
.hdr-right .room-name { font-size: 14px; letter-spacing: 2px; }
.series-opts label { display: inline-flex; align-items: center; gap: 6px; }
.series-opts select { background: var(--panel2); color: var(--text); border: 1px solid var(--line); border-radius: 6px; padding: 4px 6px; font: inherit; }
.series-opts .chk { color: var(--text); }
.mine-chip { font-size: 11px; padding: 1px 7px; border-radius: 999px; background: var(--gold); color: #1a1405; font-weight: 700; vertical-align: middle; }
.app-ver { position: fixed; right: 14px; bottom: 10px; z-index: 4; display: grid; gap: 1px; justify-items: end; font-size: 11px; color: var(--muted); }
.app-ver a { color: var(--muted); }
.app-ver a:hover { color: var(--text); }
.update-bar { padding: 8px 18px; background: #3a2a06; color: var(--gold); font-size: 13px; border-bottom: 1px solid var(--line); }
.update-bar a { color: var(--gold); font-weight: 700; margin-left: 6px; }
.hdr-right .switch { font-size: 13px; gap: 8px; margin-right: 6px; }
