/* WS3-02a: scoped to the JS capability/width decision. With the class absent,
   all legacy phone, tablet and transition styles remain authoritative. */
.ws3-workspace-switch, .ws3-navigation-toggle, .ws3-column-resizer { display: none; }
body.game-edit-workspace-active:has(.generated-game-page.generated-workspace-pc) .generated-game-page.generated-workspace-pc.workspace-three-column .workspace-body.generated-page-layout {
    grid-template-columns: var(--ws3-nav-width) var(--ws3-chat-width) minmax(0, 1fr) !important;
    grid-template-rows: 60px minmax(0, 1fr) !important;
}
body.game-edit-workspace-active:has(.generated-game-page.generated-workspace-pc) .generated-game-page.generated-workspace-pc.workspace-three-column .change-history-sidebar {
    grid-column: 1 !important; grid-row: 1 / -1 !important;
}
body.game-edit-workspace-active:has(.generated-game-page.generated-workspace-pc) .generated-game-page.generated-workspace-pc.workspace-three-column .chat-workfeed-column {
    grid-column: 2 !important; grid-row: 1 / -1 !important; position: relative !important;
    display:grid!important;grid-template-rows:60px minmax(0,1fr)!important;
}
body.game-edit-workspace-active:has(.generated-game-page.generated-workspace-pc) .generated-game-page.generated-workspace-pc.workspace-three-column :is(.preview-play-column, .game-edit-sidebar) {
    grid-column: 3 !important; grid-row: 2 !important;
    min-width: 0 !important; width: 100% !important;
    position: relative !important; inset: auto !important;
    transform: none !important; opacity: 1 !important;
    max-width: none !important; max-height: 100% !important;
}
/* Both panels stay mounted in the same cell. No iframe reparenting/reload and
   no fourth column; visibility + inert removes the inactive panel from input. */
