/* Réduction de la charge visuelle : une consigne, un geste, une action. */
#project-dialog.adventure-dialog .adventure-sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}
#project-dialog.adventure-dialog:has(.adventure-activity) {
  width: min(700px, calc(100% - 32px));
  max-height: calc(100dvh - 32px);
  background: #fbfaf6;
}
#project-dialog.adventure-dialog:has(.adventure-activity) .adventure-shell {
  padding: 24px;
  background: linear-gradient(180deg, #f1f6ff, #fcfbf6 200px);
}
#project-dialog.adventure-dialog .adventure-activity {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
}
#project-dialog.adventure-dialog .adventure-activity .adventure-topbar {
  min-height: 44px;
  margin: 0;
  padding-right: 54px;
  gap: 12px;
  align-items: center;
}
#project-dialog.adventure-dialog .adventure-activity .adventure-back {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 0;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #576984;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.3;
}
#project-dialog.adventure-dialog .adventure-activity .adventure-back:hover { color: #345c82; }
#project-dialog.adventure-dialog .adventure-activity .adventure-step-label {
  flex: 0 0 auto;
  max-width: none;
  padding: 0;
  font-size: 13px;
  font-weight: 800;
  color: #6b7690;
}
#project-dialog.adventure-dialog .adventure-activity .adventure-question { margin-top: 20px; }
#project-dialog.adventure-dialog .adventure-activity .adventure-question h2 {
  font-size: 30px;
  line-height: 1.18;
  letter-spacing: -.3px;
}
#project-dialog.adventure-dialog .adventure-activity .adventure-instruction {
  margin-top: 9px;
  color: #5a6880;
  font-size: 15px;
  line-height: 1.55;
}
#project-dialog.adventure-dialog .adventure-activity .adventure-play-zone {
  margin-top: 24px;
  min-width: 0;
}
#project-dialog.adventure-dialog .adventure-activity .adventure-options { gap: 11px; }
#project-dialog.adventure-dialog .adventure-activity .adventure-option {
  min-height: 70px;
  padding: 15px 13px;
  border-radius: 14px;
  font-size: 15px;
  line-height: 1.4;
}
#project-dialog.adventure-dialog .adventure-activity .adventure-options:has(.number) {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
#project-dialog.adventure-dialog .adventure-activity .adventure-option.number {
  min-height: 82px;
  font-size: 30px;
  padding: 15px 8px;
}
#project-dialog.adventure-dialog .adventure-activity .adventure-shape {
  width: 60px;
  height: 60px;
}
#project-dialog.adventure-dialog .adventure-activity .adventure-single-shape { margin-bottom: 18px; }
#project-dialog.adventure-dialog .adventure-activity .adventure-plant {
  width: 225px;
  height: 147px;
  margin: -7px auto 10px;
}
#project-dialog.adventure-dialog .adventure-activity .adventure-selection-count {
  margin-top: 10px;
  font-size: 12px;
  line-height: 1.5;
  color: #65728a;
}
#project-dialog.adventure-dialog .adventure-activity .adventure-measure {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  padding: 0;
}
#project-dialog.adventure-dialog .adventure-activity .adventure-glass {
  width: 104px;
  height: 154px;
  border-width: 3px;
  border-radius: 4px 4px 14px 14px;
}
#project-dialog.adventure-dialog .adventure-activity .adventure-dose-controls {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin: 0;
}
#project-dialog.adventure-dialog .adventure-activity .adventure-dose {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 48px;
  min-width: 48px;
  height: 48px;
  min-height: 48px;
  padding: 0 0 2px;
  border-radius: 13px;
  font-size: 27px;
  font-weight: 800;
  line-height: 1;
}
#project-dialog.adventure-dialog .adventure-activity .adventure-dose-controls .adventure-selection-count {
  min-width: 48px;
  margin: 0;
  font-size: 17px;
  font-weight: 800;
  line-height: 1.3;
  color: #405c7b;
}
#project-dialog.adventure-dialog .adventure-activity .adventure-order-result {
  min-height: 66px;
  padding: 11px;
  gap: 9px;
}
#project-dialog.adventure-dialog .adventure-activity .adventure-order-slot {
  min-height: 46px;
  padding: 8px 11px;
  font-size: 14px;
}
#project-dialog.adventure-dialog .adventure-activity .adventure-order-slot > span { font-size: 11px; }
#project-dialog.adventure-dialog .adventure-activity .adventure-order-slot > span:last-child {
  min-width: 16px;
  background: transparent;
  font-size: 18px;
}
#project-dialog.adventure-dialog .adventure-activity .adventure-order-empty { font-size: 13px; }
#project-dialog.adventure-dialog .adventure-activity .adventure-token-bank { gap: 9px; margin-top: 15px; }
#project-dialog.adventure-dialog .adventure-activity .adventure-token {
  min-height: 46px;
  padding: 10px 15px;
  font-size: 15px;
}
#project-dialog.adventure-dialog .adventure-token[hidden],
#project-dialog.adventure-dialog .adventure-feedback[hidden],
#project-dialog.adventure-dialog .adventure-hint-button[hidden] { display: none !important; }
#project-dialog.adventure-dialog .adventure-activity .adventure-pairs { gap: 12px; }
#project-dialog.adventure-dialog .adventure-activity .adventure-pair-column { gap: 10px; }
#project-dialog.adventure-dialog .adventure-activity .adventure-pair {
  min-height: 66px;
  min-width: 0;
  padding: 12px 11px;
  gap: 7px;
  font-size: 15px;
  line-height: 1.35;
  overflow-wrap: break-word;
}
#project-dialog.adventure-dialog .adventure-activity .adventure-pair > span:not(.pair-number) { min-width: 0; }
#project-dialog.adventure-dialog .adventure-activity .adventure-pairs:has(.adventure-shape) .adventure-pair { min-height: 102px; }
#project-dialog.adventure-dialog .adventure-activity .adventure-pair .adventure-shape { width: 48px; height: 48px; }
#project-dialog.adventure-dialog .adventure-activity .pair-number {
  width: 22px;
  height: 22px;
  font-size: 11px;
}
#project-dialog.adventure-dialog .adventure-response {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  margin-top: auto;
  padding-top: 27px;
}
#project-dialog.adventure-dialog .adventure-response .adventure-feedback {
  min-height: 0;
  margin: 0 0 15px;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.65;
}
#project-dialog.adventure-dialog .adventure-response .adventure-feedback strong {
  margin-bottom: 3px;
  font-size: 14px;
  line-height: 1.5;
}
#project-dialog.adventure-dialog .adventure-response .adventure-actions {
  display: block;
  margin: 0;
}
#project-dialog.adventure-dialog .adventure-response .adventure-primary {
  width: 100%;
  min-height: 51px;
  padding: 12px 18px 10px;
  border-radius: 14px;
  font-size: 15px;
  line-height: 1.35;
  letter-spacing: .1px;
}
#project-dialog.adventure-dialog .adventure-response .adventure-hint-button {
  display: flex;
  align-self: center;
  min-height: 44px;
  min-width: 88px;
  margin-top: 5px;
  padding: 8px 13px;
  border: 0;
  background: transparent;
  font-size: 13px;
  line-height: 1.5;
  color: #6c7091;
}

