/* 플듀 베이스볼 (2026-11-19) — 대기실·패널·모달은 ttfe.css(tt-*) 공용, 여기는 시작 카드·경기장·조작·점수판 */
.bb-body { --bb-green: #2f9e44; --bb-gold: #ffd43b; }
/* 시작: 모드 카드 */
.bb-games { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; max-width: 900px; margin: 14px auto 0; }
.bb-game { font: inherit; color: #fff7e8; background: linear-gradient(180deg, #24304f, #172038); border: 3px solid #3a4870; border-radius: 16px; padding: 12px 10px; cursor: pointer; display: grid; gap: 4px; justify-items: center; text-align: center; transition: transform .12s, border-color .12s; }
.bb-game i { font-style: normal; font-size: 30px; line-height: 1; }
.bb-game b { font-family: "Black Han Sans", "Jua", sans-serif; font-size: 19px; font-weight: 400; }
.bb-game span { font-size: 12px; color: #c9d3ee; }
.bb-game:hover { transform: translateY(-2px); }
.bb-game.on { border-color: var(--bb-gold); box-shadow: 0 0 0 3px rgba(255, 212, 59, .25), 0 10px 24px rgba(0, 0, 0, .35); background: linear-gradient(180deg, #2c3c66, #1b2747); }
.bb-intro-opts { max-width: 900px; margin: 12px auto 0; padding: 12px 14px; }
.bb-intro-desc { margin: 8px 0 0; text-align: center; font-size: 14px; color: #fff7e8; opacity: .85; }
.bb-boss-pick { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; margin-top: 10px; }
.bb-boss-pick button { font: inherit; font-size: 12px; color: #fff; background: #1a1430; border: 2px solid #3a2f57; border-radius: 12px; padding: 6px 4px; cursor: pointer; display: grid; gap: 2px; justify-items: center; }
.bb-boss-pick button.on { border-color: var(--bb-gold); background: #2a2148; }
.bb-boss-pick canvas { width: 64px; height: 56px; }
.bb-boss-pick small { color: #ffd43b; font-size: 11px; }
.bb-seg4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin-bottom: 10px; }
.bb-seg4 button { font: inherit; font-size: 12.5px; font-weight: 800; color: var(--tt-ink); background: #1a1430; border: 2px solid var(--tt-line); border-radius: 10px; padding: 7px 2px; cursor: pointer; }
.bb-seg4 button.on { border-color: var(--tt-gold); background: #2a2148; }
.bb-seg4 button:disabled { cursor: default; }
/* 팀 명단 */
.bb-teams { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.bb-team { background: #1a1430; border-radius: 12px; padding: 8px; border-top: 4px solid var(--c); }
.bb-team h4 { margin: 0 0 6px; font-size: 14px; display: flex; justify-content: space-between; align-items: center; }
.bb-team .tt-roster { grid-template-columns: 1fr; }
/* 경기 화면 */
.bb-main { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 14px; align-items: start; margin-top: 10px; }
.bb-play { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.bb-stage { position: relative; width: 100%; aspect-ratio: 16 / 10; max-height: calc(100vh - 250px); border-radius: 16px; overflow: hidden; box-shadow: 0 0 0 3px #3d3166, 0 18px 44px rgba(0, 0, 0, .5); background: #0b1030; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.bb-canvas { width: 100%; height: 100%; display: block; cursor: crosshair; }
.bb-ov { position: absolute; pointer-events: none; z-index: 3; }
.bb-score { left: 10px; top: 10px; display: flex; gap: 6px; align-items: stretch; flex-wrap: wrap; max-width: calc(100% - 20px); }
.bb-sb { background: rgba(8, 12, 28, .78); border: 1px solid rgba(255, 255, 255, .15); border-radius: 10px; padding: 5px 9px; color: #fff; font-size: 13px; line-height: 1.25; backdrop-filter: blur(3px); }
.bb-sb small { display: block; font-size: 10px; color: #aab4d4; }
.bb-sb b { font-size: 18px; font-family: "Jua", sans-serif; font-weight: 400; }
.bb-sb.big b { font-size: 24px; color: var(--bb-gold); }
.bb-line { display: grid; grid-template-columns: auto auto; gap: 1px 8px; align-items: center; }
.bb-line .t { display: flex; align-items: center; gap: 5px; font-weight: 800; }
.bb-line .t i { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.bb-line .r { font-family: "Jua", sans-serif; font-size: 20px; text-align: right; }
.bb-line .bat::after { content: " ◀"; color: var(--bb-gold); font-size: 10px; }
.bb-count { display: grid; grid-template-columns: auto auto; gap: 2px 6px; font-size: 12px; font-weight: 800; align-items: center; }
.bb-count .dots { display: flex; gap: 3px; } .bb-count .dots i { width: 9px; height: 9px; border-radius: 50%; background: rgba(255, 255, 255, .18); display: inline-block; }
.bb-count .b i.on { background: #51cf66; } .bb-count .s i.on { background: #ffd43b; } .bb-count .o i.on { background: #ff6b6b; }
.bb-diamond { width: 46px; height: 46px; position: relative; }
.bb-diamond i { position: absolute; width: 13px; height: 13px; transform: rotate(45deg); background: rgba(255, 255, 255, .18); border: 1px solid rgba(255, 255, 255, .35); }
.bb-diamond i.on { background: var(--bb-gold); box-shadow: 0 0 8px rgba(255, 212, 59, .8); }
.bb-diamond .b1 { right: 3px; top: 16px; } .bb-diamond .b2 { left: 16px; top: 3px; } .bb-diamond .b3 { left: 3px; top: 16px; }
.bb-roles { left: 10px; bottom: 10px; display: flex; gap: 6px; flex-wrap: wrap; max-width: calc(100% - 20px); }
.bb-roles span { background: rgba(8, 12, 28, .72); color: #fff; border-radius: 999px; padding: 4px 10px; font-size: 12.5px; font-weight: 800; }
.bb-roles span.me { background: rgba(255, 212, 59, .9); color: #2a1a00; }
.bb-hint { left: 50%; top: 78px; transform: translateX(-50%); background: rgba(10, 6, 24, .82); border: 2px solid #ff6b6b; color: #fff; border-radius: 14px; padding: 7px 14px; text-align: center; font-size: 14px; max-width: 86%; }
.bb-hint b { display: block; font-size: 18px; color: #ffd43b; font-family: "Black Han Sans", sans-serif; font-weight: 400; }
.bb-hint.safe { border-color: #74c0fc; }
.bb-msg { left: 50%; top: 40%; transform: translate(-50%, -50%); text-align: center; color: #fff; text-shadow: 0 4px 0 rgba(0, 0, 0, .45), 0 0 18px rgba(0, 0, 0, .5); }
.bb-msg b { display: block; font-family: "Black Han Sans", sans-serif; font-weight: 400; font-size: clamp(30px, 7vw, 64px); letter-spacing: 1px; }
.bb-msg span { font-size: clamp(13px, 2.4vw, 18px); font-weight: 800; background: rgba(0, 0, 0, .45); border-radius: 999px; padding: 3px 12px; }
.bb-msg.hr b { color: #ffd43b; } .bb-msg.out b { color: #ff8787; } .bb-msg.hit b { color: #8ce99a; } .bb-msg.strike b { color: #ffe066; } .bb-msg.ball b { color: #a5d8ff; }
.bb-msg.show { animation: bbPop .5s cubic-bezier(.2, 1.6, .4, 1); }
@keyframes bbPop { from { transform: translate(-50%, -50%) scale(.4); opacity: 0; } to { transform: translate(-50%, -50%) scale(1); opacity: 1; } }
.bb-wait { left: 50%; bottom: 14%; transform: translateX(-50%); background: rgba(8, 12, 28, .8); color: #fff; border-radius: 12px; padding: 6px 14px; font-size: 14px; font-weight: 800; white-space: nowrap; }
.bb-boss { left: 50%; top: 6px; transform: translateX(-50%); width: min(460px, 62%); text-align: center; color: #fff; }
.bb-boss .nm { font-family: "Black Han Sans", sans-serif; font-size: 18px; text-shadow: 0 2px 0 #000; display: flex; justify-content: center; gap: 8px; align-items: baseline; }
.bb-boss .nm small { font-family: inherit; font-size: 12px; color: #ffd43b; }
.bb-bar { height: 14px; background: rgba(0, 0, 0, .55); border: 2px solid rgba(255, 255, 255, .5); border-radius: 8px; overflow: hidden; position: relative; margin-top: 3px; }
.bb-bar i { position: absolute; left: 0; top: 0; bottom: 0; background: linear-gradient(90deg, #ff4d6d, #ff922b); transition: width .25s; }
.bb-bar i.lag { background: rgba(255, 255, 255, .55); transition: width 1s .3s; }
.bb-bar em { position: absolute; top: -2px; bottom: -2px; width: 2px; background: #fff; }
.bb-bar.gauge i { background: linear-gradient(90deg, #339af0, #63e6be); }
.bb-bar.gauge.low i { background: linear-gradient(90deg, #ff6b6b, #ffa94d); }
.bb-bar.shield i { background: linear-gradient(90deg, #74c0fc, #d0ebff); }
.bb-boss .row { display: flex; gap: 6px; justify-content: center; font-size: 12px; font-weight: 800; margin-top: 3px; flex-wrap: wrap; }
.bb-boss .row span { background: rgba(0, 0, 0, .55); border-radius: 999px; padding: 2px 8px; }
.bb-gaugebox { right: 10px; bottom: 10px; width: min(200px, 42%); color: #fff; font-size: 12px; font-weight: 800; background: rgba(8, 12, 28, .7); border-radius: 10px; padding: 5px 8px; }
/* 조작 */
.bb-ctrl { display: grid; gap: 6px; }
.bb-bat, .bb-prow { display: flex; align-items: center; gap: 8px; }
.bb-tip { flex: 1; text-align: center; color: var(--tt-mut); font-size: 13px; }
.bb-pw { font: inherit; font-weight: 900; color: #ffd8a8; background: #2a1d10; border: 2px solid #8a5a20; border-radius: 14px; padding: 12px 14px; cursor: pointer; touch-action: manipulation; }
.bb-pw.on { background: linear-gradient(180deg, #ffb347, #f76707); color: #2a1200; border-color: #ffd8a8; box-shadow: 0 0 16px rgba(255, 146, 43, .5); }
.bb-swing { font: inherit; font-family: "Black Han Sans", sans-serif; font-size: 22px; color: #fff; background: linear-gradient(180deg, #4dabf7, #1c7ed6); border: 3px solid #a5d8ff; border-radius: 16px; padding: 10px 30px; cursor: pointer; min-width: 130px; touch-action: manipulation; box-shadow: 0 6px 0 #1864ab; }
.bb-swing:active { transform: translateY(3px); box-shadow: 0 3px 0 #1864ab; }
.bb-swing.gold { background: linear-gradient(180deg, #ffd85a, #f2a91f); color: #2a1a00; border-color: #ffe08a; box-shadow: 0 6px 0 #b07a0a; }
.bb-swing:disabled { opacity: .45; }
.bb-pitch { display: grid; gap: 6px; }
.bb-ptypes { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.bb-ptypes button { font: inherit; font-size: 12.5px; font-weight: 800; color: #fff; background: #1a1430; border: 2px solid var(--c, #3a2f57); border-radius: 10px; padding: 6px 2px; cursor: pointer; display: grid; gap: 1px; touch-action: manipulation; }
.bb-ptypes button small { font-size: 10px; color: var(--tt-mut); font-weight: 600; }
.bb-ptypes button.on { background: var(--c); color: #111; } .bb-ptypes button.on small { color: #222; }
.bb-pspd { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 800; }
.bb-pspd input { width: 120px; }
.bb-pdim { margin: 0; }
.bb-ptimer { height: 5px; background: rgba(255, 255, 255, .1); border-radius: 3px; overflow: hidden; } .bb-ptimer i { display: block; height: 100%; background: var(--tt-gold); width: 100%; }
.bb-augbar { min-height: 0; }
/* 옆 패널 */
.bb-side { display: grid; gap: 10px; }
.bb-rank { list-style: none; margin: 0; padding: 0; display: grid; gap: 3px; max-height: 360px; overflow: auto; }
.bb-rank li { display: grid; grid-template-columns: 24px 1fr auto; gap: 6px; align-items: center; background: #1a1430; border-radius: 9px; padding: 5px 8px; font-size: 13px; cursor: pointer; }
.bb-rank li.me { outline: 2px solid var(--tt-gold); } .bb-rank li.done { opacity: .55; } .bb-rank li.focus { background: #2a2148; }
.bb-rank .pl { font-weight: 900; color: var(--tt-gold); text-align: center; }
.bb-rank .nm { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bb-rank .nm small { color: var(--tt-mut); margin-left: 4px; font-size: 11px; }
.bb-rank .sc { font-family: "Jua", sans-serif; font-size: 16px; }
.bb-box { width: 100%; border-collapse: collapse; font-size: 12px; } .bb-box th, .bb-box td { padding: 3px 4px; text-align: center; border-bottom: 1px solid #2c2448; } .bb-box td:first-child, .bb-box th:first-child { text-align: left; }
.bb-box tr.bat td { color: var(--tt-gold); font-weight: 800; } .bb-box tr.pit td { color: #74c0fc; font-weight: 800; }
.bb-linescore { width: 100%; border-collapse: collapse; font-size: 12px; margin-bottom: 8px; } .bb-linescore td, .bb-linescore th { border: 1px solid #2c2448; padding: 3px; text-align: center; } .bb-linescore td.r { font-weight: 900; color: var(--tt-gold); }
/* 결과 */
.bb-res-sub { text-align: center; color: #d9d0ef; margin: -4px 0 8px; font-weight: 800; }
/* 방송 화면 */
body.tt-cast .bb-main { grid-template-columns: minmax(0, 1fr) minmax(360px, 40%); }
body.tt-cast .bb-ctrl, body.tt-cast #gKeys { display: none; }
body.tt-cast .bb-rank { max-height: 70vh; } body.tt-cast .bb-rank li { font-size: 16px; padding: 7px 10px; }
/* 반응형 */
@media (max-width: 980px) { .bb-main, body.tt-cast .bb-main { grid-template-columns: 1fr; } .bb-stage { max-height: none; } }
@media (max-width: 760px) { .bb-games { grid-template-columns: repeat(2, 1fr); } .bb-boss-pick { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 640px) {
  #ttApp { padding: 8px 8px 20px; }
  .bb-stage { aspect-ratio: 4 / 5; max-height: calc(100svh - 230px); border-radius: 12px; }
  .bb-swing { font-size: 20px; padding: 12px 18px; min-width: 110px; }
  .bb-pw { padding: 12px 10px; font-size: 13px; }
  .bb-tip { font-size: 12px; }
  .bb-ptypes { grid-template-columns: repeat(4, 1fr); }
  .bb-pspd input { width: 90px; }
  .bb-prow { flex-wrap: wrap; } .bb-prow .bb-tip { order: 5; flex-basis: 100%; }
  .bb-sb { padding: 3px 7px; font-size: 12px; } .bb-sb b { font-size: 15px; } .bb-sb.big b { font-size: 19px; }
  .bb-boss { width: 90%; } .bb-boss .nm { font-size: 15px; }
  .bb-seg4 { grid-template-columns: repeat(2, 1fr); }
  .bb-teams { grid-template-columns: 1fr; }
  #gKeys { display: none; }
}
@media (max-height: 520px) and (orientation: landscape) {
  .topbar { display: none; }
  .bb-main { grid-template-columns: minmax(0, 1fr) 240px; }
  .bb-stage { aspect-ratio: auto; height: calc(100svh - 120px); max-height: none; }
  .tt-hud { margin-bottom: 4px; }
  .bb-swing { padding: 6px 16px; font-size: 18px; } .bb-pw { padding: 6px 10px; }
  #gKeys, .tt-feed-panel { display: none; }
}
/* 증강 고르기 창: 흐림(backdrop-filter)은 뒤 캔버스가 매 프레임 바뀌면 비싸서 끔 (공용 aug-kit.css는 그대로) */
.bb-body .ak-pick { backdrop-filter: none; -webkit-backdrop-filter: none; background: rgba(6, 5, 14, .9); }
