.runtime-workbench{border:1px solid #80633a;background:#1c2117;box-shadow:0 18px 40px #0004;margin-bottom:28px}
.runtime-toolbar{display:flex;justify-content:space-between;align-items:center;gap:24px;padding:22px 26px;border-bottom:1px solid #635535;background:linear-gradient(#343525,#24291c)}
.runtime-toolbar h2{font-size:27px;margin:6px 0}.runtime-toolbar p:not(.card-kicker){font-size:12px;color:#b9ae91;max-width:690px}
.runtime-toolbar .button{flex-shrink:0}.runtime-status{padding:13px 24px;background:#242719;border-top:1px solid #55492d;font-size:12px;color:#b8c897;overflow-wrap:anywhere}
.runtime-status[data-state=warning]{color:#e3b67f}.component-frame{display:block;border:0;width:100%;background:#10170f}
.editor-frame{height:min(900px,90vh);min-height:690px}.game-frame,.replay-frame{height:790px;min-height:720px}
.runtime-placeholder{padding:60px;text-align:center;color:#c9b479;font:24px Caudex}.runtime-welcome{position:relative;background:#080b08;text-align:center}
.runtime-welcome img{max-width:800px;width:100%;display:block;margin:auto;filter:brightness(.65)}.runtime-welcome span{position:absolute;bottom:10%;left:0;right:0;font:28px Caudex;color:#e6d3a0;text-shadow:0 2px 8px #000}
.draft-bar button{font-size:10px;margin-left:auto;margin-right:25px}.creation-edit-panel #open-in-browser-editor{margin:12px 0;width:100%}.editor-workbench{margin-top:3px}
@media(max-width:760px){.runtime-toolbar{padding:19px;flex-wrap:wrap;gap:15px}.runtime-toolbar .button{width:100%;font-size:13px}.runtime-toolbar h2{font-size:25px}.runtime-toolbar p:not(.card-kicker){font-size:11px}.runtime-status{padding:12px 17px;font-size:11px}.runtime-placeholder{padding:40px 15px;font-size:21px}.editor-frame{height:950px;min-height:790px}.game-frame,.replay-frame{height:780px;min-height:730px}.draft-bar button{margin-right:12px}.runtime-welcome span{font-size:24px}}
.ranked-submissions { margin-top:2rem; padding:1.5rem; border:1px solid #736343; background:#20271c; }
.ranked-submissions h2 { margin:.3rem 0; }
.ranked-submissions label { display:block; max-width:24rem; margin:1rem 0; color:#d9cca8; }
.ranked-submissions input[type=text] { display:block; box-sizing:border-box; width:100%; margin-top:.5rem; padding:.75rem; background:#141a12; border:1px solid #736343; color:#eee0be; }
.ranked-job { padding:1rem 0; border-top:1px solid #514d36; overflow-wrap:anywhere; }
.ranked-job span { margin-left:1rem; color:#dcc678; }
.ranked-job p { margin:.5rem 0; }
.ranked-job small { color:#b0ab91; }
.ranked-recording { margin-top:2rem; padding:1.5rem; border:1px solid #736343; background:linear-gradient(120deg,#293021,#1b2118); }
.ranked-recording h2 { margin:.3rem 0; }
.ranked-settings { display:flex; flex-wrap:wrap; gap:1rem; align-items:end; margin:1.5rem 0; }
.ranked-settings label { display:grid; gap:.5rem; color:#d9cca8; min-width:8rem; }
.ranked-settings select { padding:.75rem; background:#141a12; border:1px solid #736343; color:#eee0be; }
.ranked-recording .button:disabled { opacity:.5; cursor:wait; }
.ranked-recording [role=status] { color:#c1c8a8; }
@media(max-width:600px) { .ranked-settings label { flex:1; } .ranked-settings .button { width:100%; } }


/* Game/replay height is measured by the registered runtime, never clamped. */
.runtime-workbench { border-color:#6f5b38; border-radius:5px; overflow:hidden; margin-bottom:16px; box-shadow:0 10px 28px #0003; }
.runtime-toolbar { gap:16px; padding:13px 18px; }
.runtime-toolbar h2 { font-size:24px; margin:4px 0; }
.runtime-toolbar p:not(.card-kicker) { font-size:12px; margin-top:4px; color:#bdb69d; }
.runtime-toolbar .button { min-height:39px; padding:8px 16px; font-size:13px; gap:13px; }
.runtime-status { padding:9px 17px; font-size:11px; line-height:1.5; }
.game-runtime-slot { width:100%; min-width:0; background:#080d09; }
.game-frame,.replay-frame { width:100%; height:calc(min(1440px,100vw - 48px) * .75 + 150px); min-height:0; }
.runtime-welcome { aspect-ratio:4 / 3; overflow:hidden; }
.runtime-welcome img { width:100%; height:100%; max-width:none; object-fit:cover; }
.runtime-welcome span { font-size:clamp(22px,3vw,34px); }
.runtime-toolbar .button-row { display:flex; gap:8px; flex-wrap:wrap; }
[data-panel=play] .runtime-workbench[data-runtime-state=running]>.runtime-toolbar { display:none; }
@media (max-width:760px) {
  .runtime-toolbar { padding:12px 14px; gap:11px; }
  .runtime-toolbar .button { width:auto; flex:0 1 auto; min-height:38px; padding:8px 13px; font-size:12px; }
  .runtime-toolbar p:not(.card-kicker) { font-size:11px; }
  .runtime-status { padding:8px 13px; }
  .game-frame,.replay-frame { height:calc((100vw - 24px) * .75 + 185px); min-height:0; }
}
