body{margin:0;background:#0b1120;color:#e2e8f0;font:14px/1.4 system-ui,sans-serif}
*{scrollbar-color:#526b83 #111827;scrollbar-width:thin}
::-webkit-scrollbar{width:10px;height:10px}
::-webkit-scrollbar-track{background:#111827}
::-webkit-scrollbar-thumb{background:#526b83;border:2px solid #111827;border-radius:8px}
::-webkit-scrollbar-thumb:hover{background:#7dd3fc}
::-webkit-scrollbar-corner{background:#111827}
fieldset{border:0;padding:0;margin:0;min-width:0}
.mode-notice{border:2px solid #fbbf24;background:#422f0b;color:#fef3c7;padding:12px;border-radius:8px;margin-bottom:12px}
#stage.grid::after{content:'';position:absolute;inset:0;pointer-events:none;z-index:100;background-image:linear-gradient(to right,#94a3b855 1px,transparent 1px),linear-gradient(to bottom,#94a3b855 1px,transparent 1px);background-size:var(--grid-size) var(--grid-size)}
.resize-handle[data-corner="n"]{top:-10px;left:calc(50% - 10px);bottom:auto;right:auto;cursor:ns-resize}
.resize-handle[data-corner="s"]{bottom:-10px;left:calc(50% - 10px);right:auto;cursor:ns-resize}
.resize-handle[data-corner="e"]{right:-10px;top:calc(50% - 10px);bottom:auto;cursor:ew-resize}
.resize-handle[data-corner="w"]{left:-10px;top:calc(50% - 10px);bottom:auto;right:auto;cursor:ew-resize}
.designer{max-width:1800px;margin:auto;padding:18px}.editor-header{display:flex;gap:22px;align-items:center;margin-bottom:16px}.editor-header img{width:220px;height:auto}.editor-header h1{font-size:22px;margin:0;flex:1}
.editor-help{display:inline-flex;vertical-align:middle;margin-inline-start:4px;color:#7dd3fc;text-decoration:none;font-size:13px;font-weight:600}
#desktopWarning{width:min(420px,calc(100% - 24px));margin:auto;padding:20px;border:1px solid #526b83;border-radius:10px;background:#111827;color:#e2e8f0}
#desktopWarning p{margin:10px 0 16px}
#desktopWarning .toolbar{margin:0}
#desktopWarning::backdrop{background:#020617cc}
.editor-help span:first-child{display:inline-grid;place-items:center;width:17px;height:17px;border:1px solid #51839b;border-radius:50%;font-size:11px}
.editor-help:hover,.editor-help:focus-visible{color:#bae6fd;text-decoration:underline}
.toolbar{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin-bottom:12px}
.designer fieldset>.toolbar{justify-content:center;padding:12px;background:#111827;border:1px solid #263449;border-radius:10px}
.designer fieldset>.editor-toolbar{justify-content:space-between;align-items:flex-start}
.editor-tools{display:flex;flex:1;flex-wrap:wrap;align-items:center;gap:8px}
.save-actions{display:flex;flex-direction:column;align-items:flex-end;gap:6px;margin-left:auto;max-width:340px}
.save-actions #status{text-align:right;overflow-wrap:anywhere}
.arrange-actions{display:grid;grid-template-columns:1fr;gap:10px}
.file-target{padding:8px;border:1px solid #287b9e;border-radius:6px;color:#bae6fd}
.asset-select{width:100%;text-align:left;overflow-wrap:anywhere}
.weather-key{grid-column:1/-1}.weather-key a{display:block;color:#7dd3fc;margin-top:8px}
.toolbar .btn{display:inline-flex;align-items:center;justify-content:center;min-height:38px;box-sizing:border-box;margin:0;text-align:center}
.editor-layout aside>.toolbar,.settings-actions{display:grid;grid-template-columns:1fr 1fr}
.editor-layout>aside:first-child>.toolbar{grid-template-columns:1fr}
.editor-layout>aside:first-child .editor-section>button,.media-manager-entry .btn{width:100%}
.media-manager-entry{border-top:1px solid #263449;margin-top:14px;padding-top:14px}
.editor-section{border-top:1px solid #263449;margin-top:18px;padding-top:16px}
.editor-layout .file-button{display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;min-height:38px;margin:0;cursor:pointer}
.editor-layout .check-label{display:flex;align-items:center;gap:8px}
.workspace>.toolbar{justify-content:center}.workspace>.toolbar label{margin:0}
.file-row{display:flex;gap:6px;flex-wrap:wrap;padding:10px 0;border-bottom:1px solid #263449}.file-row>div{width:100%}
.file-row button{margin:0!important}
.crop-outline{position:absolute;pointer-events:none;border:2px dashed #fbbf24;box-sizing:border-box}
.editor-layout{display:grid;grid-template-columns:230px minmax(320px,1fr) 270px;gap:16px}
.editor-layout{align-items:start}
.editor-layout aside{max-height:calc(100vh - 170px);overflow:auto;position:sticky;top:16px}
.editor-layout>aside:first-child{direction:rtl}
.editor-layout>aside:first-child>*{direction:ltr}
.settings-actions{grid-template-columns:1fr!important}
.editor-layout .file-button{width:100%}
.inp[type="color"]{height:40px;padding:4px}
.editor-layout aside,.workspace{background:#111827;border:1px solid #263449;border-radius:10px;padding:14px;min-width:0}
h2{font-size:15px;margin:0 0 12px}.muted{color:#94a3b8;font-size:12px}
.editor-layout label{display:block;margin-bottom:10px}.inp,.sel{box-sizing:border-box;width:100%;color:#e2e8f0;background:#0b1120;border:1px solid #334155;border-radius:6px;padding:8px}.geometry{display:grid;grid-template-columns:1fr 1fr;gap:8px}.geometry label{min-width:0}
.btn{cursor:pointer;border:1px solid #287b9e;border-radius:6px;padding:8px 12px;color:white;background:#036989;text-decoration:none;font:inherit}.btn-secondary{background:#1e293b;border-color:#475569}.btn:disabled{opacity:.45;cursor:default}
.layer-row{display:flex;align-items:center;gap:8px;width:100%;text-align:left;background:#1e293b;border:1px solid #334155;color:#e2e8f0;border-radius:6px;padding:10px;margin-bottom:6px;cursor:pointer}.layer-row.selected{border-color:#38bdf8;background:#163246}.layer-row span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#stageShell{position:relative;width:100%;overflow:visible;border:1px solid #475569;background:#000;touch-action:none}
#stage{position:absolute;left:0;top:0;transform-origin:0 0;background:#000}#liveInput,#objects{position:absolute;width:100%;height:100%;inset:0;object-fit:fill;pointer-events:none}
#programBackground{position:absolute;inset:0;pointer-events:none}
.hdmi-input{position:absolute;box-sizing:border-box;cursor:move;background:#18253b;touch-action:none}.hdmi-input::before{content:'VIDEO';position:absolute;inset:0;display:grid;place-items:center;color:#94a3b8;font-size:36px}.hdmi-input.selected{outline:3px solid #22d3ee}.hdmi-input .resize-handle{z-index:100;background:#22d3ee}.hdmi-row{display:block}.hdmi-row span{display:block;white-space:normal}.hdmi-row.selected{border-color:#22d3ee}
.hdmi-input.sample-active::before{display:none}
#sampleInput{position:absolute;inset:0;overflow:hidden;pointer-events:none;background:linear-gradient(180deg,#0e4b79 0%,#62bdd0 54%,#b5dfd1 55%,#295d58 100%)}
#sampleInput[hidden]{display:none}
#sampleInput .sample-sun{position:absolute;top:15%;left:10%;width:13%;aspect-ratio:1;border-radius:50%;background:#ffe5a0;box-shadow:0 0 4em #ffe5a088;animation:sample-sun 18s ease-in-out infinite alternate}
#sampleInput .sample-horizon{position:absolute;inset:50% -30% -25%;background:repeating-linear-gradient(165deg,#163d46 0 8%,#367d70 8% 16%,#65a686 16% 21%);transform:rotate(-5deg);animation:sample-ground 12s linear infinite}
#sampleInput span{position:absolute;right:3%;bottom:4%;padding:.4em .8em;border-radius:.4em;background:#061b29a6;color:#fff;font-size:clamp(12px,2.4vw,36px)}
@keyframes sample-sun{to{transform:translateX(470%)}}
@keyframes sample-ground{to{background-position:0 400px}}
@media (prefers-reduced-motion:reduce){#sampleInput .sample-sun,#sampleInput .sample-horizon{animation:none}}
.design-layer{position:absolute;box-sizing:border-box;cursor:move;pointer-events:auto;outline:1px dashed transparent}.design-layer.selected{outline:3px solid #38bdf8}.design-layer>.overlay-content{pointer-events:none}.resize-handle{position:absolute;bottom:-10px;right:-10px;width:22px;height:22px;border-radius:3px;background:#38bdf8;cursor:nwse-resize}.file-row{margin-bottom:10px;overflow-wrap:anywhere}.file-row button{margin-right:5px;font-size:12px}
[data-standalone="true"] #dashboardLink,[data-standalone="true"] #fullFrame,[data-standalone="true"] .media-manager-entry,[data-standalone="true"] #videoSourceForm,[data-standalone="true"] #chooseAreaFile,[data-standalone="true"] #backgroundMedia,[data-standalone="true"] #slideshowMedia,[data-standalone="true"] #specialsMedia,[data-standalone="true"] #sponsorMedia,[data-standalone="true"] #announcementMedia,[data-standalone="true"] #recordLogoMedia,[data-standalone="true"] #matchCanvas,[data-standalone="true"] #editorSettings .check-label,[data-standalone="true"] #editorSettings .settings-actions,[data-standalone="true"] #widgetSponsorAsset{display:none!important}
.resize-handle[data-corner="nw"]{top:-10px;left:-10px;bottom:auto;right:auto}
.resize-handle[data-corner="ne"]{top:-10px;right:-10px;bottom:auto;cursor:nesw-resize}
.resize-handle[data-corner="sw"]{bottom:-10px;left:-10px;right:auto;cursor:nesw-resize}
.rotate-handle{position:absolute;top:-42px;left:calc(50% - 11px);width:22px;height:22px;border-radius:50%;background:#fbbf24;cursor:grab}
.rotate-handle::after{content:'';position:absolute;top:22px;left:10px;width:2px;height:20px;background:#fbbf24}
.layer-row.drag-over{border:2px solid #fbbf24}.layer-drag-handle{cursor:ns-resize;font-size:20px;line-height:1;padding:4px}
.layer-row button{color:inherit;background:transparent;border:1px solid #475569;border-radius:4px;padding:5px;cursor:pointer}.layer-row .layer-select{flex:1;min-width:0;text-align:left;border:0;overflow:hidden;text-overflow:ellipsis}.layer-row button[aria-pressed="false"]{opacity:.55}
.workspace{overflow:hidden}
[hidden]{display:none!important}#status[data-error="true"]{color:#f87171}#status{color:#86efac}progress{width:100%}
@media(max-width:1000px){.editor-layout{grid-template-columns:190px minmax(280px,1fr)}#properties{grid-column:1/-1}.editor-header{flex-wrap:wrap}}
@media(max-width:650px){.editor-layout{display:flex;flex-direction:column}.workspace{order:-1}.editor-header img{width:160px}}
@media(max-width:1000px){#properties{max-height:none;position:static}}
@media(max-width:650px){.editor-layout aside{max-height:none;position:static}}
#widgetDialog{box-sizing:border-box;width:calc(100% - 1rem);max-width:125rem;max-height:calc(100vh - 1rem);max-height:calc(100dvh - 1rem);padding:0;overflow:hidden;border:1px solid #334155;border-radius:14px;background:#111827;color:#e2e8f0;color-scheme:dark;box-shadow:0 24px 70px #000b}
#widgetDialog::backdrop{background:#020617bf}
#widgetDialog.widget-fullscreen{width:100vw;max-width:none;height:100vh;max-height:100vh;border-radius:0}
#widgetDialog.widget-fullscreen #widgetForm{height:100%}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
#filesSection{box-sizing:border-box;width:calc(100% - 2rem);max-width:1400px;height:calc(100vh - 2rem);height:calc(100dvh - 2rem);max-height:none;overflow:hidden;padding:0;border:1px solid #334155;border-radius:14px;background:#111827;color:#e2e8f0;color-scheme:dark;box-shadow:0 24px 70px #000b}
#filesSection[open]{display:flex;flex-direction:column}
#filesSection::backdrop{background:#020617bf}
.media-header{display:flex;justify-content:space-between;align-items:center;gap:16px;padding:18px 24px;background:#0f172a;border-bottom:1px solid #263449}
.media-header h2{font-size:21px;margin:0 0 3px}.media-header p{margin:0}
.media-body{box-sizing:border-box;flex:1;min-height:0;overflow:auto;padding:20px 24px}
.media-intro{display:flex;align-items:center;justify-content:space-between;gap:20px}
.media-intro>div{flex:1;min-width:0}.media-intro p{margin:0 0 8px}
#filesSection .media-intro .file-button{width:auto;min-width:140px;margin:0}
.media-panel{padding:16px;margin-top:16px;border:1px solid #334155;border-radius:10px;background:#0f172a}
.media-panel h3,.media-library h3{margin:0 0 10px;font-size:15px}
.media-panel p{margin:0 0 10px}.media-panel .toolbar{margin-bottom:0}
.media-folder-controls label{min-width:180px;margin:0!important}.media-folder-controls{align-items:end}
.media-library{margin-top:20px}
#library{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:14px}
#filesSection .file-row{box-sizing:border-box;display:grid;grid-template-columns:24px minmax(0,1fr);align-content:start;align-items:center;gap:8px;margin:0;padding:12px;border:1px solid #334155;border-radius:10px;background:#0f172a}
#filesSection .media-check{grid-column:1/-1;display:flex;align-items:center;gap:6px;margin:0;color:#cbd5e1;font-size:12px}
#filesSection .media-check input{margin:0}
#filesSection .media-thumb{grid-column:1/-1;width:100%;height:140px;object-fit:contain;border-radius:6px;background:#0b1120}
#filesSection .asset-select{grid-column:1/-1;width:100%;min-width:0;text-align:left}
#filesSection .file-actions{grid-column:1/-1;display:grid;grid-template-columns:1fr 1fr;gap:6px}
#filesSection .file-actions button{min-width:0;font-size:12px}
#filesSection.media-picker .media-selection,#filesSection.media-picker .file-actions,#filesSection.media-picker .media-check{display:none}
@media(max-width:650px){#filesSection{width:calc(100% - 1rem);height:calc(100vh - 1rem);height:calc(100dvh - 1rem)}.media-header{padding:12px 14px}.media-body{padding:14px}.media-intro{align-items:stretch;flex-direction:column;gap:8px}#filesSection .media-intro .file-button{width:100%}#library{grid-template-columns:repeat(auto-fill,minmax(180px,1fr))}}
#mediaEditor{box-sizing:border-box;width:min(600px,95vw);max-height:90vh;overflow:auto;padding:20px;border:1px solid #334155;border-radius:10px;background:#111827;color:#e2e8f0;color-scheme:dark}
#mediaEditor::backdrop{background:#020617bf}
#mediaEditorPreview{display:block;max-width:100%;max-height:35vh;object-fit:contain}
#filesSection.media-picker .file-row button:not(.asset-select),#filesSection.media-picker .file-row input,#filesSection.media-picker #mediaMove,#filesSection.media-picker #mediaCreateLayers,#filesSection.media-picker #mediaCreateSlideshow,#filesSection.media-picker #mediaAddSlideshow,#filesSection.media-picker #mediaDelete{display:none}
#widgetForm{display:flex;flex-direction:column;max-height:inherit;min-height:0}
.widget-header,.widget-footer{flex:none;padding:14px 20px;background:#0f172a}
.widget-header{display:grid;grid-template-columns:1fr auto minmax(12rem,16rem);gap:10px 24px;align-items:end;border-bottom:1px solid #263449}
.widget-header h2{font-size:clamp(1.2rem,4vw,1.55rem);margin:2px 0}
.widget-header p,.widget-presets p{margin:0}
.widget-eyebrow{font-size:.68rem;letter-spacing:.13em;color:#7dd3fc;font-weight:700}
.widget-body{display:grid;grid-template-columns:minmax(19rem,24rem) minmax(0,1fr);align-items:start;gap:18px;overflow:auto;overscroll-behavior:contain;min-height:0;padding:16px 20px}
.widget-controls{min-width:0}
.widget-presets,.widget-visibility,.widget-section{background:#172234;border:1px solid #334155;border-radius:10px}
.widget-presets{padding:14px;margin-bottom:12px}
.widget-presets h3{margin:0 0 8px;font-size:1rem}
.widget-preset-controls{display:flex;flex-wrap:wrap;gap:8px;align-items:end;margin-bottom:8px}
.widget-preset-controls label{flex:1 1 11rem;max-width:22rem}
#widgetDialog label{display:block;min-width:0;font-size:.81rem;font-weight:600}
#widgetDialog label>.inp,#widgetDialog label>.sel{display:block;margin-top:4px;font:inherit;font-weight:400;min-height:36px}
#widgetDialog .widget-visibility{display:flex;align-items:center;gap:10px;padding:10px 14px;margin-bottom:12px;cursor:pointer}
.widget-visibility small{display:block;font-weight:400}
#widgetDialog input[type="checkbox"]{accent-color:#38bdf8}
.widget-sections{display:flex;flex-direction:column;gap:10px}
.widget-section h3{margin:0;padding:12px;border-bottom:1px solid #334155;color:#bae6fd;font-size:.95rem;font-weight:650}
.widget-section-body{padding:12px}
.widget-section-body>:not(:last-child),.widget-section-body [data-kinds]>label:not(:last-child){margin-bottom:10px}
.widget-fields{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,8.5rem),1fr));align-items:end;gap:9px}
.widget-provider{margin:6px 0}
.widget-provider a{color:#7dd3fc}
.widget-help{margin:12px 0 0}
.widget-footer{display:flex;align-items:center;justify-content:space-between;gap:12px;border-top:1px solid #263449}
.widget-actions{display:flex;flex:none;gap:8px;margin-left:auto}
#widgetError{color:#fca5a5;margin:0}
#widgetError:empty{display:none}
#widgetDialog :focus-visible{outline:2px solid #7dd3fc;outline-offset:2px}
.widget-preview-panel{position:sticky;top:0;min-width:0;background:#0f172a;border:1px solid #334155;border-radius:10px;padding:14px}
.widget-body.preview-expanded{grid-template-columns:1fr}
.preview-expanded .widget-controls{display:none}
.preview-expanded .widget-preview-panel{position:static}
.widget-preview-toolbar{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-bottom:12px}
.widget-preview-toolbar h3{margin:0;font-size:1rem}
#widgetPreviewStatus{flex:1 1 10rem;font-size:.8rem}
#widgetPreviewViewport{position:relative;overflow:hidden;width:100%;background:conic-gradient(#253044 25%,#151f30 0 50%,#253044 0 75%,#151f30 0) 0 0/24px 24px;border-radius:6px}
#widgetPreviewViewport[data-backdrop="dark"]{background:#020617}
#widgetPreviewViewport[data-backdrop="light"]{background:#e2e8f0}
#widgetPreview{position:absolute;left:0;top:0;transform-origin:top left;overflow:hidden}
#widgetPreviewSize{margin:10px 0 0}
#weatherBlockPalette,#weatherPlacedBlocks{display:flex;flex-wrap:wrap;gap:6px;margin-top:8px}
#weatherBuilder{margin-top:12px}
#widgetPreview .weather-block{cursor:grab;touch-action:none}
#widgetPreview .weather-corner{position:absolute;width:14px;height:14px;border:2px solid #fff;background:#0284c7;border-radius:3px;z-index:2;touch-action:none}
#widgetPreview .weather-corner[data-corner=nw]{top:1px;left:1px;cursor:nwse-resize}
#widgetPreview .weather-corner[data-corner=ne]{top:1px;right:1px;cursor:nesw-resize}
#widgetPreview .weather-corner[data-corner=sw]{bottom:1px;left:1px;cursor:nesw-resize}
#widgetPreview .weather-corner[data-corner=se]{bottom:1px;right:1px;cursor:nwse-resize}
.widget-gallery{max-height:300px;overflow:auto;padding:3px;margin-bottom:8px}
.widget-gallery-section{display:grid;grid-template-columns:repeat(auto-fill,minmax(126px,1fr));gap:7px;margin-bottom:12px}
.widget-gallery-section h4{grid-column:1/-1;margin:4px 0;font-size:.82rem;color:#bae6fd}
.widget-gallery-section[data-shape="column"] .widget-example-view{height:124px}
#stageShell.nudging :is(.design-layer,.hdmi-input).selected{outline:none}
#stageShell.nudging :is(.resize-handle,.rotate-handle,.crop-outline){visibility:hidden}
.widget-example{min-width:0;padding:5px;text-align:left;background:#0f172a;color:#e2e8f0;border:1px solid #334155;border-radius:6px;cursor:pointer}
.widget-example[aria-pressed=true]{border-color:#38bdf8;background:#163653}
.widget-example-view{position:relative;display:block;height:72px;overflow:hidden;background:linear-gradient(145deg,#293b54,#0b1528);border-radius:3px;pointer-events:none}
.widget-example-view>div{transform-origin:top left}
.widget-example-label{display:block;min-height:2.5em;margin-top:4px;font-size:.78rem}
#widgetPreviewViewport[data-weather-drop="true"]{outline:2px dashed #38bdf8}
#widgetResize{position:absolute;z-index:3;width:26px;height:26px;background:#075985;color:white;border:1px solid #7dd3fc;border-radius:4px;cursor:nwse-resize;touch-action:none}
@media(max-width:1050px){
  .widget-body{grid-template-columns:1fr}
  .widget-preview-panel{position:static;grid-row:1}
}
@media(max-width:600px){
  .widget-header,.widget-sections{grid-template-columns:1fr}
  .widget-header,.widget-footer,.widget-body{padding:10px 12px}
  .widget-footer{flex-wrap:wrap}
}
