/* Scoped to Game review/editor routes. No governance or permission rules here. */
body.game-review-workspace{--review-ink:#f2f4fa;--review-muted:#bcc5d5;--review-line:#424b60;--review-surface:#171b26;--review-field:#10131d;--review-accent:#ef9cd2;--review-error:#ffb9c3}
html[data-theme="light"] body.game-review-workspace{--review-ink:#172b40;--review-muted:#40546c;--review-line:#a8bbca;--review-surface:#ffffff;--review-field:#f2f6fa;--review-accent:#842b68;--review-error:#a7213e}
body.game-review-workspace #view{color:var(--review-ink)}
body.game-review-workspace #view :is(button,input,textarea,select,h2,h3,h4,p,small,dl,summary,label,.detail-actions){font-family:Manrope,Arial,sans-serif}
body.game-review-workspace #page-title{width:auto;white-space:normal;overflow-wrap:anywhere}
body.game-review-workspace #view :is(.detail-hero,.game-overview){background:var(--review-surface);border:0;box-shadow:none;background-image:none;min-width:0}
body.game-review-workspace #view .detail-hero::after{display:none}
body.game-review-workspace #view .detail-hero{padding:clamp(16px,3vw,32px)}
body.game-review-workspace #view :is(.game-overview,.detail-item){overflow-wrap:anywhere}
body.game-review-workspace #view :is(.detail-actions,.review-preparation){display:flex;flex-wrap:wrap;gap:12px;align-items:center}
body.game-review-workspace #view .detail-actions{display:block}
body.game-review-workspace #view .review-owner-decision-section{margin-top:24px;padding-top:20px;border-top:1px solid var(--review-line)}
body.game-review-workspace #view .review-owner-decision-section h2{font-size:16px;margin:0 0 12px;color:var(--review-ink)}
body.game-review-workspace #view .review-owner-decisions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;max-width:740px}
body.game-review-workspace #view :is(button,.primary-button,.secondary-button,.ghost-button){min-height:44px;white-space:normal;overflow-wrap:anywhere;font:700 14px/1.4 Manrope,Arial,sans-serif;letter-spacing:0;text-transform:none;opacity:1;min-width:0}
body.game-review-workspace #view :is(.primary-button,button.primary-button){background:#ef9cd2;color:#251c30;border:1px solid #ef9cd2;background-image:none;box-shadow:none}
body.game-review-workspace #view :is(.secondary-button,.ghost-button){background:var(--review-field);color:var(--review-ink);border:1px solid var(--review-line);box-shadow:none}
body.game-review-workspace #view .destructive-action{color:var(--review-error);border-color:var(--review-error)}
body.game-review-workspace #view :is(button,.primary-button,.secondary-button,.ghost-button):disabled{background:var(--review-field);color:var(--review-muted);border-color:var(--review-line);cursor:not-allowed;opacity:1}
body.game-review-workspace :is(button,a,input,textarea,select,summary):focus-visible{outline:3px solid var(--review-accent);outline-offset:3px}
body.game-review-workspace #view :is(.ai-game-review-panel,.ai-review-columns>section,.ai-review-revision,.ai-review-creator-feedback,.ai-review-details,.ai-review-refine,.ai-review-selection,.ai-review-actionable,.ai-review-proposal,.ai-review-history,.ai-review-candidate-status,.ai-review-canonicalization,.ai-review-feedback-response){background:transparent;background-image:none;border:0;box-shadow:none;border-radius:0;color:var(--review-ink)}
body.game-review-workspace #view .ai-game-review-panel{margin-top:28px;padding:24px 0 0;border-top:2px solid #af79f0}
body.game-review-workspace #view :is(.ai-review-refine,.ai-review-actionable,.ai-review-history,.ai-review-selection,.ai-review-proposal,.ai-review-details){border-top:1px solid var(--review-line);padding:20px 0;margin-top:20px}
body.game-review-workspace #view :is(.ai-review-actionable-list>article,.ai-review-proposal-changes>article,.ai-curriculum-item,.ai-role-tenet-item){background:transparent;border:0;border-bottom:1px solid var(--review-line);border-radius:0;box-shadow:none;padding:18px 0}
body.game-review-workspace #view :is(.ai-review-actionable-list dd,.ai-review-proposal-changes dd){background:var(--review-field);color:var(--review-ink);padding:14px;border:0;border-radius:8px;white-space:pre-wrap;overflow-wrap:anywhere}
body.game-review-workspace #view :is(p,small,dt,.eyebrow,.detail-item>span,.ai-review-empty,.ai-review-advisory,.ai-refine-voice-privacy,.game-detail-status,.ai-review-confidence,.ai-issue-type){color:var(--review-muted)}
body.game-review-workspace #view :is(h2,h3,h4,strong,dd,label,summary){color:var(--review-ink)}
body.game-review-workspace #view :is(.form-error,.ai-refine-error,.ai-review-error){color:var(--review-error)}
body.game-review-workspace #view :is(input,select,textarea){color:var(--review-ink);background:var(--review-field);border-color:var(--review-line)}
body.game-review-workspace #view .ai-review-summary{color:var(--review-ink);font-size:16px;line-height:1.7}
body.game-review-workspace #view :is(.ai-review-loading,.ai-review-error){background:transparent;border:0;display:flex;gap:16px;align-items:center}
body.game-review-workspace #view .dojo-sage{flex-shrink:0}
body.game-review-workspace #view .game-governance-summary.governance-waiting ~ .owner-revision-status.governance-waiting{display:none}
body.game-review-workspace .app-history-controls{position:static;margin-bottom:16px;width:fit-content;max-width:100%}
body.game-review-workspace .app-history-controls button{min-width:44px;min-height:44px}
body.game-review-workspace .workspace>.topbar{padding-top:0}
body.game-review-workspace .sidebar-navigation{max-width:100%;overflow-x:auto}
body.game-review-workspace #toast{position:relative;inset:auto;transform:none;max-width:100%;width:auto;box-sizing:border-box;white-space:normal;overflow-wrap:anywhere;height:0;padding:0;overflow:hidden}
body.game-review-workspace #toast.show{height:auto;padding:14px;margin:12px 0}
@media(max-width:760px){
 body.game-review-workspace #view .review-preparation{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}
 body.game-review-workspace #view .review-owner-decisions{gap:6px}
 body.game-review-workspace #view .review-owner-decisions button{padding:10px 6px;font-size:13px}
 body.game-review-workspace #view :is(.ai-review-actionable-list dl,.ai-review-proposal-changes dl){grid-template-columns:1fr}
 body.game-review-workspace #view :is(.ai-review-actionable-heading,.ai-review-heading,.ai-review-refine){flex-wrap:wrap}
 body.game-review-workspace #view :is(.ai-review-selection>div,.ai-review-send-actions){display:flex;flex-wrap:wrap;gap:10px}
 body.game-review-workspace #view .ai-review-columns{grid-template-columns:1fr}
}
body.game-review-workspace .topbar .page-header-copy #page-title{width:auto;max-width:100%;white-space:normal;overflow-wrap:anywhere}
body.game-review-workspace .topbar .page-header-copy{max-width:100%;flex:1}
body.game-review-workspace #view .review-owner-decisions>*{width:100%;margin:0}
body.game-review-workspace #view [hidden]{display:none!important}
body.game-review-workspace #view .ai-review-send{background:transparent;border:0;border-top:1px solid var(--review-line);border-radius:0;padding:20px 0}
body.game-review-workspace #view .ai-review-send-diff article{border:0;border-bottom:1px solid var(--review-line);background:transparent;padding:16px 0;border-radius:0}
body.game-review-workspace #view .ai-review-send-diff article>span{color:var(--review-ink);background:var(--review-field);overflow-wrap:anywhere;white-space:pre-wrap}
body.game-review-workspace #view .ai-game-review-panel :is(p,li,dd,label){font-size:14px;line-height:1.65}
body.game-review-workspace #view .ai-game-review-panel :is(small,dt,.eyebrow,.ai-review-confidence,.ai-issue-type){font-size:12px;line-height:1.5}
body.game-review-workspace #view .ai-game-review-panel h3{font-size:16px;line-height:1.4}
body.game-review-workspace #view .ai-review-sage{width:60px;min-width:60px;height:72px;border:0;background:transparent;box-shadow:none}
body.game-review-workspace #view .ai-review-sage img{object-fit:contain}
body.game-review-workspace #view .review-owner-decision-section h2{font-size:16px}
body.game-review-workspace #view .ai-game-review-panel :is(li>span,li>small,.ai-curriculum-item>span,.ai-role-tenet-item>span,.ai-review-send-diff small,.ai-review-history blockquote,.ai-review-history li>div>span){color:var(--review-muted)}
body.game-review-workspace #view .ai-game-review-panel :is(.ai-issue-type,.ai-duplicate-kind){color:#f0d5ff!important;background:#322145;border-color:#8d63b5}
html[data-theme="light"] body.game-review-workspace #view .ai-game-review-panel :is(.ai-issue-type,.ai-duplicate-kind){color:#542070!important;background:var(--app-bg);border-color:#a784c0}
body.game-review-workspace #view .back{display:inline-flex;align-items:center;min-height:44px;padding:6px 0;box-sizing:border-box}

/* Fourth editorial pilot: Detail plus the review workspace it contains.
   The existing body class also covers Edit; content-based scoping deliberately
   leaves Edit, Game Creation and their shared field styles unchanged. */
body.game-review-workspace .workspace:has(.detail-hero) .topbar {
  align-items: center;
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--divider);
}
body.game-review-workspace .workspace:has(.detail-hero) .topbar .page-header-copy #page-title {
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  clip-path: none;
  text-shadow: none;
  font: 800 calc(2.25rem * var(--text-display-scale))/1.2 var(--font-body);
  letter-spacing: -.035em;
  overflow-wrap: anywhere;
}
body.game-review-workspace .workspace:has(.detail-hero) #page-title::after,
body.game-review-workspace .workspace:has(.detail-hero) .page-identity-visual::after { display: none; }
body.game-review-workspace .workspace:has(.detail-hero) .page-identity-visual { border: 0; background: none; box-shadow: none; clip-path: none; }
body.game-review-workspace .workspace:has(.detail-hero) .app-history-controls { padding: 0; border: 0; background: none; box-shadow: none; backdrop-filter: none; }
body.game-review-workspace .workspace:has(.detail-hero) :is(a,button,input,textarea,select,summary):focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 3px; }
body.game-review-workspace #view .detail-hero { padding: 0; border-radius: 0; background: none; }
body.game-review-workspace #view .detail-hero .back { font-size: calc(.8125rem * var(--text-chrome-scale)); }
body.game-review-workspace #view .detail-hero .game-governance-summary {
  max-width: none;
  margin-top: 16px;
  padding: 16px;
  border-width: 0 0 0 3px;
  border-radius: 0;
  box-shadow: none;
}
body.game-review-workspace #view .detail-hero .game-governance-summary p { font-size: calc(.875rem * var(--text-reading-scale)); line-height: 1.6; }
body.game-review-workspace #view .detail-hero .game-governance-turn { font: 700 calc(.75rem * var(--text-metadata-scale))/1.5 var(--font-body); letter-spacing: 0; text-transform: none; }
body.game-review-workspace #view .detail-hero .game-detail-status { margin-top: 12px; font-size: calc(.8125rem * var(--text-metadata-scale)); }
body.game-review-workspace #view .detail-hero .detail-layout { max-width: none; gap: 32px; margin-top: 32px; }
body.game-review-workspace #view .detail-hero :is(.game-overview,.player-section,.player-detail-grid) {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
  overflow: visible;
}
body.game-review-workspace #view .detail-hero :is(.game-overview,.player-detail-grid) { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 20px 32px; }
body.game-review-workspace #view .detail-hero .game-overview { border-top: 1px solid var(--divider); padding-top: 24px; }
body.game-review-workspace #view .detail-hero .detail-item { min-width: 0; padding: 0; background: none; }
body.game-review-workspace #view .detail-hero .detail-item > span {
  margin-bottom: 8px;
  font: 600 calc(.75rem * var(--text-metadata-scale))/1.5 var(--font-body);
  letter-spacing: .01em;
  text-transform: none;
}
body.game-review-workspace #view .detail-hero .detail-item p { margin: 0; font-size: calc(.9375rem * var(--text-reading-scale)); line-height: 1.65; white-space: pre-wrap; }
body.game-review-workspace #view .detail-hero .game-detail-section-heading {
  grid-column: 1/-1;
  margin: 0;
  font: 800 calc(1.25rem * var(--text-display-scale))/1.3 var(--font-body);
  letter-spacing: -.025em;
}
body.game-review-workspace #view .detail-hero .game-setup .detail-item:last-child { grid-column: 1/-1; }
body.game-review-workspace #view .detail-hero .game-detail-task-heading { margin: 0 0 20px; font: 800 calc(1.125rem * var(--text-display-scale))/1.4 var(--font-body); letter-spacing: -.02em; }
body.game-review-workspace #view .detail-hero .player-section { padding-top: 24px; border-top: 1px solid var(--divider); }
body.game-review-workspace #view .detail-hero .player-detail-grid .detail-item:first-child { grid-column: 1/-1; }
body.game-review-workspace #view .detail-hero .player-detail-grid .detail-item:first-child p { font-weight: 600; }
body.game-review-workspace #view .detail-hero .detail-actions { margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--divider); }
body.game-review-workspace #view .detail-hero .review-preparation #delete { margin-left: auto; }
body.game-review-workspace #view .detail-hero .review-owner-decision-section { margin-top: 24px; }
body.game-review-workspace #view .detail-hero .review-owner-decision-section h2 { font: 800 calc(1.25rem * var(--text-display-scale))/1.3 var(--font-body); letter-spacing: -.025em; }
body.game-review-workspace #view .detail-hero :is(button,.primary-button,.secondary-button,.ghost-button) {
  min-height: 44px;
  border-radius: 6px;
  font-size: calc(.875rem * var(--text-chrome-scale));
}
body.game-review-workspace #view .detail-hero summary { min-height: 44px; padding-block: 12px; font-size: calc(.8125rem * var(--text-metadata-scale)); }
body.game-review-workspace #view .detail-hero .game-review-feedback,
body.game-review-workspace #view .detail-hero .creator-revision-panel { margin-top: 32px; }
body.game-review-workspace #view .detail-hero .creator-revision-panel { padding: 24px; border-width: 1px 0; border-radius: 0; box-shadow: none; }
body.game-review-workspace #view .detail-hero .creator-revision-changes article { padding: 16px 0; border: 0; border-bottom: 1px solid var(--review-line); border-radius: 0; background: none; }
body.game-review-workspace #view .detail-hero :is(.creator-revision-panel p,.creator-revision-panel li,.creator-revision-changes span) { font-size: calc(.875rem * var(--text-reading-scale)); line-height: 1.65; }
body.game-review-workspace #view .detail-hero .creator-revision-changes small { font-size: calc(.75rem * var(--text-metadata-scale)); }
body.game-review-workspace #view .detail-hero .ai-game-review-panel { margin-top: 32px; padding-top: 24px; }
body.game-review-workspace #view .detail-hero .ai-game-review-panel :is(p,li,dd,label) { font-size: calc(.875rem * var(--text-reading-scale)); line-height: 1.65; }
body.game-review-workspace #view .detail-hero .ai-game-review-panel :is(small,dt,.eyebrow,.ai-review-confidence,.ai-issue-type) { font-size: calc(.75rem * var(--text-metadata-scale)); line-height: 1.5; }
body.game-review-workspace #view .detail-hero .ai-game-review-panel :is(h2,h3) { font: 800 calc(1.25rem * var(--text-display-scale))/1.4 var(--font-body); letter-spacing: -.025em; }
body.game-review-workspace #view .detail-hero .ai-review-summary { max-width: 75ch; }
body.game-review-workspace #view .detail-hero :is(.ai-review-actionable-list dl,.ai-review-proposal-changes dl) { gap: 16px 24px; }
body.game-review-workspace #view .detail-hero :is(.ai-review-actionable-list dd,.ai-review-proposal-changes dd) { margin-top: 8px; padding: 16px; border-radius: 4px; }
body.game-review-workspace #view .detail-hero :is(.ai-review-actionable-list dl,.ai-review-proposal-changes dl) > div:nth-child(2) { border-left: 2px solid var(--review-accent); padding-left: 12px; }
body.game-review-workspace #view .detail-hero .ai-review-actionable-list article.is-ignore { opacity: 1; }
body.game-review-workspace #view .detail-hero .ai-review-edit-actions button[aria-pressed="true"] { box-shadow: inset 0 -2px 0 currentColor; }
body.game-review-workspace #view .detail-hero .ai-review-send-diff article { gap: 16px; }
body.game-review-workspace #view .detail-hero :is(.ai-review-confidence,.game-status,.game-revision-marker) { max-width: 100%; white-space: normal; overflow-wrap: anywhere; }
@media(max-width:760px) {
  body.game-review-workspace .workspace:has(.detail-hero) .topbar .page-header-copy #page-title { font-size: calc(1.75rem * var(--text-display-scale)); }
  body.game-review-workspace #view .detail-hero :is(.game-overview,.player-detail-grid) { grid-template-columns: minmax(0,1fr); gap: 20px; }
  body.game-review-workspace #view .detail-hero .review-preparation #delete { margin-left: 0; }
  body.game-review-workspace #view .detail-hero .review-owner-decisions { grid-template-columns: minmax(0,1fr); gap: 8px; }
  body.game-review-workspace #view .detail-hero .review-preparation { grid-template-columns: minmax(0,1fr); }
}
html[data-text-scale-level="accessibility"] body.game-review-workspace #view .detail-hero :is(.game-overview,.player-detail-grid,.ai-review-columns,.ai-curriculum-grid,.ai-role-tenet-grid,.creator-revision-changes>article>div) { grid-template-columns: minmax(0,1fr); }
html[data-text-scale-level="accessibility"] body.game-review-workspace #view .detail-hero :is(.review-owner-decisions,.review-preparation) { display: flex; flex-wrap: wrap; }
/* Keep paired tasks practical to compare during preparation; stack at narrow
   widths and accessibility scale without changing their source order. */