/* La carte garde ses quatre choix, sans surcharger chaque vignette. */
#project-dialog.adventure-dialog:not(:has(.adventure-activity)) .adventure-header h2 { font-size: 31px; }
#project-dialog.adventure-dialog:not(:has(.adventure-activity)) .adventure-world { min-height: 142px; }
#project-dialog.adventure-dialog:not(:has(.adventure-activity)) .adventure-world-title { font-size: 22px; }
#project-dialog.adventure-dialog:not(:has(.adventure-activity)) .adventure-world-status { margin-top: 8px; font-size: 11px; }
#project-dialog.adventure-dialog:not(:has(.adventure-activity)) .adventure-note {
  display: block;
  padding: 0;
  margin-top: 17px;
  border: 0;
  background: transparent;
  font-size: 11px;
  line-height: 1.6;
}
#project-dialog.adventure-dialog .adventure-finish {
  max-width: 620px;
  margin: 0 auto;
  padding: 14px 0 3px;
}
#project-dialog.adventure-dialog .adventure-finish h2 { padding: 0 25px; font-size: 32px; }
#project-dialog.adventure-dialog .adventure-finish .adventure-stars { margin-bottom: 8px; font-size: 29px; }
#project-dialog.adventure-dialog .adventure-finish .adventure-end-fox { width: 76px; height: 83px; margin: 7px auto 13px; }
#project-dialog.adventure-dialog .adventure-finish > p { margin-top: 12px; font-size: 14px; line-height: 1.6; }
#project-dialog.adventure-dialog .adventure-end-details {
  margin: 18px auto 0;
  max-width: 530px;
  text-align: left;
}
#project-dialog.adventure-dialog .adventure-end-details summary {
  min-height: 44px;
  padding: 11px 0;
  color: #65718b;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.6;
  cursor: pointer;
  text-align: center;
}
#project-dialog.adventure-dialog .adventure-end-details .adventure-summary { margin-top: 8px; }
#project-dialog.adventure-dialog .adventure-finish .adventure-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  margin-top: 18px;
}
#project-dialog.adventure-dialog .adventure-finish .adventure-primary {
  width: min(100%, 340px);
  min-height: 49px;
  font-size: 14px;
}
#project-dialog.adventure-dialog .adventure-replay {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 8px 12px;
  border: 0;
  background: transparent;
  color: #6b7090;
  font-size: 13px;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 4px;
}

