:root {
  --bg: #010a13; --bg2: #0a1428; --panel: rgba(9, 20, 40, .82); --line: rgba(200, 170, 110, .2); --line2: rgba(200, 170, 110, .45);
  --gold: #c8aa6e; --gold2: #f0e6d2; --gold3: #785a28; --teal: #0ac8b9; --teal2: #0397ab;
  --text: #f0e6d2; --muted: #a09b8c; --dim: #5b5a56;
  --blue: #4ea4ff; --red: #ff5a66; --good: #3fd38b; --bad: #ff5a66; --ad: #ff9b45; --ap: #a77bff;
  --display: "Cinzel", Georgia, serif; --body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--text); font-family: var(--body); min-height: 100vh; overflow-x: hidden; -webkit-font-smoothing: antialiased; }
button { font: inherit; color: inherit; }
img { display: block; }
::selection { background: rgba(10, 200, 185, .35); }

/* ---------- Animated background ---------- */
#bg { position: fixed; inset: -12%; z-index: 0; display: flex; flex-direction: column; justify-content: center; gap: 18px;
  transform: rotate(-8deg); opacity: .32; transition: opacity .8s, filter .8s; pointer-events: none; }
body:not([data-view="home"]) #bg { opacity: .09; filter: blur(3px) saturate(.5); }
.bg-row { display: flex; gap: 18px; width: max-content; animation: slide 140s linear infinite; }
.bg-row.r1 { animation-duration: 170s; animation-direction: reverse; }
.bg-row.r2 { animation-duration: 155s; }
.bg-row img { width: 170px; height: 309px; object-fit: cover; border-radius: 4px; background: #0a1428; }
@keyframes slide { to { transform: translateX(-50%); } }
#veil { position: fixed; inset: 0; z-index: 1; pointer-events: none;
  background: radial-gradient(ellipse at 50% 30%, rgba(1, 10, 19, .25), rgba(1, 10, 19, .92) 70%), linear-gradient(180deg, rgba(1, 10, 19, .3), var(--bg) 96%); }
#app { position: relative; z-index: 2; max-width: 1200px; margin: 0 auto; padding: 28px 16px 80px; }
@media (prefers-reduced-motion: reduce) { .bg-row, .confetti i, .trophy { animation: none !important; } }

