/* 진행자 리모컨 — 폰/태블릿/노트북 모두 */
:root {
  --bg-base: #FFF9F4; --bg-card: #fff; --bg-soft: #FFF1E6;
  --text-primary: #3D3D3D; --text-secondary: #7A7A7A; --text-muted: #B5B5B5;
  --accent-coral: #FFB5A7; --accent-mint: #B5EAD7; --accent-lemon: #FFE5B4; --accent-lavender: #C7CEEA;
  --border-soft: #F0E6DC; --border-medium: #E0D5C9; --danger: #C4553F;
  --shadow-card: 0 4px 16px rgba(80,60,40,.08); --ease: cubic-bezier(.4,0,.2,1);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; }
body { background: var(--bg-base); color: var(--text-primary); font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif; font-size: 15px; line-height: 1.5; word-break: keep-all; min-height: 100dvh; display: flex; flex-direction: column; }
[hidden] { display: none !important; }
.hidden { display: none !important; }

.h-head { display: flex; justify-content: space-between; align-items: center; padding: calc(10px + env(safe-area-inset-top)) 16px 10px; background: #fff; border-bottom: 2px solid var(--border-soft); position: sticky; top: 0; z-index: 5; }
.h-brand { font-weight: 800; font-size: 17px; display: flex; gap: 10px; align-items: center; }
.h-code { background: var(--accent-lemon); padding: 2px 10px; border-radius: 100px; letter-spacing: 3px; font-size: 14px; }
.h-right { display: flex; gap: 8px; align-items: center; }
.h-chip { font-size: 13px; font-weight: 700; color: var(--text-secondary); }
.h-link { width: 10px; height: 10px; border-radius: 50%; background: #D9534F; display: inline-block; }
.h-link.on { background: #6CCB8E; }
.h-tabs { display: flex; background: #fff; border-bottom: 2px solid var(--border-soft); position: sticky; top: 52px; z-index: 4; }
.h-tabs button { flex: 1; font: inherit; font-weight: 700; font-size: 14px; padding: 12px 4px; border: none; background: none; color: var(--text-secondary); border-bottom: 3px solid transparent; cursor: pointer; position: relative; }
.h-tabs button.on { color: var(--text-primary); border-bottom-color: var(--accent-coral); }
.h-tabs button .badge { position: absolute; top: 6px; right: 12px; background: var(--danger); color: #fff; font-size: 10px; border-radius: 100px; padding: 0 6px; }

.h-main { flex: 1; padding: 14px; display: flex; flex-direction: column; gap: 12px; max-width: 760px; width: 100%; margin: 0 auto; padding-bottom: calc(30px + env(safe-area-inset-bottom)); }
.card { background: #fff; border: 2px solid var(--border-soft); border-radius: 18px; padding: 16px; box-shadow: var(--shadow-card); display: flex; flex-direction: column; gap: 10px; }
.card h2 { margin: 0; font-size: 17px; font-weight: 800; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.sub { color: var(--text-secondary); font-size: 13.5px; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.grow { flex: 1; }
.btn { font: inherit; font-weight: 800; font-size: 15px; border: none; border-radius: 14px; padding: 13px 16px; background: var(--bg-soft); color: var(--text-primary); cursor: pointer; transition: transform .1s; text-align: center; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .4; cursor: not-allowed; }
.btn.primary { background: var(--accent-coral); }
.btn.mint { background: var(--accent-mint); }
.btn.lemon { background: var(--accent-lemon); }
.btn.lavender { background: var(--accent-lavender); }
.btn.ghost { background: #fff; border: 2px solid var(--border-medium); }
.btn.danger { background: #fff; border: 2px solid var(--danger); color: var(--danger); }
.btn.sm { padding: 8px 12px; font-size: 13px; border-radius: 10px; }
.btn.big { padding: 18px; font-size: 18px; }
.btn.block { width: 100%; }
.inp, select.inp { font: inherit; font-size: 15px; padding: 10px 12px; border: 2px solid var(--border-medium); border-radius: 12px; background: #fff; color: inherit; width: 100%; }
.inp:focus { outline: none; border-color: var(--accent-coral); }
.inp.num { width: 84px; text-align: center; }
.status { background: var(--bg-soft); border-radius: 12px; padding: 10px 14px; font-weight: 700; }
.answer-box { background: #FFF6D6; border: 2px dashed #E7C86A; border-radius: 12px; padding: 10px 14px; font-weight: 800; font-size: 17px; }
.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.actions .btn.full { grid-column: 1 / -1; }
.list { display: flex; flex-direction: column; gap: 6px; }
.li { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 12px; background: var(--bg-base); border: 1px solid var(--border-soft); }
.li .dot { width: 10px; height: 10px; border-radius: 50%; background: #D9534F; flex: none; }
.li .dot.on { background: #6CCB8E; }
.li .nm { font-weight: 700; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.li .tc { width: 12px; height: 12px; border-radius: 3px; flex: none; }
.li select { font: inherit; font-size: 13px; padding: 4px 6px; border-radius: 8px; border: 1px solid var(--border-medium); background: #fff; max-width: 110px; }
.li .sc { font-variant-numeric: tabular-nums; font-weight: 800; min-width: 44px; text-align: right; }
.pend { background: #FFF6D6; }
.gcard { display: flex; gap: 12px; align-items: flex-start; }
.gcard .ic { font-size: 30px; line-height: 1; }
.gcard .ttl { font-weight: 800; font-size: 16px; }
.gcard .mode { font-size: 11px; font-weight: 800; padding: 1px 8px; border-radius: 100px; background: var(--accent-lavender); margin-left: 6px; }
.gcard .mode.team { background: var(--accent-mint); }
.opts { display: flex; flex-wrap: wrap; gap: 8px; }
.opts label { display: flex; flex-direction: column; font-size: 12px; color: var(--text-secondary); gap: 3px; }
.log { font-size: 13px; color: var(--text-secondary); display: flex; flex-direction: column; gap: 4px; }
.qr-mini svg { width: 160px; height: 160px; }
.word-card { background: var(--accent-lemon); border-radius: 14px; padding: 12px 14px; }
.word-card .w { font-size: 28px; font-weight: 800; }
.word-card .f { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.word-card .f span { background: #fff; padding: 3px 10px; border-radius: 100px; font-size: 13px; font-weight: 700; color: #B03A2E; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 50; background: rgba(61,61,61,.94); color: #fff; padding: 12px 20px; border-radius: 100px; font-weight: 700; font-size: 14px; max-width: 92vw; pointer-events: none; }
.timer-inline { font-variant-numeric: tabular-nums; font-weight: 800; }
.timer-inline.danger { color: var(--danger); }
.candidates { display: flex; flex-wrap: wrap; gap: 6px; }
.candidates .btn.sel { background: var(--accent-mint); }
