/* © 2026 Michael Shaun French. Developed in the United Kingdom. */
body.mps-open :is(#composer,#bottomControls,#showBottomBar){display:none!important}
#projectMPS{max-width:1100px;margin-inline:auto;padding:16px;box-sizing:border-box;color:var(--text);background:var(--bg);min-width:0}
#projectMPS[hidden]{display:none!important}#projectMPS header{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,2fr) minmax(0,1fr);align-items:center;gap:12px}#projectMPS h1{text-align:center;font-size:clamp(22px,3vw,32px);margin:0;overflow-wrap:anywhere}
#projectMPS :is(button,input,select,textarea){min-height:48px;font:inherit;box-sizing:border-box;max-width:100%;min-width:0}#projectMPS button{border:2px solid var(--mps-accent);border-radius:16px;white-space:normal;overflow-wrap:anywhere;padding:12px;color:var(--text);background:var(--surface)}#projectMPS button:disabled{opacity:.6}#projectMPS :is(button,input,select,textarea):focus-visible{outline:4px solid var(--mps-accent);outline-offset:2px}
#projectMPS[data-theme=playful] button{border-radius:24px;border-width:3px}#projectMPS[data-theme=mature] button{border-radius:8px}#projectMPS[data-theme=calm]{line-height:1.6}#projectMPS[data-theme=playful] .mps-cards{gap:18px}
#projectMPS :is(.mps-cards,.mps-answers,.mps-actions,.mps-game-grid){display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:16px 0}#projectMPS .mps-cards>button{min-height:110px;font-size:20px;font-weight:700}#projectMPS .mps-game-grid{grid-template-columns:repeat(3,minmax(0,1fr))}#projectMPS img{max-width:100%;object-fit:contain;display:block;margin:8px auto}#projectMPS .mps-passage{font-size:clamp(20px,2.5vw,28px);line-height:1.7;padding:20px;border:2px solid var(--mps-accent);border-radius:16px;background:var(--surface)}#projectMPS :is(p,label,li){overflow-wrap:anywhere;line-height:1.5}#projectMPS label{display:grid;gap:8px;margin:12px 0}#projectMPS input[type=checkbox]{width:32px;height:32px;min-height:32px}#projectMPS :is(form,fieldset,details){padding:16px;border:1px solid var(--border);border-radius:16px;margin:16px 0}#projectMPS textarea{width:100%;min-height:120px}#projectMPS .mps-answer{grid-column:1/-1;min-height:60px;padding:12px;border:2px solid var(--mps-accent);font-size:24px}.mps-feedback{font-size:22px;font-weight:700}#mpsStatus{min-height:24px}#projectMPS .mps-scan,#projectMPS .mps-chosen{outline:5px solid var(--mps-accent);outline-offset:-6px;text-decoration:underline}#returnToMPS{max-width:230px;white-space:normal;min-height:48px}
@media(max-width:500px){#projectMPS{padding:8px}#projectMPS header{grid-template-columns:1fr 1fr}#projectMPS h1{grid-column:1/-1;grid-row:1}#projectMPS .mps-cards{grid-template-columns:1fr 1fr}#projectMPS .mps-cards>button{font-size:17px;min-height:96px}#projectMPS .mps-game-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(min-width:1000px){#projectMPS .mps-cards{grid-template-columns:repeat(3,minmax(0,1fr))}}@media(forced-colors:active){#projectMPS button{border-color:ButtonText}#projectMPS .mps-scan{outline-color:Highlight}}

.board-heading>#returnToMPS{grid-column:1/-1;max-width:100%;justify-self:stretch}#projectMPS>h2{font-size:clamp(20px,2.5vw,28px)}

body.contrast #projectMPS button{border-color:currentColor}body.contrast #projectMPS :focus-visible{outline-color:var(--text)}

/* Illustrated settings for the two Project M P S learning games. */
#projectMPS [data-scene=forest]{--game-art:url("pictograms/mps/forest-trail.svg")}
#projectMPS [data-scene=harbour]{--game-art:url("pictograms/mps/picture-harbour.svg")}
#projectMPS .mps-game-gallery{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,240px),1fr));gap:16px}
#projectMPS .mps-game-gallery button{overflow:hidden;padding:0 0 20px;font-size:1.4em;font-weight:700}
#projectMPS .mps-game-gallery button::before,#projectMPS .mps-play-space::before{content:"";display:block;background:var(--game-art) center/cover no-repeat;height:clamp(85px,15vw,160px);margin-bottom:16px}
#projectMPS .mps-play-space{border:1px solid var(--border);border-radius:22px;overflow:hidden;background:var(--surface);margin:12px 0;padding-bottom:12px}
#projectMPS .mps-play-space h2,#projectMPS .mps-game-count{margin:8px 18px}
#projectMPS .mps-game-count{font-weight:650;color:var(--text)}
#projectMPS .mps-play-space .mps-game-grid{padding:0 16px;gap:14px}
#projectMPS .mps-game-grid button{min-height:76px;font-size:clamp(20px,2vw,30px);font-weight:650}
#projectMPS .mps-play-space button:disabled{opacity:.8;border-style:dashed}
#projectMPS .mps-play-space button:disabled::after{content:" ✓"}
#projectMPS[data-mode=basic] .mps-play-space::before{height:42px;background-position:center 66%}
@media(max-height:500px){#projectMPS .mps-play-space::before{height:48px}}

/* WebGL harbour replaces the decorative illustration only while its canvas is available. */
#projectMPS .mps-harbour-stage{height:clamp(155px,22vw,250px);background:var(--game-art) center/cover;overflow:hidden}
#projectMPS .mps-harbour-stage[hidden]{display:none}
#projectMPS .mps-harbour-stage canvas{display:block;width:100%;height:100%}
#projectMPS .mps-harbour-3d::before{display:none}
@media(max-height:550px){#projectMPS .mps-harbour-stage{height:128px}}

/* Use wide screens for choices and play areas while keeping reading lines short. */
@media (min-width:1100px) and (orientation:landscape){
  #projectMPS{
    width:100%;
    max-width:none;
    padding-inline:clamp(16px,2vw,40px);
  }
  #projectMPS .mps-cards{grid-template-columns:repeat(4,minmax(0,1fr))}
  #projectMPS .mps-passage{max-inline-size:72ch}
  #projectMPS>p:not(#mpsStatus){max-inline-size:80ch}
  #projectMPS .mps-harbour-stage{height:clamp(220px,32vh,415px)}
  #projectMPS .mps-game-grid{margin-inline:0}
  #projectMPS .mps-game-grid button{min-height:clamp(80px,12vh,150px)}
}

