/* Existing typography, cards, icons and layout remain in the original stylesheet. */
#worldExplorerScreen [hidden] {display:none!important;}
/* Learn / Test segmented switch: same solid active-half treatment as the bot's Math / Music selector. */
.world-mode-switch{display:flex;justify-content:center;margin:4px 0 12px;}
#worldExplorerScreen .world-mode-toggle{
  display:grid;grid-template-columns:1fr 1fr;align-items:stretch;gap:0;
  width:min(100%,412px);min-height:52px;padding:0;overflow:hidden;
  border:1px solid #315a45;border-radius:4px;background:#fffdf8;
  cursor:pointer;font:800 1.04rem 'Nunito Sans',sans-serif;color:#315a45;
}
#worldExplorerScreen .world-mode-option{
  display:flex;justify-content:flex-start;align-items:center;gap:10px;
  min-height:52px;padding:10px 16px;border-radius:0;
  background:#fffdf8;color:#254e3d;
  transition:background-color .14s,color .14s;
}
#worldExplorerScreen .world-mode-option .world-carbon-icon{width:20px;height:20px;flex:0 0 20px;object-fit:contain;}
#worldExplorerScreen .world-mode-toggle[aria-checked="false"] .world-mode-option--learn,
#worldExplorerScreen .world-mode-toggle[aria-checked="true"] .world-mode-option--test{
  background:#245543;color:#fff;
}
#worldExplorerScreen .world-mode-toggle[aria-checked="false"] .world-mode-option--learn .world-carbon-icon,
#worldExplorerScreen .world-mode-toggle[aria-checked="true"] .world-mode-option--test .world-carbon-icon{filter:brightness(0) invert(1);}
#worldExplorerScreen .world-mode-toggle:focus-visible{outline:3px solid #2d5a4a;outline-offset:3px;}
#worldExplorerScreen #worldArt > .world-stage-media{display:block;width:100%;height:100%;object-fit:cover;position:absolute;inset:0;}
/* 736x400 source clips differ slightly from 16:9. Cover removes dark letterbox bands. */
#worldExplorerScreen #worldArt > video{object-fit:cover;background:transparent;}
#worldExplorerScreen #worldArt > video[hidden],
#worldExplorerScreen #worldDiscover[hidden]{display:none!important;}
#worldArt > .world-auto-video{z-index:2;}
#worldExplorerScreen .world-art-frame{position:relative;}
#worldExplorerScreen .world-stage-sound-toggle{z-index:5;}
#worldExplorerScreen #worldStageSoundToggle[hidden]{display:none!important;}
#worldExplorerScreen #worldArt.world-video-needs-gesture{cursor:pointer;}
.world-question-navigation {display:flex;align-items:center;justify-content:center;gap:10px;flex-wrap:wrap;margin:8px 0;}
.world-question-navigation button {font-size:.8rem;}
.world-question-navigation span {font-size:.8rem;}
#worldExplorerScreen .world-answer[aria-pressed="true"] {border-color:#456e57;background:#e3eee1;}
#worldExplorerScreen .world-question-navigation button {display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:44px;padding:8px 17px;border-radius:12px;font-family:'Nunito Sans',sans-serif;font-weight:800;cursor:pointer;}
#worldExplorerScreen .world-question-navigation button:disabled {opacity:.45;cursor:default;}

#worldExplorerScreen #worldArt{position:relative;overflow:hidden;}
#worldExplorerScreen .world-loading-indicator{
  position:absolute;inset:0;z-index:4;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;
  background:rgba(252,249,241,.72);backdrop-filter:blur(1px);text-align:center;padding:16px;pointer-events:none;
}
#worldExplorerScreen .world-loading-bug{width:72px;height:72px;object-fit:contain;filter:drop-shadow(0 2px 6px rgba(0,0,0,.16));}
#worldExplorerScreen .world-loading-text{max-width:24ch;font:800 1rem 'Nunito Sans',sans-serif;color:#254e3d;line-height:1.3;}
#worldExplorerScreen .world-loading-indicator[hidden]{display:none!important;}

