:root{--bg:#0e0f18;--surface:#171826;--surface-2:#1e2030;--line:#2c2f45;--fg:#eceef9;--muted:#9ba1c0;--accent:#a58bff;--accent-fg:#14092f;--accent-soft:#2b2352;--good:#5fd391;--good-soft:#173a29;--warn:#f0b35c;--warn-soft:#3b2c12;--bad:#ff7a8e;--font-display:"Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;--font-body:"IBM Plex Sans", "Segoe UI", system-ui, sans-serif;--font-mono:"IBM Plex Mono", Consolas, monospace;--radius:10px;--radius-sm:8px;--radius-pill:999px;--shadow-raised:0 1px 2px #0006, 0 8px 28px #00000059;--twitch:#9146ff}body{color:#f4f4f5;background:#18181b;margin:0;padding:0;font-family:Segoe UI,Arial,sans-serif;font-size:16px}ol{padding-left:1.5rem}p{margin:0 0 1.5rem}a{color:#38bdf8;text-decoration:none;transition:color .2s}a:hover{color:#f472b6}input:focus,textarea:focus,select:focus{border-color:#a78bfa}code{color:#f4f4f5;overflow-wrap:break-word;background:#2d2d34;border-radius:4px;max-width:100%;padding:2px 4px;font-family:Courier New,Courier,monospace}.error{color:#ff4d4d;background-color:#300;border:1px solid maroon;border-radius:3px;padding:.5rem}.info{color:#38bdf8;background-color:#0a2540;border:1px solid #004080;border-radius:3px;padding:.5rem}.divider{border:none;border-top:1px solid #323133;margin:1rem 0}.chat{box-sizing:border-box;text-align:left;width:500px;height:100vh;font-size:22px;position:relative;overflow:hidden}.chat ::-webkit-scrollbar{background:0 0;width:0}.chat-disappearing{flex-direction:column;justify-content:end;height:100%;display:flex;overflow:auto}.chat-disappearing--top{justify-content:start}.chat-message{all:unset;box-sizing:border-box;overflow-wrap:anywhere;width:100%;padding:.2rem;line-height:22px}.chat-message-body{border-radius:var(--message-radius,3px);background-color:var(--message-background,transparent);line-height:var(--line-height,32px);isolation:isolate;background-position:0 0,0 100%;background-repeat:no-repeat;background-size:100% 3px;border-left:3px solid #0000;border-right:3px solid #0000;flex-direction:row;padding:0;display:flex;position:relative}.chat-message-body-subscriber{background-image:linear-gradient(90deg,#725a1e,#fff9ab),linear-gradient(90deg,#725a1e,#fff9ab);border-left:3px solid #725a1e;border-right:3px solid #fff9ab;padding:6px 4px}.chat-message-body-highlighted:before{content:"";z-index:-1;border-radius:inherit;background:var(--highlight-background);pointer-events:none;position:absolute;inset:0}.chat-message-body-spotlighted{background:linear-gradient(90deg,#be36ec,#0737b0);border-left:3px solid #be36ec;border-right:3px solid #0737b0}.chat-message-body-gigantified>span>span.chat-message-text>img:last-of-type{width:112px;height:112px;max-height:unset}.chat-message-reply{text-overflow:ellipsis;white-space:nowrap;opacity:.7;font-size:.7em;line-height:1.4;display:block;overflow:hidden}.chat-message-notice-label{letter-spacing:.08em;vertical-align:middle;margin-right:.5em;font-size:.7em;font-weight:700}.chat-message-nick{white-space:nowrap;text-overflow:ellipsis;padding-right:.2em;font-weight:700;display:inline-block;overflow:visible}.chat-message-nick-alias{opacity:.6;font-weight:400}.chat-message-text{word-break:break-word}.chat-message-text-action{font-style:italic}.chat-message-badge{height:var(--badge-size,1.2rem);width:unset;vertical-align:middle;border-radius:3px;margin-bottom:.3rem;margin-right:.3rem}.chat-message-avatar-image{height:var(--avatar-size,36px);width:var(--avatar-size,36px);vertical-align:middle;border-radius:4px;margin-bottom:.05rem;margin-right:.3rem;display:inline-block}.chat-emote{max-height:var(--emote-size,36px);vertical-align:middle;display:inline-block}.chat-emote--flipy{transform:scaleY(-1)}.chat-emote--flipx{transform:scaleX(-1)}.chat-emote--cursed{filter:grayscale()brightness(.7)contrast(2.5)}.chat-emote--hyperred{filter:brightness(.2)sepia()brightness(2.2)contrast(3)saturate(8)}.chat-emote--party{animation:1.5s linear infinite party}.chat-emote--shake{animation:.5s step-start infinite shake}.chat-emote--rotate{transform:rotate(90deg)}.chat-emote--rotate-left{transform:rotate(-90deg)}.chat-emote--zero-width-wrapper{vertical-align:middle;display:inline-grid}.chat-emote--zero-width-wrapper>*{grid-area:1/1;place-self:center}.chat-emote--zero-width-img{pointer-events:none}.chat-emote--emoji{max-height:calc(var(--emote-size,36px) * .78)}.chat-cheer{vertical-align:middle}.chat-cheer-amount{font-weight:700;font-size:rem;margin-left:.2rem}.chat-gif{border-radius:.4rem;width:auto;max-height:140px;margin:.4rem 0;transition:filter .15s;display:block}.chat-emote--shake.chat-emote--party{animation:.5s step-start infinite shake,1.5s linear infinite party}.chat-emote--flipy.chat-emote--flipx{transform:scaleX(-1)scaleY(-1)}@keyframes hide{0%{opacity:1}to{opacity:0}}@keyframes party{0%{filter:sepia(.5)hue-rotate()saturate(2.5)}to{filter:sepia(.5)hue-rotate(1turn)saturate(2.5)}}@keyframes shake{0%{translate:0 1px}10%{translate:2px}20%{translate:1px -2px}30%{translate:-2px 1px}40%{translate:0 -1px}50%{translate:2px 2px}60%{translate:-1px -1px}70%{translate:-2px 2px}80%{translate:2px 1px}90%{translate:-1px -2px}to{translate:1px}}.chat-token-expired{z-index:10;color:#fff;text-align:left;background:#b3261e;gap:2px;padding:.4em .6em;font-size:.8em;line-height:1.3;display:grid;position:absolute;top:0;left:0;right:0}.button{border:1px solid var(--line);border-radius:var(--radius-sm);cursor:pointer;white-space:nowrap;background:var(--surface);color:var(--fg);justify-content:center;align-items:center;gap:6px;padding:8px 14px;font-family:inherit;font-size:.875rem;font-weight:500;line-height:1.2;transition:border-color .15s,background .15s,filter .15s;display:inline-flex}.button:hover{border-color:var(--muted)}.button:focus-visible{outline:2px solid var(--accent);outline-offset:2px}.button:disabled{cursor:default;background:var(--surface-2);border-color:var(--line);color:var(--muted);filter:none}.button-primary{background:var(--accent);border-color:var(--accent);color:var(--accent-fg)}.button-primary:hover{border-color:var(--accent);filter:brightness(1.08)}.button-secondary{background:var(--surface-2)}.button-ghost{color:var(--muted);background:0 0;border-color:#0000}.button-ghost:hover{background:var(--surface-2);color:var(--fg);border-color:#0000}.button-danger{color:var(--bad);background:0 0;border-color:#0000}.button-danger:hover{border-color:var(--bad)}.button-twitch{border-color:var(--twitch);background:var(--twitch);color:#fff;border-radius:10px;padding:11px 20px;font-size:15px}.button-twitch:hover{border-color:var(--twitch);filter:brightness(1.1)}.source-url{background:var(--surface-2);border:1px solid var(--line);border-radius:var(--radius-sm);min-width:0;font-family:var(--font-mono);color:var(--fg);text-align:left;text-overflow:ellipsis;white-space:nowrap;cursor:pointer;flex:200px;padding:7px 12px;font-size:12.5px;overflow:hidden}.source-url:hover{border-color:var(--muted)}.source-url-open{white-space:normal;overflow-wrap:anywhere}.source-url-key{color:var(--accent)}.source-url-muted{color:var(--muted)}.toast-wrapper{z-index:1000;pointer-events:none;position:fixed;bottom:1rem;right:1rem}.toast{pointer-events:auto;background:var(--surface-2);color:#f4f4f5;border:1px solid var(--line);border-radius:10px;align-items:center;gap:.75rem;min-width:260px;padding:.75rem .75rem .75rem 1rem;display:flex;box-shadow:0 10px 30px #00000059,0 2px 8px #0003}.toast-content{flex-direction:column;display:flex}.toast-title{color:var(--accent);font-size:.9rem;font-weight:700}.toast-message{opacity:.95;font-size:.9rem}.toast-close{color:#f4f4f5;cursor:pointer;background:0 0;border:none;border-radius:6px;padding:.25rem .5rem;font-size:1.25rem;line-height:1;transition:background .12s}.toast-close:hover{background:#e879f91f}.chat-preview-container{gap:12px;min-width:0;display:grid}.chat-preview-head{flex-wrap:wrap;align-items:center;gap:10px;display:flex}.chat-preview-head h2{color:var(--fg);margin:0 auto 0 0;font-size:16px}.chat-preview-swatches{gap:6px;display:flex}.chat-preview-swatch{border:2px solid var(--surface);width:22px;height:22px;box-shadow:0 0 0 1px var(--line);cursor:pointer;border-radius:50%;padding:0}.chat-preview-swatch[aria-pressed=true]{box-shadow:0 0 0 2px var(--accent)}.chat-preview-swatch:focus-visible{outline:2px solid var(--accent);outline-offset:2px}.chat-preview{--stage-a:#1c2447;--stage-b:#3a2a6b;background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);height:clamp(380px,100vh - 190px,620px);box-shadow:var(--shadow-raised);background:linear-gradient(135deg, var(--stage-a), var(--stage-b));align-items:stretch;display:flex;position:relative;overflow:hidden}.chat-preview:before{content:"";pointer-events:none;background:radial-gradient(circle at 70% 30%,#ffffff24,#0000 45%),repeating-linear-gradient(0deg,#ffffff0a 0 1px,#0000 1px 48px),repeating-linear-gradient(90deg,#ffffff0a 0 1px,#0000 1px 48px);position:absolute;inset:0}.chat-preview-size{color:#ffffff8c;font:500 11px var(--font-mono);letter-spacing:.04em;position:absolute;top:12px;right:14px}.chat-preview-overlay{outline-offset:4px;outline:1px dashed #ffffff59;flex-direction:column;justify-content:flex-end;align-self:stretch;max-width:calc(100% - 28px);margin:14px;display:flex;position:relative;overflow:hidden}.chat-preview-overlay--top{justify-content:flex-start}.chat-preview-foot{color:var(--muted);flex-wrap:wrap;align-items:center;gap:10px;font-size:13px;display:flex}.color-picker{align-items:center;gap:8px;display:flex}.color-picker input[type=color]{border:1px solid var(--line);border-radius:var(--radius-sm);background:var(--surface-2);cursor:pointer;flex:none;width:38px;height:34px;padding:2px}.color-picker-text{font-family:var(--font-mono);font-size:13px}.color-picker-twitch{border-radius:var(--radius-sm);border:1px solid var(--line);background:linear-gradient(90deg,#be36ec,#0737b0);flex:none;width:38px;height:34px}.color-picker-checker{border-radius:var(--radius-sm);border:1px solid var(--line);background:conic-gradient(var(--line) 25%, var(--surface-2) 0 50%, var(--line) 0 75%, var(--surface-2) 0) 0 0 / 12px 12px;flex:none;width:38px;height:34px}.color-picker .button{padding:6px 10px}.color-value{gap:8px;display:grid}.color-value-second .color-picker-text{flex:none;width:120px}.color-value-preview{border:1px solid var(--line);border-radius:var(--radius-sm);flex:1;min-width:0;height:34px}.color-compact{align-items:center;gap:4px;display:inline-flex}.color-compact input[type=color]{border:1px solid var(--line);border-radius:var(--radius-sm);background:var(--surface);cursor:pointer;width:34px;height:30px;padding:2px}.color-compact-button{border:1px solid var(--line);border-radius:var(--radius-sm);background:var(--surface);width:26px;height:30px;color:var(--muted);cursor:pointer;padding:0;font-size:16px;line-height:1}.color-compact-button:hover{border-color:var(--muted);color:var(--fg)}.filter-editor,.filter-editor-rules{gap:8px;display:grid}.filter-editor-rule{border:1px solid var(--line);border-radius:var(--radius-sm);background:var(--surface-2);grid-template-columns:104px minmax(0,1fr) auto auto;align-items:center;gap:8px;padding:10px;display:grid}.filter-editor-rule-extra{grid-template-columns:104px minmax(0,1fr) auto auto auto}@media (width<=520px){.filter-editor-rule,.filter-editor-rule-extra{grid-template-columns:1fr 1fr}.filter-editor-rule input[type=text]{order:3;grid-column:1/-1}}.filter-editor-color{border:1px solid var(--line);border-radius:var(--radius-sm);background:var(--surface);cursor:pointer;width:34px;height:30px;padding:2px}.filter-editor-case{color:var(--muted);white-space:nowrap;align-items:center;gap:6px;font-size:12.5px;display:flex}.filter-editor-remove{border-radius:var(--radius-sm);width:30px;height:30px;color:var(--muted);cursor:pointer;background:0 0;border:0;place-items:center;padding:0;display:grid}.filter-editor-remove:hover{background:var(--surface);color:var(--bad)}.filter-editor-empty{text-align:center;color:var(--muted);border:1px dashed var(--line);border-radius:var(--radius-sm);padding:16px}.font-family-field{flex-direction:column;gap:8px;display:flex}.form-field{gap:6px;display:grid}.form-field>label{font-size:13px;font-weight:500}.switch-row{cursor:pointer;justify-content:space-between;align-items:center;gap:16px;display:flex}.switch-row-text{min-width:0;display:grid}.switch-row-text b{font-weight:500}.switch-row-text small{color:var(--muted);font-size:12.5px}.switch-row-switch{appearance:none;background:var(--line);cursor:pointer;border-radius:999px;flex:none;width:38px;height:22px;margin:0;transition:background .15s;position:relative}.switch-row-switch:after{content:"";background:#fff;border-radius:50%;width:16px;height:16px;transition:transform .15s;position:absolute;top:3px;left:3px;box-shadow:0 1px 2px #0000004d}.switch-row-switch:checked{background:var(--accent)}.switch-row-switch:checked:after{transform:translate(16px)}.switch-row-switch:focus-visible{outline:2px solid var(--accent);outline-offset:2px}@media (prefers-reduced-motion:reduce){.switch-row-switch,.switch-row-switch:after{transition:none}}.unit-field{align-items:center;gap:8px;display:flex}.unit-field input[type=range]{min-width:0;accent-color:var(--accent);flex:1}.unit-field input[type=number]{font-variant-numeric:tabular-nums;flex:none;width:84px}.unit-field select{background-position:right 8px center;flex:none;width:76px;padding-right:24px}.unit-field .button{padding:4px 8px}.source-strip{background:var(--surface);border-bottom:1px solid var(--line)}.source-strip-inner{flex-wrap:wrap;align-items:center;gap:12px;padding-block:10px;display:flex}.source-strip-label{color:var(--muted);letter-spacing:.08em;text-transform:uppercase;font-size:11px;font-weight:600}.studio-editor{grid-template-columns:minmax(0,480px) minmax(0,1fr);align-items:start;gap:20px;padding-block:20px 56px;display:grid}.studio-editor .chat-preview-container{position:sticky;top:16px}@media (width<=920px){.studio-editor{grid-template-columns:minmax(0,1fr)}.studio-editor .chat-preview-container{order:-1;position:static}}.panel{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow-raised);min-width:0}.panel-head{align-items:center;gap:4px;padding:14px 14px 0 18px;display:flex}.panel-head h2{color:var(--fg);margin:0 auto 0 0;font-size:16px}.drawer{background:var(--surface-2);border:1px solid var(--line);border-radius:var(--radius-sm);gap:8px;margin:12px 18px 0;padding:12px;display:grid}.tabs{border-bottom:1px solid var(--line);scrollbar-width:none;gap:2px;padding:8px 8px 0;display:flex;overflow:auto hidden}.tabs button{color:var(--muted);font:inherit;white-space:nowrap;cursor:pointer;background:0 0;border:0;border-bottom:2px solid #0000;align-items:center;gap:6px;margin-bottom:-1px;padding:9px 10px;font-weight:500;display:flex}.tabs button[aria-selected=true]{color:var(--fg);border-bottom-color:var(--accent)}.tabs button:focus-visible{outline:2px solid var(--accent);outline-offset:-2px}.tabs-count{border-radius:var(--radius-pill);background:var(--accent-soft);color:var(--accent);padding:0 6px;font-size:11px;font-weight:600}.tabpane{gap:4px;padding:8px 18px 18px;display:grid}.group{border-bottom:1px solid var(--line);gap:12px;padding-block:14px;display:grid}.group:last-child{border-bottom:0}.group>h3{color:var(--muted);letter-spacing:.08em;text-transform:uppercase;font-size:11px;font-weight:600;font-family:var(--font-body);margin:0;font-size:13px}.help{color:var(--muted);font-size:12.5px}.help summary{color:var(--accent);cursor:pointer}.help p{margin-top:6px}.applybar{background:var(--surface);border-top:1px solid var(--line);border-radius:0 0 var(--radius) var(--radius);align-items:center;gap:12px;padding:12px 18px;display:flex;position:sticky;bottom:0}.applybar-note{color:var(--muted);flex:1;font-size:13px}.token-banner{background:var(--warn-soft);border:1px solid var(--warn);border-radius:var(--radius);color:var(--warn);flex-wrap:wrap;justify-content:space-between;align-items:center;gap:16px;margin-top:16px;padding:12px 16px;display:flex}.token-banner-text{min-width:0;display:grid}.token-banner-text b{font-weight:600}.token-banner-text span{color:var(--fg)}.studio-header{background:var(--surface);border-bottom:1px solid var(--line)}.studio-header-inner{flex-wrap:wrap;align-items:center;gap:16px;padding-block:12px;display:flex}.studio-brand{font-family:var(--font-display);align-items:center;gap:10px;font-size:18px;font-weight:700;display:flex}.studio-brand svg{color:var(--accent)}.studio-nav{gap:4px;margin-left:12px;display:flex}.studio-nav button{color:var(--muted);font:inherit;cursor:pointer;background:0 0;border:0;border-radius:8px;padding:6px 12px;font-weight:500}.studio-nav button[aria-current=true]{background:var(--accent-soft);color:var(--accent)}.studio-nav button:focus-visible{outline:2px solid var(--accent);outline-offset:2px}.studio-spacer{flex:1}.studio-who{border:1px solid var(--line);border-radius:var(--radius-pill);align-items:center;gap:8px;padding:4px 6px 4px 10px;font-size:13px;display:flex}.studio-who small{color:var(--muted);font-family:var(--font-mono);font-size:11px}.studio-who .button{padding:4px 10px}.studio-who-dot{background:var(--good);width:8px;height:8px;box-shadow:0 0 0 3px var(--good-soft);border-radius:50%}.twitch-connect-page-logged-out{grid-template-columns:minmax(0,1.1fr) minmax(0,.9fr);align-items:center;gap:40px;min-height:70vh;padding-block:40px;display:grid}@media (width<=860px){.twitch-connect-page-logged-out{grid-template-columns:minmax(0,1fr)}}.twitch-connect-page-logged-out .chat-preview{height:440px}.twitch-connect-page-logged-out .chat-preview-foot{display:none}.logged-out-copy{justify-items:start;gap:18px;display:grid}.logged-out-copy h1{color:var(--fg);text-wrap:balance;margin:0;font-size:clamp(30px,5vw,48px);line-height:1.05}.logged-out-copy .lead{max-width:46ch;color:var(--muted);margin:0;font-size:16px}.permissions{border:1px solid var(--line);background:var(--surface);max-width:52ch;color:var(--muted);border-radius:8px;gap:6px;padding:12px 14px;font-size:13px;display:grid}.permissions b{color:var(--fg);font-weight:600}.permissions ul{gap:4px;margin:0;padding:0;list-style:none;display:grid}.permissions-yes{color:var(--good)}.permissions-no{color:var(--bad)}.obs{grid-template-columns:minmax(0,1.1fr) minmax(0,.9fr);align-items:start;gap:24px;padding-block:24px 56px;display:grid}@media (width<=860px){.obs{grid-template-columns:minmax(0,1fr)}}.obs-side{gap:20px;min-width:0;display:grid}.obs-url{gap:8px;margin-top:8px;display:flex}.card{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow-raised);gap:14px;min-width:0;padding:22px;display:grid}.card h2,.card h3{color:var(--fg);margin:0}.card .pill{justify-self:start}.steps{counter-reset:step;gap:18px;margin:0;padding:0;list-style:none;display:grid}.steps li{counter-increment:step;grid-template-columns:30px minmax(0,1fr);column-gap:12px;display:grid}.steps li:before{content:counter(step);background:var(--accent-soft);width:28px;height:28px;color:var(--accent);border-radius:50%;grid-row:span 3;place-items:center;font-size:13px;font-weight:600;display:grid}.steps li b{font-weight:600}.steps li p{color:var(--muted);margin:2px 0 0}.kv{grid-template-columns:auto 1fr;gap:4px 14px;margin:0;display:grid}.kv dt{color:var(--muted)}.kv dd{font-family:var(--font-mono);margin:0}.studio{background:var(--bg);min-height:100vh;color:var(--fg);font-family:var(--font-body);font-size:14px;line-height:1.5}.studio h1,.studio h2,.studio h3{font-family:var(--font-display);letter-spacing:-.01em}.studio p{margin:0}.studio a{color:var(--accent)}.studio code{font-family:var(--font-mono);background:var(--surface-2);color:var(--fg);font-size:12.5px}.studio :where(select,input[type=text],input[type=number]){box-sizing:border-box;background:var(--surface-2);width:100%;min-width:0;color:var(--fg);border:1px solid var(--line);border-radius:var(--radius-sm);font:inherit;padding:7px 10px}.studio :where(select,input[type=text],input[type=number]):hover{border-color:var(--muted)}.studio :where(select,input[type=text],input[type=number]):focus-visible{outline:2px solid var(--accent);outline-offset:1px}.studio :where(select){appearance:none;cursor:pointer;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none' stroke='%238b90b0' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1.5 1.75 6 6.25l4.5-4.5'/%3E%3C/svg%3E");background-position:right 12px center;background-repeat:no-repeat;padding-right:32px}.studio :where(input[type=checkbox]){accent-color:var(--accent)}.studio-wrap{box-sizing:border-box;max-width:1320px;margin-inline:auto;padding-inline:16px}.studio-footer{text-align:center;color:var(--muted);padding:24px 16px;font-size:13px}.studio-footer p{margin:0 0 6px}.pill{border-radius:var(--radius-pill);white-space:nowrap;background:var(--surface-2);color:var(--muted);align-items:center;padding:2px 10px;font-size:12px;font-weight:500;display:inline-flex}.pill-good{background:var(--good-soft);color:var(--good)}.pill-warn{background:var(--warn-soft);color:var(--warn)}.hint{color:var(--muted);margin:0;font-size:12.5px}.hint-error{color:var(--bad)}.inline{align-items:center;gap:8px;display:flex}.inline-wrap{flex-wrap:wrap}.inline input[type=range]{min-width:0;accent-color:var(--accent);flex:1}.inline input[type=number]{font-variant-numeric:tabular-nums;flex:none;width:84px}
