html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  background: #1a2320;
  overflow: hidden;
  font-family: system-ui, sans-serif;
  color: #cfd8d0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
body.high-contrast {
  background: #000000;
  color: #ffffff;
}
#game {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  height: 100svh;
  display: block;
  overflow: hidden;
  background: #1a2320;
}
#game canvas {
  display: block;
  max-width: none;
  max-height: none;
}
@media (max-width: 760px) and (orientation: portrait) {
  /* NOTE: a former margin-left shift on the run-scene canvas cropped the
     player + chasing croc off-screen on portrait phones; removed 2026-07-06
     (design audit). Phaser FIT + CENTER_BOTH must stay unshifted. */
  body[data-croc-scene="crocapult"] #game canvas,
  body[data-croc-scene="float-sink-river"] #game canvas,
  body[data-croc-scene="ramp-runner"] #game canvas,
  body[data-croc-scene="vine-swinger"] #game canvas {
    position: fixed !important;
    top: 52% !important;
    left: 0 !important;
    width: 100vw !important;
    height: auto !important;
    margin: 0 !important;
    transform: translateY(-50%) !important;
  }
  body[data-croc-scene] #helperBadge,
  body[data-croc-scene] #inputHintBadge,
  body[data-croc-scene] #levelMapBtn {
    display: none !important;
  }
  body[data-croc-scene]:not(:has(#start.show)) #settingsBtn {
    display: none !important;
  }
}
@media (max-width: 760px) and (orientation: portrait) {
  body.toy-castle-active #game canvas {
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    width: auto !important;
    height: 100svh !important;
    max-width: none !important;
    max-height: none !important;
    margin: 0 !important;
    transform: translate(-50%, -50%) !important;
  }
}
.monster-truck-three-canvas {
  position: fixed;
  pointer-events: none;
  z-index: 1;
  mix-blend-mode: normal;
  opacity: 0.38;
}
.capybara-cab-three-canvas {
  position: fixed;
  pointer-events: none;
  z-index: 1;
  mix-blend-mode: normal;
  opacity: 1;
}
#hud {
  position: fixed;
  top: 8px;
  right: 62px; /* clear the fixed mute button (top-right) */
  max-width: min(280px, calc(100vw - 70px));
  box-sizing: border-box;
  background: rgba(0, 0, 0, 0.48);
  padding: 5px 8px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.12;
  pointer-events: none;
  text-align: right;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.78);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.28);
}
#hud::before {
  content: attr(data-summary);
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#hud:not([data-summary])::before {
  content: "Run 0";
}
#hud > div {
  display: none;
}
#hud > div:first-child {
  display: none;
}
#hud > div:last-child {
  display: none;
}
#hud b {
  color: #ffd36b;
  font-weight: 800;
  text-shadow:
    0 0 6px rgba(255, 211, 107, 0.45),
    0 1px 2px rgba(0, 0, 0, 0.7);
}
@media (max-width: 760px), (max-height: 620px) {
  #hud {
    top: 6px;
    left: 6px;
    right: 6px;
    max-width: none;
    max-height: min(32px, calc(100svh - 12px));
    padding: 5px 8px;
    overflow: hidden;
    border-radius: 7px;
    font-size: 10px;
    line-height: 1.08;
    text-align: center;
  }
  #levelMapBtn {
    top: auto;
    right: 6px;
    bottom: max(8px, env(safe-area-inset-bottom));
    min-height: 34px;
    padding: 6px 9px;
    font-size: 12px;
  }
}
@media (max-width: 520px), (max-height: 500px) {
  #hud {
    left: 6px;
    right: 6px;
    max-width: none;
    text-align: center;
  }
  #hud > div:first-child,
  #hud > div:last-child {
    display: none;
  }
  #levelMapBtn {
    top: auto;
    right: 6px;
    bottom: max(8px, env(safe-area-inset-bottom));
  }
}
#levelMapBtn {
  position: fixed;
  right: 12px;
  bottom: max(12px, env(safe-area-inset-bottom));
  z-index: 14;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 8px 12px;
  border: 2px solid rgba(255, 211, 107, 0.82);
  border-radius: 8px;
  background: rgba(5, 8, 10, 0.74);
  color: #fff7ce;
  font-size: 14px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.32);
}
#levelMapBtn:hover {
  background: rgba(255, 211, 107, 0.2);
}
#levelMapBtn:focus-visible {
  outline: 3px solid rgba(141, 252, 255, 0.85);
  outline-offset: 2px;
}
@media (max-width: 760px), (max-height: 620px) {
  #levelMapBtn {
    right: 6px;
    bottom: max(8px, env(safe-area-inset-bottom));
    min-height: 34px;
    padding: 6px 9px;
    font-size: 12px;
  }
}
@media (max-width: 520px), (max-height: 500px) {
  #levelMapBtn {
    top: auto;
    right: 6px;
    bottom: max(8px, env(safe-area-inset-bottom));
  }
}
.jumpTutorialCue {
  position: fixed;
  left: clamp(360px, 38vw, 560px);
  bottom: clamp(110px, 17vh, 170px);
  z-index: 12;
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, 8px);
  transition:
    opacity 220ms ease,
    transform 220ms ease;
}
.jumpTutorialCue.show {
  opacity: 1;
  transform: translate(-50%, 0);
}
.jumpTutorialCue.leaving {
  opacity: 0;
  transform: translate(-50%, -10px);
}
.jumpTutorialCue span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 16px;
  border: 2px solid rgba(255, 211, 107, 0.92);
  border-radius: 8px;
  background: rgba(5, 8, 10, 0.86);
  color: #fff7ce;
  font-size: 19px;
  font-weight: 900;
  line-height: 1;
  text-shadow:
    0 0 6px rgba(255, 211, 107, 0.45),
    0 2px 2px #000000;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.32);
}
.jumpTutorialCue b {
  align-self: center;
  margin-bottom: -2px;
  color: #ffd36b;
  font-size: 38px;
  line-height: 0.9;
  text-shadow:
    0 0 4px rgba(255, 211, 107, 0.48),
    0 2px 2px #000000;
}
body.high-contrast .jumpTutorialCue span {
  border-color: #ffffff;
  background: #000000;
  color: #ffffff;
  text-shadow: none;
}
body.high-contrast .jumpTutorialCue b {
  color: #ffff00;
  text-shadow: none;
}
@media (max-width: 760px), (max-height: 620px) {
  .jumpTutorialCue {
    left: 50%;
    bottom: max(108px, calc(env(safe-area-inset-bottom) + 108px));
  }
  .jumpTutorialCue span {
    padding: 8px 12px;
    font-size: 17px;
  }
  .jumpTutorialCue b {
    font-size: 34px;
  }
}
body.secret-swamp-active #hud,
body.secret-swamp-active #levelMapBtn,
body.secret-swamp-active #touchSettingsPad,
body.secret-swamp-active #helperBadge,
body.secret-swamp-active #muteBadge,
body.secret-swamp-active #inputHintBadge,
body.secret-swamp-active #settingsBtn {
  display: none !important;
}
body.high-contrast #hud,
body.high-contrast #levelMapBtn,
body.high-contrast #levelCoach,
body.high-contrast #brainBridgePanel,
body.high-contrast #learningBridgePanel,
body.high-contrast #patternPainterPanel,
body.high-contrast #settingsPanel,
body.high-contrast #leaderboardPanel,
body.high-contrast #dailyMissionsPanel {
  background: #000000;
  border: 3px solid #ffffff;
  color: #ffffff;
  text-shadow: none;
  box-shadow: none;
}
body.high-contrast #hud b,
body.high-contrast #levelCoach .coachTitle,
body.high-contrast #brainBridgeTitle,
body.high-contrast #learningBridgeTitle,
body.high-contrast #settingsPanel h2,
body.high-contrast #leaderboardPanel h2 {
  color: #ffff00;
  text-shadow: none;
}
body.high-contrast #levelCoach .coachSkill,
body.high-contrast #levelCoach .coachGoal,
body.high-contrast #levelCoach .coachKidCue,
body.high-contrast #levelCoach .coachTip,
body.high-contrast #levelCoach .coachBridge,
body.high-contrast #levelCoach .coachHelper,
body.high-contrast #levelCoach .coachVoiceStatus,
body.high-contrast #brainBridgeKicker,
body.high-contrast #learningBridgeKicker,
body.high-contrast .learningBridgeRow b,
body.high-contrast #replayGoalTitle,
body.high-contrast #replayGoalPrompt,
body.high-contrast #inputHint,
body.high-contrast #inputHintBadge,
body.high-contrast #helperBadge,
body.high-contrast #helperChoice,
body.high-contrast #bridgeSnippet {
  color: #ffffff;
  opacity: 1;
}
#helperBadge {
  position: fixed;
  left: 12px;
  bottom: 12px;
  z-index: 13;
  display: none;
  max-width: min(360px, calc(100vw - 24px));
  padding: 9px 12px;
  border: 2px solid rgba(255, 211, 107, 0.72);
  border-radius: 8px;
  background: rgba(5, 8, 10, 0.72);
  color: #f7ffe8;
  font-size: 13px;
  line-height: 1.22;
  pointer-events: none;
  align-items: center;
  gap: 8px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.34);
}
#helperBadge.show {
  display: flex;
}
#helperBadge.helperNudgeGlow {
  border-color: rgba(141, 252, 255, 0.88);
  box-shadow:
    0 8px 20px rgba(0, 0, 0, 0.34),
    0 0 0 0 rgba(141, 252, 255, 0.42);
  animation: helperNudgeGlow 1.2s ease-in-out infinite;
}
.helperPathChip {
  flex: 0 0 auto;
  min-width: 48px;
  padding: 3px 6px;
  border-radius: 8px;
  background: rgba(255, 211, 107, 0.18);
  color: #ffd36b;
  font-size: 11px;
  font-weight: 800;
  text-align: center;
}
.helperBadgeText {
  min-width: 0;
}
body:has(#start.show) #helperBadge {
  display: none !important;
}
body.high-contrast #helperBadge {
  background: #000000;
  border: 3px solid #ffffff;
  box-shadow: none;
}
body.high-contrast .helperPathChip {
  background: #000000;
  border: 2px solid #ffff00;
  color: #ffff00;
}
@keyframes helperNudgeGlow {
  0%,
  100% {
    box-shadow:
      0 8px 20px rgba(0, 0, 0, 0.34),
      0 0 0 0 rgba(141, 252, 255, 0.36);
  }
  50% {
    box-shadow:
      0 8px 20px rgba(0, 0, 0, 0.34),
      0 0 0 8px rgba(141, 252, 255, 0.04);
  }
}
@media (prefers-reduced-motion: reduce) {
  #helperBadge.helperNudgeGlow {
    animation: none;
  }
}
body.high-contrast #levelCoach .coachVoiceButton {
  background: #000000;
  border-color: #ffff00;
  color: #ffff00;
}
body.high-contrast #levelCoach .coachStarterStep {
  background: #000000;
  border-color: #ffff00;
  color: #ffffff;
}
body.high-contrast #levelCoach .coachStarterStep b {
  background: #000000;
  border: 1px solid #ffff00;
  color: #ffff00;
}
#hud.foodGroupMode #runnerOnlyHudStats {
  display: none;
}
body:has(#start.show) #hud {
  opacity: 0;
}
body:has(#start.show) #levelMapBtn {
  display: none;
}
body:has(#over.show) #levelMapBtn,
body:has(#over.show) #touchSettingsPad,
body:has(#over.show) #settingsBtn {
  display: none !important;
}
body:has(#levelCoach.show) #touchSettingsPad,
body:has(#levelCoach.show) .jumpTutorialCue {
  display: none !important;
}
/* Touch pad for mute/pause/restart so kids on phones/tablets have
   a path to those actions. Keyboard kids can still use M/P/R. */
#touchSettingsPad {
  position: fixed;
  top: 12px;
  left: 12px;
  display: none;
  gap: 12px;
  z-index: 14;
  pointer-events: auto;
}
body:has(#start.show) #touchSettingsPad {
  display: none !important;
}
body.show-touch-pad #touchSettingsPad {
  display: flex;
}
body.show-touch-pad #hud {
  top: 8px;
  left: 76px;
  right: 8px;
  padding: 5px 8px;
  font-size: 11px;
  line-height: 1.12;
  text-align: center;
}
body.show-touch-pad #hud > div:first-child {
  font-size: 0;
}
body.show-touch-pad #hud > div:first-child::before {
  content: "Tap or swipe to move. Pause for a break. Map chooses another level.";
  font-size: 13px;
  line-height: 1.2;
}
body.show-touch-pad #hud > div:last-child {
  display: none;
}
body.show-touch-pad #levelMapBtn {
  display: none;
}
@media (max-width: 1000px) {
  body.show-touch-pad #hud {
    top: 142px;
    left: 8px;
    right: 8px;
  }
}
#touchSettingsPad button {
  appearance: none;
  -webkit-appearance: none;
  background: rgba(5, 8, 10, 0.62);
  color: #f5fff1;
  border: 2px solid rgba(255, 211, 107, 0.8);
  border-radius: 50%;
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 1px;
  font-size: 24px;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.32);
  touch-action: manipulation;
  padding: 0;
}
.touchControlWord {
  display: block;
  max-width: 56px;
  overflow: hidden;
  text-overflow: ellipsis;
  font-family: Arial, sans-serif;
  font-size: 9px;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0;
}
#touchSettingsPad button:active {
  transform: scale(0.94);
  background: rgba(255, 211, 107, 0.32);
}
#touchSettingsPad button[data-on="true"] {
  background: rgba(255, 211, 107, 0.32);
}
/* Make the Home button the standout, easy-to-find control for kids: larger,
   bright accent fill, white ring — clearly different from mute/pause/restart. */
#touchLevelMapBtn {
  background: rgba(127, 224, 168, 0.92);
  border-color: #ffffff;
  width: 70px;
  height: 70px;
  font-size: 26px;
}
#touchLevelMapBtn:active {
  background: rgba(127, 224, 168, 0.6);
}
#levelCoach {
  position: fixed;
  left: 12px;
  top: 96px;
  width: min(390px, calc(100vw - 24px));
  box-sizing: border-box;
  padding: 12px 14px;
  border: 2px solid rgba(255, 211, 107, 0.62);
  border-radius: 10px;
  background: rgba(5, 8, 10, 0.94);
  color: #fbfff8;
  opacity: 0;
  transform: translateY(-8px);
  transition:
    opacity 0.28s cubic-bezier(0.22, 0.61, 0.36, 1),
    transform 0.28s cubic-bezier(0.22, 0.61, 0.36, 1);
  pointer-events: none;
  z-index: 9;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.55);
  box-shadow:
    0 10px 24px rgba(0, 0, 0, 0.5),
    inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}
#levelCoach.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: none;
}
body:has(#brainBridgePanel.show) #levelCoach {
  display: none;
}
body.show-touch-pad #levelCoach {
  top: 172px;
  max-height: min(42svh, 360px);
  overflow: auto;
}
body.show-touch-pad #levelCoach.show {
  top: 96px;
  max-height: calc(100svh - 128px);
}
#levelCoach .coachTitle {
  color: #ffd36b;
  font-size: 15px;
  font-weight: 900;
  text-transform: uppercase;
}
#levelCoach .coachSkill {
  margin-top: 7px;
  font-size: 12px;
  color: #dfeadd;
  opacity: 0.9;
}
#levelCoach .coachKidCue {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  margin-top: 8px;
  color: #f8fff0;
  font-size: 15px;
  line-height: 1.28;
}
#levelCoach .coachKidCue b {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  border-radius: 999px;
  background: rgba(255, 211, 107, 0.2);
  color: #ffd36b;
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
}
#levelCoach .coachKidGoal span {
  font-weight: 850;
}
#levelCoach .coachKidTry {
  color: #dffcff;
}
#levelCoach .coachStarterSteps {
  margin-top: 8px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}
