/* Victory opens the real campaign map, with a soft artwork transition. */
#level-transition .full-map-result {
  display: flex;
  flex-direction: column;
  gap: 0;
  background: #173e43;
  width: 100%;
  max-width: none;
  isolation: isolate;
}
.full-map-result .result-poster {
  flex: 0 0 190px;
  min-width: 0;
  min-height: 190px;
  max-height: 190px;
  background: transparent;
  z-index: 2;
  overflow: visible;
  pointer-events: none;
}
.full-map-result .result-feedback {
  pointer-events: auto;
}
.full-map-result .result-keyart {
  height: calc(100% + 72px);
  object-position: center 38%;
  -webkit-mask-image: linear-gradient(#000 0%, #000 52%, #000d 66%, transparent 100%);
  mask-image: linear-gradient(#000 0%, #000 52%, #000d 66%, transparent 100%);
}
.full-map-result .result-poster::after {
  bottom: -72px;
  background: linear-gradient(transparent 12%, #102c4344 48%, #173e4388 70%, transparent);
}
.full-map-result .result-title {
  position: relative;
  z-index: 1;
}
.victory-map-slot {
  flex: 1;
  min-height: 0;
  display: flex;
  position: relative;
  z-index: 1;
  /* The map runs behind the banner so the fade reveals real, pannable terrain. */
  margin-top: -72px;
  padding-top: 0;
}
.full-map-result .route-viewport {
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
.full-map-result .route-heading {
  display: none;
}
.full-map-result .map-return {
  top: 82px;
  z-index: 6;
}
.full-map-result #campaign-grid {
  padding-top: 72px;
  box-sizing: border-box;
}
.full-map-result .result-loss-copy {
  max-width: 620px;
  margin: 6px auto;
  font:
    800 14px/1.3 'Nunito',
    sans-serif;
  color: #fff2d0;
  text-shadow: 0 2px 4px #102439;
}
@media (max-height: 740px) and (orientation: portrait) {
  .full-map-result .result-poster {
    flex-basis: 130px;
    min-height: 130px;
    max-height: 130px;
  }
}
@media (max-height: 600px) and (orientation: portrait) {
  .full-map-result .result-poster {
    flex-basis: 112px;
    min-height: 112px;
    max-height: 112px;
  }
}
@media (min-height: 950px) {
  .full-map-result .result-poster {
    flex-basis: 230px;
    min-height: 230px;
    max-height: 230px;
  }
}
@media (max-height: 600px) and (orientation: landscape) {
  #level-transition .full-map-result {
    display: flex;
    flex-direction: row;
  }
  .full-map-result .result-poster {
    flex: 0 0 32%;
    min-height: 0;
    max-height: none;
    align-items: flex-start;
  }
  .full-map-result .result-keyart {
    height: 100%;
    width: calc(100% + 72px);
    -webkit-mask-image: linear-gradient(90deg, #000 0%, #000 45%, transparent 100%);
    mask-image: linear-gradient(90deg, #000 0%, #000 45%, transparent 100%);
  }
  .full-map-result .result-poster::after {
    inset: 0 -72px 0 0;
    background: linear-gradient(90deg, #173e4344, transparent);
  }
  .full-map-result .victory-map-slot {
    margin-top: 0;
    margin-left: -72px;
  }
  .full-map-result #campaign-grid {
    padding-top: 0;
  }
  .full-map-result .map-return {
    top: 8px;
  }
  .full-map-result .result-title {
    padding: 12px 8px;
  }
}
/* Let the shared world shrink to its landscape slot instead of overflowing it. */
.full-map-result .victory-map-slot,
.full-map-result .route-viewport {
  min-width: 0;
}

/* Five seconds to celebrate, then a smooth handover to the full map. */
.full-map-result .result-poster {
  transition:
    opacity 0.55s ease,
    flex-basis 0.7s ease,
    min-height 0.7s ease,
    max-height 0.7s ease,
    visibility 0s;
}
.full-map-result .victory-map-slot {
  transition: margin 0.7s ease;
}
.full-map-result #campaign-grid {
  transition: padding 0.7s ease;
}
.full-map-result .map-return {
  transition: top 0.7s ease;
}
.full-map-result.banner-dismissed .result-poster {
  opacity: 0;
  flex-basis: 0;
  min-height: 0;
  max-height: 0;
  visibility: hidden;
  transition:
    opacity 0.55s ease,
    flex-basis 0.7s ease,
    min-height 0.7s ease,
    max-height 0.7s ease,
    visibility 0s 0.7s;
}
.full-map-result.banner-dismissed .victory-map-slot {
  margin: 0;
}
.full-map-result.banner-dismissed #campaign-grid {
  padding-top: 0;
}
.full-map-result.banner-dismissed .map-return {
  top: 12px;
}
@media (prefers-reduced-motion: reduce) {
  .full-map-result .result-poster,
  .full-map-result .victory-map-slot,
  .full-map-result #campaign-grid,
  .full-map-result .map-return {
    transition: none !important;
  }
}
/* Feature switch retains the poster without a five-second overlay or layout transition. */
.full-map-result.banner-disabled .result-poster {
  display: none;
}
.full-map-result.banner-disabled .victory-map-slot,
.full-map-result.banner-disabled #campaign-grid,
.full-map-result.banner-disabled .map-return {
  transition: none;
}