/* ---------- Type ---------- */
h1, h2, h3, h4 { font-family: var(--display); font-weight: 700; letter-spacing: .03em; margin: 0; color: var(--gold2); }
.kicker { font-size: 12px; letter-spacing: .26em; text-transform: uppercase; color: var(--gold); font-weight: 600; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.center { text-align: center; }
.grow { flex: 1; min-width: 0; }
.good { color: var(--good); } .bad { color: var(--bad); }
.page-head { margin-bottom: 22px; }
.page-head h2 { font-size: clamp(28px, 4vw, 42px); margin-top: 6px; }
.page-head p { margin: 8px 0 0; max-width: 620px; }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.btn-row.center { justify-content: center; }

/* ---------- Buttons & inputs ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 22px; border: 1px solid var(--gold3);
  background: linear-gradient(180deg, #1e2328, #12171d); color: var(--gold2); font-weight: 600; font-size: 13px; letter-spacing: .12em;
  text-transform: uppercase; cursor: pointer; transition: .2s; border-radius: 2px; white-space: nowrap; }
.btn:hover:not(:disabled) { border-color: var(--gold); color: #fff; box-shadow: 0 0 18px -4px rgba(200, 170, 110, .6); }
.btn:disabled { opacity: .4; cursor: not-allowed; }
.btn.primary { background: linear-gradient(180deg, #0e3a4a, #082733); border-color: var(--teal2); color: #cdfaf6; box-shadow: inset 0 0 14px rgba(10, 200, 185, .25); }
.btn.primary:hover:not(:disabled) { border-color: var(--teal); box-shadow: inset 0 0 18px rgba(10, 200, 185, .4), 0 0 24px -2px rgba(10, 200, 185, .55); }
.btn.big { padding: 15px 34px; font-size: 14px; }
.btn.ghost { background: none; border-color: transparent; color: var(--muted); }
.btn.ghost:hover:not(:disabled) { color: var(--gold2); box-shadow: none; border-color: var(--line); }
.btn.tiny { padding: 5px 10px; font-size: 10px; }
input { background: rgba(1, 10, 19, .78); border: 1px solid var(--line2); color: var(--gold2); padding: 12px 14px; font: inherit; font-size: 16px; border-radius: 2px; outline: none; transition: .2s; width: 100%; }
input:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(200, 170, 110, .15); }
input::placeholder { color: var(--dim); }
.field { display: flex; flex-direction: column; gap: 6px; text-align: left; }
.field span { font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }

/* ---------- Panels ---------- */
.panel { background: var(--panel); border: 1px solid var(--line); padding: 20px; backdrop-filter: blur(8px); position: relative; }
.panel::before { content: ""; position: absolute; left: -1px; right: -1px; top: -1px; height: 2px; background: linear-gradient(90deg, transparent, var(--gold3), transparent); }
.panel-h { font-size: 11px; letter-spacing: .22em; text-transform: uppercase; color: var(--gold); font-weight: 600; margin-bottom: 14px; }
.status { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; font-weight: 700; color: var(--muted); }
.status.good { color: var(--good); } .status.bad { color: var(--bad); } .status.gold { color: #ffd76a; }
.tag { font-style: normal; font-size: 10px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; padding: 2px 7px; border: 1px solid var(--teal2); color: var(--teal); }
.tag.gold { border-color: var(--gold3); color: var(--gold); }
.spinner { width: 16px; height: 16px; border: 2px solid var(--line2); border-top-color: var(--teal); border-radius: 50%; animation: spin .9s linear infinite; display: inline-block; flex: none; }
.spinner.big { width: 44px; height: 44px; border-width: 3px; }
@keyframes spin { to { transform: rotate(360deg); } }
.waiting { display: flex; align-items: center; gap: 10px; color: var(--muted); margin: 0; }

/* ---------- Home ---------- */
.home { display: flex; flex-direction: column; align-items: center; text-align: center; padding-top: 4vh; }
.hero .kicker { display: flex; align-items: center; justify-content: center; gap: 14px; }
.hero .kicker span { width: 46px; height: 1px; background: linear-gradient(90deg, transparent, var(--gold)); }
.hero .kicker span:last-child { transform: scaleX(-1); }
.logo { font-family: var(--display); font-weight: 900; font-size: clamp(64px, 12vw, 136px); line-height: .9; margin: 18px 0 12px; letter-spacing: .06em;
  background: linear-gradient(180deg, #fff6e0 10%, #e8cf96 45%, #a8823f 85%); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 4px 30px rgba(200, 170, 110, .35)); }
.logo em { font-style: normal; display: block; font-size: .36em; letter-spacing: .62em; margin-right: -.62em; margin-top: 8px;
  background: linear-gradient(180deg, #8ffcf2, #0ac8b9 50%, #03708a); -webkit-background-clip: text; background-clip: text; }
.tagline { max-width: 560px; margin: 0 auto; color: var(--muted); font-size: 17px; line-height: 1.6; }
.name-field { width: min(340px, 100%); margin: 26px auto 0; }
.modes { display: grid; grid-template-columns: 1.15fr 1fr; gap: 18px; width: 100%; max-width: 1000px; margin: 40px auto 0; text-align: left; }
.mode { position: relative; display: flex; gap: 16px; align-items: center; padding: 18px 20px; text-align: left;
  background: linear-gradient(180deg, rgba(16, 30, 56, .86), rgba(6, 14, 28, .94)); border: 1px solid var(--line);
  cursor: pointer; transition: .25s; overflow: hidden; backdrop-filter: blur(6px); }
.mode::after { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 15% 0%, rgba(10, 200, 185, .16), transparent 60%); opacity: 0; transition: .3s; pointer-events: none; }
.mode:hover { border-color: var(--gold); transform: translateY(-3px); box-shadow: 0 18px 40px -16px #000, 0 0 30px -8px rgba(200, 170, 110, .4); }
.mode:hover::after { opacity: 1; }
.mode h3 { font-size: 18px; }
.mode p { margin: 4px 0 0; color: var(--muted); font-size: 14px; line-height: 1.5; }
.mode-ic { width: 46px; height: 46px; flex: none; display: grid; place-items: center; border: 1px solid var(--line2); color: var(--gold); transform: rotate(45deg); margin: 0 6px; }
.mode-ic svg { width: 22px; height: 22px; transform: rotate(-45deg); }
.mode-stack { display: flex; flex-direction: column; gap: 14px; }
.mode-stack .mode { flex: 1; }
.join-mode { cursor: default; }
.join-mode:hover { transform: none; }
.join-mode.invited { border-color: var(--teal2); box-shadow: 0 0 30px -10px var(--teal); }
.join-row { display: flex; gap: 8px; margin-top: 10px; }
.join-row input { flex: 1; min-width: 0; text-transform: uppercase; letter-spacing: .32em; font-weight: 700; text-align: center; padding: 10px; }
.featured { flex-direction: column; align-items: stretch; justify-content: flex-end; min-height: 340px; padding: 0; }
.feat-art { position: absolute; inset: 0; background-size: cover; background-position: center 20%; transition: transform .8s; }
.featured:hover .feat-art { transform: scale(1.05); }
.featured::before { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(180deg, rgba(1, 10, 19, .05) 20%, rgba(1, 10, 19, .85) 65%, #010a13); }
.feat-body { position: relative; z-index: 2; padding: 26px; }
.feat-body h3 { font-size: 34px; margin: 10px 0 6px; }
.feat-body p { max-width: 420px; color: #cfc8b4; }
.badge { display: inline-block; font-size: 10px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; padding: 4px 9px; color: #04161a; background: linear-gradient(180deg, #3ff0e2, #0aa79a); }
.mode-cta { display: inline-flex; gap: 8px; margin-top: 16px; color: var(--teal); font-size: 13px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.mode-cta i { font-style: normal; transition: transform .25s; }
.featured:hover .mode-cta i { transform: translateX(5px); }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; max-width: 1000px; width: 100%; margin: 56px auto 0; text-align: left; }
.step { padding-top: 16px; border-top: 1px solid var(--line); }
.step b { font-family: var(--display); color: var(--gold3); font-size: 26px; }
.step h4 { font-size: 17px; margin: 4px 0 6px; }
.step p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.55; }
footer { margin-top: 48px; color: var(--dim); font-size: 12px; max-width: 600px; }

/* ---------- Modal, settings ---------- */
.modal-back { position: fixed; inset: 0; z-index: 50; background: rgba(1, 6, 12, .75); backdrop-filter: blur(4px); display: grid; place-items: center; padding: 16px; animation: fade .2s; }
.modal { width: min(480px, 100%); text-align: left; background: linear-gradient(180deg, #0f1d36, #081221); border: 1px solid var(--gold3); padding: 28px; box-shadow: 0 30px 80px rgba(0, 0, 0, .6); animation: pop .25s; }
.modal h2 { font-size: 28px; margin: 6px 0 22px; }
.setting { margin-bottom: 18px; }
.setting > span { display: block; font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.note { font-size: 13px; color: var(--muted); margin: 8px 0 0; line-height: 1.5; }
.seg { display: flex; border: 1px solid var(--line2); }
.seg button { flex: 1; padding: 10px 8px; background: transparent; border: 0; border-right: 1px solid var(--line); color: var(--muted); cursor: pointer; font-weight: 600; font-size: 13px; transition: .15s; }
.seg button:last-child { border-right: 0; }
.seg button.on { background: linear-gradient(180deg, rgba(200, 170, 110, .28), rgba(200, 170, 110, .08)); color: var(--gold2); }
.seg button:disabled { cursor: default; }
.seg button:disabled:not(.on) { opacity: .35; }
.seg button:hover:not(:disabled):not(.on) { color: var(--gold2); background: rgba(200, 170, 110, .06); }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 26px; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(12px) scale(.98); } }

/* ---------- Draft ---------- */
.draft-top { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.draft-top h2 { font-size: clamp(30px, 5vw, 46px); margin-top: 4px; }
.draft-top h2 span { font-size: .5em; }
.need { display: flex; align-items: center; gap: 8px; }
.need-r { width: 36px; height: 36px; display: grid; place-items: center; border: 1px solid var(--teal2); color: var(--teal); background: rgba(10, 200, 185, .08); }
.need-r.filled { border-color: var(--line); color: var(--dim); background: none; }
.need-r svg { width: 22px; height: 22px; }
.ccards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; perspective: 1200px; }
.ccard { position: relative; display: flex; flex-direction: column; justify-content: flex-end; min-height: 500px; padding: 0; border: 1px solid var(--gold3);
  background: linear-gradient(160deg, #13284a, #0a1428); cursor: pointer; overflow: hidden; text-align: left;
  transition: transform .3s, box-shadow .3s, border-color .3s, opacity .3s; animation: cardIn .55s cubic-bezier(.2, .8, .2, 1) backwards; animation-delay: var(--d); }
.ccard-art { position: absolute; inset: 0; background-size: cover; background-position: center 12%; transition: transform .6s; }
.ccard::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 22%, rgba(1, 10, 19, .7) 50%, #010a13 85%); }
.ccard-body { position: relative; z-index: 1; padding: 18px; }
.ccard .key { position: absolute; top: 10px; left: 10px; z-index: 1; width: 26px; height: 26px; display: grid; place-items: center; font-size: 12px; font-weight: 700; color: var(--gold); background: rgba(1, 10, 19, .7); border: 1px solid var(--gold3); }
.ccard:hover { transform: translateY(-10px); border-color: var(--gold); box-shadow: 0 24px 50px -18px #000, 0 0 0 1px var(--gold), 0 0 40px -8px rgba(200, 170, 110, .5); }
.ccard:hover .ccard-art { transform: scale(1.06); }
.ccard.chosen { transform: translateY(-14px) scale(1.03); border-color: var(--teal); box-shadow: 0 0 0 2px var(--teal), 0 0 60px rgba(10, 200, 185, .55); }
.ccard.faded { opacity: .2; transform: scale(.95); }
.ccard h3 { font-size: 26px; margin: 6px 0 8px; }
@keyframes cardIn { from { opacity: 0; transform: translateY(40px) rotateY(-16deg); } }
.ccard-roles { display: flex; flex-wrap: wrap; gap: 4px 12px; }
.rchip { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.rchip svg { width: 16px; height: 16px; }
.rchip.need { color: var(--teal); }
.ccard-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.dmg, .tagx { font-size: 10px; font-weight: 700; letter-spacing: .12em; padding: 3px 7px; border: 1px solid; text-transform: uppercase; }
.dmg.AD { color: var(--ad); border-color: rgba(255, 155, 69, .5); background: rgba(255, 155, 69, .08); }
.dmg.AP { color: var(--ap); border-color: rgba(167, 123, 255, .5); background: rgba(167, 123, 255, .08); }
.tagx { color: var(--gold); border-color: var(--line2); }
.ctags { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 10px; }
.ctag { font-size: 11px; font-weight: 600; padding: 3px 8px; }
.ctag.good { color: #9ff5c9; background: rgba(63, 211, 139, .14); border: 1px solid rgba(63, 211, 139, .45); }
.ctag.bad { color: #ffb3b9; background: rgba(255, 90, 102, .14); border: 1px solid rgba(255, 90, 102, .45); }
.stats { display: grid; gap: 6px; }
.stat { display: grid; grid-template-columns: 74px 1fr 16px; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); }
.stat .bar { height: 4px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.stat .bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--teal2), var(--gold)); }
.stat b { color: var(--gold2); font-size: 12px; text-align: right; }
.draft-foot { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-top: 26px; flex-wrap: wrap; }
.slots { display: flex; gap: 10px; }
.slot { width: 60px; height: 60px; border: 1px solid var(--line); display: grid; place-items: center; background: rgba(1, 10, 19, .6); color: var(--dim); font-family: var(--display); font-size: 20px; }
.slot.next { border-color: var(--teal); color: var(--teal); animation: pulse 1.6s infinite; }
.slot.filled { border-color: var(--gold3); }
.slot.filled img { width: 100%; height: 100%; object-fit: cover; }
@keyframes pulse { 50% { box-shadow: 0 0 18px -2px var(--teal); } }

/* ---------- Lanes ---------- */
.roles-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 22px; align-items: start; }
.rlist { display: flex; flex-direction: column; gap: 10px; }
.rrow { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 14px; background: var(--panel); border: 1px solid var(--line); transition: .2s; }
.rrow.set { border-color: var(--line2); }
.rrow-champ { display: flex; align-items: center; gap: 12px; min-width: 0; }
.rimg { width: 56px; height: 56px; object-fit: cover; border: 1px solid var(--gold3); flex: none; }
.rrow-champ b { display: block; font-family: var(--display); font-size: 18px; color: var(--gold2); }
.fit, .mu { display: block; font-size: 12px; font-weight: 600; margin-top: 2px; }
.fit.none { color: var(--dim); } .fit.main { color: var(--good); } .fit.sec { color: var(--teal); } .fit.off { color: var(--bad); }
.mu { color: var(--muted); font-weight: 500; }
.mu.good { color: var(--good); } .mu.bad { color: var(--bad); }
.rbtns { display: flex; gap: 6px; }
.rbtn { position: relative; width: 56px; height: 58px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  background: rgba(1, 10, 19, .6); border: 1px solid var(--line); color: var(--dim); cursor: pointer; transition: .15s; }
.rbtn svg { width: 24px; height: 24px; }
.rbtn span { font-size: 9px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.rbtn.nat { color: var(--muted); border-color: var(--gold3); }
.rbtn.nat::after { content: ""; position: absolute; top: 4px; right: 4px; width: 5px; height: 5px; border-radius: 50%; background: var(--gold); }
.rbtn.taken { opacity: .4; }
.rbtn:hover { color: var(--gold2); border-color: var(--gold); opacity: 1; transform: translateY(-2px); }
.rbtn.on { color: #04161a; background: linear-gradient(180deg, #3ff0e2, #0aa79a); border-color: var(--teal); box-shadow: 0 0 18px -2px rgba(10, 200, 185, .6); opacity: 1; }
.rbtn.on:not(.nat) { color: #fff; background: linear-gradient(180deg, #ff7a84, #b8303c); border-color: var(--bad); box-shadow: 0 0 18px -2px rgba(255, 90, 102, .6); }
.rbtn.on.nat::after { background: #04161a; }
.row-actions { display: flex; gap: 10px; margin-top: 12px; }
.side { display: flex; flex-direction: column; gap: 16px; }
.map { position: relative; aspect-ratio: 1; width: 100%; max-width: 320px; margin: 0 auto; border: 1px solid var(--line); }
.map svg { width: 100%; height: 100%; display: block; }
.pin { position: absolute; width: 16%; aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%; border: 2px solid var(--gold); overflow: hidden;
  box-shadow: 0 0 0 3px rgba(1, 10, 19, .8), 0 6px 16px rgba(0, 0, 0, .6); background: #0a1428; display: grid; place-items: center; color: var(--dim); animation: pop .3s; }
.pin img { width: 100%; height: 100%; object-fit: cover; }
.pin.empty { border: 1px dashed var(--line2); box-shadow: none; background: rgba(1, 10, 19, .7); }
.pin.empty svg { width: 55%; height: 55%; }
.pin.off { border-color: var(--bad); }
.meter-row { display: grid; grid-template-columns: 100px 1fr; gap: 10px; align-items: center; font-size: 12px; color: var(--muted); margin-bottom: 10px; }
.mbar { height: 8px; background: rgba(255, 255, 255, .07); position: relative; overflow: hidden; }
.mbar i { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, var(--teal2), var(--teal)); transition: width .4s; }
.split { display: flex; height: 18px; gap: 2px; background: rgba(255, 255, 255, .05); }
.split i { font-style: normal; font-size: 10px; font-weight: 700; display: grid; place-items: center; color: #10131a; }
.split .ad { background: var(--ad); } .split .ap { background: var(--ap); }
.grade-box { display: flex; align-items: flex-start; gap: 16px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.grade { font-family: var(--display); font-size: 56px; font-weight: 900; line-height: 1; width: 64px; text-align: center; flex: none; }
.grade.S { color: #ffd76a; text-shadow: 0 0 24px rgba(255, 215, 106, .6); } .grade.A { color: var(--teal); } .grade.B { color: #7fb4ff; }
.grade.C { color: var(--muted); } .grade.D { color: var(--bad); }
.notes { list-style: none; margin: 0; padding: 0; font-size: 13px; display: grid; gap: 5px; line-height: 1.4; }
.notes li::before { content: "◆"; color: var(--good); margin-right: 8px; font-size: 8px; vertical-align: 2px; }
.notes li.bad::before { color: var(--bad); }
.lock { width: 100%; }
.enemy { margin-top: 18px; }
.elist { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; }
.erow { display: flex; gap: 10px; align-items: flex-start; padding: 8px; background: rgba(1, 10, 19, .5); border: 1px solid rgba(255, 90, 102, .18); }
.erow img { width: 40px; height: 40px; border: 1px solid rgba(255, 90, 102, .5); flex: none; }
.erow b { display: block; font-size: 14px; }
.erow small { display: block; font-size: 12px; color: var(--muted); margin-top: 1px; }
.erow small.bad { color: #ff8f98; } .erow small.good { color: var(--good); }

/* ---------- Bracket ---------- */
.bracket-wrap { overflow-x: auto; padding: 6px 2px 16px; }
.bracket { display: flex; gap: 32px; min-width: max-content; }
.bcol { display: flex; flex-direction: column; width: 210px; }
.bcol-h { font-size: 11px; letter-spacing: .22em; text-transform: uppercase; color: var(--gold); font-weight: 600; padding-bottom: 10px; border-bottom: 1px solid var(--line); margin-bottom: 12px; }
.bcol-m { flex: 1; display: flex; flex-direction: column; justify-content: space-around; gap: 12px; }
.bm { position: relative; background: var(--panel); border: 1px solid var(--line); transition: .2s; }
.bm::after { content: ""; position: absolute; right: -33px; top: 50%; width: 32px; border-top: 1px solid var(--line2); }
.bm.played { cursor: pointer; }
.bm.played:hover { border-color: var(--gold); }
.bm.upcoming { border-color: rgba(10, 200, 185, .55); box-shadow: 0 0 18px -8px var(--teal); }
.bt { display: flex; align-items: center; gap: 8px; padding: 9px 12px; font-size: 14px; }
.bt + .bt { border-top: 1px solid rgba(200, 170, 110, .1); }
.bt-n { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bt.win { color: var(--gold2); font-weight: 700; background: linear-gradient(90deg, rgba(200, 170, 110, .16), transparent); }
.bt.lose { color: var(--dim); }
.bt.me { box-shadow: inset 3px 0 0 var(--teal); }
.bt.me .bt-n { color: var(--teal); }
.bt.me.lose .bt-n { color: #3b7f7a; }
.bt-k { font-family: var(--display); font-weight: 700; color: var(--gold); min-width: 18px; text-align: right; }
.bm.empty .bt { color: var(--dim); font-style: italic; }
.bchamp { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 20px 12px; border: 1px solid var(--line); text-align: center; font-family: var(--display); color: var(--dim); background: var(--panel); }
.bchamp svg { width: 46px; height: 46px; color: var(--gold3); }
.bchamp.won { border-color: var(--gold); color: var(--gold2); box-shadow: 0 0 40px -10px rgba(200, 170, 110, .6); }
.bchamp.won svg { color: #ffd76a; filter: drop-shadow(0 0 12px rgba(255, 215, 106, .6)); }
.bracket-bottom { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 22px; }
.team-title { font-size: 22px; margin-bottom: 12px; }
.lineup-mini { display: flex; flex-direction: column; gap: 8px; }
.lm { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.lm img { width: 34px; height: 34px; border: 1px solid var(--gold3); }
.lm-r { color: var(--muted); display: grid; }
.lm-r svg { width: 18px; height: 18px; }
.lm .off, .rp-n small.off { color: var(--bad); font-style: normal; font-size: 11px; }
.action { display: flex; flex-direction: column; justify-content: center; }
.big-line { font-family: var(--display); font-size: 26px; color: var(--gold2); margin: 0 0 6px; }
.action .btn-row { margin-top: 14px; }

/* ---------- Match ---------- */
.match-kicker { text-align: center; margin-bottom: 12px; }
.scoreboard { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 20px; padding: 22px 26px; border: 1px solid var(--line);
  background: linear-gradient(90deg, rgba(78, 164, 255, .18), rgba(9, 20, 40, .88) 35%, rgba(9, 20, 40, .88) 65%, rgba(255, 90, 102, .18)); }
.sb-team h3 { font-size: clamp(18px, 2.6vw, 28px); overflow-wrap: anywhere; }
.sb-team.b { text-align: right; }
.sb-side { font-size: 11px; letter-spacing: .2em; text-transform: uppercase; font-weight: 700; }
.sb-team.a .sb-side { color: var(--blue); } .sb-team.b .sb-side { color: var(--red); }
.sb-mid { text-align: center; }
.sb-k { font-family: var(--display); font-size: 46px; font-weight: 900; display: flex; gap: 16px; align-items: center; justify-content: center; line-height: 1; }
#ka { color: var(--blue); } #kb { color: var(--red); }
.sb-k i { display: grid; color: var(--gold3); }
.sb-k i svg { width: 22px; height: 22px; }
.sb-clock { font-variant-numeric: tabular-nums; color: var(--gold2); font-size: 15px; margin-top: 8px; letter-spacing: .12em; }
.sb-gold { font-size: 12px; color: var(--muted); margin-top: 2px; }
.sb-gold.a { color: var(--blue); } .sb-gold.b { color: var(--red); }
.wp { margin: 14px 0 22px; }
.wp-bar { height: 8px; background: var(--red); position: relative; overflow: hidden; }
.wp-bar i { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, #2f7fe0, var(--blue)); transition: width .8s cubic-bezier(.2, .8, .2, 1); }
.wp-bar i::after { content: ""; position: absolute; right: 0; top: 0; bottom: 0; width: 2px; background: #fff; box-shadow: 0 0 10px #fff; }
.wp-l { display: flex; justify-content: space-between; font-size: 12px; margin-top: 6px; font-weight: 700; }
#wpa { color: var(--blue); } #wpb { color: var(--red); }
.match-grid { display: grid; grid-template-columns: 230px 1fr 230px; gap: 18px; align-items: start; }
.roster { display: flex; flex-direction: column; gap: 8px; }
.rp { display: flex; align-items: center; gap: 10px; padding: 8px; background: var(--panel); border: 1px solid var(--line); }
.roster.a .rp { border-left: 3px solid var(--blue); }
.roster.b .rp { border-right: 3px solid var(--red); flex-direction: row-reverse; text-align: right; }
.rp-img { position: relative; width: 46px; height: 46px; flex: none; }
.rp-img img { width: 100%; height: 100%; object-fit: cover; border: 1px solid var(--gold3); }
.rp-role { position: absolute; bottom: -5px; right: -5px; width: 20px; height: 20px; background: var(--bg); border: 1px solid var(--gold3); display: grid; place-items: center; color: var(--gold); }
.rp-role svg { width: 13px; height: 13px; }
.roster.b .rp-role { right: auto; left: -5px; }
.rp-n { flex: 1; min-width: 0; }
.rp-n b { display: block; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rp-n small { color: var(--muted); font-size: 11px; }
.rp-k { font-family: var(--display); font-weight: 700; font-size: 20px; color: var(--gold); min-width: 22px; text-align: center; }
.rp-k.pop { animation: kpop .45s; }
@keyframes kpop { 50% { transform: scale(1.7); color: #fff; } }
.feed { height: 400px; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; padding-right: 4px; scroll-behavior: smooth; }
.fe { display: flex; gap: 12px; padding: 10px 12px; background: rgba(1, 10, 19, .55); border-left: 3px solid var(--gold3); animation: feIn .35s; }
.fe.s-a { border-left-color: var(--blue); } .fe.s-b { border-left-color: var(--red); }
.fe-t { font-variant-numeric: tabular-nums; font-size: 12px; color: var(--muted); padding-top: 2px; min-width: 40px; }
.fe p { margin: 0; font-size: 14px; line-height: 1.5; }
.cn { color: var(--gold2); }
.tn.t-a, .t-a { color: var(--blue); } .tn.t-b, .t-b { color: var(--red); }
@keyframes feIn { from { opacity: 0; transform: translateX(-10px); } }
.feed-empty { color: var(--dim); font-size: 14px; text-align: center; padding: 60px 0; font-style: italic; }
.match-actions { display: flex; justify-content: center; margin: 22px 0; }
.analysis-row { display: grid; grid-template-columns: 1fr 1.35fr 1fr; gap: 18px; align-items: start; }
.an { display: flex; gap: 14px; align-items: flex-start; }
.an .grade { font-size: 44px; width: 48px; }
.lane { display: grid; grid-template-columns: 1fr 74px 1fr; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid rgba(200, 170, 110, .08); }
.lane:last-child { border-bottom: 0; }
.ln-c { display: flex; align-items: center; gap: 8px; font-size: 13px; min-width: 0; }
.ln-c b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; color: var(--muted); }
.ln-c.b { justify-content: flex-end; text-align: right; }
.ln-c img { width: 30px; height: 30px; border: 1px solid var(--gold3); flex: none; }
.fav-a .ln-c.a b { color: var(--blue); } .fav-b .ln-c.b b { color: var(--red); }
.ln-mid { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.ln-role { color: var(--gold); display: grid; }
.ln-role svg { width: 18px; height: 18px; }
.ln-bar { position: relative; width: 100%; height: 4px; background: rgba(255, 255, 255, .08); }
.ln-bar i { position: absolute; top: 0; bottom: 0; }
.ln-bar i.a { right: 50%; background: var(--blue); }
.ln-bar i.b { left: 50%; background: var(--red); }
.ln-why { grid-column: 1 / -1; text-align: center; font-size: 11px; color: var(--muted); }
.others { margin-top: 22px; }
.om-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.om { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; padding: 10px 14px; background: var(--panel); border: 1px solid var(--line); cursor: pointer; font-size: 13px; }
.om span:last-child { text-align: right; }
.om:hover { border-color: var(--gold); }
.om .w { color: var(--gold2); font-weight: 700; } .om .l { color: var(--dim); }
.om b { font-family: var(--display); color: var(--gold); }
.banner { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 16px; cursor: pointer;
  background: radial-gradient(ellipse at center, rgba(1, 10, 19, .82), rgba(1, 10, 19, .95)); backdrop-filter: blur(6px); animation: fade .3s; transition: opacity .5s; }
.banner.out { opacity: 0; }
.banner-in { text-align: center; animation: bannerIn .7s cubic-bezier(.2, .9, .3, 1.2); }
.banner h2 { font-size: clamp(56px, 13vw, 128px); font-weight: 900; letter-spacing: .12em; line-height: 1;
  background: linear-gradient(180deg, #fff3cf, #e2c27c 50%, #9a7536); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 30px rgba(226, 194, 124, .5)); }
.banner.defeat h2 { background-image: linear-gradient(180deg, #ffd0d4, #ff5a66 55%, #8a1f29); filter: drop-shadow(0 0 30px rgba(255, 90, 102, .45)); }
.banner.neutral h2 { font-size: clamp(32px, 7vw, 64px); letter-spacing: .06em; }
.banner .line { width: min(520px, 80vw); height: 1px; margin: 16px auto; background: linear-gradient(90deg, transparent, var(--gold), transparent); }
.banner p { display: flex; align-items: center; justify-content: center; gap: 12px; color: var(--gold2); margin: 0 0 10px; font-size: 16px; }
.banner p img { width: 44px; height: 44px; border: 1px solid var(--gold); }
.banner small { color: var(--muted); }
@keyframes bannerIn { from { opacity: 0; transform: scale(1.3); } }

/* ---------- End screens ---------- */
.end { text-align: center; position: relative; }
.trophy { width: 104px; height: 104px; margin: 8px auto 6px; color: #ffd76a; filter: drop-shadow(0 0 30px rgba(255, 215, 106, .55)); animation: float 3.2s ease-in-out infinite; }
.trophy.dim { color: var(--gold3); filter: none; }
.trophy svg { width: 100%; height: 100%; }
@keyframes float { 50% { transform: translateY(-8px); } }
.champ-name { font-size: clamp(40px, 8vw, 88px); margin: 14px 0 12px; overflow-wrap: anywhere; }
.champ-name.defeat { background-image: linear-gradient(180deg, #ffd0d4, #ff5a66 55%, #8a1f29); filter: drop-shadow(0 4px 30px rgba(255, 90, 102, .3)); }
.lineup { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; margin: 32px 0; }
.lcard { position: relative; aspect-ratio: 308 / 560; background-size: cover; background-position: center; background-color: #0a1428; border: 1px solid var(--gold3); animation: cardIn .6s backwards; animation-delay: var(--d); overflow: hidden; }
.lcard::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgba(1, 10, 19, .95)); }
.lcard-b { position: absolute; left: 0; right: 0; bottom: 0; z-index: 1; padding: 12px 8px; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.lcard-b b { font-family: var(--display); font-size: 17px; color: var(--gold2); }
.lcard-b small { color: var(--muted); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; }
.lrole { color: var(--gold); display: grid; }
.lrole svg { width: 22px; height: 22px; }
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 40; overflow: hidden; }
.confetti i { position: absolute; top: -20px; width: 8px; height: 14px; opacity: .9; animation: fall linear infinite; }
@keyframes fall { to { transform: translateY(110vh) rotate(720deg); } }
.final-score { display: flex; align-items: center; justify-content: center; gap: 24px; margin: 28px 0; }
.final-score div { display: flex; align-items: center; gap: 16px; }
.final-score b { font-family: var(--display); font-size: 20px; color: var(--muted); }
.final-score span { font-family: var(--display); font-size: 64px; font-weight: 900; color: var(--dim); line-height: 1; }
.final-score .win b { color: var(--gold2); } .final-score .win span { color: var(--gold); text-shadow: 0 0 30px rgba(200, 170, 110, .5); }
.final-score i { font-style: normal; color: var(--dim); font-size: 30px; }
.games { display: flex; flex-direction: column; gap: 8px; max-width: 720px; margin: 0 auto 28px; }
.game-row { display: grid; grid-template-columns: 80px 1fr auto auto auto; align-items: center; gap: 16px; padding: 12px 16px; background: var(--panel); border: 1px solid var(--line); cursor: pointer; text-align: left; font-size: 14px; transition: .2s; }
.game-row:hover { border-color: var(--gold); }
.gr-n { font-family: var(--display); color: var(--gold); }
.gr-w { font-weight: 700; }
.gr-k { color: var(--muted); font-variant-numeric: tabular-nums; }
.gr-mvp { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12px; }
.gr-mvp img { width: 26px; height: 26px; border: 1px solid var(--gold3); }
.gr-go { color: var(--teal); font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }

/* ---------- Duel ---------- */
.sbar { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; padding: 12px 18px; margin-bottom: 16px; background: var(--panel); border: 1px solid var(--line); }
.sbar-p { display: flex; align-items: center; gap: 10px; min-width: 0; }
.sbar-p b { font-family: var(--display); font-size: 17px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sbar-p.r { justify-content: flex-end; }
.sbar-p em { font-style: normal; font-size: 10px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--teal); }
.pips { display: flex; gap: 5px; }
.pips i { width: 12px; height: 12px; transform: rotate(45deg); border: 1px solid var(--gold3); }
.pips i.on { background: var(--gold); border-color: var(--gold); box-shadow: 0 0 10px rgba(200, 170, 110, .7); }
.sbar-mid { text-align: center; display: flex; flex-direction: column; }
.sbar-mid span { font-size: 10px; letter-spacing: .22em; text-transform: uppercase; color: var(--muted); }
.sbar-mid b { font-family: var(--display); font-size: 18px; color: var(--gold); }
.porder { display: flex; justify-content: center; gap: 6px; margin-bottom: 18px; flex-wrap: wrap; }
.po { width: 30px; height: 30px; display: grid; place-items: center; font-size: 12px; font-weight: 700; border: 1px solid; opacity: .55; }
.po.b { border-color: rgba(78, 164, 255, .5); color: var(--blue); }
.po.r { border-color: rgba(255, 90, 102, .5); color: var(--red); }
.po.me { border-width: 2px; }
.po.done { opacity: .25; }
.po.now { opacity: 1; transform: scale(1.18); box-shadow: 0 0 16px -2px currentColor; background: rgba(255, 255, 255, .06); }
.duel-grid { display: grid; grid-template-columns: 190px 1fr 190px; gap: 18px; align-items: start; }
.tcol { display: flex; flex-direction: column; gap: 8px; }
.tcol-h { display: flex; flex-direction: column; gap: 2px; padding: 0 2px 8px; border-bottom: 2px solid; margin-bottom: 4px; }
.tcol.blue .tcol-h { border-color: var(--blue); } .tcol.red .tcol-h { border-color: var(--red); text-align: right; }
.tcol-h .side { font-size: 11px; letter-spacing: .2em; text-transform: uppercase; font-weight: 700; }
.tcol.blue .side { color: var(--blue); } .tcol.red .side { color: var(--red); }
.tcol-h b { font-family: var(--display); font-size: 18px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tcol-h .tag { align-self: flex-start; }
.tcol.red .tcol-h .tag { align-self: flex-end; }
.pslot { height: 62px; display: flex; align-items: center; gap: 10px; padding: 7px; background: rgba(1, 10, 19, .55); border: 1px solid var(--line); }
.tcol.red .pslot { flex-direction: row-reverse; text-align: right; }
.pslot img { width: 46px; height: 46px; border: 1px solid var(--gold3); flex: none; }
.pslot b { display: block; font-size: 14px; }
.pslot small { font-size: 11px; color: var(--muted); }
.pslot span { font-size: 12px; color: var(--teal); font-style: italic; padding: 0 8px; }
.pslot.filled { animation: pop .35s; }
.pslot.live { border-color: var(--teal); animation: pulse 1.4s infinite; }
.tcol.blue .pslot.filled { border-left: 3px solid var(--blue); } .tcol.red .pslot.filled { border-right: 3px solid var(--red); }
.dcenter { min-width: 0; }
.turn-h { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; }
.turn-h h2 { font-size: 28px; margin-top: 4px; }
.turn-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 16px; flex-wrap: wrap; }
.ccards.compact { gap: 10px; }
.ccards.compact .ccard { min-height: 440px; }
.ccards.compact .ccard h3 { font-size: 19px; }
.ccards.compact .ccard-body { padding: 11px; }
.ccards.compact .stat { grid-template-columns: 62px 1fr 14px; font-size: 11px; }
.ccards.compact .ccard-meta .tagx:last-child { display: none; }
.ccards.compact .rchip { font-size: 10px; letter-spacing: .06em; }
.timer { width: 58px; height: 58px; flex: none; display: grid; place-items: center; border-radius: 50%; border: 2px solid var(--teal); color: var(--teal);
  font-family: var(--display); font-size: 22px; font-weight: 700; box-shadow: 0 0 20px -6px var(--teal), inset 0 0 14px -6px var(--teal); margin: 0 auto; }
.timer.low { border-color: var(--red); color: var(--red); box-shadow: 0 0 20px -4px var(--red); animation: pulse 1s infinite; }
.page-head .timer { margin: 0; }
.opp-turn { display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; padding: 40px 16px; background: var(--panel); border: 1px solid var(--line); min-height: 470px; justify-content: center; }
.opp-turn h2 { font-size: 26px; }
.opp-turn p { margin: 0; }
.intel { width: 100%; max-width: 460px; text-align: left; margin-top: 14px; padding-top: 16px; border-top: 1px solid var(--line); }
.intel ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.intel li { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); }
.intel li img { width: 30px; height: 30px; border: 1px solid rgba(255, 90, 102, .5); flex: none; }
.intel li b { color: var(--gold2); }
.wait-card { display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; padding: 48px 20px; max-width: 640px; margin: 30px auto 0; }
.wait-card p { margin: 0; }
.wait-lineup { margin: 10px 0; text-align: left; }

/* ---------- Lobby ---------- */
.lobby-card { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 22px; }
.invite { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.invite .panel-h { margin-bottom: 8px; }
.code-big { font-family: var(--display); font-size: 48px; font-weight: 900; letter-spacing: .32em; color: var(--gold2); padding: 4px 6px 4px 20px; border: 1px dashed var(--gold3); background: rgba(1, 10, 19, .5); line-height: 1.2; }
.versus { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; }
.vs-slot { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 22px 12px; background: rgba(1, 10, 19, .5); border: 1px solid var(--line); text-align: center; min-height: 170px; justify-content: center; }
.vs-slot.blue { border-top: 3px solid var(--blue); } .vs-slot.red { border-top: 3px solid var(--red); }
.vs-slot.empty { border-style: dashed; color: var(--muted); }
.vs-slot b { font-family: var(--display); font-size: 18px; overflow-wrap: anywhere; }
.vs-slot small { color: var(--dim); }
.vs-mid { font-family: var(--display); font-size: 30px; font-weight: 900; color: var(--gold3); }
.av { width: 56px; height: 56px; display: grid; place-items: center; font-family: var(--display); font-weight: 700; font-size: 24px; text-transform: uppercase;
  background: linear-gradient(135deg, #1c3b5a, #0a1428); border: 1px solid var(--gold3); color: var(--gold2); }
.format { margin: 0; padding: 14px 14px 14px 32px; font-size: 13px; color: var(--muted); line-height: 1.7; background: rgba(1, 10, 19, .4); border: 1px solid var(--line); }
.lobby-card .setting { margin: 0; }

/* ---------- Overlays ---------- */
.busy { position: fixed; inset: 0; z-index: 70; background: rgba(1, 10, 19, .82); display: grid; place-content: center; justify-items: center; gap: 16px; color: var(--gold2); animation: fade .2s; }
#toasts { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 80; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; width: calc(100% - 32px); }
.toast { background: #0f1d36; border: 1px solid var(--gold3); color: var(--gold2); padding: 11px 18px; font-size: 14px; box-shadow: 0 10px 30px rgba(0, 0, 0, .5); animation: pop .3s; transition: .4s; max-width: 100%; }
.toast.out { opacity: 0; transform: translateY(10px); }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .duel-grid { grid-template-columns: 1fr 1fr; }
  .dcenter { grid-column: 1 / -1; order: -1; }
  .tcol .pslot { height: 54px; }
  .match-grid { grid-template-columns: 1fr 1fr; }
  .feed-wrap { grid-column: 1 / -1; order: 3; }
  .analysis-row { grid-template-columns: 1fr 1fr; }
  .lanes { grid-column: 1 / -1; order: -1; }
}
@media (max-width: 860px) {
  .modes, .steps, .roles-grid, .bracket-bottom { grid-template-columns: 1fr; }
  .featured { min-height: 300px; }
  .map { max-width: 260px; }
}
@media (max-width: 640px) {
  #app { padding: 18px 16px 60px; }
  .ccards, .ccards.compact { gap: 8px; grid-template-columns: repeat(2, 1fr); }
  .ccard, .ccards.compact .ccard { min-height: 250px; }
  .ccard h3, .ccards.compact .ccard h3 { font-size: 16px; margin: 4px 0; }
  .ccard-body, .ccards.compact .ccard-body { padding: 8px; }
  .ccard .stats, .ccard-meta .tagx, .ccard .key { display: none; }
  .rchip { font-size: 9px; letter-spacing: .04em; }
  .rchip svg { width: 13px; height: 13px; }
  .ctag { font-size: 10px; padding: 2px 5px; }
  .rrow { flex-direction: column; align-items: stretch; }
  .rbtns { justify-content: space-between; }
  .rbtn { flex: 1; width: auto; min-width: 0; }
  .rbtn span { font-size: 8px; letter-spacing: 0; }
  .rbtns { gap: 4px; }
  .slot { width: 48px; height: 48px; }
  .slots { gap: 6px; }
  .scoreboard { padding: 14px; gap: 10px; }
  .sb-k { font-size: 32px; gap: 10px; }
  .match-grid, .analysis-row { grid-template-columns: 1fr; }
  .rp { padding: 6px; }
  .code-big { font-size: 34px; }
  .versus { grid-template-columns: 1fr; }
  .vs-mid { text-align: center; }
  .lineup { grid-template-columns: repeat(5, 1fr); gap: 6px; }
  .lcard-b b { font-size: 11px; }
  .lcard-b small, .lrole { display: none; }
  .game-row { grid-template-columns: 1fr auto; }
  .gr-mvp, .gr-go { display: none; }
  .final-score span { font-size: 44px; }
  .final-score b { font-size: 15px; }
  .sbar { padding: 10px; gap: 8px; }
  .sbar-p b { font-size: 14px; }
  .sbar-p em { display: none; }
  .duel-grid { gap: 10px; }
  .pslot { height: 46px; padding: 4px; gap: 6px; }
  .pslot img { width: 36px; height: 36px; }
  .pslot b { font-size: 12px; }
  .pslot small { display: none; }
  .po { width: 26px; height: 26px; }
  .elist { grid-template-columns: 1fr; }
}

/* ---------- Game plan ---------- */
.plan-grid { display: grid; grid-template-columns: 1fr 330px; gap: 22px; align-items: start; }
.plan-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.plan-card { position: relative; display: flex; flex-direction: column; gap: 12px; padding: 18px; text-align: left; background: var(--panel); border: 1px solid var(--line);
  cursor: pointer; transition: transform .2s, border-color .2s, box-shadow .2s; animation: pop .35s backwards; animation-delay: var(--d); }
.plan-card:hover { border-color: var(--gold); transform: translateY(-3px); box-shadow: 0 0 30px -10px rgba(200, 170, 110, .5); }
.plan-card.on { border-color: var(--teal); background: linear-gradient(180deg, rgba(10, 200, 185, .12), var(--panel) 60%); box-shadow: 0 0 0 1px var(--teal), 0 0 34px -8px rgba(10, 200, 185, .6); }
.plan-top { display: flex; gap: 14px; align-items: flex-start; }
.plan-ic { width: 42px; height: 42px; flex: none; display: grid; place-items: center; border: 1px solid var(--line2); color: var(--gold); transform: rotate(45deg); margin: 5px 6px 0 5px; }
.plan-ic svg { width: 21px; height: 21px; transform: rotate(-45deg); }
.plan-card.on .plan-ic { color: var(--teal); border-color: var(--teal); box-shadow: 0 0 14px -4px var(--teal); }
.plan-card h3 { font-size: 20px; }
.plan-card p { margin: 4px 0 0; font-size: 13px; color: var(--muted); line-height: 1.45; }
.plan-fit { display: grid; grid-template-columns: 60px 1fr 38px; gap: 10px; align-items: center; font-size: 12px; color: var(--muted); }
.plan-fit b { color: var(--gold2); text-align: right; }
.plan-champs { display: flex; gap: 6px; }
.pc img { width: 34px; height: 34px; border: 1px solid var(--line); }
.pc.great img { border: 2px solid var(--good); box-shadow: 0 0 10px -3px var(--good); }
.pc.ok img { border-color: var(--gold3); }
.pc.no img { opacity: .3; filter: grayscale(.9); }
.plan-rps { display: flex; flex-direction: column; gap: 3px; font-size: 12px; }
.pbadges { display: flex; gap: 6px; flex-wrap: wrap; }
.pbadge { font-size: 10px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; padding: 3px 7px; border: 1px solid; }
.pbadge.rec { color: #ffd76a; border-color: rgba(255, 215, 106, .5); background: rgba(255, 215, 106, .07); }
.pbadge.good { color: var(--good); border-color: rgba(63, 211, 139, .5); background: rgba(63, 211, 139, .07); }
.pbadge.bad { color: var(--bad); border-color: rgba(255, 90, 102, .5); background: rgba(255, 90, 102, .07); }
.scout-name { font-size: 20px; margin-bottom: 12px; }
.scout-champs { display: flex; gap: 6px; margin-bottom: 14px; }
.scout-champs img { width: 42px; height: 42px; border: 1px solid rgba(255, 90, 102, .5); }
.scout-lean { display: flex; gap: 10px; align-items: center; margin: 0 0 8px; font-size: 14px; text-align: left; }
.scout-lean svg { width: 22px; height: 22px; color: var(--gold); flex: none; }
.scout .scout-lean svg { color: var(--red); }
.legend ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; font-size: 13px; }
.legend li { display: grid; grid-template-columns: 18px auto 1fr; gap: 8px; align-items: center; }
.legend li svg { width: 16px; height: 16px; color: var(--gold); }
.legend li span { color: var(--muted); }
.plan-actions { position: sticky; bottom: 14px; display: flex; justify-content: center; margin-top: 22px; z-index: 5; }
.plan-actions .btn { min-width: 300px; box-shadow: 0 12px 30px rgba(0, 0, 0, .6); }
.plan-actions .btn:disabled { opacity: .7; }
.sb-style { display: flex; align-items: center; gap: 6px; margin-top: 6px; font-size: 12px; color: var(--muted); }
.sb-team.b .sb-style { justify-content: flex-end; }
.sb-style svg { width: 15px; height: 15px; color: var(--gold); flex: none; }
@media (max-width: 1000px) { .plan-grid { grid-template-columns: 1fr; } .plan-grid .side { order: -1; } }
@media (max-width: 640px) {
  .plan-cards { grid-template-columns: 1fr; }
  .plan-card { padding: 14px; }
  .plan-actions .btn { min-width: 0; width: 100%; }
  .legend { display: none; }
}