#levelCoach .coachStarterStep {
  min-width: 0;
  padding: 6px 5px;
  border: 1px solid rgba(255, 211, 107, 0.36);
  border-radius: 8px;
  background: rgba(255, 211, 107, 0.12);
  color: #fff9d8;
  font-size: 12px;
  font-weight: 850;
  line-height: 1.12;
  text-align: center;
}
#levelCoach .coachStarterStep b {
  width: 18px;
  height: 18px;
  margin: 0 auto 3px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(141, 252, 255, 0.2);
  color: #8dfcff;
  font-size: 11px;
  font-weight: 950;
}
#levelCoach .coachKidStory {
  padding: 6px 7px;
  border-radius: 8px;
  background: rgba(141, 252, 255, 0.1);
  color: #e9fbff;
}
#levelCoach .coachKidStory b {
  background: rgba(141, 252, 255, 0.18);
  color: #8dfcff;
}
#levelCoach .coachKidStory span {
  font-size: 13px;
  line-height: 1.28;
}
#levelCoach .coachGoalPhase {
  padding: 6px 7px;
  border-radius: 8px;
  background: rgba(255, 211, 107, 0.11);
  color: #fff4bd;
}
#levelCoach .coachGoalPhase span {
  font-size: 13px;
  line-height: 1.25;
}
#levelCoach .coachVoiceRow {
  margin-top: 7px;
  display: flex;
  align-items: center;
  gap: 8px;
}
#levelCoach .coachVoiceButton {
  min-height: 44px;
  padding: 8px 14px;
  border: 2px solid rgba(141, 252, 255, 0.5);
  border-radius: 8px;
  background: rgba(141, 252, 255, 0.1);
  color: #dffcff;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
  touch-action: manipulation;
  pointer-events: auto;
}
#levelCoach .coachVoiceStatus {
  min-height: 16px;
  color: #8dfcff;
  font-size: 12px;
}
#levelCoach .coachHelper {
  margin-top: 6px;
  padding: 5px 7px;
  border-radius: 7px;
  background: rgba(255, 211, 107, 0.12);
  color: #fff9d8;
  font-size: 13px;
  line-height: 1.28;
}
#levelCoach .coachTips {
  margin-top: 7px;
  display: grid;
  gap: 4px;
}
#levelCoach .coachTip {
  padding: 5px 7px;
  border-radius: 7px;
  background: rgba(141, 252, 255, 0.1);
  color: #fbfff8;
  font-size: 12px;
  line-height: 1.28;
}
/* AGENT_TARGET: coach-replay-btn — "Show me again" button at bottom of level coach panel */
#levelCoach .coachStartBtn {
  /* Primary action on the card: the one gold element */
  display: block;
  margin: 10px auto 0;
  min-height: 50px;
  padding: 10px 26px;
  border: 2px solid #ffe08a;
  border-radius: 10px;
  background: linear-gradient(180deg, #ffd36b, #eeaf3a);
  color: #2b2200;
  font-size: 15px;
  font-weight: 950;
  cursor: pointer;
  touch-action: manipulation;
  pointer-events: auto;
}
#levelCoach .coachReplayBtn {
  display: block;
  margin: 8px auto 2px;
  min-height: 44px;
  padding: 8px 18px;
  font-size: 12px;
  font-weight: 700;
  background: transparent;
  color: #cfd8d0;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 20px;
  cursor: pointer;
  touch-action: manipulation;
  pointer-events: auto;
}
body.high-contrast #levelCoach .coachReplayBtn {
  background: #222;
  color: #ffe566;
  border-color: #ffe566;
}
body.high-contrast #levelCoach .coachStartBtn {
  background: #ffe566;
  color: #000000;
  border-color: #ffffff;
}
#levelCoach .coachBridge {
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid rgba(255, 211, 107, 0.22);
  color: #8dfcff;
  font-size: 12px;
  line-height: 1.35;
}
#over {
  position: fixed;
  inset: 0;
  display: none;
  place-items: center;
  background: rgba(0, 0, 0, 0.65);
  font-size: 28px;
  text-align: center;
}
#over.show {
  display: grid;
}
#over:has(#brainBridgePanel.show) {
  place-items: start center;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  touch-action: pan-y;
  -webkit-overflow-scrolling: touch;
}
#over:has(#brainBridgePanel.show) > div {
  width: min(1180px, calc(100vw - 28px));
  min-height: 100svh;
  padding: 10px 0 max(28px, env(safe-area-inset-bottom));
  box-sizing: border-box;
}
#over:has(#brainBridgePanel.show) #overMsg,
#over:has(#brainBridgePanel.show) #overStats {
  display: none !important;
}
#over:has(#brainBridgePanel.show) #overRetryBtn,
#over:has(#brainBridgePanel.show) #overPickLevelBtn,
#over:has(#brainBridgePanel.show) #overNextLevelBtn {
  display: none !important;
}
#over[data-outcome="loss"] {
  background:
    radial-gradient(circle at 50% 18%, rgba(255, 211, 107, 0.16), transparent 38%),
    rgba(1, 5, 8, 0.9);
}
#over[data-outcome="loss"] > div {
  width: min(860px, calc(100vw - 28px));
}
.retryRaftTip {
  width: min(560px, calc(100vw - 48px));
  margin: 14px auto 2px;
  padding: 12px 14px;
  border: 2px solid rgba(141, 252, 255, 0.48);
  border-radius: 8px;
  background: rgba(5, 27, 40, 0.82);
  color: #e9fbff;
  text-align: left;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.34);
}
.retryRaftKicker {
  color: #8dfcff;
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0;
  text-transform: uppercase;
}
.retryRaftTitle {
  margin-top: 3px;
  color: #fff3b0;
  font-size: 17px;
  font-weight: 950;
  line-height: 1.18;
}
.retryRaftFirstMove {
  width: fit-content;
  max-width: 100%;
  margin-top: 8px;
  padding: 4px 8px;
  border: 1px solid rgba(255, 211, 107, 0.55);
  border-radius: 8px;
  background: rgba(255, 211, 107, 0.12);
  color: #fff4bd;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.2;
}
.retryRaftBody {
  margin-top: 5px;
  color: #f7fff1;
  font-size: 15px;
  line-height: 1.28;
}
body.high-contrast .retryRaftTip {
  background: #000000;
  border-color: #ffffff;
  color: #ffffff;
  box-shadow: none;
}
body.high-contrast .retryRaftKicker,
body.high-contrast .retryRaftTitle {
  color: #ffff00;
}
body.high-contrast .retryRaftFirstMove {
  background: #000000;
  border-color: #ffff00;
  color: #ffff00;
}
body.high-contrast .retryRaftBody {
  color: #ffffff;
}
#over[data-outcome="loss"]:has(#learningBridgePanel.compact.show) #overMsg,
#over[data-outcome="loss"]:has(#learningBridgePanel.compact.show) #overStats,
#over[data-outcome="loss"]:has(#learningBridgePanel.compact.show) #retryRaftTip,
#over[data-outcome="loss"]:has(#learningBridgePanel.compact.show) #replayGoalPanel,
#over[data-outcome="loss"]:has(#learningBridgePanel.compact.show) #patternPainterBtn,
#over[data-outcome="loss"]:has(#learningBridgePanel.compact.show) #overRetryBtn,
#over[data-outcome="loss"]:has(#learningBridgePanel.compact.show) #overPickLevelBtn,
#over[data-outcome="loss"]:has(#learningBridgePanel.compact.show) #overNextLevelBtn {
  display: none !important;
}
#over[data-bridge-page="mind"] #overMsg,
#over[data-bridge-page="mind"] #overStats,
#over[data-bridge-page="mind"] #replayGoalPanel,
#over[data-bridge-page="mind"] #patternPainterBtn,
#over[data-bridge-page="mind"] #overRetryBtn,
#over[data-bridge-page="mind"] #overPickLevelBtn,
#over[data-bridge-page="mind"] #overNextLevelBtn {
  display: none !important;
}
#over[data-outcome="loss"]:has(#learningBridgePanel.compact.show) {
  place-items: stretch;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  touch-action: pan-y;
  -webkit-overflow-scrolling: touch;
  background:
    linear-gradient(180deg, rgba(1, 5, 8, 0.12), rgba(1, 5, 8, 0.72)),
    radial-gradient(circle at 72% 20%, rgba(255, 211, 107, 0.18), transparent 28%),
    url("../../assets/levels/monkey-rescue/level5_monkey_rescue_background.png") center / cover no-repeat,
    #050a08;
}
#over[data-outcome="loss"]:has(#learningBridgePanel.compact.show) > div {
  width: 100%;
  min-height: 100svh;
  padding: clamp(18px, 4vw, 48px);
  padding-bottom: max(48px, env(safe-area-inset-bottom));
  box-sizing: border-box;
  display: grid;
  place-items: start center;
  align-content: start;
  background:
    repeating-linear-gradient(
      to bottom,
      rgba(0, 0, 0, 0) 0,
      rgba(0, 0, 0, 0) 3px,
      rgba(0, 0, 0, 0.24) 4px,
      rgba(0, 0, 0, 0) 5px
    ),
    radial-gradient(ellipse at center, transparent 34%, rgba(0, 0, 0, 0.72) 100%);
}
#over[data-bridge-page="mind"] {
  place-items: stretch;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  touch-action: pan-y;
  -webkit-overflow-scrolling: touch;
  background:
    linear-gradient(180deg, rgba(1, 5, 8, 0.12), rgba(1, 5, 8, 0.72)),
    radial-gradient(circle at 72% 20%, rgba(255, 211, 107, 0.18), transparent 28%),
    url("../../assets/levels/monkey-rescue/level5_monkey_rescue_background.png") center / cover no-repeat,
    #050a08;
}
#over[data-bridge-page="mind"] > div {
  width: 100%;
  min-height: 100svh;
  padding: clamp(18px, 4vw, 48px);
  padding-bottom: max(48px, env(safe-area-inset-bottom));
  box-sizing: border-box;
  display: grid;
  place-items: start center;
  align-content: start;
  background:
    repeating-linear-gradient(
      to bottom,
      rgba(0, 0, 0, 0) 0,
      rgba(0, 0, 0, 0) 3px,
      rgba(0, 0, 0, 0.24) 4px,
      rgba(0, 0, 0, 0) 5px
    ),
    radial-gradient(ellipse at center, transparent 34%, rgba(0, 0, 0, 0.72) 100%);
}
#over button,
#start button {
  margin-top: 18px;
  padding: 14px 26px;
  min-height: 56px;
  font-size: 18px;
  font-weight: 700;
  color: #10130d;
  border: 0;
  border-radius: 8px;
  background: #ffd36b;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.28);
  transition:
    transform 0.16s cubic-bezier(0.22, 0.61, 0.36, 1),
    box-shadow 0.16s cubic-bezier(0.22, 0.61, 0.36, 1);
}
#over button {
  margin-left: 6px;
  margin-right: 6px;
}
#brainBridgePanel {
  position: relative;
  overflow-x: clip;
  overflow-y: auto;
  display: none;
  width: min(1080px, calc(100vw - 18px));
  max-height: calc(100svh - 20px);
  box-sizing: border-box;
  margin: 0 auto;
  padding: 14px 14px 18px;
  border: 0;
  border-radius: 0;
  background: linear-gradient(180deg, #3266ba 0%, #4c8bd3 100%);
  color: #1d3154;
  text-align: left;
  font-size: 15px;
  line-height: 1.35;
  isolation: isolate;
  overscroll-behavior: contain;
  touch-action: pan-y;
  -webkit-overflow-scrolling: touch;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.34);
}
#brainBridgePanel.show {
  display: block;
}
#brainBridgePanel::before {
  content: none;
}
#brainBridgePanel > * {
  position: relative;
  z-index: 1;
}
#replayGoalPanel {
  display: none;
  width: min(620px, calc(100vw - 40px));
  margin: 14px auto 0;
  padding: 12px;
  border: 1px solid rgba(255, 211, 107, 0.38);
  border-radius: 8px;
  background: rgba(8, 18, 24, 0.86);
  color: #edf7ed;
  text-align: left;
  font-size: 15px;
  line-height: 1.35;
}
#replayGoalPanel.show {
  display: block;
}
#replayGoalTitle {
  color: #ffd36b;
  font-size: 18px;
  font-weight: 900;
}
#replayGoalPrompt {
  margin-top: 5px;
  color: #cfd8d0;
}
#replayGoalChoices {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}
#over #replayGoalChoices button {
  margin: 0;
  padding: 10px 12px;
  min-height: 48px;
  font-size: 14px;
}
body.high-contrast #replayGoalPanel {
  background: #000000;
  border: 3px solid #ffffff;
  color: #ffffff;
  text-shadow: none;
  box-shadow: none;
}
body.high-contrast #replayGoalTitle {
  color: #ffff00;
}
#brainBridgeKicker {
  color: #fff7df;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0;
  text-align: center;
}
#brainBridgeTitle {
  margin-top: 2px;
  color: #ffffff;
  font-size: 16px;
  font-weight: 900;
  text-align: center;
}
#brainBridgePrompt {
  position: relative;
  min-height: 82px;
  margin-top: 10px;
  padding: 14px 16px 14px 94px;
  border-radius: 20px;
  background: #ffffff;
  color: #233866;
  font-size: clamp(22px, 2.4vw, 34px);
  font-weight: 900;
  line-height: 1.04;
  box-shadow: 0 7px 0 rgba(18, 57, 124, 0.34);
}
#brainBridgePrompt::before {
  content: "";
  position: absolute;
  left: 18px;
  top: 50%;
  width: 56px;
  height: 56px;
  transform: translateY(-50%);
  border-radius: 50%;
  background-color: #fff2c9;
  background-image: url("../../assets/helper_croc_ready.png");
  background-repeat: no-repeat;
  background-size: 50px auto;
  background-position: center 7px;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.8);
}
#brainBridgePrompt::after {
  content: "CROC SAYS";
  position: absolute;
  left: 94px;
  top: 12px;
  color: #e56527;
  font-size: 11px;
  font-weight: 950;
}
#brainBridgePrompt {
  padding-top: 28px;
}
#brainBridgeProgress {
  display: none;
  margin-top: 0;
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: inherit;
  font-size: 13px;
  font-weight: 800;
}
#brainBridgeOutcome {
  margin: 10px 0 8px;
  padding: 9px 12px;
  border-radius: 16px;
  color: #102018;
  font-size: 17px;
  font-weight: 900;
  line-height: 1.15;
  text-align: center;
}
#brainBridgeOutcome.win {
  background: #ffda6b;
}
#brainBridgeOutcome.loss {
  background: #bff4ff;
}
#brainBridgeChoices {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 10px;
}
#over #brainBridgeChoices button {
  min-height: 0;
  margin: 0;
  padding: 10px 12px 12px;
  border: 0;
  border-left: 7px solid #75cb5a;
  border-radius: 18px;
  background: #ffffff;
  color: #24395a;
  font-size: 14px;
  text-align: left;
  box-shadow: 0 6px 0 rgba(18, 57, 124, 0.28);
}
#over #brainBridgeChoices button:nth-child(2) {
  border-left-color: #ff8c88;
}
#over #brainBridgeChoices button:nth-child(3) {
  border-left-color: #b899d8;
}
#over #brainBridgeChoices button:nth-child(4) {
  border-left-color: #ffd36b;
}
#over #brainBridgeChoices button.correct {
  background: #ecffe8;
}
#over #brainBridgeChoices button.wrong {
  background: #ffe7e7;
}
.brainBridgeChoiceHeader {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  color: #24395a;
  font-size: 16px;
  font-weight: 950;
  line-height: 1.08;
}
.brainBridgeChoiceDot {
  flex: 0 0 auto;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #75cb5a;
}
#brainBridgeChoices button:nth-child(2) .brainBridgeChoiceDot {
  background: #ff8c88;
}
#brainBridgeChoices button:nth-child(3) .brainBridgeChoiceDot {
  background: #b899d8;
}
#brainBridgeChoices button:nth-child(4) .brainBridgeChoiceDot {
  background: #ffd36b;
}
.brainBridgeStoryStrip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin-top: 10px;
}
.brainBridgeStoryStrip:not(.hasGeneratedArt) {
  aspect-ratio: 16 / 7;
  align-items: stretch;
  padding: 8px;
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(130, 212, 232, 0.45) 0 55%, rgba(75, 173, 198, 0.72) 56% 100%),
    linear-gradient(90deg, #f6e9bd, #e5f0d6);
}
.brainBridgeStoryStrip.hasGeneratedArt {
  display: block;
}
.brainBridgeStoryStrip.textOnly {
  align-items: stretch;
  padding: 8px;
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(130, 212, 232, 0.45) 0 55%, rgba(75, 173, 198, 0.72) 56% 100%),
    linear-gradient(90deg, #f6e9bd, #e5f0d6);
}
.brainBridgeTextStep {
  display: flex;
  min-height: 44px;
  padding: 8px 6px;
  border-radius: 9px;
  background: rgba(255, 253, 249, 0.82);
  align-items: center;
  justify-content: center;
  color: #24395a;
  font-size: clamp(10px, 0.9vw, 13px);
  font-weight: 950;
  line-height: 1.08;
  text-align: center;
}
.brainBridgeGeneratedCardArt {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 7;
  object-fit: cover;
  border-radius: 12px;
  background: #f2ecd7;
}
.brainBridgeStoryStrip.hasGeneratedArt .brainBridgeStoryPanel {
  display: none;
}
.brainBridgeStoryPanel {
  display: flex;
  min-height: 0;
  padding: 8px 6px 6px;
  border-radius: 9px;
  background: rgba(255, 253, 249, 0.78);
  flex-direction: column;
  align-items: stretch;
  justify-content: space-between;
  overflow: hidden;
}
.brainBridgeStoryPanel:nth-child(2) {
  background: #dcefd2;
}
.brainBridgeStoryPanel:nth-child(3) {
  background: #ffd8d8;
}
.brainBridgeStoryArt {
  position: relative;
  display: block;
  flex: 1 1 auto;
  min-height: 42px;
  border-radius: 4px;
  background:
    linear-gradient(180deg, transparent 0 56%, #74cde0 57% 100%),
    linear-gradient(90deg, #f2dbaa, #f7edd0);
}
.brainBridgeStoryArt::before,
.brainBridgeStoryArt::after {
  content: "";
  position: absolute;
  display: block;
}
.icon-eye .brainBridgeStoryArt::before {
  left: 10px;
  bottom: 13px;
  width: 22px;
  height: 10px;
  border-radius: 50%;
  background: #5fc15d;
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.16);
}
.icon-eye .brainBridgeStoryArt::after {
  left: 34px;
  top: 8px;
  width: 22px;
  height: 2px;
  border-top: 2px dotted #24395a;
  transform: rotate(10deg);
}
.icon-spark .brainBridgeStoryArt::before {
  left: 50%;
  top: 6px;
  width: 18px;
  height: 30px;
  transform: translateX(-50%) skew(-12deg);
  background: #ffd33f;
  clip-path: polygon(55% 0, 100% 0, 66% 42%, 100% 42%, 32% 100%, 48% 55%, 12% 55%);
}
.icon-go .brainBridgeStoryArt::before {
  left: 13px;
  bottom: 11px;
  width: 26px;
  height: 12px;
  border-radius: 14px 14px 8px 8px;
  background: #8b5a2b;
  box-shadow: 18px 0 0 #e94e44;
}
.icon-wait .brainBridgeStoryArt::before {
  left: 50%;
  top: 10px;
  width: 28px;
  height: 28px;
  transform: translateX(-50%);
  border: 4px solid #76c96b;
  border-radius: 50%;
}
.icon-warn .brainBridgeStoryArt::before {
  left: 50%;
  top: 9px;
  width: 34px;
  height: 28px;
  transform: translateX(-50%);
  border-radius: 45% 45% 35% 35%;
  background: #68bd5f;
}
.icon-warn .brainBridgeStoryArt::after {
  right: 5px;
  top: 8px;
  color: #ff4054;
  content: "!";
  font-size: 21px;
  font-weight: 950;
}
.brainBridgeStoryPanel b {
  display: block;
  margin-top: 5px;
  color: #24395a;
  font-size: clamp(10px, 0.9vw, 13px);
  font-weight: 950;
  line-height: 1.05;
  text-align: center;
}
#coinSaverSheet {
  margin-top: 10px;
  padding: 12px;
  border-radius: 14px;
  background: rgba(255, 253, 249, 0.96);
  color: #24395a;
  box-shadow: 0 5px 0 rgba(18, 57, 124, 0.24);
}
.coinSaverSheetTitle {
  color: #233866;
  font-size: clamp(22px, 2.4vw, 32px);
  font-weight: 950;
  line-height: 1;
}
.coinSaverSheetSubtitle {
  margin-top: 4px;
  color: #e56527;
  font-size: 13px;
  font-weight: 950;
  text-transform: uppercase;
}
.coinSaverCoinRows {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}
.coinSaverCoinRow {
  display: grid;
  grid-template-columns: minmax(132px, 0.26fr) minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 54px;
  padding: 8px 10px;
  border-radius: 12px;
  background: #fff5cf;
}
.coinSaverCoinRow.nickel {
  background: #e8ffe2;
}
.coinSaverCoinRow.dime {
  background: #eef6ff;
}
.coinSaverCoinRow.quarter {
  background: #fff0d7;
}
.coinSaverCoinLabel {
  color: #233866;
  font-size: 15px;
  font-weight: 950;
  line-height: 1.05;
}
.coinSaverCoinPile {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  align-items: center;
  min-height: 34px;
}
.coinSaverCoin {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff6a6, #ffd23f 58%, #c78318 100%);
  border: 3px solid #9a6815;
  color: #5a3900;
  font-size: 12px;
  font-weight: 950;
  line-height: 1;
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.45),
    0 2px 0 rgba(38, 37, 25, 0.18);
}
.coinSaverCoin.penny {
  background: radial-gradient(circle at 35% 30%, #ffe2b6, #d98a42 58%, #8a4b1f 100%);
  border-color: #7f451c;
  color: #4a250d;
}
.coinSaverCoin.nickel {
  width: 38px;
  height: 38px;
  background: radial-gradient(circle at 35% 30%, #ffffff, #d9d5c8 58%, #8f8877 100%);
  border-color: #756f61;
  color: #37342d;
}
.coinSaverCoin.dime {
  width: 28px;
  height: 28px;
  background: radial-gradient(circle at 35% 30%, #ffffff, #e9e7dd 58%, #9d988b 100%);
  border-color: #817b70;
  color: #37342d;
  font-size: 10px;
}
.coinSaverCoin.quarter {
  width: 42px;
  height: 42px;
  background: radial-gradient(circle at 35% 30%, #ffffff, #d9d2bd 58%, #87806f 100%);
  border-color: #746c5e;
  color: #37342d;
}
.coinSaverNoCoins {
  color: #687487;
  font-size: 13px;
  font-weight: 850;
  font-style: italic;
}
.coinSaverReceiptVoice {
  margin-top: 8px;
  min-height: 36px;
  padding: 7px 12px;
  border-radius: 10px;
  border: 3px solid #79f3ff;
  background: #143846;
  color: #e8feff;
  font-size: 14px;
  font-weight: 950;
}
.coinSaverEquation,
.coinSaverAddition {
  margin-top: 8px;
  padding: 9px 11px;
  border-radius: 10px;
  background: #dff7ff;
  color: #233866;
  font-size: clamp(15px, 1.6vw, 19px);
  font-weight: 950;
}
.coinSaverAddition {
  background: #e8ffe2;
}
#brainBridgePanel[data-scene="coin-saver"] #coinSaverSheet {
  margin-top: 7px;
  padding: 8px;
}
#brainBridgePanel[data-scene="coin-saver"] .coinSaverCoinRows {
  gap: 6px;
  margin-top: 7px;
}
#brainBridgePanel[data-scene="coin-saver"] .coinSaverCoinRow {
  min-height: 46px;
  padding: 6px;
  gap: 8px;
}
#brainBridgePanel[data-scene="coin-saver"] .coinSaverCoin {
  width: 28px;
  height: 28px;
  border-width: 2px;
  font-size: 11px;
}
#brainBridgePanel[data-scene="coin-saver"] .coinSaverCoin.nickel {
  width: 32px;
  height: 32px;
}
#brainBridgePanel[data-scene="coin-saver"] .coinSaverCoin.dime {
  width: 25px;
  height: 25px;
  font-size: 10px;
}
#brainBridgePanel[data-scene="coin-saver"] .coinSaverCoin.quarter {
  width: 35px;
  height: 35px;
}
#brainBridgePanel[data-scene="coin-saver"] .coinSaverReceiptVoice {
  min-height: 32px;
  padding: 5px 10px;
  font-size: 13px;
}
#brainBridgePanel[data-scene="coin-saver"] .coinSaverEquation,
#brainBridgePanel[data-scene="coin-saver"] .coinSaverAddition {
  margin-top: 5px;
  padding: 5px 8px;
  font-size: 13px;
}
#brainBridgeResult {
  min-height: 20px;
  margin-top: 10px;
  color: #dcefdc;
  font-size: 14px;
}
#brainBridgeResult strong {
  color: #ffd36b;
}
.learningRewardBurst {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  max-width: 560px;
  min-height: 92px;
  margin: 12px auto 4px;
  padding: 14px 16px;
  box-sizing: border-box;
  border: 2px solid rgba(255, 211, 107, 0.72);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(10, 51, 46, 0.94), rgba(56, 31, 78, 0.92)),
    #123b3a;
  color: #fff8d9;
  text-align: center;
  box-shadow:
    0 12px 28px rgba(0, 0, 0, 0.26),
    inset 0 0 0 1px rgba(255, 255, 255, 0.16);
}
.learningRewardCopy {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 4px;
}
.learningRewardKicker {
  color: #8dfcff;
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0;
  text-transform: uppercase;
}
.learningRewardTitle {
  color: #ffd36b;
  font-size: 22px;
  font-weight: 950;
  line-height: 1.08;
}
.learningRewardBody {
  color: #f8ffef;
  font-size: 14px;
  font-weight: 850;
  line-height: 1.28;
}
.learningRewardSparks {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}
.learningRewardSparks span {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: hsl(var(--hue) 94% 68%);
  box-shadow: 0 0 10px hsl(var(--hue) 94% 68% / 0.75);
  animation: learningRewardFirework 940ms ease-out var(--delay) both;
}
body.high-contrast .learningRewardBurst {
  border-color: #ffffff;
  background: #000000;
  color: #ffffff;
  box-shadow: none;
}
@keyframes learningRewardFirework {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.35);
  }
  14% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate(calc(-50% + var(--x)), calc(-50% + var(--y))) scale(0.08);
  }
}
@media (prefers-reduced-motion: reduce) {
  .learningRewardSparks span {
    opacity: 0.8;
    animation: none;
    transform: translate(calc(-50% + var(--x)), calc(-50% + var(--y))) scale(0.82);
  }
}
.storyVideoPanel {
  width: min(620px, 100%);
  margin: 12px auto 4px;
  padding: 12px;
  box-sizing: border-box;
  display: grid;
  gap: 10px;
  border: 2px solid rgba(141, 252, 255, 0.62);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(8, 38, 47, 0.94), rgba(8, 22, 28, 0.95)),
    #0a2530;
  color: #f8ffef;
  text-align: left;
  box-shadow:
    0 12px 28px rgba(0, 0, 0, 0.28),
    inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}
.storyVideoCopy {
  display: grid;
  gap: 3px;
}
.storyVideoKicker {
  color: #8dfcff;
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0;
  text-transform: uppercase;
}
.storyVideoTitle {
  color: #ffd36b;
  font-size: 21px;
  font-weight: 950;
  line-height: 1.08;
}
.storyVideoCue {
  color: #f8ffef;
  font-size: 14px;
  font-weight: 850;
  line-height: 1.3;
}
.storyVideoFrame {
  overflow: hidden;
  border-radius: 8px;
  background: #051118;
}
.storyVideoFrame video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}
.storyVideoActions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
#over .storyVideoPlay {
  margin: 0;
  min-height: 46px;
  padding: 9px 14px;
  border: 2px solid rgba(255, 211, 107, 0.7);
  border-radius: 8px;
  background: #ffd36b;
  color: #10130d;
  font-size: 15px;
  font-weight: 950;
  box-shadow: none;
}
#over .storyVideoPlay:disabled {
  opacity: 0.7;
  cursor: default;
}
.storyVideoStatus {
  min-height: 18px;
  color: #8dfcff;
  font-size: 13px;
  font-weight: 850;
}
body.high-contrast .storyVideoPanel {
  border-color: #ffffff;
  background: #000000;
  color: #ffffff;
  box-shadow: none;
}
body.high-contrast .storyVideoKicker,
body.high-contrast .storyVideoTitle,
body.high-contrast .storyVideoStatus {
  color: #ffff00;
}
#brainBridgeCoachCard {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr) minmax(180px, 300px);
  gap: 12px;
  align-items: stretch;
  margin-top: 10px;
}
#brainBridgeCoachCharacter {
  width: 132px;
  height: 142px;
  box-sizing: border-box;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background-color: transparent;
  background-repeat: no-repeat;
  background-size: contain;
  background-position: center bottom;
  filter: drop-shadow(0 18px 18px rgba(0, 0, 0, 0.42));
  animation: mindBridgeGuideIn 360ms cubic-bezier(0.16, 1, 0.3, 1) both,
    mindBridgeGuideFloat 2600ms ease-in-out 360ms infinite;
}
#brainBridgePanel[data-helper="croc"] #brainBridgeCoachCharacter {
  background-image: url("../../assets/brain_bridge_mascot_spritesheet_v4.png");
  background-size: 400% 300%;
  background-position: 0% 0%;
}
#brainBridgePanel[data-helper="firefly"] #brainBridgeCoachCharacter {
  background-image: url("../../assets/helper_firefly_ready.png");
}
#brainBridgePanel[data-helper="monkey"] #brainBridgeCoachCharacter {
  background-image: url("../../assets/helper_monkey_ready.png");
}
#over #brainBridgeBubble {
  position: relative;
  min-height: 104px;
  margin: 0;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  border: 2px solid rgba(141, 252, 255, 0.46);
  border-radius: 8px;
  background: #f7fbff;
  color: #17232a;
  font-size: 16px;
  font-weight: 850;
  line-height: 1.18;
  text-align: left;
  box-shadow:
    0 14px 28px rgba(0, 0, 0, 0.2),
    inset 0 0 0 2px rgba(255, 255, 255, 0.8);
}
#over #brainBridgeBubble::before {
  content: "";
  position: absolute;
  left: -11px;
  top: 28px;
  border-width: 8px 11px 8px 0;
  border-style: solid;
  border-color: transparent rgba(141, 252, 255, 0.46) transparent transparent;
}
#over #brainBridgeBubble::after {
  content: "";
  position: absolute;
  left: -8px;
  top: 30px;
  border-width: 6px 8px 6px 0;
  border-style: solid;
  border-color: transparent #f7fbff transparent transparent;
}
#brainBridgeGrowth {
  height: 12px;
  margin-top: 10px;
  overflow: hidden;
  border: 1px solid rgba(255, 211, 107, 0.48);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
}
#brainBridgeGrowth span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #8dfcff, #ffd36b, #a8ff90);
  transition: width 260ms ease;
}
#brainBridgeVoiceStatus {
  margin-top: 8px;
  padding: 8px 10px;
  border-radius: 7px;
  background: rgba(141, 252, 255, 0.09);
  color: #8dfcff;
  font-size: 14px;
  font-weight: 800;
  text-align: right;
}
#brainBridgeVoiceControls {
  display: flex;
  justify-content: flex-end;
  margin-top: 10px;
}
#over #brainBridgeVoiceControls button {
  min-height: 44px;
  margin: 0;
  padding: 8px 13px;
  border: 2px solid rgba(141, 252, 255, 0.58);
  border-radius: 8px;
  background: rgba(8, 18, 24, 0.72);
  color: #dffcff;
  font-size: 14px;
  font-weight: 900;
  box-shadow: none;
}
#over #brainBridgeVoiceControls button:disabled {
  opacity: 0.48;
  cursor: not-allowed;
}
#brainBridgeActions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  align-self: stretch;
  margin-top: 0;
}
#over #brainBridgeActions button {
  min-height: 0;
  margin: 0;
  padding: 9px 11px;
  font-size: 14px;
  text-align: center;
  box-shadow: none;
}
#over #brainBridgeActions button.primary {
  border-color: rgba(255, 211, 107, 0.9);
  background: #ffd36b;
  color: #17232a;
}
#over #brainBridgeActions button.secondary {
  border-color: rgba(141, 252, 255, 0.58);
  background: rgba(8, 18, 24, 0.72);
  color: #dffcff;
}
@media (max-width: 700px) {
  #over:has(#brainBridgePanel.show) > div {
    width: 100%;
    padding: 6px 6px max(14px, env(safe-area-inset-bottom));
  }
  #brainBridgePanel {
    width: min(430px, calc(100vw - 18px));
    max-height: calc(100svh - 12px);
    padding: 10px;
  }
  #brainBridgeOutcome {
    margin: 6px 0;
    padding: 7px 9px;
    font-size: 15px;
  }
  #brainBridgePrompt {
    min-height: 62px;
    margin-top: 6px;
    padding: 22px 12px 10px 68px;
    border-radius: 16px;
    font-size: clamp(18px, 5vw, 24px);
  }
  #brainBridgePrompt::before {
    left: 13px;
    width: 40px;
    height: 40px;
    background-size: 36px auto;
  }
  #brainBridgePrompt::after {
    left: 68px;
    top: 8px;
  }
  #brainBridgeChoices {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  #brainBridgeCoachCard {
    grid-template-columns: 96px minmax(0, 1fr);
  }
  #brainBridgeCoachCharacter {
    width: 96px;
    height: 104px;
  }
  #over #brainBridgeBubble {
    min-height: 100px;
    padding: 12px;
    font-size: 15px;
  }
  #brainBridgeChoices {
    grid-template-columns: 1fr;
  }
  #brainBridgeActions {
    grid-template-columns: 1fr;
    gap: 6px;
    grid-column: 1 / -1;
    margin-top: 0;
  }
  #brainBridgeVoiceControls {
    justify-content: stretch;
  }
  #over #brainBridgeVoiceControls button {
    width: 100%;
  }
  #over #brainBridgeActions button {
    min-height: 44px;
    padding: 8px 10px;
    font-size: 14px;
  }
  #over:has(#brainBridgePanel.show) > div {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    padding-bottom: max(18px, env(safe-area-inset-bottom));
  }
  #over:has(#brainBridgePanel.show) #retryRaftTip {
    order: 1;
    margin-bottom: 0;
  }
  #over:has(#brainBridgePanel.show) #brainBridgePanel {
    order: 4;
    max-height: none;
  }
  #brainBridgeVoiceStatus {
    text-align: left;
    padding: 6px 8px;
    font-size: 13px;
  }
  .brainBridgeGeneratedCardArt,
  .brainBridgeStoryStrip:not(.hasGeneratedArt) {
    border-radius: 10px;
  }
  .coinSaverCoinRow {
    grid-template-columns: 1fr;
    gap: 6px;
  }
  .coinSaverCoinLabel {
    font-size: 14px;
  }
  .coinSaverCoinPile {
    gap: 4px;
  }
}
@media (min-width: 701px) and (max-height: 860px) {
  #over:has(#brainBridgePanel.show) > div {
    width: min(1060px, calc(100vw - 18px));
    padding-top: 6px;
    padding-bottom: max(16px, env(safe-area-inset-bottom));
  }
  #brainBridgePanel {
    width: min(1000px, calc(100vw - 18px));
    max-height: calc(100svh - 12px);
    padding: 10px 10px 14px;
    font-size: 14px;
  }
  #brainBridgeKicker {
    font-size: 10px;
  }
  #brainBridgeTitle {
    font-size: 15px;
  }
  #brainBridgeOutcome {
    margin: 6px 0 6px;
    padding: 7px 10px;
    font-size: 15px;
  }
  #brainBridgePrompt {
    min-height: 58px;
    margin-top: 7px;
    padding: 20px 14px 10px 70px;
    border-radius: 16px;
    font-size: clamp(19px, 1.9vw, 25px);
    box-shadow: 0 5px 0 rgba(18, 57, 124, 0.28);
  }
  #brainBridgePrompt::before {
    left: 14px;
    width: 40px;
    height: 40px;
    background-size: 36px auto;
    background-position: center 6px;
  }
  #brainBridgePrompt::after {
    left: 70px;
    top: 9px;
    font-size: 10px;
  }
  #brainBridgeVoiceControls {
    margin-top: 7px;
  }
  #brainBridgeVoiceStatus {
    margin-top: 6px;
    padding: 6px 8px;
    font-size: 13px;
  }
  #brainBridgeActions {
    gap: 7px;
    margin-top: 7px;
  }
  #over #brainBridgeActions button {
    min-height: 44px;
    padding: 8px 10px;
    font-size: 14px;
  }
  #brainBridgeChoices {
    gap: 9px;
    margin-top: 8px;
  }
  #over #brainBridgeChoices button {
    padding: 8px 10px 10px;
    border-left-width: 6px;
    border-radius: 14px;
    box-shadow: 0 4px 0 rgba(18, 57, 124, 0.24);
  }
  .brainBridgeChoiceHeader {
    font-size: 14px;
  }
  .brainBridgeStoryStrip {
    margin-top: 7px;
  }
  .brainBridgeGeneratedCardArt {
    border-radius: 10px;
  }
}
@media (min-width: 701px) and (max-height: 720px) {
  #over:has(#brainBridgePanel.show) > div {
    width: min(940px, calc(100vw - 14px));
    padding-top: 4px;
  }
  #brainBridgePanel {
    width: min(900px, calc(100vw - 14px));
    max-height: calc(100svh - 8px);
    padding: 8px;
  }
  #brainBridgeOutcome {
    margin: 4px 0;
    padding: 6px 9px;
  }
  #brainBridgePrompt {
    min-height: 60px;
    margin-top: 5px;
    padding: 21px 12px 10px 68px;
    font-size: clamp(18px, 1.8vw, 24px);
  }
  #brainBridgePrompt::before {
    left: 13px;
    width: 40px;
    height: 40px;
    background-size: 36px auto;
  }
  #brainBridgePrompt::after {
    left: 68px;
    top: 8px;
  }
  #brainBridgeVoiceControls,
  #brainBridgeVoiceStatus,
  #brainBridgeActions,
  #brainBridgeChoices {
    margin-top: 5px;
  }
  #over #brainBridgeVoiceControls button,
  #over #brainBridgeActions button {
    min-height: 44px;
    padding: 7px 9px;
    font-size: 13px;
  }
  #brainBridgeChoices {
    gap: 7px;
  }
  .brainBridgeChoiceHeader {
    font-size: 13px;
  }
  .brainBridgeStoryStrip {
    margin-top: 5px;
  }
}
#learningBridgePanel {
  display: none;
  width: min(620px, calc(100vw - 40px));
  margin: 14px auto 0;
  padding: 14px;
  border: 1px solid rgba(141, 252, 255, 0.34);
  border-radius: 8px;
  background: rgba(6, 14, 18, 0.88);
  color: #edf7ed;
  text-align: left;
  font-size: 15px;
  line-height: 1.35;
}
#learningBridgePanel.show {
  display: grid;
  gap: 8px;
}
#learningBridgePanel.compact {
  width: min(1040px, 100%);
  margin: 0 auto;
  padding: 0;
  text-align: left;
  gap: 18px;
  background: transparent;
  color: #fff8d9;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  touch-action: pan-y;
}
#learningBridgePanel.mindBridgePage #learningBridgeAsk,
#learningBridgePanel.mindBridgePage #learningBridgeTry,
#learningBridgePanel.mindBridgePage #learningBridgeBuild,
#learningBridgePanel.mindBridgePage #learningBridgeNotice,
#learningBridgePanel.mindBridgePage #learningBridgeAction {
  display: none !important;
}
#learningBridgePanel.compact #learningBridgeKicker {
  font-size: 12px;
  color: #8dfcff;
  letter-spacing: 0;
}
#learningBridgePanel.compact #learningBridgeTitle {
  font-size: clamp(30px, 5vw, 58px);
  color: #fff7ce;
  line-height: 1;
  font-family: Impact, "Arial Black", system-ui, sans-serif;
  text-shadow:
    0 0 22px rgba(255, 211, 107, 0.24),
    0 6px 0 rgba(0, 0, 0, 0.7);
}
#learningBridgePanel.compact .learningBridgeRow {
  padding: 0;
  background: transparent;
}
#learningBridgePanel.compact #learningBridgeAsk {
  display: none;
}
#learningBridgePanel.compact #learningBridgeTry,
#learningBridgePanel.compact #learningBridgeBuild,
#learningBridgePanel.compact #learningBridgeNotice,
#learningBridgePanel.compact #learningBridgeAction {
  display: none;
}
#learningBridgeMiniGame {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  width: min(260px, 100%);
  justify-self: end;
  margin-top: 0;
}
#learningBridgeCoachCard {
  display: grid;
  grid-template-columns: minmax(210px, 0.42fr) minmax(0, 1fr);
  gap: clamp(18px, 4vw, 44px);
  align-items: end;
}
#learningBridgeCoachCharacter {
  width: min(320px, 32vw);
  height: min(520px, 58vh);
  min-height: 300px;
  border-radius: 0;
  background-repeat: no-repeat;
  background-size: contain;
  background-position: center bottom;
  background-color: transparent;
  border: 0;
  filter: drop-shadow(0 28px 28px rgba(0, 0, 0, 0.52));
  animation: mindBridgeGuideIn 420ms cubic-bezier(0.16, 1, 0.3, 1) both,
    mindBridgeGuideFloat 2600ms ease-in-out 420ms infinite;
}
#learningBridgePanel[data-helper="croc"] #learningBridgeCoachCharacter {
  background-image: url("../../assets/helper_croc_ready.png");
}
#learningBridgePanel[data-helper="firefly"] #learningBridgeCoachCharacter {
  background-image: url("../../assets/helper_firefly_ready.png");
}
#learningBridgePanel[data-helper="monkey"] #learningBridgeCoachCharacter {
  background-image: url("../../assets/helper_monkey_ready.png");
}
#learningBridgeBubble {
  position: relative;
  min-height: 250px;
  margin: 0;
  padding: clamp(24px, 3vw, 38px);
  display: flex;
  align-items: center;
  border: 3px solid rgba(47, 111, 143, 0.36);
  border-radius: 18px;
  background:
    linear-gradient(180deg, #ffffff, #f3fbff);
  color: #17232a;
  font-size: clamp(24px, 3.2vw, 42px);
  font-weight: 850;
  line-height: 1.16;
  text-align: left;
  box-shadow:
    0 16px 30px rgba(47, 111, 143, 0.14),
    inset 0 0 0 2px rgba(255, 255, 255, 0.86);
  animation: mindBridgeBubbleIn 360ms cubic-bezier(0.16, 1, 0.3, 1) both;
}
@keyframes mindBridgeGuideIn {
  from {
    opacity: 0;
    transform: translateX(-34px) scale(0.94);
  }
  to {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}
@keyframes mindBridgeGuideFloat {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}
@keyframes brainBridgeMascotIdle {
  from {
    background-position: 0% var(--brain-bridge-sprite-row);
  }
  to {
    background-position: 100% var(--brain-bridge-sprite-row);
  }
}
@keyframes mindBridgeBubbleIn {
  from {
    opacity: 0;
    transform: translateX(24px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}
#learningBridgeBubble::before {
  content: "";
  position: absolute;
  left: -13px;
  top: 34px;
  border-width: 9px 13px 9px 0;
  border-style: solid;
  border-color: transparent rgba(47, 111, 143, 0.34) transparent transparent;
}
#learningBridgeBubble::after {
  content: "";
  position: absolute;
  left: -9px;
  top: 36px;
  border-width: 7px 10px 7px 0;
  border-style: solid;
  border-color: transparent #f7fbff transparent transparent;
}
#learningBridgeStepTrack {
  display: flex;
  gap: 7px;
  align-items: center;
  justify-content: flex-end;
  min-height: 14px;
}
.learningBridgeStepDot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  border: 2px solid rgba(47, 111, 143, 0.38);
  background: #ffffff;
}
.learningBridgeStepDot.active {
  background: #ffd36b;
  border-color: #8b5d00;
  box-shadow: 0 0 0 3px rgba(255, 211, 107, 0.22);
}
#over #learningBridgeMiniGame button {
  min-height: 52px;
  margin: 0;
  padding: 10px 14px;
  border-color: rgba(255, 211, 107, 0.58);
  border-radius: 8px;
  background: rgba(255, 211, 107, 0.16);
  color: #17232a;
  font-size: 16px;
  font-weight: 900;
  box-shadow: none;
}
#over #learningBridgeMiniGame button.current {
  background: rgba(141, 252, 255, 0.22);
  border-color: rgba(141, 252, 255, 0.8);
}
#over #learningBridgeMiniGame button.done {
  background: rgba(168, 255, 144, 0.24);
  border-color: rgba(168, 255, 144, 0.86);
}
#over #learningBridgeMiniGame button.wrong {
  background: rgba(255, 195, 168, 0.26);
  border-color: rgba(255, 195, 168, 0.86);
}
#learningBridgeMiniStatus {
  min-height: 18px;
  color: #dffcff;
  font-size: 14px;
  font-weight: 900;
  text-align: right;
}
#learningBridgeVoiceLine {
  color: rgba(244, 241, 232, 0.78);
  font-size: 14px;
  font-weight: 800;
  text-align: right;
}
#learningBridgeExitActions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
#over #learningBridgeExitActions button {
  margin: 0;
  min-height: 58px;
  border-radius: 8px;
  border: 2px solid rgba(255, 211, 107, 0.7);
  background: rgba(255, 211, 107, 0.9);
  color: #10130d;
  font-size: 17px;
  font-weight: 900;
}
#over #learningBridgeExitActions button.moveOn {
  border-color: rgba(141, 252, 255, 0.76);
  background: rgba(5, 28, 32, 0.86);
  color: #dffcff;
}
@media (max-width: 700px) {
  #learningBridgeCoachCard {
    grid-template-columns: 1fr;
  }
  #learningBridgeCoachCharacter {
    width: 190px;
    height: 250px;
    min-height: 0;
    margin: 0 auto -8px;
  }
  #learningBridgeBubble {
    min-height: 180px;
    font-size: 20px;
  }
  #learningBridgeBubble::before,
  #learningBridgeBubble::after {
    display: none;
  }
  #learningBridgeExitActions {
    grid-template-columns: 1fr;
  }
}
#learningBridgeKicker {
  color: #8dfcff;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}
