/* 발표 모드(/t/#/present/{id}) + 폰 리모컨(/t/#/remote/{id}) — 슬라이드 2단계. 폰트는 OFL만(Noto Sans KR · Black Han Sans 400 · Roboto Mono). */
.pv-root [hidden], .rm-root [hidden], .pv-root[hidden], .rm-root[hidden] { display: none !important; }

/* ── 발표 화면: 상단바·바닥글 없이 화면 전체 ── */
body.present-mode, body.remote-mode { min-height: 100dvh; }
body.present-mode { height: 100dvh; overflow: hidden; background: var(--bg); }
body.present-mode > .topbar, body.present-mode > #main, body.present-mode > .footer,
body.remote-mode > .topbar, body.remote-mode > #main, body.remote-mode > .footer { display: none; }
.pv-root { position: fixed; inset: 0; z-index: 5; display: flex; flex-direction: column; background: var(--bg); }
.pv-root:fullscreen { background: var(--bg); }
.pv-host { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
.pv-loading, .pv-fail { margin: auto; text-align: center; color: var(--muted); font-size: 18px; display: grid; gap: 14px; justify-items: center; padding: 24px; }
.pv-fail p { color: var(--text); }

.deck.present { border: 0; border-radius: 0; box-shadow: none; background: var(--surface); }
.deck.present .slide-in { padding: clamp(16px, 3.4cqh, 48px) clamp(18px, 4.4cqw, 72px) calc(64px + clamp(10px, 2cqh, 24px)); }
.deck.present .slide-box { max-width: 1280px; }
.deck.present .s-title { font-size: clamp(24px, 4.2cqw, 56px); }
.deck.present .s-kind { font-size: clamp(13px, 1.7cqw, 19px); }
.deck.present .s-note { font-size: clamp(15px, 2.2cqw, 26px); }
.deck.present .bullets .bl { font-size: clamp(20px, 4cqw, 52px); }
.deck.present .text-note { font-size: clamp(15px, 2.2cqw, 26px); }
.deck.present .ts-title { font-size: clamp(30px, 6.4cqw, 84px); margin-top: 8px; }
.deck.present .ss-title { font-size: clamp(60px, 16cqw, 180px); }
.deck.present .ss-list { font-size: clamp(16px, 2.6cqw, 30px); }
.deck.present .end-title { font-size: clamp(40px, 8cqw, 100px); }
.deck.present .media-v { width: min(100%, calc((100cqh - 190px) * 16 / 9)); }

/* 아래 조작바 — 슬라이드 위에 떠 있고, 마우스를 2초 멈추면 숨는다 */
.deck.present .deck-nav { position: absolute; left: 0; right: 0; bottom: 0; z-index: 3; flex-wrap: wrap; gap: 6px; padding: 8px 12px; background: rgba(255,255,255,.95); backdrop-filter: blur(6px); border-top: 1px solid var(--line); transition: opacity .25s ease, transform .25s ease; }
.pv-root.idle .deck.present .deck-nav:not(:hover):not(:focus-within) { opacity: 0; transform: translateY(12px); pointer-events: none; }
.pv-root.idle, .pv-root.idle * { cursor: none; }
.deck-nav .lbl { display: inline; margin: 0; font-size: inherit; font-weight: inherit; color: inherit; } /* t/builder.css 의 입력 칸 .lbl(회색·블록)과 이름이 겹친다 */
.pv-extra { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; min-width: 0; }
.pv-extra .btn[aria-pressed="true"] { background: var(--accent); color: #fff; border-color: var(--accent); }
.pv-extra .btn:disabled { opacity: .45; }
.pv-sess.on { color: var(--err); border-color: #fecaca; }
.pv-people { font-size: 13.5px; font-weight: 700; color: var(--ok); background: var(--ok-bg); border-radius: 999px; padding: 4px 12px; white-space: nowrap; }
.pv-exit { width: 38px; padding: 0; }
.btn.danger { background: var(--err); border-color: var(--err); color: #fff; }

/* 제목 슬라이드: 큰 코드·QR·주소 + 회차 */
.pv-ts { gap: 0; }
.pv-join { margin-top: clamp(12px, 3cqh, 30px); display: flex; align-items: center; justify-content: center; gap: clamp(16px, 4cqw, 56px); flex-wrap: wrap; }
.pv-qr-box { background: #fff; border: 1px solid var(--line-2); border-radius: 16px; padding: 8px; line-height: 0; }
.pv-join-t { text-align: left; }
.pv-join-cap { color: var(--muted); font-weight: 700; font-size: clamp(14px, 2cqw, 22px); }
.pv-code { font-family: 'Roboto Mono', monospace; font-weight: 500; letter-spacing: .14em; color: var(--accent-dd); line-height: 1.05; font-size: clamp(44px, 10cqw, 132px); }
.pv-url { color: var(--accent-d); font-family: 'Roboto Mono', monospace; font-size: clamp(14px, 2cqw, 24px); overflow-wrap: anywhere; word-break: normal; }
.pv-ts-sess { margin-top: clamp(12px, 3cqh, 28px); display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 6px 12px; font-size: clamp(15px, 2.3cqw, 26px); }
.pv-ts-sess .muted { font-size: .78em; }
.pv-start { min-height: 48px; font-size: 17px; padding: 0 22px; }

/* 퀴즈·투표: 선택지 크게, 응답 보기 = 선택지 칸 안의 막대 */
.pv-ans { display: flex; flex-direction: column; min-height: 0; flex: 1 1 auto; }
.pv-q { font-weight: 500; white-space: pre-line; line-height: 1.4; font-size: clamp(20px, 3.1cqw, 42px); }
.pv-choices { list-style: none; display: grid; gap: clamp(6px, 1.4cqh, 14px); margin-top: clamp(10px, 2.2cqh, 24px); max-width: 1100px; }
.pv-ch { position: relative; overflow: hidden; display: flex; align-items: center; gap: clamp(10px, 1.6cqw, 18px); padding: clamp(8px, 1.4cqh, 14px) clamp(12px, 2cqw, 22px); border: 2px solid var(--line-2); border-radius: 14px; background: #fff; font-size: clamp(17px, 2.6cqw, 34px); line-height: 1.3; }
.pv-ch > :not(.pv-ch-bar) { position: relative; z-index: 1; }
.pv-ch-bar { position: absolute; left: 0; top: 0; bottom: 0; width: 0; z-index: 0; background: var(--accent-l); transition: width .45s ease; }
.pv-ch-mk { flex: none; color: var(--accent-d); font-size: 1.05em; min-width: 1.2em; text-align: center; }
.pv-ch-t { flex: 1 1 auto; min-width: 0; }
.pv-ch-n { flex: none; font-family: 'Roboto Mono', monospace; font-weight: 500; font-size: .74em; color: var(--accent-dd); white-space: nowrap; }
.pv-ch-ok { flex: none; font-size: .62em; font-weight: 700; color: #fff; background: var(--ok); border-radius: 999px; padding: 2px 12px; white-space: nowrap; }
.pv-ch.ans { border-color: var(--ok); box-shadow: 0 0 0 2px var(--ok) inset; }
.pv-ch.ans .pv-ch-bar { background: #bbf7d0; }
.pv-ch.ans .pv-ch-mk, .pv-ch.ans .pv-ch-t { color: var(--ok); font-weight: 700; }
.pv-res-sum { margin-top: clamp(8px, 1.6cqh, 16px); font-weight: 700; color: var(--accent-dd); font-size: clamp(15px, 2.2cqw, 26px); }
.pv-res-sum.wait { color: var(--muted); font-weight: 500; }
.pv-explain { margin-top: clamp(8px, 1.6cqh, 16px); padding: 10px 16px; border-left: 5px solid var(--ok); background: var(--ok-bg); border-radius: 8px; white-space: pre-line; font-size: clamp(16px, 2.4cqw, 28px); }
.pv-explain b { color: var(--ok); }

/* 서술: 답 카드(새 답이 위로, 길면 스크롤) */
.pv-cards { list-style: none; margin-top: 12px; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 12px; align-content: start; max-height: 58cqh; overflow-y: auto; padding: 2px; }
.pv-card { background: #fff; border: 1px solid var(--line-2); border-radius: 14px; padding: 12px 16px; display: grid; gap: 4px; white-space: pre-line; font-size: clamp(16px, 2.3cqw, 28px); line-height: 1.45; box-shadow: var(--shadow); }
.pv-card b { font-size: .62em; color: var(--muted); font-weight: 700; }

/* 체크: 완료 n / 참가 N */
.pv-check-n { margin-top: clamp(14px, 3cqh, 30px); font-size: clamp(20px, 3.4cqw, 42px); color: var(--accent-dd); }
.pv-check-n b { font-family: 'Roboto Mono', monospace; font-size: 2em; color: var(--ok); }
.pv-check-track { margin-top: 10px; height: 18px; border-radius: 999px; background: var(--bg-2); overflow: hidden; max-width: 900px; }
.pv-check-track i { display: block; height: 100%; width: 0; background: var(--ok); transition: width .45s ease; }

/* 마지막 슬라이드 */
.pv-end { display: grid; gap: 14px; justify-items: center; margin-top: 10px; width: 100%; max-width: 900px; }
.pv-end-sum { font-size: clamp(16px, 2.6cqw, 30px); color: var(--text); font-weight: 700; }
.pv-end-list { list-style: none; width: 100%; display: grid; gap: 6px; text-align: left; font-size: clamp(14px, 2cqw, 22px); }
.pv-end-list li { display: flex; justify-content: space-between; gap: 12px; padding: 6px 12px; border-bottom: 1px solid var(--line); }
.pv-end-list .en { font-family: 'Roboto Mono', monospace; color: var(--accent-dd); white-space: nowrap; }
.pv-end-acts .btn { min-height: 48px; font-size: 17px; padding: 0 24px; }

/* 검은 화면 · 숫자 이동 · 알림 · 대화 상자 (모두 .pv-root 안 — 전체 화면에서도 보이게) */
.pv-blank { position: absolute; inset: 0; z-index: 20; background: #000; display: flex; align-items: flex-end; justify-content: center; cursor: pointer; }
.pv-blank p { color: #3a3a3a; font-size: 13px; padding: 14px; }
.pv-dig { position: absolute; top: 18px; right: 18px; z-index: 12; background: var(--accent-dd); color: #fff; border-radius: 12px; padding: 10px 18px; font-size: 22px; font-family: 'Roboto Mono', monospace; box-shadow: var(--shadow); }
.pv-toast { position: absolute; top: 18px; left: 50%; transform: translateX(-50%); z-index: 12; background: rgba(17,48,58,.9); color: #fff; border-radius: 999px; padding: 8px 18px; font-size: 15px; white-space: nowrap; }
.pv-dlg { position: absolute; inset: 0; z-index: 30; background: rgba(10,30,38,.5); display: grid; place-items: center; padding: 16px; }
.pv-dlg-card { width: min(480px, 100%); max-height: calc(100% - 16px); overflow-y: auto; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; }
.pv-dlg-card h2 { color: var(--accent-dd); font-size: 22px; }
.pv-dlg-body { margin-top: 8px; display: grid; gap: 10px; color: var(--muted); font-size: 15px; }
.pv-dlg-acts { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; margin-top: 16px; }
.pv-dlg-msg { color: var(--err); font-weight: 700; }
.pv-start-form { display: flex; gap: 8px; }
.pv-start-form .input { flex: 1 1 auto; min-width: 0; }
.pv-rm-qr { display: flex; justify-content: center; line-height: 0; }
.pv-rm-qr canvas { border: 1px solid var(--line-2); border-radius: 12px; }
.pv-rm-guide { text-align: center; color: var(--text); font-weight: 700; font-size: 17px; }
.pv-dlg .pv-url { text-align: center; font-size: 13px; }
.pv-rm-state { text-align: center; color: var(--muted); }
.pv-rm-state.on { color: var(--ok); font-weight: 700; }

@media (max-width: 900px) {
  .pv-extra .lbl { display: none; }
  .deck.present .deck-nav .lbl { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .deck.present .deck-nav, .pv-ch-bar, .pv-check-track i { transition: none; }
}

/* ── 폰 리모컨(390 기준 세로) ── */
.rm-root { width: 100%; max-width: 560px; margin: 0 auto; padding: 10px 16px calc(18px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 10px; min-height: 100dvh; }
.rm-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.rm-brand { font-family: var(--f-title); font-weight: 400; font-size: 18px; color: var(--accent-dd); white-space: nowrap; }
.rm-status { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.rm-dot { width: 10px; height: 10px; border-radius: 50%; background: #cbd5e1; flex: none; }
.rm-dot.on { background: #16a34a; box-shadow: 0 0 0 3px #dcfce7; }
.rm-lesson { color: var(--muted); font-size: 13.5px; margin-top: -4px; }
.rm-root .card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 16px; }
.rm-now { display: grid; gap: 2px; }
.rm-no { font-family: 'Roboto Mono', monospace; font-weight: 500; color: var(--accent); font-size: 15px; }
.rm-kind { color: var(--muted); font-size: 13.5px; font-weight: 700; }
.rm-title { color: var(--accent-dd); font-size: 24px; line-height: 1.25; }
.rm-step { color: var(--accent-d); font-size: 13.5px; font-weight: 700; }
.rm-big { display: grid; grid-template-columns: 1fr 1.6fr; gap: 10px; }
.rm-big .btn { min-height: 92px; font-size: 22px; border-radius: 18px; }
.rm-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.rm-row .btn { min-height: 52px; font-size: 15.5px; padding: 0 8px; white-space: normal; }
.rm-row .btn[aria-pressed="true"] { background: var(--accent); color: #fff; border-color: var(--accent); }
.rm-row .btn:disabled, .rm-big .btn:disabled { opacity: .42; }
.rm-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.rm-g { min-height: 54px; border-radius: 12px; border: 1px solid var(--line-2); background: #fff; color: var(--text); font: inherit; font-size: 11px; display: grid; align-content: center; justify-items: center; gap: 0; padding: 4px; cursor: pointer; overflow: hidden; }
.rm-g b { font-family: 'Roboto Mono', monospace; font-size: 17px; color: var(--accent-dd); font-weight: 500; }
.rm-g span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }
.rm-g.k-stage { background: var(--bg-2); }
.rm-g[aria-current="true"] { border-color: var(--accent); background: var(--accent-l); box-shadow: inset 0 0 0 1px var(--accent); }
.rm-msg { min-height: 1.4em; font-size: 13px; color: var(--muted); text-align: center; }
.rm-sess { display: grid; gap: 10px; }
.rm-people { display: flex; align-items: center; flex-wrap: wrap; gap: 0 4px; font-size: 15px; }
.rm-sess-box .btn { width: 100%; min-height: 48px; }
.rm-start-form { display: flex; gap: 8px; }
.rm-start-form .input { flex: 1 1 auto; min-width: 0; }
.rm-start-form .btn { width: auto; flex: none; }
.rm-ask { font-size: 14px; color: var(--text); margin-bottom: 8px; }
.rm-notes { display: grid; gap: 8px; font-size: 14px; }
.rm-lbl { font-size: 12px; font-weight: 700; color: var(--muted); }
.rm-note-t { white-space: pre-line; }
.rm-next-t { color: var(--accent-dd); }

/* 3단계 연동 모드 — 조작바 「연동 켜기/끄기」·「되돌아보기 허용」·실시간 연결 표시 */
.pv-extra .pv-follow[aria-pressed="true"] { background: #0e7490; border-color: #0e7490; color: #fff; }
.pv-back { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; color: var(--muted); white-space: nowrap; cursor: pointer; }
.pv-back input { width: 16px; height: 16px; accent-color: var(--accent); margin: 0; }
.pv-people.live::before { content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #16a34a; margin-right: 6px; vertical-align: 1px; }
