.view { max-width: 1200px; margin: 0 auto; padding: 16px; }
.narrow { max-width: 380px; margin-top: 10vh; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 16px; margin-bottom: 14px; }
.card h2 { margin: 0 0 10px; font-size: 17px; }
.top { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.top h1 { margin: 0; font-size: 20px; }
.grow { flex: 1; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; }
.row h2 { margin: 0; }
.form label, #login-form label, #pw-form label { display: block; margin-bottom: 12px; }
#login-form input, #pw-form input { width: 100%; margin-top: 4px; }
#pw-form .row { margin-top: 16px; }
.n { width: 72px; }
.wide { width: 100%; }
.err { color: var(--danger); min-height: 1em; margin: 6px 0; white-space: pre-line; }
.tabs { display: flex; gap: 4px; }
.tabs button.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.grid2 > .card { margin-bottom: 14px; }
@media (max-width: 800px) { .grid2 { grid-template-columns: 1fr; } }
button.big { font-size: 18px; padding: 10px 24px; }
.clock { font-size: 48px; font-weight: 700; font-variant-numeric: tabular-nums; }
.clock.over { color: var(--danger); }
.phase { font-weight: 600; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; text-align: center; }
.stats b { display: block; font-size: 30px; }
.stats span { color: var(--muted); font-size: 13px; }
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th, .tbl td { border-bottom: 1px solid var(--line); padding: 5px 6px; text-align: left; vertical-align: top; }
.tbl th { background: #f9fafb; font-weight: 600; position: sticky; top: 0; }
.tbl td button { padding: 2px 8px; font-size: 13px; }
.tbl.edit input { width: 100%; min-width: 70px; padding: 3px 5px; }
.tbl tr.bad td { background: #fef2f2; }
.tbl tr.warn td { background: #fffbeb; }
.tbl .msgs { font-size: 12px; }
.tbl .msgs .e { color: var(--danger); }
.tbl .msgs .w { color: var(--warn); }
.st-present, .st-manual { color: var(--ok); font-weight: 600; }
.st-late { color: var(--warn); font-weight: 600; }
.st-excluded { color: var(--danger); }
.colors { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 10px; }
.colors label { display: flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 6px; padding: 4px 8px; }
.danger-zone { border-color: #fecaca; }
dialog { border: none; border-radius: 10px; padding: 18px; width: min(460px, 92vw); }
dialog textarea { width: 100%; margin-top: 4px; }
dialog h3 { margin-top: 0; }
a { color: var(--accent); }
.tbl .msgs { min-width: 220px; }
.tbl td button { white-space: nowrap; }
.launch { display: flex; align-items: center; gap: 14px; width: 100%; margin: 16px 0 6px; padding: 14px 16px; text-align: left; border: 2px solid var(--ink); border-radius: 10px; background: #fff; color: var(--ink); transition: background .15s, color .15s; }
.launch:hover, .launch:focus-visible { background: var(--ink); color: #fff; }
.launch:hover small, .launch:focus-visible small { color: #d1d5db; }
.launch-icon { flex: none; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 8px; background: #f3f4f6; color: var(--ink); }
.launch-text { display: flex; flex-direction: column; gap: 3px; }
.launch-text b { font-size: 17px; }
.launch-text small { color: var(--muted); font-size: 12.5px; line-height: 1.4; }
.stats.three { grid-template-columns: repeat(3, 1fr); }
.launch.compact { margin-top: 14px; padding: 10px 14px; }
.agenda-head { font-size: 18px; font-weight: 700; margin: 0 0 4px; }
.badge { display: inline-block; padding: 1px 8px; border-radius: 99px; font-size: 12px; font-weight: 600; background: #e5e7eb; color: #374151; white-space: nowrap; }
.badge.running { background: #dbeafe; color: #1d4ed8; }
.badge.closing { background: #fef3c7; color: #92400e; }
.badge.closed { background: #dcfce7; color: #166534; }
.badge.void { background: #fee2e2; color: #991b1b; }
.res { font-size: 13px; line-height: 1.5; }
.res b.pass { color: var(--ok); }
.res b.fail { color: var(--danger); }
.form select.wide, .form input.wide, .form textarea.wide { width: 100%; margin-top: 4px; }
/* 조회자: 바꾸는 버튼·입력은 숨긴다 (서버도 모든 변경 요청을 거부) */
body.ro button:not(.ro-ok), body.ro .w, body.ro input[type=file], body.ro .danger-zone, body.ro #mock-panel, body.ro #mock-vote, body.ro #rehearsal-card { display: none !important; }
body.ro .form input, body.ro .form select, body.ro #colors input { pointer-events: none; opacity: .7; }
.role-badge { display: inline-block; margin-left: 6px; padding: 0 8px; border-radius: 99px; font-size: 12px; background: #e0e7ff; color: #3730a3; }
.role-badge.viewer { background: #e5e7eb; color: #374151; }
.role-badge.super { background: #fee2e2; color: #991b1b; }
.temp-pw { font: 700 24px ui-monospace, Consolas, monospace; letter-spacing: .08em; text-align: center; padding: 12px; background: #f3f4f6; border-radius: 8px; user-select: all; }
.card.rehearsal { border-color: #f59e0b; background: #fffbeb; }
.card.rehearsal input { min-width: 260px; }
.rh-banner { margin: 0 0 14px; padding: 10px 16px; border: 2px solid #dc2626; border-radius: 10px; background: #fef2f2; color: #7f1d1d; font-size: 14px; }
.rh-banner b { color: #b91c1c; font-size: 16px; margin-right: 8px; }
.badge.rh { background: #fee2e2; color: #b91c1c; }
.rh-opt { white-space: nowrap; color: #b91c1c; font-weight: 600; }
.purged { margin-top: 14px; border-top: 1px solid var(--line, #e5e7eb); padding-top: 10px; }
.purged summary { cursor: pointer; color: #6b7280; font-size: 14px; font-weight: 600; }
.purged[open] summary { margin-bottom: 6px; }
.v-agendas { list-style: none; margin: 8px 0; padding: 0; display: grid; gap: 4px; font-size: 14px; }
.v-agendas li { display: flex; gap: 8px; }
.v-agendas li span { margin-left: auto; color: #6b7280; white-space: nowrap; }
.st-list { display: grid; gap: 10px; margin: 8px 0 12px; }
.st-list .st-item { border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; }
.st-list .st-item b { display: block; margin-bottom: 6px; }
.kiosk-code { font: 700 26px ui-monospace, Consolas, monospace; letter-spacing: .25em; color: #1d4ed8; }
.emg-banner { background: #1e3a8a; color: #e0e7ff; padding: 6px 16px; font-size: 14px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: center; }
.emg-banner b { color: #fff; }
.emg-banner .mono { background: #0b1220; color: #fff; padding: 2px 8px; border-radius: 6px; }
.emg-banner button { padding: 2px 10px; font-size: 13px; }
#emg-card h3 { margin: 16px 0 4px; font-size: 15px; }
.msg { font-size: 14px; color: #1d4ed8; }
