*{box-sizing:border-box}
[hidden]{display:none!important}
:root{font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:#172554}
body{margin:0;height:100dvh;overflow:hidden;background:radial-gradient(circle at 9% 10%,#4d56aa 0,transparent 30%),radial-gradient(circle at 92% 85%,#813fa0 0,transparent 28%),linear-gradient(135deg,#0b1b42,#252666 55%,#1f4b68)}
body::before{content:"";position:fixed;inset:0;pointer-events:none;opacity:.24;background-image:radial-gradient(#fff 1.5px,transparent 2px);background-size:42px 42px;mask-image:linear-gradient(135deg,#000,transparent 70%)}
main{position:relative;height:100%;max-width:1400px;margin:auto;padding:clamp(8px,1.5vw,18px);display:flex;flex-direction:column;gap:9px}
.brand{display:flex;align-items:center;gap:12px;color:white;min-height:55px}
.brand-mark{width:49px;height:49px;display:grid;place-items:center;flex:none;font-size:27px;background:linear-gradient(140deg,#23c4f3,#7c3aed);border:2px solid #ffffff88;border-radius:16px;box-shadow:0 10px 25px #02061755}
.brand h1{font-size:clamp(21px,3vw,29px);line-height:1;margin:0;font-weight:900;letter-spacing:-.04em}
.brand small{display:block;margin-top:5px;color:#dbeafe;font-size:11px;font-weight:800;letter-spacing:.18em;text-transform:uppercase}
#message{margin:0;min-height:23px;color:#fef3c7;font-size:13px;font-weight:750}
button,input,select{font:inherit}
button{cursor:pointer;font-weight:800;border:0;border-radius:13px;padding:10px 14px;min-height:44px;color:#203060;background:white;box-shadow:0 3px 0 #1725541a}
button:disabled{opacity:.48;cursor:default}
button:focus-visible,input:focus-visible,select:focus-visible{outline:3px solid #fbbf24;outline-offset:2px}
#join{margin:auto;width:min(100%,465px);max-height:calc(100% - 88px);overflow:auto;padding:clamp(22px,5vw,34px);background:linear-gradient(155deg,#fff,#f1f7ff);border:1px solid #ffffffaa;border-radius:28px;box-shadow:0 25px 70px #050a2f88}
#join .join-icon{display:grid;place-items:center;width:62px;height:62px;margin-bottom:12px;border-radius:20px;font-size:34px;background:#ede9fe}
#join h2{font-size:29px;letter-spacing:-.05em;margin:0 0 3px;color:#14255a}
#join .sub{margin:0 0 19px;color:#526380}
label{display:block;margin:12px 0 6px;font-weight:750;color:#253777}
#join input:not([type=checkbox]),#join select{width:100%;min-height:48px;padding:10px 13px;border:1.5px solid #acbaf0;border-radius:13px;background:white;color:#172554}
#join #missing-label{display:flex;align-items:center;gap:8px;margin:12px 0 0;color:#5b34aa;cursor:pointer}
#join #missing{width:18px;height:18px;accent-color:#6d28d9}
#join button{width:100%;margin-top:22px;color:#fff;background:linear-gradient(100deg,#5636d9,#1689bc);box-shadow:0 9px 18px #4338ca33}
#join small{display:block;margin-top:14px;color:#60708b;font-size:12px;line-height:1.4}
#room{display:none;flex:1;min-height:0;flex-direction:column;gap:8px}
.bar{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.room-top{padding:10px 12px;border:1px solid #ffffff55;border-radius:17px;background:#ffffffea;box-shadow:0 8px 20px #07132a33}
.room-top strong{font-size:clamp(16px,2vw,21px);color:#1c2860;flex:1}
.room-top button{background:#edf2ff}
.room-top #peek{background:#6d28d9;color:#fff}
#wait{flex:1;min-height:0;display:grid;place-items:center;padding:18px;border:3px solid #ffffffaa;border-radius:25px;background:linear-gradient(135deg,#fef3c7,#fff7ed 45%,#e0f2fe);box-shadow:0 16px 36px #030d3855;text-align:center}
.waiting-art{font-size:clamp(58px,15vh,140px);line-height:1}
.waiting-title{font-size:clamp(24px,5vw,53px);line-height:1.03;font-weight:950;letter-spacing:-.055em;color:#1d3273}
.waiting-copy{max-width:500px;margin:13px auto 0;font-size:clamp(14px,2vw,20px);font-weight:650;color:#58658b}
#buzzer{justify-content:center;padding:8px;border-radius:17px;background:#fff5d8;border:2px solid #f59e0b}
#buzz{background:linear-gradient(120deg,#fbbf24,#fb923c);color:#41260b;font-size:clamp(18px,3vw,25px);min-height:55px;padding:9px 25px;box-shadow:0 5px 0 #c56b13}
#buzz-status{color:#654318;font-size:14px}
#tools{padding:6px 8px;border:1px solid #ffffff91;border-radius:15px;background:#ffffffea;box-shadow:0 5px 20px #02061733}
#tools label{margin:0;color:#26336a}
#tools select{min-height:42px;border:1px solid #b7c7eb;border-radius:10px;background:#fff;padding:5px}
#color{width:48px;height:43px;padding:2px;background:white;border:1px solid #b7c7eb;border-radius:10px}
#tools button{background:#e9edff}
#stage{flex:1;min-height:0;display:grid;place-items:center;padding:clamp(5px,1vw,13px);border:4px solid #ffffff77;border-radius:22px;background:linear-gradient(130deg,#38bdf8,#8b5cf6 55%,#fb7185);box-shadow:0 15px 34px #020c3355}
canvas{background:white;border-radius:14px;touch-action:none;max-width:100%;max-height:100%;box-shadow:0 8px 23px #16215066}
dialog{border:0;border-radius:24px;width:min(92vw,510px);max-height:88dvh;overflow:auto;padding:25px;color:#22336c;background:linear-gradient(145deg,#fff,#f3e8ff);box-shadow:0 25px 80px #02061770}
dialog::backdrop{background:#07152ec7}
#pictures{display:flex;flex-wrap:wrap;justify-content:center;gap:10px}
#pictures img{width:110px;height:110px;object-fit:contain}
#pictures figure{margin:0;text-align:center}
#title{font-size:25px}
#hide{width:100%;margin-top:10px;color:#fff;background:#6d28d9}
@media(max-width:600px){main{gap:6px}.brand{min-height:47px}.brand-mark{width:40px;height:40px;font-size:22px}.brand small{font-size:9px}#message{font-size:12px}.room-top{padding:7px}.room-top strong{width:100%}.room-top button{flex:1}#buzzer{padding:5px}#buzz{width:100%}#tools{justify-content:center}}
@media(max-height:530px){.brand{min-height:38px}.brand-mark{width:36px;height:36px}.brand small{display:none}#message{min-height:16px}#wait{padding:8px}.waiting-art{font-size:50px}.waiting-title{font-size:26px}.waiting-copy{margin:4px auto 0;font-size:13px}#buzzer{padding:3px}#buzz{min-height:40px;font-size:16px}}
