/* 참가자 휴대폰 화면 */
.app { min-height: 100dvh; display: flex; flex-direction: column; }
.top { position: sticky; top: 0; z-index: 10; display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: calc(10px + var(--safe-t)) 20px 10px; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: none; border-bottom: 1px solid var(--line); }
.brand { font-size: 15px; font-weight: 700; }
.who { font-size: 14px; color: var(--sub); text-align: right; }
.screen { width: 100%; max-width: 560px; margin: 0 auto; padding: 20px 20px calc(112px + var(--safe-b)); display: flex; flex-direction: column; gap: 20px; }
.screen.center { min-height: 100dvh; justify-content: center; padding-bottom: 40px; }
.eyebrow { font-size: 14px; font-weight: 600; color: var(--accent); margin-bottom: -12px; }
h1 { font-size: 26px; font-weight: 700; line-height: 1.3; }
h2 { font-size: 18px; font-weight: 700; margin-bottom: 10px; }
h2.gap { margin-top: 8px; }
.note { font-size: 14px; color: var(--muted); }
.stack { display: flex; flex-direction: column; gap: 12px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.row { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.inline { display: flex; gap: 8px; margin-top: 12px; }
.inline .field { flex: 1; }
.lab { display: flex; flex-direction: column; gap: 6px; font-size: 14px; color: var(--sub); }

/* 하단 탭: 화면 아래 고정, 홈 인디케이터 위 */
.tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: grid; grid-template-columns: repeat(var(--n), 1fr); padding-bottom: var(--safe-b); background: var(--surface); border-top: 1px solid var(--line); }
.tabs button { min-height: 64px; border: 0; background: none; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font-size: 13px; color: var(--muted); cursor: pointer; }
.tabs svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tabs button[aria-current="page"] { color: var(--accent); font-weight: 700; }
.qbadge { position: fixed; top: calc(52px + var(--safe-t)); left: 50%; transform: translateX(-50%); z-index: 15; padding: 6px 12px; border-radius: var(--r-sm); background: var(--hot); color: var(--surface); font-size: 13px; font-weight: 600; }

/* 입장 */
.pin { width: 100%; min-height: 72px; text-align: center; font-size: 34px; font-weight: 700; letter-spacing: 0.5em; padding-left: 0.5em; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); font-variant-numeric: tabular-nums; }
.pin:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px var(--accent-soft); }
.terms { margin: 0; border-top: 1px solid var(--line); }
.terms div { display: grid; grid-template-columns: 76px 1fr; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.terms dt { font-size: 14px; font-weight: 700; }
.terms dd { margin: 0; font-size: 14px; color: var(--sub); }
.check { display: grid; grid-template-columns: 28px 1fr; gap: 10px; align-items: start; padding: 14px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); font-size: 15px; cursor: pointer; }
.check input { width: 24px; height: 24px; margin: 0; accent-color: var(--accent); }
.check small { display: block; margin-top: 4px; font-size: 13px; color: var(--muted); }
.choice { display: block; cursor: pointer; }
.choice input { position: absolute; opacity: 0; }
.choice span { display: flex; flex-direction: column; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); font-weight: 600; }
.choice small { font-weight: 400; font-size: 13px; color: var(--muted); }
.choice input:checked + span { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); background: var(--accent-soft); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-height: 44px; padding: 0 14px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); font-size: 15px; cursor: pointer; }

