:root { --bg: #0a0b0f; --surface: #15171f; --surface2: #1c1f29; --border: #242833; --border2: #353b49; --text: #f1f2f7; --dim: #969cad; --accent: #6366f1; --grad: linear-gradient(135deg, #6366f1, #8b5cf6 50%, #06b6d4); }
* { box-sizing: border-box; margin: 0; }
body { background: var(--bg); color: var(--text); font-family: 'Inter', system-ui, sans-serif; min-height: 100vh; display: flex; flex-direction: column; align-items: center; -webkit-font-smoothing: antialiased; }
header { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 13px 22px; border-bottom: 1px solid var(--border); flex-wrap: wrap; background: rgba(10,11,15,.7); backdrop-filter: blur(12px); position: sticky; top: 0; z-index: 5; }
.brand { font-weight: 800; font-size: 19px; letter-spacing: -0.4px; display: flex; align-items: center; gap: 9px; }
.dot { width: 11px; height: 11px; border-radius: 50%; background: var(--grad); box-shadow: 0 0 12px rgba(139,92,246,.8); }
.meta { color: var(--dim); font-size: 12.5px; display: flex; align-items: center; gap: 7px; } .meta b { color: var(--text); } .meta .sep { opacity: .4; }
#status.on { color: #34d399; } #status.off { color: #fbbf24; }
.rooms { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--dim); flex-wrap: wrap; }
.rooms #roomlabel { font-weight: 600; color: var(--text); }
.hbtn { background: var(--surface2); border: 1px solid var(--border); color: var(--text); border-radius: 8px; padding: 6px 10px; font-size: 11.5px; font-weight: 600; font-family: inherit; cursor: pointer; }
.hbtn:hover { border-color: var(--accent); }
main { flex: 1; display: flex; align-items: center; justify-content: center; padding: 8px; width: 100%; }
.stage { position: relative; width: min(94vw, 84vh); height: min(94vw, 84vh); }
#c { width: 100%; height: 100%; display: block; background: #fff; border: 1px solid var(--border2); border-radius: 8px; cursor: crosshair; touch-action: none; box-shadow: 0 26px 80px -28px #000; }
#cursors { position: absolute; inset: 0; overflow: hidden; pointer-events: none; border-radius: 8px; }
.rcur { position: absolute; top: 0; left: 0; pointer-events: none; transform: translate(-2px, -3px); transition: left .07s linear, top .07s linear; will-change: left, top; }
.rcur svg { display: block; filter: drop-shadow(0 1px 2px rgba(0,0,0,.5)); }
.rcur .lab { position: absolute; left: 13px; top: 11px; white-space: nowrap; font-size: 11px; font-weight: 700; color: #fff; padding: 2px 7px; border-radius: 9px; box-shadow: 0 1px 3px rgba(0,0,0,.45); }
.trail { position: absolute; width: 9px; height: 9px; border-radius: 50%; transform: translate(-50%, -50%); pointer-events: none; opacity: .5; animation: trailfade .65s linear forwards; }
@keyframes trailfade { to { opacity: 0; transform: translate(-50%, -50%) scale(.25); } }

.bar { display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap; padding: 12px 14px; margin: 0 12px; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; max-width: 940px; }
.sec { display: flex; align-items: center; gap: 9px; }
.sec.colors { order: 1; flex-basis: 100%; justify-content: center; }
.lbl { font-size: 11px; text-transform: uppercase; letter-spacing: 1px; color: var(--dim); }
.brushes { display: flex; gap: 6px; }
.bz { width: 34px; height: 34px; border-radius: 9px; background: var(--surface2); border: 1px solid var(--border); cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 0; }
.bz .ball { background: var(--text); border-radius: 50%; }
.bz.on { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(99,102,241,.35); }
.tool { background: var(--surface2); border: 1px solid var(--border); color: var(--text); border-radius: 9px; padding: 8px 13px; font-size: 12.5px; font-weight: 600; font-family: inherit; cursor: pointer; white-space: nowrap; }
.tool:hover { border-color: var(--accent); }
.tool.on { background: var(--grad); border-color: transparent; color: #fff; }
.vote { background: transparent; } .vote.voted { background: linear-gradient(135deg,#fb7185,#e11d48); border-color: transparent; color: #fff; }
.vote span { opacity: .85; font-variant-numeric: tabular-nums; }
.swatches { display: grid; grid-template-columns: repeat(14, 24px); gap: 5px; justify-content: center; }
.sw { width: 24px; height: 24px; border-radius: 6px; border: 2px solid transparent; cursor: pointer; padding: 0; box-shadow: inset 0 0 0 1px rgba(255,255,255,.12); }
.sw:hover { transform: translateY(-2px); }
.sw.on { border-color: #fff; box-shadow: 0 0 0 2px var(--accent); }
.picker { display: inline-flex; width: 34px; height: 34px; border-radius: 9px; overflow: hidden; border: 1px solid var(--border2); cursor: pointer; }
.picker input { width: 150%; height: 150%; margin: -25%; border: none; background: none; cursor: pointer; padding: 0; }
.hint { color: var(--dim); font-size: 11.5px; padding: 8px 16px 12px; text-align: center; max-width: 520px; }
@media (max-width: 560px) { .bar { gap: 10px; } .sec.colors { order: -1; width: 100%; } .swatches { grid-template-columns: repeat(7, 24px); } }

.gate { position: fixed; inset: 0; z-index: 100; background: rgba(6,7,12,.84); backdrop-filter: blur(8px); display: flex; align-items: center; justify-content: center; padding: 20px; }
.gate.hidden { display: none; }
.gatebox { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 28px 26px; width: 360px; max-width: 92vw; text-align: center; box-shadow: 0 30px 90px -30px #000; }
.gatebox .brand { justify-content: center; font-size: 22px; margin-bottom: 14px; }
.gatebox .g1 { font-size: 15px; margin-bottom: 16px; }
.gatebox input { width: 100%; background: var(--surface2); border: 1px solid var(--border2); border-radius: 10px; color: var(--text); padding: 12px 14px; font-size: 15px; font-family: inherit; outline: none; text-align: center; }
.gatebox input:focus { border-color: var(--accent); }
.nameerr { color: #fb7185; font-size: 12.5px; min-height: 16px; margin: 8px 0; }
.gatebox button { width: 100%; background: var(--grad); color: #fff; border: none; border-radius: 10px; padding: 12px; font-size: 14.5px; font-weight: 700; font-family: inherit; cursor: pointer; }
.gatebox .fine { color: var(--dim); font-size: 11.5px; line-height: 1.5; margin-top: 14px; }

.sidebar { position: fixed; left: 14px; top: 72px; width: 178px; max-height: 62vh; overflow-y: auto; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 10px 12px; z-index: 3; }
.sb-h { font-size: 11px; text-transform: uppercase; letter-spacing: 1px; color: var(--dim); margin-bottom: 8px; } .sb-h b { color: var(--text); }
.sidebar ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 3px; }
.sidebar li { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 13px; padding: 2px 0; }
.uname { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cdot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; box-shadow: inset 0 0 0 1px rgba(255,255,255,.25); }
.uctry { color: var(--dim); font-size: 11px; flex-shrink: 0; }
@media (max-width: 1060px) { .sidebar { display: none; } }