body.game-edit-workspace-active:has(.generated-game-page.generated-workspace-pc) .generated-game-page.generated-workspace-pc.workspace-three-column .game-edit-sidebar {
    display: grid !important; visibility: hidden !important; pointer-events: none !important;
}
body.game-edit-workspace-active:has(.generated-game-page.generated-workspace-pc) .generated-game-page.generated-workspace-pc.workspace-three-column .preview-play-column {
    visibility: visible !important; pointer-events: auto !important;
}
body.game-edit-workspace-active:has(.generated-game-page.generated-workspace-pc) .generated-game-page.generated-workspace-pc.workspace-three-column.ws3-resources-open .game-edit-sidebar {
    visibility: visible !important; pointer-events: auto !important;
}
body.game-edit-workspace-active:has(.generated-game-page.generated-workspace-pc) .generated-game-page.generated-workspace-pc.workspace-three-column.ws3-resources-open .preview-play-column {
    visibility: hidden !important; pointer-events: none !important;
}
body.game-edit-workspace-active:has(.generated-game-page.generated-workspace-pc) .generated-game-page.generated-workspace-pc.workspace-three-column .ws3-workspace-switch {
    display: flex; grid-column: 3; grid-row: 1; gap: 8px; align-items: center;
    padding: 4px 16px; min-width: 0; height:60px!important;min-height:60px!important;box-sizing:border-box!important;align-self:stretch!important; border-bottom: 1px solid rgba(163,204,228,.18); background: #101827;
}
.ws3-workspace-switch button, .ws3-navigation-toggle {
    border: 1px solid #42516b; border-radius: 8px; background: #182235;
    color: #dce5f4; font: 600 14px/1.3 system-ui; min-height: 36px; padding: 7px 14px; cursor: pointer;
}
.ws3-workspace-switch button[aria-pressed="true"] { background: #304e65; border-color: #b5e9fa; color: #fff; }
.ws3-workspace-switch button:focus-visible, .ws3-navigation-toggle:focus-visible { outline: 2px solid #87d8ff; outline-offset: 2px; }
body.game-edit-workspace-active:has(.generated-game-page.generated-workspace-pc) .generated-game-page.generated-workspace-pc.workspace-three-column .change-history-sidebar .workspace-panel-head {
    position: relative; padding-right: 48px !important;
}
body.game-edit-workspace-active:has(.generated-game-page.generated-workspace-pc) .generated-game-page.generated-workspace-pc.workspace-three-column .ws3-navigation-toggle {
    display: grid; place-items: center; position: absolute; inset: 50% 8px auto auto; transform: translateY(-50%); box-sizing: border-box; padding: 0; width: 36px; height: 36px; min-height: 36px;
}
body.game-edit-workspace-active:has(.generated-game-page.generated-workspace-pc) .generated-game-page.generated-workspace-pc.workspace-three-column.ws3-navigation-collapsed .change-history-sidebar > :not(.workspace-panel-head),
body.game-edit-workspace-active:has(.generated-game-page.generated-workspace-pc) .generated-game-page.generated-workspace-pc.workspace-three-column.ws3-navigation-collapsed .change-history-sidebar .workspace-panel-head > :not(.ws3-navigation-toggle) {
    display: none !important;
}
body.game-edit-workspace-active:has(.generated-game-page.generated-workspace-pc) .generated-game-page.generated-workspace-pc.workspace-three-column :is(.workspace-panel-toggle, .workspace-column-resizer) { display: none !important; }
body.game-edit-workspace-active:has(.generated-game-page.generated-workspace-pc) .generated-game-page.generated-workspace-pc.workspace-three-column .ws3-column-resizer {
    display: block; position: absolute; inset: 0 -4px 0 auto; width: 9px; z-index: 30; cursor: col-resize; touch-action: none;
}
.ws3-column-resizer:hover, .ws3-column-resizer:focus-visible { background: #a7def34d; outline: 1px solid #b5e9fa; outline-offset: -2px; }
/* The existing composer remains outside the workbench DOM. Its measured Chat
   bounds, not old four-column CSS offsets, position it for both delivery tiers. */
body.game-edit-workspace-active:has(.generated-game-page.generated-workspace-pc.workspace-three-column) .chat-input-wrapper {
    left: var(--workspace-composer-left) !important;
    width: var(--workspace-composer-width) !important;
    max-width: var(--workspace-composer-width) !important;
}

/* Design alignment: reference 01-08 and V1.1 text. Only admitted desktop;
   compact UI, authorization and in-flight generation remain owned by existing code. */
.ws3-project-navigation,.ws3-original-link,.ws3-original-request{display:none}
body.game-edit-workspace-active:has(.generated-game-page.generated-workspace-pc) .generated-game-page.generated-workspace-pc.workspace-three-column {--ws-surface:rgba(8,23,39,.28);--ws-line:rgba(163,204,228,.18);--ws-ink:#f3f5fa;--ws-secondary:#b2c7d8;background:rgba(8,23,39,.28)!important;color:#f3f5fa!important;}
body.game-edit-workspace-active:has(.generated-game-page.generated-workspace-pc) .generated-game-page.generated-workspace-pc.workspace-three-column .workspace-topbar{min-height:64px!important;padding:10px 20px!important;gap:20px!important;}
body.game-edit-workspace-active:has(.generated-game-page.generated-workspace-pc) .generated-game-page.generated-workspace-pc.workspace-three-column .workspace-topbar-brand strong{font-size:20px!important;letter-spacing:-.4px!important;}
body.game-edit-workspace-active:has(.generated-game-page.generated-workspace-pc) .generated-game-page.generated-workspace-pc.workspace-three-column .workspace-title-project-button{display:flex!important;flex-direction:row!important;align-items:center!important;gap:16px!important;padding:0!important;min-width:0!important;}
body.game-edit-workspace-active:has(.generated-game-page.generated-workspace-pc) .generated-game-page.generated-workspace-pc.workspace-three-column .workspace-title-project-button > small{display:none!important;}
body.game-edit-workspace-active:has(.generated-game-page.generated-workspace-pc) .generated-game-page.generated-workspace-pc.workspace-three-column .workspace-title-project-button > strong{font-size:19px!important;max-width:280px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
body.game-edit-workspace-active:has(.generated-game-page.generated-workspace-pc) .generated-game-page.generated-workspace-pc.workspace-three-column .workspace-artifact-status{font-size:12px!important;line-height:1.4!important;color:#e6bb68!important;border:1px solid #796143;padding:5px 8px;border-radius:6px;white-space:nowrap;}
body.game-edit-workspace-active:has(.generated-game-page.generated-workspace-pc) .generated-game-page.generated-workspace-pc.workspace-three-column .workspace-partial-notice{padding:6px 20px!important;min-height:34px!important;background:rgba(11,26,43,.42)!important;border-color:rgba(163,204,228,.18)!important;font-size:12px!important;}
body.game-edit-workspace-active:has(.generated-game-page.generated-workspace-pc) .generated-game-page.generated-workspace-pc.workspace-three-column .workspace-header-actions{gap:10px!important;}
body.game-edit-workspace-active .generated-game-page.workspace-three-column .workspace-header-actions > [data-workspace-save-status] {
    flex: 0 1 auto !important;
    max-inline-size: min(20vw, 17rem) !important;
    min-inline-size: 0 !important;
    white-space: normal !important;
    overflow-wrap: anywhere;
    line-height: 1.2;
}
body.game-edit-workspace-active .generated-game-page.workspace-three-column .workspace-header-actions > :is(button, [data-workspace-share-export]) {
    flex: 0 0 auto !important;
}
body.game-edit-workspace-active:has(.generated-game-page.generated-workspace-pc) .generated-game-page.generated-workspace-pc.workspace-three-column .workspace-header-btn{min-height:40px!important;font-size:14px!important;}
body.game-edit-workspace-active:has(.generated-game-page.generated-workspace-pc) .generated-game-page.generated-workspace-pc.workspace-three-column .workspace-undo-btn:disabled, body.game-edit-workspace-active:has(.generated-game-page.generated-workspace-pc) .generated-game-page.generated-workspace-pc.workspace-three-column .workspace-redo-btn:disabled, body.game-edit-workspace-active:has(.generated-game-page.generated-workspace-pc) .generated-game-page.generated-workspace-pc.workspace-three-column [data-workspace-save-state]:disabled{display:none!important;}
body.game-edit-workspace-active:has(.generated-game-page.generated-workspace-pc) .generated-game-page.generated-workspace-pc.workspace-three-column .workspace-body.generated-page-layout{grid-template-rows:60px minmax(0,1fr)!important;}
body.game-edit-workspace-active:has(.generated-game-page.generated-workspace-pc) .generated-game-page.generated-workspace-pc.workspace-three-column .ws3-workspace-switch{padding:0 22px!important;gap:16px!important;background:rgba(8,23,39,.28)!important;border-color:rgba(163,204,228,.18)!important;}
body.game-edit-workspace-active:has(.generated-game-page.generated-workspace-pc) .generated-game-page.generated-workspace-pc.workspace-three-column .ws3-workspace-switch button{position:relative;min-height:48px!important;padding:12px 16px!important;background:transparent!important;border:0!important;border-radius:0!important;font-size:16px!important;font-weight:500!important;color:#bfc7d8!important;}
body.game-edit-workspace-active:has(.generated-game-page.generated-workspace-pc) .generated-game-page.generated-workspace-pc.workspace-three-column .ws3-workspace-switch button[aria-pressed="true"]{color:#f3f5fa!important;}
body.game-edit-workspace-active:has(.generated-game-page.generated-workspace-pc) .generated-game-page.generated-workspace-pc.workspace-three-column .ws3-workspace-switch button[aria-pressed="true"]::after{content:"";position:absolute;bottom:0;left:8px;right:8px;height:3px;background:#b5e9fa;border-radius:2px;}
body.game-edit-workspace-active:has(.generated-game-page.generated-workspace-pc) .generated-game-page.generated-workspace-pc.workspace-three-column .ws3-workspace-switch .ws3-tools-toggle{margin-left:auto!important;border:1px solid rgba(163,204,228,.22)!important;border-radius:8px!important;min-height:40px!important;padding:8px 18px!important;}
body.game-edit-workspace-active:has(.generated-game-page.generated-workspace-pc) .generated-game-page.generated-workspace-pc.workspace-three-column .ws3-tools-toggle[aria-pressed="true"]::after{display:none;}
body.game-edit-workspace-active:has(.generated-game-page.generated-workspace-pc) .generated-game-page.generated-workspace-pc.workspace-three-column .ws3-tools-toggle[aria-pressed="true"]{background:#b5e9fa!important;color:#0c2536!important;}
body.game-edit-workspace-active:has(.generated-game-page.generated-workspace-pc) .generated-game-page.generated-workspace-pc.workspace-three-column .change-history-sidebar{display:flex!important;flex-direction:column!important;background:rgba(8,23,39,.28)!important;}
body.game-edit-workspace-active:has(.generated-game-page.generated-workspace-pc) .generated-game-page.generated-workspace-pc.workspace-three-column .change-history-sidebar .workspace-panel-head{height:60px!important;min-height:60px!important;box-sizing:border-box!important;flex:0 0 60px!important;padding:16px 52px 16px 16px!important;display:flex!important;align-items:center!important;}
body.game-edit-workspace-active:has(.generated-game-page.generated-workspace-pc) .generated-game-page.generated-workspace-pc.workspace-three-column .change-history-sidebar .workspace-panel-head > span{font-size:16px!important;}
body.game-edit-workspace-active:has(.generated-game-page.generated-workspace-pc) .generated-game-page.generated-workspace-pc.workspace-three-column .change-history-sidebar .workspace-panel-head > small{display:none!important;}
body.game-edit-workspace-active:has(.generated-game-page.generated-workspace-pc) .generated-game-page.generated-workspace-pc.workspace-three-column .ws3-project-navigation{display:block;padding:16px 16px 0;border-bottom:1px solid rgba(163,204,228,.18);}
body.game-edit-workspace-active:has(.generated-game-page.generated-workspace-pc) .generated-game-page.generated-workspace-pc.workspace-three-column .ws3-project-navigation button{min-height:44px;width:100%;text-align:center;background:rgba(65,96,122,.16);color:#f3f5fa;border:1px solid rgba(163,204,228,.22);border-radius:8px;padding:10px 14px;font-family:inherit;font-size:15px;font-weight:500;line-height:1.4;cursor:pointer;}
body.game-edit-workspace-active:has(.generated-game-page.generated-workspace-pc) .generated-game-page.generated-workspace-pc.workspace-three-column .ws3-current-project{font-size:14px;line-height:1.5;background:rgba(123,170,202,.15);color:#e6f2fa;border-radius:8px;padding:12px;margin:14px 0 20px;overflow-wrap:anywhere;}
body.game-edit-workspace-active:has(.generated-game-page.generated-workspace-pc) .generated-game-page.generated-workspace-pc.workspace-three-column .ws3-project-navigation h2{font-size:11px;text-transform:uppercase;letter-spacing:1px;font-weight:600;color:#b2c7d8;margin:16px 0 12px;}
body.game-edit-workspace-active:has(.generated-game-page.generated-workspace-pc) .generated-game-page.generated-workspace-pc.workspace-three-column .change-history-list{padding:14px 12px 14px 20px!important;gap:8px!important;}
body.game-edit-workspace-active:has(.generated-game-page.generated-workspace-pc) .generated-game-page.generated-workspace-pc.workspace-three-column .change-history-record{position:relative;background:transparent!important;border:1px solid transparent!important;border-radius:8px!important;padding:10px 10px 10px 18px!important;text-align:left;box-shadow:none!important;}
body.game-edit-workspace-active:has(.generated-game-page.generated-workspace-pc) .generated-game-page.generated-workspace-pc.workspace-three-column .change-history-record strong{font-size:14px!important;font-weight:600!important;line-height:1.45!important;}
body.game-edit-workspace-active:has(.generated-game-page.generated-workspace-pc) .generated-game-page.generated-workspace-pc.workspace-three-column .change-record-instruction{display:-webkit-box!important;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;font-size:13px!important;line-height:1.5!important;}
body.game-edit-workspace-active:has(.generated-game-page.generated-workspace-pc) .generated-game-page.generated-workspace-pc.workspace-three-column .chat-workfeed-column{background:rgba(9,24,41,.48)!important;min-height:0!important;}
body.game-edit-workspace-active:has(.generated-game-page.generated-workspace-pc) .generated-game-page.generated-workspace-pc.workspace-three-column .chat-workfeed-head{height:60px!important;min-height:60px!important;box-sizing:border-box!important;margin:0!important;padding:12px 20px!important;flex-shrink:0!important;}
body.game-edit-workspace-active:has(.generated-game-page.generated-workspace-pc) .generated-game-page.generated-workspace-pc.workspace-three-column .chat-workfeed-head > span{font-size:18px!important;}
body.game-edit-workspace-active:has(.generated-game-page.generated-workspace-pc) .generated-game-page.generated-workspace-pc.workspace-three-column .chat-workfeed-head .workspace-project-chip{display:none!important;}
body.game-edit-workspace-active:has(.generated-game-page.generated-workspace-pc) .generated-game-page.generated-workspace-pc.workspace-three-column .ws3-original-link{display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;height:34px;min-height:34px;flex:0 0 auto;background:var(--ws-glass-bg);border:1px solid var(--ws-glass-border);border-radius:8px;color:#d6eaf6;font-size:13px;line-height:18px;text-decoration:none;cursor:pointer;padding:7px 12px;margin-left:auto;}
body.game-edit-workspace-active:has(.generated-game-page.generated-workspace-pc) .generated-game-page.generated-workspace-pc.workspace-three-column .ws3-original-link[hidden]{display:none!important;}
body.game-edit-workspace-active:has(.generated-game-page.generated-workspace-pc) .generated-game-page.generated-workspace-pc.workspace-three-column .game-preview-chat-panel{margin:0!important;border:0!important;border-radius:0!important;box-sizing:border-box!important;min-width:0!important;padding:20px 18px var(--workspace-composer-inset,260px)!important;gap:14px!important;justify-content:flex-start!important;scroll-padding-top:20px;scrollbar-color:#506f87 transparent;}
body.game-edit-workspace-active:has(.generated-game-page.generated-workspace-pc) .generated-game-page.generated-workspace-pc.workspace-three-column .ws3-original-request{display:block!important;color:#f3f5fa;flex-shrink:0;}
body.game-edit-workspace-active:has(.generated-game-page.generated-workspace-pc) .generated-game-page.generated-workspace-pc.workspace-three-column .ws3-original-request > strong{display:block;font-size:12px;color:#b7c2d8;margin:0 0 8px;}
body.game-edit-workspace-active:has(.generated-game-page.generated-workspace-pc) .generated-game-page.generated-workspace-pc.workspace-three-column .ws3-original-request > :is(p,.ws3-original-toggle){padding:16px;background:rgba(125,167,197,.14);border:1px solid rgba(164,205,229,.22);border-radius:12px;font-size:15px;line-height:1.6;margin:0;white-space:pre-wrap;overflow-wrap:anywhere;}
body.game-edit-workspace-active:has(.generated-game-page.generated-workspace-pc) .generated-game-page.generated-workspace-pc.workspace-three-column .workspace-origin-context{margin:0!important;background:rgba(65,96,122,.16)!important;border-color:rgba(163,204,228,.18)!important;}
body.game-edit-workspace-active:has(.generated-game-page.generated-workspace-pc) .generated-game-page.generated-workspace-pc.workspace-three-column .workspace-origin-context summary{padding:14px!important;font-size:14px!important;}
body.game-edit-workspace-active:has(.generated-game-page.generated-workspace-pc) .generated-game-page.generated-workspace-pc.workspace-three-column .workspace-origin-context summary span{display:block;font-weight:600;}
body.game-edit-workspace-active:has(.generated-game-page.generated-workspace-pc) .generated-game-page.generated-workspace-pc.workspace-three-column .workspace-origin-context summary small{display:block;color:#b2c7d8;font-size:12px;margin-top:4px;}
body.game-edit-workspace-active:has(.generated-game-page.generated-workspace-pc) .generated-game-page.generated-workspace-pc.workspace-three-column .workspace-edit-help{font-size:13px;color:#b2c7d8;}
body.game-edit-workspace-active:has(.generated-game-page.generated-workspace-pc) .generated-game-page.generated-workspace-pc.workspace-three-column [data-candidate-retry]{padding:16px!important;background:rgba(65,96,122,.16)!important;border:1px solid rgba(163,204,228,.18)!important;}
body.game-edit-workspace-active:has(.generated-game-page.generated-workspace-pc) .generated-game-page.generated-workspace-pc.workspace-three-column [data-candidate-retry] p{font-size:13px!important;line-height:1.6!important;color:#b2c7d8!important;}
body.game-edit-workspace-active:has(.generated-game-page.generated-workspace-pc) .generated-game-page.generated-workspace-pc.workspace-three-column[data-generated-view="preview"] section.generated-preview-view.preview-play-column.playable-preview-card.game-preview-column.page-region{padding:8px 6px 16px!important;align-items:stretch!important;gap:16px!important;background:rgba(8,23,39,.28)!important;overflow:auto!important;}
body.game-edit-workspace-active:has(.generated-game-page.generated-workspace-pc) .generated-game-page.generated-workspace-pc.workspace-three-column .preview-play-head{padding:0 0 8px!important;border:0!important;min-height:32px!important;}
body.game-edit-workspace-active:has(.generated-game-page.generated-workspace-pc) .generated-game-page.generated-workspace-pc.workspace-three-column .preview-play-head > span{font-size:19px!important;}
body.game-edit-workspace-active:has(.generated-game-page.generated-workspace-pc) .generated-game-page.generated-workspace-pc.workspace-three-column .game-preview-viewport{margin:0 auto!important;width:var(--preview-stage-width,100%)!important;max-width:100%!important;aspect-ratio:var(--preview-aspect,16 / 9);height:var(--preview-stage-height,auto)!important;min-height:0!important;box-sizing:border-box!important;border:1px solid rgba(163,204,228,.3)!important;border-radius:12px!important;box-shadow:none!important;}
body.game-edit-workspace-active:has(.generated-game-page.generated-workspace-pc) .generated-game-page.generated-workspace-pc.workspace-three-column[data-preview-orientation="portrait"] .game-preview-viewport{aspect-ratio:var(--preview-aspect,9 / 16);}
body.game-edit-workspace-active:has(.generated-game-page.generated-workspace-pc) .generated-game-page.generated-workspace-pc.workspace-three-column .game-preview-actions{display:flex!important;flex-wrap:wrap!important;grid-template-columns:none!important;justify-content:flex-start!important;gap:10px!important;}
body.game-edit-workspace-active:has(.generated-game-page.generated-workspace-pc) .generated-game-page.generated-workspace-pc.workspace-three-column .game-preview-actions button{flex:0 1 auto!important;padding:9px 18px!important;min-height:40px!important;font-size:14px!important;border-radius:8px!important;background:rgba(65,96,122,.16)!important;border-color:rgba(163,204,228,.25)!important;}
body.game-edit-workspace-active:has(.generated-game-page.generated-workspace-pc) .generated-game-page.generated-workspace-pc.workspace-three-column .game-preview-actions button:first-child{background:#b5e9fa!important;color:#0c2536!important;border-color:#b5e9fa!important;font-weight:600!important;}
body.game-edit-workspace-active:has(.generated-game-page.generated-workspace-pc) .generated-game-page.generated-workspace-pc.workspace-three-column .workspace-guide-empty{padding:16px!important;border:1px solid rgba(163,204,228,.18);border-radius:9px;font-size:14px!important;line-height:1.5!important;color:#b2c7d8!important;}
body.game-edit-workspace-active:has(.generated-game-page.generated-workspace-pc) .generated-game-page.generated-workspace-pc.workspace-three-column .game-edit-sidebar{padding:20px 22px!important;grid-template-rows:minmax(0,1fr)!important;background:rgba(8,23,39,.28)!important;}
body.game-edit-workspace-active:has(.generated-game-page.generated-workspace-pc) .generated-game-page.generated-workspace-pc.workspace-three-column .game-edit-sidebar > .workspace-panel-head, body.game-edit-workspace-active:has(.generated-game-page.generated-workspace-pc) .generated-game-page.generated-workspace-pc.workspace-three-column .game-edit-tabs, body.game-edit-workspace-active:has(.generated-game-page.generated-workspace-pc) .generated-game-page.generated-workspace-pc.workspace-three-column .workspace-sidebar-mode-panel{display:none!important;}
body.game-edit-workspace-active:has(.generated-game-page.generated-workspace-pc) .generated-game-page.generated-workspace-pc.workspace-three-column .game-edit-module.active{display:block!important;min-width:0!important;overflow:auto!important;}
body.game-edit-workspace-active:has(.generated-game-page.generated-workspace-pc) .generated-game-page.generated-workspace-pc.workspace-three-column .game-edit-module:not(.active){display:none!important;}
body.game-edit-workspace-active:has(.generated-game-page.generated-workspace-pc) .generated-game-page.generated-workspace-pc.workspace-three-column .workspace-numeric-panel:has([data-workspace-numeric-empty]) .workspace-numeric-apply-bar, body.game-edit-workspace-active:has(.generated-game-page.generated-workspace-pc) .generated-game-page.generated-workspace-pc.workspace-three-column .workspace-numeric-panel:has([data-workspace-numeric-empty]) .workspace-numeric-head{display:none!important;}
body.game-edit-workspace-active:has(.generated-game-page.generated-workspace-pc) .generated-game-page.generated-workspace-pc.workspace-three-column .workspace-numeric-empty{margin:0!important;padding:24px!important;border:1px solid rgba(163,204,228,.18)!important;border-radius:12px!important;font-size:15px!important;}
body.game-edit-workspace-active:has(.generated-game-page.generated-workspace-pc) .generated-game-page.generated-workspace-pc.workspace-three-column .code-workspace-panel.compact{display:grid!important;grid-template-columns:minmax(230px,36%) minmax(0,1fr)!important;grid-template-rows:minmax(0,1fr)!important;}
body.game-edit-workspace-active:has(.generated-game-page.generated-workspace-pc.workspace-three-column) .chat-input-bar.unified-pill{padding:16px!important;background:rgba(54,80,103,.72)!important;border:0!important;border-radius:12px!important;box-shadow:none!important;}
body.game-edit-workspace-active:has(.generated-game-page.generated-workspace-pc.workspace-three-column) #chatInputField{font-size:15px!important;line-height:1.6!important;font-weight:400!important;min-height:96px!important;height:112px!important;max-height:200px!important;color:#f3f5fa!important;}
body.game-edit-workspace-active:has(.generated-game-page.generated-workspace-pc.workspace-three-column) .candidate-edit-route{font-size:12px!important;margin-bottom:10px!important;}
body.game-edit-workspace-active:has(.generated-game-page.generated-workspace-pc.workspace-three-column) .candidate-edit-route select{font-size:13px!important;background:#0e1626!important;border-color:rgba(163,204,228,.22)!important;}
body.game-edit-workspace-active:has(.generated-game-page.generated-workspace-pc.workspace-three-column) #chatSendBtn{background:#b5e9fa!important;color:#0c2536!important;width:40px!important;height:40px!important;border:0!important;box-shadow:none!important;}
body.game-edit-workspace-active:has(.generated-game-page.generated-workspace-pc.workspace-three-column) .chat-input-wrapper{bottom:16px!important;}
/* Reuse the existing account-scoped project dialog above the desktop composer. */
body.game-edit-workspace-active #historySidebar.library-panel.ws3-project-library.open{display:flex!important;visibility:visible!important;position:fixed!important;z-index:2147483001!important;pointer-events:auto!important;}
body.game-edit-workspace-active:has(#historySidebar.ws3-project-library.open) .library-backdrop:not([hidden]){display:block!important;z-index:2147483000!important;}
body.game-edit-workspace-active:has(.workspace-three-column) .workspace-three-column .workspace-code-toolbar{display:grid!important;grid-template-columns:minmax(0,1fr) 120px auto!important;gap:10px!important;align-items:center!important;}
body.game-edit-workspace-active:has(.workspace-three-column) .workspace-three-column .workspace-code-toolbar :is(input,select){height:44px!important;font-size:14px!important;min-width:0!important;}
body.game-edit-workspace-active:has(.workspace-three-column) .workspace-three-column .code-preview pre{font-size:13px!important;line-height:1.65!important;tab-size:2;}
body.game-edit-workspace-active:has(.workspace-three-column) .workspace-three-column .workspace-origin-context{padding:0!important;}

/* WS3 controls: scoped desktop composition; legacy mobile markup remains mounted. */
.ws3-tools-header,.workspace-code-line-numbers{display:none;}
body.game-edit-workspace-active:has(.generated-game-page.generated-workspace-pc) .generated-game-page.generated-workspace-pc.workspace-three-column .game-edit-sidebar{grid-template-rows:minmax(0,1fr)!important;min-height:0!important;overflow:hidden!important;}
body.game-edit-workspace-active:has(.generated-game-page.generated-workspace-pc) .generated-game-page.generated-workspace-pc.workspace-three-column .ws3-tools-header{display:grid!important;grid-template-columns:minmax(0,1fr);grid-template-rows:32px 36px;align-items:center;gap:8px;margin:0;padding:0;}
body.game-edit-workspace-active:has(.generated-game-page.generated-workspace-pc) .generated-game-page.generated-workspace-pc.workspace-three-column .ws3-tools-header[hidden]{display:none!important;}
body.game-edit-workspace-active:has(.generated-game-page.generated-workspace-pc) .generated-game-page.generated-workspace-pc.workspace-three-column .ws3-tools-title{display:flex;align-items:center;justify-content:space-between;margin:0;gap:6px;}
body.game-edit-workspace-active:has(.generated-game-page.generated-workspace-pc) .generated-game-page.generated-workspace-pc.workspace-three-column .ws3-tools-title h2{font-size:16px;line-height:1.4;margin:0;white-space:nowrap;}
body.game-edit-workspace-active:has(.generated-game-page.generated-workspace-pc) .generated-game-page.generated-workspace-pc.workspace-three-column .ws3-tools-close{width:32px;height:32px;min-width:32px;flex-shrink:0;background:rgba(65,96,122,.16);border:1px solid rgba(163,204,228,.25);border-radius:8px;color:#f3f5fa;font-size:20px;cursor:pointer;}
body.game-edit-workspace-active:has(.generated-game-page.generated-workspace-pc) .generated-game-page.generated-workspace-pc.workspace-three-column .ws3-tool-tabs{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));border:1px solid rgba(163,204,228,.25);border-radius:8px;overflow:hidden;}
body.game-edit-workspace-active:has(.generated-game-page.generated-workspace-pc) .generated-game-page.generated-workspace-pc.workspace-three-column .ws3-tool-tabs button{min-height:36px;min-width:0;padding:6px 8px;border:0;border-right:1px solid rgba(163,204,228,.22);background:rgba(65,96,122,.16);color:#f3f5fa;font:500 13px/1.3 system-ui;}
body.game-edit-workspace-active:has(.generated-game-page.generated-workspace-pc) .generated-game-page.generated-workspace-pc.workspace-three-column .ws3-tool-tabs button[aria-pressed="true"]{background:rgba(139,186,219,.22);color:#edf5fb;}
body.game-edit-workspace-active:has(.generated-game-page.generated-workspace-pc) .generated-game-page.generated-workspace-pc.workspace-three-column .ws3-tool-tabs button:disabled{color:#b2c7d8;background:#101624;cursor:not-allowed;}
body.game-edit-workspace-active:has(.generated-game-page.generated-workspace-pc) .generated-game-page.generated-workspace-pc.workspace-three-column .ws3-tool-availability{display:none;}
body.game-edit-workspace-active:has(.generated-game-page.generated-workspace-pc) .generated-game-page.generated-workspace-pc.workspace-three-column .game-edit-module.active{min-height:0!important;max-height:100%!important;}
body.game-edit-workspace-active:has(.generated-game-page.generated-workspace-pc) .generated-game-page.generated-workspace-pc.workspace-three-column .workspace-code-compact{height:100%!important;min-height:0!important;display:grid!important;grid-template-rows:auto auto minmax(0,1fr)!important;gap:12px!important;overflow:hidden!important;}
body.game-edit-workspace-active:has(.generated-game-page.generated-workspace-pc) .generated-game-page.generated-workspace-pc.workspace-three-column .workspace-code-toolbar{display:grid!important;grid-template-columns:minmax(0,1fr) 100px auto!important;align-items:center!important;gap:8px!important;}
body.game-edit-workspace-active:has(.generated-game-page.generated-workspace-pc) .generated-game-page.generated-workspace-pc.workspace-three-column .workspace-code-toolbar input{grid-column:1!important;grid-row:1!important;width:100%!important;}
body.game-edit-workspace-active:has(.generated-game-page.generated-workspace-pc) .generated-game-page.generated-workspace-pc.workspace-three-column .workspace-code-toolbar select{grid-column:2!important;grid-row:1!important;width:100%!important;min-width:0!important;}
body.game-edit-workspace-active:has(.generated-game-page.generated-workspace-pc) .generated-game-page.generated-workspace-pc.workspace-three-column .workspace-code-toolbar button{grid-column:3!important;grid-row:1!important;min-height:44px!important;}
body.game-edit-workspace-active:has(.generated-game-page.generated-workspace-pc) .generated-game-page.generated-workspace-pc.workspace-three-column .code-workspace-panel.compact{display:grid!important;grid-template-columns:minmax(230px,36%) minmax(0,1fr)!important;grid-template-rows:minmax(0,1fr)!important;height:100%!important;min-height:0!important;max-height:none!important;overflow:hidden!important;}
body.game-edit-workspace-active:has(.generated-game-page.generated-workspace-pc) .generated-game-page.generated-workspace-pc.workspace-three-column .code-workspace-panel.compact .code-file-tree{height:100%!important;max-height:none!important;min-height:0!important;width:100%!important;overflow:auto!important;border:1px solid rgba(163,204,228,.18)!important;border-radius:8px!important;padding:8px!important;}
body.game-edit-workspace-active:has(.generated-game-page.generated-workspace-pc) .generated-game-page.generated-workspace-pc.workspace-three-column .code-workspace-panel.compact .code-editor-pane{display:grid!important;grid-template-rows:auto minmax(0,1fr)!important;height:100%!important;min-height:0!important;min-width:0!important;overflow:hidden!important;border:1px solid rgba(163,204,228,.18)!important;border-radius:8px!important;}
body.game-edit-workspace-active:has(.generated-game-page.generated-workspace-pc) .generated-game-page.generated-workspace-pc.workspace-three-column .code-editor-titlebar{min-height:48px!important;gap:10px!important;padding:10px 14px!important;}
body.game-edit-workspace-active:has(.generated-game-page.generated-workspace-pc) .generated-game-page.generated-workspace-pc.workspace-three-column .code-editor-titlebar strong{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:14px!important;}
body.game-edit-workspace-active:has(.generated-game-page.generated-workspace-pc) .generated-game-page.generated-workspace-pc.workspace-three-column .code-preview{height:auto!important;min-height:0!important;max-height:none!important;overflow:auto!important;padding:0!important;}
body.game-edit-workspace-active:has(.generated-game-page.generated-workspace-pc) .generated-game-page.generated-workspace-pc.workspace-three-column .workspace-code-readonly{position:sticky;top:0;left:0;padding:8px 14px;color:#b2c7d8;background:rgba(65,96,122,.16);border-bottom:1px solid rgba(163,204,228,.18);font-size:12px;z-index:1;}
body.game-edit-workspace-active:has(.generated-game-page.generated-workspace-pc) .generated-game-page.generated-workspace-pc.workspace-three-column .workspace-code-lines{display:flex;align-items:stretch;min-width:max-content;}
body.game-edit-workspace-active:has(.generated-game-page.generated-workspace-pc) .generated-game-page.generated-workspace-pc.workspace-three-column .workspace-code-lines pre{margin:0!important;padding:14px!important;font:13px/1.65 ui-monospace,Consolas,monospace!important;white-space:pre!important;overflow:visible!important;max-height:none!important;background:transparent!important;}
body.game-edit-workspace-active:has(.generated-game-page.generated-workspace-pc) .generated-game-page.generated-workspace-pc.workspace-three-column .workspace-code-lines .workspace-code-line-numbers{display:block!important;text-align:right;color:#8e9bb6;border-right:1px solid rgba(163,204,228,.18);user-select:none;}
body.game-edit-workspace-active:has(.generated-game-page.generated-workspace-pc) .generated-game-page.generated-workspace-pc.workspace-three-column .code-tree-name{font-size:13px!important;}
body.game-edit-workspace-active:has(.generated-game-page.generated-workspace-pc.workspace-three-column) .chat-input-bar.unified-pill{display:grid!important;grid-template-columns:32px minmax(0,1fr) auto!important;grid-template-rows:auto minmax(72px,auto) 32px!important;gap:6px!important;padding:10px 12px!important;min-height:0!important;border-radius:18px!important;}
body.game-edit-workspace-active:has(.generated-game-page.generated-workspace-pc.workspace-three-column) .chat-composer-row{display:contents!important;}
body.game-edit-workspace-active:has(.generated-game-page.generated-workspace-pc.workspace-three-column) #chatAttachmentTray{grid-column:1/-1!important;grid-row:1!important;}
body.game-edit-workspace-active:has(.generated-game-page.generated-workspace-pc.workspace-three-column) .candidate-edit-route{grid-row:3!important;grid-column:2!important;min-width:0!important;width:max-content!important;max-width:128px!important;justify-self:start!important;align-self:center!important;margin:0!important;display:block!important;}
body.game-edit-workspace-active:has(.generated-game-page.generated-workspace-pc.workspace-three-column) .candidate-model-caption{position:absolute!important;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);}
body.game-edit-workspace-active:has(.generated-game-page.generated-workspace-pc.workspace-three-column) .candidate-edit-route select{height:30px!important;min-height:30px!important;min-width:78px!important;max-width:128px!important;width:auto!important;field-sizing:content;padding:4px 22px 4px 8px!important;font-size:12px!important;border-radius:15px!important;border-color:transparent!important;background-color:transparent!important;box-shadow:none!important;text-overflow:ellipsis!important;cursor:pointer;}
body.game-edit-workspace-active:has(.generated-game-page.generated-workspace-pc.workspace-three-column) .candidate-edit-route select:hover{background-color:rgba(145,189,217,.14)!important;}
body.game-edit-workspace-active:has(.generated-game-page.generated-workspace-pc.workspace-three-column) #chatInputField{grid-column:1/-1!important;grid-row:2!important;min-height:72px!important;height:var(--ws3-input-height,72px)!important;max-height:168px!important;resize:none!important;overflow-y:auto!important;align-self:stretch!important;padding:8px 2px!important;font-size:14px!important;line-height:1.55!important;border:0!important;background:transparent!important;box-shadow:none!important;outline:none!important;}
/* Quiet surface and caret indicate text focus; individual keyboard controls
   retain their existing focus-visible outlines. No enclosing neon frame. */
body.game-edit-workspace-active:has(.generated-game-page.generated-workspace-pc.workspace-three-column) .chat-input-bar.unified-pill:focus-within{background:rgba(63,91,115,.78)!important;border:0!important;box-shadow:none!important;outline:none!important;}
body.game-edit-workspace-active:has(.generated-game-page.generated-workspace-pc.workspace-three-column) #chatInputField{caret-color:#edf6fc!important;color:#edf6fc!important;}
.chat-length-note{margin:5px 10px 0;color:#e6b38c;font:12px/1.5 system-ui;}
.chat-length-note[hidden]{display:none!important;}
body.game-edit-workspace-active:has(.generated-game-page.generated-workspace-pc.workspace-three-column) #chatCharCount[data-count-state=warning]{color:#e6b38c!important;opacity:1;}
body.game-edit-workspace-active:has(.generated-game-page.generated-workspace-pc.workspace-three-column) #chatCharCount[data-count-state=full]{color:#f5a0a8!important;opacity:1;}
body.game-edit-workspace-active:has(.generated-game-page.generated-workspace-pc.workspace-three-column) #chatAttachBtn{grid-column:1!important;grid-row:3!important;width:32px!important;height:32px!important;min-width:32px!important;border:0!important;border-radius:50%!important;background:transparent!important;}
body.game-edit-workspace-active:has(.generated-game-page.generated-workspace-pc.workspace-three-column) .chat-composer-row .right-actions{grid-column:3!important;grid-row:3!important;display:flex!important;gap:6px!important;position:static!important;align-self:center!important;}
body.game-edit-workspace-active:has(.generated-game-page.generated-workspace-pc.workspace-three-column) :is(#chatMicBtn,#chatSendBtn){height:32px!important;width:32px!important;min-width:32px!important;border-radius:8px!important;}
body.game-edit-workspace-active:has(.generated-game-page.generated-workspace-pc.workspace-three-column) #chatMicBtn{background:transparent!important;border-color:transparent!important;box-shadow:none!important;}
body.game-edit-workspace-active:has(.generated-game-page.generated-workspace-pc.workspace-three-column) #chatCharCount{position:static!important;grid-column:2!important;grid-row:3!important;justify-self:end!important;align-self:center!important;font-size:10px!important;pointer-events:none!important;opacity:.55;margin:0!important;padding:0!important;background:transparent!important;white-space:nowrap;}
body.game-edit-workspace-active:has(.generated-game-page.generated-workspace-pc.workspace-three-column) .right-actions .model-selector-wrap:not(.candidate-route-model){width:auto!important;min-width:0!important;flex:0 1 auto!important;}
body.game-edit-workspace-active:has(.generated-game-page.generated-workspace-pc.workspace-three-column) #modelSelector{width:auto!important;min-width:0!important;max-width:128px!important;height:30px!important;min-height:30px!important;padding:4px 8px!important;border-color:transparent!important;background:transparent!important;box-shadow:none!important;font-size:12px!important;border-radius:15px!important;}
/* Neutral Chat palette; retained warnings/errors keep their semantic colors. */
body.game-edit-workspace-active:has(.generated-game-page.generated-workspace-pc.workspace-three-column) :is(#chatAttachBtn,#chatMicBtn,#modelSelector,.candidate-edit-route select){color:#d2e1ed!important;}
body.game-edit-workspace-active:has(.generated-game-page.generated-workspace-pc.workspace-three-column) .candidate-edit-route option{background:#21394d;color:#edf6fc;}
body.game-edit-workspace-active:has(.generated-game-page.generated-workspace-pc.workspace-three-column) .chat-input-bar :is(button,select):focus-visible{outline:2px solid #d2e1ed!important;outline-offset:2px!important;}
body.game-edit-workspace-active:has(.generated-game-page.generated-workspace-pc.workspace-three-column) #chatSendBtn:hover:not(:disabled){background:#d6f3ff!important;}

body.game-edit-workspace-active:has(.generated-game-page.generated-workspace-pc) .generated-game-page.generated-workspace-pc.workspace-three-column[data-ws3-view="tools"] .game-edit-sidebar{grid-template-rows:auto minmax(0,1fr)!important;padding:8px 10px!important;gap:6px!important;}

/* WS3-LOOP-01: compact composer uses its content height. The previous 174px
   wrapper clipped the taller candidate route/target controls and Send row. */
body.game-edit-workspace-active:has(.generated-game-page.generated-workspace-pc:not(.workspace-three-column)) .chat-input-wrapper[data-workspace-composer] {
    height:auto!important;min-height:0!important;max-height:none!important;overflow:visible!important;
}
body.game-edit-workspace-active:has(.generated-game-page.generated-workspace-pc:not(.workspace-three-column)) .chat-input-bar.unified-pill {
    display:grid!important;grid-template-columns:40px minmax(0,1fr) auto!important;
    grid-template-rows:auto minmax(64px,auto) 40px!important;gap:8px!important;padding:12px!important;
    min-height:0!important;height:auto!important;max-height:calc(100dvh - 130px)!important;
    overflow-x:hidden!important;overflow-y:auto!important;
}
body.game-edit-workspace-active:has(.generated-game-page.generated-workspace-pc:not(.workspace-three-column)) .chat-composer-row {display:contents!important;}
body.game-edit-workspace-active:has(.generated-game-page.generated-workspace-pc:not(.workspace-three-column)) #chatAttachmentTray {grid-column:1/-1!important;grid-row:1!important;max-height:64px;overflow:auto;}
body.game-edit-workspace-active:has(.generated-game-page.generated-workspace-pc:not(.workspace-three-column)) #chatInputField {
    grid-column:1/-1!important;grid-row:2!important;min-height:64px!important;height:clamp(64px,16dvh,104px)!important;max-height:104px!important;resize:none!important;overflow-y:auto!important;
}
body.game-edit-workspace-active:has(.generated-game-page.generated-workspace-pc:not(.workspace-three-column)) .candidate-edit-route {grid-column:2!important;grid-row:3!important;min-width:0!important;margin:0!important;display:block!important;}
body.game-edit-workspace-active:has(.generated-game-page.generated-workspace-pc:not(.workspace-three-column)) .candidate-model-caption {position:absolute!important;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);}
body.game-edit-workspace-active:has(.generated-game-page.generated-workspace-pc:not(.workspace-three-column)) .candidate-edit-route select {height:40px!important;min-height:40px!important;width:100%!important;min-width:0!important;}
body.game-edit-workspace-active:has(.generated-game-page.generated-workspace-pc:not(.workspace-three-column)) #chatAttachBtn {grid-column:1!important;grid-row:3!important;width:40px!important;min-width:40px!important;height:40px!important;position:static!important;}
body.game-edit-workspace-active:has(.generated-game-page.generated-workspace-pc:not(.workspace-three-column)) .chat-composer-row .right-actions {grid-column:3!important;grid-row:3!important;position:static!important;display:flex!important;gap:6px!important;}
body.game-edit-workspace-active:has(.generated-game-page.generated-workspace-pc:not(.workspace-three-column)) :is(#chatMicBtn,#chatSendBtn) {width:40px!important;min-width:40px!important;height:40px!important;}
body.game-edit-workspace-active:has(.generated-game-page.generated-workspace-pc:not(.workspace-three-column)) #chatCharCount {position:absolute!important;right:14px!important;top:4px!important;font-size:10px!important;pointer-events:none!important;}

/* WS3-LOOP-03/04: native top-layer Code dialog. Same files, independent scroll. */
dialog.workspace-code-modal {margin:auto!important;width:100vw!important;max-width:100vw!important;height:100dvh!important;max-height:100dvh!important;border:0!important;background:transparent!important;box-sizing:border-box;color:#e7edf9;}
dialog.workspace-code-modal::backdrop {background:#030914bd;backdrop-filter:blur(6px);}
dialog.workspace-code-modal .workspace-code-modal-shell {width:min(1280px,94vw);height:min(860px,90dvh);min-height:0;}
dialog.workspace-code-modal .workspace-code-compact {height:100%;min-height:0;display:grid;grid-template-rows:auto auto minmax(0,1fr);overflow:hidden;}
dialog.workspace-code-modal .code-workspace-panel {height:100%!important;min-height:0!important;grid-template-columns:minmax(230px,36%) minmax(0,1fr)!important;overflow:hidden;}
dialog.workspace-code-modal :is(.code-file-tree,.code-editor-pane) {height:100%!important;min-height:0!important;max-height:none!important;overflow:auto!important;}
dialog.workspace-code-modal .code-editor-pane {display:grid!important;grid-template-rows:auto minmax(0,1fr)!important;}
dialog.workspace-code-modal .code-preview {min-height:0;overflow:auto;}
dialog.workspace-code-modal .workspace-code-lines {display:flex;min-width:max-content;}
dialog.workspace-code-modal .workspace-code-line-numbers {display:block!important;color:#9baac2;user-select:none;}
dialog.workspace-code-modal .workspace-code-lines pre {margin:0;padding:14px;font:13px/1.65 ui-monospace,Consolas,monospace;white-space:pre;}
.workspace-code-identity {overflow-wrap:anywhere;word-break:break-word;}
@media(max-width:600px){dialog.workspace-code-modal .code-workspace-panel {grid-template-columns:minmax(100px,34%) minmax(0,1fr)!important;}}

/* DS3 desktop state surfaces. Semantics are derived from existing classes and
   identity attributes, never from visual text or invented acceptance results. */
body.game-edit-workspace-active .workspace-three-column .change-history-record::before {
 content:"";position:absolute;left:3px;top:17px;width:6px;height:6px;border:1px solid #91a7b7;border-radius:50%;background:transparent;
}
body.game-edit-workspace-active .workspace-three-column .change-history-record.initial-version::before {background:#9fddf2;border-color:#9fddf2;border-radius:1px;transform:rotate(45deg);}
body.game-edit-workspace-active .workspace-three-column .change-history-record[data-history-kind=plan]::before {background:#9fddf2;border-color:#9fddf2;border-radius:1px;transform:rotate(45deg);}
body.game-edit-workspace-active .workspace-three-column .change-history-record[data-history-kind=version]::before {background:#48c4a1;border-color:#48c4a1;}
body.game-edit-workspace-active .workspace-three-column .change-history-record[data-history-kind=requirements]::before {background:#a3c6dc;border-color:#a3c6dc;}
body.game-edit-workspace-active .workspace-three-column .change-history-record[data-history-revision-id]::before {background:#48c4a1;border-color:#48c4a1;}
body.game-edit-workspace-active .workspace-three-column .change-history-record:is([aria-current=true],[aria-selected=true],.active) {background:rgba(127,170,201,.22)!important;border-color:rgba(180,221,243,.22)!important;}
body.game-edit-workspace-active .workspace-three-column .change-history-record:hover {background:rgba(127,170,201,.12)!important;}
/* Current identifies matching displayed code; Viewing details never switches it. */
body.game-edit-workspace-active .workspace-three-column .change-history-record[data-history-current=true] {border-color:rgba(94,192,165,.26)!important;}
body.game-edit-workspace-active .workspace-three-column .change-history-record[data-history-viewing=details] {background:rgba(127,170,201,.22)!important;border-color:rgba(180,221,243,.38)!important;}
body.game-edit-workspace-active .workspace-three-column .change-record-state {display:inline-block;font:500 11px/1.5 system-ui;color:#b7e5d5;margin:5px 6px 0 0;}
body.game-edit-workspace-active .workspace-three-column .change-record-state[data-history-viewing-label] {color:#c8eafb;}
body.game-edit-workspace-active #inspireView .workspace-three-column .change-history-record {
 display:flex!important;flex-direction:column!important;align-items:stretch!important;gap:6px!important;
 height:auto!important;min-height:0!important;max-height:none!important;flex-shrink:0;
}
body.game-edit-workspace-active #inspireView .workspace-three-column .change-record-state {margin:0!important;}
/* The measured viewport owns width and height. Landscape fills the desktop
   content track; portrait and expanded play can remain narrower and centered. */
body.game-edit-workspace-active #inspireView .workspace-three-column .game-preview-viewport {
 width:var(--preview-stage-width,100%)!important;max-width:100%!important;max-height:none!important;height:var(--preview-stage-height,auto)!important;
 aspect-ratio:var(--preview-aspect,16 / 9);flex:0 0 auto!important;
}
body.game-edit-workspace-active #inspireView .workspace-three-column .preview-play-column {scrollbar-width:thin;scrollbar-gutter:auto;}
body.game-edit-workspace-active .workspace-three-column .workspace-native-tools {background:transparent;color:#e8f2fa;}
body.game-edit-workspace-active .workspace-three-column .wt-editor-footer {background:rgba(12,28,45,.85);border-top:1px solid rgba(163,204,228,.18);}
body.game-edit-workspace-active .workspace-three-column .wt-properties fieldset {background:rgba(48,77,101,.12);border-color:rgba(163,204,228,.18);border-radius:8px;}
body.game-edit-workspace-active .workspace-three-column .workspace-native-tools :is(input,select) {background:rgba(16,34,53,.8);border-color:rgba(163,204,228,.25);color:#e8f2fa;}
body.game-edit-workspace-active .workspace-three-column .workspace-native-tools :is(input,select):focus-visible {outline-color:#a9def4;}
body.game-edit-workspace-active .workspace-three-column .code-workspace-panel {background:rgba(7,20,35,.3);}
body.game-edit-workspace-active .workspace-three-column :is(.code-file-tree,.code-editor-titlebar) {background:rgba(48,77,101,.15)!important;}
body.game-edit-workspace-active .workspace-three-column .workspace-numeric-empty {background:rgba(48,77,101,.12)!important;}

body.game-edit-workspace-active #inspireView .generated-game-page.generated-workspace-pc.workspace-three-column[data-generated-view="preview"] .workspace-stage-toolbar .game-preview-actions.preview-card-actions {
    display:flex!important;flex-flow:row wrap!important;grid-template-columns:none!important;justify-content:flex-start!important;width:100%!important;gap:8px!important;
}
body.game-edit-workspace-active #inspireView .generated-game-page.generated-workspace-pc.workspace-three-column[data-generated-view="preview"] .workspace-stage-toolbar .game-preview-actions.preview-card-actions > .game-preview-btn {
    flex:0 0 auto!important;width:auto!important;min-width:0!important;max-width:100%!important;padding:8px 14px!important;
}

/* Compact History summaries are plain text. The timestamp uses a separate quiet line rather than competing with the title. */
body.game-edit-workspace-active .workspace-three-column .change-history-record .change-record-top strong {display:flex!important;flex-direction:column!important;align-items:flex-start!important;gap:4px!important;min-width:0;}
body.game-edit-workspace-active .workspace-three-column .change-history-record em {display:inline!important;font-style:normal!important;font-size:inherit!important;font-weight:600!important;color:inherit!important;background:transparent!important;border:0!important;border-radius:0!important;box-shadow:none!important;padding:0!important;white-space:normal!important;}
body.game-edit-workspace-active .workspace-three-column .change-history-record .change-record-time {display:block!important;font-size:12px!important;font-weight:400!important;color:#abc0d0!important;white-space:normal!important;}

/* Artwork target stays in the attachment row. The visible select retains its
   accessible name; the redundant label takes no second text line. */

body.game-edit-workspace-active:has(.generated-game-page.generated-workspace-pc) .generated-game-page.generated-workspace-pc.workspace-three-column .ws3-tool-tabs button[aria-pressed="true"] {color:#edf5fb!important;background:rgba(139,186,219,.22)!important;}
body.game-edit-workspace-active:has(.generated-game-page.generated-workspace-pc) .generated-game-page.generated-workspace-pc.workspace-three-column .ws3-workspace-switch .ws3-tools-toggle[aria-pressed="true"] {background:#b5e9fa!important;color:#0c2536!important;border-color:#c7f0ff!important;}
body.game-edit-workspace-active .workspace-three-column input:is([type=checkbox],[type=range],[type=radio]) {accent-color:#b5e9fa!important;}
body.game-edit-workspace-active .workspace-three-column .wt-editor-footer {padding-top:8px;padding-bottom:8px;gap:6px 8px;}
body.game-edit-workspace-active .workspace-three-column .wt-editor-footer>p {font-size:11px;line-height:16px;margin:0;}

/* DS3 comparison iteration 3: a compact project identity and bounded frame. */
body.game-edit-workspace-active:has(.generated-game-page.generated-workspace-pc.workspace-three-column) .generation-result > .generated-game-page.generated-workspace-pc.workspace-three-column {width:calc(100vw - 20px)!important;max-width:calc(100vw - 20px)!important;height:calc(100dvh - 20px)!important;min-height:0!important;max-height:calc(100dvh - 20px)!important;margin:10px!important;border-radius:16px!important;overflow:hidden!important;}
body.game-edit-workspace-active:has(.generated-game-page.generated-workspace-pc.workspace-three-column) .generated-game-page.generated-workspace-pc.workspace-three-column .workspace-body.generated-page-layout {width:100%!important;max-width:100%!important;height:100%!important;min-height:0!important;}
body.game-edit-workspace-active:has(.generated-game-page.generated-workspace-pc.workspace-three-column) .generated-game-page.generated-workspace-pc.workspace-three-column .workspace-topbar {grid-template-columns:auto minmax(0,1fr) auto!important;gap:18px!important;}
body.game-edit-workspace-active:has(.generated-game-page.generated-workspace-pc.workspace-three-column) .generated-game-page.generated-workspace-pc.workspace-three-column .workspace-title-project-button {background:none!important;border:0!important;border-radius:0!important;box-shadow:none!important;backdrop-filter:none!important;width:fit-content!important;max-width:100%!important;flex:0 1 auto!important;gap:12px!important;}
body.game-edit-workspace-active:has(.generated-game-page.generated-workspace-pc.workspace-three-column) .generated-game-page.generated-workspace-pc.workspace-three-column .workspace-title-project-button>strong {max-width:min(25vw,320px)!important;font-size:18px!important;font-weight:600!important;}
body.game-edit-workspace-active:has(.generated-game-page.generated-workspace-pc.workspace-three-column) .generated-game-page.generated-workspace-pc.workspace-three-column .preview-play-head>span {display:none!important;}
body.game-edit-workspace-active:has(.generated-game-page.generated-workspace-pc.workspace-three-column) .generated-game-page.generated-workspace-pc.workspace-three-column .preview-play-head {min-height:0!important;padding:0!important;}

/* Preview content has one scrolling host. Natural information height must not
   inherit the legacy fixed-row clipping used by the four-column layout. */
body.game-edit-workspace-active:has(.generated-game-page.generated-workspace-pc.workspace-three-column) .generated-game-page.generated-workspace-pc.workspace-three-column[data-generated-view="preview"] section.generated-preview-view.preview-play-column.playable-preview-card.game-preview-column.page-region {display:flex!important;flex-direction:column!important;overflow:auto!important;min-height:0!important;}
body.game-edit-workspace-active:has(.generated-game-page.generated-workspace-pc.workspace-three-column) .generated-game-page.generated-workspace-pc.workspace-three-column .preview-play-column > :is(.game-preview-viewport,.workspace-stage-toolbar,.preview-shell-info,.preview-shell-meta,.preview-play-head) {flex:0 0 auto!important;}
body.game-edit-workspace-active:has(.generated-game-page.generated-workspace-pc.workspace-three-column) .generated-game-page.generated-workspace-pc.workspace-three-column .preview-play-head {height:auto!important;max-height:none!important;}
body.game-edit-workspace-active:has(.generated-game-page.generated-workspace-pc.workspace-three-column) .generated-game-page.generated-workspace-pc.workspace-three-column .preview-play-head:has([data-preview-status]:empty):has([data-workspace-source-evidence][hidden]) {height:0!important;min-height:0!important;max-height:0!important;overflow:hidden!important;margin:0!important;padding:0!important;border:0!important;}
body.game-edit-workspace-active:has(.generated-game-page.generated-workspace-pc.workspace-three-column) .generated-game-page.generated-workspace-pc.workspace-three-column .preview-play-column > .preview-shell-info {height:auto!important;min-height:0!important;max-height:none!important;overflow:visible!important;}

/* Controls and instructions align to the desktop content track. */
body.game-edit-workspace-active:has(.generated-game-page.generated-workspace-pc) .generated-game-page.generated-workspace-pc.workspace-three-column[data-generated-view="preview"] section.generated-preview-view.preview-play-column.playable-preview-card.game-preview-column.page-region > :is(.workspace-stage-toolbar.preview-shell-actions,.preview-shell-info,.preview-shell-meta,.preview-repair-actions) {
    box-sizing:border-box!important;width:100%!important;max-width:100%!important;min-width:0!important;margin-inline:0!important;align-self:stretch!important;justify-self:stretch!important;
}
body.game-edit-workspace-active .workspace-three-column .preview-shell-info .workspace-how-to-play {margin-inline:0!important;width:100%!important;max-width:100%!important;box-sizing:border-box;}
/* Code owns its overflow; long paths and source lines cannot widen a column. */
body.game-edit-workspace-active .workspace-three-column :is(.workspace-code-compact,.code-workspace-panel,.code-file-tree,.code-editor-pane,.code-preview) {min-width:0!important;max-width:100%!important;}
body.game-edit-workspace-active .workspace-three-column .code-preview {overflow:auto!important;overscroll-behavior:contain;}
body.game-edit-workspace-active .workspace-three-column .code-file-name {min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}

/* PV focus is the same mounted preview in a larger page-owned surface. It
   works in compact layout too and never relies on Fullscreen permission. */
body.game-edit-workspace-active #inspireView .generated-game-page.workspace-preview-expanded section.generated-preview-view.preview-play-column.playable-preview-card.game-preview-column.page-region {
    position:fixed!important;inset:10px 10px calc(var(--workspace-visual-viewport-bottom,0px) + 10px)!important;z-index:3500!important;
    display:flex!important;flex-direction:column!important;align-items:stretch!important;visibility:visible!important;pointer-events:auto!important;
    box-sizing:border-box!important;width:auto!important;height:auto!important;max-width:none!important;max-height:none!important;min-width:0!important;min-height:0!important;
    padding:12px 12px 16px!important;margin:0!important;gap:16px!important;overflow:auto!important;
    border:1px solid rgba(164,207,235,.38)!important;border-radius:14px!important;
    background:linear-gradient(110deg,rgba(29,55,76,.99),rgba(10,22,37,.99) 55%,rgba(30,58,79,.99))!important;box-shadow:0 0 0 100vmax rgba(3,10,19,.70),0 20px 70px #0008!important;
    transform:none!important;opacity:1!important;
}
body.game-edit-workspace-active #inspireView .generated-game-page.workspace-preview-expanded .preview-play-column > .workspace-stage-toolbar {
    position:sticky!important;bottom:0!important;z-index:5!important;width:100%!important;max-width:100%!important;margin-inline:0!important;padding:10px 0!important;flex:0 0 auto!important;
    background:rgba(15,32,49,.96)!important;box-sizing:border-box!important;
}
body.game-edit-workspace-active #inspireView .generated-game-page.workspace-preview-expanded .preview-play-column > .game-preview-viewport {width:var(--preview-stage-width,100%)!important;height:var(--preview-stage-height,auto)!important;max-width:100%!important;min-height:0!important;flex:0 0 auto!important;margin:0 auto!important;}
body.game-edit-workspace-active #inspireView .generated-game-page.workspace-preview-expanded .preview-play-column > .preview-shell-info {width:100%!important;max-width:100%!important;margin-inline:0!important;flex:0 0 auto!important;min-height:0!important;height:auto!important;max-height:none!important;}

/* PV: an ancestor with backdrop-filter/contain establishes a fixed containing
   block. Native top-layer promotion expands this SAME preview outside it. */
body.game-edit-workspace-active #inspireView .generated-game-page.workspace-preview-expanded section.generated-preview-view.preview-play-column.playable-preview-card.game-preview-column.page-region[popover]:popover-open {
    display:flex!important;position:fixed!important;inset:10px 10px calc(var(--workspace-visual-viewport-bottom,0px) + 10px)!important;margin:0!important;
    width:calc(100vw - 20px)!important;height:calc(100dvh - var(--workspace-visual-viewport-bottom,0px) - 20px)!important;
    min-width:0!important;min-height:0!important;max-width:none!important;max-height:none!important;box-sizing:border-box!important;
}
body.game-edit-workspace-active .generated-game-page.workspace-preview-expanded .preview-play-column[popover]::backdrop {background:rgba(3,10,19,.70);}

/* RA09 design QA: retain the identifying ASSET_### portion in the tree. The
   extension already appears in the filename, so the duplicate type cell does
   not take scarce label space. No file identity or directory model changes. */
body.game-edit-workspace-active .workspace-three-column .workspace-code-compact {container-name:workspace-code;container-type:inline-size;}
body.game-edit-workspace-active .workspace-three-column .code-file-tree .code-tree-file {grid-template-columns:24px minmax(0,1fr)!important;gap:6px!important;padding:6px 6px 6px calc(6px + var(--depth,0) * 10px)!important;}
body.game-edit-workspace-active .workspace-three-column .code-file-tree .code-tree-file > small {display:none!important;}
body.game-edit-workspace-active .workspace-three-column .code-file-tree .code-file-icon {width:24px;font-size:9px;}
body.game-edit-workspace-active .workspace-three-column .code-file-tree .code-tree-name {font-size:12px;font-weight:500;line-height:1.5;}
@container workspace-code (max-width:540px) {
 body.game-edit-workspace-active:has(.generated-game-page.generated-workspace-pc) .generated-game-page.generated-workspace-pc.workspace-three-column .code-workspace-panel.compact {grid-template-columns:minmax(0,1fr)!important;grid-template-rows:minmax(100px,.4fr) minmax(0,.6fr)!important;gap:8px!important;}
 body.game-edit-workspace-active .workspace-three-column .code-workspace-panel.compact :is(.code-file-tree,.code-editor-pane) {min-width:0!important;min-height:0!important;max-height:100%!important;overflow:auto!important;}
}

/* RA10 short-height QA: the list owns scrolling and each record keeps its
   natural height. Override the legacy grid that divides a fixed-height list
   into equal tracks and clips wrapped history summaries. */
body.game-edit-workspace-active #inspireView .generated-game-page.generated-workspace-pc.workspace-three-column .change-history-sidebar > .change-history-list {
    display:flex!important;
    flex-direction:column!important;
    align-items:stretch!important;
    justify-content:flex-start!important;
    gap:8px!important;
    grid-template:none!important;
    flex:1 1 0!important;
    height:auto!important;
    min-height:0!important;
    overflow-y:auto!important;
    overflow-x:hidden!important;
    overscroll-behavior:contain;
}
body.game-edit-workspace-active #inspireView .generated-game-page.generated-workspace-pc.workspace-three-column .change-history-sidebar > .change-history-list > .change-history-record {
    flex:none!important;
    height:auto!important;
    min-height:max-content!important;
    max-height:none!important;
    overflow:hidden!important;
    box-sizing:border-box!important;
}
body.game-edit-workspace-active .workspace-three-column .change-history-list .change-record-top {flex:0 0 auto;min-height:0;max-width:100%;}
body.game-edit-workspace-active .workspace-three-column .change-history-list .change-record-instruction {flex:0 0 auto!important;}

/* PV compact QA: the controls/instructions belong to the available content
   track, never to the height-fitted game width. Reusing stage width here
   causes wrapped instructions to feed back into an ever smaller viewport. */
body.game-edit-workspace-active:has(.generated-game-page.generated-workspace-pc:not(.workspace-three-column)) .generated-game-page.generated-workspace-pc:not(.workspace-three-column)[data-generated-view="preview"] section.generated-preview-view.preview-play-column.playable-preview-card.game-preview-column.page-region > :is(.workspace-stage-toolbar.preview-shell-actions,.preview-shell-info,.preview-shell-meta,.preview-repair-actions) {
    box-sizing:border-box!important;width:100%!important;max-width:100%!important;min-width:0!important;margin-inline:0!important;align-self:stretch!important;justify-self:stretch!important;
}
body.game-edit-workspace-active .generated-game-page.generated-workspace-pc:not(.workspace-three-column) .workspace-stage-toolbar .game-preview-actions {
    width:100%!important;max-width:100%!important;display:flex!important;flex-wrap:wrap!important;gap:8px!important;box-sizing:border-box!important;
}
body.game-edit-workspace-active .generated-game-page.generated-workspace-pc:not(.workspace-three-column) .workspace-stage-toolbar .game-preview-actions button {
    width:auto!important;min-width:84px!important;max-width:100%!important;flex:1 1 84px!important;min-height:36px!important;height:auto!important;padding:8px 10px!important;font-size:12px!important;line-height:18px!important;
}
body.game-edit-workspace-active .generated-game-page.generated-workspace-pc:not(.workspace-three-column) .workspace-how-to-play {
    width:100%!important;max-width:100%!important;min-width:0!important;margin:0!important;padding:12px!important;box-sizing:border-box!important;overflow-wrap:anywhere;
}
body.game-edit-workspace-active .generated-game-page.generated-workspace-pc:not(.workspace-three-column) .workspace-how-to-play > summary {
    display:flex!important;align-items:center!important;flex-wrap:nowrap!important;gap:6px 12px!important;font-size:14px!important;line-height:1.5!important;
}
body.game-edit-workspace-active .generated-game-page.generated-workspace-pc:not(.workspace-three-column) .workspace-how-to-play > summary > :is(strong,span) {font-size:14px!important;line-height:1.5!important;white-space:normal!important;}
body.game-edit-workspace-active .generated-game-page.generated-workspace-pc:not(.workspace-three-column) .workspace-how-to-play-details {
    display:grid!important;grid-template-columns:minmax(0,1fr)!important;gap:12px!important;padding-top:12px!important;max-height:none!important;
}
body.game-edit-workspace-active .generated-game-page.generated-workspace-pc:not(.workspace-three-column) .workspace-how-to-play-details > span {
    display:flex!important;flex-direction:column!important;gap:4px!important;min-width:0!important;max-width:100%!important;max-height:none!important;font-size:14px!important;line-height:1.5!important;white-space:normal!important;overflow:visible!important;
}
body.game-edit-workspace-active .generated-game-page.generated-workspace-pc:not(.workspace-three-column) .workspace-how-to-play-details strong {display:block!important;font-size:13px!important;line-height:1.5!important;}

/* A collapsed compact guide has one title row. Full instructions remain in
   the expanded body, not in an unbounded summary beside a tiny game. */
body.game-edit-workspace-active .generated-game-page.generated-workspace-pc:not(.workspace-three-column) .workspace-how-to-play > summary > strong {flex:0 0 auto!important;white-space:nowrap!important;}
body.game-edit-workspace-active .generated-game-page.generated-workspace-pc:not(.workspace-three-column) .workspace-how-to-play > summary > span {flex:1 1 auto!important;min-width:0!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;}
body.game-edit-workspace-active .generated-game-page.generated-workspace-pc:not(.workspace-three-column) .workspace-how-to-play[open] > summary > span {display:none!important;}

/* Compact primary label stays readable; secondary controls retain density. */
body.game-edit-workspace-active .generated-game-page.generated-workspace-pc:not(.workspace-three-column) .workspace-stage-toolbar .game-preview-actions button:first-child {min-width:108px!important;flex-basis:108px!important;}

/* PV fixed-aspect host contract applies to compact AND three-column shells.
   Legacy compact width:100% must not widen an already height-fitted stage: the
   viewport and its frame consume the same measured dimensions. Responsive
   legacy games remain on their existing path. Controls keep the full track. */
body.game-edit-workspace-active #inspireView .generated-game-page .game-preview-viewport[data-preview-mode="fixed_aspect"] {
    box-sizing:border-box!important;
    width:var(--preview-stage-width,100%)!important;height:var(--preview-stage-height,auto)!important;
    min-width:0!important;min-height:0!important;max-width:100%!important;max-height:none!important;
    aspect-ratio:var(--preview-aspect,16 / 9)!important;
    margin-inline:auto!important;justify-self:center!important;align-self:center!important;flex:0 0 auto!important;
}

/* PV compact layout owns its internal flow. The legacy mobile four-column
   action grid reserved tracks narrower than the primary button's minimum and
   the preview grid spread empty rows between the game and its controls. */
body.game-edit-workspace-active #inspireView .generated-game-page.generated-workspace-pc:not(.workspace-three-column)[data-generated-view="preview"] section.generated-preview-view.preview-play-column.playable-preview-card.game-preview-column.page-region {
    display:flex!important;flex-direction:column!important;justify-content:flex-start!important;align-content:flex-start!important;align-items:stretch!important;gap:8px!important;
    min-height:0!important;overflow-y:auto!important;overflow-x:hidden!important;
}
body.game-edit-workspace-active #inspireView .generated-game-page.generated-workspace-pc:not(.workspace-three-column) .preview-play-column > :is(.preview-play-head,.preview-shell-meta,.game-preview-viewport,.workspace-stage-toolbar,.preview-shell-info,.preview-repair-actions) {
    flex:0 0 auto!important;grid-area:auto!important;
}
body.game-edit-workspace-active #inspireView .generated-game-page.generated-workspace-pc:not(.workspace-three-column) .workspace-stage-toolbar .game-preview-actions.preview-card-actions {
    display:flex!important;flex-flow:row wrap!important;grid-template-columns:none!important;grid-auto-flow:initial!important;grid-auto-columns:auto!important;
    width:100%!important;min-width:0!important;max-width:100%!important;box-sizing:border-box!important;gap:8px!important;margin:0!important;padding:0!important;justify-content:flex-start!important;
}
body.game-edit-workspace-active #inspireView .generated-game-page.generated-workspace-pc:not(.workspace-three-column) .workspace-stage-toolbar .game-preview-actions.preview-card-actions > button {
    position:static!important;inset:auto!important;transform:none!important;box-sizing:border-box!important;
    width:auto!important;min-width:84px!important;max-width:100%!important;flex:1 1 84px!important;
    min-height:44px!important;height:auto!important;margin:0!important;padding:8px 10px!important;
    font-size:12px!important;line-height:18px!important;white-space:nowrap!important;
}
body.game-edit-workspace-active #inspireView .generated-game-page.generated-workspace-pc:not(.workspace-three-column) .workspace-stage-toolbar .game-preview-actions.preview-card-actions > button:first-child {min-width:108px!important;flex:1 1 108px!important;}


/* Desktop history controls use a single surface and an optically centered icon. */
.workspace-three-column .ws3-navigation-toggle::before {
    content: '';
    width: 7px;
    height: 7px;
    border: solid currentColor;
    border-width: 0 0 2px 2px;
    transform: translateX(1px) rotate(45deg);
}
body.game-edit-workspace-active:has(.generated-game-page.generated-workspace-pc) .generated-game-page.generated-workspace-pc.workspace-three-column.ws3-navigation-collapsed .ws3-navigation-toggle {
    left: 50%;
    right: auto;
    transform: translate(-50%, -50%);
}
.workspace-three-column.ws3-navigation-collapsed .ws3-navigation-toggle::before {
    transform: translateX(-1px) rotate(225deg);
}
body.game-edit-workspace-active .workspace-three-column .game-preview-chat-panel {
    scrollbar-width: none !important;
    scrollbar-gutter: auto !important;
}
.ws3-chat-scroll {
    display: none;
    pointer-events: none;
}
.workspace-three-column .ws3-chat-scroll:not([hidden]) {
    display: block;
    position: absolute;
    inset: 69px 6px max(34px, var(--workspace-composer-inset, 170px)) auto;
    width: 3px;
    opacity: 0;
    transition: opacity 140ms ease;
}
.ws3-chat-scroll::after {
    content: '';
    position: absolute;
    inset-inline: 0;
    top: clamp(0px, calc(var(--ws3-chat-scroll-progress, 0) * (100% - 22px)), 100%);
    height: 22px;
    border-radius: 99px;
    background: #91bed5;
}
body:not(:has(#chatInputField:focus)) .workspace-three-column .game-preview-chat-panel:is(:hover, :focus-within) ~ .ws3-chat-scroll {
    opacity: .62;
}
@media (prefers-reduced-motion: reduce) {
    .ws3-chat-scroll { transition: none !important; }
}

/* Artwork targeting stays in the composer toolbar alongside the other actions. */
.candidate-artwork-picker {
    position: relative;
    display: grid;
    place-items: center;
    align-self: center;
    flex: 0 0 30px;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    color: #a9c4d6;
}
.candidate-artwork-picker > span { font-size: 18px; line-height: 1; }
.candidate-artwork-picker:has(select:not(:disabled)):hover,
.candidate-artwork-picker.has-target { background: #7cb6d433; color: #d1f1ff; }
.candidate-artwork-picker:focus-within { outline: 2px solid #a9def4; }
.candidate-artwork-picker:has(select:disabled) { opacity: .5; }
.candidate-artwork-picker select {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    color-scheme: dark;
}

/* Fixed compact navigation reserves its space once, above Chat and Play. */
body.game-edit-workspace-active #inspireView .chat-message.has-game-workspace:has(.ws3-compact-navigation) {
    inset-inline: 0 !important;
}
body.game-edit-workspace-active #inspireView .chat-message.has-game-workspace:has(.ws3-compact-navigation),
body.game-edit-workspace-active #inspireView .chat-message.has-game-workspace .chat-bubble:has(.ws3-compact-navigation) {
    margin-inline: 0 !important;
    width: 100% !important;
    max-width: none !important;
}
body.game-edit-workspace-active #inspireView .generated-game-page.ws3-compact-navigation {
    --ws3-compact-header: calc(62px + env(safe-area-inset-top, 0px));
    padding-top: var(--ws3-compact-header) !important;
}
body.game-edit-workspace-active #inspireView .generated-game-page.ws3-compact-navigation
    > .workspace-partial-notice:not(:has([data-stage2-visual-retry]:not([hidden]))),
body.game-edit-workspace-active #inspireView .generated-game-page.ws3-compact-navigation:not(.ws3-compact-project-open) > .workspace-topbar {
    display: none !important;
}
body.game-edit-workspace-active #inspireView .generated-game-page.ws3-compact-navigation.ws3-compact-project-open > .workspace-topbar {
    display: block !important;
    position: fixed !important;
    inset: var(--ws3-compact-header) max(12px, calc((100vw - 720px) / 2)) auto auto !important;
    width: min(216px, calc(100vw - 24px)) !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 6px !important;
    box-sizing: border-box;
    max-height: calc(100dvh - var(--ws3-compact-header) - 12px) !important;
    overflow: auto !important;
    overscroll-behavior: contain;
    z-index: 2147482001 !important;
    border: 1px solid #accde54d !important;
    border-radius: 14px !important;
    background: #172b40 !important;
    box-shadow: 0 8px 24px #050d1970 !important;
}
body.game-edit-workspace-active #inspireView .generated-game-page.ws3-compact-navigation .workspace-topbar > :not(.workspace-topbar-actions),
body.game-edit-workspace-active #inspireView .generated-game-page.ws3-compact-navigation .workspace-topbar-actions > :not(:is([data-workspace-share-export], [data-workspace-publish], [data-workspace-save-state])) {
    display: none !important;
}
body.game-edit-workspace-active #inspireView .generated-game-page.ws3-compact-navigation .workspace-topbar-actions {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 2px !important;
    width: 100% !important;
    min-width: 0 !important;
    padding: 0 !important;
}
body.game-edit-workspace-active #inspireView .generated-game-page.ws3-compact-navigation [data-workspace-share-export] {
    display: grid !important;
}
body.game-edit-workspace-active #inspireView .generated-game-page.ws3-compact-navigation .workspace-topbar-actions .workspace-header-btn {
    width: 100% !important;
    min-height: 44px !important;
    justify-content: start !important;
    padding: 0 12px !important;
    text-align: left !important;
    border: 0 !important;
    background: transparent !important;
    color: #e2f3fc !important;
}
body.game-edit-workspace-active #inspireView .generated-game-page.ws3-compact-navigation .workspace-topbar-actions .workspace-header-btn:disabled {
    color: #9eb4c5 !important;
}
body.game-edit-workspace-active #inspireView .generated-game-page.ws3-compact-navigation .workspace-topbar-actions .workspace-header-btn[data-workspace-publish]:not(:disabled) {
    color: #b5e9fa !important;
}
body.game-edit-workspace-active #inspireView .generated-game-page.ws3-compact-navigation .workspace-topbar-actions .workspace-header-btn:hover:not(:disabled) {
    background: #29445a !important;
}
body.game-edit-workspace-active #inspireView .generated-game-page.ws3-compact-navigation .workspace-topbar-actions .workspace-share-menu:not([hidden]) {
    position: static !important;
    min-width: 0 !important;
    max-width: 100% !important;
    box-shadow: none !important;
}
.ws3-play-identity { display: none; }
body.game-edit-workspace-active #inspireView .generated-game-page.ws3-compact-navigation .preview-play-head {
    position: sticky !important;
    top: 0;
    z-index: 4;
    min-height: 44px !important;
    padding: 0 8px !important;
    background: #142638 !important;
    border-radius: 10px;
}
body.game-edit-workspace-active #inspireView .generated-game-page.ws3-compact-navigation .preview-play-head > span,
body.game-edit-workspace-active #inspireView .generated-game-page.ws3-compact-navigation .preview-play-column > .preview-shell-info {
    display: none !important;
}
.ws3-compact-navigation .ws3-play-identity {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex: 1;
    min-width: 0;
    color: #edf6fc;
}
.ws3-play-identity strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ws3-play-identity button {
    flex: none;
    min-height: 44px;
    padding-inline: 8px;
    color: #c4dfef;
    background: transparent;
    border: 0;
    font: inherit;
}
.ws3-play-info p { margin: 12px 0; line-height: 1.5; }
.ws3-play-info .workspace-how-to-play-details { display: grid; gap: 10px; }
.ws3-play-info .workspace-how-to-play-details strong { display: block; }
body.game-edit-workspace-active #inspireView .generated-game-page.ws3-compact-navigation .generated-page-layout.page-workbench {
    grid-template-rows: minmax(0, 1fr) !important;
    height: calc(100dvh - var(--ws3-compact-header)) !important;
    min-height: 0 !important;
}
body.game-edit-workspace-active #inspireView .generated-game-page.ws3-compact-navigation .generated-page-layout.page-workbench > .playable-shell.generated-view-shell {
    grid-row: 1 !important;
}
/* The compact Play view has one visible panel, including on touch devices. */
body.game-edit-workspace-active #inspireView .generated-game-page.generated-workspace-pc.ws3-compact-navigation[data-generated-view="preview"] .generated-page-layout.page-workbench > .playable-shell.generated-view-shell.preview-open.workspace-four-column-shell {
    grid-template-rows: minmax(0, 1fr) !important;
}
body.game-edit-workspace-active #inspireView .generated-game-page.ws3-compact-navigation:not(.workspace-preview-expanded) .preview-play-column > .game-preview-viewport {
    margin-block: auto 0 !important;
    align-self: center !important;
}
body.game-edit-workspace-active #inspireView .generated-game-page.ws3-compact-navigation:not(.workspace-preview-expanded) .preview-play-column > .workspace-stage-toolbar {
    position: relative !important;
    margin-block-end: auto !important;
    padding: 0 !important;
}
body.game-edit-workspace-active #inspireView .generated-game-page.ws3-compact-navigation:not(.workspace-preview-expanded) .workspace-stage-toolbar .game-preview-actions.preview-card-actions {
    flex-wrap: nowrap !important;
}
body.game-edit-workspace-active #inspireView .generated-game-page.generated-workspace-pc.ws3-compact-navigation:not(.workspace-preview-expanded) .workspace-stage-toolbar .game-preview-actions.preview-card-actions > button {
    min-width: 0 !important;
    flex: 1 1 0 !important;
    padding-inline: 4px !important;
    white-space: normal !important;
}
body.game-edit-workspace-active #inspireView .generated-game-page.ws3-compact-navigation .mobile-generated-view-switch {
    position: fixed !important;
    inset: calc(8px + env(safe-area-inset-top, 0px)) max(12px, env(safe-area-inset-right, 0px)) auto max(12px, env(safe-area-inset-left, 0px)) !important;
    transform: none !important;
    margin-inline: auto !important;
    transition: none !important;
    grid-template-columns: 44px minmax(0, 1fr) 44px !important;
    grid-template-rows: 50px !important;
    align-items: center !important;
    justify-items: center !important;
    gap: 8px !important;
    width: min(720px, calc(100% - max(12px, env(safe-area-inset-left, 0px)) - max(12px, env(safe-area-inset-right, 0px)))) !important;
    max-width: none !important;
    height: 50px !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    pointer-events: none !important;
    z-index: 70 !important;
}
.ws3-compact-pill {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: center;
    width: min(100%, 210px);
    height: 50px;
    padding: 2px;
    box-sizing: border-box;
    border: 1px solid #accde52b;
    border-radius: 999px;
    background: #172b40e8;
    box-shadow: 0 4px 16px #050d1940;
    backdrop-filter: blur(14px);
    pointer-events: auto;
}
body.game-edit-workspace-active #inspireView .generated-game-page.ws3-compact-navigation .mobile-generated-view-switch button {
    position: relative !important;
    inset: auto !important;
    display: grid !important;
    place-items: center !important;
    width: 100% !important;
    height: 44px !important;
    min-height: 44px !important;
    min-width: 0 !important;
    min-inline-size: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 999px !important;
    background: transparent !important;
    box-shadow: none !important;
    transform: none !important;
    writing-mode: horizontal-tb !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    font: 600 13px/1 system-ui !important;
    color: #d5e3ed !important;
    pointer-events: auto !important;
}
body.game-edit-workspace-active #inspireView .generated-game-page.ws3-compact-navigation .mobile-generated-view-switch > button {
    border: 1px solid #accde52b !important;
    background: #172b40e8 !important;
    backdrop-filter: blur(14px);
    box-shadow: 0 4px 16px #050d1940 !important;
}
body.game-edit-workspace-active #inspireView .generated-game-page.ws3-compact-navigation .mobile-generated-view-switch button[aria-expanded="true"],
body.game-edit-workspace-active #inspireView .generated-game-page.ws3-compact-navigation .ws3-compact-pill:not(:has([aria-expanded="true"])) button[aria-pressed="true"] {
    background: linear-gradient(155deg, #426278, #2d495e) !important;
    color: #f0f8ff !important;
}
.ws3-compact-navigation .mobile-generated-view-switch button:focus-visible {
    outline: 2px solid #b5e9fa !important;
    outline-offset: 2px;
}
body.game-edit-workspace-active #inspireView .ws3-compact-navigation .mobile-generated-view-switch [data-mobile-workspace-drawer]::after {
    display: none !important;
}
body.game-edit-workspace-active #inspireView .ws3-compact-navigation .mobile-generated-view-switch .mobile-drawer-label {
    writing-mode: horizontal-tb !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    font: inherit !important;
}
body.game-edit-workspace-active #inspireView .ws3-compact-navigation .mobile-generated-view-switch [data-mobile-workspace-drawer="history"] .mobile-drawer-label {
    display: none !important;
}
.ws3-compact-navigation .mobile-generated-view-switch .material-symbols-rounded { font-size: 22px; }
body.game-edit-workspace-active #inspireView .generated-game-page.ws3-compact-navigation .playable-shell > .mobile-game-preview-toggle {
    display: none !important;
}
body.game-edit-workspace-active #inspireView .generated-game-page.ws3-compact-navigation .chat-workfeed-head {
    display: none !important;
}
body.game-edit-workspace-active #inspireView .generated-game-page.ws3-compact-navigation[data-generated-view="chat"] .chat-workfeed-column {
    grid-template-rows: minmax(0, 1fr) !important;
}
body.game-edit-workspace-active #inspireView .generated-game-page.ws3-compact-navigation[data-generated-view="chat"] .game-preview-chat-panel {
    grid-row: 1 !important;
    height: auto !important;
    max-height: none !important;
    align-self: stretch !important;
    margin: 0 !important;
    padding-bottom: var(--workspace-composer-inset, 144px) !important;
}
/* User-message colors belong to chat-flow-theme on both compact and desktop
 * surfaces. A compact-only background here would override the shared palette. */
.ws3-compact-history-close { display: none; }
body.game-edit-workspace-active #inspireView .generated-game-page.ws3-compact-navigation .change-history-sidebar.open > .workspace-panel-toggle {
    display: none !important;
}
.ws3-compact-navigation .change-history-sidebar.open .workspace-panel-head {
    position: relative;
    padding-inline-end: 54px !important;
}
.ws3-compact-navigation .change-history-sidebar.open .ws3-compact-history-close {
    position: absolute;
    inset: 0 0 auto auto;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid #accde52b;
    border-radius: 50%;
    color: #edf6fc;
    background: #233b50;
}

/* The compact input reuses the keyboard offset and attachment/model controls. */
body.game-edit-workspace-active:has(.generated-game-page.generated-workspace-pc.ws3-compact-navigation) .chat-input-bar.unified-pill {
    grid-template-columns: 44px minmax(0, 1fr) auto !important;
    grid-template-rows: auto minmax(40px, auto) 44px !important;
    row-gap: 3px !important;
    padding: 6px 9px !important;
    border: 1px solid #accde52b !important;
    border-radius: 23px !important;
    background: #182d42f2 !important;
    box-shadow: 0 6px 22px #050d193d !important;
}
body.game-edit-workspace-active:has(.generated-game-page.generated-workspace-pc.ws3-compact-navigation) #chatInputField {
    min-height: 40px !important;
    height: var(--ws3-input-height, 40px) !important;
    max-height: 124px !important;
    padding: 7px 8px !important;
    font-size: 16px !important;
    line-height: 1.45 !important;
    color: #edf6fc !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    outline: none !important;
}
body.game-edit-workspace-active:has(.generated-game-page.ws3-compact-navigation) .chat-input-bar.unified-pill:focus-within {
    border-color: #a9def480 !important;
}
body.game-edit-workspace-active:has(.generated-game-page.generated-workspace-pc.ws3-compact-navigation) #chatInputField::placeholder {
    font-weight: 400 !important;
}
body.game-edit-workspace-active:has(.generated-game-page.generated-workspace-pc.ws3-compact-navigation)
    :is(#chatAttachBtn, #chatMicBtn, #chatSendBtn) {
    width: 44px !important;
    min-width: 44px !important;
    height: 44px !important;
    min-height: 44px !important;
}
body.game-edit-workspace-active:has(.generated-game-page.ws3-compact-navigation) :is(#chatAttachBtn, #chatMicBtn) {
    background: transparent !important;
    border-color: transparent !important;
    box-shadow: none !important;
}
body.game-edit-workspace-active:has(.generated-game-page.ws3-compact-navigation) #chatSendBtn {
    border-radius: 50% !important;
    color: #0c2536 !important;
    border-color: #b5e9fa !important;
    background: #b5e9fa !important;
    box-shadow: none !important;
}

/* Compact Chat reserves the reading column for the conversation and live feedback. */
.ws3-conversation-options,
.ws3-compact-navigation .game-preview-chat-panel :is(.workspace-context-group, .workspace-chat-history, [data-workspace-build-summary], [data-lab-planner-verify], [data-lab-presentation-recovery], [data-lab-geometry-repair], [data-candidate-retry]),
body.game-edit-workspace-active #inspireView .generation-result:has(> .ws3-compact-navigation) > :is(.generation-status, .generation-title, .generation-meta) {
    display: none !important;
}
.ws3-compact-navigation .change-history-sidebar.open .ws3-conversation-options {
    display: block !important;
    min-height: 44px;
    margin: 6px 12px;
    padding: 0 10px;
    border: 1px solid #accde54d;
    border-radius: 12px;
    background: #20394e;
    color: #e7f3fb;
}
.ws3-conversation-dialog {
    width: min(100% - 24px, 520px);
    max-height: 80dvh;
    margin: auto;
    padding: 16px;
    border: 1px solid #8ac6e359;
    border-radius: 20px;
    color: #e7f3fb;
    background: #142638;
    box-shadow: 0 0 28px #5caed52e;
}
.ws3-conversation-dialog::backdrop { background: #060e18aa; }
.ws3-conversation-dialog header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ws3-conversation-dialog > header { position: sticky; top: -16px; z-index: 1; padding-block: 4px 12px; background: #142638; }
.ws3-conversation-dialog h2 { margin: 0; font-size: 16px; }
.ws3-conversation-dialog :is(button, summary) { min-height: 44px; padding: 8px; color: inherit; }
.ws3-conversation-dialog .ws3-dialog-close {
    display: grid; place-items: center; flex: 0 0 44px;
    width: 44px; height: 44px; min-width: 44px; padding: 0;
    color: #e7f3fb; font: 24px/1 system-ui;
    background: linear-gradient(150deg, #385970aa, #20394e99);
    border: 1px solid #accde54d; border-radius: 50%;
    backdrop-filter: blur(12px); cursor: pointer;
}
.ws3-conversation-dialog .ws3-dialog-close:focus-visible { outline: 2px solid #b5e9fa; outline-offset: 2px; }
.ws3-conversation-dialog > div > :not([hidden]) { margin-block: 8px; }
body.game-edit-workspace-active #inspireView .generated-game-page.ws3-compact-navigation[data-generated-view="chat"] .game-preview-chat-panel {
    width: min(100%, 720px) !important;
    justify-self: center;
    padding-inline: clamp(14px, 4vw, 32px) !important;
    border: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
}
body.game-edit-workspace-active #inspireView .generated-game-page.ws3-compact-navigation[data-generated-view="chat"] .chat-workfeed-column {
    background: linear-gradient(145deg, #15283aee, #0e1b2bee 70%) !important;
    border: 0 !important;
    box-shadow: none !important;
}
.ws3-compact-navigation .ws3-original-request {
    display: block;
    align-self: end;
    max-width: 90%;
    color: #edf6fc;
}
.ws3-compact-navigation .ws3-original-request > :is(p,.ws3-original-toggle) {
    margin: 0;
    padding: 10px 14px;
    border: 1px solid #accde52b;
    border-radius: 14px;
    background: #233b50;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}
.generated-game-page .ws3-original-request.is-collapsed .ws3-original-content {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 5;
    overflow: hidden;
}
.generated-game-page .ws3-original-request:focus > p,
.generated-game-page .ws3-original-toggle:focus-visible {
    outline: 2px solid #a9e9f6;
    outline-offset: 2px;
}
.ws3-original-toggle {
    display: block;
    margin-inline-start: auto;
    color: inherit;
    text-align: start;
    cursor: pointer;
}
.ws3-original-toggle::after {
    content: '';
    display: block;
    width: 6px;
    height: 6px;
    margin: 6px 2px 2px auto;
    border: solid currentColor;
    border-width: 0 1.5px 1.5px 0;
    transform: rotate(225deg);
}
.ws3-original-request.is-collapsed .ws3-original-toggle::after {
    transform: rotate(45deg);
}
.workspace-origin-context[hidden] { display: none !important; }
.workspace-origin-context-body { overflow-wrap: anywhere; }
.candidate-plan-summary { display: grid; gap: 3px; margin: 10px 0 0; }
.candidate-plan-summary dt { font-weight: 600; }
.candidate-plan-summary dd { margin: 0 0 6px; color: #b7cddb; }
.candidate-creation-receipts {
    display: grid;
    gap: 8px;
    flex-shrink: 0;
    min-width: 0;
}
.candidate-chat-result {
    flex-shrink: 0;
    padding: 12px;
    border: 1px solid #435775;
    border-radius: 10px;
    background: #152a3c;
    color: #e1edf9;
    font: 13px/1.5 system-ui;
    overflow-wrap: anywhere;
}
.candidate-chat-result p { margin: 4px 0 0; color: #c4d4e5; }
.candidate-chat-artwork-update { display: flex; align-items: flex-start; gap: 10px; }
.candidate-chat-artwork-update > img { width: 48px; aspect-ratio: 1; object-fit: cover; border-radius: 6px; flex: none; }
.candidate-chat-artwork-update .workspace-prompt-chip { margin: 6px 0 0; }
body.game-edit-workspace-active:has(.generated-game-page.ws3-compact-navigation) .chat-input-wrapper[data-workspace-composer] {
    inset-inline: max(12px, calc((100% - 688px) / 2)) !important;
    width: auto !important;
}
body.game-edit-workspace-active:has(.generated-game-page.ws3-compact-navigation) .candidate-edit-route {
    width: max-content !important;
    max-width: 100% !important;
    justify-self: end !important;
}
body.game-edit-workspace-active:has(.generated-game-page.generated-workspace-pc.ws3-compact-navigation) .candidate-edit-route select {
    height: 44px !important;
    min-height: 44px !important;
    max-width: 115px !important;
    padding-inline-start: 8px !important;
    color: #d9eaf7 !important;
    border-color: transparent !important;
    background-color: transparent !important;
    box-shadow: none !important;
}
body.game-edit-workspace-active:has(.generated-game-page.ws3-compact-navigation)
    :is(.candidate-artwork-picker:not(.has-target):not(.can-add-artwork), .chat-input-bar:has(.candidate-artwork-chip) .candidate-artwork-picker, #chatCharCount[data-count-state="normal"]) {
    display: none !important;
}
.candidate-artwork-chip {
    grid-column: 1 / -1;
    grid-row: 2;
    display: flex;
    align-items: center;
    gap: 8px;
    justify-self: start;
    max-width: 100%;
    min-width: 0;
    padding: 3px 4px 3px 7px;
    border: 1px solid #accde54d;
    border-radius: 12px;
    color: #dbeef9;
    background: #233b50;
    font-size: 13px;
}
.candidate-artwork-chip img { width: 30px; height: 30px; object-fit: contain; }
.candidate-artwork-chip span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.candidate-artwork-chip > div { display: grid; min-width: 0; flex: 1; }
.candidate-artwork-chip small { color: #a8c6d7; font-size: 11px; white-space: normal; }
.candidate-artwork-chip.is-stale { border-color: #d2a97b; }
.workspace-media-asset.is-attached { border-color: #8bcddd; }
[data-candidate-artwork-feedback] { margin: 5px 0; color: #b8d6e3; font-size: 12px; }
.workspace-artwork-details { font-size: 12px; color: #adbfce; }
.workspace-artwork-details small { overflow-wrap: anywhere; }
.workspace-presentation-artwork { margin-bottom: 14px; }
.workspace-presentation-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    max-width: 640px;
}
.workspace-presentation-grid figure { margin: 0; overflow: hidden; }
.workspace-presentation-grid img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: contain; background: #102231; }
.workspace-presentation-grid figcaption { padding: 8px 10px; color: #d2e6f0; font-size: 13px; }
.candidate-task-status {
    margin: 8px 0; padding: 9px 10px; border: 1px solid #385569; border-radius: 9px; color: #c5e3ef;
}
.candidate-task-status p { margin: 5px 0 0; color: #b5cbd9; font-size: 13px; }
.candidate-task-status button { margin-top: 8px; }
.chat-workfeed-column:has(> .workspace-latest-message) {
    position: relative;
}
body.game-edit-workspace-active #inspireView .chat-workfeed-column > button.workspace-latest-message {
    position: absolute;
    z-index: 2;
    left: var(--workspace-jump-center, 50%);
    bottom: calc(var(--workspace-jump-anchor, var(--workspace-composer-inset, 144px)) + 12px);
    transform: translateX(-50%) !important;
    margin: 0;
    display: inline-grid;
    place-items: center;
    box-sizing: border-box;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 1px solid #84a8ba;
    border-radius: 50% !important;
    background: #183344 !important;
    color: #ddf5ff !important;
    cursor: pointer;
}
body.game-edit-workspace-active #inspireView .chat-workfeed-column > button.workspace-latest-message:hover {
    background: #25485c !important;
}
body.game-edit-workspace-active #inspireView .chat-workfeed-column > button.workspace-latest-message[hidden] {
    display: none;
}
.chat-workfeed-column > .workspace-latest-message:focus-visible {
    outline: 2px solid #a7edff;
    outline-offset: 2px;
}
.saved-conversation-timeline:empty { display: none; }
.saved-conversation-timeline,
.saved-conversation-message { display: flex; flex-direction: column; min-width: 0; }
.saved-conversation-timeline { gap: 12px; }
.saved-conversation-message { gap: 4px; }
body.game-edit-workspace-active .generated-game-page .preview-chat-time {
    margin-top: 4px !important;
    color: #a9becf !important;
    font-size: 11px !important;
    line-height: 1.4;
}
.saved-conversation-more:not([hidden]) { align-self: center; min-height: 36px; }
.saved-conversation-more[hidden] { display: none !important; }
.workspace-recent-answer { padding: 9px 10px; border-radius: 9px; background: #142b3c; color: #d2e6f0; }
.workspace-version-check-history { margin: 8px 4px; padding: 8px; color: #acccdb; font-size: 12px; }
.workspace-version-check-history > summary { padding-block: 4px; }
.workspace-history-preview { width: 100%; min-height: 240px; height: 55dvh; border: 0; border-radius: 8px; background: #101c28; }
.workspace-history-dialog.has-history-preview { width: min(900px, calc(100vw - 24px)); }
body.game-edit-workspace-active #inspireView .generated-game-page.ws3-compact-navigation .workspace-topbar-actions > [data-publication-retry]:not([hidden]) {
    display: inline-flex !important;
}
.candidate-artwork-chip button { min-width: 36px; min-height: 36px; color: inherit; background: transparent; border: 0; border-radius: 8px; }
/* Portrait expansion is a small host-level explanation. Native modal focus and
   the existing top-layer preview preserve the same live game document. */
dialog.workspace-portrait-expansion-dialog {
    box-sizing: border-box;
    width: min(420px, calc(100vw - 32px));
    max-height: calc(100dvh - 32px);
    margin: auto;
    padding: 24px;
    overflow: auto;
    border: 1px solid rgba(169, 221, 240, .38);
    border-radius: 20px;
    color: #e6f2f8;
    background: linear-gradient(135deg, rgba(37, 67, 85, .97), rgba(12, 25, 42, .98));
    box-shadow: 0 20px 65px #02091288, inset 0 1px 0 #c4ecff14;
    backdrop-filter: blur(20px);
}
dialog.workspace-portrait-expansion-dialog::backdrop { background: rgba(3, 10, 19, .65); }
dialog.workspace-portrait-expansion-dialog h2 { margin: 0 0 12px; font-size: 20px; line-height: 1.3; }
dialog.workspace-portrait-expansion-dialog p { margin: 0; color: #bdcedb; font-size: 15px; line-height: 1.6; }
.workspace-portrait-expansion-actions { display: flex; gap: 10px; margin-top: 24px; }
.workspace-portrait-expansion-actions button {
    flex: 1 1 auto; min-height: 44px; padding: 10px 12px;
    border: 1px solid #b7d7e738; border-radius: 12px;
    background: #bad9ee12; color: #e6f2f8; font: inherit; font-size: 14px;
    cursor: pointer;
}
.workspace-portrait-expansion-actions button.is-primary { background: #b5e8f7; color: #122d3b; border-color: #c9f1ff; font-weight: 600; }
.workspace-portrait-expansion-actions button:focus-visible { outline: 2px solid #b5e8f7; outline-offset: 3px; }
.workspace-portrait-expansion-actions button:disabled { cursor: default; opacity: .62; }
.workspace-confirmation-content {
    max-block-size: min(50dvh, 25rem);
    overflow: auto;
    padding-inline-end: 5px;
    overscroll-behavior: contain;
}
.workspace-retry-section + .workspace-retry-section { margin-block-start: 14px; }
.workspace-retry-section h3 { margin: 0 0 5px; font-size: 13px; color: #e4f4fa; }
.workspace-retry-section p { white-space: pre-wrap; overflow-wrap: anywhere; }
.workspace-retry-section ul { margin: 0; padding-inline-start: 1.2rem; overflow-wrap: anywhere; }
.workspace-retry-section small { display: block; color: #bdcedb; }
.workspace-retry-original { padding: 10px 12px; border-radius: 9px; background: #07172570; }
.workspace-confirmation-content > [role="status"]:not(:empty) { margin-block-start: 12px; color: #d3ebf7; }
.candidate-task-progress > div { display: flex; flex-wrap: wrap; gap: 6px; }
.candidate-task-progress details { margin-block-start: 8px; }
.candidate-task-progress ol { padding-inline-start: 21px; }
[data-saved-edit-turn]:not(:has(> [data-candidate-turn-result])) [data-candidate-earlier-reply],
[data-saved-edit-turn]:has(> [data-candidate-task-progress] > [data-candidate-earlier-reply]:not([open])) > [data-candidate-turn-result] {
    display: none;
}
body.game-edit-workspace-active:has(.generated-game-page.generated-workspace-pc) .chat-input-bar.unified-pill:has(.candidate-artwork-chip) {
    grid-template-rows: auto auto minmax(40px, auto) auto !important;
}
body.game-edit-workspace-active:has(.generated-game-page.generated-workspace-pc) .chat-input-bar.unified-pill:has(.candidate-artwork-chip) #chatInputField {
    grid-row: 3 !important;
}
body.game-edit-workspace-active:has(.generated-game-page.generated-workspace-pc) .chat-input-bar.unified-pill:has(.candidate-artwork-chip)
    :is(#chatAttachBtn, .candidate-edit-route, .right-actions, #chatCharCount) {
    grid-row: 4 !important;
}
/* Saved Candidate artwork: image-first gallery. Editing still attaches the
   exact owner/version/hash-bound asset to the existing Chat flow. */
.workspace-media-panel--candidate-gallery { container: candidate-gallery / inline-size; }
.workspace-media-panel--candidate-gallery .workspace-media-asset-grid {
  display:grid; grid-template-columns:minmax(0,1fr); gap:16px; align-items:stretch;
}
.workspace-media-panel--candidate-gallery .workspace-media-asset {
  padding:0; overflow:hidden; gap:0; background:#172d3e70; border-color:#8db4cc30; border-radius:14px;
}
.workspace-media-panel--candidate-gallery .workspace-media-asset-main {
  display:flex; flex-direction:column; align-items:stretch; gap:0; cursor:default;
}
.workspace-media-panel--candidate-gallery .workspace-media-thumb {
  position:relative;
  inline-size:100%; block-size:auto; aspect-ratio:4/3; min-block-size:150px; max-block-size:280px;
  border:0; border-bottom:1px solid #8db4cc20; border-radius:0;
  background-color:#112333;
  background-image:conic-gradient(#ffffff05 25%,transparent 0 50%,#ffffff05 0 75%,transparent 0);
  background-size:20px 20px;
}
.workspace-media-panel--candidate-gallery .workspace-media-thumb img {
  position:absolute; inset:0; display:block; inline-size:100%; block-size:100%; object-fit:contain; padding:12px; box-sizing:border-box;
}
.workspace-media-panel--candidate-gallery .workspace-media-asset-main > span:last-child { padding:12px 14px 6px; }
.workspace-media-panel--candidate-gallery .workspace-media-asset-main strong {
  font-size:14px; line-height:1.45; font-weight:600; white-space:normal; overflow-wrap:anywhere;
}
.workspace-media-panel--candidate-gallery .workspace-media-asset-main small {
  font-size:11px; line-height:1.5; color:#aec2d2; margin-top:4px;
}
.workspace-media-panel--candidate-gallery .workspace-media-asset-actions { padding:6px 14px 14px; margin-top:auto; }
.workspace-media-panel--candidate-gallery .workspace-media-asset-actions button {
  min-height:40px; width:100%; font-size:13px; font-weight:500;
}
@container candidate-gallery (min-width:550px) {
  .workspace-media-panel--candidate-gallery .workspace-media-asset-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@container candidate-gallery (min-width:850px) {
  .workspace-media-panel--candidate-gallery .workspace-media-asset-grid { grid-template-columns:repeat(3,minmax(0,1fr)); }
}
@container candidate-gallery (min-width:1150px) {
  .workspace-media-panel--candidate-gallery .workspace-media-asset-grid { grid-template-columns:repeat(4,minmax(0,1fr)); }
}

/* A pending image decision expands the existing Chat review, not a modal or
   another workspace. Hiding the other surfaces never replaces their iframe. */
.workspace-three-column[data-artwork-review-open="true"] .chat-workfeed-column { grid-column:2 / -1; min-inline-size:0; }
.workspace-three-column[data-artwork-review-open="true"] :is(.preview-play-column,.game-edit-sidebar,.ws3-workspace-switch) { display:none!important; }
.workspace-three-column[data-artwork-review-open="true"] .game-preview-chat-panel { padding:12px 16px 24px; min-block-size:0; overflow:auto; }
.workspace-three-column[data-artwork-review-open="true"] .game-preview-chat-panel > :not([data-asset-review-inline]) { display:none!important; }
.workspace-three-column[data-artwork-review-open="true"] .chat-input-wrapper[data-workspace-composer] { display:none!important; }
.workspace-three-column [data-asset-review-inline] { --asset-review-width:1600px; inline-size:100%; min-inline-size:0; max-inline-size:1600px; margin-inline:auto; }
.candidate-artwork-review-toolbar { display:flex; justify-content:flex-end; margin-block-end:10px; }
.workspace-three-column.ws3-compact-navigation { --artwork-review-chat-column:auto; }
.workspace-three-column [data-asset-review-inline] .ar-human-review { width:100%; max-width:none; box-sizing:border-box; }
.workspace-three-column [data-asset-review-inline] .ax-heading h2 { font-size:clamp(20px,2vw,28px); line-height:1.25; }
.workspace-three-column [data-asset-review-inline] .ax-gallery { max-block-size:none; }
.workspace-three-column [data-asset-review-inline] .ax-editor.ax-inline-editor { max-block-size:none; }
/* Compact Chat may be the last route when review finishes. Desktop always
   shows its Play surface alongside Chat, independent of that compact route. */
body.game-edit-workspace-active:has(.generated-game-page.generated-workspace-pc) .generated-game-page.generated-workspace-pc.workspace-three-column:not(.ws3-compact-navigation) section.generated-preview-view.preview-play-column.playable-preview-card.game-preview-column.page-region {
  display:flex!important; flex-direction:column!important; grid-template-columns:none!important; grid-template-rows:none!important;
  align-items:stretch!important; gap:16px!important; overflow:auto!important; padding:8px 6px 16px!important;
}
body.game-edit-workspace-active .generated-game-page.workspace-three-column:not(.ws3-compact-navigation) .preview-play-column > :is(.workspace-stage-toolbar,.preview-shell-info) {
  width:100%!important; max-width:none!important; margin-inline:0!important; flex:0 0 auto!important;
}
body.game-edit-workspace-active .generated-game-page.workspace-three-column:not(.ws3-compact-navigation) .preview-play-column .workspace-stage-toolbar {
  display:flex!important; flex-flow:row wrap!important; justify-content:flex-start!important; align-items:center!important; grid-template-columns:none!important;
}
@media(max-width:1100px) {
  .workspace-three-column[data-artwork-review-open="true"] .chat-workfeed-column { grid-column:auto; }
  .workspace-three-column[data-artwork-review-open="true"] .game-preview-chat-panel { padding:8px 8px max(16px,env(safe-area-inset-bottom)); }
  .workspace-three-column [data-asset-review-inline] .ar-human-review { padding:12px; }
  .workspace-three-column [data-asset-review-inline] .ax-heading h2 { font-size:20px; }
}

/* Desktop actions share a row even when the last compact route was Chat. */
body.game-edit-workspace-active #inspireView .generated-game-page.workspace-three-column .preview-play-column .game-preview-actions.preview-card-actions {
  display:flex!important; flex-flow:row wrap!important; justify-content:flex-start!important;
  grid-template-columns:none!important; gap:8px!important; width:100%!important;
}
body.game-edit-workspace-active #inspireView .generated-game-page.workspace-three-column .preview-play-column .game-preview-actions.preview-card-actions > button {
  width:auto!important; flex:0 1 auto!important; min-width:0!important;
}
@media(max-width:520px) {
  body.game-edit-workspace-active #inspireView .generated-game-page.ws3-compact-navigation:not(.workspace-preview-expanded) .preview-play-column > .game-preview-viewport {
    margin-block:clamp(12px,4svh,32px) 0!important;
  }
}

/* Compact navigation is now the complement of the desktop workspace, not
   a viewport-only media query. Keep the same single panel in that whole range. */
body.game-edit-workspace-active #inspireView .generated-game-page.generated-workspace-pc.ws3-compact-navigation .generated-page-layout.page-workbench > .playable-shell.generated-view-shell {
  display:grid!important; grid-template-columns:minmax(0,1fr)!important; grid-template-rows:minmax(0,1fr)!important;
  gap:0!important; min-width:0!important;
}
body.game-edit-workspace-active #inspireView .generated-game-page.generated-workspace-pc.ws3-compact-navigation[data-generated-view="preview"] .playable-shell > .chat-workfeed-column,
body.game-edit-workspace-active #inspireView .generated-game-page.generated-workspace-pc.ws3-compact-navigation[data-generated-view="chat"] .playable-shell > .preview-play-column {
  display:none!important;
}
body.game-edit-workspace-active #inspireView .generated-game-page.generated-workspace-pc.ws3-compact-navigation[data-generated-view="preview"] .playable-shell > .preview-play-column,
body.game-edit-workspace-active #inspireView .generated-game-page.generated-workspace-pc.ws3-compact-navigation[data-generated-view="chat"] .playable-shell > .chat-workfeed-column {
  grid-area:1 / 1!important; width:100%!important; min-width:0!important; min-height:0!important;
}

body.game-edit-workspace-active #inspireView .generated-game-page.generated-workspace-pc.ws3-compact-navigation .generated-page-layout.page-workbench {
  grid-template-columns:minmax(0,1fr)!important; column-gap:0!important;
}
body.game-edit-workspace-active #inspireView .generated-game-page.generated-workspace-pc.ws3-compact-navigation .generated-page-layout.page-workbench > .playable-shell.generated-view-shell {
  grid-area:1 / 1!important; align-self:stretch!important; width:100%!important; height:100%!important;
}
@media (min-width:1181px) and (max-width:1279px) {
  body.game-edit-workspace-active #inspireView .generated-game-page.generated-workspace-pc.ws3-compact-navigation[data-generated-view] > .workspace-body.generated-page-layout.page-workbench {
    display:grid!important; grid-template: minmax(0,1fr) / minmax(0,1fr)!important;
    grid-auto-rows:0!important; gap:0!important; overflow:hidden!important;
  }
  body.game-edit-workspace-active #inspireView .generated-game-page.generated-workspace-pc.ws3-compact-navigation :is(.change-history-sidebar,.game-edit-sidebar):not(.open) {
    display:none!important;
  }
  body.game-edit-workspace-active #inspireView:has(.generated-game-page.ws3-compact-navigation[data-generated-view="chat"]) .chat-input-wrapper[data-workspace-composer] {
    left:0!important; right:0!important; width:min(688px,calc(100vw - 24px))!important; margin-inline:auto!important;
  }
}
body.game-edit-workspace-active #inspireView .generated-game-page.ws3-compact-navigation:not(.workspace-preview-expanded) .preview-play-column > .workspace-stage-toolbar {
  width:min(100%,var(--preview-stage-width,100%))!important; align-self:center!important;
}
/* Short landscape windows retain the same three actions immediately below
   the fitted game. Do not squeeze their labels into the old 360px strip. */
@media (orientation:landscape) and (max-height:500px) {
  body.game-edit-workspace-active #inspireView .generated-game-page.ws3-compact-navigation:not(.workspace-preview-expanded) .preview-play-column > .workspace-stage-toolbar {
    width: min(100%, max(390px, var(--preview-stage-width, 100%))) !important;
    margin-inline: auto !important;
  }
  body.game-edit-workspace-active #inspireView .generated-game-page.ws3-compact-navigation .workspace-stage-toolbar .game-preview-actions.preview-card-actions {
    display: grid !important; grid-template-columns: repeat(3, minmax(0, 1fr)) !important; gap: 6px !important;
  }
  body.game-edit-workspace-active #inspireView .generated-game-page.ws3-compact-navigation .workspace-stage-toolbar .game-preview-actions.preview-card-actions > button {
    min-height: 44px !important; min-width: 0 !important; font-size: 12px !important; padding: 6px !important;
  }
}

/* Three-column Play, Code and resource editor. */
body.game-edit-workspace-active:has(.generated-game-page.generated-workspace-pc) .generated-game-page.generated-workspace-pc.workspace-three-column .ws3-tool-tabs {
    grid-template-columns:repeat(3,minmax(0,1fr));
}
body.game-edit-workspace-active .generated-game-page.generated-workspace-pc.workspace-three-column .ws3-tool-tabs button:last-child {
    border-right:0;
}
.generated-workspace-pc:not(.workspace-three-column) [data-workspace-image-tool],
.ws3-compact-navigation [data-workspace-image-tool] {
    display:none !important;
}
body.game-edit-workspace-active .generated-workspace-pc .workspace-code-compact {
    container:workspace-code / inline-size;
}
body.game-edit-workspace-active:has(.generated-game-page.generated-workspace-pc) .generated-game-page.generated-workspace-pc.workspace-three-column .workspace-code-toolbar {
    grid-template-columns:minmax(0,1fr) 90px auto auto !important;
}
body.game-edit-workspace-active:has(.generated-game-page.generated-workspace-pc) .generated-game-page.generated-workspace-pc.workspace-three-column .workspace-code-toolbar [data-code-open-entry] {
    grid-column:3 !important;
}
body.game-edit-workspace-active:has(.generated-game-page.generated-workspace-pc) .generated-game-page.generated-workspace-pc.workspace-three-column .workspace-code-toolbar [data-code-open-modal] {
    grid-column:4 !important;
}
@container workspace-code (max-width: 495px) {
    body.game-edit-workspace-active:has(.generated-game-page.generated-workspace-pc) .generated-game-page.generated-workspace-pc.workspace-three-column .workspace-code-toolbar {
        grid-template-columns:repeat(2,minmax(0,1fr)) !important;
    }
    body.game-edit-workspace-active:has(.generated-game-page.generated-workspace-pc) .generated-game-page.generated-workspace-pc.workspace-three-column .workspace-code-toolbar [data-code-open-entry] {
        grid-area:2 / 1 !important;
    }
    body.game-edit-workspace-active:has(.generated-game-page.generated-workspace-pc) .generated-game-page.generated-workspace-pc.workspace-three-column .workspace-code-toolbar [data-code-open-modal] {
        grid-area:2 / 2 !important;
    }
}
dialog.workspace-code-modal .workspace-code-modal-shell {
    color-scheme:dark;
    background:#102436;
    border-color:rgba(169,214,235,.27);
}
dialog.workspace-code-modal .workspace-code-compact {
    padding:12px 16px 16px;
    gap:10px;
    box-sizing:border-box;
}
dialog.workspace-code-modal .code-workspace-panel.compact {
    max-height:none !important;
    border:1px solid rgba(169,214,235,.18);
    border-radius:8px;
}
dialog.workspace-code-modal .workspace-code-summary {
    display:flex;
    flex-wrap:wrap;
    align-items:baseline;
    gap:4px 12px;
    padding-inline:2px;
    font-size:12px;
    color:#bdd2e0;
}
dialog.workspace-code-modal .workspace-code-toolbar {
    display:grid;
    grid-template-columns:minmax(0,1fr) minmax(70px,105px) auto;
    gap:8px;
    align-items:center;
}
dialog.workspace-code-modal .workspace-code-toolbar :is(input,select) {
    grid-column:auto;
}
:is(dialog.workspace-code-modal,body.game-edit-workspace-active .generated-game-page.generated-workspace-pc) .workspace-code-toolbar :is(input,select) {
    color-scheme:dark;
    width:100%;
    min-width:0;
    min-height:40px;
    padding:0 10px !important;
    border:1px solid rgba(169,214,235,.3) !important;
    border-radius:8px !important;
    background:#0e1e2d !important;
    color:#e7f7ff !important;
    font:inherit;
}
:is(dialog.workspace-code-modal,body.game-edit-workspace-active .generated-game-page.generated-workspace-pc) .workspace-code-toolbar :is(input,select):focus-visible {
    outline:2px solid #aee9f8;
    outline-offset:1px;
}
:is(dialog.workspace-code-modal,body.game-edit-workspace-active .generated-game-page.generated-workspace-pc) .workspace-code-toolbar input::placeholder {
    color:#9eb9c8;
}
@media (max-width: 460px) {
    dialog.workspace-code-modal .workspace-code-toolbar {
        grid-template-columns:minmax(0,1fr) minmax(70px,90px);
    }
    dialog.workspace-code-modal [data-code-open-entry] {
        grid-column:1 / -1;
        justify-self:start;
    }
}
.workspace-native-tools.wt-native-empty .wt-editor-body {
    grid-template-columns:minmax(0,1fr);
    min-height:0;
    flex:0 0 auto;
}
.workspace-native-tools.wt-native-empty .wt-canvas-column {
    display:flex;
}
.workspace-native-tools.wt-native-empty .wt-canvas-stage {
    min-height:88px;
    height:auto;
    background:rgba(10,28,43,.32);
    border:1px dashed rgba(159,201,222,.25);
}
.workspace-native-tools.wt-native-empty [hidden] {
    display:none !important;
}
.workspace-native-tools.wt-native-empty .wt-editor-footer:not(:has(.wt-actions:not([hidden]))) {
    padding-block:0;
    border:0;
}

/* Keep captured drag input in the workspace when crossing a sandboxed game. */
body.game-edit-workspace-active.workspace-column-resizing .workspace-three-column .game-preview-viewport iframe.template-preview-frame {
    pointer-events:none !important;
}

/* Keep the game and its actions together in the space below the Play header. */
@media (max-width: 600px) and (orientation: portrait) {
    body.game-edit-workspace-active #inspireView .generated-game-page.generated-workspace-pc.ws3-compact-navigation[data-generated-view="preview"][data-preview-orientation="landscape"]:not(.workspace-preview-expanded) .playable-shell > .preview-play-column {
        display: flex !important;
        flex-direction: column !important;
        justify-content: flex-start !important;
    }
    body.game-edit-workspace-active #inspireView .generated-game-page.generated-workspace-pc.ws3-compact-navigation[data-preview-orientation="landscape"]:not(.workspace-preview-expanded) .preview-play-column > .game-preview-viewport {
        flex: none !important;
        margin-block: auto 0 !important;
    }
    body.game-edit-workspace-active #inspireView .generated-game-page.generated-workspace-pc.ws3-compact-navigation[data-preview-orientation="landscape"]:not(.workspace-preview-expanded) .preview-play-column > .workspace-stage-toolbar {
        flex: none !important;
        margin-block: 0 auto !important;
    }
}
.candidate-history-selection:not([hidden]) {
    position: sticky;
    inset-block-start: 0;
    z-index: 3;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .35rem .6rem;
    padding: .3rem 0;
    color: #b5cbd9;
    background: var(--workspace-chat-background, #101e2c);
    font-size: .75rem;
}

/* Compact Settings is a disclosure of project actions, not another persistent
   toolbar. Resource views reuse the existing capability-gated module drawer. */
.ws3-compact-resource-links,
[data-publication-control-reason] { display: none; }
body.game-edit-workspace-active #inspireView .generated-game-page.ws3-compact-navigation .workspace-topbar-actions > * {
    grid-column: 1 / -1 !important;
}
body.game-edit-workspace-active #inspireView .generated-game-page.ws3-compact-navigation .workspace-topbar-actions > .ws3-compact-resource-links {
    display: grid !important; grid-template-columns: minmax(0, 1fr); gap: 2px;
    margin-top: 4px; padding-top: 4px; border-top: 1px solid #accde52b;
}
body.game-edit-workspace-active #inspireView .generated-game-page.ws3-compact-navigation .workspace-topbar-actions .workspace-header-btn:disabled {
    color: #a2b5c4 !important; opacity: 1 !important; cursor: not-allowed;
}
body.game-edit-workspace-active #inspireView .generated-game-page.ws3-compact-navigation .workspace-topbar-actions :is([data-publication-control-reason], .ws3-compact-resource-reason):not([hidden]) {
    display: block !important; grid-column: 1 / -1 !important;
    padding: 0 12px 6px; color: #a8c1d3; font: 11px/1.4 system-ui; overflow-wrap: anywhere;
}
body.game-edit-workspace-active #inspireView .generated-game-page.ws3-compact-navigation .workspace-topbar-actions .workspace-header-btn:focus-visible {
    outline: 2px solid #b5e9fa; outline-offset: -2px; border-radius: 8px;
}
body.game-edit-workspace-active #inspireView .generated-game-page.ws3-compact-navigation .ws3-tool-tabs[hidden] { display: none !important; }
body.game-edit-workspace-active #inspireView .generated-game-page.generated-workspace-pc .game-edit-sidebar.open.wt-compact-tools.ws3-compact-resource-view > [data-edit-module].active {
    display: block !important; width: 100% !important; min-width: 0 !important;
    max-width: 100% !important; flex: 1 0 auto; overflow: visible !important;
}
body.game-edit-workspace-active #inspireView .generated-game-page.generated-workspace-pc .game-edit-sidebar.open.wt-compact-tools.ws3-compact-resource-view .edit-module-panels {
    display: block !important; min-width: 0; max-width: 100%;
}
body.game-edit-workspace-active #inspireView .generated-game-page.generated-workspace-pc .game-edit-sidebar.open.wt-compact-tools.ws3-compact-resource-view .ws3-tools-header {
    position: sticky; top: 0; z-index: 5; padding-block: 4px 8px;
    background: #172c40;
}
.candidate-history-message:not([hidden]) {
    display: flex;
    justify-content: flex-end;
    flex: none;
    min-width: 0;
}
.candidate-history-message > .saved-conversation-message { flex: 1; min-width: 0; }
[data-preview-chat-panel] > .candidate-history-selection:not([hidden]) {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #142536;
}
[data-lab-candidate-workspace] [data-saved-conversation-reader] { display: none !important; }
.candidate-inline-reply {
    align-self: flex-start;
    width: 100%;
    max-width: 38rem;
    min-width: 0;
    padding-block: .25rem .4rem;
    margin-block: .4rem 0;
    color: #e0ecf5;
    font: .875rem/1.6 system-ui, sans-serif;
    overflow-wrap: anywhere;
}
.candidate-inline-reply > p { white-space: pre-wrap; }
.candidate-inline-reply .candidate-chat-artwork-update p { margin: .15rem 0 0; }
[data-candidate-turn-result] > strong { display: block; margin-block: 0 .25rem; }
[data-candidate-turn-result] > ul { margin: 0 0 .6rem; padding-inline-start: 1.1rem; }
[data-candidate-turn-result] > ul:last-child { margin-bottom: 0; }
[data-candidate-turn-result] li + li { margin-top: .25rem; }
[data-candidate-turn-result] > p { margin: 0; }
[data-candidate-turn-result] > p:has(+ strong) { margin-bottom: .65rem; }
.candidate-reply-state { color:#b9eaf5; font-size:.84rem; }
.candidate-reply-state:is([data-status="partial"],[data-status="needs_decision"]) { color:#ffdb9a; }
.candidate-reply-state[data-status="not_applied"] { color:#f2c4b5; }
.candidate-reply-label { display:block; color:#a8c6d8; font-size:.8rem; }
[data-candidate-turn-result] > time {
    display: block;
    position: static;
    margin-top: .5rem;
    text-align: start;
}
.candidate-reply-diff,
.candidate-reply-follow-ups {
    margin-block: .35rem 0;
    min-width: 0;
    border-block-start: 1px solid #345062;
}
.candidate-reply-follow-ups {
    margin-block: 0 .25rem;
    font-size: .82rem;
    line-height: 1.45;
}
.candidate-reply-follow-ups > .candidate-follow-up-turn {
    padding-inline-start: .75rem;
    border-inline-start: 1px solid #345062;
}
.candidate-reply-follow-ups > summary,
.candidate-reply-diff > summary {
    display: list-item;
    min-height: 36px;
    padding-block: .45rem;
    color: #adc8db;
    cursor: pointer;
}
.candidate-reply-follow-ups > summary:focus-visible {
    outline: 2px solid #b9eaf5;
    outline-offset: 2px;
}
.candidate-reply-position { color: #b9eaf5; font-weight: 650; }
.candidate-reply-diff section { padding-top: .65rem; min-width:0; }
.candidate-reply-diff section + section { margin-top:.6rem; border-top:1px solid #344a5d; }
.candidate-reply-diff p {
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr);
    gap: .45rem;
    margin: .4rem 0 0;
    font-size: .82rem;
}
.candidate-reply-diff p code { white-space: pre-wrap; overflow-wrap: anywhere; }
.candidate-reply-diff p span { white-space:nowrap; }
.candidate-reply-diff > small:not([hidden]) { display:block; margin-top:.55rem; color:#adc4d3; }
.candidate-reply-diff-pager { display:flex; flex-wrap:wrap; gap:.4rem; align-items:center; margin-top:.65rem; }
.candidate-reply-diff-pager button { border:1px solid #516d80; border-radius:.4rem; padding:.35rem .6rem; color:#e3f3fa; background:#1b3346; }
.candidate-reply-diff :is(button,summary):focus-visible { outline:2px solid #b9eaf5; outline-offset:2px; }
.candidate-reply-play-link {
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr) max-content;
    align-items: center;
    gap: .65rem;
    width: 100%;
    min-width: 0;
    min-height: 60px;
    padding: .55rem .65rem;
    margin: .5rem 0;
    box-sizing: border-box;
    border: 1px solid #41617a;
    border-radius: 10px;
    background: #172d40;
    color: #e7f4fa;
    text-decoration: none;
}
.candidate-reply-play-link:hover { background: #1d3b53; border-color: #75aabe; }
.candidate-reply-play-link:focus-visible { outline: 2px solid #def8ff; outline-offset: 3px; }
.candidate-reply-play-icon {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: #294964;
    color: #cbf4ff;
    font-size: 21px;
}
.candidate-reply-play-copy { display: grid; gap: 2px; min-width: 0; line-height: 1.3; }
.candidate-reply-play-copy strong,
.candidate-reply-play-copy small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.candidate-reply-play-copy small { color: #b5cddd; font-size: .73rem; }
.candidate-reply-play-action {
    display: inline-flex;
    gap: .28rem;
    align-items: center;
    padding: .33rem .48rem;
    border-radius: 6px;
    background: #31536a;
    color: #d7f7ff;
    font-size: .8rem;
    font-weight: 650;
    white-space: nowrap;
}
.candidate-reply-play-action .material-symbols-rounded { font-size: 15px; }
[data-preview-chat-panel]:has(> .candidate-history-message:not([hidden])) {
    overflow-anchor: none;
}
[data-history-message-metadata] {
    display: none !important;
}
.candidate-history-selection button,
.candidate-history-preview-notice button {
    padding: .35rem .55rem;
    border: 1px solid #7198ad;
    border-radius: .45rem;
    background: #223d50;
    color: #eefbff;
    cursor: pointer;
}
.candidate-history-selection [hidden],
[data-game-workspace]:not(.ws3-compact-navigation) .candidate-history-selection button:first-of-type {
    display: none;
}
.candidate-history-preview-notice:not([hidden]) {
    color: #c6edf7;
    padding: .5rem 1rem;
}
.change-history-record[data-history-selected] {
    background: #214a61;
    box-shadow: inset 2px 0 #a7edff;
}
[data-history-version-view] [data-workspace-latest-message] {
    display: none !important;
}
[data-history-version-view] [data-preview-chat-panel] {
    scroll-padding-block-end: var(--workspace-composer-inset, 130px);
}
[data-history-version-view] ~ .chat-input-wrapper [id="chatSendBtn"] {
    opacity: .45;
}

body.game-edit-workspace-active:has(.generated-game-page.generated-workspace-pc) #inspireView .chat-input-wrapper[data-candidate-history-readonly] #chatSendBtn:disabled {
    background: #22384b !important;
    color: #8ca7b9 !important;
    border-color: #3b5668 !important;
    opacity: 1 !important;
    cursor: not-allowed;
    -webkit-tap-highlight-color: transparent;
}
#inspireView .candidate-history-selection button:focus-visible,
#inspireView .candidate-history-preview-notice button:focus-visible {
    outline: 2px solid #aee9f8;
    outline-offset: 2px;
}