#learningBridgeTitle {
  color: #ffd36b;
  font-size: 19px;
  font-weight: 900;
}
.learningBridgeRow {
  padding: 8px 10px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.07);
}
.learningBridgeRow b {
  color: #8dfcff;
}
#learningBridgeBuild {
  border: 1px solid rgba(255, 211, 107, 0.24);
  background: rgba(255, 211, 107, 0.1);
}
#learningBridgeAction {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 7px;
  background: rgba(141, 252, 255, 0.09);
}
#learningBridgeActionButtons {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
#over #learningBridgeDoneBtn,
#over #learningBridgeVoiceBtn {
  margin: 0;
  min-height: 44px;
  padding: 9px 12px;
  font-size: 15px;
  box-shadow: none;
}
#over #learningBridgeVoiceBtn {
  background: #8dfcff;
  border-color: #8dfcff;
  color: #10130d;
}
#learningBridgeDoneStatus,
#learningBridgeVoiceStatus {
  color: #8dfcff;
  font-size: 14px;
  font-weight: 800;
}
#patternPainterPanel {
  display: none;
  width: min(620px, calc(100vw - 40px));
  margin: 14px auto 0;
  padding: 14px;
  border: 1px solid rgba(255, 211, 107, 0.4);
  border-radius: 8px;
  background: rgba(12, 20, 16, 0.88);
  color: #edf7ed;
  text-align: left;
  font-size: 15px;
}
#patternPainterPanel.show {
  display: block;
}
#patternPainterTitle {
  color: #ffd36b;
  font-size: 19px;
  font-weight: 900;
}
#patternPainterSlots,
#patternPainterStamps {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}
#patternPainterSlots button,
#patternPainterStamps button {
  min-width: 58px;
  min-height: 48px;
  margin: 0;
  padding: 8px 10px;
  border: 2px solid rgba(255, 211, 107, 0.42);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  font-size: 16px;
  font-weight: 900;
  box-shadow: none;
}
#patternPainterSlots button.good {
  border-color: #a8ff90;
  background: rgba(168, 255, 144, 0.18);
}
#patternPainterResult {
  min-height: 22px;
  margin-top: 9px;
  color: #8dfcff;
  font-weight: 800;
}
@media (max-width: 620px) {
  #brainBridgeChoices {
    grid-template-columns: 1fr;
  }
  #brainBridgePanel {
    font-size: 14px;
  }
}
@media (max-width: 420px), (max-height: 560px) {
  #brainBridgePanel {
    width: calc(100vw - 10px);
    max-height: calc(100svh - 8px);
    padding: 8px;
  }
  #brainBridgeKicker,
  #brainBridgeTitle {
    font-size: 13px;
  }
  #brainBridgePrompt {
    min-height: 54px;
    padding: 19px 10px 9px 58px;
    font-size: clamp(16px, 4.8vw, 20px);
  }
  #brainBridgePrompt::before {
    left: 10px;
    width: 34px;
    height: 34px;
    background-size: 31px auto;
  }
  #brainBridgePrompt::after {
    left: 58px;
    top: 7px;
    font-size: 9px;
  }
  .brainBridgeChoiceHeader {
    font-size: 13px;
  }
  .brainBridgeStoryStrip {
    margin-top: 5px;
  }
  #coinSaverSheet {
    padding: 8px;
  }
  .coinSaverSheetTitle {
    font-size: 19px;
  }
  .coinSaverEquation,
  .coinSaverAddition {
    font-size: 13px;
  }
}
#over button:hover,
#start button:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.34);
}
#over button:active,
#start button:active {
  transform: translateY(0) scale(0.98);
}
#over button:focus-visible,
#start button:focus-visible {
  outline: 3px solid rgba(141, 252, 255, 0.85);
  outline-offset: 2px;
}
#start {
  position: fixed;
  inset: 0;
  display: none;
  place-items: start center;
  overflow: auto;
  box-sizing: border-box;
  padding: 16px;
  background: rgba(0, 0, 0, 0.78);
  text-align: center;
  color: #e8efe6;
  z-index: 10;
}
body.high-contrast #start {
  background: #000000;
  color: #ffffff;
}
#start.show {
  display: grid;
}
#startPanel {
  width: min(1040px, 100%);
  text-align: left;
  display: grid;
  grid-template-columns: minmax(250px, 0.75fr) minmax(360px, 1.25fr);
  gap: 28px;
  align-items: start;
}
#startPanel h1 {
  margin: 0 0 8px;
  font-size: 56px;
  line-height: 1;
  letter-spacing: 0;
}
#startPanel .subtitle {
  font-size: 17px;
  line-height: 1.45;
  opacity: 0.82;
  max-width: 340px;
}
#startPanel #inputHint {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  font-size: 13px;
  line-height: 1.6;
  color: #dfe8df;
  overflow-wrap: anywhere;
}
#menuGrid {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px;
  max-height: min(82vh, 680px);
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: rgba(5, 8, 10, 0.54);
}
#menuGrid::before {
  content: "Level Select";
  display: block;
  margin: 0 0 4px;
  font-size: 12px;
  text-transform: uppercase;
  color: #ffd36b;
  font-weight: 800;
}
#start button.menuTile {
  position: relative;
  margin: 0;
  min-height: 48px;
  padding: 9px 12px;
  display: grid;
  grid-template-columns: 86px 1fr;
  align-items: center;
  gap: 10px;
  text-align: left;
  background: rgba(255, 255, 255, 0.08);
  color: #e8efe6;
  border: 1px solid rgba(255, 255, 255, 0.18);
  transition:
    background 0.16s,
    transform 0.16s,
    border-color 0.16s;
}
#start button.menuTile:hover {
  background: rgba(255, 211, 107, 0.14);
  border-color: rgba(255, 211, 107, 0.7);
  transform: translateY(-1px);
}
#start button.menuTile.primary {
  min-height: 62px;
  background: #ffd36b;
  color: #10130d;
  border-color: #ffd36b;
}
#start button.menuTile .tileTitle {
  display: block;
  font-weight: 800;
  font-size: 16px;
}
#start button.menuTile .tileMeta {
  display: block;
  font-size: 12px;
  opacity: 0.74;
}
#start button.menuTile.secondary {
  background: rgba(255, 255, 255, 0.08);
}
#start button.menuTile.utility {
  grid-template-columns: 1fr;
  min-height: 42px;
  background: rgba(90, 180, 122, 0.18);
  border-color: rgba(90, 180, 122, 0.36);
}
#start button.menuTile.newLevel {
  border-color: rgba(141, 252, 255, 0.48);
  background:
    linear-gradient(
      90deg,
      rgba(141, 252, 255, 0.12),
      rgba(255, 211, 107, 0.08)
    ),
    rgba(255, 255, 255, 0.08);
}
#start button.menuTile.newLevel .tileMeta::after {
  content: " · new";
  color: #8dfcff;
  font-weight: 800;
}
#utilityRow {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 6px;
}
#bestSnippet {
  margin-top: 12px;
  font-size: 13px;
  opacity: 0.72;
}
#bridgeSnippet {
  padding: 9px 12px;
  border: 1px solid rgba(141, 252, 255, 0.32);
  border-radius: 8px;
  background: rgba(141, 252, 255, 0.1);
  color: #dffcff;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
  cursor: pointer;
  user-select: none;
}
#bridgeSnippet[aria-expanded="true"] {
  border-color: rgba(255, 211, 107, 0.54);
  background: rgba(255, 211, 107, 0.1);
  color: #fff7ce;
}
#sprintSnippet {
  margin-top: 10px;
  padding: 8px 10px;
  border: 1px solid rgba(141, 252, 255, 0.28);
  border-radius: 8px;
  color: #dffcff;
  background: rgba(141, 252, 255, 0.08);
  font-size: 12px;
  line-height: 1.35;
}
#start {
  place-items: start center;
  padding: 14px;
  background:
    radial-gradient(
      circle at 50% 4%,
      rgba(255, 211, 107, 0.22),
      transparent 36%
    ),
    rgba(0, 0, 0, 0.78);
}
#startPanel {
  width: min(1240px, 100%);
  grid-template-columns: 1fr;
  gap: 12px;
}
#menuIntro {
  display: grid;
  grid-template-columns: minmax(220px, auto) minmax(250px, 1fr) auto;
  gap: 16px;
  align-items: center;
  color: #fff8d9;
}
#startPanel h1 {
  margin: 0;
  font-size: clamp(38px, 5vw, 64px);
  text-shadow: 0 4px 14px rgba(0, 0, 0, 0.58);
}
#startPanel .subtitle {
  max-width: 520px;
  font-size: 16px;
  opacity: 0.9;
}
#startPanel #inputHint {
  margin-top: 0;
  padding: 9px 12px;
  border: 1px solid rgba(255, 211, 107, 0.28);
  border-radius: 8px;
  background: rgba(4, 10, 8, 0.48);
  font-size: 12px;
}
#sprintSnippet {
  display: none;
}
#bestSnippet {
  display: none;
}
#bridgeSnippet {
  max-width: 220px;
}
#menuGrid {
  position: relative;
  width: 100%;
  max-height: none;
  aspect-ratio: 16 / 9;
  padding: 0;
  overflow: hidden;
  border: 4px solid rgba(255, 232, 166, 0.72);
  border-radius: 8px;
  background:
    linear-gradient(rgba(14, 21, 13, 0.02), rgba(14, 21, 13, 0.08)),
    url("../../assets/ui/level-adventure-map-monster-truck.png") center /
      cover no-repeat;
  background:
    linear-gradient(rgba(14, 21, 13, 0.02), rgba(14, 21, 13, 0.08)),
    url("../../assets/ui/level-adventure-map-monster-truck.png")
      center / cover no-repeat;
  box-shadow:
    0 24px 56px rgba(0, 0, 0, 0.38),
    inset 0 0 0 1px rgba(95, 54, 21, 0.35);
}
body.high-contrast #menuGrid {
  border-color: #ffffff;
  background:
    linear-gradient(rgba(0, 0, 0, 0.16), rgba(0, 0, 0, 0.22)),
    url("../../assets/ui/level-adventure-map-monster-truck.png")
      center / cover no-repeat;
  filter: contrast(1.25) saturate(0.85);
  box-shadow: none;
}
#menuGrid::before {
  content: "Game Center";
  position: absolute;
  left: 16px;
  top: 14px;
  z-index: 4;
  pointer-events: none;
  margin: 0;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(55, 31, 14, 0.72);
  color: #fff3b8;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0;
  font-weight: 900;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.24);
}
#menuGrid::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  box-shadow:
    inset 0 0 44px rgba(50, 25, 5, 0.18),
    inset 0 -70px 70px rgba(49, 30, 11, 0.12);
}
#mapBackBtn {
  position: absolute;
  right: 16px;
  bottom: 16px;
  z-index: 5;
  min-width: 92px;
  min-height: 46px;
  padding: 8px 14px;
  border: 2px solid rgba(255, 232, 166, 0.78);
  border-radius: 8px;
  background: rgba(7, 52, 49, 0.9);
  color: #fff8d9;
  font-size: 15px;
  font-weight: 950;
  box-shadow: 0 10px 18px rgba(35, 20, 8, 0.28);
}
body.high-contrast #mapBackBtn {
  border-color: #ffffff;
  background: #000000;
  color: #ffffff;
  box-shadow: none;
}
#start button.menuTile {
  position: absolute;
  z-index: 3;
  width: 58px;
  height: 58px;
  min-height: 58px;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #fff8d9;
  text-align: center;
  box-shadow: none;
  transform: translate(-50%, -50%);
}
#start button.menuTile::after {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #fff8d9;
  box-shadow:
    0 0 0 3px rgba(91, 49, 18, 0.72),
    0 5px 9px rgba(35, 20, 8, 0.32);
}
#start button.menuTile.hasTileThumb {
  width: 78px;
  height: 62px;
  min-height: 62px;
}
#start button.menuTile.hasTileThumb::after {
  display: none;
}
#start button.menuTile .tileThumb {
  width: 74px;
  height: 46px;
  display: block;
  object-fit: cover;
  border: 2px solid rgba(255, 232, 166, 0.92);
  border-radius: 8px;
  background: #16321f;
  box-shadow:
    0 8px 14px rgba(35, 20, 8, 0.32),
    inset 0 0 0 1px rgba(255, 255, 255, 0.22);
}
#start button.menuTile:hover,
#start button.menuTile:focus-visible {
  background: transparent;
  border-color: transparent;
  outline: 0;
  transform: translate(-50%, -56%) scale(1.05);
}
#start button.menuTile > .tileTitle {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  padding: 0 4px;
  border-radius: 50%;
  border: 3px solid rgba(88, 48, 18, 0.82);
  background-color: #fff3b8;
  background: radial-gradient(
    circle at 38% 26%,
    #ffffff 0 18%,
    #ffe892 42%,
    #f4a72f 100%
  );
  color: #2c1d0e;
  box-sizing: border-box;
  font-size: clamp(9px, 0.9vw, 12px);
  font-weight: 900;
  line-height: 0.95;
  box-shadow:
    0 7px 14px rgba(43, 24, 9, 0.34),
    inset 0 0 0 2px rgba(255, 255, 255, 0.38);
}
#start button.menuTile.hasTileThumb > .tileTitle {
  position: absolute;
  left: 50%;
  top: -11px;
  z-index: 9;
  width: auto;
  min-width: 34px;
  height: auto;
  min-height: 18px;
  padding: 3px 6px;
  border-width: 2px;
  border-radius: 999px;
  font-size: 9px;
  line-height: 1;
}
#start button.menuTile:hover > .tileTitle,
#start button.menuTile:focus-visible > .tileTitle {
  border-color: rgba(255, 255, 255, 0.94);
  box-shadow:
    0 0 0 5px rgba(255, 211, 107, 0.42),
    0 12px 20px rgba(43, 24, 9, 0.36),
    inset 0 0 0 2px rgba(255, 255, 255, 0.48);
}
#start button.menuTile > span:not(.tileTitle) {
  position: absolute;
  left: 50%;
  top: calc(100% - 2px);
  z-index: 8;
  max-width: 100%;
  padding: 4px 7px;
  border-radius: 999px;
  background: #2b190a;
  color: #fff8d9;
  box-shadow:
    0 5px 12px rgba(35, 20, 8, 0.26),
    inset 0 0 0 1px rgba(255, 232, 166, 0.28);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 2px);
  transition:
    opacity 0.12s ease,
    transform 0.12s ease;
  white-space: normal;
}
body.high-contrast #start button.menuTile > span:not(.tileTitle) {
  background: #000000;
  color: #ffffff;
  box-shadow: 0 0 0 2px #ffffff;
}
body.high-contrast #start button.menuTile > .tileTitle {
  background: #ffff00;
  color: #000000;
  border-color: #ffffff;
  box-shadow: 0 0 0 3px #000000;
}
body.high-contrast #start button.menuTile .tileThumb {
  border-color: #ffffff;
  filter: contrast(1.15) saturate(0.95);
}
body.high-contrast #start button.menuTile:focus-visible > .tileTitle,
body.high-contrast #start button.menuTile:hover > .tileTitle {
  box-shadow:
    0 0 0 4px #000000,
    0 0 0 8px #ffffff;
}
#start button.menuTile > span:not(.tileTitle) .tileTitle {
  display: block;
  margin: 0;
  color: inherit;
  font-size: clamp(10px, 0.95vw, 13px);
  line-height: 1.08;
  text-shadow: 0 2px 5px rgba(0, 0, 0, 0.38);
}
#start.map-open button.menuTile:hover > span:not(.tileTitle),
#start.map-open button.menuTile:focus-visible > span:not(.tileTitle) {
  opacity: 1;
  transform: translate(-50%, 0);
}
#start button.menuTile .tileMeta {
  display: none;
}
#start button.menuTile.primary {
  width: 64px;
  height: 64px;
  min-height: 64px;
  border-color: rgba(24, 91, 49, 0.82);
}
#start button.menuTile.primary.hasTileThumb {
  width: 82px;
  height: 66px;
  min-height: 66px;
}
#start button.menuTile.primary > .tileTitle {
  background-color: #b7ffbd;
  background: radial-gradient(
    circle at 38% 26%,
    #ffffff 0 18%,
    #b7ffbd 42%,
    #35c56a 100%
  );
  border-color: rgba(24, 91, 49, 0.82);
}
#start button.menuTile.newLevel {
  border-color: transparent;
  background: transparent;
}
#start button.menuTile.newLevel > .tileTitle {
  background-color: #bdf8ff;
  background: radial-gradient(
    circle at 38% 26%,
    #ffffff 0 18%,
    #bdf8ff 42%,
    #36c6df 100%
  );
  border-color: rgba(37, 103, 122, 0.84);
}
#start button.menuTile > .tileTitle {
  background-color: #fff3b8;
}
#start button.menuTile.primary > .tileTitle {
  background-color: #b7ffbd;
}
#start button.menuTile.newLevel > .tileTitle {
  background-color: #bdf8ff;
}
#start button.menuTile.newLevel .tileMeta::after {
  content: "";
}
#start.map-open .menuTile.mapStopLocked {
  opacity: 0.86;
}
#start.map-open .menuTile.mapStopLocked .tileThumb {
  filter: grayscale(0.18) saturate(0.92) brightness(0.9) contrast(0.98);
  border-color: rgba(255, 243, 184, 0.82);
  box-shadow:
    0 8px 14px rgba(35, 20, 8, 0.28),
    inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}
#start.map-open .menuTile.mapStopLocked > .tileTitle {
  background: radial-gradient(
    circle at 38% 26%,
    #ffffff 0 18%,
    #dbe4dc 42%,
    #7b9184 100%
  );
  color: #1d251f;
  border-color: rgba(32, 45, 38, 0.84);
}
#start.map-open .menuTile.mapStopNext .tileThumb {
  border-color: #ffd36b;
  box-shadow:
    0 0 0 3px rgba(255, 211, 107, 0.38),
    0 12px 18px rgba(35, 20, 8, 0.34);
}
#start.map-open .menuTile.mapStopLit .tileThumb {
  filter: saturate(1.08) brightness(1.04);
}
#start.map-open .menuTile.mapStopLocked .mapTrail {
  display: none;
}
#capybaraPiratesTile {
  position: absolute;
  left: 18%;
  top: 9%;
  z-index: 4;
  width: 168px;
  min-height: 46px;
  padding: 8px 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  transform: translate(-50%, -50%);
  border: 2px solid rgba(255, 232, 166, 0.78);
  border-radius: 8px;
  background: rgba(6, 54, 49, 0.86);
  color: #fff8d9;
  text-decoration: none;
  box-shadow: 0 10px 18px rgba(35, 20, 8, 0.28);
}
#capybaraPiratesTile > .tileTitle:first-child {
  flex: 0 0 auto;
  padding: 4px 6px;
  border-radius: 999px;
  background: #bdf8ff;
  color: #173018;
  font-size: 10px;
  font-weight: 900;
}
#capybaraPiratesTile > span:not(.tileTitle) {
  display: grid;
  gap: 1px;
  min-width: 0;
}
#capybaraPiratesTile > span:not(.tileTitle) .tileTitle {
  color: inherit;
  font-size: 12px;
  line-height: 1;
  font-weight: 900;
}
#capybaraPiratesTile .tileMeta {
  display: block;
  color: rgba(255, 248, 217, 0.82);
  font-size: 10px;
  line-height: 1.05;
}
/* Coordinates place each round badge over a painted map stop. */
#startBtn {
  left: 7.9%;
  top: 32.7%;
}
#skipBtn {
  left: 5%;
  top: 43%;
}
#skipCartBtn {
  left: 14.4%;
  top: 27.7%;
}
#skipRiverBtn {
  left: 19.3%;
  top: 21.3%;
}
#skipCloudBtn {
  left: 26.3%;
  top: 18.3%;
}
#skipFinalBtn {
  left: 34.1%;
  top: 16.5%;
}
#skipBananaCatchBtn {
  left: 42%;
  top: 18.4%;
}
#skipMoneyBtn {
  left: 49.5%;
  top: 21.5%;
}
#skipMoonBtn {
  left: 55.6%;
  top: 27.6%;
}
#skipPicnicBtn {
  left: 66.7%;
  top: 37.7%;
}
#skipFireflyBtn {
  left: 70.5%;
  top: 29.2%;
}
#skipHungryCrocBtn {
  left: 76.3%;
  top: 25.6%;
}
#skipShapeLagoonBtn {
  left: 84.2%;
  top: 28.6%;
}
#skipWordOrchardBtn {
  left: 88.7%;
  top: 36.9%;
}
#skipMemoryBridgeBtn {
  left: 95.6%;
  top: 48.8%;
}
#skipCompassTrailsBtn {
  left: 91.5%;
  top: 57.5%;
}
#skipEcoRapidsBtn {
  left: 81%;
  top: 61%;
}
#skipSpiderWebBtn {
  left: 74%;
  top: 48.4%;
}
#skipCrocTourBtn {
  left: 68.8%;
  top: 55.3%;
}
#skipPuzzleCoveBtn {
  left: 62%;
  top: 52.5%;
}
#skipPuzzleFallsBtn {
  left: 52.8%;
  top: 63.3%;
}
#skipPuzzleGroveBtn {
  left: 39.4%;
  top: 64.8%;
}
#skipPuzzleReefBtn {
  left: 31.8%;
  top: 72.2%;
}
#skipPuzzleTempleBtn {
  left: 24.2%;
  top: 65.8%;
}
#skipPuzzleVolcanoBtn {
  left: 28.4%;
  top: 82.5%;
}
#skipPuzzleCanopyBtn {
  left: 38.6%;
  top: 82.2%;
}
#skipPuzzleMangroveBtn {
  left: 44.4%;
  top: 70.4%;
}
#skipRaftCorridorBtn {
  left: 49.3%;
  top: 73.6%;
}
#skipBossCrocBtn {
  left: 58.4%;
  top: 78.4%;
}
#skipMonsterTruckBtn {
  left: 68.9%;
  top: 76.9%;
}
#skipCapybaraCabBtn {
  left: 79.8%;
  top: 16.6%;
}
#skipNumberTourBtn {
  left: 88.2%;
  top: 18.8%;
}
#skipCrocapultBtn {
  left: 77.6%;
  top: 67.4%;
}
#skipFloatSinkBtn {
  left: 83.8%;
  top: 73.6%;
}
#skipRampRunnerBtn {
  left: 78.4%;
  top: 85.5%;
}
#skipVineSwingerBtn {
  left: 87.2%;
  top: 84.4%;
}
#utilityRow {
  position: absolute;
  right: 14px;
  top: 14px;
  z-index: 4;
  display: flex;
  gap: 6px;
  margin: 0;
}
#utilityRow #start button,
#utilityRow button.menuTile,
#start #utilityRow button.menuTile {
  position: static;
  width: 54px;
  min-width: 54px;
  height: 54px;
  min-height: 54px;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  transform: none;
  border-color: rgba(90, 180, 122, 0.48);
  background: rgba(9, 45, 28, 0.78);
  color: #efffe8;
}
#start #utilityRow button.menuTile > .tileTitle {
  width: 40px;
  height: 40px;
  font-size: 9px;
}
#start #utilityRow button.menuTile:hover,
#start #utilityRow button.menuTile:focus-visible {
  transform: translateY(-1px);
  background: rgba(16, 68, 42, 0.9);
}
#mapActivityRow {
  position: absolute;
  left: 18px;
  bottom: 16px;
  z-index: 4;
  display: flex;
  gap: 8px;
  padding: 8px;
  border: 1px solid rgba(141, 252, 255, 0.32);
  border-radius: 8px;
  background: rgba(4, 30, 28, 0.72);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.26);
}
#start #mapActivityRow button.menuTile {
  position: static;
  width: 96px;
  min-width: 96px;
  height: 52px;
  min-height: 52px;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  transform: none;
  border-radius: 8px;
  background: rgba(7, 52, 49, 0.88);
}
#start #mapActivityRow button.menuTile > .tileTitle {
  width: auto;
  height: auto;
  padding: 0 8px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #dffcff;
  font-size: 12px;
  line-height: 1.05;
  box-shadow: none;
}
#start #mapActivityRow button.menuTile::after,
#start #mapActivityRow button.menuTile > span:not(.tileTitle) {
  display: none;
}
#start #mapActivityRow button.menuTile:hover,
#start #mapActivityRow button.menuTile:focus-visible {
  transform: translateY(-1px);
  background: rgba(12, 76, 72, 0.94);
}
#start #mapActivityRow #readingSliderResumeBtn {
  border-color: rgba(255, 211, 107, 0.82);
  background: linear-gradient(135deg, rgba(255, 211, 107, 0.28), rgba(7, 52, 49, 0.9));
}
#start #mapActivityRow #readingSliderResumeBtn > .tileTitle {
  color: #fff4a8;
}
#helperChoice {
  width: min(920px, 100%);
  margin: 0 auto;
  padding: 14px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  border: 2px solid rgba(255, 211, 107, 0.5);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(5, 21, 20, 0.94), rgba(12, 54, 38, 0.9)),
    rgba(9, 45, 28, 0.9);
  color: #efffe8;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.32);
}
#start:not(.map-open) #menuGrid {
  display: none;
}
#start.map-open {
  place-items: center;
  padding: 10px;
}
#start.map-open #startPanel {
  width: min(1240px, 100%);
  gap: 0;
  position: relative;
}
#start.map-open #menuIntro,
#start.map-open #helperChoice {
  display: none !important;
}
#start.map-open #menuGrid {
  max-height: calc(100vh - 20px);
}
#start:not(.map-open) #helperChoice {
  max-width: 760px;
  margin-top: 28px;
}
#helperChoice {
  position: relative;
  overflow: visible;
}
#helperChoice::before {
  content: "Select Your Guide";
  color: #ffd36b;
  font-family: Impact, Arial Black, sans-serif;
  font-size: 28px;
  line-height: 1;
  text-shadow: 0 3px 0 rgba(0, 0, 0, 0.72);
}
#helperChoiceTitle {
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  color: #ffd36b;
}
#helperChoiceButtons {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
#start #helperChoiceButtons button {
  min-height: 126px;
  padding: 10px 8px 8px;
  border: 2px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 36%, rgba(255, 255, 255, 0.16), transparent 35%),
    rgba(255, 255, 255, 0.1);
  color: #ffffff;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}
