/* 진단소 스트리머 모드 (clinic.css 위에 얹음) + OBS 오버레이 */
.bc-how { margin: 6px 0 14px; padding-left: 20px; line-height: 1.7; font-size: 14px; }
.bc-form { display: flex; flex-direction: column; gap: 12px; margin-bottom: 18px; }
.bc-form .seg { flex-wrap: wrap; }
.bc-form .seg button { font-size: 14px; min-width: 90px; }
.sub-h { margin: 18px 0 8px; font-size: 16px; }
.bc-mine { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.bc-mine a { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; padding: 10px 12px; background: #fff; color: var(--ink); text-decoration: none; box-shadow: inset 0 0 0 3px var(--ink); }
.bc-mine a span { grid-column: 1; font-size: 12px; color: var(--dim); }
.bc-mine a em { grid-row: 1 / 3; grid-column: 2; align-self: center; font-style: normal; font-size: 13px; padding: 4px 8px; background: var(--line); }
.bc-mine a em.on { background: var(--green); color: #fff; } .bc-mine a em.fin { background: var(--ink); color: var(--yellow); }
.bc-mine .empty, .bc-top .empty { color: var(--dim); font-size: 14px; padding: 8px 0; list-style: none; }
.bc-top li.empty { display: block; border-bottom: 0; }   /* 줄 칸(28px 1fr ...) 배치를 안 받게 — 글자가 세로로 쌓였음 */

/* 현황판 머리 */
.bc-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; margin: 4px 0 14px; flex-wrap: wrap; }
.bc-head small { color: var(--mint); }
.bc-head h1 { margin: 4px 0 6px; font-size: clamp(22px, 4.6vw, 34px); line-height: 1.2; word-break: keep-all; overflow-wrap: anywhere; }
.chip { display: inline-block; background: var(--ink); color: var(--yellow); padding: 3px 10px; font-size: 13px; box-shadow: 0 0 0 2px var(--yellow); }
.bc-clock { text-align: right; background: var(--ink); padding: 8px 14px; box-shadow: 0 0 0 3px var(--mint); min-width: 120px; }
.bc-clock small { display: block; font-size: 12px; color: var(--muted); }
.bc-clock b { font-size: 30px; color: var(--mint); font-variant-numeric: tabular-nums; }
.bc-clock b.hurry { color: var(--red); animation: blink 1s steps(2) infinite; }
.bc-clock b.closed { color: var(--orange); font-size: 22px; } .bc-clock b.fin { color: var(--yellow); font-size: 22px; }
@keyframes blink { 50% { opacity: .45; } }

.bc-milestone { text-align: center; font-size: clamp(20px, 4vw, 30px); font-weight: 700; color: var(--ink); background: var(--yellow); padding: 12px; margin-bottom: 12px; box-shadow: 0 0 0 4px var(--ink); }
.bc-milestone.go { animation: msIn .6s cubic-bezier(.2, 1.6, .4, 1); }
@keyframes msIn { from { transform: scale(.4); opacity: 0; } }

.bc-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.bc-big { background: var(--cream); color: var(--ink); padding: 14px 12px; box-shadow: 0 0 0 4px var(--ink), 0 6px 0 4px rgba(0,0,0,.3); display: flex; flex-direction: column; align-items: center; text-align: center; min-width: 0; }
.bc-big small { font-size: 13px; color: var(--dim); }
.bc-big b { font-size: clamp(30px, 5vw, 48px); line-height: 1.15; font-variant-numeric: tabular-nums; }
.bc-big em { font-style: normal; font-size: 14px; color: var(--dim); }
.bc-big .med { font-size: 12px; color: var(--dim); margin-top: 2px; }
.bc-big.hot { background: #fff1c9; } .bc-big.hot b { color: var(--red); }
.bc-big.vs b { font-size: clamp(24px, 4vw, 36px); }
.bc-big.bump b { animation: bump .5s; }
@keyframes bump { 30% { transform: scale(1.12); color: var(--green); } }
.bc-quip { text-align: center; font-size: 16px; padding: 10px; margin: 14px 0 0; background: var(--night2); box-shadow: 0 0 0 3px var(--ink); }
.bc-quip.low { color: #ff9d94; } .bc-quip.high { color: var(--yellow); }
.bc-play { margin: 14px 0 0; padding: 12px 14px; background: var(--night2); box-shadow: 0 0 0 3px var(--ink); }
.bc-play-h { display: flex; align-items: baseline; gap: 6px; margin-bottom: 8px; }
.bc-play-h b { font-size: 16px; color: var(--mint); } .bc-play-h em { font-style: normal; font-size: 26px; color: var(--yellow); font-variant-numeric: tabular-nums; } .bc-play-h small { color: var(--muted); }
.bc-play-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 6px; max-height: 260px; overflow-y: auto; }
.bc-play-list li { position: relative; display: flex; align-items: center; gap: 6px; padding: 7px 10px 9px; background: rgba(255,247,232,.08); font-size: 14px; min-width: 0; }
.bc-play-list li b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 400; }
.bc-play-list li em { font-style: normal; color: var(--yellow); white-space: nowrap; font-size: 13px; }
.bc-play-list li i { position: absolute; left: 0; bottom: 0; height: 3px; width: var(--p); background: var(--mint); transition: width .5s; }
.bc-play-list li.me { box-shadow: inset 0 0 0 2px var(--red); }
.bc-play-list li.empty, .bc-play-list li.more { color: var(--muted); background: none; grid-column: 1 / -1; }
.bc-viewer { margin: 14px 0 0; padding: 14px; background: #d9eee9; color: var(--ink); box-shadow: 0 0 0 4px var(--ink); display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.bc-viewer span { font-size: 14px; color: var(--dim); }

.bc-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 8px; }
.bc-cols h3, .bc-owner h3, .bc-battle h3, .bc-final h3 { margin: 0 0 10px; font-size: 17px; }
.bc-cols h3 + .bc-bars + h3, .bc-bars + h3 { margin-top: 16px; }
.bc-top { list-style: none; margin: 0; padding: 0; }
.bc-top li { display: grid; grid-template-columns: 28px 1fr auto auto; align-items: center; gap: 8px; padding: 6px 4px; border-bottom: 2px dashed var(--line); font-size: 14px; }
.bc-top li i { font-style: normal; font-weight: 700; text-align: center; }
.bc-top li b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bc-top li em { font-style: normal; color: #c0392b; font-weight: 700; white-space: nowrap; }
.bc-top li.m1 i { color: #c79a00; } .bc-top li.m2 i { color: #8a93a0; } .bc-top li.m3 i { color: #b8692c; }
.bc-top li.m1 { background: #fff1c9; }
.bc-bars .bar { display: grid; grid-template-columns: 7.5em 1fr 2.6em; align-items: center; gap: 8px; margin: 5px 0; font-size: 13px; }
.bc-bars .bar span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bc-bars .bar > div { position: relative; height: 14px; background: var(--line); box-shadow: inset 0 0 0 2px var(--ink); }
.bc-bars .bar i { display: block; height: 100%; background: var(--mint); transition: width .6s; }
.bc-bars.ages .bar i { background: var(--purple); }
.bc-bars .bar u { position: absolute; top: -3px; bottom: -3px; width: 3px; margin-left: -1px; background: var(--red); }
.bc-bars .bar b { text-align: right; font-variant-numeric: tabular-nums; }

.bc-join { display: grid; grid-template-columns: 180px 1fr; gap: 16px; align-items: start; }
.bc-qr { background: #fff; padding: 6px; box-shadow: 0 0 0 3px var(--ink); }
.bc-qr svg { display: block; width: 100%; height: auto; }
.bc-links { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.bc-links label { font-size: 13px; color: var(--dim); margin-top: 6px; }
.copy-row { display: flex; gap: 6px; min-width: 0; }
.copy-row input { flex: 1; min-width: 0; font-size: 14px; padding: 8px 10px; border: 3px solid var(--ink); background: #fff; color: var(--ink); font-family: inherit; }
.row-btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.row-btns [hidden] { display: none !important; }

.bc-final { text-align: center; }
.bc-final-big { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 16px; background: #fff1c9; box-shadow: inset 0 0 0 4px var(--ink); }
.bc-final-big b { font-size: clamp(48px, 10vw, 84px); color: var(--red); line-height: 1.1; }
.bc-final-big span { color: var(--dim); }
.bc-final-big.reveal b { animation: finalIn 1.2s cubic-bezier(.2, 1.4, .4, 1); }
@keyframes finalIn { 0% { transform: scale(3) rotate(-8deg); opacity: 0; } 60% { opacity: 1; } }
.bc-final .row-btns { justify-content: center; }

.bc-btable { width: 100%; border-collapse: collapse; margin-top: 10px; font-size: 14px; }
.bc-btable th, .bc-btable td { padding: 6px; border-bottom: 2px solid var(--line); text-align: right; }
.bc-btable th:nth-child(2), .bc-btable td:nth-child(2) { text-align: left; }
.bc-btable td small { display: block; color: var(--dim); font-size: 12px; }
.bc-btable td em { display: block; font-style: normal; color: var(--orange); font-size: 12px; }
.bc-btable tr.me { background: #fff1c9; }
.bc-battle .copy-row { margin-top: 6px; }

/* 큰 QR (방송 화면용) */
body.qr-only .topbar, body.qr-only .side-ad { display: none !important; }
.bc-qrbig { min-height: calc(100vh - 40px); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; text-align: center; }
.bc-qrbig h1 { margin: 0; font-size: clamp(22px, 4vw, 40px); }
.bc-qrbig #qrBig { width: min(70vh, 86vw); background: #fff; padding: 12px; box-shadow: 0 0 0 6px var(--ink), 0 0 0 12px var(--mint); }
.bc-qrbig #qrBig svg { display: block; width: 100%; height: auto; }
.bc-qrbig p { margin: 6px 0 0; font-size: 22px; color: var(--yellow); }
.bc-qrbig b { color: var(--mint); font-size: 16px; word-break: break-all; }

@media (max-width: 760px) {
  .bc-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .bc-cols { grid-template-columns: 1fr; }
  .bc-join { grid-template-columns: 1fr; }
  .bc-qr { width: 180px; margin: 0 auto; }
  .bc-btable th:nth-child(6), .bc-btable td:nth-child(6) { display: none; }
}
@media (max-width: 380px) { .bc-big b { font-size: 26px; } .bc-bars .bar { grid-template-columns: 6em 1fr 2.4em; } }

/* ---------- OBS 오버레이 (배경 투명) ---------- */
[hidden] { display: none !important; }
@font-face { font-family: Galmuri11; src: url("./assets/clinic/fonts/Galmuri11.woff2") format("woff2"); font-display: swap; }
body.bc-overlay { margin: 0; background: transparent !important; font-family: Galmuri11, "Malgun Gothic", system-ui, sans-serif; color: #fff7e8; overflow: hidden; }
.ov { position: relative; width: 600px; max-width: 100vw; padding: 14px 16px 12px; box-sizing: border-box; background: rgba(29,22,38,.88); box-shadow: 0 0 0 4px #231a2b, inset 0 0 0 2px #5ec8b0; }
.ov-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font-size: 18px; }
.ov-head b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ov-head span { color: #5ec8b0; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ov-head #oPlay { color: #f2c230; margin-left: auto; font-size: 16px; }
.ov-main { display: flex; align-items: stretch; gap: 12px; margin-top: 10px; }
.ov-big { flex: 1.3; background: #fff1c9; color: #231a2b; padding: 8px 10px; display: flex; flex-direction: column; align-items: center; justify-content: center; box-shadow: 0 0 0 3px #231a2b; }
.ov-big small { font-size: 14px; color: #7a6f86; }
.ov-big b { font-size: 64px; line-height: 1; color: #e8463c; font-variant-numeric: tabular-nums; }
.ov-big em { font-style: normal; font-size: 22px; margin-left: 4px; color: #7a6f86; }
.ov-side { flex: 1; display: flex; flex-direction: column; gap: 6px; }
.ov-side div { display: flex; justify-content: space-between; align-items: baseline; background: rgba(255,247,232,.1); padding: 5px 10px; }
.ov-side small { font-size: 14px; color: #a99fb5; }
.ov-side b { font-size: 24px; font-variant-numeric: tabular-nums; }
.ov-side b.win { color: #f2c230; } .ov-side b.lose { color: #ff9d94; }
.ov-qr { width: 104px; background: #fff; padding: 4px; align-self: center; }
.ov-qr svg { display: block; width: 100%; height: auto; }
.ov-top { list-style: none; margin: 10px 0 0; padding: 0; display: flex; gap: 8px; }
.ov-top:empty { display: none; }
.ov-top li { flex: 1; min-width: 0; display: flex; align-items: center; gap: 6px; background: rgba(255,247,232,.1); padding: 4px 8px; font-size: 15px; }
.ov-top i { font-style: normal; font-weight: 700; color: #f2c230; }
.ov-top b { flex: 1; font-weight: 400; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ov-top em { font-style: normal; color: #5ec8b0; }
.ov-pop { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); background: #f2c230; color: #231a2b; font-size: 30px; font-weight: 700; padding: 14px 22px; white-space: nowrap; box-shadow: 0 0 0 4px #231a2b; }
.ov-pop.go { animation: ovPop 5s forwards; }
@keyframes ovPop { 0% { transform: translate(-50%, -50%) scale(.3); opacity: 0; } 8% { transform: translate(-50%, -50%) scale(1.1); opacity: 1; } 12%, 85% { transform: translate(-50%, -50%) scale(1); opacity: 1; } 100% { opacity: 0; } }
.ov-err { background: rgba(232,70,60,.9); color: #fff; padding: 10px 14px; font-size: 16px; display: inline-block; }
