/* Scoped additions to the existing map practice surface. */
.map-preview-banner { margin-bottom: 24px; padding-bottom: 12px; border-bottom: 1px solid var(--line, #d9e6f2); color: var(--muted, #54647a); font-size: .875rem; }
.map-bank-summary {
  max-width: 65ch;
  margin-top: 12px;
  color: var(--muted, #54647a);
  font-size: .875rem;
  line-height: 1.65;
}
.map-route {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.map-route polyline {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}
.map-route-outline { stroke: #fff; stroke-width: 9px; }
.map-route-ink { stroke: var(--accent, var(--student-primary,#006dcc)); stroke-width: 5px; }
.answer-explanation {
  margin: 12px 0 0;
  max-width: 65ch;
  font-size: 1rem;
  line-height: 1.75;
  color: var(--ink, #101b30);
  overflow-wrap: anywhere;
}
.answer-explanation strong { display: block; margin-bottom: 4px; }
.hero-stats span { font-size: .875rem; }
.choice-button:disabled { color: var(--ink, #101b30); opacity: 1; }
.catalog-item-score {
  display: block;
  white-space: normal;
  line-height: 1.6;
  font-variant-numeric: tabular-nums;
}
.catalog-score-note { display: block; font-weight: 400; }
.catalog-scores { grid-column: 2; min-width: 0; }
.whole-answer-card label {
  display: flex;
  align-items: baseline;
  gap: 6px;
  overflow-wrap: anywhere;
}
.whole-answer-card .answer-number { flex-shrink: 0; }
.map-route-help { margin: 8px 0 16px; color: var(--muted, #54647a); font-size: .875rem; }
@media (min-width: 1050px) and (min-height: 800px) {
  .workspace.is-whole .map-column { position: sticky; top: 96px; align-self: start; }
}
@media (max-width: 600px) {
  .whole-answer-list { grid-template-columns: minmax(0, 1fr); }
  .map-bank-summary { margin-top: 8px; }
}

/* Only the answer-status strip changes; question and explanation styles stay original. */
body[data-page=maps] .map-answer-status{margin:0 0 12px;min-width:0;max-width:100%}
body[data-page=maps] .map-question-nav{display:grid;grid-template-columns:repeat(var(--map-status-columns),minmax(max(24px,2em),1fr));grid-template-rows:repeat(2,minmax(30px,auto));gap:3px;max-width:100%;padding:3px;overflow-x:auto;overscroll-behavior-x:contain;scrollbar-width:thin;scrollbar-color:#83a8d3 #eff6ff;font-size:.75rem}
body[data-page=maps] .map-question-nav button{position:relative;display:flex;align-items:center;justify-content:center;min-width:24px;min-height:30px;padding:2px;border:1px solid #b9cde4;border-radius:5px;background:#fff;color:#28486a;font-size:inherit;font-weight:500;line-height:1.2;font-variant-numeric:tabular-nums;scroll-margin-block:12px}
body[data-page=maps] .map-question-nav button[data-status=answered]{background:#e4f1ff;border-color:#83a8d3;color:#174d86}
body[data-page=maps] .map-question-nav button[data-status=correct]{background:#e2f4e9;border-color:#70a68a;color:#205e42}
body[data-page=maps] .map-question-nav button[data-status=wrong]{background:#fff0f2;border-color:#c58c96;color:#933044}
body[data-page=maps] .map-question-nav button[aria-current=step]{outline:2px solid var(--student-primary,#006dcc);outline-offset:1px;border-color:var(--student-primary,#006dcc);font-weight:750}
body[data-page=maps] .map-question-nav button:focus-visible{outline:3px solid var(--student-primary,#006dcc);outline-offset:1px}
body[data-page=maps] .map-question-nav button svg{position:absolute;right:1px;bottom:1px;width:7px;height:7px}
body[data-page=maps] .site-footer,body[data-page=maps] .app-version-footer{display:none}

/* The map and one answer card share a viewport in both practice workflows. */
body[data-page=maps] .map-guided{height:var(--map-workspace-height,calc(100dvh - 110px));display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(0,45fr) minmax(0,55fr);gap:12px;min-height:260px;scroll-margin-top:calc(var(--map-header-space,0px) + 8px)}
body[data-page=maps] .map-guided .map-column{display:flex;flex-direction:column;position:static;height:100%;min-height:0;min-width:0;gap:6px}
body[data-page=maps] .map-guided .map-answer-status{flex:none;margin:0}
body[data-page=maps] .map-question-nav{position:relative}
body[data-page=maps] .map-guided .map-toolbar{flex:none;margin:0;min-height:44px}
body[data-page=maps] .map-guided .map-toolbar>strong{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
body[data-page=maps] .map-guided .map-toolbar-buttons{display:flex;gap:6px;width:100%;flex-wrap:nowrap;justify-content:flex-end}
body[data-page=maps] .map-guided .map-toolbar button{min-height:44px;font-size:.8125rem;padding:6px 8px}
body[data-page=maps] .map-guided .map-credit{flex:none;font-size:.6875rem;margin:0;line-height:1.4}
body[data-page=maps] .map-guided .map-scroll{flex:1;min-height:0;max-height:none;display:flex;align-items:center;justify-content:center;overflow:hidden}
body[data-page=maps] .map-guided .map-scroll.is-zoomed{display:block;overflow:auto;overscroll-behavior:contain}
body[data-page=maps] .map-guided .map-stage{flex:none;max-width:100%}
body[data-page=maps] .map-guided .map-stage.is-zoomed{max-width:none}
body[data-page=maps] .map-guided .question-column{height:100%;min-height:0;overflow:auto;overscroll-behavior:contain;padding:12px 14px;scrollbar-width:thin;scrollbar-color:#83a8d3 #eff6ff}
body[data-page=maps] .map-guided :is(button,input,h3){scroll-margin-block:8px}
body[data-page=maps] .map-guided .question-column h3{font-size:1rem;line-height:1.5;margin:0 0 10px}
body[data-page=maps] .map-guided .choice-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;margin:8px 0}
body[data-page=maps] .map-guided .choice-button{min-height:48px;padding:9px 10px;font-size:.9375rem;gap:6px;overflow-wrap:anywhere}
body[data-page=maps] .map-guided .choice-letter{width:18px;flex:none}
body[data-page=maps] .map-card-navigation{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:10px;font-size:.8125rem;font-variant-numeric:tabular-nums}
body[data-page=maps] .map-card-navigation button{min-height:44px;padding:8px 14px}
body[data-page=maps] .map-guided .answer-main{min-height:44px;margin-top:8px;width:100%}
body[data-page=maps] .map-guided .question-helper{font-size:.75rem;line-height:1.5;margin:4px 0}
body[data-page=maps] .map-fill-label{display:grid;gap:6px;font-size:.875rem}
body[data-page=maps] .map-fill-label input{min-height:48px}
body[data-page=maps] .map-guided .map-marker.is-filled:not(.is-current):not(.is-correct):not(.is-wrong){background:#527cab}
body[data-page=maps] .map-guided .map-marker.is-current{background:var(--student-primary,#006dcc);box-shadow:0 0 0 2px var(--student-primary,#006dcc);z-index:2;outline:2px solid #fff;outline-offset:1px}
body[data-page=maps] main{padding-bottom:120px}
@media(min-width:1000px),(min-width:600px) and (max-height:540px){
  body[data-page=maps] .map-guided{grid-template-columns:minmax(0,1.35fr) minmax(280px,1fr);grid-template-rows:minmax(0,1fr);gap:20px}
  body[data-page=maps] .map-guided .question-column{padding:20px}
  body[data-page=maps] .map-guided .question-column h3{font-size:1.125rem}
}
@media(min-width:1000px){body[data-page=maps] .map-guided .choice-list{grid-template-columns:1fr}}
@media(min-width:600px) and (max-width:999px) and (max-height:540px){body[data-page=maps] .map-guided .question-column{padding:12px 14px}body[data-page=maps] .map-guided .question-column h3{font-size:1rem}}

/* Review keeps the original vertical choices and the shared white analysis style. */
body[data-page=maps] .map-guided .question-column.is-review{padding:20px}
body[data-page=maps] .map-guided .question-column.is-review h3{font-size:1.375rem;line-height:1.6;margin-bottom:16px}
body[data-page=maps] .map-guided .is-review .choice-list{grid-template-columns:minmax(0,1fr);gap:8px;margin:16px 0}
body[data-page=maps] .map-guided .is-review .choice-button{font-size:1rem;padding:12px 14px;gap:8px}
body[data-page=maps] .map-guided .is-review .choice-letter{width:24px}
body[data-page=maps] .map-guided .map-answer-analysis{background:#fff;color:var(--ink,#152b4c);padding:20px 0 8px;margin:20px 0 0;border-top:1px solid #d9e6f2;overflow-wrap:anywhere}
body[data-page=maps] .map-answer-analysis h4{font-size:1.125rem;line-height:1.5;margin:0 0 8px;font-weight:700}
body[data-page=maps] .map-answer-key{font-size:.875rem;line-height:1.6;color:#45617e;margin:0 0 24px}
body[data-page=maps] .map-answer-diagnostic+ .map-answer-diagnostic{margin-top:24px}
body[data-page=maps] .map-answer-diagnostic h5{display:flex;align-items:baseline;gap:6px;font-size:1rem;line-height:1.6;margin:0 0 8px;font-weight:650}
body[data-page=maps] .map-answer-diagnostic h5 svg{width:18px;height:18px;flex:none;align-self:center}
body[data-page=maps] .map-answer-diagnostic.is-expected h5{color:#176653}
body[data-page=maps] .map-answer-diagnostic.is-wrong h5{color:#b32949}
body[data-page=maps] .map-answer-diagnostic p{font-size:1rem;line-height:1.75;margin:8px 0 0;max-width:65ch}
body[data-page=maps] .map-answer-diagnostic .map-answer-option{font-size:.875rem;color:#45617e}

/* Settings remain editable before starting; an in-progress edit is only a draft. */
body[data-page=maps] .map-practice-setup{padding:24px;background:#fff;border:1px solid #d9e6f2;border-radius:12px}
body[data-page=maps] .map-practice-setup h3{font-size:1.125rem;margin:0 0 20px}
body[data-page=maps] .map-practice-setup .practice-settings{margin:0 0 24px;gap:24px;flex-wrap:wrap}
body[data-page=maps] .map-practice-setup [data-action=start-practice]{min-height:44px}
body[data-page=maps] .map-practice-summary{display:flex;flex:none;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap;font-size:.8125rem;line-height:1.5;color:#45617e}
body[data-page=maps] .map-practice-summary button{min-height:44px;padding:6px 10px;font-size:inherit;white-space:nowrap}
body[data-page=maps] .map-settings-dialog{width:min(480px,calc(100% - 32px));max-height:calc(100dvh - 32px);box-sizing:border-box;overflow:auto;overscroll-behavior:contain;padding:24px;border:1px solid #d9e6f2;border-radius:16px;background:#fff;color:var(--ink,#152b4c);scrollbar-width:thin;scrollbar-color:#83a8d3 #eff6ff}
body[data-page=maps] .map-settings-dialog::backdrop{background:rgb(21 43 76 / .4)}
body[data-page=maps] .map-settings-dialog h2{font-size:1.375rem;line-height:1.5;margin:0 0 12px}
body[data-page=maps] .map-settings-dialog>p{font-size:.875rem;line-height:1.75;margin:0 0 24px;color:#45617e}
body[data-page=maps] .map-settings-dialog .practice-settings{display:grid;gap:24px;margin:0;padding:0;border:0}
body[data-page=maps] .map-settings-dialog .setting-options{display:flex;flex-wrap:wrap;gap:8px}
body[data-page=maps] .map-settings-dialog button{min-height:44px}
body[data-page=maps] .map-settings-dialog [data-draft-setting][aria-pressed=true]{background:var(--student-primary,#006dcc);border-color:var(--student-primary,#006dcc);color:#fff}
body[data-page=maps] .map-settings-actions{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:12px;margin-top:28px}
body[data-page=maps] .map-settings-dialog :focus-visible{outline:3px solid var(--student-primary,#006dcc);outline-offset:3px}

@media(max-width:600px),(max-width:999px) and (max-height:540px){
  body[data-page=maps] .map-guided .question-column.is-review{padding:12px 14px}
  body[data-page=maps] .map-guided .question-column.is-review h3{font-size:1rem;line-height:1.5;margin-bottom:8px}
  body[data-page=maps] .map-guided .is-review .choice-list{grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;margin:8px 0}
  body[data-page=maps] .map-guided .is-review .choice-button{padding:8px;gap:6px;font-size:.9375rem;min-height:44px}
  body[data-page=maps] .map-guided .is-review .choice-letter{width:18px}
  body[data-page=maps] .map-guided .map-answer-analysis{padding-top:12px;margin-top:12px}
  body[data-page=maps] .map-answer-analysis h4{font-size:1rem;margin-bottom:4px}
  body[data-page=maps] .map-answer-key{font-size:.75rem;margin-bottom:12px}
  body[data-page=maps] .map-answer-diagnostic h5{font-size:.875rem;margin-bottom:4px}
  body[data-page=maps] .map-answer-diagnostic p{font-size:.875rem;line-height:1.6;margin-top:4px}
  body[data-page=maps] .map-answer-diagnostic+ .map-answer-diagnostic{margin-top:12px}
}

/* Initial page only. The approved exercise workspace and settings dialog stay unchanged. */
.map-setup-scenery,#mapSetupNotice{display:none}
html body[data-page=maps].map-setup-mode main{max-width:1100px;margin-inline:auto;padding:28px 32px calc(110px + env(safe-area-inset-bottom));overflow:clip}
body[data-page=maps].map-setup-mode .hero{position:relative;isolation:isolate;display:block;max-width:900px;margin-inline:auto;padding:12px 8px 22px;margin-bottom:0}
html body[data-page=maps].map-setup-mode .hero h1{font-size:clamp(1.75rem,4vw,2.5rem);line-height:1.35;letter-spacing:-.025em;font-weight:780;margin:0 0 10px}
body[data-page=maps].map-setup-mode #mapSetupNotice{display:block;color:#45617e;font-size:1rem;line-height:1.7;margin:0;max-width:38ch}
body[data-page=maps].map-setup-mode .hero :is(.map-bank-summary,.hero-stats){display:none}
body[data-page=maps].map-setup-mode .map-setup-scenery{display:block;position:absolute;z-index:-1;right:-32px;top:-12px;width:420px;height:200px;object-fit:cover;object-position:right center;opacity:.6;pointer-events:none;mask-image:linear-gradient(to right,transparent,#000 60%),linear-gradient(to bottom,#000 55%,transparent);mask-composite:intersect}
body[data-page=maps].map-setup-mode .app-grid{display:block}
body[data-page=maps].map-setup-mode .catalog-drawer{display:none}
body[data-page=maps].map-setup-mode .map-reference-setup{padding:28px;border:0;border-radius:24px;max-width:900px;margin-inline:auto;background:#fff}
body[data-page=maps] .map-reference-setup h2{font-size:1.5rem;line-height:1.4;margin:0 0 20px;font-weight:750}
body[data-page=maps] .map-reference-setup .map-choose-trigger{display:flex;width:100%;min-height:56px;align-items:center;justify-content:space-between;gap:12px;padding:12px 16px;border:1px solid #c9ddf6;border-radius:12px;background:#f7fbff;text-align:left}
body[data-page=maps] .map-choose-trigger>span:first-child{font-size:1.125rem;font-weight:700}
body[data-page=maps] .map-choose-trigger>span:last-child{display:flex;align-items:center;gap:4px;color:var(--student-primary,#006dcc);font-size:.9375rem;white-space:nowrap}
body[data-page=maps] .map-choose-trigger svg{width:16px;height:16px;flex:none}
body[data-page=maps] .map-selected-material{display:grid;grid-template-columns:72px minmax(0,1fr);align-items:center;gap:18px;background:#eff7ff;border-radius:14px;padding:18px;margin:16px 0 24px}
body[data-page=maps] .map-selected-icon{display:grid;place-items:center;align-self:stretch;min-height:76px;border-radius:14px;background:#dceeff;color:var(--student-primary,#006dcc)}
body[data-page=maps] .map-selected-icon svg{width:38px;height:38px}
body[data-page=maps] .map-selected-material h3{font-size:1.25rem;line-height:1.5;font-weight:750;margin:0 0 6px;overflow-wrap:anywhere}
body[data-page=maps] .map-selected-material p{font-size:.9375rem;color:#45617e;margin:0}
body[data-page=maps] .map-selected-material .topic-links{display:flex;flex-wrap:wrap;gap:6px;margin:10px 0 0;padding:0;border:0}
body[data-page=maps] .map-selected-material .topic-links a{display:inline-flex;align-items:center;min-height:36px;max-width:100%;padding:4px 10px;border-radius:20px;background:#dfedff;color:var(--student-primary,#005eb8);font-size:.875rem;text-decoration:none;overflow-wrap:anywhere}
body[data-page=maps] .map-setup-fields{display:grid;gap:18px}
body[data-page=maps] .map-setup-fields .setting-label{display:block;font-size:1rem;font-weight:700;color:var(--ink,#152b4c);margin-bottom:8px}
body[data-page=maps] .map-setup-fields .setting-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:4px;padding:3px;border:1px solid #c9ddf6;border-radius:12px;background:#fff}
body[data-page=maps] .map-setup-fields .setting-options button{min-height:48px;padding:8px 10px;font-size:1rem;line-height:1.5;border:0;border-radius:9px;overflow-wrap:anywhere}
body[data-page=maps] .map-setup-fields [aria-pressed=true]{background:var(--student-primary,#006dcc);color:#fff}
body[data-page=maps] .map-setup-range{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px}
body[data-page=maps] .map-setup-range>.setting-group{display:contents}
body[data-page=maps] .map-setup-count{grid-column:2;grid-row:1;align-self:center;margin:0;color:#45617e;font-size:.875rem;line-height:1.6;font-variant-numeric:tabular-nums}
body[data-page=maps] .map-setup-range .setting-label{grid-column:1;grid-row:1;margin:0}
body[data-page=maps] .map-setup-range .setting-options{grid-column:1/-1;grid-row:2}
body[data-page=maps] .map-setup-fields>[class=setting-group]:nth-of-type(2) .setting-options{padding:0;border:0;gap:10px}
body[data-page=maps] .map-setup-fields .setting-options [data-setting=workflow]{border:1px solid #c9ddf6;background:#fff;color:var(--ink,#152b4c);text-align:left;display:flex;align-items:center;gap:8px;font-weight:650}
body[data-page=maps] .map-setup-fields [data-setting=workflow]::before{content:'';display:block;width:18px;height:18px;border:1.5px solid #6c8198;border-radius:50%;flex:none}
body[data-page=maps] .map-setup-fields .setting-options [data-setting=workflow][aria-pressed=true]{border-color:var(--student-primary,#006dcc);background:#eff7ff;color:var(--student-primary,#005eb8)}
body[data-page=maps] .map-setup-fields [data-setting=workflow][aria-pressed=true]::before{border-color:var(--student-primary,#006dcc);background:var(--student-primary,#006dcc);box-shadow:inset 0 0 0 3px #fff}
body[data-page=maps] .map-setup-mode-help{font-size:.875rem;line-height:1.6;color:#45617e;margin:-12px 0 0}
body[data-page=maps] .map-reference-setup [data-action=start-practice]{width:100%;min-height:56px;font-size:1.125rem;font-weight:700;margin-top:22px;border-radius:14px}
body[data-page=maps] .map-reference-setup :focus-visible,body[data-page=maps] .map-setup-picker :focus-visible{outline:3px solid var(--student-primary,#006dcc);outline-offset:3px}
body[data-page=maps] .map-setup-picker{width:min(680px,calc(100% - 32px));max-height:calc(100dvh - 32px);box-sizing:border-box;overflow:auto;overscroll-behavior:contain;padding:24px;border:1px solid #d9e6f2;border-radius:18px;background:#fff;color:var(--ink,#152b4c);scrollbar-width:thin;scrollbar-color:#83a8d3 #eff6ff}
body[data-page=maps] .map-setup-picker::backdrop{background:rgb(21 43 76 / .4)}
body[data-page=maps] .map-picker-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:16px}
body[data-page=maps] .map-picker-heading h2{font-size:1.375rem;margin:0}
body[data-page=maps] .map-picker-heading button{min-height:44px}
body[data-page=maps] .map-setup-picker .catalog-list{max-height:min(45dvh,460px)}
body[data-page=maps] .map-setup-picker .catalog-heading{margin-top:0}
@media(max-width:767px){
  html body[data-page=maps].map-setup-mode main{padding:12px 14px calc(112px + env(safe-area-inset-bottom))}
  body[data-page=maps].map-setup-mode .hero{padding:4px 4px 14px}
  html body[data-page=maps].map-setup-mode .hero h1{line-height:1.25;margin-bottom:8px}
  body[data-page=maps].map-setup-mode .map-setup-scenery{width:240px;height:170px;right:-14px}
  body[data-page=maps].map-setup-mode #mapSetupNotice{font-size:.875rem}
  body[data-page=maps].map-setup-mode .map-reference-setup{padding:16px}
  body[data-page=maps] .map-reference-setup h2{font-size:1.25rem;margin-bottom:12px}
  body[data-page=maps] .map-reference-setup .map-choose-trigger{min-height:48px;padding:8px 12px}
  body[data-page=maps] .map-selected-material{grid-template-columns:36px minmax(0,1fr);gap:10px;padding:12px;margin:12px 0 16px}
  body[data-page=maps] .map-selected-material>div:last-child{display:flex;flex-wrap:wrap;align-items:baseline;gap:4px 8px}
  body[data-page=maps] .map-selected-icon{min-height:54px;border-radius:10px}
  body[data-page=maps] .map-selected-icon svg{width:30px;height:30px}
  body[data-page=maps] .map-selected-material h3{font-size:1.0625rem;margin:0}
  body[data-page=maps] .map-selected-material p{font-size:.8125rem}
  body[data-page=maps] .map-selected-material .topic-links{flex-basis:100%;margin-top:2px}
  body[data-page=maps] .map-selected-material .topic-links a{min-height:32px;font-size:.75rem;padding:4px 8px}
  body[data-page=maps] .map-setup-fields{gap:12px}
  body[data-page=maps] .map-setup-fields .setting-label{font-size:.9375rem;margin-bottom:6px}
  body[data-page=maps] .map-setup-fields .setting-options button{min-height:44px;font-size:.9375rem}
  body[data-page=maps] .map-reference-setup [data-action=start-practice]{min-height:48px;margin-top:16px}
  body[data-page=maps] .map-setup-picker{padding:20px 16px}
}
