:root { --bg:#0a0a10; --panel:#12121b; --line:#23232f; --text:#f3eefb; --mut:#aba6c0;
  --cyan:#2FD3FF; --mag:#FF1FA0; --pur:#B14BFF; --org:#FF9F1C; --grn:#2EE6A6; --red:#ff5470; }
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font-family: 'Inter', Arial, sans-serif; -webkit-font-smoothing: antialiased; }
button { font-family: inherit; cursor: pointer; }
.b { max-width: 520px; margin: 0 auto; padding: max(16px, env(safe-area-inset-top)) 18px max(24px, env(safe-area-inset-bottom)); min-height: 100vh; display: flex; flex-direction: column; gap: 16px; }
.b__top { display: flex; justify-content: space-between; align-items: center; }
.b__brand { font-size: 26px; font-weight: 800; }
.b__brand span { color: var(--mag); }
.b__brand small { font-size: 15px; color: var(--mut); font-weight: 700; margin-left: 4px; }
.b__pill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 13px; border-radius: 20px; border: 1px solid var(--line); background: var(--panel); font-size: 13px; font-weight: 700; color: var(--mut); }
.b__pill .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--mut); }
.b__pill.is-live { color: #c9f7e6; border-color: rgba(46,230,166,.5); }
.b__pill.is-live .dot { background: var(--grn); box-shadow: 0 0 0 4px rgba(46,230,166,.18); animation: blink 1.6s infinite; }
.b__pill.is-wait .dot { background: var(--org); }
@keyframes blink { 50% { opacity: .4; } }

body.is-setup .b__live, body.is-live .b__setup { display: none; }
.b__setup h1 { font-size: 28px; line-height: 1.15; margin: 8px 0 6px; }
.b__lead { color: var(--mut); margin: 0 0 18px; line-height: 1.45; }
.b__small { color: var(--mut); font-size: 13px; line-height: 1.4; margin: 6px 0 0; text-align: center; }

.b__lists { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.b__lists button { text-align: left; border: 2px solid var(--line); background: var(--panel); color: var(--text); border-radius: 18px; padding: 18px 16px; }
.b__lists button b { display: block; font-size: 22px; margin-bottom: 4px; }
.b__lists button span { font-size: 13px; color: var(--mut); }
.b__lists button.is-active { border-color: var(--mag); background: linear-gradient(135deg, rgba(255,31,160,.18), rgba(177,75,255,.12)); }
.b__lists--small button { padding: 10px 14px; }
.b__lists--small button b { font-size: 16px; margin: 0; }
.b__lists--small button span { display: none; }

.b__start { margin-top: 16px; width: 100%; border: 0; border-radius: 18px; padding: 20px; font-size: 19px; font-weight: 800; color: #fff;
  background: linear-gradient(90deg, #FF1FA0, #B14BFF); box-shadow: 0 10px 30px rgba(255,31,160,.35); }
.b__start:disabled { opacity: .5; }

.b__qr { border: 0; background: #fff; border-radius: 22px; padding: 14px 14px 12px; display: flex; flex-direction: column; align-items: center; gap: 6px; box-shadow: 0 0 0 6px rgba(255,31,160,.25), 0 20px 50px rgba(177,75,255,.3); }
.b__qr canvas { width: 100%; max-width: 360px; height: auto; display: block; }
.b__qr span { color: #111; font-weight: 800; font-size: 16px; }
.b__url { text-align: center; margin: -4px 0 0; font-size: 14px; color: var(--cyan); font-weight: 700; word-break: break-all; }

.b__now { display: flex; gap: 14px; align-items: center; background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 12px; }
.b__now video { width: 96px; height: 54px; border-radius: 10px; object-fit: cover; background: #000; flex: none; }
.b__nowtext { min-width: 0; }
.b__eyebrow { margin: 0; font-size: 11px; font-weight: 800; letter-spacing: 1.3px; text-transform: uppercase; color: var(--cyan); }
.b__now h2 { margin: 2px 0; font-size: 19px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.b__now p:last-child { margin: 0; color: var(--mut); font-size: 14px; }
.b__bar { height: 4px; background: var(--line); border-radius: 4px; overflow: hidden; margin-top: -8px; }
.b__bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--mag), var(--pur)); }

.b__ctrl { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.b__ctrl button { border: 1px solid var(--line); background: #1a1a26; color: var(--text); border-radius: 14px; padding: 14px 0; font-size: 20px; }
.b__ctrl #btnSound { grid-column: 1 / -1; font-size: 15px; font-weight: 700; padding: 12px; }
.b__ctrl #btnSound.is-on { border-color: rgba(46,230,166,.5); color: #c9f7e6; }

.b__big { position: fixed; inset: 0; background: #fff; color: #111; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; padding: 24px; z-index: 10; text-align: center; }
.b__big[hidden] { display: none; }
.b__big canvas { width: min(88vw, 70vh); height: auto; }
.b__big p { font-size: clamp(20px, 3.2vh, 34px); margin: 0; line-height: 1.3; }
.b__big b { color: var(--mag); }
.b__close { color: #888; font-size: 14px; }

.b__live { display: flex; flex-direction: column; gap: 16px; }
.b__side { display: flex; flex-direction: column; gap: 16px; }
body.is-setup .b__live { display: none; }
@media (min-width: 900px) {
  body.is-live .b { max-width: 1000px; }
  body.is-live .b__live { flex-direction: row; align-items: center; gap: 36px; margin-top: 4vh; }
  body.is-live .b__qr { flex: 0 0 46%; }
  body.is-live .b__side { flex: 1; }
  body.is-live .b__url { text-align: left; font-size: 18px; }
}
