/* 94차: 시뮬레이터 › 밴픽(dr-) · 맵(mp-) 전용. 색은 토큰만(라이트 · 다크), 팀 색은 A 파랑 · B 빨강 */
.dr, .mp { --team-a: #3b82f6; --team-b: #ef4444; }
.dr-top { display: grid; gap: 10px; }
.dr-top-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.dr-top-row .em-title { flex: 1 1 260px; }
/* 96차: 방식 · A팀 vs B팀 은 한 묶음 — 좁아져도 '방식' 글자가 세로로 깨지거나 선택 칸이 팀 칸을 덮지 않게 */
.dr-matchup { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; flex: 0 1 auto; min-width: 0; }
.dr-matchup > * { flex-shrink: 0; }
.dr-mode { display: inline-flex; align-items: center; gap: 6px; font-size: var(--text-sm); font-weight: 800; color: var(--text-2); white-space: nowrap; }
.dr-mode > span { white-space: nowrap; }
.dr-mode .vega-select { min-width: 150px; }
.dr-mode select { min-height: 38px; }
.dr-team-name { width: 150px; min-height: 38px; font-weight: 800; text-align: center; border-width: 2px !important; }
.dr-team-name.is-a { border-color: var(--team-a) !important; }
.dr-team-name.is-b { border-color: var(--team-b) !important; }
.dr-vs { font-weight: 800; color: var(--text-3); font-size: 12px; }
.dr-sets { display: flex; flex-wrap: wrap; gap: 6px; }
.dr-set-tab { padding: 6px 12px; border-radius: 999px; border: 1.5px solid var(--border); background: var(--surface); color: var(--text-2); font-weight: 800; font-size: var(--text-sm); cursor: pointer; }
.dr-set-tab.is-active { background: var(--poke-yellow); border-color: var(--poke-yellow); color: var(--on-primary); }
.dr-phase { margin: 0 0 0 auto; font-weight: 700; }
.dr-phase b.is-a { color: var(--team-a); } .dr-phase b.is-b { color: var(--team-b); }
.dr-actions { justify-content: space-between; }
.dr-board { display: grid; grid-template-columns: minmax(230px, 1fr) minmax(0, 1.5fr) minmax(230px, 1fr); gap: 14px; margin-top: 16px; }
.dr-board.is-view { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.dr-team { display: grid; align-content: start; gap: 8px; padding: 16px; border-top: 5px solid var(--team-a); }
.dr-team.is-b { border-top-color: var(--team-b); }
.dr-team-h { margin: 0; font-size: 20px; }
.dr-team.is-a .dr-team-h { color: var(--team-a); } .dr-team.is-b .dr-team-h { color: var(--team-b); }
.dr-label { margin: 6px 0 0; font-size: 12px; font-weight: 800; letter-spacing: .04em; color: var(--text-3); }
.dr-bans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 0; padding: 0; list-style: none; }
.dr-ban { position: relative; }
.dr-slot-btn { display: flex; width: 100%; align-items: center; gap: 8px; padding: 6px; border: 2px dashed var(--border); border-radius: 12px; background: var(--surface-muted); color: var(--text); text-align: left; cursor: pointer; font: inherit; }
.dr-ban .dr-slot-btn { flex-direction: column; justify-content: center; gap: 2px; min-height: 86px; padding: 4px; }
.dr-ban .dr-slot-btn small { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; font-weight: 800; }
.dr-ban.is-filled .dr-slot-btn, .dr-pick.is-filled .dr-slot-btn { border-style: solid; background: var(--surface); }
.dr-ban.is-filled img { filter: grayscale(.9) opacity(.75); }
.dr-ban-x { position: absolute; top: 10px; left: 50%; transform: translateX(-50%); color: var(--team-b); font-size: 34px; font-weight: 900; line-height: 1; pointer-events: none; text-shadow: 0 0 4px var(--surface); }
.dr-ban.is-next .dr-slot-btn, .dr-pick.is-next .dr-slot-btn { border-color: var(--poke-yellow); box-shadow: 0 0 0 3px color-mix(in srgb, var(--poke-yellow) 35%, transparent); animation: dr-pulse 1.4s ease-in-out infinite; }
@keyframes dr-pulse { 50% { box-shadow: 0 0 0 6px color-mix(in srgb, var(--poke-yellow) 18%, transparent); } }
.dr-empty { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--surface); color: var(--text-3); font-weight: 800; flex: none; }
.dr-picks { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.dr-pick { border-radius: 14px; }
.dr-pick-main { position: relative; display: flex; align-items: center; gap: 6px; }
.dr-pick-main .dr-slot-btn { flex: 1; min-width: 0; min-height: 68px; border-left: 5px solid var(--role-color); }
.dr-pick-text { display: grid; min-width: 0; }
.dr-pick-text b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; }
.dr-pick-text small { color: var(--text-3); font-size: 11px; font-weight: 800; }
.dr-x, .dr-gear { flex: none; width: 30px; height: 30px; border-radius: 50%; border: 1.5px solid var(--border); background: var(--surface); color: var(--text-2); cursor: pointer; font-size: 13px; line-height: 1; }
.dr-ban .dr-x { position: absolute; top: -6px; right: -6px; width: 24px; height: 24px; font-size: 11px; }
.dr-gear.is-on { background: var(--poke-yellow); border-color: var(--poke-yellow); color: var(--on-primary); }
.dr-sum { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; padding: 4px 6px 0 14px; font-size: 12px; color: var(--text-2); }
.dr-sum-items { display: inline-flex; gap: 3px; }
.dr-sum-items img { border-radius: 6px; background: var(--surface-muted); }
.dr-sum-battle { outline: 2px solid var(--poke-yellow); outline-offset: -2px; }
.dr-cfg { display: grid; gap: 8px; margin-top: 6px; padding: 10px; border-radius: 12px; background: var(--surface-muted); }
.dr-cfg-label { display: block; margin-bottom: 4px; font-size: 11px; font-weight: 800; color: var(--text-3); }
.dr-move-opts { display: flex; flex-wrap: wrap; gap: 6px; }
.dr-move { padding: 4px 8px; font-size: 12px; }
.dr-cfg-items { display: grid; gap: 6px; }
.dr-cfg-items select { min-height: 34px; font-size: 13px; }
.dr-pool { display: grid; align-content: start; gap: 10px; padding: 14px; }
.dr-pool-head { display: grid; gap: 8px; }
.dr-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 6px; max-height: 70vh; overflow: auto; padding: 2px; }
.dr-poke { position: relative; display: grid; justify-items: center; gap: 2px; padding: 6px 4px; border: 2px solid var(--border); border-radius: 12px; background: var(--surface); color: var(--text); font: inherit; font-size: 11px; font-weight: 800; cursor: pointer; transition: transform .12s var(--ease-bounce, ease), border-color .12s; }
.dr-poke img { width: 52px; height: 52px; }
.dr-poke span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dr-poke:hover:not(.is-off) { transform: translateY(-3px); border-color: var(--role-color); }
.dr-poke.is-off { opacity: .38; filter: grayscale(.9); cursor: not-allowed; }
.dr-poke em { position: absolute; top: 4px; left: 4px; right: 4px; padding: 1px 4px; border-radius: 6px; background: var(--text); color: var(--bg); font-size: 9px; font-style: normal; }
.dr-help { margin: 12px 0 0; }
.dr-sets-view { margin-bottom: 8px; }
@media (max-width: 900px) {
  .dr-board { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dr-pool { grid-column: 1 / -1; order: -1; }
  .dr-grid { max-height: 40vh; }
  .dr-phase { margin-left: 0; flex-basis: 100%; }
}
@media (max-width: 520px) { .dr-board, .dr-board.is-view { grid-template-columns: 1fr; } .dr-team-name { width: 110px; } }

/* ---------- 맵 ---------- */
.mp-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.mp-tab { padding: 8px 16px; border-radius: 999px; border: 2px solid var(--border); background: var(--surface); color: var(--text-2); font-weight: 800; cursor: pointer; }
.mp-tab.is-active { border-color: var(--map-color); background: color-mix(in srgb, var(--map-color) 16%, var(--surface)); color: var(--text); }
.mp-layout { display: grid; grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr); gap: 14px; align-items: start; }
.mp-stage { display: grid; gap: 10px; padding: 14px; }
.mp-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.mp-tool-group { display: inline-flex; gap: 4px; }
.mp-tools .btn.is-active { background: var(--poke-yellow); border-color: var(--poke-yellow); color: var(--on-primary); }
.mp-colors { display: inline-flex; gap: 6px; }
.mp-color { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--border); background: var(--c); cursor: pointer; }
.mp-color.is-active { outline: 3px solid var(--poke-yellow); outline-offset: 1px; }
.mp-width { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 800; color: var(--text-3); }
.mp-width input { width: 90px; }
.mp-text-input { flex: 1; min-width: 160px; min-height: 36px; }
.mp-canvas-wrap { position: relative; width: 100%; aspect-ratio: 1000 / 475; border-radius: 16px; overflow: hidden; border: 1.5px solid var(--border); background: var(--surface-muted); }
.mp-canvas-wrap canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.mp-time { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 10px 12px; border-radius: 14px; background: var(--surface-muted); }
.mp-time-label { display: inline-flex; align-items: center; gap: 6px; font-size: var(--text-sm); font-weight: 800; color: var(--text-2); white-space: nowrap; }
.mp-time-label b { min-width: 46px; font-size: 18px; color: var(--text); }
.mp-time input[type="range"] { flex: 1 1 200px; min-width: 140px; accent-color: var(--poke-yellow); }
.mp-time-jumps { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.mp-jump { padding: 3px 9px; border-radius: 999px; border: 1.5px solid var(--border); background: var(--surface); color: var(--text-2); font-size: 12px; font-weight: 800; cursor: pointer; }
.mp-jump.is-active { background: var(--poke-yellow); border-color: var(--poke-yellow); color: var(--on-primary); }
.mp-wild { display: inline-flex; align-items: center; gap: 6px; font-size: var(--text-sm); font-weight: 800; color: var(--text-2); cursor: pointer; white-space: nowrap; }
.mp-tip { position: absolute; z-index: 3; max-width: 260px; padding: 8px 10px; border-radius: 12px; background: var(--surface); color: var(--text); border: 1.5px solid var(--border); box-shadow: 0 8px 24px rgba(0,0,0,.18); font-size: 12px; line-height: 1.45; pointer-events: none; }
.mp-tip b { display: block; font-size: 14px; }
.mp-tip small { display: block; color: var(--text-3); font-weight: 800; margin: 2px 0 4px; }
.mp-tip p { margin: 0; }
.mp-wild-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 4px 10px; margin: 8px 0 0; padding: 0; list-style: none; }
.mp-wild-list li { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; }
.mp-wild-list img { width: 24px; height: 24px; border-radius: 50%; background: var(--surface-muted); }
.mp-wild-list small { color: var(--text-3); font-weight: 800; }
.mp-wild-list li.is-off { opacity: .45; }
.mp-wild-h { margin: 10px 0 0; font-size: 15px; }
.mp-canvas-wrap [data-mp-ink] { cursor: crosshair; }
.mp-hint { margin: 0; }
.mp-side { display: grid; gap: 14px; }
.mp-times { display: grid; gap: 8px; padding: 16px; }
.mp-times-h { margin: 0; padding-left: 10px; border-left: 5px solid var(--map-color); font-size: 18px; }
.mp-obj { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.mp-obj li { display: flex; gap: 10px; align-items: flex-start; }
.mp-obj-icon { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--surface-muted); font-size: 20px; }
.mp-obj b { display: block; font-size: 14px; }
.mp-obj small { display: block; color: var(--text-3); font-size: 11px; font-weight: 800; }
.mp-obj-time { display: inline-block; margin-top: 3px; padding: 2px 8px; border-radius: 999px; background: color-mix(in srgb, var(--poke-yellow) 30%, var(--surface)); font-size: 12px; font-weight: 700; }
.mp-obj .meta { margin: 4px 0 0; font-size: 12px; }
.mp-legend { margin: 4px 0 0; }
.mp-save { display: grid; gap: 10px; padding: 16px; }
.mp-view .mp-layout { margin-bottom: 14px; }
@media (max-width: 900px) { .mp-layout { grid-template-columns: 1fr; } }
@media (max-width: 720px) {  /* 96차: 휴대폰은 방식 한 줄 → A팀 vs B팀 한 줄 */
  .dr-matchup { flex: 1 1 100%; flex-wrap: wrap; }
  .dr-matchup > .dr-mode { flex: 1 1 100%; }
  .dr-mode .vega-select { flex: 1; }
  .dr-matchup > .dr-team-name { flex: 1 1 0; width: auto; min-width: 0; }
}
/* 104차: 맵 전체화면 — 도구 · 시간 · 맵을 화면 가득 (그리기 그대로). 휴대폰(아이폰)은 진짜 전체화면이 없어 화면을 덮는 방식 */
.mp-full-btn { position: absolute; z-index: 4; right: 10px; top: 10px; padding: 6px 12px; border: 0; border-radius: 999px; background: rgba(28,25,23,.72); color: #fff; font: inherit; font-size: 13px; font-weight: 800; cursor: pointer; }
.mp-full-btn:hover, .mp-full-btn:focus-visible { background: rgba(28,25,23,.9); }
html.mp-full-open, html.mp-full-open body { overflow: hidden; }
.mp-stage.is-full { position: fixed; inset: 0; z-index: 800; display: flex; flex-direction: column; gap: 8px; margin: 0; max-width: none; border-radius: 0; border: 0;
  padding: max(10px, env(safe-area-inset-top)) max(10px, env(safe-area-inset-right)) max(10px, env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-left));
  background: var(--bg); overflow: hidden; }
