/* ---------- 밴픽 (개편): 전용 전체 화면 ---------- */
.d2 { position: fixed; inset: 0 0 var(--footer-h, 34px) 0; z-index: 60; display: grid; grid-template-rows: 64px 70px minmax(0, 1fr); background: radial-gradient(ellipse at 50% -10%, #142040, var(--bg) 60%); color: var(--text); max-width: none; margin: 0; padding: 0; gap: 0; }
.d2 button { font: inherit; color: inherit; cursor: pointer; }

/* 위: 팀 · 단계 · 시간 */
.d2-top { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 0 56px 0 22px; border-bottom: 1px solid var(--line); background: linear-gradient(180deg, #0d1528, #0a101e); position: relative; }
.d2-tm { display: flex; align-items: center; gap: 12px; min-width: 0; }
.d2-tm.r { justify-content: flex-end; }
.d2-tm b { font: 700 20px var(--f-ui); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.d2-tm small { color: var(--muted); font-size: 12px; white-space: nowrap; }
.d2-tm .team-logo img, .d2-tm .team-badge { width: 40px; height: 40px; }
.d2-sc { font: 700 28px var(--f-ui); color: var(--gold-2); margin: 0 6px; }
.d2-mid { text-align: center; padding: 0 18px; }
.d2-ev { font-size: 12px; color: var(--muted); }
.d2-ph { display: flex; align-items: center; gap: 12px; justify-content: center; font: 700 19px var(--f-ui); }
.d2-ph b { padding: 1px 10px; border-radius: 6px; font-size: 14px; }
.d2-ph b.b { background: rgba(59, 140, 255, .2); color: #9cc4ff; }
.d2-ph b.r { background: rgba(239, 75, 95, .2); color: #ffadb8; }
.d2 .dr-timer { font: 700 28px var(--f-ui); color: var(--gold-2); font-style: normal; min-width: 44px; }
.d2 .dr-timer.off { color: #4d5a78; font-size: 15px; visibility: visible; }
.d2-steps { display: flex; gap: 3px; justify-content: center; margin-top: 3px; }
.d2-steps i { width: 14px; height: 4px; border-radius: 2px; background: #26324d; }
.d2-steps i.pick { height: 7px; }
.d2-steps i.b { background: var(--dr-b); } .d2-steps i.r { background: var(--dr-r); }
.d2-steps i.now { background: var(--gold-2); box-shadow: 0 0 8px var(--gold); }
.d2-exit { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--line); background: #10192c; color: var(--muted); }
.d2-exit:hover { border-color: var(--gold); color: var(--text); }

/* 밴 */
.d2-bans { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 0 22px; border-bottom: 1px solid var(--line); background: rgba(8, 12, 22, .6); }
.d2-bside { display: flex; gap: 8px; } .d2-bside.r { justify-content: flex-end; flex-direction: row-reverse; }
.d2-bside.r { justify-content: flex-start; }
.d2-ban { width: 48px; height: 48px; border-radius: 8px; border: 1px solid var(--line); background: #0b1120; position: relative; overflow: hidden; }
.d2-ban.gap { margin-right: 10px; } .d2-bside.r .d2-ban.gap { margin-right: 0; margin-left: 10px; }
.d2-ban img { width: 100%; height: 100%; display: block; }
.d2-ban.x img { filter: grayscale(1) brightness(.6); }
.d2-ban.x::after { content: ""; position: absolute; inset: 0; background: linear-gradient(135deg, transparent 47%, rgba(226, 87, 92, .9) 48%, rgba(226, 87, 92, .9) 52%, transparent 53%); }
.d2-ban.cur { border-color: var(--gold); box-shadow: 0 0 10px rgba(200, 162, 74, .6); animation: drPulse 1.2s infinite; }
.d2-lock { text-align: center; font-size: 12px; color: var(--muted); padding: 0 18px; }
.d2-lock b { display: block; font: 700 20px var(--f-ui); color: var(--text); }

/* 본문 */
.d2-main { display: grid; grid-template-columns: clamp(170px, 14vw, 270px) minmax(0, 1fr) clamp(170px, 14vw, 270px) clamp(270px, 19vw, 360px); min-height: 0; }
.d2-team { min-width: 0; padding: 12px; display: flex; flex-direction: column; gap: 8px; border-right: 1px solid var(--line); min-height: 0; }
.d2-team h4 { margin: 0; font: 700 14px var(--f-ui); letter-spacing: .05em; }
.d2-team.b h4 { color: #8fbaff; } .d2-team.r h4 { color: #ff9a9e; text-align: right; }
.d2-slot { position: relative; flex: 1 1 0; min-height: 70px; max-height: 110px; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); background: var(--panel); display: flex; align-items: flex-end; }
.d2-art { position: absolute; inset: 0; background: center 22%/cover no-repeat; }
.d2-art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(7, 11, 20, .92), rgba(7, 11, 20, .2) 72%); }
.d2-team.r .d2-art::after { background: linear-gradient(270deg, rgba(7, 11, 20, .92), rgba(7, 11, 20, .2) 72%); }
.d2-slot.hover .d2-art { opacity: .55; }
.d2-in { position: relative; padding: 9px 12px; display: flex; flex-direction: column; width: 100%; }
.d2-team.r .d2-in { align-items: flex-end; text-align: right; }
.d2-pl { font-size: 13px; font-weight: 700; }
.d2-ch { font: 700 21px var(--f-ui); line-height: 1.1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.d2-pl { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.d2-slot.empty .d2-ch { color: #4d5a78; font-size: 15px; }
.d2-slot.cur { border-color: var(--gold); box-shadow: 0 0 0 1px rgba(200, 162, 74, .4), inset 0 0 26px rgba(200, 162, 74, .18); }
.d2-slot.cur .d2-ch { color: var(--gold-2); }
.d2-m { position: absolute; top: 7px; right: 9px; font-size: 11px; padding: 1px 7px; border-radius: 6px; background: rgba(0, 0, 0, .55); z-index: 1; }
.d2-m.sig { background: rgba(200, 162, 74, .9); color: #1a1306; font-weight: 700; }
.d2-hint { margin: 2px 2px 0; font-size: 11.5px; color: var(--muted); line-height: 1.5; }
.d2-team.r .d2-hint { text-align: right; }

/* 가운데 */
.d2-pool { display: flex; flex-direction: column; min-height: 0; min-width: 0; padding: 12px 14px; gap: 8px; border-right: 1px solid var(--line); container-type: inline-size; }
.d2-bar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.d2-tabs { display: flex; gap: 4px; flex-wrap: wrap; }
.d2-tabs button { display: inline-flex; align-items: center; gap: 5px; padding: 5px 11px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--muted); font-size: 12.5px; font-weight: 600; }
.d2-tabs .pos-ic { width: 14px; height: 14px; }
.d2-tabs button.on { background: var(--gold-2); color: #1a1306; border-color: var(--gold-2); }
.d2-q { flex: 1; min-width: 110px; background: #0a101d; border: 1px solid var(--line); border-radius: 8px; padding: 7px 11px; color: var(--text); }
.d2-sort { background: #0a101d; border: 1px solid var(--line); border-radius: 8px; padding: 7px 9px; color: var(--text); }
.d2-legend { display: flex; gap: 14px; font-size: 11.5px; color: var(--muted); align-items: center; flex-wrap: wrap; }
.d2-legend span { display: inline-flex; align-items: center; gap: 5px; }
.d2-legend i { position: static !important; }
.d2-grid { flex: 1 1 0; min-height: 150px; overflow: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 7px; align-content: start; grid-auto-rows: max-content; padding-right: 4px; }
.d2-c { position: relative; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); background: #0b1120; padding: 0; transition: transform .1s, border-color .1s; height: auto; }
.d2-c img { width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; display: block; }
.d2-c:hover { transform: translateY(-2px); border-color: #4a5a80; }
.d2-c.sel { border-color: var(--gold-2); box-shadow: 0 0 0 2px var(--gold-2); }
.d2-c.off { filter: grayscale(1) brightness(.35); cursor: default; transform: none; }
.d2-c span { position: absolute; left: 0; right: 0; bottom: 0; font-size: 10px; text-align: center; background: linear-gradient(transparent, rgba(0, 0, 0, .85)); padding: 10px 2px 2px; opacity: 0; transition: opacity .1s; }
.d2-c:hover span { opacity: 1; }
.d2-t { position: absolute; top: 3px; left: 3px; font: 700 12px var(--f-ui); font-style: normal; padding: 0 5px; border-radius: 4px; line-height: 16px; }
.d2-t.S { background: #f0d58a; color: #1a1306; } .d2-t.A { background: #8fbaff; color: #071228; } .d2-t.B { background: #3d4a66; color: #dfe6f5; }
.d2-s { position: absolute; bottom: 3px; left: 3px; font-size: 10px; font-weight: 700; font-style: normal; padding: 0 4px; border-radius: 3px; background: rgba(200, 162, 74, .92); color: #1a1306; }
.d2-o { position: absolute; bottom: 4px; right: 4px; width: 9px; height: 9px; border-radius: 50%; background: var(--dr-r); box-shadow: 0 0 0 2px rgba(0, 0, 0, .6); display: inline-block; }

/* 정보 카드 */
.d2-card { border: 1px solid var(--line); border-radius: 12px; background: var(--panel); display: grid; grid-template-columns: minmax(150px, 230px) minmax(0, 1fr) minmax(0, 1fr) 140px; overflow: hidden; height: 168px; flex: none; }
.d2-card.empty { display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 13px; }
.d2-cart { position: relative; background: center 20%/cover no-repeat; }
.d2-cart::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent 40%, var(--panel)); }
.d2-cart div { position: absolute; left: 12px; bottom: 10px; z-index: 1; }
.d2-cart b { display: block; font: 700 24px var(--f-ui); text-shadow: 0 2px 8px #000; }
.d2-cart em { font-style: normal; font-size: 12px; color: var(--gold-2); text-shadow: 0 1px 4px #000; }
.d2-col { padding: 10px 13px; display: flex; flex-direction: column; gap: 5px; min-width: 0; overflow: hidden; }
.d2-col h5 { margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 11.5px; color: var(--muted); font-weight: 700; }
.d2-rate { display: grid; grid-template-columns: 48px 1fr 38px; align-items: center; gap: 8px; font-size: 12px; }
.d2-bb { height: 6px; border-radius: 3px; background: #22304d; overflow: hidden; }
.d2-bb i { display: block; height: 100%; background: var(--gold); }
.d2-bb.wr i { background: #3fbf7f; }
.d2-roles { font-size: 12.5px; }
.d2-who { display: grid; grid-template-columns: 38px minmax(0, 1fr) 48px; align-items: center; gap: 8px; font-size: 12.5px; }
.d2-ps { color: var(--muted); font-size: 11px; font-weight: 700; }
.d2-mb { height: 5px; border-radius: 3px; background: #22304d; overflow: hidden; margin-top: 2px; }
.d2-mb i { display: block; height: 100%; background: var(--gold); }
.d2-who.th .d2-mb i { background: var(--dr-r); }
.d2-who b { text-align: right; } .d2-who b.sig { color: var(--gold-2); }
.d2-go { padding: 12px; display: flex; flex-direction: column; justify-content: center; gap: 8px; border-left: 1px solid var(--line); min-width: 0; }
.d2-go .btn-primary { padding: 12px 10px; font-size: 15px; font-weight: 900; }
.d2-go small { color: var(--muted); font-size: 11px; text-align: center; line-height: 1.4; }

/* 코치 노트 */
.d2-coach { display: flex; flex-direction: column; min-height: 0; background: linear-gradient(180deg, #0c1322, #0a0f1b); }
.d2-ch-h { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.d2-ch-h .pl-ph { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.d2-ch-h b { display: block; font-size: 14px; } .d2-ch-h small { color: var(--muted); font-size: 12px; }
.d2-dg { margin: 10px 12px 0; padding: 8px 12px; border-radius: 9px; background: rgba(200, 162, 74, .14); border: 1px solid rgba(200, 162, 74, .45); color: var(--gold-2); font-size: 12.5px; font-weight: 700; line-height: 1.45; }
.d2-feed { flex: 1; overflow: auto; padding: 10px 12px; display: flex; flex-direction: column; gap: 9px; }
.dn-note { border-radius: 10px; padding: 9px 11px; background: var(--panel-2); border: 1px solid var(--line); animation: dnIn .35s; }
@keyframes dnIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.dn-k { display: flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; margin-bottom: 4px; }
.dn-k i { font-style: normal; padding: 1px 7px; border-radius: 5px; }
.dn-k small { margin-left: auto; color: var(--muted); font-weight: 500; }
.dn-k.guess i { background: rgba(58, 141, 255, .2); color: #8fbaff; }
.dn-k.rec i { background: rgba(63, 191, 127, .2); color: #7ee0ad; }
.dn-k.react i { background: rgba(226, 87, 92, .2); color: #ff9a9e; }
.dn-k.warn i { background: rgba(240, 180, 60, .2); color: #ffcf6b; }
.dn-note p { margin: 0; line-height: 1.55; font-size: 13px; }
.dn-chips { display: flex; gap: 6px; margin-top: 7px; flex-wrap: wrap; }
.dn-chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px 3px 3px; border-radius: 999px; background: #0b1120; border: 1px solid var(--line); font-size: 12px; }
.dn-chip img { width: 22px; height: 22px; border-radius: 50%; }
.dn-chip:hover { border-color: var(--gold); }
.dn-chip.off { opacity: .4; text-decoration: line-through; cursor: default; }
.dn-empty { color: var(--muted); font-size: 12.5px; line-height: 1.6; }
.d2-ft { padding: 10px 12px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 9px; }
.d2-ft p { margin: 0; font-size: 11.5px; color: var(--muted); line-height: 1.5; }
.d2-tools { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); }
.d2-tseg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.d2-tseg button { padding: 5px 9px; border: 0; background: transparent; color: var(--muted); font-size: 12px; font-weight: 600; }
.d2-tseg button + button { border-left: 1px solid var(--line); }
.d2-tseg button.on { background: var(--panel-2); color: var(--gold-2); }
.d2-dgb { display: flex; gap: 8px; }
.d2-dgb button { flex: 1; padding: 9px 8px; border-radius: 9px; border: 1px solid var(--line); background: #10192c; font-size: 13px; font-weight: 700; }
.d2-dgb button.pri { border-color: rgba(200, 162, 74, .6); color: var(--gold-2); }
.d2-dgb button:hover { border-color: var(--gold); }

/* 픽 연출 */
.d2-ov { position: fixed; inset: 0 0 var(--footer-h, 34px) 0; z-index: 65; pointer-events: none; }
.d2-reveal { position: absolute; inset: 0; z-index: 5; display: grid; place-items: center; background: rgba(4, 7, 14, .5); backdrop-filter: blur(3px); pointer-events: none; animation: d2rvb 1.9s ease forwards; }
@keyframes d2rvb { 0%, 85% { opacity: 1; } 100% { opacity: 0; visibility: hidden; } }
.d2-rv { width: min(1000px, 72vw); aspect-ratio: 16 / 7; border-radius: 16px; overflow: hidden; position: relative; background: center 20%/cover no-repeat; box-shadow: 0 30px 80px rgba(0, 0, 0, .7); animation: d2rv 1.9s ease forwards; }
@keyframes d2rv { 0% { opacity: 0; transform: scale(1.06); } 14% { opacity: 1; transform: none; } 82% { opacity: 1; } 100% { opacity: 0; transform: translateY(-10px); } }
.d2-rv::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(7, 11, 20, .9), transparent 60%); }
.d2-rvt { position: absolute; left: 36px; bottom: 30px; z-index: 1; }
.d2-rvt small { font-weight: 700; letter-spacing: .08em; }
.d2-rv.b .d2-rvt small { color: #8fbaff; } .d2-rv.r .d2-rvt small { color: #ff9a9e; }
.d2-rvt b { display: block; font: 700 58px var(--f-ui); line-height: 1; margin: 4px 0 12px; }
.d2-rr { display: grid; grid-template-columns: 70px 240px 46px; gap: 10px; align-items: center; font-size: 13px; margin-top: 6px; }
.d2-rbb { height: 8px; border-radius: 4px; background: rgba(255, 255, 255, .15); overflow: hidden; }
.d2-rbb i { display: block; height: 100%; width: 0; background: var(--gold); animation: d2grow .8s .3s ease forwards; }
.d2-rbb.wr i { background: #3fbf7f; }
@keyframes d2grow { to { width: var(--w); } }

/* 로딩 전환 */
.d2-intro { position: absolute; inset: 0; z-index: 6; display: grid; place-items: center; background: radial-gradient(ellipse at center, #16233f, #05080f 70%); animation: d2fade 2.6s ease forwards; pointer-events: none; }
@keyframes d2fade { 0%, 86% { opacity: 1; } 100% { opacity: 0; visibility: hidden; } }
.d2-vs { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 64px; width: min(1100px, 88vw); }
.d2-vsd { display: flex; flex-direction: column; align-items: center; gap: 10px; animation: d2sl .8s ease; }
.d2-vsd.r { animation-name: d2sr; }
@keyframes d2sl { from { transform: translateX(-80px); opacity: 0; } } @keyframes d2sr { from { transform: translateX(80px); opacity: 0; } }
.d2-vsd .team-logo, .d2-vsd .team-badge { display: grid; place-items: center; flex: none; width: 150px; height: 150px; font-size: 40px; }
.d2-vsd .team-logo img { width: 150px; height: 150px; object-fit: contain; }
.d2-vsd b { font: 700 28px var(--f-ui); }
.d2-vsd small { color: var(--muted); }
.d2-vsc { text-align: center; }
.d2-vsc small { color: var(--muted); letter-spacing: .08em; }
.d2-vsc b { display: block; font: 700 68px var(--f-ui); color: var(--gold-2); line-height: 1.05; }
.d2-vsc em { display: block; margin-top: 8px; font-style: normal; color: var(--muted); }
.d2-lt { position: absolute; bottom: 86px; width: 100%; text-align: center; color: var(--muted); font-size: 12px; letter-spacing: .1em; }
.d2-lbar { position: absolute; bottom: 70px; left: 50%; width: 360px; transform: translateX(-50%); height: 3px; background: #1b2640; border-radius: 2px; overflow: hidden; }
.d2-lbar i { display: block; height: 100%; width: 0; background: var(--gold-2); animation: d2lb 2.2s ease forwards; }
@keyframes d2lb { to { width: 100%; } }

/* 가운데 칸이 좁을 때: 카드의 스플래시를 줄이고, 더 좁으면 숨긴다 */
@container (max-width: 820px) {
  .d2-card { grid-template-columns: 110px minmax(0, 1fr) minmax(0, 1fr) 118px; }
  .d2-cart b { font-size: 18px; } .d2-cart em { display: none; }
  .d2-tabs button { padding: 5px 8px; }
}
@container (max-width: 620px) {
  .d2-card { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 108px; height: 176px; }
  .d2-cart { display: none; }
  .d2-legend span:last-child { display: none; }
  .d2-tabs button { font-size: 0; gap: 0; padding: 6px 9px; } .d2-tabs button:first-child { font-size: 12px; }
}
/* 낮은 화면: 칸 높이 줄이기 */
@media (max-height: 820px) {
  .d2 { grid-template-rows: 56px 58px minmax(0, 1fr); }
  .d2-ban { width: 40px; height: 40px; }
  .d2-slot { min-height: 54px; } .d2-ch { font-size: 18px; } .d2-in { padding: 6px 10px; }
  .d2-card { height: 150px; } .d2-legend { display: none; } .d2-who.x3 { display: none; }
  .d2-hint { display: none; }
}
/* 아주 좁은 화면: 코치 노트를 아래로 */
@media (max-width: 1100px) {
  .d2 { overflow: auto; grid-template-rows: 64px 70px auto; }
  .d2-main { grid-template-columns: 170px minmax(0, 1fr) 170px; }
  .d2-coach { grid-column: 1 / -1; border-top: 1px solid var(--line); max-height: 360px; }
  .d2-pool { min-height: 640px; }
}

/* 두 장 연속 픽 */
.d2-two { display: flex; gap: 6px; justify-content: center; }
.d2-two span { width: 40px; height: 40px; border-radius: 8px; overflow: hidden; border: 1px solid var(--gold); }
.d2-two span img { width: 100%; height: 100%; display: block; }
.d2-two span.e { display: grid; place-items: center; border-style: dashed; border-color: var(--line); color: var(--muted); }
.dn-pair { display: flex; align-items: center; gap: 6px; width: 100%; margin-top: 8px; padding: 6px 10px 6px 6px; border-radius: 10px; border: 1px solid rgba(63, 191, 127, .5); background: rgba(63, 191, 127, .1); font-size: 12.5px; font-weight: 700; }
.dn-pair img { width: 26px; height: 26px; border-radius: 50%; }
.dn-pair i { font-style: normal; color: var(--muted); }
.dn-pair em { margin-left: auto; white-space: nowrap; font-style: normal; font-size: 11.5px; color: #7ee0ad; }
.dn-pair:hover { border-color: #7ee0ad; }
.dn-pair.off { opacity: .4; cursor: default; }
.d2-reveal.two { grid-auto-flow: column; gap: 18px; place-content: center; }
.d2-reveal.two .d2-rv { width: min(560px, 42vw); aspect-ratio: 4 / 3; }
.d2-reveal.two .d2-rv:nth-child(2) { animation-delay: .25s; opacity: 0; }
.d2-reveal.two .d2-rvt b { font-size: 44px; }
.d2-reveal.two .d2-rr { grid-template-columns: 62px 150px 42px; }

/* 밴픽 완료 → 전술 */
.d2-done { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; gap: 22px; padding: 0 6vw; background: radial-gradient(ellipse at center, rgba(22, 35, 63, .97), rgba(5, 8, 15, .98) 75%); animation: d2fade 3s ease forwards; }
.d2-dn-h { text-align: center; } .d2-dn-h small { color: var(--muted); letter-spacing: .08em; } .d2-dn-h b { display: block; font: 700 40px var(--f-ui); color: var(--gold-2); }
.d2-dn-row { display: grid; grid-template-columns: 200px 1fr; gap: 18px; align-items: center; }
.d2-dn-tm { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
.d2-dn-tm .team-logo img, .d2-dn-tm .team-badge { width: 56px; height: 56px; }
.d2-dn-tm b { font: 700 18px var(--f-ui); } .d2-dn-tm small { color: var(--muted); font-size: 12px; }
.d2-dn-row.b .d2-dn-tm small { color: #8fbaff; } .d2-dn-row.r .d2-dn-tm small { color: #ff9a9e; }
.d2-dn-cards { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.d2-dn-c { position: relative; height: 22vh; min-height: 120px; border-radius: 10px; overflow: hidden; background: center 20%/cover no-repeat; border: 1px solid var(--line); display: flex; flex-direction: column; justify-content: flex-end; padding: 10px 12px; animation: d2up .5s ease both; }
.d2-dn-row.b .d2-dn-c { border-bottom: 3px solid var(--dr-b); } .d2-dn-row.r .d2-dn-c { border-bottom: 3px solid var(--dr-r); }
.d2-dn-c::before { content: ""; position: absolute; inset: 0; background: linear-gradient(transparent 40%, rgba(5, 8, 15, .92)); }
.d2-dn-c span, .d2-dn-c b { position: relative; }
.d2-dn-c span { display: flex; align-items: center; gap: 5px; font-size: 12px; color: var(--muted); } .d2-dn-c span .pos-ic { width: 14px; height: 14px; }
.d2-dn-c b { font: 700 20px var(--f-ui); }
@keyframes d2up { from { opacity: 0; transform: translateY(18px); } }
.d2-dn-f { text-align: center; color: var(--muted); font-size: 12px; letter-spacing: .1em; }

/* ---------- 전술 화면 (개편) ---------- */
.d3 { grid-template-rows: 64px minmax(0, 1fr) 60px; }
.t3-main { display: grid; grid-template-columns: clamp(220px, 18vw, 300px) minmax(0, 1fr) clamp(260px, 21vw, 360px); min-height: 0; }
.t3-left { padding: 12px; display: flex; flex-direction: column; gap: 8px; border-right: 1px solid var(--line); min-height: 0; }
.t3-left h4 { margin: 0; font: 700 14px var(--f-ui); color: var(--gold-2); } .t3-left h4 small { color: var(--muted); font: 400 11.5px var(--f-body, inherit); margin-left: 6px; }
.t3-pc { position: relative; flex: 1 1 0; min-height: 60px; max-height: 120px; border-radius: 10px; border: 1px solid var(--line); background: center 22%/cover no-repeat var(--panel); display: flex; flex-direction: column; justify-content: flex-end; align-items: flex-start; padding: 8px 12px; overflow: hidden; text-align: left; }
.t3-pc::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(7, 11, 20, .92), rgba(7, 11, 20, .25) 75%); }
.t3-pc > * { position: relative; }
.t3-pc b { font: 700 20px var(--f-ui); line-height: 1.1; }
.t3-pc small { font-size: 11.5px; color: var(--muted); }
.t3-pos { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; } .t3-pos .pos-ic { width: 15px; height: 15px; }
.t3-pos em { font-style: normal; font-size: 10.5px; padding: 0 6px; border-radius: 5px; background: var(--gold-2); color: #1a1306; }
.t3-pc.key { border-color: rgba(200, 162, 74, .7); }
.t3-pc.on { border-color: var(--gold-2); box-shadow: 0 0 0 2px var(--gold-2); }
.t3-pc.off-role small { color: #ffcf6b; }
.t3-pc:not([disabled]):hover { border-color: #4a5a80; }
.t3-center { padding: 14px 18px; display: flex; flex-direction: column; gap: 14px; overflow: auto; border-right: 1px solid var(--line); min-width: 0; }
.t3-step h3 { margin: 0 0 8px; font: 700 15px var(--f-ui); display: flex; align-items: center; gap: 8px; }
.t3-step h3 i { font-style: normal; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--gold-2); color: #1a1306; font-size: 12px; }
.t3-step h3 small { color: var(--muted); font: 400 12px var(--f-body, inherit); }
.t3-wins { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }
.t3-win { text-align: left; padding: 12px 13px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel); display: flex; flex-direction: column; gap: 6px; }
.t3-win b { font: 700 16px var(--f-ui); }
.t3-win p { margin: 0; font-size: 12px; color: var(--muted); line-height: 1.5; flex: 1; }
.t3-win.on { border-color: var(--gold-2); background: linear-gradient(180deg, rgba(200, 162, 74, .16), var(--panel)); box-shadow: 0 0 0 1px var(--gold-2); }
.t3-win.bad { opacity: .75; }
.t3-win:not([disabled]):hover { border-color: #4a5a80; }
.t3-fit { display: grid; grid-template-columns: auto 1fr auto; gap: 7px; align-items: center; font-size: 11px; color: var(--muted); }
.t3-fit div { height: 5px; border-radius: 3px; background: #22304d; overflow: hidden; } .t3-fit div i { display: block; height: 100%; background: #3fbf7f; }
.t3-win.bad .t3-fit div i { background: var(--dr-r); }
.t3-fit em { font-style: normal; font-weight: 700; color: var(--text); }
.t3-star { font-style: normal; color: var(--gold-2); margin-left: 4px; font-size: 12px; }
.t3-row2 { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 18px; }
.t3-keys { display: flex; flex-wrap: wrap; gap: 6px; }
.t3-keys button { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); font-size: 13px; font-weight: 600; }
.t3-keys button .pos-ic { width: 14px; height: 14px; }
.t3-keys button.on { border-color: var(--gold-2); background: rgba(200, 162, 74, .16); color: var(--gold-2); }
.t3-aggr { width: 100%; } .t3-aggr button { flex: 1; }
.t3-detail { border: 1px solid var(--line); border-radius: 12px; background: rgba(15, 22, 38, .6); padding: 0 14px; }
.t3-detail summary { cursor: pointer; padding: 12px 0; font: 700 14px var(--f-ui); }
.t3-detail summary small { color: var(--muted); font: 400 12px var(--f-body, inherit); margin-left: 8px; }
.t3-detail[open] { padding-bottom: 14px; }
.t3-detail .dr-ins { grid-template-columns: 1fr 1fr; }
.t3-detail .dr-rt { margin-top: 10px; }
.t3-detail .dr-rt-who { display: flex; align-items: center; gap: 6px; min-width: 110px; } .t3-detail .dr-rt-who .pos-ic { width: 14px; height: 14px; }
.t3-right { display: flex; flex-direction: column; min-height: 0; overflow: auto; background: linear-gradient(180deg, #0c1322, #0a0f1b); }
.t3-coach { padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; border-bottom: 1px solid var(--line); }
.t3-say { margin: 0; padding: 10px 12px; border-radius: 10px; background: var(--panel-2); border: 1px solid var(--line); font-size: 13px; line-height: 1.55; }
.t3-coach .adv { margin: 0; font-size: 12.5px; line-height: 1.5; padding: 7px 10px; border-radius: 8px; }
.t3-cmp, .t3-opp { padding: 12px 14px; border-bottom: 1px solid var(--line); }
.t3-cmp h5, .t3-opp h5 { margin: 0 0 8px; font-size: 12px; color: var(--muted); display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.t3-cmp h5 span { display: inline-flex; align-items: center; gap: 5px; } .t3-cmp h5 span i, .t3-dim i { display: inline-block; }
.t3-cmp h5 i { width: 9px; height: 9px; border-radius: 2px; } i.u { background: var(--gold); } i.o { background: var(--dr-r); }
.t3-dim { display: grid; grid-template-columns: 48px 1fr; gap: 8px; align-items: center; font-size: 11.5px; margin-bottom: 5px; }
.t3-dim div { display: flex; flex-direction: column; gap: 2px; } .t3-dim div i { height: 4px; border-radius: 2px; }
.t3-opp > div { display: flex; gap: 6px; } .t3-opp > div span img { width: 38px; height: 38px; border-radius: 8px; display: block; }
.t3-opp small { font-weight: 400; }
.t3-bans { margin-top: 8px; flex-wrap: wrap; gap: 4px !important; } .t3-bans img { width: 24px; height: 24px; border-radius: 4px; filter: grayscale(1) brightness(.6); }
.t3-foot { display: flex; align-items: center; justify-content: flex-end; gap: 10px; padding: 0 18px; border-top: 1px solid var(--line); background: #0a101e; }
.t3-foot .cr-dim { margin-right: auto; font-size: 12.5px; }
@media (max-width: 1100px) { .d3 { overflow: auto; grid-template-rows: 64px auto 60px; } .t3-main { grid-template-columns: 200px minmax(0, 1fr); } .t3-right { grid-column: 1 / -1; } }
.t3-foot { padding-right: 84px; }
.t3-detail .dr-rt-row { grid-template-columns: 120px 1fr !important; }
.t3-detail .dr-rt-opts { display: flex; flex-wrap: wrap; gap: 6px; }
.t3-detail .dr-opt { white-space: nowrap; padding: 6px 10px; flex: 1 0 auto; flex-direction: row; align-items: center; justify-content: center; font-size: 12.5px; }
.t3-detail .dr-opt b { font-weight: 600; }

/* ---------- 라커룸 (개편) ---------- */
.l4 { grid-template-rows: 64px minmax(0, 1fr); }
.l4-main { display: grid; grid-template-columns: clamp(270px, 22vw, 360px) minmax(0, 1fr) clamp(240px, 19vw, 320px); min-height: 0; }
.l4-left { padding: 12px 14px; border-right: 1px solid var(--line); overflow: auto; display: flex; flex-direction: column; gap: 8px; }
.l4-res { text-align: center; padding: 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel); }
.l4-res small { color: var(--muted); font-size: 12px; } .l4-res b { display: block; font: 700 34px var(--f-ui); line-height: 1.1; } .l4-res span { font-size: 13px; color: var(--muted); }
.l4-res.win { border-color: rgba(63, 191, 127, .5); background: linear-gradient(180deg, rgba(63, 191, 127, .14), var(--panel)); } .l4-res.win b { color: #7ee0ad; }
.l4-res.lose { border-color: rgba(226, 87, 92, .5); background: linear-gradient(180deg, rgba(226, 87, 92, .12), var(--panel)); } .l4-res.lose b { color: #ff9a9e; }
.l4-sts { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.l4-st { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 6px 8px; border-radius: 8px; background: var(--panel); border: 1px solid var(--line); font-size: 12px; }
.l4-st span { color: var(--muted); font-size: 11px; text-align: center; padding: 0 4px; } .l4-st b { font: 700 16px var(--f-ui); } .l4-st b:last-child { text-align: right; } .l4-st b.w { color: var(--gold-2); }
.l4-plan { padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel-2); }
.l4-plan h5 { margin: 0 0 4px; font-size: 12.5px; display: flex; justify-content: space-between; gap: 6px; } .l4-plan h5 em { font-style: normal; color: var(--muted); }
.l4-plan.good { border-left: 3px solid #3fbf7f; } .l4-plan.good h5 em { color: #7ee0ad; }
.l4-plan.bad { border-left: 3px solid var(--dr-r); } .l4-plan.bad h5 em { color: #ff9a9e; }
.l4-plan p { margin: 2px 0 0; font-size: 12.5px; line-height: 1.5; }
.l4-h { margin: 6px 0 0; font-size: 12px; color: var(--muted); }
.l4-ln { display: grid; grid-template-columns: 22px 1fr 48px; gap: 8px; align-items: center; font-size: 12px; }
.l4-ln .pos-ic { width: 15px; height: 15px; }
.l4-ln div { position: relative; height: 8px; border-radius: 4px; background: #1b2640; }
.l4-ln div::after { content: ""; position: absolute; left: 50%; top: -2px; bottom: -2px; width: 1px; background: #3a4866; }
.l4-ln div i { position: absolute; top: 0; bottom: 0; border-radius: 4px; } .l4-ln i.p { background: #3fbf7f; } .l4-ln i.n { background: var(--dr-r); }
.l4-ln em { font-style: normal; text-align: right; font-weight: 700; } .l4-ln em.p { color: #7ee0ad; } .l4-ln em.n { color: #ff9a9e; }
.l4-pls { display: flex; flex-direction: column; gap: 5px; }
.l4-pl { display: grid; grid-template-columns: 30px 1fr auto 38px; gap: 8px; align-items: center; padding: 5px 8px; border-radius: 8px; background: var(--panel); border: 1px solid var(--line); font-size: 12.5px; }
.l4-pl img { width: 30px; height: 30px; border-radius: 6px; display: block; }
.l4-pl span { display: flex; align-items: center; gap: 5px; font-weight: 700; min-width: 0; } .l4-pl span .pos-ic { width: 13px; height: 13px; }
.l4-pl span em { font-style: normal; font-size: 10px; padding: 0 5px; border-radius: 4px; background: var(--gold-2); color: #1a1306; }
.l4-pl small { color: var(--muted); } .l4-pl b { text-align: right; font: 700 16px var(--f-ui); } .l4-pl b.hi { color: #7ee0ad; } .l4-pl b.lo { color: #ff9a9e; }
.l4-pl.mvp { border-color: rgba(200, 162, 74, .6); }
.l4-star { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 6px; } .l4-star img { width: 22px; height: 22px; border-radius: 5px; } .l4-star b { color: var(--text); }
.l4-mid { display: flex; flex-direction: column; min-height: 0; padding: 0 18px; border-right: 1px solid var(--line); }
.l4 .lk-chat { flex: 1; overflow-y: auto; padding: 16px 4px; display: flex; flex-direction: column; gap: 10px; }
.l4 .lk-msg { max-width: 78%; } .l4 .lk-msg p { background: var(--panel-2); border: 1px solid var(--line); font-size: 14px; }
.l4 .lk-msg.me p { background: rgba(200, 162, 74, .16); border-color: rgba(200, 162, 74, .4); color: var(--gold-2); }
.l4 .lk-av { width: 38px; height: 38px; object-fit: cover; }
.l4 .lk-opts { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 0 16px; justify-content: flex-end; min-height: 60px; border-top: 1px solid var(--line); }
.l4 .lk-opts.l4-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.l4-opt { text-align: left; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); display: flex; flex-direction: column; gap: 4px; }
.l4-opt b { font-size: 14px; display: flex; align-items: center; gap: 6px; } .l4-opt b em { font-style: normal; font-size: 10.5px; padding: 0 6px; border-radius: 5px; background: rgba(63, 191, 127, .2); color: #7ee0ad; }
.l4-opt small { font-size: 12px; color: var(--muted); line-height: 1.45; }
.l4-opt.rec { border-color: rgba(63, 191, 127, .55); }
.l4-opt:hover { border-color: var(--gold); }
.l4-right { padding: 14px; display: flex; flex-direction: column; gap: 10px; background: linear-gradient(180deg, #0c1322, #0a0f1b); overflow: auto; }
.l4-right h4 { margin: 0; font: 700 14px var(--f-ui); color: var(--gold-2); }
.l4-dcs { display: flex; flex-direction: column; gap: 6px; }
.l4-dc { padding: 8px 10px; border-radius: 9px; border: 1px dashed var(--line); } .l4-dc small { display: block; color: var(--muted); font-size: 11px; } .l4-dc b { font-size: 13.5px; color: var(--muted); }
.l4-dc.done { border-style: solid; background: var(--panel); } .l4-dc.done b { color: var(--text); }
.l4-note { margin: 0; font-size: 11.5px; color: var(--muted); line-height: 1.55; }
.l4-right .lk-skip { margin-top: auto; }
@media (max-width: 1100px) { .l4 { overflow: auto; grid-template-rows: 64px auto; } .l4-main { grid-template-columns: 1fr; } .l4-mid { min-height: 520px; } }
.l4-right { padding-bottom: 70px; }

/* ---------- 라커룸 팀 토크 ---------- */
.l4-mid.t4 { padding: 14px 18px; gap: 12px; overflow: auto; }
.t4-coach { display: flex; gap: 10px; align-items: flex-start; }
.t4-coach > div:last-child { flex: 1; } .t4-coach small { color: var(--muted); font-size: 11.5px; }
.t4-coach p { margin: 4px 0 0; padding: 8px 12px; border-radius: 10px; background: var(--panel-2); border: 1px solid var(--line); font-size: 13.5px; line-height: 1.5; }
.t4-coach p.adv { border-color: rgba(63, 191, 127, .45); background: rgba(63, 191, 127, .08); }
.t4-coach p.adv b { color: #7ee0ad; }
.t4-cards { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.t4-pc { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 8px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel); text-align: center; min-width: 0; }
.t4-pc .lk-av { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; }
.t4-pc.on { border-color: var(--gold-2); box-shadow: 0 0 0 1px var(--gold-2); }
.t4-pc:hover { border-color: #4a5a80; }
.t4-nm { display: flex; flex-direction: column; align-items: center; gap: 1px; } .t4-nm .pos-ic { width: 14px; height: 14px; } .t4-nm b { font-size: 13.5px; } .t4-nm small { color: var(--muted); font-size: 11px; }
.t4-st { font-style: normal; font-size: 11.5px; font-weight: 700; padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.t4-st s { opacity: .6; font-weight: 400; }
.t4-st.g { background: rgba(63, 191, 127, .18); color: #7ee0ad; } .t4-st.n { background: #22304d; color: #c7d0e3; }
.t4-st.w { background: rgba(240, 180, 60, .18); color: #ffcf6b; } .t4-st.b { background: rgba(226, 87, 92, .2); color: #ff9a9e; }
.t4-pc p { margin: 0; font-size: 11.5px; line-height: 1.4; color: var(--text); } .t4-pc p.e { color: var(--muted); }
.t4-n { position: absolute; top: 6px; right: 8px; font-style: normal; font-size: 8px; color: var(--gold); letter-spacing: 1px; }
.t4-comp { border: 1px solid var(--line); border-radius: 12px; background: rgba(15, 22, 38, .6); padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; }
.t4-row { display: grid; grid-template-columns: 70px 1fr; gap: 10px; align-items: start; } .t4-row > span { color: var(--muted); font-size: 12.5px; padding-top: 7px; }
.t4-row .seg { flex-wrap: wrap; } .t4-row .seg button { flex: 1 1 auto; }
.t4-msgs { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 6px; }
.t4-msgs button { text-align: left; padding: 9px 12px; border-radius: 9px; border: 1px solid var(--line); background: var(--panel); font-size: 13px; }
.t4-msgs button:hover { border-color: var(--gold); }
.t4-msgs button.rec { border-color: rgba(63, 191, 127, .6); } .t4-msgs button.rec::after { content: ' · 코치 추천'; color: #7ee0ad; font-size: 11px; }
.t4-log { flex: 1; min-height: 120px; overflow: auto; display: flex; flex-direction: column; gap: 6px; }
.t4-lg { padding: 6px 10px; border-radius: 8px; background: var(--panel); border: 1px solid var(--line); }
.t4-lg small { color: var(--muted); font-size: 11px; display: flex; align-items: center; gap: 5px; } .t4-lg p { margin: 2px 0 0; font-size: 12.5px; line-height: 1.45; }
.t4-lg.me { background: rgba(200, 162, 74, .1); border-color: rgba(200, 162, 74, .35); } .t4-lg.me p { color: var(--gold-2); }
.t4-side h5 { margin: 0 0 6px; font-size: 12px; color: var(--muted); } .t4-side .seg { width: 100%; } .t4-side .seg button { flex: 1; }
.t4-go { display: flex; gap: 8px; } .t4-go button { flex: 1; }
.l4-right .lk-skip { margin-top: 0; }

/* 화면이 낮을 때(브라우저 확대 등): 칸이 잘리지 않고 화면 전체가 스크롤된다 */
.d2 { overflow-y: auto; overflow-x: hidden; grid-template-rows: 64px 70px minmax(520px, 1fr); }
.d3 { grid-template-rows: 64px minmax(500px, 1fr) 60px; }
.l4 { grid-template-rows: 64px minmax(500px, 1fr); }
@media (max-height: 820px) { .d2:not(.d3):not(.l4) { grid-template-rows: 56px 58px minmax(480px, 1fr); } }