body.game-review-workspace #view .detail-hero .detail-layout { grid-template-columns: repeat(2,minmax(0,1fr)); }
body.game-review-workspace #view .detail-hero .detail-layout > .game-overview,
body.game-review-workspace #view .detail-hero .player-section[data-task-key="shared"] { grid-column: 1/-1; }
body.game-review-workspace #view .detail-hero .game-detail-task-heading > span { display: block; margin-top: 4px; color: var(--review-muted); font: 600 calc(.875rem * var(--text-reading-scale))/1.5 var(--font-body); }
@media(max-width:1000px) {
  body.game-review-workspace #view .detail-hero .detail-layout { grid-template-columns: minmax(0,1fr); }
}
html[data-text-scale-level="accessibility"] body.game-review-workspace #view .detail-hero .detail-layout { grid-template-columns: minmax(0,1fr); }
body.game-review-workspace #view .detail-hero .game-detail-jump { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-block: 12px; }
body.game-review-workspace #view .detail-hero .game-detail-jump button { padding: 8px 0; border: 0; border-bottom: 1px solid var(--review-line); border-radius: 0; background: none; color: var(--review-ink); box-shadow: none; }
body.game-review-workspace #view .detail-hero :is(#game-detail-content,#game-detail-actions) { scroll-margin-top: 24px; }

/* Preserve the canonical teal surface and semantic status, overriding muted detail-label text. */
html:not([data-theme="light"]) body.game-review-workspace #view .detail-item > .program-badge-foundational{color:var(--program-badge-text)}