#start #helperChoiceButtons button::before {
  content: "";
  display: block;
  width: 92px;
  height: 132px;
  margin: 0 auto 8px;
  border: 2px solid rgba(255, 211, 107, 0.48);
  border-radius: 8px;
  background-image: url("../../assets/mind_bridge_helpers.png");
  background-repeat: no-repeat;
  background-size: 300% auto;
  background-color: transparent;
}
#start #helperChoiceButtons [data-helper="croc"]::before {
  background-position: 0% 0%;
}
#start #helperChoiceButtons [data-helper="firefly"]::before {
  background-position: 50% 0%;
}
#start #helperChoiceButtons [data-helper="monkey"]::before {
  background-position: 100% 0%;
}
#start #helperChoiceButtons button.selected {
  border-color: #ffd36b;
  background:
    linear-gradient(180deg, rgba(255, 211, 107, 0.3), rgba(80, 56, 8, 0.42)),
    rgba(255, 211, 107, 0.22);
  color: #fff7ce;
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.4), 0 0 24px rgba(255, 211, 107, 0.45);
}
#helperChoiceStatus {
  min-height: 16px;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.22);
  font-size: 14px;
  color: #dffcff;
}
#helperReadyPreview {
  position: absolute;
  right: -156px;
  bottom: -4px;
  width: 132px;
  height: 214px;
  border-radius: 8px;
  background-image: url("../../assets/mind_bridge_helpers.png");
  background-repeat: no-repeat;
  background-size: contain;
  background-color: rgba(7, 21, 26, 0.72);
  border: 2px solid rgba(141, 252, 255, 0.4);
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.42);
  filter: drop-shadow(0 14px 18px rgba(0, 0, 0, 0.34));
  opacity: 0;
  transform: translateX(36px) scale(0.96);
  transition:
    opacity 220ms ease,
    transform 260ms cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}
#helperChoice[data-helper="croc"] #helperReadyPreview {
  background-image: url("../../assets/helper_croc_ready.png");
  background-position: center bottom;
  opacity: 1;
  transform: translateX(0) scale(1);
}
#helperChoice[data-helper="firefly"] #helperReadyPreview {
  background-image: url("../../assets/helper_firefly_ready.png");
  background-position: center bottom;
  opacity: 1;
  transform: translateX(0) scale(1);
}
#helperChoice[data-helper="monkey"] #helperReadyPreview {
  background-image: url("../../assets/helper_monkey_ready.png");
  background-position: center bottom;
  opacity: 1;
  transform: translateX(0) scale(1);
}
#helperChoiceActions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
#helperKeepGoingBtn {
  grid-column: 1 / -1;
}
#helperKeepGoingBtn span,
#helperKeepGoingBtn small {
  display: block;
}
#helperKeepGoingBtn small {
  margin-top: 3px;
  color: rgba(255, 248, 217, 0.86);
  font-size: 12px;
  line-height: 1.15;
}
#helperKeepGoingBtn,
#helperFullRunBtn,
#helperChoiceMapBtn {
  min-height: 48px;
  border: 2px solid rgba(255, 211, 107, 0.72);
  border-radius: 8px;
  background: rgba(255, 211, 107, 0.16);
  color: #fff7ce;
  font-size: 15px;
  font-weight: 900;
  cursor: pointer;
}
#start:not(.helper-picked) #helperChoiceActions {
  opacity: 1;
}
#practicePathTitle {
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  color: #ffd36b;
}
#practicePathButtons {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
#start #practicePathButtons button {
  min-height: 66px;
  padding: 8px 10px;
  border: 2px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}
#start #practicePathButtons button.selected {
  border-color: #8dfcff;
  background: rgba(141, 252, 255, 0.2);
  color: #dffcff;
}
#practicePathStatus {
  min-height: 16px;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.22);
  font-size: 14px;
  color: #dffcff;
}
#start .menuTile.practicePathMatch {
  outline: 3px solid #8dfcff;
  outline-offset: 3px;
  box-shadow:
    0 0 0 4px rgba(0, 0, 0, 0.35),
    0 0 18px rgba(141, 252, 255, 0.65);
}
#start .menuTile.mapStopNext {
  outline: 3px solid #ffd36b;
  outline-offset: 5px;
  box-shadow:
    0 0 0 4px rgba(0, 0, 0, 0.35),
    0 0 20px rgba(255, 211, 107, 0.72);
}
#start .menuTile.mapStopLocked {
  outline: 2px dashed rgba(220, 235, 226, 0.46);
  outline-offset: 3px;
}
#start .menuTile.practicePathMatch::after {
  content: attr(data-practice-badge);
  position: absolute;
  right: -8px;
  top: -12px;
  z-index: 3;
  padding: 3px 6px;
  border: 2px solid #000000;
  border-radius: 8px;
  background: #8dfcff;
  color: #001015;
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}
body.high-contrast #helperChoice {
  background: #000000;
  border-color: #ffffff;
  box-shadow: none;
}
body.high-contrast #helperChoiceTitle,
body.high-contrast #practicePathTitle,
body.high-contrast #start #helperChoiceButtons button.selected {
  color: #ffff00;
}
body.high-contrast #start #helperChoiceButtons button,
body.high-contrast #start #practicePathButtons button {
  background: #000000;
  border-color: #ffffff;
  color: #ffffff;
}
body.high-contrast #start #practicePathButtons button.selected {
  border-color: #ffff00;
  color: #ffff00;
}
body.high-contrast #start .menuTile.practicePathMatch {
  outline-color: #ffff00;
  box-shadow: none;
}
body.high-contrast #start .menuTile.practicePathMatch::after {
  background: #ffff00;
  color: #000000;
}
body.high-contrast #gameCenterPlayCard.gameCenterMapComplete,
body.high-contrast #gameCenterLevelShelf.gameCenterShelfComplete,
body.high-contrast .gameCenterWorldCard.gameCenterWorldComplete,
body.high-contrast .gameCenterLevelButton.gameCenterLitStop,
body.high-contrast .gameCenterLevelButton.gameCenterReplayStart,
body.high-contrast .gameCenterLevelButton.gameCenterReplayStop {
  background: #000000;
  border-color: #ffff00;
  color: #ffff00;
  box-shadow: none;
}
body.high-contrast #gameCenterPlayCard.gameCenterMapComplete #gameCenterPlayThumb,
body.high-contrast #start:not(.map-open) #helperKeepGoingBtn.mapCompleteReplay #helperKeepGoingThumb,
body.high-contrast .gameCenterLevelButton.gameCenterReplayStart .gameCenterLevelThumb,
body.high-contrast .gameCenterLevelButton.gameCenterReplayStop .gameCenterLevelThumb {
  border-color: #ffff00;
  box-shadow: none;
}
body.high-contrast #gameCenterCompleteChip,
body.high-contrast #gameCenterReplayChip,
body.high-contrast #gameCenterCoachChip,
body.high-contrast #gameCenterLevelShelf.gameCenterShelfComplete #gameCenterShelfMeta,
body.high-contrast #gameCenterShelfNextBtn[data-mode="replay"],
body.high-contrast .gameCenterWorldCompleteChip,
body.high-contrast .gameCenterWorldReplayChip,
body.high-contrast .gameCenterCoachPreview,
body.high-contrast .gameCenterLitChip,
body.high-contrast .gameCenterReplayChip,
body.high-contrast #helperKeepGoingCompleteChip,
body.high-contrast #helperKeepGoingCoachChip,
body.high-contrast #helperKeepGoingReplayChip {
  background: #000000;
  border-color: #ffff00;
  color: #ffff00;
  box-shadow: none;
}
body.high-contrast #start:not(.map-open) #helperKeepGoingBtn.mapCompleteReplay {
  background: #000000;
  border-color: #ffff00;
  color: #ffff00;
  box-shadow: none;
}

/* Game Center hub revamp: the painted map becomes backdrop; large cards carry navigation. */
#gameCenterHub {
  display: none;
}
#start.map-open #adventureMapStatus {
  display: none;
}
#start.map-open #menuGrid > button.menuTile,
#start.map-open #menuGrid > a.menuTile {
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}
#start.map-open #menuGrid > button.menuTile.gameCenterTravelTarget,
#start.map-open #menuGrid > a.menuTile.gameCenterTravelTarget {
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: none !important;
  z-index: 27;
  filter: drop-shadow(0 0 12px rgba(255, 232, 166, 0.82));
}
#start.map-open #utilityRow,
#start.map-open #mapActivityRow {
  display: none !important;
}
#gameCenterMascot {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 28;
  width: 58px;
  height: 58px;
  display: none;
  pointer-events: none;
  transform: translate(-50%, -50%);
  filter: drop-shadow(0 10px 13px rgba(0, 0, 0, 0.35));
  will-change: left, top, transform;
}
#gameCenterMascot.show {
  display: block;
}
#gameCenterMascot span {
  position: relative;
  width: 100%;
  height: 100%;
  display: block;
  border: 3px solid rgba(255, 232, 166, 0.92);
  border-radius: 50%;
  background:
    radial-gradient(circle at 42% 26%, rgba(255, 255, 255, 0.52), transparent 22%),
    url("../../assets/helper_croc_ready.png") center 62% / 82% auto no-repeat,
    linear-gradient(180deg, #fff4a8, #f0a73d);
  box-shadow:
    inset 0 0 0 2px rgba(95, 58, 17, 0.34),
    0 5px 0 rgba(89, 50, 18, 0.38);
}
#gameCenterMascot span::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -9px;
  width: 28px;
  height: 9px;
  border-radius: 50%;
  background: rgba(32, 18, 8, 0.28);
  transform: translateX(-50%);
}
#gameCenterMascot.walking span {
  animation: gameCenterMascotBob 260ms ease-in-out infinite alternate;
}
#gameCenterMascot.arrived span {
  animation: gameCenterMascotArrive 170ms ease-out both;
}
@keyframes gameCenterMascotBob {
  from {
    transform: translateY(0) rotate(-2deg);
  }
  to {
    transform: translateY(-5px) rotate(3deg);
  }
}
@keyframes gameCenterMascotArrive {
  0% {
    transform: scale(1);
  }
  62% {
    transform: scale(1.12);
  }
  100% {
    transform: scale(1);
  }
}
@media (prefers-reduced-motion: reduce) {
  #gameCenterMascot.walking span,
  #gameCenterMascot.arrived span {
    animation: none;
  }
}
@media (max-width: 760px), (max-height: 620px) {
  #gameCenterMascot {
    display: none !important;
  }
}
#start.map-open #gameCenterHub {
  position: absolute;
  left: 24px;
  top: 22px;
  bottom: 22px;
  z-index: 24;
  width: min(780px, 62vw);
  min-width: 540px;
  display: grid;
  grid-template-columns: minmax(208px, 31%) minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr);
  grid-template-areas:
    "hero hero"
    "worlds levels";
  gap: 12px;
  padding: 14px;
  box-sizing: border-box;
  border: 2px solid rgba(255, 232, 166, 0.78);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(4, 45, 34, 0.96), rgba(4, 22, 22, 0.96)),
    rgba(4, 32, 26, 0.96);
  color: #f7fff1;
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.42);
  overflow: hidden;
  transition:
    opacity 0.18s ease,
    transform 0.18s ease;
}
#start.map-open.map-traveling #gameCenterHub {
  opacity: 0;
  pointer-events: none;
  transform: translateX(-18px) scale(0.99);
}
#start.map-open.map-traveling #mapBackBtn {
  opacity: 0;
  pointer-events: none;
}
#gameCenterHero {
  grid-area: hero;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: stretch;
}
#gameCenterPlayCard {
  min-height: 98px;
  padding: 8px;
  display: grid;
  grid-template-columns: 116px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  border: 2px solid rgba(255, 211, 107, 0.96);
  border-radius: 8px;
  background: linear-gradient(135deg, #ffd36b, #fff0a8);
  color: #10130d;
  font: inherit;
  font-weight: 900;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 10px 20px rgba(35, 20, 8, 0.26);
}
#gameCenterPlayCard.gameCenterMapComplete {
  border-color: rgba(93, 214, 139, 0.78);
  background: linear-gradient(135deg, #d9ffe6, #fff3b0);
  color: #123821;
}
#gameCenterPlayCard:hover,
#gameCenterPlayCard:focus-visible {
  outline: 3px solid rgba(141, 252, 255, 0.86);
  outline-offset: 3px;
}
#gameCenterPlayThumb {
  width: 116px;
  height: 72px;
  display: block;
  object-fit: cover;
  border: 2px solid rgba(24, 91, 49, 0.78);
  border-radius: 8px;
  background: #16321f;
}
#gameCenterPlayCard.gameCenterMapComplete #gameCenterPlayThumb {
  border-color: rgba(93, 214, 139, 0.82);
  box-shadow:
    0 0 0 2px rgba(24, 91, 49, 0.24),
    0 0 14px rgba(93, 214, 139, 0.35);
}
#gameCenterPlayLabel {
  display: block;
  font-size: 21px;
  line-height: 1.02;
}
#gameCenterPlayMeta {
  display: block;
  margin-top: 5px;
  color: rgba(16, 19, 13, 0.76);
  font-size: 13px;
  line-height: 1.15;
}
#gameCenterGuideChip,
#gameCenterPathChip,
#gameCenterCoachChip,
#gameCenterCompleteChip,
#gameCenterReplayChip {
  width: fit-content;
  max-width: 100%;
  min-height: 20px;
  margin-top: 7px;
  margin-right: 5px;
  padding: 4px 8px;
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(24, 91, 49, 0.44);
  border-radius: 8px;
  background: rgba(24, 91, 49, 0.14);
  color: #185b31;
  font-size: 11px;
  font-weight: 950;
  line-height: 1;
  white-space: nowrap;
}
#gameCenterPathChip {
  border-color: rgba(123, 72, 20, 0.36);
  background: rgba(123, 72, 20, 0.1);
  color: #604016;
}
#gameCenterCoachChip {
  border-color: rgba(123, 72, 20, 0.4);
  background: rgba(255, 211, 107, 0.16);
  color: #5d3d12;
  line-height: 1.1;
  white-space: normal;
}
#gameCenterCompleteChip {
  border-color: rgba(24, 91, 49, 0.5);
  background: rgba(24, 91, 49, 0.16);
  color: #185b31;
}
#gameCenterReplayChip {
  border-color: rgba(41, 116, 153, 0.48);
  background: rgba(41, 116, 153, 0.12);
  color: #1f5e78;
}
#gameCenterCompleteChip[hidden],
#gameCenterCoachChip[hidden],
#gameCenterReplayChip[hidden] {
  display: none !important;
}
#gameCenterHint {
  min-width: 92px;
  padding: 8px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(141, 252, 255, 0.42);
  border-radius: 8px;
  background: rgba(141, 252, 255, 0.12);
  color: #dffcff;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.1;
  text-align: center;
}
#gameCenterWorldCards {
  grid-area: worlds;
  display: grid;
  grid-template-columns: 1fr;
  grid-auto-rows: max-content;
  align-content: start;
  gap: 8px;
  overflow-y: auto;
  padding-right: 2px;
}
.gameCenterWorldCard {
  min-height: 58px;
  padding: 6px;
  display: grid;
  grid-template-columns: 60px minmax(0, 1fr);
  gap: 7px;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: #173a2d;
  color: #efffe8;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.gameCenterWorldCard[aria-pressed="true"] {
  border-color: rgba(255, 211, 107, 0.95);
  background: #4c3b12;
  box-shadow:
    inset 0 0 0 1px rgba(255, 211, 107, 0.38),
    0 8px 16px rgba(0, 0, 0, 0.22);
}
.gameCenterWorldCard.gameCenterWorldComplete {
  border-color: rgba(93, 214, 139, 0.58);
  background: #16402f;
}
.gameCenterWorldCard.gameCenterWorldNext {
  border-color: rgba(255, 211, 107, 0.72);
  background: #3f3415;
}
.gameCenterWorldCard:hover,
.gameCenterWorldCard:focus-visible {
  border-color: rgba(141, 252, 255, 0.74);
  outline: 2px solid rgba(141, 252, 255, 0.74);
  outline-offset: 2px;
}
.gameCenterWorldThumb {
  width: 60px;
  height: 38px;
  display: block;
  object-fit: cover;
  border: 2px solid rgba(255, 232, 166, 0.72);
  border-radius: 8px;
  background: #15301f;
}
.gameCenterWorldCopy {
  min-width: 0;
  display: grid;
  gap: 2px;
  background-color: #173a2d;
  color: #efffe8;
}
.gameCenterWorldCard[aria-pressed="true"] .gameCenterWorldCopy {
  background-color: #ffd36b;
  color: #172219;
}
.gameCenterWorldCopy strong {
  font-size: 14px;
  line-height: 1.08;
}
.gameCenterWorldCopy span,
.gameCenterWorldCopy small {
  color: #f7fff1;
  font-size: 11px;
  line-height: 1.12;
}
.gameCenterWorldCopy .gameCenterWorldProgress {
  width: fit-content;
  padding: 2px 6px;
  border: 1px solid rgba(141, 252, 255, 0.34);
  border-radius: 8px;
  background: rgba(141, 252, 255, 0.1);
  color: #dffcff;
  font-weight: 900;
}
.gameCenterWorldCompleteChip {
  width: fit-content;
  max-width: 100%;
  padding: 2px 6px;
  border: 1px solid rgba(93, 214, 139, 0.64);
  border-radius: 8px;
  background: rgba(93, 214, 139, 0.16);
  color: #d9ffe6;
  font-weight: 950;
  white-space: nowrap;
}
.gameCenterWorldReplayChip {
  width: fit-content;
  max-width: 100%;
  padding: 2px 6px;
  border: 1px solid rgba(141, 252, 255, 0.58);
  border-radius: 8px;
  background: rgba(141, 252, 255, 0.12);
  color: #dffcff;
  font-weight: 950;
  white-space: nowrap;
}
.gameCenterWorldNextChip {
  width: fit-content;
  max-width: 100%;
  padding: 2px 6px;
  border: 1px solid rgba(255, 211, 107, 0.7);
  border-radius: 8px;
  background: rgba(255, 211, 107, 0.18);
  color: #fff3b0;
  font-weight: 950;
  white-space: nowrap;
}
.gameCenterWorldCard[aria-pressed="true"] .gameCenterWorldCopy span,
.gameCenterWorldCard[aria-pressed="true"] .gameCenterWorldCopy small {
  color: #172219;
}
.gameCenterWorldCard[aria-pressed="true"] .gameCenterWorldCopy .gameCenterWorldProgress {
  border-color: rgba(23, 34, 25, 0.26);
  background: rgba(23, 34, 25, 0.08);
  color: #172219;
}
#gameCenterLevelShelf {
  grid-area: levels;
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(255, 232, 166, 0.36);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.24);
  overflow: hidden;
}
#gameCenterLevelShelf.gameCenterShelfComplete {
  border-color: rgba(93, 214, 139, 0.64);
  background: rgba(14, 58, 37, 0.36);
  box-shadow: inset 0 0 0 1px rgba(93, 214, 139, 0.12);
}
#gameCenterShelfHeader {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: baseline;
  justify-content: space-between;
}
#gameCenterShelfTitle {
  min-width: 150px;
  flex: 1 1 auto;
  color: #ffd36b;
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
}
#gameCenterShelfMeta {
  max-width: 360px;
  flex: 1 1 220px;
  color: rgba(223, 252, 255, 0.82);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.1;
  text-align: right;
}
#gameCenterLevelShelf.gameCenterShelfComplete #gameCenterShelfMeta {
  width: fit-content;
  max-width: 100%;
  padding: 4px 7px;
  border: 1px solid rgba(141, 252, 255, 0.38);
  border-radius: 8px;
  background: rgba(141, 252, 255, 0.1);
  color: #dffcff;
}
#gameCenterShelfNextBtn {
  min-height: 30px;
  padding: 6px 10px;
  border: 1px solid rgba(255, 211, 107, 0.74);
  border-radius: 8px;
  background: rgba(255, 211, 107, 0.18);
  color: #fff3b0;
  font: inherit;
  font-size: 12px;
  font-weight: 950;
  line-height: 1;
  cursor: pointer;
  white-space: nowrap;
}
#gameCenterShelfNextBtn[data-mode="replay"] {
  min-height: 40px;
  flex: 1 1 100%;
  padding: 8px 12px;
  border-width: 2px;
  border-color: rgba(93, 214, 139, 0.88);
  background: rgba(93, 214, 139, 0.24);
  color: #d9ffe6;
  font-size: 14px;
  box-shadow: 0 0 0 1px rgba(93, 214, 139, 0.18);
}
#gameCenterShelfNextBtn:hover,
#gameCenterShelfNextBtn:focus-visible {
  border-color: rgba(141, 252, 255, 0.86);
  outline: 2px solid rgba(141, 252, 255, 0.74);
  outline-offset: 2px;
}
#gameCenterLevelList {
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(232px, 1fr));
  align-content: start;
  gap: 8px;
  overflow-y: auto;
  padding: 2px 3px 6px;
}
.gameCenterLevelButton {
  min-height: 76px;
  padding: 7px;
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: #efffe8;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.gameCenterLevelButton:hover,
.gameCenterLevelButton:focus-visible {
  border-color: rgba(255, 211, 107, 0.86);
  outline: 2px solid rgba(255, 211, 107, 0.7);
  outline-offset: 2px;
  background: rgba(255, 211, 107, 0.14);
}
.gameCenterLevelButton.gameCenterNextStop {
  border-color: rgba(255, 211, 107, 0.72);
  background: rgba(255, 211, 107, 0.12);
}
.gameCenterLevelButton.gameCenterLitStop {
  border-color: rgba(93, 214, 139, 0.5);
  background: rgba(93, 214, 139, 0.1);
}
.gameCenterLevelButton.gameCenterReplayStart,
.gameCenterLevelButton.gameCenterReplayStop {
  border-color: rgba(141, 252, 255, 0.62);
  background:
    linear-gradient(90deg, rgba(141, 252, 255, 0.12), rgba(93, 214, 139, 0.12)),
    rgba(93, 214, 139, 0.08);
}
.gameCenterLevelButton.gameCenterReplayStart:hover,
.gameCenterLevelButton.gameCenterReplayStart:focus-visible,
.gameCenterLevelButton.gameCenterReplayStop:hover,
.gameCenterLevelButton.gameCenterReplayStop:focus-visible {
  border-color: rgba(141, 252, 255, 0.92);
  outline-color: rgba(141, 252, 255, 0.78);
  background:
    linear-gradient(90deg, rgba(141, 252, 255, 0.18), rgba(93, 214, 139, 0.18)),
    rgba(93, 214, 139, 0.12);
}
.gameCenterLevelButton.gameCenterReplayStart .gameCenterLevelThumb,
.gameCenterLevelButton.gameCenterReplayStop .gameCenterLevelThumb {
  border-color: rgba(141, 252, 255, 0.78);
  box-shadow:
    0 0 0 2px rgba(93, 214, 139, 0.16),
    0 0 12px rgba(141, 252, 255, 0.22);
}
.gameCenterLevelThumb {
  width: 76px;
  height: 50px;
  display: block;
  object-fit: cover;
  border: 2px solid rgba(255, 232, 166, 0.72);
  border-radius: 8px;
  background: #15301f;
}
.gameCenterLevelCopy {
  min-width: 0;
  display: grid;
  gap: 3px;
}
.gameCenterLevelCopy strong {
  font-size: 15px;
  line-height: 1.1;
}
.gameCenterLevelCopy small {
  color: rgba(239, 255, 232, 0.82);
  font-size: 12px;
  line-height: 1.15;
}
.gameCenterCoachPreview {
  display: block;
  width: fit-content;
  max-width: 100%;
  padding: 4px 7px;
  border: 1px solid rgba(255, 211, 107, 0.42);
  border-radius: 8px;
  background: rgba(255, 211, 107, 0.1);
  color: #fff4bd;
  font-size: 11px;
  font-weight: 900;
  line-height: 1.15;
}
.gameCenterPuzzleChip {
  width: fit-content;
  max-width: 100%;
  min-height: 18px;
  padding: 3px 7px;
  border: 1px solid rgba(141, 252, 255, 0.56);
  border-radius: 8px;
  background: rgba(141, 252, 255, 0.12);
  color: #dffcff;
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
}
.gameCenterDailyChip {
  width: fit-content;
  max-width: 100%;
  min-height: 18px;
  padding: 3px 7px;
  border: 1px solid rgba(93, 214, 139, 0.58);
  border-radius: 8px;
  background: rgba(93, 214, 139, 0.14);
  color: #d9ffe6;
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
}
.gameCenterNextChip {
  width: fit-content;
  max-width: 100%;
  min-height: 18px;
  padding: 3px 7px;
  border: 1px solid rgba(255, 211, 107, 0.7);
  border-radius: 8px;
  background: rgba(255, 211, 107, 0.18);
  color: #fff3b0;
  font-size: 10px;
  font-weight: 950;
  line-height: 1;
  white-space: nowrap;
}
.gameCenterLitChip {
  width: fit-content;
  max-width: 100%;
  min-height: 18px;
  padding: 3px 7px;
  border: 1px solid rgba(93, 214, 139, 0.68);
  border-radius: 8px;
  background: rgba(93, 214, 139, 0.18);
  color: #d9ffe6;
  font-size: 10px;
  font-weight: 950;
  line-height: 1;
  white-space: nowrap;
}
.gameCenterReplayChip {
  width: fit-content;
  max-width: 100%;
  min-height: 18px;
  padding: 3px 7px;
  border: 1px solid rgba(141, 252, 255, 0.62);
  border-radius: 8px;
  background: rgba(141, 252, 255, 0.14);
  color: #dffcff;
  font-size: 10px;
  font-weight: 950;
  line-height: 1;
  white-space: nowrap;
}
.gameCenterSkillChips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.gameCenterSkillChip {
  min-height: 18px;
  padding: 3px 6px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.12);
  color: #f7fff1;
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
}
.gameCenterSkillChip.skill-movement {
  background: rgba(86, 182, 255, 0.2);
  border-color: rgba(86, 182, 255, 0.58);
}
.gameCenterSkillChip.skill-planning {
  background: rgba(255, 211, 107, 0.18);
  border-color: rgba(255, 211, 107, 0.56);
}
.gameCenterSkillChip.skill-math {
  background: rgba(255, 123, 92, 0.18);
  border-color: rgba(255, 123, 92, 0.52);
}
.gameCenterSkillChip.skill-words {
  background: rgba(187, 139, 255, 0.18);
  border-color: rgba(187, 139, 255, 0.52);
}
.gameCenterSkillChip.skill-nature {
  background: rgba(93, 214, 139, 0.18);
  border-color: rgba(93, 214, 139, 0.56);
}
.gameCenterBestChip {
  width: fit-content;
  max-width: 100%;
  padding: 3px 7px;
  border: 1px solid rgba(255, 211, 107, 0.6);
  border-radius: 8px;
  background: rgba(255, 211, 107, 0.14);
  color: #fff3b0;
  font-size: 11px;
  font-weight: 900;
  line-height: 1.1;
  white-space: nowrap;
}
#start.map-open .gameCenterWorldCard,
#start.map-open .gameCenterLevelButton {
  background: #173a2d;
  color: #efffe8;
  border-color: rgba(255, 255, 255, 0.18);
}
#start.map-open .gameCenterWorldCard[aria-pressed="true"] {
  border-color: rgba(255, 211, 107, 0.95);
  background: #4c3b12;
}
#start.map-open .gameCenterWorldCard.gameCenterWorldComplete {
  border-color: rgba(93, 214, 139, 0.72);
}
#start.map-open .gameCenterWorldCard.gameCenterWorldNext {
  border-color: rgba(255, 211, 107, 0.84);
}
#start.map-open .gameCenterWorldCard:hover,
#start.map-open .gameCenterWorldCard:focus-visible,
#start.map-open .gameCenterLevelButton:hover,
#start.map-open .gameCenterLevelButton:focus-visible {
  border-color: rgba(255, 211, 107, 0.86);
  background: #284c34;
}
#start.map-open .gameCenterWorldCopy strong,
#start.map-open .gameCenterLevelCopy strong {
  color: #f7fff1;
}
#start.map-open .gameCenterWorldCopy span,
#start.map-open .gameCenterWorldCopy small,
#start.map-open .gameCenterLevelCopy small {
  color: #f7fff1;
}
#start.map-open .gameCenterBestChip {
  color: #fff3b0;
  border-color: rgba(255, 211, 107, 0.74);
}
#start.map-open .gameCenterPuzzleChip {
  color: #dffcff;
  border-color: rgba(141, 252, 255, 0.7);
}
#start.map-open .gameCenterDailyChip {
  color: #d9ffe6;
  border-color: rgba(93, 214, 139, 0.72);
}
#start.map-open .gameCenterNextChip {
  color: #fff3b0;
  border-color: rgba(255, 211, 107, 0.82);
}
#start.map-open .gameCenterLitChip {
  color: #d9ffe6;
  border-color: rgba(93, 214, 139, 0.82);
}
#start.map-open .gameCenterWorldCompleteChip {
  color: #d9ffe6;
  border-color: rgba(93, 214, 139, 0.82);
}
#start.map-open .gameCenterWorldNextChip {
  color: #fff3b0;
  border-color: rgba(255, 211, 107, 0.82);
}
#start.map-open .gameCenterSkillChip {
  color: #f7fff1;
}
#start.map-open .gameCenterWorldCard .gameCenterWorldCopy,
#start.map-open .gameCenterLevelButton .gameCenterLevelCopy {
  background: inherit;
}
#start.map-open .gameCenterWorldCard[aria-pressed="true"],
#start.map-open .gameCenterWorldCard[aria-pressed="true"] .gameCenterWorldCopy {
  background: #ffd36b;
  color: #172219;
}
#start.map-open .gameCenterWorldCard[aria-pressed="true"] .gameCenterWorldCopy span,
#start.map-open .gameCenterWorldCard[aria-pressed="true"] .gameCenterWorldCopy small {
  color: #172219;
}

