/* 진단소 단체 검사(멀티) 전용 — clinic.css 위에 얹음 */
.lb-status { text-align: center; padding: 10px; background: var(--night2); box-shadow: 0 0 0 3px var(--ink); margin-bottom: 12px; }
.lb-status.err { background: #5a1f24; }
.lb-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 16px; align-items: start; }
.invite { background: #eef7f3; padding: 12px; box-shadow: inset 0 0 0 3px var(--mint); }
.invite small { color: var(--dim); }
.code-row { display: flex; align-items: center; gap: 10px; margin: 4px 0 10px; }
.code { font-size: 34px; letter-spacing: .18em; }
.code.masked { filter: blur(8px); user-select: none; }
.row-btns.tight { margin-top: 0; justify-content: flex-start; }
.row-btns.tight .pbtn { flex: 1 1 auto; }
.host-opts { margin: 14px 0 0; display: flex; flex-direction: column; gap: 10px; }
.host-opts.ro .seg button { pointer-events: none; opacity: .75; }
.host-opts .seg button { padding: 8px 4px; font-size: 14px; }
.host-opts .seg button:disabled { opacity: .35; }
.join-box { margin-top: 14px; display: flex; flex-direction: column; gap: 10px; }
.join-box p { margin: 0; font-size: 14px; }
.code-in { display: flex; gap: 8px; }
.code-in input { flex: 1; min-width: 0; font-size: 22px; letter-spacing: .15em; padding: 8px 10px; border: 3px solid var(--ink); }
#btnReady.on { --img: url("./assets/clinic/ui/grey.png"); --img-p: url("./assets/clinic/ui/grey_pressed.png"); --tc: var(--ink); }
.lb-players { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.lb-players li { display: grid; grid-template-columns: 26px 54px 1fr auto; grid-template-rows: auto auto; align-items: center; gap: 2px 10px; padding: 6px 10px; background: #fff; border: 3px solid var(--line); min-height: 64px; }
.lb-players li.empty { grid-template-columns: 26px 1fr; color: var(--muted); border-style: dashed; background: transparent; min-height: 48px; }
.lb-players li.empty em { font-style: normal; font-size: 13px; }
.lb-players li.ready { border-color: var(--green); }
.lb-players li.me { box-shadow: 0 0 0 2px var(--yellow); }
.lb-players li.off { opacity: .55; }
.lb-players .slot { color: var(--dim); text-align: center; grid-row: span 2; }
.lb-players .av-w { grid-row: span 2; }
.lb-players .pi { display: flex; flex-direction: column; min-width: 0; grid-row: span 2; }
.lb-players .pi b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lb-players .pi small { color: var(--dim); font-size: 12px; }
.lb-players .st { font-size: 13px; text-align: right; }
.lb-players li.ready .st { color: var(--green); }
.lb-players .ha { grid-column: 4; display: flex; gap: 4px; }
.lb-players .ha .pbtn { min-height: 28px; font-size: 11px; padding: 0 4px; border-width: 8px; border-image-width: 8px; }
.av.jump-s { animation: jump .6s ease-in-out infinite alternate; }
.my-prof summary { cursor: pointer; font-size: 17px; font-weight: 700; list-style: none; }
.my-prof summary::-webkit-details-marker { display: none; }
.my-prof summary small { font-weight: 400; color: var(--dim); margin-left: 8px; font-size: 13px; }
.my-prof[open] summary { margin-bottom: 14px; }

/* 검사 중 */
#scPlay.on { display: flex; flex-direction: column; height: 100vh; height: 100dvh; padding: var(--ad-top, 0px) var(--ad-right, 0px) var(--ad-bottom, 0px) var(--ad-left, 0px); box-sizing: border-box; }   /* 자동 광고(위·아래·옆 고정) 자리만큼 비켜서 배치 */
.play-wrap { flex: 1; min-height: 0; display: flex; }
.play-wrap .room { flex: 1; }
.side-status { width: 220px; flex: 0 0 auto; background: var(--night2); border-left: 3px solid var(--ink); overflow-y: auto; padding: 10px; }
.side-status h4 { margin: 0 0 8px; font-size: 14px; } .side-status h4 small { color: var(--muted); font-weight: 400; }
.side-status ol, .wait-list ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.side-status li, .wait-list li { display: grid; grid-template-columns: 36px 1fr auto; gap: 6px; align-items: center; background: rgba(255,255,255,.05); padding: 4px 6px; }
.side-status li.me, .wait-list li.me { box-shadow: inset 0 0 0 2px var(--yellow); }
.side-status li.off, .wait-list li.off { opacity: .45; }
.side-status li span, .wait-list li span { display: flex; flex-direction: column; min-width: 0; }
.side-status b, .wait-list b { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-status small, .wait-list small { font-size: 11px; color: var(--muted); }
.side-status i, .wait-list i { display: block; height: 4px; background: rgba(0,0,0,.4); position: relative; margin-top: 2px; }
.side-status i::after, .wait-list i::after { content: ""; position: absolute; inset: 0; width: var(--w); background: var(--mint); transition: width .5s; }
.side-status li.done i::after { background: var(--green); }
.side-status em, .wait-list em { font-style: normal; color: var(--yellow); font-size: 13px; }
#btnSideToggle { display: none; }
.wait-card { background: var(--cream); color: var(--ink); width: min(420px, 100%); padding: 20px; text-align: center; box-shadow: 0 0 0 4px var(--ink); line-height: 1.6; }
.wait-card .big-sc { font-size: 40px; }
.wait-list { display: none; margin-top: 12px; text-align: left; }
.wait-list li { background: #f1e9da; } .wait-list small { color: var(--dim); }
.rr-card { background: var(--cream); color: var(--ink); width: min(520px, 100%); max-height: 100%; overflow: auto; padding: 18px; box-shadow: 0 0 0 4px var(--ink); animation: cdPop .4s; }
.rr-card h3 { margin: 2px 0 10px; font-size: 24px; }
.rr-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 5px; }
.rr-list li { display: grid; grid-template-columns: 30px 36px 1fr auto; grid-template-rows: auto auto; gap: 0 8px; align-items: center; padding: 5px 8px; background: #fff; border: 2px solid var(--line); animation: rrIn .4s backwards; animation-delay: var(--d); }
.rr-list li.me { border-color: var(--ink); box-shadow: 0 0 0 2px var(--yellow); }
.rr-list li.mvp { background: #fff1c9; }
.rr-list .rk { grid-row: span 2; font-size: 20px; font-weight: 700; text-align: center; }
.rr-list canvas { grid-row: span 2; }
.rr-list small { grid-column: 3; color: var(--dim); font-size: 12px; }
.rr-list em { grid-row: 1 / span 2; grid-column: 4; font-style: normal; font-size: 22px; font-weight: 700; }
@keyframes rrIn { from { opacity: 0; transform: translateX(-20px); } }
.rr-next { margin: 12px 0 0; font-size: 14px; color: var(--dim); }

/* 최종 발표 */
.ceremony { position: relative; height: clamp(180px, 30vw, 300px); margin: -16px -16px 0; border-bottom: 4px solid var(--ink); }
.cer-cv { width: 100%; height: 100%; display: block; }
.cer-title { position: absolute; top: 12px; left: 0; right: 0; text-align: center; display: flex; flex-direction: column; text-shadow: 0 3px 0 var(--ink), 3px 0 0 var(--ink), -3px 0 0 var(--ink); }
.cer-title small { color: var(--mint); } .cer-title b { font-size: clamp(24px, 5vw, 40px); color: var(--yellow); } .cer-title span { font-size: 14px; }
.cer-list { list-style: none; margin: 16px 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.cer { display: grid; grid-template-columns: 54px 78px 1fr auto; gap: 10px; align-items: center; padding: 10px 14px; background: var(--cream); color: var(--ink); box-shadow: 0 0 0 3px var(--ink); animation: cerIn .5s cubic-bezier(.2,1.4,.4,1); }
.cer.link { cursor: pointer; }
.cer.me { box-shadow: 0 0 0 3px var(--ink), 0 0 0 7px var(--mint); }
.cer.r1 { background: #fff1c9; } .cer.r2 { background: #eef0f5; } .cer.r3 { background: #f6e3d2; }
.cer.winner { animation: cerIn .5s cubic-bezier(.2,1.4,.4,1), glow 1.2s 3; }
@keyframes cerIn { from { opacity: 0; transform: scale(.85) translateY(-14px); } }
@keyframes glow { 50% { box-shadow: 0 0 0 3px var(--ink), 0 0 0 12px rgba(242,194,48,.6); } }
.cer .rk { font-size: 32px; font-weight: 700; text-align: center; } .cer .rk small { font-size: 13px; }
.cer.r1 .rk { color: #b8860b; }
.cer .pi { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cer .pi b { font-size: 18px; } .cer .pi small { color: var(--dim); font-size: 12px; }
.cer .pi em { font-style: normal; color: #c0392b; font-size: 15px; }
.cer .nums { text-align: right; display: flex; flex-direction: column; }
.cer .nums > b { font-size: 28px; } .cer .nums small { font-size: 12px; }
.cer .phys { font-style: normal; font-size: 13px; } .cer .phys b { color: #c0392b; font-size: 18px; }
.cer .good { color: var(--green); } .cer .bad { color: #c0392b; }
.awards { background: var(--night2); padding: 16px; box-shadow: 0 0 0 4px var(--ink); margin: 18px 0; animation: scIn .4s; }
.awards h3 { margin: 0 0 10px; }
.mvps { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 6px; }
.mvps div { background: rgba(255,255,255,.06); padding: 6px 8px; display: flex; flex-direction: column; }
.mvps small { color: var(--muted); font-size: 11px; } .mvps em { font-style: normal; color: var(--yellow); font-size: 12px; }
.spc { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 8px; margin-top: 12px; }
.sp { background: var(--cream); color: var(--ink); padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; box-shadow: 0 0 0 3px var(--ink); }
.sp small { color: var(--dim); } .sp b { font-size: 17px; } .sp span { font-size: 13px; }
.sp.last { background: #efe6fb; } .sp.drama { background: #fff1c9; }
.group-cert { margin: 18px auto; max-width: 980px; }
.gc-sum { text-align: center; margin: -6px 0 14px; color: var(--dim); }
.gc-table-w { overflow-x: auto; }
.gc-table { width: 100%; border-collapse: collapse; font-size: 13px; white-space: nowrap; }
.gc-table th, .gc-table td { border: 2px solid var(--ink); padding: 5px 6px; text-align: center; }
.gc-table th { background: #efe4cf; font-weight: 400; font-size: 11px; }
.gc-table td.mvp { background: #fff1c9; font-weight: 700; }
.gc-table td.dx { text-align: left; color: #c0392b; }
.gc-table tr.me td { background: #e8f6f1; }
.sec-h { max-width: 820px; margin: 26px auto 10px; }
.bcast { position: fixed; inset: 0; z-index: 400; background: #000; display: flex; align-items: center; justify-content: center; }
.bc-inner { width: 100vw; height: 100vh; display: flex; align-items: center; justify-content: center; }
.bc-inner canvas { max-width: 100%; max-height: 100%; aspect-ratio: 16 / 9; image-rendering: auto; }
#btnBcClose { position: absolute; top: 12px; right: 12px; }

@media (max-width: 860px) {
  .lb-grid { grid-template-columns: 1fr; }
  .side-status { display: none; }
  body.side-open .side-status { display: block; position: absolute; right: 0; top: 46px; bottom: 0; z-index: 8; }
  #btnSideToggle { display: inline-block; }
  .wait-list { display: block; }
  .cer { grid-template-columns: 40px 56px 1fr; }
  .cer .av-w canvas { width: 54px; height: 54px; }
  .cer .nums { grid-column: 2 / -1; flex-direction: row; gap: 10px; align-items: baseline; justify-content: flex-end; }
  .cer .rk { font-size: 24px; }
}
.lb-players .av-w { position: relative; }
.lb-photo { position: absolute; right: -4px; bottom: -2px; width: 22px; height: 22px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 2px var(--ink); background: #fff; }
