/* 투표 화면 */

.skip { position: absolute; left: 12px; top: -60px; z-index: 300; padding: 10px 14px; border-radius: 10px; background: var(--navy); color: #fff; font-weight: 800; text-decoration: none; }
.skip:focus { top: 12px; }

/* ---------- 히어로 ---------- */
.hero-inner { position: relative; z-index: 2; min-height: 470px; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 40px; align-items: center; padding: 60px 0; }
.hero-title { margin: 14px 0 0; font-size: clamp(48px, 6.2vw, 88px); line-height: .98; font-weight: var(--fw-heavy); letter-spacing: -.055em; }
.hero-title span { display: inline-block; color: #dce4f3; }
.hero-title .gold { color: var(--gold); }

.matchup { display: flex; align-items: stretch; gap: 12px; margin-top: 28px; max-width: 560px; }
.mu-side { flex: 1; min-width: 0; padding: 14px 16px 15px; border-radius: 16px; background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .12); }
.mu-side.is-home { text-align: right; }
.mu-role { display: block; font-size: var(--fs-10); font-weight: var(--fw-heavy); letter-spacing: .18em; color: rgba(255, 255, 255, .5); }
.mu-name { display: block; margin-top: 4px; font-size: var(--fs-24); font-weight: var(--fw-heavy); letter-spacing: -.03em; line-height: 1.15; }
.mu-teams { display: flex; flex-wrap: wrap; gap: 6px 12px; margin-top: 10px; font-size: var(--fs-11); font-weight: var(--fw-strong); color: rgba(255, 255, 255, .78); letter-spacing: .03em; }
.mu-side.is-home .mu-teams { justify-content: flex-end; }
.mu-teams span { display: inline-flex; align-items: center; gap: 6px; }
.mu-teams .team-dot { width: 8px; height: 8px; box-shadow: 0 0 0 2px rgba(255, 255, 255, .12); }
.mu-vs { align-self: center; flex: none; font-size: var(--fs-12); font-weight: var(--fw-heavy); letter-spacing: .12em; color: rgba(255, 255, 255, .45); }

.hero-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.hero-meta .pill { background: rgba(255, 255, 255, .1); color: rgba(255, 255, 255, .88); }
.hero-meta .pill b { color: #fff; font-weight: var(--fw-heavy); font-variant-numeric: tabular-nums; }
.hero-meta .pill.is-light { background: #fff; color: var(--navy); }

.hero-count { margin-top: 22px; display: inline-flex; flex-direction: column; gap: 6px; padding: 16px 20px; border-radius: 16px; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .14); }
.hero-count small { font-size: var(--fs-11); font-weight: var(--fw-heavy); letter-spacing: .14em; color: rgba(255, 255, 255, .58); }
.hero-count strong { font-size: 40px; font-weight: var(--fw-heavy); letter-spacing: -.02em; line-height: 1; font-variant-numeric: tabular-nums; }

.hero-visual { position: relative; min-height: 360px; display: grid; place-items: center; }
.hero-logo { position: relative; z-index: 3; width: min(300px, 62vw); aspect-ratio: 1; border-radius: 50%; overflow: hidden; background: #fff; box-shadow: 0 35px 80px rgba(0, 0, 0, .3); }
.hero-logo img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.035); }
.hero-ring { position: absolute; border: 1px solid rgba(255, 255, 255, .16); border-radius: 50%; width: 380px; height: 380px; }
.hero-ring + .hero-ring { width: 460px; height: 460px; border-style: dashed; }
.hero-tag { position: absolute; z-index: 4; bottom: 18px; left: 50%; transform: translateX(-50%); padding: 7px 14px; border-radius: var(--r-pill); background: var(--navy-deep); border: 1px solid rgba(255, 255, 255, .16); color: #fff; font-size: var(--fs-11); font-weight: var(--fw-heavy); letter-spacing: .2em; white-space: nowrap; }
.hero-tag b { color: var(--gold); font-weight: inherit; }

/* 히어로 그림: data-art(PC·태블릿), data-art-m(760 이하). 불러오기에 성공해야 깐다.
   그림은 히어로 높이에 맞춰 오른쪽에 붙이고(2:1, 야구장이 잘리지 않게) 왼쪽 끝은 바탕에 녹인다. */
.hero-art {
  position: absolute; z-index: 1; top: 0; right: 0; height: 100%; aspect-ratio: 2 / 1;
  background: var(--art, none) center / cover no-repeat; opacity: 0; transition: opacity .4s;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 30%); mask-image: linear-gradient(90deg, transparent, #000 30%);
}
.hero.has-art { background: linear-gradient(90deg, #0d192c, #0e1a2e 55%, #15233d); }
.hero.has-art .hero-art { opacity: 1; }
.hero.has-art .hero-visual { visibility: hidden; }

/* 로그인 뒤: 낮은 히어로 */
.hero.is-compact .hero-inner { min-height: 0; padding: 30px 0 34px; grid-template-columns: minmax(0, 1fr) auto; }
.hero.is-compact .hero-title { font-size: clamp(38px, 4vw, 56px); }
.hero.is-compact .matchup { margin-top: 20px; }
.hero.is-compact .mu-side { padding: 11px 14px 12px; }
.hero.is-compact .mu-name { font-size: var(--fs-20); }
.hero.is-compact .mu-teams { margin-top: 7px; }
.hero.is-compact .hero-visual { min-height: 230px; width: 280px; }
.hero.is-compact .hero-logo { width: 180px; }
.hero.is-compact .hero-ring { width: 228px; height: 228px; }
.hero.is-compact .hero-ring + .hero-ring { width: 272px; height: 272px; }
.hero.is-compact .hero-tag { bottom: 0; }

/* ---------- 공통 블록 ---------- */
.notice { display: flex; align-items: center; gap: 12px; padding: 14px 16px; margin-bottom: 16px; border-radius: 14px; background: var(--gold-bg); color: var(--gold-ink); font-size: var(--fs-13); font-weight: 700; border: 1px solid #f1e1b4; }
.notice strong { font-weight: var(--fw-heavy); }
.notice::before { content: ""; flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--gold); }
.notice.is-error { background: var(--red-bg); color: var(--red-deep); border-color: #f1d0d0; }
.notice.is-error::before { background: var(--red); }
.cmd { display: inline-flex; align-items: center; padding: 3px 9px; border-radius: 8px; background: var(--chip); color: var(--navy); font-weight: var(--fw-heavy); letter-spacing: -.01em; }

/* ---------- 로그인 ---------- */
.login-card { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(320px, .75fr); gap: 0; overflow: hidden; }
.login-steps { padding: 30px 32px; }
.login-steps h2 { margin-top: 8px; color: var(--navy); font-size: var(--fs-28); font-weight: var(--fw-heavy); letter-spacing: -.04em; }
.steps { list-style: none; margin: 24px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; counter-reset: step; }
.step { position: relative; padding: 18px 18px 20px; border-radius: 16px; background: #f7f9fc; border: 1px solid var(--line-soft); min-width: 0; }
.step-no { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 11px; background: var(--navy); color: #fff; font-size: var(--fs-13); font-weight: var(--fw-heavy); font-variant-numeric: tabular-nums; }
.step strong { display: block; margin-top: 16px; color: var(--navy); font-size: var(--fs-15); font-weight: var(--fw-heavy); letter-spacing: -.02em; line-height: 1.4; }
.step small { display: block; margin-top: 6px; color: var(--muted); font-size: var(--fs-12); line-height: 1.5; }
.step .copy { margin-left: 6px; border: 1px solid var(--line); background: #fff; color: var(--muted); border-radius: 8px; padding: 2px 8px; font-size: var(--fs-11); font-weight: 800; vertical-align: 2px; }
.step .copy:hover { color: var(--navy); border-color: var(--line-strong); }

.code-panel { display: flex; flex-direction: column; justify-content: center; gap: 12px; padding: 30px 32px; background: var(--panel); border-left: 1px solid var(--line); }
.code-panel h3 { color: var(--navy); font-size: var(--fs-17); font-weight: var(--fw-heavy); letter-spacing: -.02em; }
.code-input {
  width: 100%; height: 74px; border: 1px solid var(--line); border-radius: 16px; background: #fff;
  text-align: center; font-size: 34px; font-weight: var(--fw-heavy); color: var(--navy);
  letter-spacing: .38em; padding: 0 0 0 .38em; font-variant-numeric: tabular-nums; outline: 0;
}
.code-input::placeholder { color: #c9d0db; }
.code-input:focus { border-color: var(--navy); box-shadow: 0 0 0 4px rgba(31, 43, 69, .1); }
.code-input[aria-invalid="true"] { border-color: var(--red); box-shadow: 0 0 0 4px rgba(197, 58, 58, .1); }
.code-panel .btn { width: 100%; }
.code-panel .hint { color: var(--muted); font-size: var(--fs-12); text-align: center; }

/* ---------- 상태 카드 (시작 전·종료·소진·완료) ---------- */
.state-grid { display: grid; grid-template-columns: minmax(300px, 380px) minmax(0, 820px); justify-content: center; gap: 20px; align-items: start; }
.state-card { padding: 28px; }
.state-card h2 { margin-top: 8px; color: var(--navy); font-size: var(--fs-28); font-weight: var(--fw-heavy); letter-spacing: -.04em; line-height: 1.2; }
.state-card .sub { margin-top: 8px; color: var(--muted); font-size: var(--fs-13); font-weight: 600; font-variant-numeric: tabular-nums; }
.state-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 22px; }
.stat { padding: 16px; border-radius: 14px; background: var(--panel); min-width: 0; }
.stat small { display: block; color: var(--muted); font-size: var(--fs-11); font-weight: var(--fw-heavy); letter-spacing: .04em; }
.stat strong { display: block; margin-top: 6px; color: var(--navy); font-size: var(--fs-24); font-weight: var(--fw-heavy); letter-spacing: -.02em; line-height: 1.1; font-variant-numeric: tabular-nums; white-space: nowrap; }
.stat strong span { font-size: var(--fs-14); color: var(--muted-2); font-weight: var(--fw-strong); }
.stat.is-wide { grid-column: 1 / -1; }
.state-actions { display: grid; gap: 8px; margin-top: 22px; }
.state-actions .btn { width: 100%; }
.quota-dots { display: flex; gap: 6px; margin-top: 10px; }
.quota-dots i { width: 100%; height: 6px; border-radius: 3px; background: #dfe4ec; }
.quota-dots i.is-used { background: var(--navy); }
.state-wide { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 28px 30px; }
.state-wide .count-big { font-size: 44px; font-weight: var(--fw-heavy); color: var(--navy); letter-spacing: -.02em; font-variant-numeric: tabular-nums; line-height: 1; }
.state-wide .count-label { display: block; margin-bottom: 8px; text-align: right; color: var(--muted); font-size: var(--fs-11); font-weight: var(--fw-heavy); letter-spacing: .1em; }

/* 내 용지 */
.my-ballots { display: grid; gap: 10px; }
.mb { background: #fff; border: 1px solid var(--line); border-radius: var(--r-panel); overflow: hidden; }
.mb > summary { list-style: none; display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: 14px; padding: 14px 16px; cursor: pointer; }
.mb > summary::-webkit-details-marker { display: none; }
.mb > summary:hover { background: var(--row-hover); }
.mb > summary:focus-visible { outline: 2px solid var(--navy); outline-offset: -2px; }
.mb-no { display: inline-grid; place-items: center; min-width: 46px; height: 30px; padding: 0 8px; border-radius: 9px; background: var(--chip); color: var(--navy); font-size: var(--fs-12); font-weight: var(--fw-heavy); font-variant-numeric: tabular-nums; }
.mb-when { font-size: var(--fs-13); font-weight: var(--fw-strong); color: var(--ink); font-variant-numeric: tabular-nums; }
.mb-when small { margin-left: 8px; color: var(--muted); font-weight: 600; }
.mb-chev { width: 9px; height: 9px; border: solid #8993a4; border-width: 0 2px 2px 0; transform: rotate(45deg); margin: 0 4px 4px; transition: transform .2s; }
.mb[open] .mb-chev { transform: rotate(-135deg); margin-bottom: -2px; }
.mb-body { padding: 0 14px 14px; }
.mb-body .lineup { border-radius: 14px; }
.mb.is-void .mb-no { background: var(--red-bg); color: var(--red-deep); }

/* ---------- 용지 (대진표) ---------- */
.ballot { --pillar-w: 112px; --col-gap: 14px; --cell-gap: 8px; --row-gap: 8px; }
.ballot-toolbar { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 22px; }
.ballot-toolbar h2 { margin-top: 8px; color: var(--navy); font-size: var(--fs-32); font-weight: var(--fw-heavy); letter-spacing: -.04em; line-height: 1.2; }
.ballot-toolbar h2 small { margin-left: 10px; font-size: var(--fs-14); font-weight: var(--fw-strong); color: var(--muted); letter-spacing: 0; vertical-align: 4px; font-variant-numeric: tabular-nums; }
.ballot-toolbar .actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }

.ballot-sides, .ballot-cols { display: grid; grid-template-columns: minmax(0, 1fr) var(--pillar-w) minmax(0, 1fr); gap: 0 var(--col-gap); }
.side-title { display: flex; align-items: baseline; gap: 10px; padding: 0 2px 12px; }
.side-title strong { color: var(--navy); font-size: var(--fs-24); font-weight: var(--fw-heavy); letter-spacing: -.04em; }
.side-title span { font-size: var(--fs-11); font-weight: var(--fw-heavy); letter-spacing: .18em; color: var(--muted-2); }
.side-title.is-right { justify-content: flex-end; }
.ballot-cols { position: sticky; top: var(--topbar-h); z-index: 6; padding: 10px 0 10px; background: var(--canvas); }
.col-teams { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--cell-gap); }
.col-team { min-width: 0; }
.col-team i { display: block; height: 4px; border-radius: 2px; background: var(--team); box-shadow: inset 0 0 0 1px rgba(17, 26, 44, .08); }
.col-team b { display: block; margin-top: 8px; color: var(--navy); font-size: var(--fs-13); font-weight: var(--fw-heavy); letter-spacing: .02em; }
.col-team small { display: block; margin-top: 2px; color: var(--muted); font-size: var(--fs-11); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.col-mid { display: grid; place-items: end center; padding-bottom: 2px; color: var(--muted-3); font-size: var(--fs-10); font-weight: var(--fw-heavy); letter-spacing: .18em; }

.ballot-rows { position: relative; display: grid; gap: var(--row-gap); }
.ballot-rows::before {
  content: ""; position: absolute; top: 0; bottom: 0; left: 50%; width: var(--pillar-w); transform: translateX(-50%);
  background: linear-gradient(180deg, var(--navy) 0%, #1b2640 100%); border-radius: 18px;
}
.pos-row { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) var(--pillar-w) minmax(0, 1fr); gap: 0 var(--col-gap); align-items: stretch; scroll-margin-top: calc(var(--topbar-h) + 84px); }
.pick-group { margin: 0; padding: 0; border: 0; min-width: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--cell-gap); }
.side-tag { display: none; }

.pillar { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: #fff; padding: 8px 6px; text-align: center; }
.pos-row + .pos-row .pillar::before { content: ""; position: absolute; left: 16px; right: 16px; top: calc(var(--row-gap) / -2); height: 1px; background: rgba(255, 255, 255, .1); }
.pillar b { font-size: var(--fs-20); font-weight: var(--fw-heavy); letter-spacing: -.01em; line-height: 1; }
.pillar small { font-size: var(--fs-11); font-weight: 700; color: rgba(255, 255, 255, .58); }
.pm { position: absolute; top: 50%; width: 6px; height: 6px; margin-top: -3px; border-radius: 50%; background: rgba(255, 255, 255, .18); transition: background-color .15s; }
.pm-l { left: 10px; }
.pm-r { right: 10px; }
.pm.is-on { background: var(--gold); }
.pillar .pm-labels { display: none; }

/* 후보 칸 */
.cand { position: relative; display: block; min-width: 0; cursor: pointer; }
.cand > input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.cand-body {
  position: relative; display: flex; align-items: center; gap: 10px; height: 100%; min-height: 66px;
  padding: 10px 12px; background: #fff; border: 1px solid var(--line); border-radius: var(--r-cell);
  transition: background-color .15s, border-color .15s, box-shadow .15s;
}
.cand:hover .cand-body { border-color: var(--line-strong); }
.cand .face { width: 40px; height: 40px; border-radius: 10px; }
.cand-text { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
/* 긴 닉네임: fitNames()가 한 줄에 맞추고(최대 2px 축소), 안 되면 밑줄 자리에서 두 줄로 나눈다 */
.cand-text strong {
  font-size: var(--fs-14); font-weight: var(--fw-strong); color: var(--ink); line-height: 1.22; letter-spacing: -.01em;
  overflow-wrap: anywhere; text-wrap: balance; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.cand-text strong.is-one, .cand-text strong.is-probe { white-space: nowrap; }
.cand-text strong.is-one wbr, .cand-text strong.is-probe wbr { display: none; }
.cand-text .team-tag { font-size: var(--fs-11); }
.cand-face { position: relative; display: block; flex: none; }
.cand-check { display: none; position: absolute; right: -6px; bottom: -6px; width: 18px; height: 18px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 2px var(--navy); }
.cand > input:checked + .cand-body {
  background: var(--navy); border-color: var(--navy);
  box-shadow: inset 5px 0 0 var(--team), 0 8px 20px rgba(31, 43, 69, .16);
}
.cand > input:checked + .cand-body strong { color: #fff; }
.cand > input:checked + .cand-body .team-tag { color: rgba(255, 255, 255, .72); }
.cand > input:checked + .cand-body .team-dot { box-shadow: 0 0 0 2px rgba(255, 255, 255, .16); }
.cand > input:checked + .cand-body .cand-check { display: block; }
.cand > input:checked + .cand-body .cand-check::after {
  content: ""; position: absolute; left: 6.5px; top: 3.5px; width: 4px; height: 8px;
  border: solid var(--navy-deep); border-width: 0 2px 2px 0; transform: rotate(45deg);
}
.cand > input:focus-visible + .cand-body { outline: 2px solid var(--navy); outline-offset: 2px; }
.pick-group:has(input:checked) .cand > input:not(:checked) + .cand-body { background: #fafbfc; }
.pick-group:has(input:checked) .cand > input:not(:checked) + .cand-body strong { color: #4b5569; }
.show-missing .pick-group:not(.is-complete) .cand-body { border-color: #e9c1c1; }
.cand.is-static { cursor: default; }
.cand-empty { display: grid; place-items: center; min-height: 66px; border: 1px dashed var(--line-strong); border-radius: var(--r-cell); color: var(--muted-3); font-size: var(--fs-12); font-weight: 700; }

/* 붙어 다니는 막대 */
.dock { position: sticky; bottom: 16px; z-index: 30; margin-top: 22px; }
.dock-inner {
  display: flex; align-items: center; gap: 22px; padding: 12px 12px 12px 22px;
  background: rgba(255, 255, 255, .97); border: 1px solid var(--line); border-radius: 18px;
  box-shadow: 0 18px 50px rgba(19, 30, 51, .16); backdrop-filter: blur(12px);
}
.dock-count { display: flex; flex-direction: column; min-width: 92px; }
.dock-count small, .dock-quota small { font-size: var(--fs-10); font-weight: var(--fw-heavy); letter-spacing: .14em; color: var(--muted-2); }
.dock-count div { display: flex; align-items: baseline; gap: 5px; margin-top: 3px; font-variant-numeric: tabular-nums; }
.dock-count b { font-size: 30px; font-weight: var(--fw-heavy); color: var(--navy); letter-spacing: -.03em; line-height: 1; }
.dock-count span { font-size: var(--fs-15); font-weight: var(--fw-strong); color: var(--muted-2); }
.dock-count.is-done b { color: var(--navy); }
.dock-ticks { display: grid; gap: 4px; }
.tick-row { display: grid; grid-template-columns: 34px repeat(12, 12px); gap: 3px; align-items: center; }
.tick-row span { font-size: var(--fs-10); font-weight: var(--fw-heavy); color: var(--muted-2); letter-spacing: .04em; }
.tick-row i { height: 6px; border-radius: 2px; background: #e3e8ef; }
.tick-row i.is-on { background: var(--navy); }
.dock-quota { padding-left: 22px; border-left: 1px solid var(--line); }
.dock-quota div { margin-top: 3px; font-size: var(--fs-15); font-weight: var(--fw-heavy); color: var(--navy); font-variant-numeric: tabular-nums; white-space: nowrap; }
.dock-quota div span { color: var(--muted-2); font-weight: var(--fw-strong); }
.dock-actions { margin-left: auto; display: flex; gap: 8px; }
.dock-actions .btn { min-height: 50px; }
.dock-actions .btn-navy { min-width: 132px; }

/* 확인 창 */
.lineup-dialog { width: min(760px, calc(100% - 24px)); }
.confirm-sheet { background: #fff; border-radius: var(--r-card); overflow: hidden; box-shadow: 0 32px 90px rgba(0, 0, 0, .32); }
.confirm-sheet .lineup { border: 0; border-radius: 0; }
.lineup-dialog .dialog-actions { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 14px 18px; border-top: 1px solid var(--line); background: #fff; }
.lineup-dialog .dialog-actions .form-error { min-height: 0; }
.lineup-dialog .dialog-actions div { display: flex; gap: 8px; margin-left: auto; }
.lineup-dialog .dialog-actions .btn-navy { min-width: 140px; }

/* 외야처럼 여러 명 고르는 자리 */
.team-stack { display: grid; align-content: start; gap: 6px; padding: 8px 4px 4px; border-radius: 16px; background: #e8ecf2; min-width: 0; }
.team-stack::before { content: ""; display: block; height: 4px; margin: 0 6px 2px; border-radius: 2px; background: var(--team); box-shadow: inset 0 0 0 1px rgba(17, 26, 44, .08); }
.pos-row.is-multi .cand-body { min-height: 60px; }
/* 세 팀 묶음의 칸 높이를 줄마다 맞춘다(한 칸만 이름이 두 줄이어도 옆 팀 칸이 같이 커진다). 띠 1줄 + 칸 3줄 */
@supports (grid-template-rows: subgrid) {
  .pos-row.is-multi .team-stack { grid-row: span 4; grid-template-rows: subgrid; }
}
@media (min-width: 1280px) {
  .team-stack .cand-body { gap: 8px; padding: 9px 10px; }
  .team-stack .cand .face { width: 36px; height: 36px; border-radius: 9px; }
}
.cand.is-multi .cand-check { border-radius: 6px; }
.pc-row { display: flex; gap: 6px; margin-top: 10px; }
.pc { min-width: 36px; padding: 3px 7px; border-radius: var(--r-pill); background: rgba(255, 255, 255, .1); color: rgba(255, 255, 255, .78); font-size: var(--fs-11); font-weight: var(--fw-heavy); font-variant-numeric: tabular-nums; text-align: center; }
.pc.is-on { background: var(--gold); color: var(--navy-deep); }
.side-count { padding: 3px 9px; border-radius: var(--r-pill); background: var(--chip); color: var(--navy); font-size: var(--fs-11); font-weight: var(--fw-heavy); font-variant-numeric: tabular-nums; }
.side-count.is-on { background: var(--gold-bg); color: var(--gold-ink); }
.pick-group.is-full .cand > input:not(:checked) + .cand-body { background: #f6f7f9; }
.pick-group.is-full .cand > input:not(:checked) + .cand-body .face { opacity: .55; }
.cand.is-blocked .cand-body { border-color: #9aa3b5 !important; border-style: dashed; animation: cand-nudge .26s ease-out 1; }
@keyframes cand-nudge { 0%, 100% { transform: translateX(0); } 35% { transform: translateX(-3px); } 70% { transform: translateX(2px); } }
@media (prefers-reduced-motion: reduce) { .cand.is-blocked .cand-body { animation: none; } }
.pos-row.is-full-warn .pc.is-on { background: #fff; }

/* 후보 명단(읽기 전용) */
.board.is-static .cand-body { min-height: 62px; }
.board.is-static .ballot-cols { position: static; }

.section-heading.is-tight { margin-bottom: 14px; }
.section-heading.is-tight h2 { font-size: var(--fs-24); }
.done-lineup .lineup, .state-grid .lineup { box-shadow: var(--shadow-card); }
.hide-sm { }

/* ---------- 좁은 데스크톱 ---------- */
@media (max-width: 1407px) {
  .ballot { --pillar-w: 96px; --col-gap: 12px; }
}

/* ---------- 태블릿: 얼굴 위, 이름 아래 ---------- */
@media (max-width: 1279px) {
  .ballot { --pillar-w: 78px; --col-gap: 10px; --cell-gap: 6px; }
  .cand-body { flex-direction: column; justify-content: flex-start; text-align: center; gap: 8px; padding: 14px 8px 12px; min-height: 112px; }
  .cand > input:checked + .cand-body { box-shadow: inset 0 4px 0 var(--team), 0 8px 20px rgba(31, 43, 69, .16); }
  .cand-text { flex: none; align-self: stretch; align-items: center; }
  .cand-text strong { font-size: var(--fs-13); }
  .cand-empty { min-height: 112px; }
  .pos-row.is-multi .cand-body { min-height: 104px; }
  .team-stack { padding: 7px 4px 4px; }
  .pc-row { flex-direction: column; gap: 4px; }
  .pillar b { font-size: var(--fs-17); }
  .pillar small { font-size: var(--fs-10); }
  .pm-l { left: 7px; }
  .pm-r { right: 7px; }
  .col-team small { display: none; }
}

@media (max-width: 900px) {
  .ballot { --pillar-w: 64px; --col-gap: 6px; --cell-gap: 4px; }
  .cand-body { padding-left: 5px; padding-right: 5px; }
  .team-stack { padding: 7px 3px 3px; }
}

@media (max-width: 1099px) {
  .login-card { grid-template-columns: 1fr; }
  .code-panel { border-left: 0; border-top: 1px solid var(--line); }
  .state-grid { grid-template-columns: 1fr; }
  .tick-row { grid-template-columns: 30px repeat(12, 9px); }
}

@media (max-width: 1050px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-visual { display: none; }
  .hero.is-compact .hero-inner { grid-template-columns: 1fr; }
  /* 한 단이라 대진 카드가 야구장 왼쪽에 걸린다: 글자 쪽을 남색으로 덮는다 */
  .hero.has-art::after {
    content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
    background: linear-gradient(90deg, rgba(13, 25, 44, .94) 0, rgba(13, 25, 44, .94) 540px, rgba(13, 25, 44, 0) 720px);
  }
}

/* ---------- 모바일 ---------- */
@media (max-width: 760px) {
  .hero-inner { min-height: 0; padding: 40px 0 36px; gap: 0; }
  .hero-title { font-size: clamp(40px, 12.5vw, 56px); }
  .matchup { margin-top: 22px; gap: 8px; }
  .mu-side { padding: 12px 12px 13px; border-radius: 14px; }
  .mu-name { font-size: var(--fs-20); }
  .mu-teams { gap: 4px 9px; font-size: var(--fs-10); }
  .mu-vs { font-size: var(--fs-11); }
  .hero-meta { margin-top: 18px; gap: 6px; }
  .hero-meta .pill { padding: 6px 10px; font-size: var(--fs-11); }
  .hero-count { margin-top: 18px; padding: 14px 16px; }
  .hero-count strong { font-size: 32px; }
  .hero.is-compact .hero-inner { padding: 26px 0 26px; }
  .hero.is-compact .hero-title { font-size: 34px; }
  .hero.is-compact .matchup { margin-top: 16px; }
  .hero.is-compact .mu-side { padding: 9px 11px 10px; }
  .hero.is-compact .mu-name { font-size: var(--fs-17); }
  .hero.is-compact .hero-meta { margin-top: 14px; }

  .login-steps { padding: 22px 18px; }
  .login-steps h2 { font-size: var(--fs-24); }
  .steps { grid-template-columns: 1fr; gap: 8px; margin-top: 18px; }
  .step { display: grid; grid-template-columns: 34px 1fr; column-gap: 14px; align-items: center; padding: 14px; }
  .step strong { margin-top: 0; font-size: var(--fs-14); }
  .step small { margin-top: 2px; grid-column: 2; }
  .code-panel { padding: 22px 18px; }
  .code-input { height: 66px; font-size: 30px; }

  .state-card { padding: 22px 18px; }
  .state-card h2 { font-size: var(--fs-24); }
  .state-wide { flex-direction: column; align-items: flex-start; padding: 22px 18px; }
  .state-wide .count-label { text-align: left; }
  .state-wide .count-big { font-size: 36px; }
  .mb > summary { grid-template-columns: auto 1fr auto; gap: 10px; padding: 12px; }
  .mb > summary .status { grid-column: 2; justify-self: start; }
  .mb > summary .mb-chev { grid-row: 1 / span 2; grid-column: 3; }
  .mb-when small { display: block; margin: 2px 0 0; }
  .mb-body { padding: 0 8px 8px; }

  .ballot { --row-gap: 14px; }
  .ballot-toolbar { flex-direction: column; align-items: stretch; gap: 14px; margin-bottom: 16px; }
  .ballot-toolbar h2 { font-size: var(--fs-28); }
  .ballot-toolbar .actions { justify-content: stretch; display: grid; grid-template-columns: 1fr auto; }
  .ballot-toolbar .actions .btn:only-child { grid-column: 1 / -1; }
  .ballot-sides, .ballot-cols { display: none; }
  .ballot-rows::before { display: none; }
  .pos-row { grid-template-columns: 1fr; gap: 0; background: #fff; border: 1px solid var(--line); border-radius: var(--r-card); overflow: hidden; box-shadow: var(--shadow-soft); }
  .show-missing .pos-row.is-missing { border-color: #e9c1c1; }
  .pillar { order: -1; flex-direction: row; justify-content: flex-start; align-items: baseline; gap: 10px; padding: 13px 16px; background: var(--navy); }
  .pos-row + .pos-row .pillar::before { display: none; }
  .pillar b { font-size: var(--fs-20); }
  .pillar small { font-size: var(--fs-12); }
  .pm { position: static; margin: 0; align-self: center; }
  .pm-l { margin-left: auto; }
  .pillar .pm-labels { display: none; }
  .pick-group { padding: 12px 12px 14px; gap: 6px; }
  .pick-group.side-nanum { border-top: 1px solid var(--line-soft); }
  .side-tag { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 0 2px 4px; }
  .side-tag strong { font-size: var(--fs-13); font-weight: var(--fw-heavy); color: var(--navy); }
  .side-tag strong small { margin-left: 6px; font-size: var(--fs-10); letter-spacing: .14em; color: var(--muted-2); }
  .side-tag .team-band { width: 72px; }
  .cand-body { min-height: 116px; padding: 14px 6px 12px; border-radius: 14px; }
  .cand .face { width: 44px; height: 44px; }
  .cand-text strong { font-size: var(--fs-13); }
  .cand-empty { min-height: 116px; }

  .dock { bottom: 0; margin: 18px calc((100vw - 100%) / -2) 0; }
  .dock-inner { gap: 12px; padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); border-radius: 18px 18px 0 0; border-width: 1px 0 0; }
  .dock-ticks { display: none; }
  .dock-count { min-width: 0; }
  .dock-count b { font-size: 26px; }
  .dock-quota { padding-left: 12px; }
  .dock-quota div { font-size: var(--fs-13); }
  .dock-actions .btn { min-height: 48px; padding: 0 14px; }
  .dock-actions .btn-navy { min-width: 76px; }

  .team-stack { padding: 7px 4px 4px; gap: 4px; border-radius: 14px; }
  .team-stack::before { margin: 0 4px 2px; }
  .pos-row.is-multi .cand-body { min-height: 104px; }
  .pc-row { display: none; }
  .hide-sm { display: none !important; }
  .lineup-dialog { width: calc(100% - 16px); max-height: calc(100% - 16px); }
  .lineup-dialog .dialog-actions { display: grid; grid-template-columns: 1fr; padding: 12px; }
  .lineup-dialog .dialog-actions div { display: grid; grid-template-columns: 1fr 1.4fr; margin-left: 0; }
  .lineup-dialog .dialog-actions .btn-navy { min-width: 0; }
}

@media (max-width: 400px) {
  .cand-body { padding-left: 4px; padding-right: 4px; }
  .dock-quota small { letter-spacing: .06em; }
  .dock-actions .btn-outline { padding: 0 10px; }
}

/* 최종 디자인 (2026-12-06 22:20) · 대진과 인증 — GPT 시안 채택분 + 총괄 조정 */
.matchup { align-items: center; }
.mu-side, .hero.is-compact .mu-side {
  padding: 10px 0 2px;
  border: 0;
  border-top: 1px solid #63738c;
  border-radius: 0;
  background: transparent;
}
.mu-role, .mu-vs { color: #bccadb; }
.step {
  background: transparent;
  border: 0;
  border-top: 1px solid var(--line-strong);
  border-radius: 0;
  padding: 14px 2px 4px;
}
.step-no {
  width: auto;
  height: auto;
  border-radius: 0;
  background: none;
  color: #50617b;
  font-weight: 720;
}
.step strong { margin-top: 8px; }
.step .cmd { background: var(--panel); }
.code-input::placeholder { color: #637188; }
.login-card { box-shadow: 0 3px 12px rgba(22, 34, 57, .045); }

/* 고른 선수: GPT 시안의 밝은 면 + 테두리 (사용자 선택, 22:40). 남색 채움은 쓰지 않는다. */
.cand-body { border-radius: 10px; }
.cand > input:checked + .cand-body {
  background: #e7eef7;
  border-color: #546a85;
  box-shadow: inset 0 0 0 1px #546a85;
}
.cand > input:checked + .cand-body strong { color: #162841; }
.cand > input:checked + .cand-body .team-tag { color: #415671; }
.cand > input:checked + .cand-body .team-dot { box-shadow: inset 0 0 0 1px rgba(17, 26, 44, .2); }
.cand-check { background: var(--navy); box-shadow: 0 0 0 2px #e7eef7; }
.cand > input:checked + .cand-body .cand-check::after { border-color: white; }
.pm { display: none; }                           /* 기둥 옆 점등 표시 제거 */
.pillar small { color: #c6d1e1; }
.dock-inner { background: #fff; box-shadow: 0 5px 20px rgba(19, 30, 51, .11); }
@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .dock-inner {
    background: rgba(255, 255, 255, .8);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    backdrop-filter: saturate(180%) blur(20px);
  }
}
.lineup-dialog { border-radius: 18px; }
.lineup-dialog .lineup-head { background: var(--navy); }
.lineup-dialog .lineup-foot { padding-block: 8px; }
.lineup-dialog .lineup-row:nth-child(2n) .lp-cell { background: #f5f7fa; }
.lineup-dialog .lineup-row .lp-cell { border-color: #e2e7ef; }
@media (max-width: 760px) {
  .steps { gap: 0; }
  .step { padding: 12px 0; grid-template-columns: 26px 1fr; gap: 2px 8px; }
  .step strong { margin: 0; }
  .step-no { align-self: start; }
  .step small { margin: 0; }
  .ballot-toolbar .actions .btn { min-height: 44px; }
  .cand-body { min-height: 102px; padding-block: 10px; gap: 6px; }
  .pos-row { border-radius: 14px; box-shadow: none; }
  .lineup-dialog .dialog-actions { padding-bottom: max(12px, env(safe-area-inset-bottom)); }
}
@media (prefers-reduced-motion: no-preference) {
  .cand:has(input) .cand-body {
    transition: transform 180ms var(--release), background-color 140ms, border-color 140ms, box-shadow 140ms;
  }
  .cand:has(input):active .cand-body { transform: scale(.975); transition-duration: 90ms; }
  .cand-text strong, .cand-text .team-tag { transition: color 140ms; }
  .cand > input:checked + .cand-body .cand-check { animation: check-in 190ms var(--release); }
  @keyframes check-in { from { opacity: 0; transform: scale(.72); } to { opacity: 1; transform: scale(1); } }
}

/* 상단 팀 표식은 팀 코드 옆의 짧은 색 띠로 표시한다. */
.mu-teams .team-dot {
  width: 9px;
  height: 4px;
  border-radius: 1px;
  box-shadow: none;
}

/* 총괄 조정 · 인증 카드: 제목은 위, 단계는 아래로 붙여 오른쪽 입력 칸과 높이를 맞춘다 */
.login-steps { display: flex; flex-direction: column; }
.login-steps .steps { margin-top: auto; padding-top: 24px; }
/* 전수 점검 반영 (22:35) · 01~03 단계의 제목 줄 높이를 맞춘다 */
.step strong { display: flex; flex-wrap: wrap; align-items: center; column-gap: 6px; min-height: 30px; }
.step .copy { margin-left: 0; }