@media (max-width: 1024px) {
  #project-dialog.adventure-dialog:has(.adventure-activity) {
    width: 100%;
    max-width: 100%;
    height: 100dvh;
    max-height: 100dvh;
    margin: 0;
    border: 0;
    border-radius: 0;
  }
  #project-dialog.adventure-dialog:has(.adventure-activity) .adventure-shell {
    min-height: 100dvh;
    padding: 20px 24px;
  }
  #project-dialog.adventure-dialog .adventure-activity {
    width: min(100%, 620px);
    min-height: calc(100dvh - 40px);
    margin: 0 auto;
  }
  #project-dialog.adventure-dialog:has(.adventure-activity) .dialog-close {
    top: 20px;
    right: max(24px, calc((100% - 620px) / 2));
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: #6e7a91;
  }
  #project-dialog.adventure-dialog:not(:has(.adventure-activity)) .adventure-kicker { display: none; }
  #project-dialog.adventure-dialog:not(:has(.adventure-activity)) .adventure-header {
    min-height: 44px;
    padding-right: 44px;
  }
  #project-dialog.adventure-dialog:not(:has(.adventure-activity)) .adventure-header h2 { font-size: 28px; }
  #project-dialog.adventure-dialog:not(:has(.adventure-activity)) .adventure-fox { display: none; }
  #project-dialog.adventure-dialog:not(:has(.adventure-activity)) .adventure-intro p { font-size: 13px; line-height: 1.6; }
}
@media (max-width: 620px) {
  #project-dialog.adventure-dialog:has(.adventure-activity) .adventure-shell { padding: 16px 20px; }
  #project-dialog.adventure-dialog .adventure-activity { min-height: calc(100dvh - 32px); }
  #project-dialog.adventure-dialog:has(.adventure-activity) .dialog-close { top: 16px; right: 20px; }
  #project-dialog.adventure-dialog .adventure-activity .adventure-topbar { padding-right: 50px; }
  #project-dialog.adventure-dialog .adventure-activity .adventure-question { margin-top: 15px; }
  #project-dialog.adventure-dialog .adventure-activity .adventure-question h2 { font-size: 28px; }
  #project-dialog.adventure-dialog .adventure-activity .adventure-instruction { font-size: 15px; margin-top: 8px; }
  #project-dialog.adventure-dialog .adventure-activity .adventure-play-zone { margin-top: 21px; }
  #project-dialog.adventure-dialog .adventure-activity .adventure-option { min-height: 67px; padding: 12px 10px; font-size: 15px; }
  #project-dialog.adventure-dialog .adventure-activity .adventure-option.number { min-height: 76px; font-size: 28px; }
  #project-dialog.adventure-dialog .adventure-activity .adventure-shape { width: 55px; height: 55px; }
  #project-dialog.adventure-dialog .adventure-activity .adventure-plant { width: 210px; height: 137px; }
  #project-dialog.adventure-dialog .adventure-activity .adventure-pairs { gap: 10px; }
  #project-dialog.adventure-dialog .adventure-activity .adventure-pair-column { gap: 9px; }
  #project-dialog.adventure-dialog .adventure-activity .adventure-pair { min-height: 64px; padding: 11px 9px; font-size: 14px; }
  #project-dialog.adventure-dialog .adventure-activity .adventure-pairs:has(.adventure-shape) .adventure-pair { min-height: 98px; }
  #project-dialog.adventure-dialog .adventure-activity .adventure-pair .adventure-shape { width: 44px; height: 44px; }
  #project-dialog.adventure-dialog .adventure-activity .adventure-measure { gap: 16px; }
  #project-dialog.adventure-dialog .adventure-activity .adventure-glass { width: 100px; height: 148px; }
  #project-dialog.adventure-dialog .adventure-response { padding-top: 23px; }
  #project-dialog.adventure-dialog .adventure-response .adventure-feedback { font-size: 13px; padding: 11px 13px; margin-bottom: 12px; }
  #project-dialog.adventure-dialog .adventure-response .adventure-primary { min-height: 50px; font-size: 15px; }
  #project-dialog.adventure-dialog:not(:has(.adventure-activity)) .adventure-shell { padding: 22px 18px; }
  #project-dialog.adventure-dialog:not(:has(.adventure-activity)) .adventure-header h2 { font-size: 25px; }
  #project-dialog.adventure-dialog:not(:has(.adventure-activity)) .adventure-map { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 10px; margin-top: 17px; }
  #project-dialog.adventure-dialog:not(:has(.adventure-activity)) .adventure-world {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    min-height: 185px;
    padding: 12px 9px;
    text-align: center;
  }
  #project-dialog.adventure-dialog:not(:has(.adventure-activity)) .adventure-island { width: 76px; height: 76px; }
  #project-dialog.adventure-dialog:not(:has(.adventure-activity)) .adventure-world-title { font-size: 20px; line-height: 1.13; }
  #project-dialog.adventure-dialog:not(:has(.adventure-activity)) .adventure-subject { font-size: 8px; letter-spacing: .45px; margin-bottom: 4px; }
  #project-dialog.adventure-dialog:not(:has(.adventure-activity)) .adventure-world-status { font-size: 10px; margin-top: 7px; }
  #project-dialog.adventure-dialog:not(:has(.adventure-activity)) .adventure-world-arrow { display: none; }
  #project-dialog.adventure-dialog:not(:has(.adventure-activity)) .adventure-note { font-size: 10px; margin-top: 13px; }
  #project-dialog.adventure-dialog .adventure-finish { padding: 19px 0 2px; }
  #project-dialog.adventure-dialog .adventure-finish h2 { font-size: 29px; padding-inline: 3px; }
  #project-dialog.adventure-dialog .adventure-finish > p { font-size: 14px; }
  #project-dialog.adventure-dialog .adventure-finish .adventure-end-fox { width: 70px; height: 78px; }
  #project-dialog.adventure-dialog .adventure-finish .adventure-stars { font-size: 26px; }
  #project-dialog.adventure-dialog .adventure-end-details { margin-top: 12px; }
  #project-dialog.adventure-dialog .adventure-finish .adventure-actions { margin-top: 14px; }
}
@media (max-width: 380px) {
  #project-dialog.adventure-dialog:has(.adventure-activity) .adventure-shell { padding: 14px 16px; }
  #project-dialog.adventure-dialog .adventure-activity { min-height: calc(100dvh - 28px); }
  #project-dialog.adventure-dialog:has(.adventure-activity) .dialog-close { top: 14px; right: 16px; }
  #project-dialog.adventure-dialog .adventure-activity .adventure-question { margin-top: 12px; }
  #project-dialog.adventure-dialog .adventure-activity .adventure-question h2 { font-size: 25px; line-height: 1.18; }
  #project-dialog.adventure-dialog .adventure-activity .adventure-instruction { font-size: 14px; line-height: 1.5; }
  #project-dialog.adventure-dialog .adventure-activity .adventure-play-zone { margin-top: 17px; }
  #project-dialog.adventure-dialog .adventure-activity .adventure-options { gap: 9px; }
  #project-dialog.adventure-dialog .adventure-activity .adventure-option { padding: 11px 9px; font-size: 14px; }
  #project-dialog.adventure-dialog .adventure-activity .adventure-option.number { min-height: 70px; font-size: 26px; }
  #project-dialog.adventure-dialog .adventure-activity .adventure-plant { width: 195px; height: 127px; }
  #project-dialog.adventure-dialog .adventure-activity .adventure-glass { width: 96px; height: 140px; }
  #project-dialog.adventure-dialog .adventure-activity .adventure-measure { gap: 14px; }
  #project-dialog.adventure-dialog .adventure-activity .adventure-dose { width: 44px; height: 44px; min-width: 44px; min-height: 44px; font-size: 25px; }
  #project-dialog.adventure-dialog .adventure-activity .adventure-pair { padding-inline: 8px; font-size: 14px; }
  #project-dialog.adventure-dialog .adventure-activity .pair-number { width: 20px; height: 20px; font-size: 10px; }
  #project-dialog.adventure-dialog .adventure-response { padding-top: 18px; }
  #project-dialog.adventure-dialog .adventure-response .adventure-primary { min-height: 48px; }
  #project-dialog.adventure-dialog:not(:has(.adventure-activity)) .adventure-map { grid-template-columns: minmax(0, 1fr); gap: 9px; padding: 9px; }
  #project-dialog.adventure-dialog:not(:has(.adventure-activity)) .adventure-world { display: grid; grid-template-columns: 72px minmax(0, 1fr); min-height: 110px; gap: 9px; padding: 11px 10px; text-align: left; }
  #project-dialog.adventure-dialog:not(:has(.adventure-activity)) .adventure-island { width: 72px; height: 72px; }
  #project-dialog.adventure-dialog:not(:has(.adventure-activity)) .adventure-world-title { font-size: 20px; }
}
