/* Phone remains the primary portrait composition. Wide browser windows use the
   full landscape canvas and separate place identity from playback controls. */

@media (min-width: 900px) and (min-aspect-ratio: 4 / 3) {
  :root {
    --safe-top: clamp(1.5rem, 3vh, 2.6rem);
    --safe-right: clamp(2rem, 4vw, 4.5rem);
    --safe-bottom: clamp(1.5rem, 3vh, 2.8rem);
    --safe-left: clamp(2rem, 4vw, 4.5rem);
  }

  .app-shell {
    left: 0;
    width: 100%;
    transform: none;
    box-shadow: none;
  }

  .map-view {
    padding: var(--safe-top) var(--safe-right) var(--safe-bottom) var(--safe-left);
  }

  .brand-lockup {
    max-width: 30rem;
  }

  .brand-lockup h1 {
    font-size: clamp(2.25rem, 3.2vw, 3.5rem);
  }

  .brand-lockup > p:last-child {
    font-size: 0.88rem;
  }

  .map-footer {
    max-width: 34rem;
  }

  .survey-invitation {
    width: min(26rem, calc(100vw - var(--safe-left) - var(--safe-right)));
  }

  .place-view {
    grid-template-columns: minmax(0, 1fr) minmax(22rem, 30rem);
    grid-template-rows: auto minmax(0, 1fr) auto;
    column-gap: clamp(3rem, 7vw, 8rem);
    padding: var(--safe-top) var(--safe-right) var(--safe-bottom) var(--safe-left);
  }

  .place-view .back-button {
    grid-column: 1 / -1;
    grid-row: 1;
    justify-self: start;
  }

  .place-view .place-copy {
    grid-column: 1;
    grid-row: 2 / 4;
    align-self: center;
    justify-self: start;
    width: min(100%, 36rem);
    margin: 0 0 0 clamp(2rem, 6vw, 7rem);
    padding: 1.5rem;
    text-align: left;
  }

  .place-view .place-copy .eyebrow {
    margin: 0 0 1.35rem;
    font-size: clamp(0.82rem, 1.1vw, 1rem);
  }

  .place-view .place-copy h2 {
    font-size: clamp(3.8rem, 6vw, 5.8rem);
    letter-spacing: 0.24em;
    text-indent: 0;
  }

  .place-view .place-poem {
    margin-top: 1rem;
    font-size: clamp(0.92rem, 1.25vw, 1.08rem);
  }

  .place-view .player-panel {
    grid-column: 2;
    grid-row: 3;
    align-self: end;
    justify-self: end;
    width: min(100%, 28rem);
    margin: 0;
  }

  .place-view::after {
    background:
      linear-gradient(90deg, rgba(5, 24, 23, 0.42), transparent 48%, rgba(4, 18, 20, 0.2)),
      linear-gradient(180deg, transparent 50%, rgba(4, 17, 18, 0.36));
  }
}

@media (max-width: 520px) {
  .survey-invitation {
    right: var(--safe-right);
    bottom: calc(var(--safe-bottom) + 5.65rem);
    left: var(--safe-left);
    width: auto;
  }

  .survey-entry {
    right: var(--safe-right);
    bottom: calc(var(--safe-bottom) + 1.75rem);
  }
}