/* Game Center map redesign: keep the painted route visible and make navigation compact. */
#start.map-open #menuGrid {
  border-width: 2px;
  background-position: center center;
}
#start.map-open #menuGrid::before {
  left: auto;
  right: 18px;
  top: 18px;
  padding: 7px 11px;
  background: rgba(3, 24, 21, 0.74);
  color: #fff3b0;
  font-size: 12px;
}
#start.map-open #menuGrid::after {
  background:
    linear-gradient(90deg, rgba(2, 17, 14, 0.64) 0 38%, transparent 66%),
    linear-gradient(0deg, rgba(2, 17, 14, 0.32), transparent 28%);
  box-shadow:
    inset 0 0 36px rgba(14, 21, 13, 0.24),
    inset 0 -54px 60px rgba(11, 22, 14, 0.18);
}
#start.map-open #gameCenterHub {
  left: 18px;
  top: 18px;
  bottom: 18px;
  width: min(500px, 42vw);
  min-width: 420px;
  grid-template-columns: 1fr;
  grid-template-rows: auto minmax(112px, 164px) minmax(0, 1fr);
  grid-template-areas:
    "hero"
    "worlds"
    "levels";
  gap: 10px;
  padding: 12px;
  border-color: rgba(255, 232, 166, 0.62);
  background: linear-gradient(180deg, rgba(3, 38, 31, 0.94), rgba(3, 20, 19, 0.93));
  box-shadow:
    0 18px 36px rgba(0, 0, 0, 0.34),
    inset 0 0 0 1px rgba(141, 252, 255, 0.08);
}
#start.map-open #gameCenterHero {
  grid-template-columns: 1fr;
  gap: 8px;
}
#start.map-open #gameCenterPlayCard {
  min-height: 74px;
  grid-template-columns: 84px minmax(0, 1fr);
  gap: 9px;
  padding: 7px;
}
#start.map-open #gameCenterPlayThumb {
  width: 84px;
  height: 52px;
}
#start.map-open #gameCenterPlayLabel {
  font-size: 18px;
  line-height: 1;
}
#start.map-open #gameCenterPlayMeta {
  margin-top: 3px;
  font-size: 12px;
}
#start.map-open #gameCenterGuideChip,
#start.map-open #gameCenterPathChip,
#start.map-open #gameCenterCoachChip,
#start.map-open #gameCenterCompleteChip,
#start.map-open #gameCenterReplayChip {
  min-height: 18px;
  margin-top: 5px;
  padding: 3px 6px;
  font-size: 10px;
}
#start.map-open #gameCenterHint {
  min-height: 28px;
  padding: 6px 8px;
  display: block;
  border-color: rgba(141, 252, 255, 0.28);
  background: rgba(141, 252, 255, 0.08);
  font-size: 11px;
  text-align: left;
}
#start.map-open #gameCenterWorldCards {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  overflow-y: auto;
  padding: 0;
}
#start.map-open .gameCenterWorldCard {
  min-height: 50px;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 6px;
  padding: 5px;
  background: rgba(16, 57, 43, 0.82);
}
#start.map-open .gameCenterWorldThumb {
  width: 48px;
  height: 32px;
  border-radius: 6px;
}
#start.map-open .gameCenterWorldCopy {
  gap: 1px;
  background: transparent;
}
#start.map-open .gameCenterWorldCopy strong {
  font-size: 12px;
  line-height: 1;
}
#start.map-open .gameCenterWorldCopy span {
  display: none;
}
#start.map-open .gameCenterWorldCopy small {
  font-size: 10px;
  line-height: 1;
}
#start.map-open .gameCenterWorldCompleteChip,
#start.map-open .gameCenterWorldReplayChip {
  display: none;
}
#start.map-open .gameCenterWorldNextChip {
  padding: 2px 5px;
  font-size: 9px;
}
#start.map-open #gameCenterLevelShelf {
  gap: 7px;
  padding: 9px;
  background: rgba(0, 0, 0, 0.2);
}
#start.map-open #gameCenterShelfHeader {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 5px 8px;
  align-items: center;
}
#start.map-open #gameCenterShelfTitle {
  min-width: 0;
  font-size: 17px;
}
#start.map-open #gameCenterShelfMeta {
  grid-column: 1 / -1;
  max-width: none;
  text-align: left;
  font-size: 11px;
}
#start.map-open #gameCenterShelfNextBtn {
  min-height: 32px;
  padding: 7px 10px;
}
#start.map-open #gameCenterLevelList {
  grid-template-columns: 1fr;
  gap: 7px;
  padding: 1px 4px 5px 1px;
}
#start.map-open .gameCenterLevelButton {
  min-height: 58px;
  grid-template-columns: 68px minmax(0, 1fr);
  gap: 8px;
  padding: 6px;
  align-items: center;
  background: rgba(18, 63, 47, 0.84);
}
#start.map-open .gameCenterLevelThumb {
  width: 68px;
  height: 43px;
  border-radius: 6px;
}
#start.map-open .gameCenterLevelCopy {
  gap: 2px;
  background: transparent;
}
#start.map-open .gameCenterLevelCopy strong {
  font-size: 14px;
  line-height: 1;
}
#start.map-open .gameCenterLevelCopy small {
  font-size: 11px;
  line-height: 1.1;
}
#start.map-open .gameCenterCoachPreview {
  padding: 2px 5px;
  font-size: 10px;
  line-height: 1.1;
}
#start.map-open .gameCenterSkillChips,
#start.map-open .gameCenterBestChip,
#start.map-open .gameCenterPuzzleChip,
#start.map-open .gameCenterDailyChip {
  display: none;
}
#start.map-open .gameCenterNextChip,
#start.map-open .gameCenterLitChip,
#start.map-open .gameCenterReplayChip {
  width: fit-content;
  padding: 2px 6px;
  font-size: 10px;
  line-height: 1;
}
#start.map-open #mapBackBtn {
  right: 18px;
  bottom: 18px;
  min-width: 82px;
  min-height: 42px;
  padding: 8px 12px;
  border-color: rgba(47, 28, 8, 0.74);
  background: #ffd36b;
  color: #10130d;
}

@media (max-width: 760px), (max-height: 620px) {
  #start.map-open {
    place-items: stretch;
    padding: 10px;
    overflow-y: auto;
  }
  #start.map-open #menuGrid {
    min-height: auto;
    max-height: none;
    overflow: visible;
  }
  #start.map-open #gameCenterHub {
    position: static;
    width: 100%;
    min-width: 0;
    min-height: 0;
    padding: 12px;
    gap: 10px;
    overflow: visible;
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
    grid-template-areas:
      "hero"
      "worlds"
      "levels";
  }
  #gameCenterWorldCards {
    overflow: visible;
    padding-right: 0;
  }
  #gameCenterHero {
    grid-template-columns: 1fr;
  }
  #gameCenterHint {
    min-width: 0;
    min-height: 34px;
  }
  #gameCenterPlayCard {
    min-height: 88px;
    grid-template-columns: 92px minmax(0, 1fr);
  }
  #gameCenterPlayThumb {
    width: 92px;
    height: 58px;
  }
  #gameCenterPlayLabel {
    font-size: 18px;
  }
  #gameCenterWorldCards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  #gameCenterLevelList {
    grid-template-columns: 1fr;
  }
  .gameCenterWorldCard,
  .gameCenterLevelButton {
    min-height: 74px;
  }
  #start.map-open .gameCenterWorldCopy span {
    display: none;
  }
  #start.map-open .gameCenterWorldCopy strong {
    font-size: 13px;
  }
  #start.map-open .gameCenterWorldCopy small {
    font-size: 11px;
  }
  #gameCenterLevelShelf {
    overflow: visible;
  }
  #gameCenterLevelList {
    overflow: visible;
  }
}

#jungleReadingOverlay {
  position: fixed;
  inset: 0;
  display: none;
  place-items: stretch;
  padding: 0;
  box-sizing: border-box;
  overflow: hidden;
  background: #000000;
  z-index: 73;
  color: #f7fff4;
}
#jungleReadingOverlay.show {
  display: block;
}
#jungleReadingPanel {
  position: relative;
  width: 100vw;
  height: 100svh;
  max-height: none;
  display: block;
  padding: 0;
  box-sizing: border-box;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: #000000;
  box-shadow: none;
}
#jungleReadingHeader {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 8;
  display: block;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
