/* Both the project editor and published player use the existing four palettes. */
#tourDialog .projectTypePicker{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:18px 0 24px}
#tourDialog .projectTypePicker button{display:flex;align-items:flex-start;flex-direction:column;gap:5px;min-height:82px;padding:15px;border:1px solid var(--ws-border);border-radius:12px;background:var(--ws-soft);color:var(--ws-text);text-align:left}
#tourDialog .projectTypePicker button[aria-pressed=true]{background:var(--ws-selected);border-color:var(--ws-action);box-shadow:inset 4px 0 var(--ws-action)}
#tourDialog .projectTypePicker small{font-size:12px;font-weight:400;color:var(--ws-muted)}
#versusEditor{padding:22px;background:var(--ws-surface);border:1px solid var(--ws-border);border-radius:16px;color:var(--ws-text)}
#versusEditor[hidden],#versusEditor [hidden],.versusViewer [hidden]{display:none!important}
.versusEditorHeader{display:flex;align-items:center;justify-content:space-between;gap:16px}.versusEditorHeader h2{font-size:25px;margin:5px 0}.versusEditorHeader small{color:var(--ws-action);font-weight:700;font-size:11px;letter-spacing:.1em}
.versusEditorActions,.versusAssetTools{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
#versusEditor button,#versusEditor .button{border:1px solid var(--ws-border);border-radius:9px;background:var(--ws-soft);color:var(--ws-text);padding:9px 13px;font:600 14px/1.4 system-ui;cursor:pointer;text-decoration:none}
#versusEditor button:hover,#versusEditor .button:hover{background:var(--ws-selected);border-color:var(--ws-action)}
#versusEditor .primary{background:var(--ws-action);border-color:var(--ws-action);color:var(--ws-surface)}
#versusEditor button:disabled{opacity:.5;cursor:default}
#versusEditor button:focus-visible,#versusEditor .button:focus-within{outline:3px solid var(--ws-action);outline-offset:3px}
.versusSteps{display:flex;gap:12px;list-style:none;padding:0;margin:22px 0;color:var(--ws-muted);font-size:13px}.versusSteps li{display:flex;align-items:center;gap:8px;flex:1;padding:10px 12px;border-bottom:2px solid var(--ws-border)}.versusSteps b{color:var(--ws-action)}
.versusAssets{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-bottom:12px}.versusAsset{display:flex;align-items:center;gap:10px;min-width:0;min-height:70px;padding:10px;border:1px solid var(--ws-border);border-radius:12px;background:var(--ws-soft)}.versusAsset.isEmpty{border-style:dashed;color:var(--ws-muted)}.versusAsset img{width:72px;height:42px;object-fit:cover;border-radius:6px}.versusAsset>div{flex:1;min-width:0}.versusAsset strong{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:13px}.versusAsset small{display:block;margin-top:5px;color:var(--ws-muted);font-size:11px}.versusAssetLetter{display:grid;place-items:center;flex:none;width:26px;height:26px;border-radius:7px;background:var(--ws-action);color:var(--ws-surface);font-weight:750}
.versusAssetTools>span{margin-left:auto;color:var(--ws-muted);font-size:13px}.versusHint{font-size:12px;line-height:1.6;color:var(--ws-muted)}
.versusPreviewHost{display:grid;place-items:center;min-height:360px;height:clamp(360px,62vh,800px);margin-top:18px;background:var(--ws-soft);border:1px solid var(--ws-border);border-radius:14px;overflow:hidden}.versusPreviewHost iframe{border:0;width:100%;height:100%}.versusPreviewHost>p{padding:20px;color:var(--ws-muted)}
#versusEditor [data-versus-message]{font-size:13px;color:var(--ws-action);min-height:1em}.versusEditorFooter{display:flex;align-items:center;justify-content:space-between;gap:12px;border-top:1px solid var(--ws-border);margin-top:18px;padding-top:16px;font-size:13px}.versusEditorFooter>div{display:flex;gap:10px}
.projectKindBadge{display:inline-block;padding:3px 7px;margin-right:7px;border-radius:5px;background:var(--ws-selected);color:var(--ws-action);font-size:10px;font-weight:700}
.versusViewer{margin:0;background:var(--ws-surface,#f8f9fa);color:var(--ws-text,#272d34);font-family:system-ui,sans-serif;display:flex;flex-direction:column;height:100dvh;min-height:0}
.versusViewer *{box-sizing:border-box}.versusViewHeader{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 18px;border-bottom:1px solid var(--ws-border,#acb4be);flex:none}.versusViewHeader h1{font-size:18px;margin:3px 0;overflow-wrap:anywhere}.versusViewHeader small{font-size:10px;letter-spacing:.15em;color:var(--ws-muted,#5c6672)}
.versusViewMain{display:flex;flex-direction:column;flex:1;min-height:0;padding:12px;gap:10px}.versusStage{position:relative;flex:1;min-height:160px;overflow:hidden;border-radius:12px;background:#182026}.versusPane{position:absolute;inset:0}.versusRight{clip-path:inset(0 0 0 50%)}
.versusSideLabel{position:absolute;top:12px;padding:6px 10px;background:#15252bc9;border:1px solid #ffffff45;border-radius:7px;color:#fff;font-size:12px;pointer-events:none;z-index:2}.versusLabelLeft{left:12px}.versusLabelRight{right:12px}.versusDivider{position:absolute;inset:0 auto 0 50%;width:2px;z-index:3;background:#fff;box-shadow:0 0 7px #0008;pointer-events:none}
#versusHandle{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:46px;height:46px;border:2px solid #fff;border-radius:50%;background:#203b48db;color:#fff;box-shadow:0 3px 15px #0006;font-size:25px;cursor:ew-resize;touch-action:none;pointer-events:auto}
.versusViewStatus{position:absolute;inset:0;display:grid;place-items:center;margin:0;padding:24px;background:#182026;color:#fff;text-align:center;pointer-events:none;z-index:4}.versusViewControls{display:flex;align-items:center;gap:10px;flex:none}.versusViewControls input{flex:1;min-width:60px;accent-color:var(--ws-action,#485461)}.versusViewer button{padding:8px 11px;border:1px solid var(--ws-border,#acb4be);border-radius:8px;background:var(--ws-soft,#e9ebee);color:var(--ws-text,#272d34);cursor:pointer;white-space:nowrap;font:inherit;font-size:12px}.versusViewer button:focus-visible,.versusViewer input:focus-visible{outline:3px solid var(--ws-action,#485461);outline-offset:2px}.versusViewer button:disabled{opacity:.45}.versusViewer .versusHint{margin:0;color:var(--ws-muted,#5c6672)}
.versusPinForm{position:absolute;inset:0;z-index:5;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:14px;background:#182026;color:#fff}.versusPinForm input{width:180px;padding:12px;font:24px monospace;text-align:center;letter-spacing:.3em}.versusPinForm p{font-size:13px;color:#ffccbd}
@media(max-width:760px){#versusEditor{padding:14px}.versusEditorHeader{align-items:flex-start;flex-direction:column}.versusEditorHeader h2{font-size:21px}.versusAssets{grid-template-columns:1fr}.versusSteps{gap:5px}.versusSteps li{padding:9px 3px;font-size:11px;gap:5px}.versusEditorFooter{align-items:flex-start;flex-direction:column}.versusEditorFooter>div{width:100%}.versusEditorFooter button{flex:1}.versusPreviewHost{min-height:390px;height:65vh}.versusViewHeader{padding:9px 12px}.versusViewHeader h1{font-size:15px}.versusViewMain{padding:8px}.versusViewControls{gap:6px}.versusViewControls button{padding:8px}.versusViewer .versusHint{font-size:10px}#tourDialog .projectTypePicker{gap:8px}#tourDialog .projectTypePicker button{padding:10px;font-size:13px}}

/* The standalone player must not inherit the main site's reserved sidebar margin. */
body.versusViewer{background:var(--ws-surface)!important}
body.versusViewer>main.versusViewMain{margin:0!important;padding:12px!important;width:100%;max-width:none;background:none!important}
body.versusViewer>.versusViewHeader{height:auto;min-height:0;background:var(--ws-surface);padding:10px 16px}
body.versusEmbedded>.versusViewHeader{display:none}
@media(max-width:760px){body.versusViewer>main.versusViewMain{padding:8px!important}}
@media(max-width:480px){.versusViewControls{flex-wrap:wrap}.versusViewControls input{flex-basis:calc(100% - 45px)}.versusSideLabel{font-size:10px;max-width:42%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.versusLabelLeft{left:8px}.versusLabelRight{right:8px}.versusAsset img{width:48px;height:32px}.versusAsset{gap:8px}}
#versusEditor .versusBatchProgress{padding:12px;margin:14px 0;background:var(--ws-soft);border:1px solid var(--ws-border);border-radius:10px;font-size:13px;display:grid;gap:8px}
#versusEditor .versusBatchProgress progress{width:100%;height:8px;appearance:none;border:0;border-radius:8px;overflow:hidden;background:var(--ws-selected)}
#versusEditor .versusBatchProgress progress::-webkit-progress-bar{background:var(--ws-selected)}
#versusEditor .versusBatchProgress progress::-webkit-progress-value{background:var(--ws-action)}
#versusEditor .versusBatchProgress.isRunning progress::-webkit-progress-value{background:linear-gradient(110deg,var(--ws-action) 25%,var(--ws-border) 50%,var(--ws-action) 75%);background-size:200% 100%;animation:versusProgressSweep 1.4s linear infinite}
@keyframes versusProgressSweep{to{background-position:-200% 0}}
@media(prefers-reduced-motion:reduce){#versusEditor .versusBatchProgress.isRunning progress::-webkit-progress-value{animation:none}}
.versusSourceDialog{width:min(500px,calc(100% - 28px));padding:24px;border:1px solid var(--ws-border,#c8d2c1);border-radius:18px;background:var(--ws-surface,#fffdf8);color:var(--ws-text,#244133);box-shadow:0 20px 70px #172b2933}.versusSourceDialog::backdrop{background:#172b2966}.versusSourceDialog header{display:flex;align-items:center;justify-content:space-between;gap:16px}.versusSourceDialog h2{font-size:22px;margin:0}.versusSourceDialog header button{width:44px;height:44px;padding:0;font-size:24px}.versusSourceDialog p{font-size:14px;line-height:1.6;color:var(--ws-muted,#647467);margin:14px 0 20px}.versusSourceChoices{display:grid;grid-template-columns:1fr 1fr;gap:12px}.versusSourceChoices button{display:flex;flex-direction:column;justify-content:center;gap:10px;min-height:110px;min-width:0;padding:18px 14px;text-align:left;border:1px solid var(--ws-border,#c8d2c1);border-radius:12px;background:var(--ws-soft,#eef3e8)}.versusSourceChoices strong{font-size:17px}.versusSourceChoices span{font-size:12px;font-weight:400;line-height:1.5}.versusSourceChoices button:hover:not(:disabled){border-color:var(--ws-accent,#315b48)}#versusUploadLabel[aria-disabled=true]{opacity:.55;cursor:wait}@media(max-width:480px){.versusSourceChoices{grid-template-columns:1fr}.versusSourceChoices button{min-height:86px}.versusSourceDialog{padding:18px}}
