/* 대인라 시연 — 글자 15px 이상 · 누르는 것 44px 이상 */
:root { --bg: #f4f6fa; --card: #fff; --line: #dde2ea; --text: #1d2330; --muted: #667085; --pri: #1f4fd1; --danger: #c62828; --ok: #1b873f; }
* { box-sizing: border-box; }
body { margin: 0; font: 16px/1.5 "Pretendard", "Malgun Gothic", system-ui, sans-serif; color: var(--text); background: var(--bg); }
.muted { color: var(--muted); }
.small { font-size: 15px; }
.grow { flex: 1; }
.btn { min-height: 44px; padding: 8px 16px; border: 1px solid var(--line); background: #fff; border-radius: 8px; font: inherit; cursor: pointer; color: var(--text); text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.btn.primary { background: var(--pri); border-color: var(--pri); color: #fff; }
.btn.danger { color: var(--danger); border-color: var(--danger); }
.btn.small { min-height: 44px; padding: 4px 12px; }
.btn:disabled { opacity: .6; }
.badge { display: inline-block; padding: 2px 10px; border-radius: 999px; background: #e8edf7; font-size: 15px; }
.badge.on { background: #e3f5e9; color: var(--ok); }
.badge.off { background: #f1f2f4; color: var(--muted); }
input { font: inherit; min-height: 44px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px; width: 100%; }

.top { display: flex; align-items: center; gap: 12px; padding: 8px 16px; background: #fff; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.notice { background: #fff6d6; border-bottom: 1px solid #f0dc8a; padding: 10px 16px; font-weight: 600; }

/* 로그인 */
.login-page { display: grid; place-items: center; min-height: 100vh; }
.login-box { background: #fff; padding: 32px; border-radius: 14px; width: min(420px, 92vw); box-shadow: 0 6px 24px rgba(0,0,0,.06); }
.login-box h1 { margin: 0 0 4px; font-size: 24px; }
.login-box label { display: block; margin: 14px 0; }
.login-box .btn { width: 100%; justify-content: center; margin-top: 6px; }
.msg { color: var(--danger); min-height: 24px; }

/* 시청 */
.viewer { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; padding: 16px; }
@media (max-width: 960px) { .viewer { grid-template-columns: 1fr; } }
.tabs { display: flex; gap: 6px; margin-bottom: 8px; flex-wrap: wrap; }
.tab { min-height: 44px; padding: 6px 14px; border: 1px solid var(--line); background: #fff; border-radius: 8px; font: inherit; cursor: pointer; }
.tab.on { background: var(--pri); color: #fff; border-color: var(--pri); }
.tab small { font-size: 15px; opacity: .85; }
.player-wrap { position: relative; background: #000; aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden; }
.player-wrap:fullscreen { border-radius: 0; aspect-ratio: auto; }
#player { position: absolute; inset: 0; }
.op-fullscreen-button { display: none !important; } /* 전체 화면은 워터마크까지 함께 — 아래 단추로 */
.watermark { position: absolute; z-index: 20; color: rgba(255,255,255,.38); font-size: 18px; font-weight: 700; pointer-events: none; text-shadow: 0 0 3px rgba(0,0,0,.6); transition: left 1.2s, top 1.2s; white-space: nowrap; }
.stats { position: absolute; z-index: 21; top: 10px; left: 10px; white-space: pre; font: 15px/1.45 "Consolas", "D2Coding", monospace; color: #fff; background: rgba(0,0,0,.55); padding: 8px 10px; border-radius: 8px; pointer-events: none; }
.unmute { position: absolute; z-index: 22; right: 12px; top: 12px; }
.fs { position: absolute; z-index: 22; right: 12px; bottom: 56px; background: rgba(255,255,255,.9); }
.side { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 12px; display: flex; flex-direction: column; min-height: 420px; }
.pane { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.pane[hidden] { display: none; }
.list { list-style: none; margin: 0; padding: 0; overflow-y: auto; flex: 1; max-height: 56vh; }
.list.tall { max-height: 60vh; }
.list li { padding: 6px 4px; border-bottom: 1px solid #f0f2f5; word-break: break-word; }
.list li.admin b { color: var(--pri); }
.list li.notice-line { background: #fff6d6; }
.answer { margin-top: 4px; padding: 6px 8px; background: #eef3ff; border-radius: 6px; }
.send { display: flex; gap: 6px; margin-top: 8px; }
.send input { flex: 1; }
.send-hint { min-height: 0; color: #b45309; font-size: 15px; margin-top: 4px; }
.send-hint:empty { display: none; }
.modal { position: fixed; inset: 0; background: rgba(0,0,0,.5); display: grid; place-items: center; z-index: 100; }
.modal[hidden] { display: none; }
.modal-box { background: #fff; padding: 28px; border-radius: 14px; width: min(440px, 92vw); }

/* 콘솔 */
.console { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 16px; padding: 16px; }
.card { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; }
.card h2 { margin: 0 0 10px; font-size: 18px; display: flex; gap: 8px; align-items: center; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 4px 14px; margin: 0 0 8px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; word-break: break-all; font-variant-numeric: tabular-nums; }
.tbl { width: 100%; border-collapse: collapse; }
.tbl th, .tbl td { text-align: left; padding: 6px 4px; border-bottom: 1px solid #f0f2f5; }

/* 송출 전·끊김 — 플레이어 자체 오류 글(영문)은 감추고 우리 안내를 띄운다 */
.player-wrap .op-message-container { display: none !important; }
.waiting { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px; color: #fff; background: rgba(0, 0, 0, .55); font-size: 17px; pointer-events: none; z-index: 19; bottom: 48px; }
.waiting b { font-size: 22px; }
.waiting[hidden] { display: none; }
.list li.alert-line { background: #fee2e2; color: #991b1b; border-radius: 6px; padding: 6px 8px; }
