/* 물음표 배틀 — 다크 한 벌(APP-GUIDE 2-3). 색마다 뜻이 하나다.
 *   주황 = 물음표(진짜 질문·판정 불가) · 금 = 좋은 것(점수·1등) · 빨강 = 틀림·위험 · 청록 = 누리(AI)
 * ⚠️짧은 클래스 이름은 반드시 부딪힌다(APP-GUIDE 2-6-3) — 일반 이름에는 qb- 를 붙인다.
 */
:root {
  --bg: #15161d; --bg2: #1d1f29; --card: #242735; --line: #333748;
  --ink: #eceaf2; --ink2: #a9a8b8; --ink3: #6f7084;
  --q: #ee6a2c; --q2: #ffb38a; --gold: #e9b949; --bad: #e0565b; --ok: #4fc08d; --nuri: #3fb8c9;
  --r: 14px;
  --safe-b: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--ink); }
body { font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Pretendard", "Noto Sans KR", sans-serif;
  font-size: 15px; line-height: 1.5; word-break: keep-all; overflow-wrap: anywhere; -webkit-text-size-adjust: 100%; }
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; touch-action: manipulation; }
input, textarea { font: inherit; color: var(--ink); font-size: 16px; }   /* 16px 아래면 아이폰이 확대한다 */
#app { max-width: 520px; margin: 0 auto; min-height: 100%; display: flex; flex-direction: column; }
.logo, .logo b { font-family: "Do Hyeon", sans-serif; letter-spacing: .5px; font-weight: 400; }   /* 굵기가 하나뿐인 글꼴 — <b> 가짜 굵기가 글자를 뭉갠다 */
.dim { color: var(--ink2); } .dim3 { color: var(--ink3); }
.qb-hide { display: none !important; }

/* 단추 — 눌림은 색으로만(움직이면 탭이 흘려진다, APP-GUIDE 2-5). 최소 52px. */
.qb-btn { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 0 18px;
  border-radius: var(--r); background: var(--card); font-weight: 700; font-size: 16px; width: 100%; }