#jungleReadingTitle {
  color: #ffffff;
  font-family: Impact, Arial Black, sans-serif;
  font-size: 22px;
  line-height: 1;
  letter-spacing: 0;
  text-transform: uppercase;
  text-shadow:
    0 3px 0 rgba(0, 0, 0, 0.75),
    0 0 14px rgba(255, 211, 107, 0.22);
}
#jungleReadingCount {
  display: inline-flex;
  margin-top: 8px;
  margin-bottom: 4px;
  padding: 4px 8px;
  border-radius: 5px;
  background: #ffd36b;
  color: #14120c;
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0;
}
#jungleReadingMenuBtn {
  position: relative;
  width: 56px;
  height: 56px;
  padding: 0;
  border: 2px solid rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.32);
  cursor: pointer;
  touch-action: manipulation;
  box-shadow:
    0 7px 18px rgba(0, 0, 0, 0.34),
    inset 0 0 0 1px rgba(255, 211, 107, 0.36);
}
#jungleReadingMenuBtn span,
#jungleReadingMenuBtn span::before,
#jungleReadingMenuBtn span::after {
  content: "";
  position: absolute;
  left: 50%;
  width: 24px;
  height: 3px;
  border-radius: 999px;
  background: #ffffff;
  transform: translateX(-50%);
  transition:
    transform 160ms ease,
    opacity 160ms ease,
    background 160ms ease;
}
#jungleReadingMenuBtn span {
  top: 50%;
}
#jungleReadingMenuBtn span::before {
  top: -8px;
}
#jungleReadingMenuBtn span::after {
  top: 8px;
}
#jungleReadingPanel.is-menu-open #jungleReadingMenuBtn span {
  background: transparent;
}
#jungleReadingPanel.is-menu-open #jungleReadingMenuBtn span::before {
  transform: translateX(-50%) translateY(8px) rotate(45deg);
}
#jungleReadingPanel.is-menu-open #jungleReadingMenuBtn span::after {
  transform: translateX(-50%) translateY(-8px) rotate(-45deg);
}
#jungleReadingMenu {
  position: absolute;
  top: 66px;
  left: 0;
  width: min(270px, calc(100vw - 28px));
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 2px solid rgba(255, 211, 107, 0.72);
  border-radius: 8px;
  background: rgba(8, 10, 8, 0.76);
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.42);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px);
  visibility: hidden;
  transition:
    opacity 160ms ease,
    transform 160ms ease,
    visibility 160ms ease;
}
#jungleReadingPanel.is-menu-open #jungleReadingMenu {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
  visibility: visible;
}
#jungleReadingCloseBtn,
#jungleReadingSpeakBtn {
  width: 100%;
  min-height: 44px;
  padding: 9px 13px;
  border: 2px solid rgba(255, 211, 107, 0.86);
  border-radius: 7px;
  background: linear-gradient(180deg, #2c321b, #151912);
  color: #fff7ce;
  font-size: 14px;
  font-weight: 900;
  cursor: pointer;
  touch-action: manipulation;
  box-shadow:
    inset 0 -3px 0 rgba(0, 0, 0, 0.28),
    0 3px 0 rgba(0, 0, 0, 0.28);
}
#jungleReadingStage {
  position: absolute;
  inset: 0;
  min-height: 0;
  display: block;
}
#jungleReadingImageFrame {
  position: absolute;
  inset: 0;
  width: 100%;
  max-width: none;
  height: 100%;
  min-width: 0;
  min-height: 0;
  aspect-ratio: auto;
  display: block;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: #000000;
  cursor: pointer;
  box-shadow: none;
}
#jungleReadingImageFrame:focus {
  outline: 0;
}
#jungleReadingImageFrame:focus-visible {
  outline: 3px solid #8dfcff;
  outline-offset: 3px;
}
#jungleReadingImageFrame::before {
  display: none;
}
#jungleReadingImage {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center 28%;
  display: block;
}
#jungleReadingCopy {
  min-width: 0;
  display: none;
}
#jungleReadingLabel {
  display: none;
  color: #8dfcff;
  font-size: clamp(18px, 3vw, 28px);
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: 0;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.7);
}
#jungleReadingWord {
  position: absolute;
  left: 50%;
  right: auto;
  bottom: clamp(116px, 14svh, 156px);
  width: min(680px, calc(100vw - 180px));
  min-height: 0;
  padding: 0;
  box-sizing: border-box;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  gap: clamp(0px, 0.2vw, 4px);
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  filter: drop-shadow(0 8px 0 rgba(38, 15, 5, 0.72)) drop-shadow(0 15px 18px rgba(0, 0, 0, 0.46));
  transform: translateX(-50%) rotate(-1deg);
  z-index: 4;
}
.jungleReadingLetter {
  min-width: 0;
  display: inline-grid;
  place-items: center;
  color: #fffaf0;
  font-family: Cooper Black, Arial Rounded MT Bold, Impact, Arial Black, sans-serif;
  font-size: clamp(58px, 9vw, 124px);
  line-height: 0.82;
  font-weight: 950;
  text-transform: lowercase;
  -webkit-text-stroke: clamp(3px, 0.52vw, 6px) #f58221;
  text-shadow:
    0 2px 0 #f58221,
    0 5px 0 #7b310e,
    0 8px 0 #321303,
    2px 2px 0 #321303,
    -2px 2px 0 #321303,
    0 0 10px rgba(255, 255, 255, 0.48);
  transition:
    transform 160ms ease,
    color 160ms ease,
    text-shadow 160ms ease;
}
.jungleReadingLetter.is-space {
  min-width: clamp(10px, 2vw, 22px);
}
#jungleReadingWord .jungleReadingLetter:nth-child(odd) {
  transform: translateY(2px) rotate(-2deg);
}
#jungleReadingWord .jungleReadingLetter:nth-child(even) {
  transform: translateY(-2px) rotate(2deg);
}
.jungleReadingLetter.is-vowel {
  color: #fff4c6;
}
.jungleReadingLetter.is-lit {
  transform: translateY(-5px) rotate(-2deg);
  color: #fff7d5;
  -webkit-text-stroke-color: #ff8a2a;
  text-shadow:
    0 5px 0 #2d1508,
    2px 2px 0 #2d1508,
    -1px 2px 0 #2d1508,
    0 0 22px rgba(255, 211, 107, 0.92);
}
#jungleReadingWord.is-long .jungleReadingLetter {
  font-size: clamp(48px, 7vw, 96px);
  -webkit-text-stroke-width: clamp(3px, 0.46vw, 5px);
}
#jungleReadingWord.is-extra-long .jungleReadingLetter {
  font-size: clamp(38px, 5.8vw, 78px);
  -webkit-text-stroke-width: clamp(2px, 0.38vw, 4px);
}
#jungleReadingSentence {
  padding: 12px 14px;
  border: 2px solid rgba(0, 184, 212, 0.42);
  border-radius: 7px;
  background: linear-gradient(90deg, rgba(4, 12, 9, 0.92), rgba(7, 35, 36, 0.88));
  color: #f4fdff;
  font-size: clamp(15px, 1.75vw, 22px);
  font-weight: 900;
  line-height: 1.14;
  box-shadow: inset 0 -4px 0 rgba(0, 0, 0, 0.22);
}
#jungleReadingDragShell {
  position: absolute;
  left: 50%;
  right: auto;
  bottom: clamp(54px, 7svh, 82px);
  width: min(480px, calc(100vw - 190px));
  display: grid;
  gap: 2px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  transform: translateX(-50%);
  z-index: 3;
}
#jungleReadingTrack {
  display: none;
}
#jungleReadingTrackFill {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #8dfcff, #ffd36b);
  transition: width 120ms ease;
}
#jungleReadingLetterRange {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  min-height: 44px;
  margin: 0;
  background: transparent;
  cursor: pointer;
  accent-color: #ffd36b;
  touch-action: manipulation;
}
#jungleReadingLetterRange:focus {
  outline: 0;
}
#jungleReadingLetterRange:focus-visible {
  border-radius: 999px;
  outline: 3px solid rgba(255, 211, 107, 0.82);
  outline-offset: 4px;
}
#jungleReadingLetterRange::-webkit-slider-runnable-track {
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.78);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.28);
  box-shadow: inset 0 0 0 2px rgba(0, 0, 0, 0.32);
}
#jungleReadingLetterRange::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 40px;
  height: 40px;
  margin-top: -14px;
  border: 4px solid #ffffff;
  border-radius: 50%;
  background: #ffd36b;
  box-shadow:
    0 7px 0 rgba(0, 0, 0, 0.36),
    0 0 0 5px rgba(255, 45, 45, 0.32);
}
#jungleReadingLetterRange::-moz-range-track {
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.78);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.28);
  box-shadow: inset 0 0 0 2px rgba(0, 0, 0, 0.32);
}
#jungleReadingLetterRange::-moz-range-thumb {
  width: 36px;
  height: 36px;
  border: 4px solid #ffffff;
  border-radius: 50%;
  background: #ffd36b;
  box-shadow:
    0 7px 0 rgba(0, 0, 0, 0.36),
    0 0 0 5px rgba(255, 45, 45, 0.32);
}
#jungleReadingDragHint {
  position: absolute;
  left: 18px;
  right: 18px;
  top: 6px;
  height: 46px;
  opacity: 0;
  pointer-events: none;
  transform: translateX(-10px);
  transition:
    opacity 180ms ease,
    transform 180ms ease;
  z-index: 2;
}
#jungleReadingDragHint.is-visible {
  opacity: 1;
  transform: translateX(0);
}
#jungleReadingDragHint span {
  position: absolute;
  left: 8px;
  top: 16px;
  width: 48%;
  height: 11px;
  border: 3px solid rgba(255, 255, 255, 0.92);
  border-right: 0;
  border-radius: 999px 0 0 999px;
  background: #f02020;
  box-shadow:
    0 5px 0 rgba(0, 0, 0, 0.34),
    0 0 20px rgba(255, 48, 48, 0.44);
  animation: jungleReadingArrowNudge 820ms ease-in-out infinite;
}
#jungleReadingDragHint span::after {
  content: "";
  position: absolute;
  right: -27px;
  top: 50%;
  width: 0;
  height: 0;
  border-top: 17px solid transparent;
  border-bottom: 17px solid transparent;
  border-left: 28px solid #f02020;
  filter:
    drop-shadow(3px 0 0 rgba(255, 255, 255, 0.92))
    drop-shadow(0 5px 0 rgba(0, 0, 0, 0.24));
  transform: translateY(-50%);
}
@keyframes jungleReadingArrowNudge {
  0%,
  100% {
    transform: translateX(0);
  }
  50% {
    transform: translateX(34px);
  }
}
#jungleReadingStatus {
  display: none;
  min-height: 18px;
  color: #dffcff;
  font-size: 13px;
  font-weight: 850;
  text-align: center;
}
#jungleReadingActions {
  position: absolute;
  inset: 0;
  z-index: 6;
  display: block;
  pointer-events: none;
}
#jungleReadingAnimalPicker {
  position: absolute;
  left: 50%;
  bottom: clamp(12px, 2svh, 24px);
  width: min(560px, calc(100vw - 170px));
  display: none;
  transform: translateX(-50%);
  pointer-events: auto;
}
#jungleReadingAnimalRange {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  min-height: 34px;
  margin: 0;
  background: transparent;
  cursor: pointer;
  accent-color: #8dfcff;
  touch-action: manipulation;
}
#jungleReadingAnimalRange:focus {
  outline: 0;
}
#jungleReadingAnimalRange:focus-visible {
  border-radius: 999px;
  outline: 3px solid rgba(141, 252, 255, 0.86);
  outline-offset: 3px;
}
#jungleReadingAnimalRange::-webkit-slider-runnable-track {
  height: 12px;
  border: 2px solid rgba(255, 255, 255, 0.74);
  border-radius: 999px;
  background:
    linear-gradient(90deg, rgba(141, 252, 255, 0.86), rgba(255, 211, 107, 0.88), rgba(126, 255, 140, 0.82)),
    rgba(0, 0, 0, 0.34);
  box-shadow:
    0 4px 0 rgba(0, 0, 0, 0.28),
    inset 0 0 0 2px rgba(0, 0, 0, 0.22);
}
#jungleReadingAnimalRange::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 34px;
  height: 34px;
  margin-top: -13px;
  border: 4px solid #ffffff;
  border-radius: 50%;
  background: #8dfcff;
  box-shadow:
    0 6px 0 rgba(0, 0, 0, 0.36),
    0 0 0 5px rgba(0, 0, 0, 0.28);
}
#jungleReadingAnimalRange::-moz-range-track {
  height: 12px;
  border: 2px solid rgba(255, 255, 255, 0.74);
  border-radius: 999px;
  background:
    linear-gradient(90deg, rgba(141, 252, 255, 0.86), rgba(255, 211, 107, 0.88), rgba(126, 255, 140, 0.82)),
    rgba(0, 0, 0, 0.34);
  box-shadow:
    0 4px 0 rgba(0, 0, 0, 0.28),
    inset 0 0 0 2px rgba(0, 0, 0, 0.22);
}
#jungleReadingAnimalRange::-moz-range-thumb {
  width: 30px;
  height: 30px;
  border: 4px solid #ffffff;
  border-radius: 50%;
  background: #8dfcff;
  box-shadow:
    0 6px 0 rgba(0, 0, 0, 0.36),
    0 0 0 5px rgba(0, 0, 0, 0.28);
}
#jungleReadingPrevBtn,
#jungleReadingNextBtn {
  position: absolute;
  top: 50%;
  width: 64px;
  height: 96px;
  min-height: 0;
  padding: 0 0 7px;
  border: 0;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.18);
  color: #ffffff;
  cursor: pointer;
  font-family: Georgia, Times New Roman, serif;
  font-size: 86px;
  font-weight: 900;
  line-height: 0.86;
  pointer-events: auto;
  -webkit-text-stroke: clamp(2px, 0.32vw, 4px) #f02020;
  paint-order: stroke fill;
  text-shadow:
    0 3px 0 rgba(0, 0, 0, 0.92),
    2px 0 0 #f02020,
    -2px 0 0 #f02020,
    0 2px 0 #f02020,
    0 -2px 0 #f02020,
    0 0 12px rgba(255, 255, 255, 0.34);
  touch-action: manipulation;
  transform: translateY(-50%);
}
#jungleReadingPrevBtn {
  left: clamp(10px, 2vw, 26px);
}
#jungleReadingNextBtn {
  right: clamp(10px, 2vw, 26px);
}
#jungleReadingPrevBtn:focus-visible,
#jungleReadingNextBtn:focus-visible,
#jungleReadingMenuBtn:focus-visible {
  outline: 3px solid #8dfcff;
  outline-offset: 4px;
}
body.high-contrast #jungleReadingPanel,
body.high-contrast #jungleReadingHeader,
body.high-contrast #jungleReadingDragShell {
  background: #000000;
  border-color: #ffffff;
  box-shadow: none;
}
body.high-contrast .jungleReadingLetter {
  color: #ffffff;
  -webkit-text-stroke-color: #000000;
}
body.high-contrast .jungleReadingLetter.is-lit {
  color: #ffff00;
  -webkit-text-stroke-color: #000000;
}
body.high-contrast #jungleReadingLetterRange::-webkit-slider-thumb {
  background: #ffff00;
  box-shadow: 0 0 0 5px #ff0000;
}
body.high-contrast #jungleReadingLetterRange::-moz-range-thumb {
  background: #ffff00;
  box-shadow: 0 0 0 5px #ff0000;
}
body.high-contrast #jungleReadingAnimalRange::-webkit-slider-thumb {
  background: #ffff00;
  box-shadow: 0 0 0 5px #00ffff;
}
body.high-contrast #jungleReadingAnimalRange::-moz-range-thumb {
  background: #ffff00;
  box-shadow: 0 0 0 5px #00ffff;
}
@media (prefers-reduced-motion: reduce) {
  #jungleReadingDragHint span {
    animation: none;
  }
}
@media (max-width: 760px) {
  #jungleReadingPanel {
    width: 100vw;
    height: 100svh;
  }
  #jungleReadingHeader {
    top: 10px;
    left: 10px;
  }
  #jungleReadingMenuBtn {
    width: 50px;
    height: 50px;
  }
  #jungleReadingMenu {
    top: 58px;
  }
  #jungleReadingStage {
    position: absolute;
    inset: 0;
    display: block;
  }
  #jungleReadingImageFrame {
    width: 100%;
    max-width: none;
    height: 100%;
    aspect-ratio: auto;
  }
  #jungleReadingImage {
    object-position: center center;
  }
  #jungleReadingCopy {
    display: none;
  }
  #jungleReadingWord {
    left: 50%;
    right: auto;
    bottom: 126px;
    width: min(430px, calc(100vw - 44px));
    min-height: 0;
    padding: 0;
  }
  #jungleReadingLabel,
  #jungleReadingSentence,
  #jungleReadingStatus {
    text-align: center;
  }
  .jungleReadingLetter {
    font-size: clamp(48px, 12.6vw, 66px);
    -webkit-text-stroke-width: 3px;
  }
  #jungleReadingWord.is-long .jungleReadingLetter {
    font-size: clamp(38px, 10vw, 52px);
  }
  #jungleReadingWord.is-extra-long .jungleReadingLetter {
    font-size: clamp(30px, 8vw, 42px);
  }
  #jungleReadingActions {
    position: absolute;
    inset: 0;
    display: block;
  }
  #jungleReadingPrevBtn,
  #jungleReadingNextBtn {
    top: 46%;
    width: 44px;
    height: 68px;
    padding-bottom: 5px;
    font-size: 58px;
  }
  #jungleReadingPrevBtn {
    left: 6px;
  }
  #jungleReadingNextBtn {
    right: 6px;
  }
  #jungleReadingDragShell {
    bottom: 72px;
    width: min(360px, calc(100vw - 108px));
  }
  #jungleReadingAnimalPicker {
    bottom: 18px;
    width: min(340px, calc(100vw - 96px));
  }
  #jungleReadingAnimalRange {
    min-height: 32px;
  }
  #jungleReadingLetterRange {
    min-height: 42px;
  }
  #jungleReadingDragHint {
    left: 14px;
    right: 14px;
    top: 4px;
  }
  #jungleReadingDragHint span {
    width: 58%;
  }
}
@media (max-width: 760px) {
  #startPanel {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  #menuIntro {
    grid-template-columns: 1fr;
    gap: 8px;
    text-align: center;
  }
  #menuGrid {
    aspect-ratio: 10 / 14;
    background-position: center;
  }
  #startPanel h1 {
    font-size: 40px;
    text-align: center;
  }
  #startPanel .subtitle,
  #startPanel #inputHint {
    max-width: none;
    text-align: center;
  }
  #start button.menuTile {
    width: 72px;
    min-height: 64px;
    gap: 4px;
  }
  #start button.menuTile.hasTileThumb {
    width: 92px;
    height: 70px;
    min-height: 70px;
  }
  #start button.menuTile .tileThumb {
    width: 86px;
    height: 50px;
    border-radius: 8px;
  }
  #start button.menuTile > .tileTitle {
    width: 46px;
    height: 46px;
    font-size: 9px;
    border-width: 2px;
  }
  #start button.menuTile.hasTileThumb > .tileTitle {
    min-width: 30px;
    min-height: 17px;
    top: -8px;
    padding: 2px 5px;
    font-size: 8px;
  }
  #start button.menuTile > span:not(.tileTitle) {
    padding: 3px 5px;
  }
  #start button.menuTile > span:not(.tileTitle) .tileTitle {
    font-size: 9px;
    line-height: 1;
  }
  #utilityRow {
    left: 10px;
    right: 10px;
    top: auto;
    bottom: 10px;
    justify-content: center;
  }
  #start.map-open #menuGrid {
    aspect-ratio: auto;
    width: 100%;
    max-width: 100%;
    max-height: none;
    box-sizing: border-box;
    overflow: visible;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    border-width: 2px;
    background: rgba(5, 18, 16, 0.92);
  }
  #start.map-open #mapBackBtn {
    position: static;
    width: 100%;
    box-sizing: border-box;
    min-height: 48px;
    margin: 0;
    padding: 8px 12px;
    transform: none;
  }
  #start.map-open #menuGrid::before {
    content: "Choose a level";
    position: static;
    margin: 0 0 4px;
    padding: 0;
    background: transparent;
    color: #ffd36b;
    box-shadow: none;
  }
  #start.map-open #menuGrid::after,
  #start.map-open button.menuTile::after {
    display: none;
  }
  #start.map-open #adventureMapStatus {
    position: static;
    max-width: none;
    padding: 8px 10px;
    border-radius: 8px;
    background: rgba(255, 211, 107, 0.12);
    box-shadow: none;
  }
  #start.map-open button.menuTile,
  #start.map-open #utilityRow button.menuTile {
    box-sizing: border-box;
    position: static;
    z-index: auto;
    width: 100%;
    height: auto;
    min-height: 54px;
    padding: 9px 11px;
    display: grid;
    grid-template-columns: 82px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.08);
    color: #e8efe6;
    text-align: left;
    transform: none;
  }
  #start.map-open button.menuTile.hasTileThumb,
  #start.map-open button.menuTile.primary.hasTileThumb {
    width: 100%;
    height: auto;
    min-height: 84px;
    grid-template-rows: auto auto;
    align-items: center;
  }
  #start.map-open button.menuTile .tileThumb {
    width: 78px;
    height: 48px;
    grid-column: 1;
    grid-row: 1 / span 2;
    align-self: center;
  }
  #start.map-open button.menuTile.hasTileThumb > .tileTitle {
    display: none;
    position: static;
  }
  #start.map-open button.menuTile.hasTileThumb > span:not(.tileTitle) {
    left: auto;
    top: auto;
    grid-column: 2;
    grid-row: 1;
    align-self: end;
    transform: none !important;
  }
  #start.map-open button.menuTile.hasTileThumb .mapTrail {
    display: none;
  }
  #start.map-open button.menuTile.hasTileThumb.practicePathMatch::after {
    content: none;
    display: none;
  }
  #start.map-open button.menuTile:hover,
  #start.map-open button.menuTile:focus-visible,
  #start.map-open #utilityRow button.menuTile:hover,
  #start.map-open #utilityRow button.menuTile:focus-visible {
    background: rgba(255, 211, 107, 0.14);
    border-color: rgba(255, 211, 107, 0.7);
    transform: none;
  }
  #start.map-open button.menuTile > .tileTitle {
    width: auto;
    height: auto;
    display: block;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #ffd36b;
    font-size: 13px;
    line-height: 1.1;
    box-shadow: none;
  }
  #start.map-open button.menuTile > span:not(.tileTitle) {
    position: static;
    left: auto;
    top: auto;
    min-width: 0;
    max-width: none;
    padding: 0;
    border-radius: 0;
    background: transparent;
    color: inherit;
    box-shadow: none;
    opacity: 1;
    pointer-events: auto;
    transform: none !important;
    transition: none;
    white-space: normal;
  }
  #start.map-open button.menuTile > span:not(.tileTitle) .tileTitle {
    font-size: 15px;
    line-height: 1.12;
    text-shadow: none;
  }
  #start.map-open button.menuTile .tileMeta {
    display: block;
    margin-top: 2px;
    font-size: 12px;
    line-height: 1.18;
  }
  #start.map-open #capybaraPiratesTile {
    box-sizing: border-box;
    position: static;
    z-index: auto;
    width: 100%;
    min-height: 66px;
    padding: 9px 11px;
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    transform: none;
  }
  #start.map-open #capybaraPiratesTile > span:not(.tileTitle) {
    grid-column: 2;
    min-width: 0;
  }
  #start.map-open .mapStamp {
    position: static;
    grid-column: 2;
    grid-row: 2;
    align-self: start;
    max-width: none;
    min-height: 0;
    margin-top: 4px;
    padding: 3px 6px;
    display: none;
    justify-self: start;
    font-size: 10px;
  }
  #start.map-open .mapTrail {
    position: static;
    width: max-content;
    margin-top: 3px;
    justify-self: start;
    transform: none;
  }
  #start.map-open .mapStopLit .mapStamp,
  #start.map-open .mapStopNext .mapStamp,
  #start.map-open .mapStopLocked .mapStamp {
    display: none;
  }
  #start.map-open #utilityRow {
    position: static;
    z-index: auto;
    box-sizing: border-box;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    width: 100%;
    margin-top: 6px;
  }
  #start.map-open #mapActivityRow {
    position: static;
    z-index: auto;
    box-sizing: border-box;
    display: grid !important;
    grid-template-columns: 1fr;
    gap: 8px;
    width: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
  }
  #start.map-open #utilityRow button.menuTile {
    grid-template-columns: 1fr;
    min-width: 0;
    min-height: 48px;
  }
  #helperChoice {
    width: auto;
    grid-template-columns: 1fr;
  }
  #helperChoiceTitle,
  #helperChoiceButtons,
  #helperChoiceStatus,
  #practicePathTitle,
  #practicePathButtons,
  #practicePathStatus {
    grid-column: 1;
    grid-row: auto;
  }
}
#start:not(.map-open) {
  place-items: start center;
  padding: 22px 16px 64px;
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 176, 26, 0.18), transparent 34%),
    radial-gradient(circle at 18% 90%, rgba(54, 232, 255, 0.1), transparent 42%),
    radial-gradient(circle at 82% 85%, rgba(166, 255, 94, 0.11), transparent 44%),
    linear-gradient(180deg, rgba(2, 6, 5, 0.54), rgba(1, 4, 4, 0.96)),
    url("../../assets/levels/monkey-rescue/level5_monkey_rescue_background.png") center / cover no-repeat,
    #050a08;
  color: #f4f1e8;
  isolation: isolate;
}
#start:not(.map-open)::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    repeating-linear-gradient(
      to bottom,
      rgba(0, 0, 0, 0) 0,
      rgba(0, 0, 0, 0) 3px,
      rgba(0, 0, 0, 0.3) 4px,
      rgba(0, 0, 0, 0) 5px
    ),
    radial-gradient(ellipse at center, transparent 36%, rgba(0, 0, 0, 0.72) 100%);
  opacity: 0.86;
}
#start:not(.map-open)::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    radial-gradient(circle, rgba(255, 211, 107, 0.58) 0 2px, transparent 3px),
    radial-gradient(circle, rgba(126, 255, 140, 0.42) 0 2px, transparent 3px),
    linear-gradient(rgba(126, 255, 140, 0.14) 1px, transparent 1px),
    linear-gradient(90deg, rgba(126, 255, 140, 0.14) 1px, transparent 1px);
  background-size: 180px 220px, 260px 240px, 76px 76px, 76px 76px;
  background-position: 12% 110%, 74% 100%, center 78%, center 78%;
  mask-image: linear-gradient(180deg, transparent 0%, black 46%, black 100%);
  opacity: 0.22;
  animation: startEmbers 12s linear infinite;
}
@keyframes startEmbers {
  from {
    background-position: 12% 110%, 74% 100%, center 78%, center 78%;
  }
  to {
    background-position: 16% -12%, 70% -18%, center 78%, center 78%;
  }
}
#start:not(.map-open) #startPanel {
  width: min(1240px, 100%);
  display: grid;
  grid-template-columns: 1fr;
  gap: 34px;
  position: relative;
  z-index: 1;
}
#start:not(.map-open) #menuIntro {
  display: grid;
  grid-template-columns: minmax(300px, auto) minmax(260px, 1fr) minmax(250px, 338px);
  gap: 18px;
  align-items: start;
  width: 100%;
}
#start:not(.map-open) #startPanel h1 {
  margin: -4px 0 0;
  color: #fff7ce;
  font-family: Impact, "Arial Black", system-ui, sans-serif;
  font-size: 68px;
  line-height: 0.9;
  letter-spacing: 0;
  text-transform: uppercase;
  text-shadow:
    0 0 24px rgba(255, 176, 26, 0.28),
    0 6px 0 rgba(0, 0, 0, 0.62);
}
#start:not(.map-open) #startPanel .subtitle {
  max-width: 520px;
  color: rgba(244, 241, 232, 0.78);
  font-size: 16px;
  line-height: 1.42;
}
#start:not(.map-open) #inputHint {
  margin: 0;
  padding: 12px;
  border: 1px solid rgba(255, 211, 107, 0.34);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.72);
  color: rgba(244, 241, 232, 0.86);
  font-size: 13px;
  line-height: 1.5;
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.28);
}
#start:not(.map-open) #sprintSnippet {
  display: none;
}
#start:not(.map-open) #bestSnippet,
#start:not(.map-open) #adventureMapStatus,
#start:not(.map-open) #bridgeSnippet {
  grid-column: 1;
  width: min(246px, 100%);
  margin: -6px 0 0;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid rgba(141, 252, 255, 0.48);
  background: rgba(9, 35, 32, 0.78);
  color: #dffcff;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.25;
}
#start:not(.map-open) #bestSnippet:empty {
  display: none;
}
#start:not(.map-open) #adventureMapStatus:empty {
  display: none;
}
#adventureMapStatus {
  overflow-wrap: anywhere;
}
#adventureMapStatus > div + div {
  margin-top: 3px;
}
#start.map-open #adventureMapStatus {
  position: absolute;
  left: 16px;
  top: 54px;
  z-index: 4;
  max-width: min(280px, calc(100% - 32px));
  padding: 6px 8px;
  border: 1px solid rgba(255, 243, 184, 0.42);
  border-radius: 8px;
  background: rgba(55, 31, 14, 0.72);
  color: #fff3b8;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.2;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.24);
  pointer-events: none;
}
#start.map-open .mapStamp {
  position: absolute;
  right: -8px;
  top: -10px;
  z-index: 5;
  max-width: 92px;
  min-height: 20px;
  padding: 3px 6px;
  display: none;
  align-items: center;
  justify-content: center;
  border: 2px solid #2a1608;
  border-radius: 8px;
  background: #ffd36b;
  color: #10130d;
  font-size: 10px;
  font-weight: 900;
  line-height: 1.05;
  text-align: center;
  box-shadow: 0 8px 14px rgba(0, 0, 0, 0.28);
  pointer-events: none;
}
#start.map-open .mapTrail {
  position: absolute;
  left: 50%;
  bottom: -12px;
  z-index: 4;
  padding: 2px 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(141, 252, 255, 0.52);
  border-radius: 8px;
  background: rgba(7, 28, 32, 0.8);
  color: #dffcff;
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
  transform: translateX(-50%);
  pointer-events: none;
  white-space: nowrap;
}
.mapStoryBadge {
  display: none;
}
#start.map-open .mapStoryBadge {
  position: absolute;
  left: -8px;
  top: -10px;
  z-index: 5;
  min-height: 20px;
  padding: 3px 6px;
  align-items: center;
  justify-content: center;
  border: 2px solid rgba(255, 243, 184, 0.88);
  border-radius: 999px;
  background: #eaf7ff;
  color: #123043;
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 8px 14px rgba(0, 0, 0, 0.22);
  pointer-events: none;
  white-space: nowrap;
}
#start.map-open .menuTile.mapStoryLinked .mapStoryBadge {
  display: flex;
}
#start.map-open .menuTile.mapStoryComplete .mapStoryBadge {
  background: #a8ff90;
  color: #10130d;
}
#start.map-open .mapStopLit .mapStamp,
#start.map-open .mapStopNext .mapStamp,
#start.map-open .mapStopLocked .mapStamp {
  display: flex;
}
#start.map-open .mapStopNext .mapStamp {
  background: #a8ff90;
  color: #10130d;
}
#start.map-open .mapStopLocked .mapStamp {
  left: 50%;
  right: auto;
  top: auto;
  bottom: -14px;
  z-index: 10;
  border-color: #1d251f;
  background: #fff3b8;
  color: #241705;
  transform: translateX(-50%);
}
#start.map-open .mapStopLit > .tileTitle {
  border-color: #ffd36b;
  box-shadow:
    0 0 0 2px rgba(255, 211, 107, 0.34),
    0 0 18px rgba(255, 211, 107, 0.42);
}
.adventureMapEarnedLine {
  margin: 10px auto 0;
  max-width: 420px;
  padding: 8px 10px;
  border: 1px solid rgba(255, 211, 107, 0.48);
  border-radius: 8px;
  background: rgba(255, 211, 107, 0.12);
  color: #fff3b8;
  font-weight: 900;
  line-height: 1.25;
}
.adventureMapEarnedLine > div + div {
  margin-top: 5px;
}
.adventureMapEarnedLine button {
  margin-left: 8px;
  min-height: 26px;
  padding: 3px 8px;
  border: 1px solid rgba(255, 243, 184, 0.72);
  border-radius: 8px;
  background: rgba(255, 211, 107, 0.22);
  color: #fff3b8;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}
.adventureMapEarnedLine button:hover,
.adventureMapEarnedLine button:focus-visible {
  background: rgba(255, 211, 107, 0.36);
  outline: 2px solid rgba(141, 252, 255, 0.85);
  outline-offset: 2px;
}
@media (max-width: 760px) {
  #start.map-open #adventureMapStatus {
    position: static;
    max-width: none;
    margin: 0;
    padding: 8px 10px;
    border-radius: 8px;
    background: rgba(255, 211, 107, 0.12);
    box-shadow: none;
  }
  #start.map-open .mapStamp,
  #start.map-open .mapTrail {
    position: static;
    max-width: none;
    min-height: 0;
    justify-self: start;
    transform: none;
  }
  #start.map-open .mapStamp {
    margin-top: 4px;
  }
  #start.map-open .mapStopLit .mapStamp,
  #start.map-open .mapStopNext .mapStamp,
  #start.map-open .mapStopLocked .mapStamp {
    display: none;
  }
  #start.map-open .mapTrail {
    width: max-content;
    margin-top: 3px;
  }
  #start.map-open .mapStoryBadge {
    display: none !important;
  }
}
#start:not(.map-open) #helperChoice {
  width: min(790px, calc(100% - 210px));
  max-width: none;
  margin: 6px auto 0;
  padding: 16px;
  gap: 12px;
  border: 2px solid rgba(255, 211, 107, 0.52);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(3, 44, 32, 0.96), rgba(0, 31, 24, 0.96)),
    rgba(3, 42, 30, 0.94);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.72) inset,
    0 0 46px rgba(255, 176, 26, 0.08),
    0 28px 58px rgba(0, 0, 0, 0.48);
}
#start:not(.map-open) #helperChoice::before {
  content: "Choose Your Hero";
  font-size: 32px;
  color: #ffd36b;
  letter-spacing: 0;
  text-shadow:
    0 0 14px rgba(255, 176, 26, 0.5),
    0 4px 0 rgba(0, 0, 0, 0.72);
}
#start:not(.map-open) #helperChoiceTitle,
#start:not(.map-open) #practicePathTitle {
  color: #ffd36b;
  font-size: 12px;
  letter-spacing: 0;
}
#start:not(.map-open) #helperChoiceButtons {
  gap: 10px;
}
#start:not(.map-open) #helperChoiceButtons button {
  position: relative;
  min-height: 182px;
  margin: 0;
  padding: 10px 10px 9px;
  display: grid;
  place-items: center;
  align-content: center;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 28%, rgba(255, 211, 107, 0.13), transparent 38%),
    linear-gradient(180deg, rgba(36, 75, 61, 0.96), rgba(24, 58, 49, 0.94));
  border-color: rgba(244, 241, 232, 0.24);
  color: #f4f1e8;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease,
    background 180ms ease;
}
#start:not(.map-open) #helperChoiceButtons button:hover,
#start:not(.map-open) #helperChoiceButtons button:focus-visible {
  transform: translateY(-3px);
  border-color: var(--hero-accent, #ffd36b);
  box-shadow: 0 0 26px rgba(255, 211, 107, 0.18);
}
#start:not(.map-open) #helperChoiceButtons [data-helper="croc"] {
  --hero-accent: #76dd68;
}
#start:not(.map-open) #helperChoiceButtons [data-helper="firefly"] {
  --hero-accent: #ffd36b;
}
#start:not(.map-open) #helperChoiceButtons [data-helper="monkey"] {
  --hero-accent: #ffb070;
}
#start:not(.map-open) #helperChoiceButtons button::before {
  width: 74px;
  height: 132px;
  margin: 0 auto 6px;
  background-size: 300% auto;
  background-color: transparent;
  border-color: rgba(255, 211, 107, 0.72);
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.22);
}
#start:not(.map-open) #helperChoiceButtons button.selected {
  border-color: #ffd36b;
  background:
    radial-gradient(circle at 50% 28%, rgba(255, 211, 107, 0.24), transparent 42%),
    linear-gradient(180deg, rgba(122, 106, 45, 0.92), rgba(73, 62, 28, 0.92));
  box-shadow:
    0 0 0 1px #ffd36b,
    0 0 38px rgba(255, 211, 107, 0.34),
    0 18px 30px rgba(0, 0, 0, 0.36);
}
#start:not(.map-open) #helperChoiceStatus,
#start:not(.map-open) #practicePathStatus {
  border-radius: 8px;
  background: rgba(0, 20, 15, 0.72);
  color: #dffcff;
  font-size: 14px;
}
#start:not(.map-open) #practicePathButtons {
  gap: 10px;
}
#start:not(.map-open) #practicePathButtons button,
#start:not(.map-open) #helperKeepGoingBtn,
#start:not(.map-open) #helperFullRunBtn,
#start:not(.map-open) #helperChoiceMapBtn {
  min-height: 64px;
  margin: 0;
  border-color: rgba(244, 241, 232, 0.26);
  background: rgba(43, 82, 68, 0.78);
  color: #f4f1e8;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease;
}
#start:not(.map-open) #practicePathButtons button:hover,
#start:not(.map-open) #practicePathButtons button:focus-visible,
#start:not(.map-open) #helperKeepGoingBtn:hover,
#start:not(.map-open) #helperKeepGoingBtn:focus-visible,
#start:not(.map-open) #helperFullRunBtn:hover,
#start:not(.map-open) #helperFullRunBtn:focus-visible,
#start:not(.map-open) #helperChoiceMapBtn:hover,
#start:not(.map-open) #helperChoiceMapBtn:focus-visible {
  transform: translateY(-2px);
  border-color: #8dfcff;
  box-shadow: 0 0 24px rgba(141, 252, 255, 0.24);
}
#start:not(.map-open) #practicePathButtons button.selected {
  border-color: #8dfcff;
  background: rgba(44, 92, 84, 0.94);
  box-shadow: 0 0 0 1px #8dfcff, 0 0 28px rgba(141, 252, 255, 0.26);
}
#start:not(.map-open) #helperReadyPreview {
  right: -154px;
  bottom: -2px;
  width: 160px;
  height: 318px;
  background-size: contain;
  background-repeat: no-repeat;
  background-color: transparent;
  border: 0;
  box-shadow:
    0 22px 34px rgba(0, 0, 0, 0.42);
}
#start:not(.map-open) #helperChoiceActions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
#start:not(.map-open) #helperKeepGoingBtn {
  min-height: 74px;
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: rgba(255, 211, 107, 0.22);
  color: #fff7ce;
  text-align: left;
  overflow: hidden;
}
#start:not(.map-open) #helperKeepGoingBtn.mapCompleteReplay {
  border-color: rgba(93, 214, 139, 0.74);
  background: rgba(93, 214, 139, 0.18);
  color: #d9ffe6;
}
#start:not(.map-open) #helperKeepGoingBtn.mapCompleteReplay #helperKeepGoingThumb {
  border-color: rgba(93, 214, 139, 0.82);
}
#helperKeepGoingThumb {
  width: 100%;
  height: 60px;
  display: block;
  object-fit: cover;
  border: 2px solid rgba(255, 232, 166, 0.84);
  border-radius: 8px;
  background: #16321f;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.28);
}
#helperKeepGoingLabel {
  color: #fff7ce;
  font-size: 18px;
  font-weight: 950;
  line-height: 1;
}
#helperKeepGoingBtn .keepGoingCopy {
  min-width: 0;
}
#helperKeepGoingCompleteChip {
  width: fit-content;
  max-width: 100%;
  min-height: 18px;
  margin-top: 5px;
  padding: 3px 7px;
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(93, 214, 139, 0.7);
  border-radius: 8px;
  background: rgba(93, 214, 139, 0.18);
  color: #d9ffe6;
  font-size: 10px;
  font-weight: 950;
  line-height: 1;
  white-space: nowrap;
}
#helperKeepGoingCoachChip {
  width: fit-content;
  max-width: 100%;
  min-height: 18px;
  margin-top: 5px;
  padding: 3px 7px;
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(93, 61, 18, 0.42);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.3);
  color: #4a3305;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.1;
}
#helperKeepGoingReplayChip {
  width: fit-content;
  max-width: 100%;
  min-height: 18px;
  margin-top: 5px;
  margin-left: 5px;
  padding: 3px 7px;
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(31, 94, 120, 0.5);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.3);
  color: #14485e;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}
#helperKeepGoingCompleteChip[hidden],
#helperKeepGoingCoachChip[hidden],
#helperKeepGoingReplayChip[hidden] {
  display: none !important;
}
#start:not(.map-open) #helperFullRunBtn {
  background: rgba(255, 211, 107, 0.14);
  color: #fff7ce;
}
#start:not(.map-open) #helperChoiceMapBtn {
  background: rgba(141, 252, 255, 0.12);
  color: #dffcff;
}
@media (max-width: 980px) {
  #start:not(.map-open) #menuIntro {
    grid-template-columns: 1fr;
    max-width: calc(100vw - 20px);
    min-width: 0;
    text-align: center;
  }
  #start:not(.map-open) #menuIntro > * {
    min-width: 0;
  }
  #start:not(.map-open) #startPanel .subtitle,
  #start:not(.map-open) #inputHint,
  #start:not(.map-open) #bestSnippet,
  #start:not(.map-open) #bridgeSnippet {
    box-sizing: border-box;
    max-width: none;
    width: 100%;
    overflow-wrap: anywhere;
  }
  #start:not(.map-open) #helperChoice {
    width: 100%;
    margin-top: 0;
  }
  #start:not(.map-open) #helperReadyPreview {
    display: none;
  }
}
@media (max-width: 620px) {
  #start:not(.map-open) {
    padding: 14px 10px 42px;
  }
  #start:not(.map-open) #startPanel {
    width: 100%;
    min-width: 0;
  }
  #start:not(.map-open) #menuIntro {
    max-width: 100%;
  }
  #start:not(.map-open) #inputHint {
    padding: 10px 8px;
    font-size: 12px;
  }
  #start:not(.map-open) #startPanel {
    gap: 16px;
  }
  #start:not(.map-open) #startPanel h1 {
    font-size: 42px;
  }
  #start:not(.map-open) #helperChoice {
    padding: 12px;
  }
  #start:not(.map-open) #helperChoiceActions {
    order: 1;
  }
  #start:not(.map-open) #helperChoiceTitle {
    order: 2;
  }
  #start:not(.map-open) #helperChoiceButtons {
    order: 3;
  }
  #start:not(.map-open) #helperChoiceStatus {
    order: 4;
  }
  #start:not(.map-open) #practicePathTitle {
    order: 5;
  }
  #start:not(.map-open) #practicePathButtons {
    order: 6;
  }
  #start:not(.map-open) #practicePathStatus {
    order: 7;
  }
  #start:not(.map-open) #helperChoiceButtons,
  #start:not(.map-open) #practicePathButtons {
    grid-template-columns: 1fr;
  }
  #start:not(.map-open) #helperChoiceActions {
    grid-template-columns: 1fr;
  }
  #start:not(.map-open) #helperChoiceButtons button {
    min-height: 112px;
    grid-template-columns: 72px 1fr;
    justify-items: start;
    text-align: left;
  }
  #start:not(.map-open) #helperChoiceButtons button::before {
    width: 54px;
    height: 96px;
    margin: 0;
  }
}
@media (min-width: 981px) and (max-height: 820px) {
  #start:not(.map-open) {
    padding: 14px 16px 24px;
  }
  #start:not(.map-open) #startPanel {
    gap: 12px;
  }
  #start:not(.map-open) #startPanel h1 {
    font-size: 56px;
  }
  #start:not(.map-open) #menuIntro {
    gap: 14px;
  }
  #start:not(.map-open) #helperChoice {
    padding: 12px;
    gap: 8px;
  }
  #start:not(.map-open) #helperChoice::before {
    font-size: 27px;
  }
  #start:not(.map-open) #helperChoiceButtons button {
    min-height: 142px;
    padding: 8px;
  }
  #start:not(.map-open) #helperChoiceButtons button::before {
    width: 62px;
    height: 108px;
    margin-bottom: 4px;
  }
  #start:not(.map-open) #practicePathButtons button,
  #start:not(.map-open) #helperFullRunBtn,
  #start:not(.map-open) #helperChoiceMapBtn {
    min-height: 48px;
  }
  #start:not(.map-open) #helperReadyPreview {
    width: 130px;
    height: 258px;
    right: -126px;
  }
}
#pauseBadge {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 42px;
  font-weight: 900;
  color: #ffd36b;
  background: rgba(0, 0, 0, 0.62);
  padding: 14px 30px;
  border-radius: 12px;
  display: none;
  pointer-events: none;
  z-index: 11;
  text-shadow:
    0 0 12px rgba(255, 211, 107, 0.45),
    0 2px 4px rgba(0, 0, 0, 0.7);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}
#pauseBadge.show {
  display: block;
}
#pauseBadge.show::after {
  content: "";
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: -1;
}
#muteBadge {
  position: fixed;
  top: 12px;
  left: 12px;
  background: rgba(0, 0, 0, 0.7);
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  display: none;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.78);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.24);
}
#muteBadge.show {
  display: block;
}
/* When the touch settings pad is visible the mute state is shown
   on the pad button itself; hide the corner badge to avoid overlap. */
