/* The shared game shell owns the header; this file allocates the investigation. */
[hidden] { display: none !important; }
html, body { height: 100%; overflow: hidden; }
.app { grid-template-rows: auto auto minmax(0, 1fr); }
.app:has(> .setup-share-warning) { grid-template-rows: auto auto auto minmax(0, 1fr); }
#app:has(> .curriculum-tool-context):has(> .setup-share-warning) { grid-template-rows: auto auto auto auto minmax(0, 1fr); }
button, input { font: inherit; }
button { min-height: 48px; border: 2px solid #d8e2ea; border-radius: 8px; background: #fff; color: #102131; font-weight: 800; cursor: pointer; padding: 8px 14px; }
button:focus-visible, input:focus-visible { outline: 3px solid #149bd7; outline-offset: 3px; }
button:disabled { opacity: .5; cursor: default; }
button[aria-pressed="true"], .primary { background: #6d5fd0; color: #fff; border-color: #4d409f; }
.topbar { background: #071018; padding: 6px 14px; }
.toolbar { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; padding: 6px 12px; background: #fff; border-bottom: 1px solid #d8e2ea; }
.toolbar button { min-height: 44px; }
#restartButton { margin-left: 16px; }
.game-shell { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 12px; min-height: 0; padding: 12px; width: min(1500px, 100%); margin: 0 auto; }
.game-board, .response-panel { background: #fff; border: 1px solid #d8e2ea; border-radius: 8px; min-width: 0; min-height: 0; }
.game-board { display: grid; grid-template-rows: auto minmax(0, 1fr); padding: 12px; }
.task-heading { text-align: center; padding-bottom: 8px; }
.task-heading h2 { margin: 0 0 4px; font-size: clamp(1.3rem, 2vw, 1.8rem); }
.task-heading p { margin: 0; font-size: clamp(1rem, 1.6vw, 1.3rem); line-height: 1.3; }
.task-heading p.card-prompt { font-size: clamp(1.5rem, 2.5vw, 2rem); font-weight: 800; }
#cardControls { display: grid; gap: 8px; }
.card-ranges { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.card-ranges button { padding: 6px 2px; white-space: nowrap; }
#cardControls .classification button { padding-left: 4px; padding-right: 4px; white-space: nowrap; }
#cardSummary { margin: 0; color: #5c6b78; font-size: .95rem; }
html[data-prime-investigation-activity="cards"] .response-actions { grid-template-columns: repeat(3, 1fr); }
html[data-prime-investigation-activity="cards"] .response-actions button { padding-left: 4px; padding-right: 4px; }
html[data-prime-investigation-activity="cards"] .response-panel { gap: 8px; }
.grid-panel { min-width: 0; min-height: 0; display: grid; place-items: center; }
#gameModelHost { width: 100%; height: 100%; min-height: 0; }
#gameModelHost figure { margin: 0; padding: 0; border: 0; background: none; width: 100%; height: 100%; max-width: none; display: grid; place-items: center; }
#gameModelHost figcaption { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
#gameModelHost svg { width: 100%; height: 100%; max-width: none; max-height: none; }
.response-panel { display: flex; flex-direction: column; gap: 12px; padding: 16px; }
.selection { margin: 0; font-size: 1.3rem; font-weight: 800; min-height: 1.5em; }
.selection-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
#twiceButton { padding: 6px 8px; font-size: .9rem; }
#pairResponse { display: grid; gap: 8px; }
#pairResponse label { font-weight: 800; }
#numberResponse { width: 100%; min-height: 52px; border: 2px solid #d8e2ea; border-radius: 8px; padding: 6px 12px; font-size: 1.6rem; font-weight: 800; }
.classification, .response-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.case-summary { font-size: .92rem; color: #5c6b78; }
.feedback, .support { margin: 0; padding: 12px; border: 1px solid #d8e2ea; border-radius: 8px; background: #f8fbfd; line-height: 1.35; font-size: 1.05rem; }
.feedback.good { color: #145f3d; border-color: #1d8f5a; background: #edfaf4; }
.feedback.bad { color: #9d2828; border-color: #d84f4f; background: #fff0f0; }
.support { background: #fff8e7; border-color: #f3b23a; }
.case-records { font-size: .92rem; line-height: 1.5; color: #5c6b78; }
.case-records p { margin: 2px 0; }
@media (max-width: 1100px) and (min-width: 761px) { .toolbar { gap: 6px; } .toolbar button { padding: 6px 8px; font-size: .9rem; } #restartButton { margin-left: 8px; } .game-shell { grid-template-columns: minmax(0, 1fr) 270px; gap: 8px; padding: 8px; } .response-panel { padding: 12px; gap: 8px; } .feedback, .support { padding: 8px; font-size: .97rem; } .case-records { font-size: .85rem; } .response-panel button { min-height: 44px; } }
@media (max-width: 760px), (max-height: 649px) {
  html, body { height: auto; overflow: auto; }
  .app { height: auto; min-height: 100dvh; overflow: visible; }
  .topbar { grid-template-columns: 1fr; }
  .brand { justify-content: center; }
  .brand h1 { position: static; width: auto; height: auto; margin: 0; clip: auto; overflow: visible; white-space: normal; font-size: 1.2rem; }
  .top-actions { justify-content: center; }
  .toolbar { gap: 6px; }
  .toolbar button { padding: 8px; font-size: .92rem; }
  #restartButton { margin-left: 0; }
  .game-shell { grid-template-columns: minmax(0, 1fr); }
  .grid-panel { overflow-x: auto; justify-items: start; }
  #gameModelHost { width: max(100%, 456px); height: 456px; }
  html[data-prime-investigation-activity="cards"] #gameModelHost:has([data-number-grid-cell="50"]):not(:has([data-number-grid-cell="100"])),
  html[data-prime-investigation-activity="cards"] #gameModelHost:not(:has([data-number-grid-cell="1"])) { height: 240px; }
  .response-panel { gap: 10px; }
}
@media print {
  .app { grid-template-rows: minmax(0, 1fr); background: #fff; }
  .app:has(> .setup-share-warning) { grid-template-rows: minmax(0, 1fr); }
  #app:has(> .curriculum-tool-context), #app:has(> .curriculum-tool-context):has(> .setup-share-warning) { grid-template-rows: minmax(0, 1fr); }
  .setup-share-warning { display: none !important; }
  .game-shell { width: 100%; height: 100%; padding: 0; grid-template-columns: minmax(0, 1fr) 72mm; gap: 6mm; }
  .game-board, .response-panel { border: 0; border-radius: 0; padding: 0; }
  .task-heading h2 { font-size: 20pt; }
  .task-heading p { font-size: 13pt; }
  .grid-panel { overflow: visible; }
  #gameModelHost { min-width: 0; width: 100%; height: 100%; }
  .response-actions, .classification, #twiceButton { display: none !important; }
  .card-ranges, #nextCardButton { display: none !important; }
  .selection, .feedback, .support { font-size: 12pt; }
  .case-records, .case-summary { font-size: 11pt; }
  #numberResponse { min-height: 12mm; font-size: 18pt; }
  .response-panel { gap: 3mm; }
}