.qb-btn:active { background: #2e3243; }
.qb-btn.main { background: var(--q); color: #fff; font-size: 18px; }
.qb-btn.main:active { background: #d55a20; }
.qb-btn.ghost { background: transparent; border: 1px solid var(--line); }
.qb-btn[disabled] { opacity: .55; }
.qb-link { color: var(--ink2); font-size: 13px; padding: 10px 6px; text-decoration: underline; text-underline-offset: 3px; }

/* ── 첫 화면 ── */
.intro { padding: 28px 20px calc(24px + var(--safe-b)); display: flex; flex-direction: column; gap: 18px; min-height: 100vh; }
.intro .hero { text-align: center; padding: 24px 0 8px; }
.intro .hero .big { font-size: 46px; line-height: 1.05; }
.intro .hero .big b { color: var(--q); }
.intro .hero p { margin: 12px 0 0; color: var(--ink2); }
.intro .rule { background: var(--bg2); border-radius: var(--r); padding: 16px; font-size: 14px; }
.intro .rule h3 { margin: 0 0 8px; font-size: 15px; }
.intro .rule ul { margin: 0; padding-left: 18px; color: var(--ink2); }
.intro .rule li { margin: 4px 0; }
.faces { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.face-pick { position: relative; border-radius: 50%; overflow: hidden; border: 3px solid transparent; padding: 0; width: 100%; padding-top: 100%; }
.face-pick img { position: absolute; left: 0; top: 0; width: 100%; height: 100%; object-fit: cover; }
.face-pick.on { border-color: var(--q); }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 13px; color: var(--ink2); }
.field input { background: var(--bg2); border: 1px solid var(--line); border-radius: 12px; padding: 14px; outline: none; }
.field input:focus { border-color: var(--q); }
.grow { flex: 1; }

/* ── 얼굴 동그라미 ── */
.av { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; background: var(--card); flex: none; }
.av.s { width: 26px; height: 26px; }
.av.l { width: 64px; height: 64px; }
.botmark { font-size: 10px; color: var(--nuri); border: 1px solid var(--nuri); border-radius: 6px; padding: 0 4px; margin-left: 4px; vertical-align: 1px; }

/* ── 대기실 ── */
.top { display: flex; align-items: center; gap: 10px; padding: 12px 16px; position: sticky; top: 0; background: var(--bg); z-index: 5; }
.top .logo { font-size: 24px; }
.top .logo b { color: var(--q); }
.top .sp { flex: 1; }
.iconbtn { width: 44px; height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 20px; background: var(--bg2); }
.online { font-size: 12px; color: var(--ink2); display: flex; align-items: center; gap: 6px; }
.online i { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); display: inline-block; }
.tabs { display: flex; gap: 6px; padding: 0 16px 10px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { flex: none; padding: 9px 14px; border-radius: 999px; background: var(--bg2); color: var(--ink2); font-size: 14px; font-weight: 600; min-height: 40px; }
.tab.on { background: var(--ink); color: var(--bg); }
.pane { flex: 1; padding: 0 16px; overflow-y: auto; }
.bottom { position: sticky; bottom: 0; background: linear-gradient(transparent, var(--bg) 22%); padding: 14px 16px calc(14px + var(--safe-b)); display: flex; flex-direction: column; gap: 10px; transform: translateZ(0); z-index: 5; }
.welcome { background: var(--bg2); border-radius: var(--r); padding: 16px; margin-bottom: 12px; display: flex; gap: 12px; align-items: center; }
.welcome b { color: var(--q); }
.howto { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 14px; }
.howto div { background: var(--bg2); border-radius: 12px; padding: 12px; font-size: 13px; color: var(--ink2); }
.howto div b { display: block; color: var(--ink); font-size: 14px; margin-bottom: 2px; }
.howto div:nth-child(2) b { color: var(--q); }

/* 채팅 */
.chatlog { display: flex; flex-direction: column; gap: 6px; padding: 4px 0 8px; }
.cl { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; }
.cl .who { font-weight: 700; color: var(--ink2); white-space: nowrap; }
.cl .who.me { color: var(--q2); }
.cl .msg { flex: 1; }
.cl.sys { color: var(--ink3); font-size: 12.5px; justify-content: center; }
.cl button.who { padding: 0; text-align: left; }
.chatin { display: flex; gap: 8px; }
.chatin input { flex: 1; background: var(--bg2); border: 1px solid var(--line); border-radius: 12px; padding: 0 14px; min-height: 46px; outline: none; }
.chatin button { min-width: 64px; min-height: 46px; border-radius: 12px; background: var(--card); font-weight: 700; }

/* 명전·순위 목록 */
.list { display: flex; flex-direction: column; gap: 8px; padding-bottom: 12px; }
.row { background: var(--bg2); border-radius: 12px; padding: 12px; display: flex; gap: 10px; align-items: center; }
.row .rk { width: 26px; text-align: center; font-weight: 800; color: var(--ink2); flex: none; }
.row .rk.g { color: var(--gold); }
.row .mid { flex: 1; min-width: 0; }
.row .mid .t { font-weight: 600; }
.row .mid .s { font-size: 12.5px; color: var(--ink2); }
.row .pt { font-weight: 800; color: var(--gold); flex: none; }
.hallq { background: var(--bg2); border-radius: 12px; padding: 14px; }
.hallq .qt { font-size: 16px; font-weight: 700; margin: 6px 0; }
.hallq.open { border: 1px solid rgba(238,106,44,.55); }
.hallq .meta { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--ink2); }
.hallq .meta .sp { flex: 1; }
.empty { text-align: center; color: var(--ink3); padding: 36px 10px; font-size: 14px; }
.verd { display: inline-block; font-size: 11.5px; font-weight: 700; padding: 1px 7px; border-radius: 6px; }
.verd.open { background: var(--q); color: #fff; }
.verd.partial { background: #3a3f55; color: var(--ink); }
.verd.answered { background: #2b2e3c; color: var(--ink3); }
.verd.invalid { background: #3a2427; color: var(--bad); }

/* ── 방 ── */
.room { display: flex; flex-direction: column; min-height: 100vh; }
.rtop { display: flex; align-items: center; gap: 8px; padding: 10px 14px 6px; }
.rtop .ph { font-weight: 700; font-size: 14px; }
.rtop .sp { flex: 1; }
.timer { height: 5px; background: var(--bg2); margin: 0 14px; border-radius: 3px; overflow: hidden; }
.timer i { display: block; height: 100%; background: var(--gold); width: 100%; transform-origin: left; }
.seats { display: flex; gap: 6px; padding: 10px 14px 4px; overflow-x: auto; scrollbar-width: none; }
.seat { flex: 1 0 52px; max-width: 76px; display: flex; flex-direction: column; align-items: center; gap: 2px; position: relative; }
.seat .nm { font-size: 11px; max-width: 64px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ink2); }
.seat.me .nm { color: var(--q2); }
.seat .sc { font-size: 12px; font-weight: 800; color: var(--gold); }
.seat .tick { position: absolute; top: -2px; right: 6px; width: 18px; height: 18px; border-radius: 50%; background: var(--ok); color: #fff; font-size: 11px; display: flex; align-items: center; justify-content: center; }
.seat.off { opacity: .4; }
.seat .av { width: 44px; height: 44px; border: 2px solid transparent; }
.seat.right .av { border-color: var(--ok); }
.seat.wrong .av { border-color: var(--bad); }
.seat .pts { position: absolute; top: 4px; left: 50%; transform: translateX(-50%); font-weight: 900; color: var(--gold); font-size: 14px; animation: rise 1.2s ease-out forwards; pointer-events: none; text-shadow: 0 1px 3px #000; }
@keyframes rise { from { opacity: 1; margin-top: 0; } to { opacity: 0; margin-top: -28px; } }
.stage { flex: 1; padding: 10px 14px; display: flex; flex-direction: column; gap: 12px; }

/* 대기 */
.waitbox { text-align: center; padding: 28px 10px; }
.waitbox .n { font-size: 54px; font-family: "Do Hyeon", sans-serif; color: var(--q); line-height: 1; }

/* 1라운드 */
.qcard { background: var(--card); border-radius: 18px; padding: 18px 16px; }
.qcard .cat { font-size: 12px; color: var(--ink2); display: flex; gap: 8px; align-items: center; }
.qcard .cat b { color: var(--ink); }
.qcard .text { font-size: 20px; font-weight: 800; line-height: 1.4; margin-top: 6px; }
.choices { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.choices.ox { grid-template-columns: 1fr 1fr; }
.choice { min-height: 64px; border-radius: 14px; background: var(--bg2); border: 2px solid var(--line); padding: 10px; font-weight: 700; font-size: 16px; line-height: 1.3; }
.choices.ox .choice { min-height: 96px; font-size: 44px; font-family: "Do Hyeon", sans-serif; }
.choice.mine { border-color: var(--ink); background: #2c3042; }
.choice.ans { border-color: var(--ok); background: rgba(79,192,141,.16); }
.choice.no { border-color: var(--bad); background: rgba(224,86,91,.12); }
.choice[disabled] { cursor: default; }
.nuribar { display: flex; align-items: center; gap: 10px; background: var(--bg2); border-radius: 12px; padding: 10px 12px; font-size: 13px; }
.nuribar .bot { width: 30px; height: 30px; border-radius: 50%; background: var(--nuri); color: #062227; display: flex; align-items: center; justify-content: center; font-weight: 900; flex: none; }
.nuribar .gauge { flex: 1; height: 6px; background: #2b2e3c; border-radius: 3px; overflow: hidden; }
.nuribar .gauge i { display: block; height: 100%; width: 0; background: var(--nuri); }
.nuribar.done { color: var(--nuri); font-weight: 700; }
.ready { text-align: center; padding: 40px 0; }
.ready .n { font-family: "Do Hyeon", sans-serif; font-size: 40px; }
.ready .c { color: var(--ink2); }

/* 2라운드 */
.turn { text-align: center; padding: 18px 6px; }
.turn .l1 { color: var(--ink2); }
.turn .l2 { font-family: "Do Hyeon", sans-serif; font-size: 34px; line-height: 1.2; margin: 6px 0 16px; }
.turn .l2 b { color: var(--q); }
.topic { background: linear-gradient(135deg, #2b1f1a, #24212e); border: 1px solid rgba(238,106,44,.45); border-radius: 18px; padding: 18px; text-align: center; }
.topic .k { font-size: 12px; color: var(--q2); letter-spacing: 1px; }
.topic .t { font-size: 24px; font-weight: 900; margin: 4px 0; }
.topic .h { color: var(--ink2); font-size: 14px; }
.qwrite textarea { width: 100%; min-height: 110px; resize: none; background: var(--bg2); border: 1px solid var(--line); border-radius: 14px; padding: 14px; outline: none; line-height: 1.5; }
.qwrite textarea:focus { border-color: var(--q); }
.qwrite .cnt { text-align: right; font-size: 12px; color: var(--ink3); margin-top: 4px; }
.tip { font-size: 13px; color: var(--ink2); background: var(--bg2); border-radius: 12px; padding: 12px; }
.tip b { color: var(--q2); }
.myq { background: var(--bg2); border-radius: 14px; padding: 14px; }
.myq .k { font-size: 12px; color: var(--ink2); }
.myq .t { font-weight: 700; font-size: 17px; margin-top: 4px; }

/* 누리 판정 화면 — 웹툰의 prog ui */
.judge { background: #0d1a1d; border: 1px solid rgba(63,184,201,.4); border-radius: 18px; padding: 16px; font-family: ui-monospace, "SF Mono", Menlo, monospace; }
.judge .hd { display: flex; align-items: center; gap: 8px; color: var(--nuri); font-size: 12px; letter-spacing: 1px; }
.judge .hd .sp { flex: 1; }
.judge .who { display: flex; align-items: center; gap: 8px; margin: 12px 0 6px; font-family: -apple-system, "Apple SD Gothic Neo", sans-serif; font-size: 13px; color: var(--ink2); }
.judge .qq { font-family: -apple-system, "Apple SD Gothic Neo", sans-serif; font-size: 19px; font-weight: 800; color: var(--ink); line-height: 1.4; }
.judge .simbar { margin: 14px 0 4px; height: 8px; background: #183034; border-radius: 4px; overflow: hidden; }
.judge .simbar i { display: block; height: 100%; background: var(--nuri); width: 0; transition: width 1s ease-out; }
.judge .simtx { font-size: 12.5px; color: var(--nuri); }
.judge .vd { margin-top: 12px; font-size: 18px; font-weight: 800; }
.judge .vd.answered { color: var(--ink2); }
.judge .vd.partial { color: var(--ink); }
.judge .vd.open { color: var(--q); font-size: 26px; animation: pop .5s ease-out; }
.judge .vd.invalid { color: var(--bad); }
@keyframes pop { 0% { opacity: 0; letter-spacing: 8px; } 100% { opacity: 1; letter-spacing: 0; } }
.judge .ans { margin-top: 8px; font-family: -apple-system, "Apple SD Gothic Neo", sans-serif; font-size: 14px; color: var(--ink2); }
.judge .near { margin-top: 6px; font-size: 12px; color: var(--ink3); font-family: -apple-system, sans-serif; }
.judge.isopen { border-color: var(--q); box-shadow: 0 0 0 3px rgba(238,106,44,.18); }
.thinking { text-align: center; padding: 36px 0; color: var(--nuri); font-family: ui-monospace, Menlo, monospace; }
.thinking .dots i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--nuri); margin: 0 3px; animation: blink 1.2s infinite; }
.thinking .dots i:nth-child(2) { animation-delay: .2s; } .thinking .dots i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 100% { opacity: .2; } 50% { opacity: 1; } }
.vcard { background: var(--bg2); border: 2px solid var(--line); border-radius: 14px; padding: 12px 14px; text-align: left; width: 100%; display: block; }
.vcard .qt { font-weight: 700; font-size: 16px; margin: 4px 0; }
.vcard .meta { font-size: 12px; color: var(--ink2); display: flex; gap: 6px; align-items: center; }
.vcard.on { border-color: var(--gold); background: rgba(233,185,73,.1); }
.vcard.mine { opacity: .5; }

/* 결과 */
.res { display: flex; flex-direction: column; gap: 8px; }
.resrow { background: var(--bg2); border-radius: 14px; padding: 12px; display: flex; gap: 10px; align-items: center; }
.resrow.me { border: 1px solid var(--q); }
.resrow .rk { font-family: "Do Hyeon", sans-serif; font-size: 22px; width: 28px; text-align: center; flex: none; }
.resrow .rk.g1 { color: var(--gold); }
.resrow .mid { flex: 1; min-width: 0; }
.resrow .mid .q { font-size: 12.5px; color: var(--ink2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.resrow .tot { font-weight: 900; font-size: 18px; color: var(--gold); flex: none; text-align: right; }
.resrow .tot small { display: block; font-size: 11px; color: var(--ink3); font-weight: 600; }
.breakdown { background: var(--card); border-radius: 14px; padding: 14px; }
.breakdown h4 { margin: 0 0 8px; font-size: 14px; }
.bk { display: flex; align-items: center; gap: 8px; font-size: 13px; margin: 6px 0; }
.bk .lb { width: 64px; color: var(--ink2); flex: none; }
.bk .bar { flex: 1; height: 8px; background: var(--bg2); border-radius: 4px; overflow: hidden; }
.bk .bar i { display: block; height: 100%; background: var(--q); }
.bk .v { width: 48px; text-align: right; font-weight: 700; flex: none; }

/* 방 채팅 — 아래에 얇게 */
.rchat { padding: 8px 14px calc(10px + var(--safe-b)); background: var(--bg); border-top: 1px solid var(--line); position: sticky; bottom: 0; transform: translateZ(0); z-index: 5; }
.rchat .chatlog { max-height: 96px; overflow-y: auto; padding: 0 0 6px; }
.rchat .cl { font-size: 13px; }

/* 겹쳐 뜨는 것 */
.net { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(10,11,15,.82); display: flex; align-items: center; justify-content: center; z-index: 50; font-weight: 700; }
.net[hidden] { display: none; }
.toast { position: fixed; left: 50%; top: 18px; transform: translateX(-50%); background: #2e3243; color: var(--ink); padding: 10px 16px; border-radius: 12px; z-index: 60; font-size: 14px; max-width: 90vw; text-align: center; box-shadow: 0 6px 20px rgba(0,0,0,.4); }
.toast[hidden] { display: none; }
.sheet { position: fixed; left: 0; right: 0; top: 0; bottom: 0; background: rgba(0,0,0,.55); z-index: 40; display: flex; align-items: flex-end; justify-content: center; }
.sheet[hidden] { display: none; }
.sheet .in { background: var(--bg2); width: 100%; max-width: 520px; border-radius: 20px 20px 0 0; padding: 18px 16px calc(18px + var(--safe-b)); max-height: 86vh; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; }
.sheet h3 { margin: 0; font-size: 17px; }
.sheet .sub { font-size: 13px; color: var(--ink2); margin: -4px 0 4px; }
.optrow { display: flex; align-items: center; justify-content: space-between; min-height: 52px; padding: 0 4px; border-bottom: 1px solid var(--line); }
.optrow:last-child { border-bottom: 0; }
.sw { width: 50px; height: 30px; border-radius: 15px; background: #3a3e50; position: relative; flex: none; }
.sw i { position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: left .15s; }
.sw.on { background: var(--q); }
.sw.on i { left: 23px; }
.why { display: flex; flex-wrap: wrap; gap: 8px; }
.why button { padding: 10px 14px; border-radius: 999px; background: var(--card); min-height: 44px; font-size: 14px; }
.why button.on { background: var(--bad); color: #fff; }
.secttl { font-size: 13px; color: var(--ink2); margin: 10px 0 0; }
.langsel { background: var(--bg2); color: var(--ink); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; font-size: 14px; min-height: 40px; }

/* ═══ 퀴즈퀴즈 판 (2026-10-16) ═══ */
/* 아바타 — 투명 캐릭터 + 장식 겹치기. --hw = 머리 폭(%) */
.ava { position: relative; display: inline-block; flex: none; border-radius: 16px; overflow: hidden; background: linear-gradient(180deg, #2a2e40, #20232f); }
.ava-bg { position: absolute; left: 0; top: 0; width: 100%; height: 100%; object-fit: cover; }
.ava-fb { position: absolute; left: 0; top: 0; right: 0; bottom: 0; display: flex; align-items: center; justify-content: center; font-weight: 900; color: var(--ink3); font-size: 160%; }
.ava-ch { position: absolute; left: 0; top: 0; width: 100%; height: 100%; object-fit: contain; }
.ava-head, .ava-face { position: absolute; transform: translate(-50%, -30%); width: calc(var(--hw) * 1.25); display: flex; justify-content: center; pointer-events: none; }
.ava-face { transform: translate(-50%, -50%); width: calc(var(--hw) * 1.0); }
.ava-head img, .ava-face img { width: 100%; height: auto; }
.ava-pet { position: absolute; right: 2%; bottom: 0; width: 34%; pointer-events: none; }
.ava-pet img { width: 100%; height: auto; }
.ava .emo { font-style: normal; font-size: calc(var(--hw) * 0.9); line-height: 1; display: block; text-align: center; }
.ava-head .emo, .ava-face .emo, .ava-pet .emo { font-size: 1em; }
.ava-head, .ava-face { font-size: calc(0.28em * 1); }
.ava { font-size: 0; }
.ava-head .emo { font-size: calc(var(--s) * 0.13); } .ava-face .emo { font-size: calc(var(--s) * 0.11); } .ava-pet .emo { font-size: calc(var(--s) * 0.2); }
.ava-fb { font-size: calc(var(--s) * 0.32); }
.nm-rainbow { background: linear-gradient(90deg, #ff6b6b, #ffd93d, #6bcb77, #4d96ff, #c77dff); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* 위 막대 — 내 아바타·레벨·코인 */
.mebtn { padding: 0; border-radius: 16px; }
.meinfo { min-width: 0; line-height: 1.3; }
.xpbar { width: 96px; height: 4px; background: var(--bg2); border-radius: 2px; overflow: hidden; margin-top: 3px; }
.xpbar i { display: block; height: 100%; background: var(--ok); }
.coin { font-weight: 800; color: var(--gold); background: var(--bg2); padding: 6px 10px; border-radius: 999px; font-size: 14px; white-space: nowrap; }
.coin.sm { font-size: 12px; padding: 4px 8px; }
.tier { font-weight: 800; font-size: 11px; padding: 0 6px; border-radius: 6px; background: #2b2e3c; }
.t-bronze { color: #d29a6a; } .t-silver { color: #c8ced8; } .t-gold { color: var(--gold); } .t-sapphire { color: #6aa8ff; } .t-emerald { color: #46d39a; } .t-ruby { color: #ff5c7a; } .t-diamond { color: #9ef3ff; } .t-sprout { color: #8fd18a; }

/* 첫 화면 캐릭터 고르기 */
.pickbig { display: flex; justify-content: center; }
.pickbig .ava { border-radius: 24px; }
.charpick { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; margin-top: 8px; }
.charpick.small { grid-template-columns: repeat(6, 1fr); }
.cp { padding: 2px; border-radius: 14px; border: 2px solid transparent; display: flex; justify-content: center; }
.cp.on { border-color: var(--q); }
.cp .ava { width: 100% !important; height: auto !important; aspect-ratio: 1 / 1; }

/* 광장 */
.modecard { display: block; width: 100%; text-align: left; border-radius: 18px; padding: 16px; margin-bottom: 10px; color: #fff; min-height: 96px; }
.modecard.ox { background: linear-gradient(135deg, #3d5afe, #e8590c); }
.modecard.qr { background: linear-gradient(135deg, #2b2e3c, #3a3f55); }
.modecard:active { filter: brightness(0.92); }
.mc-t { font-size: 20px; font-weight: 900; }
.mc-s { font-size: 13px; opacity: .88; margin-top: 2px; }
.mc-n { font-size: 13px; font-weight: 800; margin-top: 8px; background: rgba(0,0,0,.22); display: inline-block; padding: 3px 10px; border-radius: 999px; }
.plaza { display: flex; gap: 6px; overflow-x: auto; padding: 40px 8px 8px; scrollbar-width: none; min-height: 150px; border-radius: 18px;
  background: linear-gradient(180deg, rgba(21,22,29,0) 55%, rgba(21,22,29,.55)), var(--season) center 70% / cover no-repeat, #2a2e40; }
.pz-n { background: rgba(0,0,0,.45); border-radius: 6px; padding: 0 5px; color: #fff; }
.plaza::-webkit-scrollbar { display: none; }
.pz { position: relative; flex: none; display: flex; flex-direction: column; align-items: center; padding: 0; width: 76px; }
.pz-n { font-size: 11px; max-width: 74px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bubble { position: absolute; bottom: calc(100% - 6px); left: 50%; transform: translateX(-50%); background: #fff; color: #222; font-size: 12px; font-weight: 600; line-height: 1.3; padding: 5px 9px; border-radius: 12px; max-width: 150px; width: max-content; white-space: normal; z-index: 3; box-shadow: 0 2px 6px rgba(0,0,0,.3); animation: bub .2s ease-out; pointer-events: none; }
.bubble::after { content: ''; position: absolute; left: 50%; top: 100%; transform: translateX(-50%); border: 5px solid transparent; border-top-color: inherit; border-top-color: #fff; }
.bubble.static { position: static; transform: none; margin: 6px auto 0; display: inline-block; }
@keyframes bub { from { opacity: 0; transform: translate(-50%, 4px); } to { opacity: 1; transform: translate(-50%, 0); } }
.cl.wh .msg { color: #d9a6ff; }
.wtag { font-size: 11px; color: #d9a6ff; border: 1px solid #8a5bb3; border-radius: 6px; padding: 0 5px; white-space: nowrap; }
.cl .ava { border-radius: 8px; }

/* 퀴즈방 목록 */
.rrow { width: 100%; text-align: left; }
.rrow[disabled] { opacity: .5; }

/* 상점 · 옷장 */
.preview { display: flex; flex-direction: column; align-items: center; padding: 6px 0 4px; }
.preview .ava { border-radius: 24px; }
.pv-n { margin-top: 6px; font-size: 15px; }
.shopgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding-bottom: 14px; }
.si { background: var(--bg2); border: 2px solid transparent; border-radius: 14px; padding: 8px 6px; display: flex; flex-direction: column; align-items: center; gap: 4px; cursor: pointer; text-align: center; }
.si.on { border-color: var(--gold); }
.si-th { width: 64px; height: 64px; display: flex; align-items: center; justify-content: center; }
.si-th .ava { border-radius: 12px; }
.thumb-it img, .thumb-bg img { width: 56px; height: 56px; object-fit: contain; }
.thumb-bg img { object-fit: cover; border-radius: 10px; }
.thumb-it .emo, .thumb-bg .emo { font-style: normal; font-size: 34px; }
.sw-col { width: 44px; height: 44px; border-radius: 50%; display: block; }
.si-n { font-size: 12px; font-weight: 600; line-height: 1.25; min-height: 30px; }
.buy { background: var(--gold); color: #2a2000; font-weight: 800; font-size: 12px; border-radius: 999px; padding: 6px 10px; min-height: 32px; }
.tagown { font-size: 11px; color: var(--ink2); padding: 6px 0; }

/* 서바이벌 OX 운동장 */
.room.ox .stage { padding: 8px 10px; gap: 8px; }
.oxq { min-height: 96px; }
.oxcard { background: var(--card); border-radius: 16px; padding: 12px 14px; }
.oxcard .cat { font-size: 12px; color: var(--ink2); }
.oxcard .text { font-size: 18px; font-weight: 800; line-height: 1.4; margin-top: 4px; }
.oxwait { text-align: center; padding: 10px 0; }
.oxwait .n { font-family: "Do Hyeon", sans-serif; font-size: 48px; color: var(--q); line-height: 1; }
.oxtap { text-align: center; font-weight: 800; padding: 24px 0; color: var(--gold); }
.oxans { text-align: center; font-family: "Do Hyeon", sans-serif; font-size: 26px; margin-top: 6px; animation: pop .4s ease-out; }
.oxans.o { color: #5c8dff; } .oxans.x { color: #ff6b6b; }
.oxans small { font-family: inherit; font-size: 13px; color: var(--ink2); }
.field2 { position: relative; height: min(56vh, 460px); border-radius: 18px; overflow: hidden; display: flex; touch-action: manipulation; }
.zone { flex: 1; position: relative; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: background .25s; }
.zo { background: linear-gradient(180deg, #1c2b55, #22346a); }
.zx { background: linear-gradient(180deg, #4d1d26, #5e2430); }
.zone.right { background: #2e7d4f; } .zone.wrong { background: #3a1416; }
.zl { font-family: "Do Hyeon", sans-serif; font-size: 120px; color: rgba(255,255,255,.12); line-height: 1; pointer-events: none; }
#dots { position: absolute; left: 0; top: 0; right: 0; bottom: 0; pointer-events: none; }
.dot { position: absolute; display: flex; flex-direction: column; align-items: center; transition: left .45s ease, top .45s ease, opacity .5s, filter .5s; }
.dot .ava { border-radius: 50%; border: 2px solid rgba(255,255,255,.25); background: #fff; }
.dot.me .ava { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(233,185,73,.4); }
.dot.me { z-index: 2; }
.dot .dn { font-size: 10px; color: #fff; text-shadow: 0 1px 2px #000; max-width: 60px; overflow: hidden; white-space: nowrap; }
.dot.out { opacity: .28; filter: grayscale(1); }
.dot .bubble { bottom: calc(100% + 2px); }
.oxinfo { text-align: center; font-size: 13px; color: var(--ink2); }
.winners { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; padding: 8px 0; }
.wn { position: relative; display: flex; flex-direction: column; align-items: center; font-size: 13px; }
.wn.me .ava { box-shadow: 0 0 0 3px var(--gold); }
.resrow .tot.sm { font-size: 13px; color: var(--ink2); }

/* 퀴즈방 자리 */
.seat .ava { border-radius: 50%; background: #fff; }
.seat { position: relative; }
.seat .bubble { bottom: calc(100% - 4px); }
.resrow { position: relative; }
.pz .ava { background: transparent; }