/* Test only: semantically distinct Yes / No icons and unmistakable answer feedback. */
#worldExplorerScreen .world-answer.world-answer--correct,
#worldExplorerScreen .world-answer.world-answer--correct[aria-pressed="true"]{
  border:2px solid #2D7750;background:#E5F3E8;color:#1F5A38;
}
#worldExplorerScreen .world-answer.world-answer--incorrect,
#worldExplorerScreen .world-answer.world-answer--incorrect[aria-pressed="true"]{
  border:2px solid #C03636;background:#FDEBEB;color:#982B2B;
}
#worldExplorerScreen .world-feedback.is-correct{color:#237347;}
#worldExplorerScreen .world-feedback.is-incorrect{color:#B12F35;}
#worldExplorerScreen .world-answer .world-carbon-icon,
#worldExplorerScreen .world-feedback .world-carbon-icon{
  width:19px;height:19px;min-width:19px;min-height:19px;flex-basis:19px;
}

/* Keep the original red/green fills of the answer thumbs.
   The legacy global .world-explorer .world-carbon-icon filter otherwise makes
   every SVG green, even when the SVG file itself is red. */
#worldExplorerScreen .world-answer .world-carbon-icon[src*="thumbs-"],
#worldExplorerScreen .world-feedback .world-carbon-icon[src*="thumbs-"] {
  filter: none !important;
}

#worldExplorerScreen .world-answer-label{display:inline-flex;align-items:center;justify-content:center;gap:8px;flex-wrap:wrap;}
#worldExplorerScreen .world-answer-emoji{font-size:1.15rem;line-height:1;}

/* Safeguard: suppress older controller's generic star beside quiz answers.
   The v22 controller instead renders descriptive emoji from the question text. */
#worldExplorerScreen #worldAnswers .world-answer > .world-carbon-icon[src$="/star.svg"],
#worldExplorerScreen #worldAnswers .world-answer > .world-carbon-icon[src$="/star--filled.svg"] {
  display:none !important;
}


/* v25: quiz progress track uses the same visual language as the top step tracker */
#worldExplorerScreen .world-question-navigation{display:grid;grid-template-columns:auto minmax(240px,340px) auto;align-items:center;justify-content:center;gap:12px;margin:10px 0 14px;}
#worldExplorerScreen .world-question-progress-wrap{display:flex;flex-direction:column;align-items:center;gap:8px;min-width:0;}
#worldExplorerScreen .world-question-progress{width:100%;margin:0;}
#worldExplorerScreen .world-question-count{font-size:.8rem;font-weight:800;color:#476554;text-align:center;white-space:nowrap;}
#worldExplorerScreen .world-question-navigation button{width:auto;min-width:128px;}
#worldExplorerScreen .world-question-progress .world-progress-item{min-width:0;}
#worldExplorerScreen .world-question-progress .world-progress-item:last-child{flex:0 0 16px;}
#worldExplorerScreen .world-question-progress .world-progress-item::after{top:10px;}
@media (max-width: 760px){
  #worldExplorerScreen .world-question-navigation{grid-template-columns:1fr 1fr;gap:10px;}
  #worldExplorerScreen .world-question-progress-wrap{grid-column:1 / -1;}
  #worldExplorerScreen .world-question-navigation button{width:100%;min-width:0;}
}

/* v28: hide duplicate home shortcut without modifying stable navigation controller. */
#worldExplorerScreen #worldReturnHome { display:none!important; }


