/* Keep the room visible above the reading area and group the actions near the bottom. */
@media (max-width: 700px) {
  body.brand-tour .scene .shade {
    opacity: .45;
    background: linear-gradient(180deg, #15130f8a, transparent 26%, transparent 66%, #15130f44);
  }

  body.brand-tour .scene .scenic-extension-v65 { opacity: .82; }

  body #brand-ending[data-room]:not([hidden]) > .tour-stage {
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto;
    gap: clamp(14px, 2.7dvh, 24px);
    padding: calc(132px + env(safe-area-inset-top, 0px)) 7% calc(12px + env(safe-area-inset-bottom, 0px));
  }

  body #brand-ending[data-room] .tour-light {
    background: linear-gradient(180deg, transparent 22%, #100d0b28 36%, #100d0b9c 54%, #100d0bb8 77%, #100d0be6);
  }

  body #brand-ending[data-room] .tour-content {
    position: relative;
    grid-row: 1;
    align-self: end;
    inset: auto;
    width: 100%;
    max-height: 100%;
    padding: 6px 0 2px;
    text-shadow: 0 1px 8px #100d0ba8;
  }

  body #brand-ending[data-room] .tour-content h1 {
    max-width: none;
    font-size: clamp(35px, 10.5vw, 48px);
    line-height: 1.03;
    letter-spacing: -.025em;
  }

  body #brand-ending[data-room] .tour-reading {
    max-width: 42ch;
    margin: 8px 0 14px;
  }

  body #brand-ending[data-room] .tour-reading summary { font-size: 14px; }

  body #brand-ending[data-room] .tour-reading #tour-copy { margin: 12px 0 0; }

  body #brand-ending[data-room] #tour-copy p {
    margin: 0 0 10px;
    color: #f3e7d5;
    font-size: clamp(15px, 3.7vw, 17px);
    line-height: 1.55;
  }

  body #brand-ending[data-room] #tour-copy p:last-child { margin-bottom: 0; }

  body #brand-ending[data-room] .tour-actions {
    display: flex;
    gap: 4px 16px;
  }

  body #brand-ending[data-room] .tour-actions .tour-action {
    flex: 1 1 8rem;
    min-height: 46px;
    justify-content: space-between;
    font-size: 13px;
    overflow-wrap: anywhere;
  }

  #brand-ending .tour-navigation {
    position: relative;
    grid-row: 2;
    inset: auto;
    gap: 4px 10px;
    flex-wrap: wrap;
    justify-content: space-between;
  }

  #brand-ending .tour-stops {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    order: -1;
    width: 100%;
    gap: 0 10px;
    padding-top: 3px;
    border-top: 1px solid #d0b58c61;
  }

  #brand-ending .tour-stops a {
    justify-content: center;
    padding: 4px 1px;
    font-size: clamp(11px, 3.15vw, 13px);
    line-height: 1.25;
    text-align: center;
    overflow-wrap: anywhere;
  }

  #brand-ending .tour-navigation button {
    max-width: calc(50% - 5px);
    min-height: 44px;
    line-height: 1.3;
  }

  #brand-ending .tour-navigation button svg { flex-shrink: 0; }
  #brand-ending #tour-next { text-align: right; }
}

@media (max-width: 700px) and (max-height: 650px) {
  body #brand-ending[data-room] .tour-light {
    background: linear-gradient(180deg, transparent 12%, #100d0b66 30%, #100d0bbd 52%, #100d0be6);
  }
}
