/* Layout only. Visual controls and focus use the unchanged Production theme. */
.cg-main { min-width: 0; }
.cg-main *, .cg-community * { box-sizing: border-box; }
.cg-toplinks { display: flex; flex-wrap: wrap; gap: 20px; padding-top: 24px; }
.cg-toplinks a, .cg-creator { color: var(--nw-violet-bright); }
.cg-main .games-hero { max-width: none; }
.cg-layout { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(240px, 1fr); gap: 24px; align-items: start; }
.cg-panel, .cg-entry { padding: 24px; min-width: 0; }
.cg-main h2, .cg-main h3 { overflow-wrap: anywhere; }
.cg-panel h2, .cg-entry h2 { margin-top: 0; }
.cg-muted, .cg-help { color: var(--nw-text-muted); line-height: 1.62; }
.cg-help { font-size: .87rem; }
.cg-form { display: grid; gap: 24px; }
.cg-field { display: grid; gap: 10px; min-width: 0; }
.cg-field > span { font-weight: 750; }
.cg-field .nw-field { width: 100%; max-width: 100%; padding: 12px; }
.cg-field textarea { resize: vertical; min-height: 110px; }
.cg-file { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.cg-file-name { overflow-wrap: anywhere; min-width: 0; }
.cg-file-input { position: absolute; width: 1px; height: 1px; clip-path: inset(50%); overflow: hidden; }
.cg-checkbox { display: flex; align-items: flex-start; gap: 12px; line-height: 1.62; }
.cg-checkbox input { width: 20px; height: 20px; flex: none; accent-color: var(--nw-violet); margin-top: 2px; }
.cg-button:disabled { opacity: .5; cursor: wait; }
.cg-review [data-decision]:disabled, .cg-review [data-review-check]:disabled { cursor: not-allowed; }
.cg-review button[aria-busy="true"]:disabled { cursor: wait; }
.cg-source-review { margin-bottom: 24px; }
.cg-source-review button:disabled { cursor: not-allowed; }
.cg-source-review .cg-field { margin-top: 18px; }
.cg-code { width: 100%; max-width: 100%; height: 320px; min-height: 180px; resize: vertical; font: 12px/1.6 ui-monospace, monospace; white-space: pre; overflow: auto; tab-size: 2; }
.cg-scan-label[data-level="REQUIRES FIX"] { color: var(--nw-error); }
.cg-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 18px; }
.cg-status { min-height: 24px; line-height: 1.62; color: var(--nw-text-muted); overflow-wrap: anywhere; }
.cg-status[data-error=true], .cg-scan-label[data-level=BLOCKED] { color: var(--nw-error); }
.cg-list { display: grid; gap: 14px; margin-top: 24px; }
.cg-game-management { display: grid; gap: 20px; }
.cg-version-upload { display: grid; gap: 18px; min-width: 0; padding: 18px; border: 1px solid var(--nw-border); border-radius: var(--nw-radius,16px); }
.cg-version-history { min-width: 0; }
.cg-version-list { list-style: none; display: grid; gap: 12px; margin: 16px 0 0; padding: 0; }
.cg-version-item { min-width: 0; padding: 14px; border: 1px solid var(--nw-border); border-radius: 12px; }
.cg-version-item > div { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.cg-version-item time { display: block; margin-top: 6px; color: var(--nw-text-muted); font-size: .87rem; }
.cg-version-item .cg-button { margin-top: 12px; }
.cg-version-admin { margin-bottom: 24px; }
.cg-version-comparison { min-width: 0; margin: 20px 0; padding: 16px; border: 1px solid var(--nw-border); border-radius: 12px; background: var(--nw-violet-soft); }
.cg-version-comparison h3 { margin-top: 0; }
.cg-entry-head { display: flex; gap: 14px; align-items: start; justify-content: space-between; flex-wrap: wrap; }
.cg-badge { color: var(--nw-violet-bright); font-size: .87rem; font-weight: 750; }
.cg-technical { margin-top: 18px; color: var(--nw-text-muted); }
.cg-technical summary { cursor: pointer; }
.cg-hash { font: 12px/1.62 ui-monospace, monospace; overflow-wrap: anywhere; word-break: break-all; color: var(--nw-text-muted); }
.cg-note { padding: 13px; border-left: 2px solid var(--nw-violet); background: var(--nw-violet-soft); margin-top: 14px; white-space: pre-wrap; overflow-wrap: anywhere; }
.cg-review-grid { display: grid; grid-template-columns: minmax(260px, .7fr) minmax(0, 1.3fr); gap: 24px; }
.cg-details { display: grid; gap: 14px; margin: 24px 0; }
.cg-details div { min-width: 0; }
.cg-details dt { font-size: .87rem; color: var(--nw-text-muted); margin-bottom: 4px; }
.cg-details dd { margin: 0; overflow-wrap: anywhere; }
.cg-findings { padding-left: 20px; font-size: .87rem; line-height: 1.62; color: var(--nw-text-muted); overflow-wrap: anywhere; }
.cg-player { overflow: hidden; min-width: 0; }
.cg-player iframe { display: block; width: 100%; height: 840px; min-height: 600px; border: 0; }
.cg-runtime-toolbar { display: flex; justify-content: space-between; gap: 16px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }
.cg-community .game-card { display: flex; flex-direction: column; }
.cg-community .game-card-body { display: flex; flex-direction: column; flex: 1; }
.nw-games .cg-community .cg-game-art { position: relative; flex: none; width: 100%; height: auto; aspect-ratio: 16 / 9; padding: 0; }
.cg-community .cg-game-cover { position: absolute; top: 50%; left: 50%; width: var(--cg-cover-zoom,100%); height: var(--cg-cover-zoom,100%); max-width: none; transform: translate(-50%, -50%); object-fit: cover; object-position: center; }
.cg-artwork-editor { margin-bottom: 24px; }
.cg-artwork-grid { display: grid; grid-template-columns: minmax(0,1fr) minmax(240px,.75fr); gap: 24px; }
.cg-card-preview { max-width: 420px; width: 100%; }
.cg-cover-crop { margin: 24px 0; }
.cg-cover-crop input { width: 100%; accent-color: var(--nw-violet); }
.cg-cover-input-preview .cg-game-art { overflow: hidden; border-radius: var(--nw-radius,16px); }
.cg-community .cg-cover-placeholder { width: 76px; height: 76px; }
.cg-community .cg-card-description { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; }
.cg-community .game-card-action { margin-top: auto; }
.cg-community .game-card h3 { overflow-wrap: anywhere; }
.cg-community .cg-creator { font-size: .78rem; margin: 14px 0 16px; overflow-wrap: anywhere; }
.cg-review-select { display: block; text-decoration: none; padding: 18px; margin-top: 14px; }
.cg-scan-label { font-weight: 750; color: var(--nw-violet-bright); }
.cg-hidden, [data-cg-page] [hidden], .cg-community [hidden] { display: none !important; }
.cg-source { max-height: 480px; overflow: auto; white-space: pre-wrap; border: 1px solid var(--nw-border); padding: 12px; }
.cg-main [data-cg-page] { min-width: 0; }
@media (max-width: 900px) {
  .cg-layout, .cg-review-grid, .cg-artwork-grid { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .cg-panel, .cg-entry { padding: 16px; }
  .cg-player iframe { height: 900px; }
  .cg-actions > .nw-button { flex: 1 1 150px; }
  .cg-toplinks { gap: 14px; font-size: .87rem; }
  .cg-version-upload { padding: 14px; }
  .cg-version-item .cg-button { width: 100%; }
}
/* Only the published game host enters immersive mode; creator CSS is untouched. */
.cg-play-surface { position: relative; inset: auto; width: 100%; max-width: none; max-height: none; margin: 0; padding: 0; color: var(--nw-text); background: var(--nw-bg, #10101b); }
.cg-play-toolbar { display: flex; align-items: center; gap: 12px; padding: 10px 14px; min-height: 64px; }
.cg-play-title { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-weight: 700; }
.cg-play-toolbar .nw-button { flex: none; min-height: 44px; }
.cg-play-toolbar [data-game-status]:empty { display: none; }
.cg-play-screen { min-height: 0; min-width: 0; }
.cg-play-viewport { background: var(--nw-bg, #10101b); color: var(--nw-text); width: 100%; }
.cg-is-playing .cg-play-viewport { height: 100%; min-height: 0; display: flex; flex-direction: column; padding: 0 env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left); }
.cg-play-surface.cg-is-playing { position: fixed; inset: 0; width: 100vw; height: 100vh; height: 100dvh; max-width: none; max-height: none; margin: 0; border: 0; border-radius: 0; display: flex; flex-direction: column; overscroll-behavior: none; }
.cg-play-surface.cg-is-playing .cg-play-toolbar { flex: none; padding-top: max(10px, env(safe-area-inset-top)); }
.cg-play-surface.cg-is-playing .cg-play-screen { flex: 1; overflow: hidden; }
.cg-play-surface.cg-is-playing iframe { width: 100%; height: 100%; min-height: 0; }
.cg-play-surface::backdrop { background: var(--nw-bg, #10101b); }