/* v29: question navigation uses compact arrow controls like the top story navigation */
#worldExplorerScreen .world-question-navigation{grid-template-columns:56px minmax(180px,340px) 56px;align-items:center;justify-content:center;gap:12px;margin:10px 0 14px;}
#worldExplorerScreen .world-question-navigation .world-question-arrow{
  width:56px;min-width:56px;height:48px;min-height:48px;padding:0;
  border:1.5px solid #d5c39d;border-radius:999px;background:#fffdf8;color:#315a45;
  font:800 1.8rem/1 'Nunito Sans',sans-serif;display:inline-flex;align-items:center;justify-content:center;
}
#worldExplorerScreen .world-question-navigation .world-question-arrow:disabled{opacity:.45;color:#7a8b82;background:#fbf8f0;cursor:default;}
#worldExplorerScreen .world-question-navigation .world-question-arrow:not(:disabled):hover{background:#f8f3e7;}
#worldExplorerScreen .world-question-navigation .world-question-arrow:focus-visible{outline:3px solid #2d5a4a;outline-offset:3px;}
#worldExplorerScreen .world-question-navigation button:not(.world-question-arrow){width:auto;min-width:128px;}
@media (max-width: 760px){
  #worldExplorerScreen .world-question-navigation{grid-template-columns:48px minmax(140px,1fr) 48px;gap:10px;}
  #worldExplorerScreen .world-question-navigation .world-question-arrow{width:48px;min-width:48px;height:44px;min-height:44px;font-size:1.6rem;}
  #worldExplorerScreen .world-question-progress-wrap{grid-column:auto;}
  #worldExplorerScreen .world-question-navigation button:not(.world-question-arrow){width:auto;min-width:0;}
}

/* v30: the quiz arrows use the exact circular geometry of story step arrows. */
#worldExplorerScreen .world-question-navigation {
  grid-template-columns:44px minmax(160px,340px) 44px;
  align-items:center;
  gap:12px;
}
#worldExplorerScreen .world-question-navigation button.world-question-arrow {
  box-sizing:border-box;
  display:inline-grid;
  place-items:center;
  flex:0 0 44px;
  width:44px;
  min-width:44px;
  max-width:44px;
  height:44px;
  min-height:44px;
  max-height:44px;
  aspect-ratio:1 / 1;
  padding:0;
  margin:0;
  border:1px solid rgba(179,151,94,.55);
  border-radius:50%;
  background:#fffdf7;
  color:var(--forest-deep,#2d5a4a);
  box-shadow:none;
  cursor:pointer;
  transition:background-color .14s ease,border-color .14s ease;
}
#worldExplorerScreen .world-question-navigation button.world-question-arrow:hover:not(:disabled) {
  background:#eff4ec;
  border-color:#2d5a4a;
  box-shadow:none;
  transform:none;
}
#worldExplorerScreen .world-question-navigation button.world-question-arrow:disabled {
  opacity:.40;
  cursor:not-allowed;
  background:#fffdf7;
  box-shadow:none;
}
#worldExplorerScreen .world-question-navigation button.world-question-arrow:focus-visible {
  outline:2px solid #2d5a4a;
  outline-offset:3px;
}
#worldExplorerScreen .world-question-navigation button.world-question-arrow .world-carbon-icon {
  display:block;
  width:26px;
  min-width:26px;
  max-width:26px;
  height:26px;
  min-height:26px;
  max-height:26px;
  flex:none;
  margin:0;
  padding:0;
}
@media (max-width:760px) {
  #worldExplorerScreen .world-question-navigation {
    grid-template-columns:44px minmax(140px,1fr) 44px;
    gap:10px;
  }
  #worldExplorerScreen .world-question-progress-wrap {grid-column:auto;}
}
@media (max-width:420px) {
  #worldExplorerScreen .world-question-navigation {
    grid-template-columns:39px minmax(135px,1fr) 39px;
    gap:8px;
  }
  #worldExplorerScreen .world-question-navigation button.world-question-arrow {
    flex-basis:39px;
    width:39px;
    min-width:39px;
    max-width:39px;
    height:39px;
    min-height:39px;
    max-height:39px;
  }
}
