/* Real export examples are the working surface of the style chooser. */
/* The desktop shell clips overflow for the map canvas. The taller chooser
   needs its own scroll area; the unused map placeholder must not take height. */
html[data-mtle-guided][data-guided-step="1"] #setup-panel,
html[data-mtle-guided][data-guided-step="1"] #p418bEmptyCaption { display: none !important; }
@media (min-width: 1025px) {
  html[data-mtle-guided][data-guided-step="1"] #p418bEmptyStage {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-gutter: stable both-edges;
    scroll-padding-block: 24px;
  }
}
html.p394a-choice-stage #p425aGallery.mtle-showcase {
  display: block;
  width: min(1120px, calc(100% - 48px));
  margin: 28px auto 32px;
  text-align: left;
}
.mtle-showcase-intro { margin-bottom: 24px; }
.mtle-showcase-intro h2 { margin: 0 0 8px; color: #f0f4f8; font-size: clamp(22px, 2vw, 28px); font-weight: 650; }
.mtle-showcase-intro p { margin: 0; color: #bac8d8; font-size: 16px; line-height: 1.5; }
.mtle-showcase-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.mtle-showcase-item { min-width: 0; overflow: hidden; border: 1px solid #3c4e60; border-radius: 12px; background: #1a2530; }
.mtle-showcase-item.is-selected { border-color: #90c5ff; box-shadow: 0 0 0 2px #90c5ff; }
html[data-mtle-guided] #p425aGallery .mtle-showcase-select {
  display: block; width: 100%; padding: 0; border: 0; border-radius: 0;
  background: transparent; text-align: left; box-shadow: none; transform: none;
}
html[data-mtle-guided] #p425aGallery .mtle-showcase-select.active { border: 0; box-shadow: none; }
html[data-mtle-guided] #p425aGallery .mtle-showcase-select picture { display: grid; place-items: center; background: #eee9df; }
html[data-mtle-guided] #p425aGallery .mtle-showcase-select picture img {
  display: block; width: 100%; height: auto; aspect-ratio: 3 / 2;
  margin-inline: auto; object-fit: contain; object-position: center;
  border-radius: 0; background: #eee9df;
}
.mtle-showcase-copy { display: block; padding: 18px 20px 8px; }
.mtle-showcase-title-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
html[data-mtle-guided] #p425aGallery .mtle-showcase-select .p425a-gallery-label { margin: 0; font-size: 20px; line-height: 1.3; }
.mtle-showcase-selected { visibility: hidden; border-radius: 4px; padding: 4px 8px; background: #90c5ff; color: #101e2b; font-size: 14px; font-weight: 650; }
.mtle-showcase-select.active .mtle-showcase-selected { visibility: visible; }
html[data-mtle-guided] #p425aGallery .mtle-showcase-select .production-build-summary { padding: 8px 0; font-size: 14px; }
html[data-mtle-guided] #p425aGallery .mtle-showcase-select .p425a-gallery-desc { min-height: 3em; margin: 0; font-size: 16px; line-height: 1.5; }
.mtle-showcase-card-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 12px; padding: 0 20px 14px; }
.mtle-showcase-place { max-width: 100%; color: #aebdcb; font-size: 14px; line-height: 1.5; }
.mtle-showcase-detail, .mtle-showcase-detail-close, .mtle-showcase-views button, .mtle-title-ideas button {
  min-height: 44px; padding: 8px 12px; font: inherit; font-size: 14px; color: #c6e1ff;
  border: 1px solid #536b81; border-radius: 6px; background: #213447; cursor: pointer;
}
.mtle-showcase-detail { padding: 8px 0; border-color: transparent; background: transparent; text-decoration: underline; text-underline-offset: 3px; }
.mtle-showcase button:focus-visible, .mtle-showcase summary:focus-visible, .mtle-showcase-dialog button:focus-visible, .mtle-title-ideas button:focus-visible { outline: 3px solid #90c5ff; outline-offset: -3px; }
.mtle-showcase-example-note { margin: 20px 0; color: #acbac9; font-size: 14px; line-height: 1.5; }
.mtle-showcase-more { border-top: 1px solid #344657; padding: 12px 0; }
.mtle-showcase-more summary { min-height: 44px; padding: 10px 0; color: #d2dfeb; font-size: 16px; cursor: pointer; }
.mtle-showcase-more p { color: #bac8d8; font-size: 14px; line-height: 1.5; }
html[data-mtle-guided] #p425aGallery .mtle-showcase-alternative { min-height: 48px; margin: 4px 12px 4px 0; text-align: left; font: inherit; font-size: 16px; }
html[data-mtle-guided] #p425aGallery .mtle-showcase-custom { min-height: 44px; padding: 10px 16px; border-color: #536b81; font: inherit; font-size: 16px; }
html[data-mtle-guided] #p425aGallery .mtle-showcase-alternative,
html[data-mtle-guided] #p425aGallery .mtle-showcase-custom { color: #d2dfeb; }
.mtle-showcase-status { margin: 12px 0 0; color: #bed8ef; font-size: 14px; line-height: 1.5; }
.mtle-showcase-status:empty { display: none; }
.mtle-showcase-image-error { display: grid; place-items: center; aspect-ratio: 3 / 2; padding: 24px; color: #243548; font-size: 16px; line-height: 1.5; }
.mtle-showcase img[hidden], .mtle-showcase-dialog img[hidden] { display: none !important; }
.mtle-showcase-dialog {
  box-sizing: border-box; width: min(1000px, calc(100vw - 32px)); max-height: calc(100dvh - 32px);
  margin: auto; padding: 20px; border: 1px solid #61778b; border-radius: 12px; background: #17232f; color: #e6eef6;
  overflow: auto;
}
.mtle-showcase-dialog::backdrop { background: rgba(4, 10, 17, .85); }
.mtle-showcase-dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.mtle-showcase-dialog h2 { margin: 0; font-size: 22px; }
.mtle-showcase-views { display: flex; gap: 8px; margin: 16px 0; }
.mtle-showcase-views button[aria-pressed="true"] { background: #90c5ff; color: #122333; border-color: #90c5ff; }
.mtle-showcase-dialog-art { display: grid; place-items: center; background: #eee9df; }
.mtle-showcase-dialog-art picture { display: grid; place-items: center; width: 100%; }
.mtle-showcase-dialog-art img { display: block; width: 100%; height: auto; max-height: 65dvh; margin-inline: auto; object-fit: contain; object-position: center; }
.mtle-showcase-dialog-note { margin: 16px 0 0; color: #c1ceda; font-size: 14px; line-height: 1.6; }
.mtle-title-ideas { margin: 8px 0 0; padding: 0; border: 0; }
.mtle-title-ideas legend { padding: 0; margin-bottom: 6px; color: #bac8d8; font-size: 14px; }
.mtle-title-ideas button { margin: 0 4px 6px 0; }
/* On stacked screens, the examples are the answer to the current question.
   Repeated rail instructions and the early build assumptions must not bury them. */
@media (max-width: 1024px) {
  /* Area and size are focused forms on phones; the gallery belongs to the
     previous question and would otherwise repeat below the size controls. */
  html[data-mtle-guided][data-guided-step="1"]:has([data-testid="substep-map-type"].active) .main-body .right-panel,
  html[data-mtle-guided][data-guided-step="1"]:has([data-testid="substep-size"].active) .main-body .right-panel { display: none; }
  html[data-mtle-guided][data-guided-step="1"]:has([data-testid="substep-piece-count"].active):not(.p365-custom-flow) #templatePickerCard,
  html[data-mtle-guided][data-guided-step="1"]:has([data-testid="substep-piece-count"].active):not(.p365-custom-flow) #plannerSummaryCard,
  html[data-mtle-guided][data-guided-step="1"]:has([data-testid="substep-piece-count"].active):not(.p365-custom-flow) .wizard-hero-subtitle { display: none; }
  html[data-mtle-guided][data-guided-step="1"]:has([data-testid="substep-piece-count"].active):not(.p365-custom-flow) .step-content-area { padding-bottom: 0; }
  html[data-mtle-guided][data-guided-step="1"]:has([data-testid="substep-piece-count"].active) .main-body .right-panel {
    height: auto; min-height: 0; overflow: visible;
  }
  html[data-mtle-guided][data-guided-step="1"]:has([data-testid="substep-piece-count"].active) #p418bEmptyStage {
    position: relative; height: auto; min-height: 0; overflow: visible;
  }
}
@media (max-width: 640px) {
  html.p394a-choice-stage #p425aGallery.mtle-showcase { width: calc(100% - 32px); margin-top: 20px; }
  .mtle-showcase-grid { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .mtle-showcase-intro { margin-bottom: 18px; }
  .mtle-showcase-copy { padding: 16px 16px 8px; }
  .mtle-showcase-card-foot { padding: 0 16px 12px; }
  .mtle-showcase-dialog { padding: 14px; }
}