body.show-touch-pad #muteBadge {
  display: none !important;
}
/* AGENT_TARGET: slip1-settings-modal */
#inputHint {
  margin-top: 18px;
  font-size: 15px;
  line-height: 1.6;
}
#inputHintBadge {
  position: fixed;
  bottom: 54px;
  left: 12px;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 11px;
  color: #cfd8d0;
  display: none;
  z-index: 20;
  transition: opacity 0.3s;
}
#inputHintBadge.show {
  display: block;
}
/* AGENT_TARGET: powerup-craft-ui — pre-run crafting panel in settings modal */
.craft-section-title {
  margin: 14px 0 6px;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #8dfcff;
  opacity: 0.75;
}
.craft-selects {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.craft-selects select {
  background: rgba(0,0,0,0.55);
  border: 1px solid rgba(141,252,255,0.35);
  color: #d4f5f8;
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 13px;
  flex: 1;
  min-width: 110px;
}
.craft-plus {
  color: #8dfcff;
  font-size: 18px;
  font-weight: bold;
  line-height: 1;
}
#craftResult {
  margin-top: 8px;
  font-size: 13px;
  min-height: 20px;
  color: #ffd36b;
  font-weight: bold;
  letter-spacing: 0.04em;
}
/* AGENT_TARGET: slip2-daily-missions — panel, button, mission rows */
#dailyMissionsBtn {
  position: relative;
}
#dailyMissionsDot {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 10px;
  height: 10px;
  background: #f59e0b;
  border-radius: 50%;
  display: none;
}
#dailyMissionsOverlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.78);
  z-index: 120;
  align-items: center;
  justify-content: center;
}
#dailyMissionsOverlay.open {
  display: flex;
}
#dailyMissionsPanel {
  background: #1a2e1a;
  border: 2px solid #4ade80;
  border-radius: 16px;
  position: relative;
  overflow: hidden;
  padding: 28px 32px;
  max-width: 480px;
  width: 92%;
  color: #e5f5e0;
}
#dailyMissionsPanel h2 {
  margin: 0 0 4px;
  font-size: 22px;
  color: #86efac;
}
#dailyMissionsPanel .dm-subtitle {
  font-size: 12px;
  color: #6b9c6b;
  margin-bottom: 20px;
}
.dm-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  padding: 10px 14px;
}
.dm-row.done {
  opacity: 0.55;
}
.dm-info {
  flex: 1;
}
.dm-label {
  font-size: 14px;
  font-weight: 600;
}
.dm-bar-wrap {
  height: 6px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 3px;
  margin-top: 5px;
  overflow: hidden;
}
.dm-bar {
  height: 100%;
  background: #4ade80;
  border-radius: 3px;
  transition: width 0.3s;
}
.dm-xp {
  font-size: 12px;
  color: #fbbf24;
  white-space: nowrap;
}
.dm-check {
  font-size: 20px;
}
.dm-confetti {
  position: absolute;
  left: 50%;
  top: 62px;
  width: 9px;
  height: 14px;
  border-radius: 3px;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, 0) rotate(0deg);
  animation: dmConfettiPop 820ms cubic-bezier(0.16, 0.84, 0.32, 1) forwards;
  animation-delay: var(--dm-delay, 0ms);
}
@keyframes dmConfettiPop {
  0% {
    opacity: 0;
    transform: translate(-50%, 0) scale(0.6) rotate(0deg);
  }
  18% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate(calc(-50% + var(--dm-x)), var(--dm-y)) scale(1)
      rotate(var(--dm-r));
  }
}
@media (prefers-reduced-motion: reduce) {
  .dm-confetti {
    display: none;
  }
}
#dailyMissionsClose {
  margin-top: 18px;
  width: 100%;
  padding: 10px;
  border: none;
  border-radius: 8px;
  background: #166534;
  color: #bbf7d0;
  font-size: 14px;
  cursor: pointer;
}
#settingsBtn {
  position: fixed;
  bottom: max(64px, calc(env(safe-area-inset-bottom) + 64px));
  left: 12px;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #f3f7f1;
  font-size: 22px;
  width: 48px;
  height: 48px;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 20;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3);
  transition:
    transform 0.16s cubic-bezier(0.22, 0.61, 0.36, 1),
    background 0.16s cubic-bezier(0.22, 0.61, 0.36, 1);
}
#settingsBtn:hover {
  background: rgba(0, 0, 0, 0.7);
  transform: translateY(-1px);
}
#settingsBtn:active {
  transform: translateY(0) scale(0.95);
}
body:has(#start.show) #settingsBtn {
  top: max(12px, env(safe-area-inset-top));
  right: 12px;
  bottom: auto;
  left: auto;
}
@media (max-width: 760px) {
  body:has(#start.show.map-open) #settingsBtn {
    top: max(6px, env(safe-area-inset-top));
    right: 20px;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    font-size: 17px;
  }
}
#settingsModal {
  position: fixed;
  inset: 0;
  display: none;
  place-items: center;
  padding: 12px;
  overflow-y: auto;
  background: rgba(0, 0, 0, 0.72);
  z-index: 30;
}
#settingsModal.show {
  display: grid;
}
#settingsPanel {
  box-sizing: border-box;
  width: min(520px, calc(100vw - 24px));
  max-height: calc(100svh - 24px);
  overflow-y: auto;
  background: #1a2820;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  padding: 28px 32px;
  min-width: 0;
  color: #cfd8d0;
  font-family: system-ui, sans-serif;
}
#settingsPanel h2 {
  margin: 0 0 20px;
  font-size: 20px;
  color: #ffd36b;
}
.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  gap: 16px;
}
.settings-row[hidden] {
  display: none !important;
}
.settings-row label {
  font-size: 14px;
  min-width: 140px;
}
.settings-row input[type="range"] {
  flex: 1;
  accent-color: #ffd36b;
}
.settings-row .val {
  font-size: 13px;
  color: #ffd36b;
  min-width: 36px;
  text-align: right;
}
.settings-hint {
  margin: -10px 0 16px;
  color: #d7e6db;
  font-size: 12px;
  line-height: 1.25;
  opacity: 0.78;
}
body.high-contrast .settings-hint {
  color: #ffffff;
  opacity: 1;
}
#contrastPreview {
  margin: -4px 0 18px;
  padding: 12px;
  border: 2px solid rgba(255, 211, 107, 0.38);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
}
#contrastPreviewTitle {
  margin-bottom: 9px;
  color: #ffd36b;
  font-size: 13px;
  font-weight: 800;
}
.contrast-preview-samples {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.contrast-sample {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  border: 2px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  background: rgba(10, 24, 18, 0.82);
  color: #dffcff;
  font-size: 22px;
  font-weight: 900;
}
.contrast-sample.target {
  color: #ffe08a;
}
#contrastPreview.contrast-on {
  border-color: #ffffff;
  background: #000000;
}
#contrastPreview.contrast-on .contrast-sample {
  border-color: #ffffff;
  background: #000000;
  color: #ffffff;
  box-shadow: inset 0 0 0 3px #ffff00;
}
#contrastPreview.contrast-on .contrast-sample.target {
  color: #ffff00;
}
.settings-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 20px;
}
#settingsClose,
#settingsDefaultsBtn {
  margin-top: 0;
  padding: 14px 26px;
  min-height: 48px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 800;
  touch-action: manipulation;
}
#settingsClose {
  background: #ffd36b;
  color: #10130d;
  border: 0;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.28);
  transition:
    transform 0.16s cubic-bezier(0.22, 0.61, 0.36, 1),
    box-shadow 0.16s cubic-bezier(0.22, 0.61, 0.36, 1);
}
#settingsDefaultsBtn {
  background: rgba(141, 252, 255, 0.12);
  color: #dffcff;
  border: 1px solid rgba(141, 252, 255, 0.45);
  font-size: 14px;
  transition:
    transform 0.16s cubic-bezier(0.22, 0.61, 0.36, 1),
    box-shadow 0.16s cubic-bezier(0.22, 0.61, 0.36, 1);
}
#settingsClose:hover,
#settingsDefaultsBtn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.34);
}
#settingsClose:active,
#settingsDefaultsBtn:active {
  transform: translateY(0) scale(0.97);
}
body.high-contrast #settingsDefaultsBtn {
  background: #000000;
  color: #ffffff;
  border-color: #ffffff;
}
@media (max-width: 520px) {
  #settingsPanel {
    padding: 24px 18px;
  }
  .settings-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px 10px;
    align-items: center;
  }
  .settings-row label {
    grid-column: 1 / -1;
    min-width: 0;
  }
  .settings-row input[type="range"] {
    grid-column: 1;
    min-width: 0;
  }
  .settings-row .val {
    grid-column: 2;
    min-width: 44px;
  }
  .settings-actions {
    flex-direction: column-reverse;
    align-items: stretch;
  }
}
/* AGENT_TARGET: slip2-firebase-leaderboard */
#leaderboardModal {
  position: fixed;
  inset: 0;
  display: none;
  place-items: center;
  background: rgba(0, 0, 0, 0.72);
  z-index: 31;
}
#leaderboardModal.show { display: none; }
#leaderboardPanel {
  background: #1a2820;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 12px;
  padding: 24px 28px;
  min-width: 300px;
  max-width: 420px;
  width: 90vw;
  color: #cfd8d0;
  font-family: system-ui, sans-serif;
}
#leaderboardPanel h2 { margin: 0 0 16px; font-size: 20px; color: #ffd36b; }
#leaderboardNickRow {
  display: flex; gap: 8px; margin-bottom: 14px;
}
#leaderboardNick {
  flex: 1; padding: 8px 10px; border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.07); color: #f3f7f1;
  font-size: 15px;
}
#leaderboardSubmitBtn {
  padding: 8px 16px; background: #ffd36b; color: #10130d;
  border: 0; border-radius: 6px; font-weight: 800;
  cursor: pointer; font-size: 14px; white-space: nowrap;
}
#leaderboardStatus {
  font-size: 13px; min-height: 18px; margin-bottom: 12px;
  color: #a3e2b4;
}
#leaderboardList { list-style: none; padding: 0; margin: 0 0 16px; }
#leaderboardList li {
  display: flex; justify-content: space-between;
  padding: 5px 0; border-bottom: 1px solid rgba(255,255,255,0.07);
  font-size: 14px;
}
#leaderboardList li:first-child { color: #ffd36b; font-weight: 700; }
#leaderboardClose {
  width: 100%; padding: 12px; background: rgba(255,255,255,0.1);
  color: #cfd8d0; border: 0; border-radius: 8px;
  cursor: pointer; font-size: 15px;
}
#leaderboardBtn {
  display: none;
  margin-top: 8px;
  padding: 10px 18px;
  background: rgba(255,211,107,0.15);
  border: 1px solid #ffd36b;
  color: #ffd36b;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  touch-action: manipulation;
}
#leaderboardBtn,
#shareClipBtn,
#leaderboardModal,
#shareClipUrl {
  display: none !important;
}
/* AGENT_TARGET: skin-unlock-showcase */
#skinShowcase {
  margin: 8px 0 4px;
  text-align: center;
  font-family: inherit;
}
.skin-showcase-label {
  font-size: 11px;
  opacity: 0.6;
  margin-bottom: 5px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.skin-showcase-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
}
.skin-chip {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  background: rgba(0,0,0,0.35);
  border: 1.5px solid rgba(255,255,255,0.18);
  border-radius: 8px;
  padding: 4px 8px;
  min-width: 46px;
  cursor: default;
  transition: border-color 0.2s;
}
.skin-chip.owned {
  border-color: rgba(255,211,63,0.7);
  background: rgba(255,211,63,0.12);
}
.skin-chip-icon {
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.01em;
}
.skin-chip-hint {
  font-size: 9px;
  margin-top: 2px;
  opacity: 0.75;
  color: #ffd23f;
}
.skin-chip:not(.owned) .skin-chip-hint {
  color: rgba(255,255,255,0.5);
}

