@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;650;700;800&display=swap');
:root{--paper:#0a0e14;--ink:#edf2f8;--muted:#9cabbc;--accent:#8bf17a;--line:#26313e;--panel:#111822;--white:#151e29;font-family:Inter,system-ui,sans-serif;color:var(--ink);background:var(--paper);font-synthesis:none;color-scheme:dark}
*{box-sizing:border-box}body{margin:0;background:radial-gradient(ellipse at 30% 0,#15241d88,transparent 50%);min-height:100vh}button,input,select,textarea{font:inherit}button{cursor:pointer;color:inherit}button:disabled{cursor:default;opacity:.5}a{color:inherit;text-decoration:none}svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;flex-shrink:0}.svg-defs{position:absolute;width:0;height:0;overflow:hidden}[hidden]{display:none!important}button:focus-visible,a:focus-visible,summary:focus-visible{outline:2px solid var(--accent);outline-offset:4px}input:focus-visible,textarea:focus-visible,select:focus-visible{outline:2px solid var(--accent);outline-offset:1px}
.app-header{height:88px;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;gap:24px;padding:0 max(28px,calc((100vw - 1440px)/2))}.brand{display:flex;align-items:center;gap:17px;flex-shrink:0}.brand img{display:block;width:156px;height:39px}.brand-product{font-size:11px;font-weight:600;letter-spacing:2px;padding-left:17px;border-left:1px solid #36433e;color:#a3b4a9}.app-header nav{display:flex;gap:6px}.nav-button{border:0;background:none;border-radius:8px;color:var(--muted);font-size:13px;font-weight:500;padding:12px 16px;display:flex;align-items:center;gap:8px}.nav-button.active{background:#8bf17a12;color:var(--accent)}.nav-button:hover{background:#ffffff08;color:var(--ink)}.studio-badge{display:flex;align-items:center;gap:8px;font-size:10px;letter-spacing:1.1px;font-weight:600;color:var(--muted)}.studio-badge i,.preview-heading i{width:6px;height:6px;background:var(--accent);border-radius:50%;display:inline-block}
.app-main{max-width:1496px;margin:auto;padding:42px 28px 44px}.page-heading{display:flex;align-items:center;justify-content:space-between;gap:24px;margin-bottom:30px}.eyebrow{font-size:10px;font-weight:600;letter-spacing:1.7px;color:var(--accent);margin-bottom:12px}h1{font-size:38px;line-height:1.2;letter-spacing:-1.5px;font-weight:650;margin:0}h1 em{font-style:normal;color:var(--accent)}.page-heading p{font-size:14px;color:var(--muted);margin:12px 0 0;line-height:1.6}.workspace{display:grid;grid-template-columns:minmax(0,1fr) 350px;gap:24px;align-items:start}.stage-column{min-width:0}.preview-heading{display:flex;justify-content:space-between;gap:12px;border:1px solid var(--line);border-bottom:0;border-radius:12px 12px 0 0;padding:15px 18px;background:var(--panel);font-size:10px;letter-spacing:.6px;color:var(--muted)}.preview-heading>span:first-child{display:flex;align-items:center;gap:9px;color:var(--ink);font-weight:600}.preview-heading>span:last-child{font-size:10px;letter-spacing:0}
.stage{position:relative;overflow:hidden;background:#101b27;isolation:isolate;border:1px solid var(--line);border-radius:0 0 12px 12px;aspect-ratio:8/5}.stage>canvas{width:100%;height:100%;display:block}.stage-top{position:absolute;inset:0 0 auto;padding:24px 28px;display:flex;justify-content:space-between;align-items:flex-start;color:#f2f7fb;z-index:2;pointer-events:none}.stage-top h2{font-size:26px;font-weight:650;letter-spacing:-.6px;margin:10px 0 0}.live-label{font-size:9px;font-weight:600;letter-spacing:1.4px;display:flex;align-items:center;gap:7px;color:#c8d5df}.live-label i{width:5px;height:5px;background:#b0c1d2;border-radius:50%}.live-label.running i{background:var(--accent);box-shadow:0 0 10px #8bf17a70}.stage-actions{display:flex;gap:6px;align-items:center;pointer-events:auto}.stage-time{font-size:29px;font-weight:600;font-variant-numeric:tabular-nums;margin-right:8px}.stage-time small{font-size:8px;letter-spacing:1px;color:#a5b5c7}.icon-button{display:inline-flex;align-items:center;justify-content:center;min-width:32px;height:32px;padding:6px;background:none;border:0;border-radius:7px;color:var(--muted)}.icon-button:hover{background:#ffffff0a;color:var(--ink)}.icon-button.dark{background:#10202a80;color:#e9f4ed;border:1px solid #ffffff18}.icon-button.dark svg{width:16px;height:16px}
.stage-ready{position:absolute;top:52%;left:50%;transform:translate(-50%,-50%);display:flex;align-items:center;flex-direction:column;gap:13px;color:#edf4f0;font-size:22px;font-weight:600;text-align:center;pointer-events:none;background:#0c1825e8;border:1px solid #8bf17a33;border-radius:10px;padding:16px 24px}.ready-pill{font-size:9px;letter-spacing:1.6px;border:1px solid #8bf17a44;background:#0b201dcc;border-radius:5px;padding:7px 12px;color:var(--accent)}.stage-bottom{position:absolute;bottom:17px;left:28px;right:28px;display:flex;justify-content:space-between;gap:10px;color:#d0dce5;font-size:10px;z-index:2;pointer-events:none}.weighted-badge{font-size:9px;color:#afc4b8;border:1px solid #8bf17a33;border-radius:5px;padding:3px 7px;background:#10241b88}.race-progress{height:3px;position:absolute;bottom:0;left:0;right:0;background:#ffffff0a}.race-progress>div{height:100%;width:0;background:var(--accent);transition:width .18s linear}.countdown{position:absolute;inset:20% 0 auto;text-align:center;color:var(--accent);text-shadow:0 4px 0 #10241c;z-index:5;pointer-events:none}.countdown>span{display:block;letter-spacing:4px;font-size:12px;color:#d9e9df}.countdown>strong{font-size:110px;font-weight:800;line-height:1.2;display:block;animation:count-pop .2s ease-out}@keyframes count-pop{from{transform:scale(1.15);opacity:.5}to{transform:scale(1);opacity:1}}
.below-stage{display:flex;align-items:center;gap:14px;padding:21px 2px}.avatar-stack{display:flex;padding-left:3px}.avatar-stack canvas{width:38px;height:38px;background:#1c2933;border:3px solid var(--paper);border-radius:50%;margin-left:-4px}.below-stage strong{display:block;font-size:13px;font-weight:600;margin-bottom:5px}.below-stage span{font-size:11px;color:var(--muted)}.obs-bar{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:20px;border:1px solid #8bf17a25;border-radius:12px;background:linear-gradient(115deg,#16231a,#111822)}.obs-bar>div{display:flex;align-items:center;gap:13px;color:var(--accent)}.obs-bar strong{display:block;font-size:14px;font-weight:600;color:var(--ink)}.obs-bar small{display:block;font-size:11px;color:var(--muted);line-height:1.6;margin-top:5px}.obs-bar>.secondary-button{border-color:#8bf17a44;color:var(--accent);white-space:nowrap}.text-button{display:inline-flex;align-items:center;justify-content:center;gap:8px;padding:8px 0;border:0;background:none;font-size:12px;font-weight:500;color:var(--muted)}.text-button:hover{color:var(--accent)}.text-button svg{width:16px;height:16px}.secondary-button{display:inline-flex;align-items:center;justify-content:center;gap:8px;border:1px solid #334151;border-radius:8px;background:#17222e;padding:11px 15px;font-size:12px;font-weight:600;color:#dee7ef;cursor:pointer;min-height:40px}.secondary-button:hover{background:#202e3b;border-color:#6a8571}.secondary-button svg{width:16px;height:16px}
.setup-card{border:1px solid var(--line);background:var(--panel);border-radius:12px;padding:24px}.setup-heading{display:flex;align-items:center;gap:9px;margin-bottom:23px}.setup-heading h2{font-size:17px;letter-spacing:-.3px;font-weight:600;margin:0}.setup-heading>.icon-button{margin-left:auto}.count-badge{padding:4px 7px;border-radius:5px;background:#23312b;color:var(--accent);font-size:11px}.list-labels{display:flex;justify-content:space-between;color:var(--muted);font-size:9px;letter-spacing:1px;padding:0 32px 9px 43px}.participants{display:flex;flex-direction:column;gap:3px;max-height:325px;overflow:auto;scrollbar-width:thin;scrollbar-color:#364454 transparent;padding-right:2px}.participant-row{display:flex;align-items:center;gap:8px;padding:5px 0;border-bottom:1px solid #ffffff05;min-height:44px}.character-button{border:1px solid #2a3743;background:#1d2935;border-radius:8px;width:34px;height:34px;padding:0;flex-shrink:0}.character-button:hover{border-color:#8bf17a66}.character-button canvas{width:32px;height:32px;display:block}.participant-name{border:0;background:transparent;min-width:0;width:100%;font-size:12px;color:#e1e9f2;padding:7px 2px}.participant-weight{border:1px solid #334153;background:#0d141e;border-radius:6px;width:48px;height:30px;flex-shrink:0;text-align:center;font-size:12px;font-weight:500;color:#d7e6f2;appearance:textfield}.participant-weight::-webkit-inner-spin-button{appearance:none}.participant-row .delete-participant{width:24px;min-width:24px;padding:3px;color:#718193}.participant-row .delete-participant svg{width:14px;height:14px}.add-button{border:1px dashed #344252;border-radius:7px;background:none;display:flex;align-items:center;justify-content:center;gap:8px;width:100%;font-size:11px;color:var(--muted);padding:11px;margin-top:12px}.add-button:hover{border-color:var(--accent);color:var(--accent)}.add-button svg{width:14px;height:14px}.settings-divider{height:1px;background:var(--line);margin:22px 0}.mode-control{margin-bottom:18px}.mode-control>label{display:block;font-size:11px;color:var(--muted);margin-bottom:10px}.mode-options{display:flex;gap:6px}.mode-options button{flex:1;padding:11px 8px;font-size:11px;border:1px solid #2d3947;border-radius:7px;background:#0e151f;color:var(--muted)}.mode-options button.selected{border-color:#8bf17a66;background:#8bf17a12;color:var(--accent);font-weight:600}.mode-options button[data-game-mode="chaos"].selected{background:#c9b8ff12;color:#c9b8ff;border-color:#c9b8ff66}.mode-options span{margin-left:3px}.duration-control{display:flex;align-items:center;justify-content:space-between;gap:10px}.duration-control label{font-size:11px;color:var(--muted)}.segmented{display:flex;padding:3px;border-radius:7px;background:#0d141e;border:1px solid #263342}.segmented button{font-size:11px;padding:7px 11px;border:0;background:none;color:var(--muted);border-radius:4px}.segmented button.selected{background:#25342d;color:var(--accent);font-weight:600}.advanced{margin-top:19px;font-size:11px;color:var(--muted)}.advanced summary{cursor:pointer;list-style:none;display:flex;justify-content:space-between;align-items:center}.advanced summary::-webkit-details-marker{display:none}.advanced[open] summary>span{transform:rotate(45deg)}.advanced-fields{display:flex;flex-direction:column;gap:12px;margin-top:16px}.advanced-fields label{display:flex;align-items:center;justify-content:space-between;gap:10px}.advanced-fields input,.advanced-fields select{border:1px solid #334151;background:#0e151f;border-radius:6px;padding:8px;font-size:11px;width:160px;min-width:0;color:var(--ink)}.setup-total{display:flex;justify-content:space-between;align-items:center;gap:7px;margin:23px 0 15px;font-size:10px;color:var(--muted)}.setup-total>span:last-child{display:flex;align-items:center;gap:4px;color:#a6c8ab}.setup-total svg{width:12px;height:12px}
.start-button{border:0;border-radius:8px;background:var(--accent);color:#0d2110;font-size:13px;font-weight:700;width:100%;min-height:46px;padding:13px 15px;display:flex;align-items:center;justify-content:center;gap:9px;transition:background .15s}.start-button:hover{background:#a2fc93}.start-button svg{width:17px;height:17px}.start-button>svg:last-child{margin-left:auto}.local-start{width:100%;margin-top:9px}.blob-size{font-size:10px;color:var(--muted);margin:15px 0 7px}.blob-size.too-large{color:#ffb4a6}.share-note,.share-result p{font-size:11px;line-height:1.7;color:var(--muted)}.share-result{margin-top:20px;padding-top:16px;border-top:1px solid var(--line)}.share-result label{display:flex;flex-direction:column;gap:8px;margin:12px 0;font-size:11px;font-weight:500;color:#d7e4ed}.share-result input,.load-blob input{min-width:0;width:100%;border:1px solid #334151;border-radius:6px;background:#0b121b;padding:11px;font:11px ui-monospace,monospace;color:#c6e3d1}.share-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:13px}.share-actions .secondary-button{flex:1;white-space:nowrap;padding:10px;font-size:11px}.form-error{background:#ff786414;color:#ffb4a6;border:1px solid #ff786433;border-radius:7px;padding:12px;font-size:11px;line-height:1.6;margin-top:12px}
.live-leaders{position:absolute;right:24px;top:22%;display:flex;flex-direction:column;gap:5px;z-index:3}.live-leaders>div{display:flex;align-items:center;gap:6px;background:#0b192bcc;border:1px solid #b1e8c21c;border-radius:6px;padding:5px 9px;color:#e6f1f5;font-size:10px;min-width:90px}.live-leaders b{color:var(--accent);font-size:9px;width:8px}.live-leaders canvas{width:24px;height:24px}.winner-overlay{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;background:#07111cb0;backdrop-filter:blur(5px);z-index:6;padding:18px}.winner-card{width:min(85%,390px);text-align:center;border:1px solid #8bf17a44;border-radius:14px;background:linear-gradient(140deg,#182b24f5,#111c28f5);box-shadow:0 20px 60px #0006;color:#f0f6f3;padding:25px;animation:winner-pop .35s ease-out}@keyframes winner-pop{from{opacity:0;transform:translateY(14px)}to{opacity:1;transform:none}}.winner-eyebrow{display:flex;gap:7px;align-items:center;justify-content:center;font-size:10px;letter-spacing:1.5px;color:var(--accent)}.winner-eyebrow svg{width:15px;height:15px}.winner-card>canvas{width:105px;height:105px;margin:12px auto 2px;display:block}.winner-card h2{font-size:34px;font-weight:700;letter-spacing:-1px;margin:0 0 18px;overflow-wrap:anywhere}.podium{display:flex;gap:7px;justify-content:center}.podium>div{flex:1;min-width:0;background:#fff1;border:1px solid #ffffff12;border-radius:7px;padding:10px 6px}.podium b{display:block;font-size:9px;color:var(--accent);margin-bottom:5px}.podium span{display:block;font-size:11px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#d8e5ee}.winner-actions{display:flex;gap:20px;justify-content:center;margin-top:19px}.winner-replay{display:flex;align-items:center;justify-content:center;gap:6px;border:0;background:none;color:#adbcce;font-size:11px;padding:4px}.winner-replay svg{width:14px;height:14px}.winner-replay:hover{color:var(--accent)}.stage-error{position:absolute;inset:0;background:#0f1926f5;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:30px;color:var(--ink);z-index:10}.stage-error strong{font-size:24px}.stage-error p{max-width:420px;font-size:12px;line-height:1.8;color:var(--muted)}.stage-error a{font-size:12px;display:flex;gap:10px;align-items:center;color:var(--accent)}
.secondary-page{padding-bottom:20px;min-height:550px}.secondary-page h1{margin-bottom:14px}.page-intro{font-size:14px;color:var(--muted);margin:0 0 30px;line-height:1.7}.load-blob{display:flex;flex-wrap:wrap;align-items:center;gap:12px;margin-bottom:28px}.load-blob label{font-size:12px;color:var(--muted)}.load-blob input{flex:1;min-width:180px;max-width:600px}.integration-grid{display:grid;grid-template-columns:1fr 1fr;gap:20px}.integration-card{border:1px solid var(--line);border-radius:12px;background:var(--panel);padding:27px}.step-number{font-size:10px;color:var(--accent);font-weight:600;letter-spacing:1px}.integration-card h2{font-size:21px;font-weight:600;letter-spacing:-.5px;margin:14px 0 12px}.integration-card p,.integration-card li{font-size:13px;color:var(--muted);line-height:1.8}.integration-card ol{padding-left:20px}.muted-small{font-size:11px!important;color:#94a4b7!important}.integration-options{font-size:12px;color:var(--muted);margin:20px 0}.integration-options input{accent-color:var(--accent);margin-right:7px}.integration-details{font-size:12px;color:var(--muted);margin-top:25px;line-height:1.8}.integration-details summary{cursor:pointer;font-weight:600}.history-item{border:1px solid var(--line);background:var(--panel);border-radius:10px;padding:18px 20px;display:flex;align-items:center;gap:17px;margin-bottom:10px}.history-icon{width:40px;height:40px;border-radius:8px;display:flex;align-items:center;justify-content:center;background:#8bf17a12;color:var(--accent)}.history-content{flex:1;min-width:0}.history-content strong{font-size:14px;display:block;overflow-wrap:anywhere}.history-content span{font-size:11px;color:var(--muted);display:block;margin-top:6px}.history-winner{font-size:12px;color:#bdd7c5;text-align:right}.empty-state{border:1px dashed #344151;border-radius:12px;padding:50px 30px;text-align:center;color:var(--muted);font-size:13px}
dialog{border:1px solid #354353;border-radius:14px;padding:27px;width:min(540px,calc(100% - 30px));background:var(--panel);color:var(--ink);box-shadow:0 25px 80px #0008}dialog::backdrop{background:#04090ec0;backdrop-filter:blur(3px)}.dialog-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:14px}.dialog-header h2{font-size:24px;font-weight:600;letter-spacing:-.7px;margin:0}dialog>p{font-size:12px;color:var(--muted)}dialog textarea{width:100%;border:1px solid #344454;border-radius:8px;padding:14px;resize:vertical;background:#0c141e;color:var(--ink);font-size:12px;line-height:1.8}.import-actions{display:flex;gap:12px;align-items:center;margin-top:16px}.import-actions>.start-button{width:auto;flex:1}.toast{position:fixed;bottom:25px;left:50%;transform:translateX(-50%);background:#1c2d26;color:#e4f5e6;border:1px solid #8bf17a44;border-radius:8px;padding:14px 18px;display:flex;align-items:center;gap:9px;font-size:12px;box-shadow:0 8px 24px #0004;z-index:50;max-width:90%}.toast svg{color:var(--accent);width:17px;height:17px}
.surprise-banner{position:absolute;top:21%;left:50%;transform:translateX(-50%);padding:9px 14px;border:1px solid #8bf17a55;border-radius:7px;background:#0f2521ed;color:var(--accent);font-size:11px;font-weight:600;text-align:center;z-index:4;white-space:nowrap;max-width:85%;overflow:hidden;text-overflow:ellipsis}.surprise-banner.turbo{color:#d8caff;border-color:#c9b8ff66}
body.overlay{background:transparent;overflow:hidden}body.overlay .app-header,body.overlay .page-heading,body.overlay .setup-card,body.overlay .preview-heading,body.overlay .below-stage,body.overlay .obs-bar{display:none}body.overlay .app-main{padding:0;max-width:none}body.overlay .workspace{display:block}body.overlay .stage{border:0;border-radius:0;width:min(100vw,160vh);height:min(100vh,62.5vw);margin:auto;box-shadow:none;position:absolute;left:50%;top:50%;transform:translate(-50%,-50%)}body.transparent .stage{background:transparent}.stage:fullscreen{width:100vw;height:100vh;aspect-ratio:auto;border-radius:0}.stage:fullscreen>canvas{object-fit:contain}.stage:fullscreen .stage-top{padding:30px}.stage:fullscreen .stage-bottom{bottom:30px}
@media(min-width:1500px){.workspace{grid-template-columns:minmax(0,1fr) 370px}.setup-card{padding:27px}.participants{max-height:360px}.participant-row{min-height:46px}.stage-top h2{font-size:30px}.stage-bottom{font-size:12px}}
@media(max-width:1100px){.studio-badge{display:none}.workspace{grid-template-columns:minmax(0,1fr) 320px;gap:20px}.setup-card{padding:21px}.obs-bar{align-items:flex-start;flex-direction:column}.stage-top{padding:21px}.stage-top h2{font-size:22px}.stage-ready{font-size:20px}.preview-heading>span:last-child{display:none}}
@media(max-width:860px){.app-header{padding:0 24px}.brand-product{display:none}.workspace{grid-template-columns:1fr}.participants{display:grid;grid-template-columns:1fr 1fr;gap:5px 24px;max-height:275px}.list-labels{display:none}.obs-bar{flex-direction:row;align-items:center}.stage-ready{font-size:26px}.app-main{padding:32px 24px}.page-heading h1{font-size:34px}.setup-card{padding:26px}.setup-heading{margin-bottom:16px}.integration-grid{grid-template-columns:1fr}.advanced-fields{max-width:420px}}
@media(max-width:540px){.app-header{height:auto;min-height:105px;padding:18px 20px 0;gap:15px;flex-wrap:wrap}.brand img{width:135px;height:34px}.brand-product{display:block;font-size:9px;padding-left:12px}.app-header nav{width:100%;gap:5px}.nav-button{flex:1;justify-content:center;font-size:11px;padding:12px 6px;border-radius:6px 6px 0 0}.nav-button svg{width:14px;height:14px}.app-main{padding:28px 16px 34px}.page-heading{gap:12px;align-items:flex-start;margin-bottom:23px}.eyebrow{font-size:9px;letter-spacing:1.2px}.page-heading h1{font-size:28px;letter-spacing:-1px}.page-heading p{font-size:12px;max-width:230px}.page-heading>.secondary-button{font-size:11px;padding:10px;white-space:nowrap}.page-heading>.secondary-button svg{display:none}.stage-top{padding:14px 16px}.stage-top h2{font-size:18px;margin-top:6px}.live-label{font-size:6px;letter-spacing:1px}.stage-time{font-size:20px;margin-right:2px}.stage-time small{font-size:6px}.stage-actions{gap:4px}.icon-button.dark{width:25px;min-width:25px;height:25px}.icon-button.dark svg{width:12px;height:12px}.stage-ready{font-size:16px;gap:9px}.ready-pill{font-size:6px;padding:5px 8px}.stage-bottom{bottom:10px;left:15px;right:15px;font-size:7px}.weighted-badge{font-size:6px}.preview-heading{font-size:9px;padding:12px 15px}.below-stage strong{font-size:12px}.below-stage span{font-size:10px}.avatar-stack canvas{width:30px;height:30px}.obs-bar{padding:18px;flex-direction:column;align-items:stretch;gap:16px}.obs-bar>.secondary-button{width:100%}.participants{grid-template-columns:1fr;max-height:315px}.setup-card{padding:21px}.participant-name{font-size:13px}.participant-row{min-height:45px}.countdown>strong{font-size:65px}.countdown>span{font-size:8px}.live-leaders{right:13px;top:27%}.live-leaders>div{min-width:60px;font-size:7px;padding:3px 6px}.live-leaders canvas{width:18px;height:18px}.winner-card{width:86%;padding:14px;border-radius:10px}.winner-eyebrow{font-size:7px;letter-spacing:1px}.winner-card>canvas{width:65px;height:65px;margin:3px auto}.winner-card h2{font-size:25px;margin-bottom:10px}.podium>div{padding:6px 4px}.podium b{font-size:7px}.podium span{font-size:8px}.winner-actions{gap:16px;margin-top:10px}.winner-replay{font-size:8px}.surprise-banner{font-size:7px;padding:6px 9px;top:25%}.integration-card{padding:21px}.history-item{gap:12px;padding:16px}.history-winner{display:none}.history-content span{font-size:10px}.import-actions{flex-wrap:wrap}.import-actions>.start-button{flex-basis:100%}h1{font-size:30px}}
@media(prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}}