.mp-stage.is-full > .mp-tools, .mp-stage.is-full > .mp-time { flex: 0 0 auto; }
.mp-stage.is-full > .mp-hint { display: none; }
.mp-stage.is-full .mp-canvas-wrap { flex: 0 0 auto; align-self: center; width: 100%; }
.mp-full-turn { display: none; margin: 0; text-align: center; font-size: var(--text-sm); font-weight: 800; color: var(--text-2); }
@media (max-width: 640px) { .mp-stage.is-full { gap: 6px; } .mp-stage.is-full .mp-time { padding: 6px 8px; gap: 6px 10px; } .mp-full-btn { padding: 4px 9px; font-size: 11px; right: 6px; top: 6px; } }
@media (orientation: portrait) and (max-width: 640px) { .mp-stage.is-full .mp-full-turn { display: block; } }
@media (max-height: 520px) {
  .mp-stage.is-full { gap: 6px; padding-top: 6px; padding-bottom: 6px; }
  .mp-stage.is-full .mp-time-jumps { display: none; }
  .mp-stage.is-full .mp-time { padding: 4px 8px; }
  .mp-stage.is-full .mp-tools { gap: 6px; }
  .mp-stage.is-full .mp-tools .btn { padding-block: 4px; }
  .mp-stage.is-full .mp-text-input { flex: 1 1 120px; width: auto; min-width: 0; padding-block: 4px; }
  .mp-stage.is-full .mp-width input { width: 80px; }
  .mp-full-btn { padding: 4px 9px; font-size: 11px; right: 6px; top: 6px; }
}