/* 홈 */
.notice { padding: 14px 16px; border-radius: var(--r); background: var(--accent); color: var(--accent-ink); font-size: 15px; font-weight: 600; }
.notice.hot { background: var(--hot); }
.card { padding: 16px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); display: flex; flex-direction: column; gap: 8px; }
.card.ok { border-color: var(--accent); background: var(--accent-soft); }
.score .label { font-size: 15px; font-weight: 600; }
.live { font-size: 13px; color: var(--accent); font-weight: 600; }
.live::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 6px; border-radius: 50%; background: var(--accent); vertical-align: 1px; }
.big { font-size: 44px; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
.big small { font-size: 20px; font-weight: 600; margin-left: 2px; }
.stat { padding: 8px 0; }
.timeline { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.timeline li { display: grid; grid-template-columns: 64px 1fr; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.timeline li.past { color: var(--muted); }
.timeline li.now { color: var(--accent); font-weight: 700; }
.timeline li.now span:first-child::before { content: "지금 "; font-size: 12px; }
.map { width: 100%; height: auto; border-radius: var(--r); }
.rank { list-style: none; margin: 0; padding: 0; counter-reset: r; }
.rank li { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--line); counter-increment: r; }
.rank li span::before { content: counter(r) "위  "; color: var(--muted); }

/* 미션 */
.missions { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.mrow { width: 100%; min-height: 64px; display: grid; grid-template-columns: 28px 1fr auto 20px; align-items: center; gap: 10px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); text-align: left; cursor: pointer; }
.mno { font-size: 15px; color: var(--muted); font-weight: 600; }
.mt { font-size: 17px; font-weight: 600; }
.ms { font-size: 14px; color: var(--muted); text-align: right; }
.ms.ok { color: var(--accent); font-weight: 600; }
.ms.ok::before { content: "✓ "; }
.mrow svg, .back svg { width: 20px; height: 20px; fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.back { align-self: flex-start; display: inline-flex; align-items: center; gap: 4px; min-height: 44px; padding: 0 8px 0 0; border: 0; background: none; font-size: 15px; color: var(--sub); cursor: pointer; margin-bottom: -8px; }
.empty { display: flex; flex-direction: column; gap: 6px; padding: 32px 20px; border: 1px dashed var(--line); border-radius: var(--r); text-align: center; background: var(--surface); }
.empty b { font-size: 16px; }
.empty span { font-size: 14px; color: var(--muted); }
.bingo { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.cell { aspect-ratio: 1; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); font-size: 16px; font-weight: 600; padding: 6px; cursor: pointer; }
.cell.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.cell:disabled { cursor: default; color: var(--ink); }
.cell.on:disabled { color: var(--accent-ink); }
.plist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.plist li { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 68px; padding: 10px 12px 10px 16px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); font-size: 16px; font-weight: 600; }
.plist li.done { border-color: var(--accent); }
.plist small { display: block; font-size: 13px; font-weight: 500; color: var(--accent); }
.plist .btn { flex: none; }
.poses summary { min-height: 44px; display: flex; align-items: center; font-size: 15px; font-weight: 600; cursor: pointer; }
.poses p { font-size: 15px; padding: 6px 0; }
.stop h2 { margin: 0; }
.pillx { font-size: 13px; color: var(--muted); }
.pillx.ok { color: var(--accent); font-weight: 600; }
.q { padding-top: 12px; border-top: 1px solid var(--line); }
.q p { font-size: 16px; font-weight: 600; margin-bottom: 10px; }
.opts { display: grid; gap: 8px; }
.opt { min-height: 52px; padding: 10px 14px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); font-size: 16px; text-align: left; cursor: pointer; }
.opt.on { border-color: var(--accent); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); font-weight: 700; }
.opts.big .opt { min-height: 68px; font-size: 18px; text-align: center; }
.lockbox { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; padding-top: 4px; }

/* 사진 */
.seg { display: grid; grid-template-columns: 1fr 1fr; padding: 4px; border-radius: var(--r); background: var(--sunk); }
.seg button { min-height: 44px; border: 0; border-radius: var(--r-sm); background: none; font-size: 15px; font-weight: 600; color: var(--sub); cursor: pointer; }
.seg button[aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(18, 20, 23, .12); }
.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.ph { position: relative; padding: 0; border: 0; border-radius: var(--r-sm); overflow: hidden; background: var(--sunk); aspect-ratio: 1; cursor: pointer; }
.ph img { width: 100%; height: 100%; object-fit: cover; }
.ph span { position: absolute; left: 0; right: 0; bottom: 0; display: flex; justify-content: space-between; padding: 6px 8px; font-size: 13px; color: #FEFEFE; text-align: left; background: rgba(18, 20, 23, .6); }
.sk { aspect-ratio: 1; border-radius: var(--r-sm); background: var(--sunk); }
.sk.tall { aspect-ratio: auto; height: 220px; }
.viewer { width: 100%; max-width: 560px; padding: 12px; border: 0; border-radius: var(--r); background: var(--ink); }
.viewer::backdrop { background: rgba(0, 0, 0, .7); }
.viewer img { width: 100%; border-radius: var(--r-sm); margin-bottom: 12px; }
.poll h2 { font-size: 22px; line-height: 1.35; margin: 0 0 4px; }
.poll h2.emoji { font-size: 44px; text-align: center; }
.spinner { width: 32px; height: 32px; margin: 8px auto; border: 3px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (min-width: 600px) { .grid { grid-template-columns: repeat(3, 1fr); } }