/* AGENT_TARGET: slip1-cosmetics-shop */
#cosmeticsModal {
  position: fixed;
  inset: 0;
  display: none;
  place-items: center;
  background: rgba(0, 0, 0, 0.8);
  z-index: 40;
}
#cosmeticsModal.show {
  display: grid;
}
#cosmeticsPanel {
  background: #1a2820;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 14px;
  padding: 28px 32px;
  min-width: 360px;
  max-width: 480px;
  color: #cfd8d0;
  font-family: system-ui, sans-serif;
}
#cosmeticsPanel h2 {
  margin: 0 0 4px;
  color: #ffd36b;
  font-size: 20px;
}
#cosmeticsPanel .bank-row {
  font-size: 13px;
  margin-bottom: 18px;
  opacity: 0.8;
}
.cosmetic-section-title {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  opacity: 0.6;
  margin: 14px 0 6px;
}
.cosmetic-grid {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}
.cosmetic-item {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  position: relative;
  overflow: hidden;
  padding: 12px 14px;
  min-height: 56px;
  cursor: pointer;
  font-size: 14px;
  text-align: center;
  min-width: 88px;
  touch-action: manipulation;
  transition: border-color 0.15s;
}
.cosmetic-item.unlocked {
  border-color: #4fc87a;
}
.cosmetic-item.selected {
  background: rgba(79, 200, 122, 0.18);
  border-color: #ffd36b;
}
.cosmetic-item.locked {
  opacity: 0.6;
}
.cosmetic-item .item-icon {
  font-size: 22px;
  display: block;
  margin-bottom: 3px;
}
.cosmetic-item .item-cost {
  font-size: 11px;
  color: #ffd36b;
}
#cosmeticsClose {
  margin-top: 20px;
  padding: 14px 26px;
  min-height: 48px;
  background: #ffd36b;
  color: #10130d;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 800;
  touch-action: manipulation;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.28);
  transition:
    transform 0.16s cubic-bezier(0.22, 0.61, 0.36, 1),
    box-shadow 0.16s cubic-bezier(0.22, 0.61, 0.36, 1);
}
#cosmeticsClose:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.34);
}
#cosmeticsClose:active {
  transform: translateY(0) scale(0.97);
}
.cosmetic-item {
  transition:
    border-color 0.15s cubic-bezier(0.22, 0.61, 0.36, 1),
    transform 0.15s cubic-bezier(0.22, 0.61, 0.36, 1),
    background 0.15s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.cosmetic-item:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.1);
}
.cosmetic-item.unlocked:hover {
  border-color: #6fdc94;
}
.cosmetic-item.selected {
  box-shadow: 0 0 0 2px rgba(255, 211, 107, 0.5);
}
.cosmetic-item.cosmetic-select-burst {
  animation: cosmeticSelectPop 420ms cubic-bezier(0.22, 0.61, 0.36, 1);
}
.cosmetic-select-ring {
  position: absolute;
  inset: 8px;
  border: 2px solid rgba(255, 211, 107, 0.9);
  border-radius: 10px;
  pointer-events: none;
  opacity: 0;
  animation: cosmeticSelectRing 540ms ease-out forwards;
}
.cosmetic-select-ring.ring-1 {
  border-color: rgba(142, 244, 255, 0.9);
  animation-delay: 70ms;
}
.cosmetic-select-ring.ring-2 {
  border-color: rgba(142, 255, 139, 0.85);
  animation-delay: 140ms;
}
@keyframes cosmeticSelectPop {
  0% {
    transform: scale(1);
  }
  45% {
    transform: scale(1.06);
  }
  100% {
    transform: scale(1);
  }
}
@keyframes cosmeticSelectRing {
  0% {
    opacity: 0.9;
    transform: scale(0.72);
  }
  100% {
    opacity: 0;
    transform: scale(1.55);
  }
}
@media (prefers-reduced-motion: reduce) {
  .cosmetic-item.cosmetic-select-burst,
  .cosmetic-select-ring {
    animation: none;
  }
}
/* AGENT_TARGET: slip2-replay-share */
#shareClipBtn {
  display: none;
  margin-top: 10px;
  padding: 14px 22px;
  min-height: 48px;
  background: #3a86ff;
  color: #fff;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 700;
  touch-action: manipulation;
}
#shareClipBtn.show {
  display: none;
}
#shareClipUrl {
  display: none;
  margin-top: 8px;
  font-size: 12px;
  word-break: break-all;
  color: #9be9ff;
}
#shareClipUrl.show {
  display: none;
}
#readingSliderOverlay {
  position: fixed;
  inset: 0;
  display: none;
  place-items: center;
  padding: 14px;
  box-sizing: border-box;
  overflow: auto;
  background:
    linear-gradient(118deg, rgba(12, 13, 16, 0.97), rgba(22, 25, 27, 0.97) 48%, rgba(5, 9, 11, 0.98)),
    #080a0c;
  z-index: 72;
  color: #f7fff4;
}
#readingSliderOverlay.show {
  display: grid;
}
#readingSliderPanel {
  position: relative;
  width: min(980px, 100%);
  min-width: 0;
  max-width: calc(100vw - 28px);
  max-height: calc(100svh - 28px);
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto auto;
  gap: 10px;
  padding: clamp(12px, 2.4vw, 22px);
  box-sizing: border-box;
  overflow: auto;
  border: 3px solid rgba(255, 211, 107, 0.78);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(218, 29, 29, 0.22), transparent 20% 80%, rgba(0, 184, 212, 0.2)),
    linear-gradient(180deg, #171b1d, #071013 62%, #050709);
  box-shadow:
    0 28px 70px rgba(0, 0, 0, 0.55),
    inset 0 0 0 1px rgba(255, 255, 255, 0.09);
}
#readingSliderPanel::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 8px;
  background: linear-gradient(90deg, #d91f1f 0 32%, #ffd36b 32% 46%, #16bfd2 46% 100%);
  pointer-events: none;
}
#readingSliderHeader {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 211, 107, 0.28);
  border-radius: 7px;
  background:
    linear-gradient(90deg, rgba(217, 31, 31, 0.85), rgba(23, 27, 30, 0.95) 42%, rgba(7, 28, 34, 0.94)),
    #121519;
  box-shadow: inset 0 -4px 0 rgba(0, 0, 0, 0.34);
}
#readingSliderTitle {
  color: #ffffff;
  font-family: Impact, Arial Black, sans-serif;
  font-size: clamp(26px, 5vw, 44px);
  line-height: 1;
  letter-spacing: 0;
  text-transform: uppercase;
  text-shadow:
    0 3px 0 rgba(0, 0, 0, 0.8),
    0 0 14px rgba(255, 211, 107, 0.22);
}
#readingSliderCount {
  display: inline-flex;
  margin-top: 6px;
  padding: 4px 8px;
  border-radius: 5px;
  background: #ffd36b;
  color: #14120c;
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0;
}
#readingSliderCloseBtn,
#readingSliderSpeakBtn,
#readingSliderDeckTabs button {
  min-height: 44px;
  padding: 9px 13px;
  border: 2px solid rgba(255, 211, 107, 0.88);
  border-radius: 7px;
  background: linear-gradient(180deg, #322f1c, #171612);
  color: #fff7ce;
  font-size: 14px;
  font-weight: 900;
  cursor: pointer;
  touch-action: manipulation;
  box-shadow:
    inset 0 -3px 0 rgba(0, 0, 0, 0.28),
    0 3px 0 rgba(0, 0, 0, 0.28);
}
#readingSliderDeckTabs {
  display: grid;
  min-width: 0;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 8px;
  border: 1px solid rgba(255, 211, 107, 0.24);
  border-radius: 7px;
  background:
    linear-gradient(90deg, rgba(6, 12, 14, 0.86), rgba(17, 28, 24, 0.86)),
    #071013;
}
#readingSliderDeckTabs button {
  width: 100%;
  min-width: 0;
  padding-inline: 8px;
  background: linear-gradient(180deg, #193233, #0a1518);
  color: #dffcff;
  white-space: nowrap;
}
#readingSliderDeckTabs button.is-active,
#readingSliderDeckTabs button[aria-selected="true"] {
  border-color: #ffffff;
  background:
    linear-gradient(180deg, rgba(255, 211, 107, 0.38), rgba(255, 211, 107, 0) 42%),
    linear-gradient(180deg, #234244, #0a1518);
  color: #ffffff;
  box-shadow:
    inset 0 3px 0 #ffdf75,
    inset 0 -3px 0 rgba(0, 0, 0, 0.34),
    0 3px 0 rgba(0, 0, 0, 0.28);
}
#readingSliderStage {
  min-height: 0;
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(300px, 1.08fr) minmax(250px, 0.92fr);
  grid-template-areas:
    "image word"
    "image sentence"
    "image letters";
  gap: clamp(10px, 2vw, 18px);
  align-items: center;
}
#readingSliderImageFrame {
  grid-area: image;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  height: 100%;
  max-height: 100%;
  aspect-ratio: auto;
  position: relative;
  min-height: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 4px solid #ffd36b;
  border-radius: 7px;
  background: #050709;
  cursor: pointer;
  box-shadow:
    0 10px 0 rgba(0, 0, 0, 0.32),
    0 0 0 1px rgba(255, 255, 255, 0.18),
    inset 0 0 26px rgba(0, 0, 0, 0.42);
}
.readingSliderGlassArrow {
  position: absolute;
  top: 50%;
  z-index: 4;
  width: clamp(54px, 7vw, 72px);
  height: clamp(64px, 8vw, 86px);
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.74);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.62), rgba(141, 252, 255, 0.2) 42%, rgba(255, 211, 107, 0.22)),
    rgba(10, 32, 35, 0.36);
  color: #ffffff;
  font-size: clamp(44px, 7vw, 62px);
  font-weight: 950;
  line-height: 1;
  text-shadow: 0 3px 12px rgba(0, 0, 0, 0.62);
  cursor: pointer;
  transform: translateY(-50%);
  touch-action: manipulation;
  backdrop-filter: blur(16px) saturate(1.45);
  -webkit-backdrop-filter: blur(16px) saturate(1.45);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.78),
    inset 0 -14px 30px rgba(255, 255, 255, 0.13),
    0 12px 30px rgba(0, 0, 0, 0.36);
}
.readingSliderGlassArrow.prev {
  left: 12px;
}
.readingSliderGlassArrow.next {
  right: 12px;
}
.readingSliderGlassArrow:hover,
.readingSliderGlassArrow:focus-visible {
  border-color: rgba(255, 255, 255, 0.96);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.78), rgba(141, 252, 255, 0.3) 42%, rgba(255, 211, 107, 0.32)),
    rgba(12, 40, 44, 0.48);
  outline: 0;
}
.readingSliderGlassArrow:disabled {
  opacity: 0.38;
  cursor: default;
}
#readingSliderImageFrame::before {
  content: "LIVE";
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 1;
  padding: 4px 8px;
  border: 2px solid rgba(255, 255, 255, 0.72);
  border-radius: 5px;
  background: #d91f1f;
  color: #ffffff;
  font-size: 12px;
  font-weight: 950;
  line-height: 1;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.55);
}
#readingSliderImage {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
#readingSliderWord {
  grid-area: word;
  justify-self: start;
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.02em;
  padding: 8px 18px 12px;
  border: 3px solid rgba(255, 211, 107, 0.9);
  border-radius: 7px;
  background:
    linear-gradient(90deg, rgba(217, 31, 31, 0.94), rgba(22, 25, 28, 0.98) 48%, rgba(7, 28, 34, 0.94)),
    #121519;
  color: #ffffff;
  font-family: Impact, Arial Black, sans-serif;
  font-size: clamp(54px, 9.4vw, 108px);
  line-height: 0.92;
  letter-spacing: 0;
  text-transform: lowercase;
  text-shadow:
    0 4px 0 rgba(0, 0, 0, 0.68),
    0 0 18px rgba(255, 211, 107, 0.28);
  overflow-wrap: anywhere;
  box-shadow:
    inset 0 -8px 0 rgba(255, 211, 107, 0.22),
    0 10px 0 rgba(0, 0, 0, 0.34);
}
.readingSliderWordLetter {
  display: inline-block;
  padding-inline: 0.01em;
  opacity: 0.42;
  color: rgba(255, 255, 255, 0.72);
  transition:
    opacity 140ms ease,
    color 140ms ease,
    text-shadow 140ms ease,
    transform 140ms ease;
}
.readingSliderWordLetter.is-lit {
  opacity: 1;
  color: #fff7ce;
  text-shadow:
    0 4px 0 rgba(0, 0, 0, 0.68),
    0 0 18px rgba(255, 211, 107, 0.74),
    0 0 34px rgba(141, 252, 255, 0.38);
  transform: translateY(-1px);
}
.readingSliderWordLetter.is-space {
  width: 0.24em;
}
#readingSliderWord.is-highlighted {
  animation: readingWordHighlight 280ms ease-out;
}
#readingSliderWord.is-highlighted .readingSliderWordLetter {
  opacity: 1;
  color: #10130d;
  text-shadow: none;
}
@keyframes readingWordHighlight {
  0% {
    background: #ffd36b;
    box-shadow: 0 0 0 0 rgba(255, 211, 107, 0.55);
    transform: scale(1);
  }
  45% {
    background: #ffe39b;
    box-shadow: 0 0 0 8px rgba(255, 211, 107, 0.12);
    transform: scale(1.025);
  }
  100% {
    background: #ffd36b;
    box-shadow: 0 0 0 0 rgba(255, 211, 107, 0);
    transform: scale(1);
  }
}
#readingSliderSentence {
  grid-area: sentence;
  padding: 12px 14px;
  border: 2px solid rgba(0, 184, 212, 0.42);
  border-radius: 7px;
  background: linear-gradient(90deg, rgba(4, 7, 9, 0.92), rgba(7, 28, 34, 0.88));
  color: #f4fdff;
  font-size: clamp(20px, 3vw, 30px);
  font-weight: 900;
  line-height: 1.12;
  box-shadow: inset 0 -4px 0 rgba(0, 0, 0, 0.28);
}
#readingSliderLetters {
  grid-area: letters;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.readingSliderLetterChip {
  min-width: 42px;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid rgba(255, 211, 107, 0.82);
  border-radius: 7px;
  background: linear-gradient(180deg, rgba(32, 36, 38, 0.95), rgba(8, 10, 12, 0.96));
  color: #ffd36b;
  font-size: 28px;
  font-weight: 950;
  text-transform: lowercase;
  box-shadow:
    inset 0 -4px 0 rgba(217, 31, 31, 0.34),
    0 3px 0 rgba(0, 0, 0, 0.26);
}
.readingSliderLetterChip.is-lit {
  border-color: #ffffff;
  background:
    radial-gradient(circle at 30% 22%, rgba(255, 255, 255, 0.9), transparent 22%),
    linear-gradient(180deg, #fff7ce, #ffd36b 54%, #16bfd2);
  color: #171005;
  box-shadow:
    inset 0 -4px 0 rgba(0, 0, 0, 0.18),
    0 0 0 3px rgba(255, 211, 107, 0.22),
    0 8px 18px rgba(0, 0, 0, 0.28);
}
.readingSliderLetterChip.is-space {
  min-width: 16px;
  border-color: transparent;
  background: transparent;
  box-shadow: none;
}
#readingSliderControls {
  display: block;
  min-width: 0;
  padding: 4px 8px 0;
  border-radius: 7px;
  background: linear-gradient(90deg, rgba(217, 31, 31, 0.18), rgba(255, 211, 107, 0.08), rgba(0, 184, 212, 0.16));
}
#readingSliderRange {
  appearance: none;
  width: 100%;
  min-height: 64px;
  accent-color: #ffd36b;
  cursor: pointer;
  background: transparent;
  touch-action: pan-y;
}
#readingSliderRange::-webkit-slider-runnable-track {
  height: 16px;
  border: 2px solid rgba(255, 211, 107, 0.88);
  border-radius: 999px;
  background:
    linear-gradient(90deg, #d91f1f, #ffd36b 46%, #16bfd2),
    rgba(255, 255, 255, 0.1);
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.2),
    0 3px 0 rgba(0, 0, 0, 0.36);
}
#readingSliderRange::-moz-range-track {
  height: 16px;
  border: 2px solid rgba(255, 211, 107, 0.88);
  border-radius: 999px;
  background:
    linear-gradient(90deg, #d91f1f, #ffd36b 46%, #16bfd2),
    rgba(255, 255, 255, 0.1);
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.2),
    0 3px 0 rgba(0, 0, 0, 0.36);
}
#readingSliderRange::-webkit-slider-thumb {
  appearance: none;
  width: 56px;
  height: 56px;
  margin-top: -22px;
  border: 4px solid #fff7ce;
  border-radius: 50%;
  background:
    radial-gradient(circle at 34% 28%, #ffffff, transparent 18%),
    linear-gradient(180deg, #fff066, #d91f1f);
  box-shadow:
    0 4px 0 rgba(0, 0, 0, 0.42),
    0 0 0 5px rgba(22, 191, 210, 0.2);
}
#readingSliderRange::-moz-range-thumb {
  width: 56px;
  height: 56px;
  border: 4px solid #fff7ce;
  border-radius: 50%;
  background:
    radial-gradient(circle at 34% 28%, #ffffff, transparent 18%),
    linear-gradient(180deg, #fff066, #d91f1f);
  box-shadow:
    0 4px 0 rgba(0, 0, 0, 0.42),
    0 0 0 5px rgba(22, 191, 210, 0.2);
}
#readingSliderActions {
  display: flex;
  justify-content: center;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid rgba(255, 211, 107, 0.22);
  border-radius: 7px;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.5), rgba(7, 28, 34, 0.7)),
    #0a0d0f;
}
#readingSliderSpeakBtn {
  min-width: min(280px, 100%);
}
body.high-contrast #readingSliderPanel {
  background: #000000;
  border-color: #ffffff;
  color: #ffffff;
  box-shadow: none;
}
body.high-contrast #readingSliderTitle,
body.high-contrast .readingSliderLetterChip {
  color: #ffff00;
  text-shadow: none;
}
body.high-contrast #readingSliderCloseBtn,
body.high-contrast #readingSliderSpeakBtn,
body.high-contrast #readingSliderDeckTabs button,
body.high-contrast .readingSliderGlassArrow {
  background: #000000;
  border-color: #ffffff;
  color: #ffffff;
}
@media (max-width: 760px), (max-height: 620px) {
  #readingSliderOverlay {
    padding: 8px;
  }
  #start #utilityRow button.menuTile {
    min-width: 76px;
    padding: 7px 8px;
  }
  #start #utilityRow button.menuTile .tileMeta {
    display: none;
  }
  #utilityRow {
    flex-wrap: wrap;
    justify-content: flex-end;
    max-width: min(420px, calc(100% - 28px));
  }
  #readingSliderPanel {
    width: calc(100vw - 16px);
    max-width: calc(100vw - 16px);
    grid-template-rows: auto auto auto auto auto;
    max-height: calc(100svh - 16px);
    gap: 8px;
    padding: 8px 12px;
    overflow-x: hidden;
  }
  #readingSliderHeader {
    padding: 8px 10px;
  }
  #readingSliderTitle {
    max-width: calc(100% - 88px);
    font-size: clamp(22px, 7vw, 30px);
    line-height: 0.95;
  }
  #readingSliderStage {
    grid-template-columns: 1fr;
    grid-template-areas:
      "image"
      "word"
      "sentence"
      "letters";
    gap: 10px;
  }
  #readingSliderDeckTabs {
    gap: 6px;
    padding: 6px;
  }
  #readingSliderDeckTabs button,
  #readingSliderSpeakBtn {
    min-height: 42px;
    padding: 7px 6px;
    font-size: 12px;
    line-height: 1.05;
    white-space: normal;
  }
  .readingSliderGlassArrow {
    width: 48px;
    height: 58px;
    font-size: 42px;
  }
  .readingSliderGlassArrow.prev {
    left: 8px;
  }
  .readingSliderGlassArrow.next {
    right: 8px;
  }
  #readingSliderImageFrame {
    height: auto;
    max-height: none;
    aspect-ratio: 16 / 9;
    margin-bottom: 10px;
    border-width: 3px;
    box-shadow:
      0 6px 0 rgba(0, 0, 0, 0.3),
      0 0 0 1px rgba(255, 255, 255, 0.18),
      inset 0 0 18px rgba(0, 0, 0, 0.38);
  }
  #readingSliderActions {
    gap: 8px;
    padding: 8px;
  }
  #readingSliderWord {
    margin-top: 2px;
    padding: 5px 13px 9px;
    font-size: clamp(42px, 13.5vw, 62px);
    justify-self: center;
    text-align: center;
  }
  #readingSliderSentence {
    text-align: center;
    font-size: clamp(18px, 5.2vw, 22px);
  }
  #readingSliderLetters {
    justify-content: center;
  }
  #readingSliderRange {
    min-height: 52px;
  }
  .readingSliderLetterChip {
    min-width: 40px;
    min-height: 40px;
    font-size: 26px;
  }
}
#bookOverlay {
  position: fixed;
  inset: 0;
  display: none;
  place-items: center;
  background:
    radial-gradient(circle at 18% 12%, rgba(255, 211, 107, 0.16), transparent 30%),
    radial-gradient(circle at 82% 20%, rgba(105, 220, 148, 0.12), transparent 28%),
    linear-gradient(180deg, rgba(5, 18, 20, 0.96), rgba(2, 6, 8, 0.94));
  z-index: 70;
  color: #f4f0df;
}
#bookOverlay.show {
  display: grid;
}
#bookShell {
  width: min(1280px, calc(100vw - 28px));
  max-height: calc(100vh - 28px);
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 10px;
  justify-items: center;
}
#bookHeader,
#bookControls {
  width: min(1200px, 100%);
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
#bookHeader {
  padding: 10px 14px;
  border: 1px solid rgba(255, 246, 202, 0.18);
  border-radius: 8px;
  background: rgba(5, 15, 18, 0.74);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.28);
}
#bookControls {
  padding: 0 2px;
}
#bookTitle {
  font-size: 24px;
  font-weight: 900;
  color: #ffd36b;
  text-shadow: 0 3px 10px rgba(0, 0, 0, 0.68);
}
#bookPageCount {
  font-size: 14px;
  opacity: 0.78;
}
#bookChoices {
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(196px, 1fr));
  gap: clamp(12px, 1.3vw, 18px);
  width: min(1220px, 100%);
  min-height: min(66svh, 700px);
  padding: clamp(22px, 3vw, 38px) clamp(20px, 2.6vw, 36px) clamp(48px, 4vw, 64px);
  justify-self: center;
  overflow: hidden;
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(12, 45, 42, 0.72), rgba(5, 18, 16, 0.92)),
    linear-gradient(110deg, #193f38, #102723 52%, #071210);
  border: 1px solid rgba(255, 246, 202, 0.16);
  box-shadow: 0 24px 56px rgba(0, 0, 0, 0.36);
}
#bookChoices::before,
#bookChoices::after {
  content: "";
  position: absolute;
  left: clamp(14px, 2vw, 26px);
  right: clamp(14px, 2vw, 26px);
  height: 14px;
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(255, 210, 118, 0.4), rgba(93, 51, 22, 0.95)),
    #73451f;
  box-shadow:
    0 5px 0 rgba(45, 23, 9, 0.92),
    0 16px 22px rgba(0, 0, 0, 0.26);
  pointer-events: none;
  z-index: 0;
}
#bookChoices::before {
  top: calc(50% - 7px);
}
#bookChoices::after {
  bottom: clamp(24px, 2.8vw, 36px);
}
.bookChoice {
  position: relative;
  display: grid;
  grid-template-rows: minmax(92px, 1fr) auto auto;
  align-content: stretch;
  gap: 9px;
  min-width: 0;
  min-height: 0;
  padding: clamp(10px, 1.25vw, 14px);
  border: 2px solid rgba(255, 246, 202, 0.32);
  border-radius: 7px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.22), transparent 12% 86%, rgba(0, 0, 0, 0.28)),
    linear-gradient(180deg, var(--book-spine-top), var(--book-spine-bottom));
  color: #fff4c4;
  cursor: pointer;
  transform-origin: center bottom;
  z-index: 1;
  transition:
    transform 220ms ease,
    filter 220ms ease,
    box-shadow 220ms ease,
    background 220ms ease;
}
.bookChoice::after {
  content: "";
  position: absolute;
  inset: 10px auto 10px 10px;
  width: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.32);
  pointer-events: none;
}
.bookChoice[data-book="river"] {
  --book-spine-top: #188fa7;
  --book-spine-bottom: #0d526a;
}
.bookChoice[data-book="money"] {
  --book-spine-top: #4fa44f;
  --book-spine-bottom: #246638;
}
.bookChoice[data-book="moon"] {
  --book-spine-top: #5966c8;
  --book-spine-bottom: #263471;
}
.bookChoice[data-book="treehouse"] {
  --book-spine-top: #c06f2c;
  --book-spine-bottom: #6d3d1e;
}
.bookChoice[data-book="iceHammer"] {
  --book-spine-top: #f27a22;
  --book-spine-bottom: #8d3415;
}
.bookChoice[data-book="bananaBridge"] {
  --book-spine-top: #d8b72f;
  --book-spine-bottom: #87651a;
}
.bookChoice[data-book="riverDock"] {
  --book-spine-top: #2c9bbd;
  --book-spine-bottom: #15516f;
}
.bookChoice[data-book="moonRover"] {
  --book-spine-top: #7a82a7;
  --book-spine-bottom: #30384f;
}
.bookChoice[data-book="fireflyGarden"] {
  --book-spine-top: #f4cb3e;
  --book-spine-bottom: #8a6815;
}
.bookChoice[data-book="spiderWeb"] {
  --book-spine-top: #9d58c9;
  --book-spine-bottom: #49266b;
}
#bookChoices.visualShelf {
  display: block;
  width: min(1240px, 100%);
  min-height: 0;
  aspect-ratio: 16 / 9;
  padding: 0;
  overflow: hidden;
  border-radius: 10px;
  background:
    linear-gradient(180deg, rgba(8, 20, 19, 0.08), rgba(8, 20, 19, 0.2)),
    url("../../assets/ui/story-shelf-bookshelf.png") center / cover no-repeat;
}
#bookChoices.visualShelf::before,
#bookChoices.visualShelf::after {
  display: none;
}
#bookChoices.visualShelf .bookChoice {
  position: absolute;
  display: block;
  width: max(8.4%, 44px);
  height: max(27%, 44px);
  min-height: 44px;
  padding: 0;
  border: 0;
  border-radius: 10px 10px 7px 7px;
  background: transparent;
  box-shadow: none;
  color: #fff8d8;
  transform-origin: 50% 100%;
}
#bookChoices.visualShelf .bookChoice::after {
  display: none;
}
#bookChoices.visualShelf .bookChoice[data-book="river"] {
  left: 21.9%;
  top: 25.4%;
}
#bookChoices.visualShelf .bookChoice[data-book="money"] {
  left: 33.8%;
  top: 25.4%;
}
#bookChoices.visualShelf .bookChoice[data-book="moon"] {
  left: 46.0%;
  top: 25.4%;
}
#bookChoices.visualShelf .bookChoice[data-book="treehouse"] {
  left: 58.2%;
  top: 25.4%;
}
#bookChoices.visualShelf .bookChoice[data-book="iceHammer"] {
  left: 70.7%;
  top: 25.4%;
}
#bookChoices.visualShelf .bookChoice[data-book="bananaBridge"] {
  left: 20.9%;
  top: 60.6%;
}
#bookChoices.visualShelf .bookChoice[data-book="riverDock"] {
  left: 33.7%;
  top: 60.6%;
}
#bookChoices.visualShelf .bookChoice[data-book="moonRover"] {
  left: 45.9%;
  top: 60.6%;
}
#bookChoices.visualShelf .bookChoice[data-book="fireflyGarden"] {
  left: 58.2%;
  top: 60.6%;
}
#bookChoices.visualShelf .bookChoice[data-book="spiderWeb"] {
  left: 70.8%;
  top: 60.6%;
}
#bookChoices.visualShelf .bookChoice:hover,
#bookChoices.visualShelf .bookChoice:focus-visible {
  outline: 3px solid rgba(255, 211, 107, 0.95);
  outline-offset: 4px;
  filter: saturate(1.12) brightness(1.08);
  transform: translateY(-3%) scale(1.04);
}
#bookChoices.visualShelf .bookChoice.pulled {
  z-index: 3;
  animation: bookshelfPull 620ms cubic-bezier(0.16, 0.84, 0.24, 1) both;
}
#bookChoices.visualShelf .bookChoice b,
#bookChoices.visualShelf .bookChoice span {
  position: absolute;
  left: 50%;
  max-width: min(220px, 24vw);
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(255, 248, 221, 0.94);
  color: #3c230f;
  text-shadow: none;
  opacity: 0;
  transform: translateX(-50%) translateY(5px);
  transition:
    opacity 180ms ease,
    transform 180ms ease;
  white-space: nowrap;
  pointer-events: none;
}
#bookChoices.visualShelf .bookChoice b {
  bottom: -34px;
  font-size: 12px;
  line-height: 1;
}
#bookChoices.visualShelf .bookChoice span {
  display: none;
}
#bookChoices.visualShelf .bookChoice:hover b,
#bookChoices.visualShelf .bookChoice:focus-visible b {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
#bookChoices.visualShelf #bookShelfHint {
  left: 50%;
  right: auto;
  bottom: clamp(8px, 1.2vw, 16px);
  width: max-content;
  max-width: calc(100% - 32px);
  padding: 7px 16px;
  border-radius: 999px;
  background: rgba(5, 18, 16, 0.72);
  transform: translateX(-50%);
}
@keyframes bookshelfPull {
  0% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  62% {
    transform: translate3d(0, -28px, 0) scale(1.13) rotate(-2deg);
  }
  100% {
    transform: translate3d(0, -20px, 0) scale(1.08) rotate(-1deg);
  }
}
.bookChoice:hover,
.bookChoice:focus-visible {
  box-shadow:
    0 0 0 4px rgba(255, 211, 107, 0.82),
    0 12px 26px rgba(255, 211, 107, 0.22);
  filter: saturate(1.15) brightness(1.06);
  outline: none;
  transform: translateY(-3%) scale(1.025);
}
.bookChoice.picked {
  animation: bookPullOut 540ms cubic-bezier(0.16, 1, 0.3, 1) both;
}
.bookChoice.bookComplete::before,
.bookChoice.bookInProgress::before {
  position: absolute;
  right: 8px;
  top: 8px;
  z-index: 3;
  padding: 4px 7px;
  border-radius: 999px;
  background: #a8ff90;
  color: #10220a;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.25);
  pointer-events: none;
}
.bookChoice.bookComplete::before {
  content: "Done";
}
.bookChoice.bookInProgress::before {
  content: "Reading";
  background: #eaf7ff;
  color: #123043;
}
.bookChoice b {
  display: block;
  font-size: clamp(14px, 1.25vw, 18px);
  line-height: 1.08;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.42);
}
.bookChoice span {
  display: block;
  color: rgba(255, 250, 221, 0.82);
  font-size: clamp(10px, 0.92vw, 12px);
  line-height: 1.18;
}
.bookCoverThumb {
  width: 100%;
  height: 100%;
  min-height: 86px;
  object-fit: cover;
  border-radius: 5px;
  border: 1px solid rgba(255, 246, 202, 0.28);
  background: rgba(0, 0, 0, 0.22);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.1),
    0 8px 18px rgba(0, 0, 0, 0.28);
}
#bookShelfHint {
  position: absolute;
  left: clamp(18px, 3vw, 36px);
  right: clamp(18px, 3vw, 36px);
  bottom: clamp(8px, 1.4vw, 16px);
  pointer-events: none;
  z-index: 2;
  color: #fff7ce;
  font-size: 18px;
  font-weight: 900;
  text-align: center;
  text-shadow: 0 3px 8px rgba(0, 0, 0, 0.78);
}
#bookPreview {
  position: absolute;
  inset: clamp(18px, 2.6vw, 34px);
  display: none;
  grid-template-columns: minmax(180px, 0.7fr) minmax(0, 1fr);
  gap: 22px;
  align-items: center;
  padding: 24px;
  border-radius: 8px;
  background: rgba(13, 33, 25, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 24px 52px rgba(0, 0, 0, 0.45);
  z-index: 4;
}
#bookPreview.show {
  display: grid;
}
#bookPreview.opening {
  animation: bookPreviewOpen 620ms ease-in both;
}
#bookPreviewCover {
  width: 100%;
  aspect-ratio: 1.4516;
  object-fit: contain;
  border-radius: 7px;
  background: #10150d;
  box-shadow:
    -10px 0 0 #744923,
    0 14px 28px rgba(0, 0, 0, 0.38);
  transform-origin: left center;
}
#bookPreview.opening #bookPreviewCover {
  animation: bookCoverOpen 620ms ease-in both;
}
#bookPreviewTitle {
  color: #ffd36b;
  font-size: clamp(28px, 5vw, 54px);
  line-height: 1.02;
  font-weight: 900;
  text-shadow: 0 3px 8px rgba(0, 0, 0, 0.52);
}
#bookPreviewText {
  margin-top: 12px;
  color: #ffffff;
  font-size: 22px;
  line-height: 1.25;
}
#bookOpenBtn {
  margin-top: 20px;
  width: fit-content;
}
#bookReader {
  display: none;
  min-height: 0;
  perspective: 1200px;
  position: relative;
}
#bookReader.show {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 18px minmax(0, 1fr);
  gap: 0;
  width: min(1080px, calc(100vw - 42px));
  min-height: min(58svh, 560px);
  align-self: center;
  justify-self: center;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 22px;
  background:
    linear-gradient(
      90deg,
      #f4e4bd,
      #fff5d8 48%,
      #debd80 50%,
      #fff5d8 52%,
      #f8e8c4
    ),
    #f7e6c2;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
  transform-style: preserve-3d;
}
#bookReader.show::before {
  content: none;
}
#bookReader.show::after {
  content: none;
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  background:
    linear-gradient(
      90deg,
      rgba(68, 38, 16, 0.14),
      transparent 8%,
      transparent 42%,
      rgba(68, 38, 16, 0.1) 49%,
      transparent 57%,
      transparent 92%,
      rgba(68, 38, 16, 0.12)
    ),
    repeating-linear-gradient(
      0deg,
      rgba(86, 49, 22, 0.035) 0 1px,
      transparent 1px 22px
    );
  mix-blend-mode: multiply;
}
#bookReader.opening #bookImageFrame {
  animation: bookPageOpen 820ms cubic-bezier(0.18, 0.86, 0.22, 1) both;
}
#bookReader.turning #bookImageFrame {
  animation: bookPageTurn 420ms ease-in-out both;
}
#bookImageFrame {
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  box-sizing: border-box;
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
  border-right: 1px solid rgba(95, 61, 22, 0.16);
  border-radius: 0;
  background:
    radial-gradient(
      circle at 30% 18%,
      rgba(255, 255, 255, 0.5),
      transparent 26%
    ),
    linear-gradient(
      135deg,
      rgba(255, 255, 255, 0.45),
      rgba(246, 222, 179, 0.34)
    );
  cursor: pointer;
  padding: clamp(6px, 1vw, 12px);
}
#bookImageFrame::before {
  content: none;
  position: absolute;
  inset: clamp(18px, 4.4vw, 42px);
  z-index: 0;
  border-radius: 10px;
  background:
    radial-gradient(
      circle at 80% 12%,
      rgba(143, 199, 255, 0.18),
      transparent 24%
    ),
    #fff2cf;
  box-shadow:
    inset 0 0 18px rgba(92, 54, 24, 0.12),
    0 10px 22px rgba(92, 54, 24, 0.14);
}
#bookImageFrame::after {
  content: none;
  position: absolute;
  inset: clamp(26px, 5.2vw, 54px);
  z-index: 1;
  border-radius: 8px;
  background: radial-gradient(
    circle at 85% 18%,
    rgba(255, 236, 150, 0.2),
    transparent 26%
  );
  box-shadow:
    0 0 0 2px rgba(122, 82, 42, 0.25),
    0 8px 20px rgba(92, 54, 24, 0.18);
  pointer-events: none;
}
#bookImageFrame.loading::after {
  content: "Loading page...";
  inset: auto;
  top: 50%;
  left: 50%;
  bottom: auto;
  width: auto;
  transform: translate(-50%, -50%);
  background: transparent;
  color: rgba(78, 43, 18, 0.62);
  font-size: 14px;
  letter-spacing: 0;
  box-shadow: none;
}
#bookImage {
  display: block;
  position: relative;
  z-index: 2;
  box-sizing: border-box;
  width: 100%;
  height: auto;
  max-height: min(52svh, 500px);
  object-fit: contain;
  object-position: center;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: transparent;
  box-shadow: 0 14px 38px rgba(52, 30, 12, 0.2);
}
#bookGutter {
  position: relative;
  display: block;
  background: linear-gradient(
    90deg,
    rgba(75, 43, 16, 0.24),
    rgba(255, 255, 255, 0.36),
    rgba(75, 43, 16, 0.28)
  );
  box-shadow:
    inset 7px 0 14px rgba(58, 33, 13, 0.22),
    inset -7px 0 14px rgba(58, 33, 13, 0.18);
}
#bookText {
  min-width: 0;
  min-height: 0;
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  display: grid;
  place-items: center;
  padding: clamp(8px, 1.2vw, 14px);
  border-left: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 0;
  background:
    radial-gradient(
      circle at 30% 18%,
      rgba(255, 255, 255, 0.5),
      transparent 26%
    ),
    linear-gradient(
      135deg,
      rgba(255, 255, 255, 0.45),
      rgba(246, 222, 179, 0.34)
    );
  color: #2f1d0d;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(30px, 4.2vw, 56px);
  font-weight: 700;
  line-height: 1.04;
  text-align: center;
  text-wrap: balance;
  box-shadow: none;
}
#bookOverlay button {
  border: 0;
  border-radius: 8px;
  padding: 14px 22px;
  min-height: 48px;
  background: #ffd36b;
  color: #111;
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
  touch-action: manipulation;
}
#bookOverlay button.secondary {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}
#bookControls > div {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
#bookPrevBtn,
#bookNextBtn {
  border-radius: 999px;
}
#bookNextBtn {
  width: min(340px, 100%);
  min-height: 58px;
  font-size: 18px;
  font-weight: 900;
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.28);
}
#bookControls button,
#bookCloseBtn {
  backdrop-filter: blur(3px);
}
#bookOverlay button.bookChoice {
  color: #fff4c4;
  font: inherit;
}
#bookOverlay button.bookChoice b {
  color: #fff4c4;
}
#bookOverlay button.bookChoice span {
  color: rgba(255, 250, 221, 0.82);
}
#bookOverlay button.bookChoice:hover,
#bookOverlay button.bookChoice:focus-visible {
  box-shadow:
    0 0 0 4px rgba(255, 211, 107, 0.82),
    0 12px 26px rgba(255, 211, 107, 0.2);
}
@keyframes bookPullOut {
  0% {
    transform: translateY(0) scale(1);
    filter: brightness(1);
  }
  55% {
    transform: translateY(-12%) scale(1.08);
    filter: brightness(1.16);
  }
  100% {
    transform: translateY(-5%) scale(1.035);
    filter: brightness(1.08);
  }
}
@keyframes bookPreviewOpen {
  0% {
    opacity: 1;
    transform: scale(1);
  }
  100% {
    opacity: 0;
    transform: scale(1.08);
  }
}
@keyframes bookCoverOpen {
  0% {
    transform: rotateY(0deg);
  }
  100% {
    transform: rotateY(-74deg);
  }
}
@keyframes bookPageOpen {
  0% {
    opacity: 0;
    transform: perspective(900px) rotateY(-72deg) scale(0.82);
    transform-origin: 0 50%;
  }
  72% {
    opacity: 1;
    transform: perspective(900px) rotateY(8deg) scale(1.02);
  }
  100% {
    opacity: 1;
    transform: perspective(900px) rotateY(0deg) scale(1);
  }
}
@keyframes bookPageTurn {
  0% {
    transform: rotateY(0deg);
  }
  48% {
    transform: rotateY(-18deg) scale(0.985);
  }
  100% {
    transform: rotateY(0deg);
  }
}
@media (max-width: 720px) {
  #bookChoices {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: repeat(5, minmax(188px, 1fr));
    gap: 12px;
    align-content: start;
    min-height: min(82svh, 980px);
    max-height: calc(100svh - 132px);
    overflow-y: auto;
    padding: 18px 14px 42px;
  }
  .bookChoice {
    grid-template-rows: minmax(90px, 1fr) auto auto;
    padding: 10px;
  }
  .bookChoice b {
    font-size: 13px;
  }
  .bookChoice span {
    font-size: 10px;
  }
  .bookCoverThumb {
    min-height: 70px;
  }
  #bookPreview {
    inset: 5%;
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 16px;
    align-content: center;
  }
  #bookPreviewCover {
    max-height: 42vh;
    object-fit: contain;
  }
  #bookPreviewText {
    font-size: 18px;
  }
  #bookShelfHint {
    display: none;
  }
  #bookReader.show {
    width: 100%;
    min-height: min(58svh, 520px);
    grid-template-columns: minmax(0, 1fr) 12px minmax(0, 1fr);
  }
  #bookImageFrame {
    min-height: 0;
    padding: 7px;
  }
  #bookImage {
    max-height: min(48svh, 380px);
  }
  #bookText {
    font-size: clamp(22px, 5.8vw, 34px);
    padding: 9px;
  }
}

/* AGENT_TARGET: achievement-badge-wall — badge wall on title screen + toast notification */
#achievementBadgeWall {
  margin: 8px 0 4px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
}
.achv-title {
  width: 100%;
  text-align: center;
  font-size: 13px;
  font-weight: bold;
  color: #ffd36b;
  letter-spacing: 0.05em;
  margin-bottom: 2px;
}
.achv-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: rgba(0, 0, 0, 0.55);
  border: 1.5px solid #ffd36b;
  border-radius: 8px;
  padding: 4px 10px;
  min-width: 100px;
  max-width: 160px;
}
.achv-badge-name {
  font-size: 12px;
  font-weight: bold;
}
.achv-badge-desc {
  font-size: 10px;
  color: #ccc;
  text-align: center;
}
.achv-empty {
  font-size: 13px;
  color: #c7d2c9;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7);
  text-align: center;
  width: 100%;
}
.achv-toast {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: rgba(0, 0, 0, 0.85);
  border: 1.5px solid #ffd36b;
  border-radius: 10px;
  padding: 10px 18px;
  color: #fff;
  font-size: 14px;
  text-align: center;
  opacity: 0;
  transition: opacity 0.35s ease, transform 0.35s ease;
  z-index: 9999;
  pointer-events: none;
}
.achv-toast.achv-toast-show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* AGENT_TARGET: mistake-tracker — "★ Try this" badge overlaid on weak-skill level tile */
.mistake-try-badge {
  position: absolute;
  top: -8px;
  right: -8px;
  background: #ffd36b;
  color: #1a2320;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 8px;
  pointer-events: none;
  z-index: 5;
  white-space: nowrap;
  box-shadow: 0 1px 4px rgba(0,0,0,0.5);
}

/* 2026-05-26: keep the home screen to Start Level 1 / Map only. */
#start:not(.map-open) #helperChoice {
  width: min(460px, calc(100% - 32px)) !important;
  max-width: none !important;
  margin: 18px auto 0 !important;
  padding: 14px !important;
  gap: 0 !important;
}
#start:not(.map-open) #helperChoice::before {
  content: "Choose a start" !important;
  display: block !important;
  margin: 0 0 12px !important;
  font-size: 24px !important;
  line-height: 1 !important;
  text-align: center !important;
}
#start:not(.map-open) #helperChoiceTitle,
#start:not(.map-open) #helperChoiceButtons,
#start:not(.map-open) #helperChoiceStatus,
#start:not(.map-open) #practicePathTitle,
#start:not(.map-open) #practicePathButtons,
#start:not(.map-open) #practicePathStatus,
#start:not(.map-open) #helperReadyPreview {
  display: none !important;
}
#start:not(.map-open) #helperChoiceActions {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 12px !important;
  justify-content: stretch !important;
}
#start:not(.map-open) #helperKeepGoingBtn,
#start:not(.map-open) #helperFullRunBtn,
#start:not(.map-open) #helperChoiceMapBtn {
  min-height: 78px !important;
  margin: 0 !important;
  padding: 12px !important;
  font-size: 17px !important;
  font-weight: 900 !important;
}
#start:not(.map-open) #helperKeepGoingBtn {
  grid-column: 1 / -1 !important;
  min-height: 88px !important;
  background-color: #fff28e !important;
  background-image: linear-gradient(180deg, #fff28e, #d58d28) !important;
  color: #1f1608 !important;
}
#start:not(.map-open) #helperKeepGoingBtn #helperKeepGoingLabel,
#start:not(.map-open) #helperKeepGoingBtn small {
  color: #1f1608 !important;
}
#start:not(.map-open) #helperFullRunBtn {
  /* Secondary: must not compete with the gold Play/Keep Going card */
  background-color: rgba(20, 32, 26, 0.55) !important;
  background-image: none !important;
  border: 2px solid rgba(255, 211, 107, 0.55) !important;
  color: #ffe6a3 !important;
}
#start:not(.map-open) #helperChoiceMapBtn {
  background-color: #2d6764 !important;
  background-image: linear-gradient(180deg, #2d6764, #164743) !important;
  color: #dffcff !important;
}
@media (max-width: 520px) {
  #start:not(.map-open) #helperChoiceActions {
    grid-template-columns: 1fr !important;
  }
}
