/* ======================================================
   Sayonara_Alice.exe — v72.15
   Tablet Portrait Refinement
   ------------------------------------------------------
   Keeps desktop / wide stage intact.
   Refines only the tall tablet composition:
   - technical top line becomes more readable and uses the top space
   - the title/copy moves clearly BELOW the two videos
   - overlap on portrait is removed or reduced to a minimal touch
   - spacing becomes more intentional and less card-like
====================================================== */

@media (min-width: 700px) {
  .v72-opening[data-memory-mode="dual"] {
    container: v72-stage / size;
  }
}

@container v72-stage (max-aspect-ratio: 6 / 5) {
  .v72-opening[data-memory-mode="dual"] .v72-opening-shell {
    --v72-safe-top: clamp(54px, 9.2cqh, 92px);
    --v72-safe-bottom: clamp(20px, 3.8cqh, 38px);
    row-gap: clamp(8px, 1.1cqh, 14px) !important;
    padding-top: var(--v72-safe-top) !important;
    padding-bottom: var(--v72-safe-bottom) !important;
  }

  .v72-opening[data-memory-mode="dual"] .v72-opening-header {
    top: clamp(10px, 1.5cqh, 18px) !important;
    left: clamp(12px, 2.2cqw, 22px) !important;
    right: clamp(12px, 2.2cqw, 22px) !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    align-items: center !important;
    column-gap: clamp(.75rem, 1.7cqw, 1.15rem) !important;
    row-gap: 0 !important;
    font-size: unset !important;
  }

  .v72-opening[data-memory-mode="dual"] .v72-opening-header::after {
    display: none !important;
  }

  .v72-opening[data-memory-mode="dual"] .v72-opening-status,
  .v72-opening[data-memory-mode="dual"] .v72-opening-instance {
    min-width: 0 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    color: rgba(219, 248, 255, .78) !important;
    font: 700 clamp(.62rem, 1.28cqw, .92rem)/1.28 "Courier New", Consolas, monospace !important;
    letter-spacing: .16em !important;
    text-transform: uppercase !important;
  }

  .v72-opening[data-memory-mode="dual"] .v72-opening-status::before {
    width: 7px !important;
    height: 7px !important;
  }

  .v72-opening[data-memory-mode="dual"] .v72-dual-memory-stage {
    width: min(
      calc(100cqw - clamp(8px, 1.4cqw, 18px)),
      calc((100cqh - var(--v72-safe-top) - var(--v72-safe-bottom) - clamp(168px, 24cqh, 240px)) * 1.49272)
    ) !important;
    max-width: 1080px !important;
  }

  .v72-opening[data-memory-mode="dual"] .v72-opening-copy {
    width: min(90cqw, 42rem) !important;
    max-width: 42rem !important;
    margin-top: clamp(6px, .85cqh, 14px) !important;
    padding-top: 0 !important;
    text-align: center !important;
  }

  .v72-opening[data-memory-mode="dual"] .v72-opening-copy::before {
    inset: -1.25rem -2.35rem -2.15rem !important;
    opacity: .98 !important;
    background:
      linear-gradient(180deg, rgb(0 3 10 / 0) 0%, rgb(0 4 14 / .18) 16%, rgb(0 5 15 / .85) 44%, rgb(0 6 18 / .98) 74%, rgb(0 7 20 / .78) 100%) !important;
    filter: blur(4px) !important;
  }

  .v72-opening[data-memory-mode="dual"] .v72-opening-kicker {
    justify-content: center !important;
    margin-bottom: clamp(.45rem, .8cqh, .7rem) !important;
  }

  .v72-opening[data-memory-mode="dual"] .v72-title-base,
  .v72-opening[data-memory-mode="dual"] .v72-title-signature,
  .v72-opening[data-memory-mode="dual"] .v72-opening-title {
    width: 100% !important;
    min-width: 0 !important;
    text-align: center !important;
  }

  .v72-opening[data-memory-mode="dual"] .v72-title-sayonara {
    font-size: clamp(2.3rem, 8.4cqw, 5rem) !important;
  }

  .v72-opening[data-memory-mode="dual"] .v72-title-alice {
    font-size: clamp(2.8rem, 10cqw, 6rem) !important;
  }

  .v72-opening[data-memory-mode="dual"] .v72-opening-subtitle {
    width: min(82cqw, 34rem) !important;
    margin-top: clamp(.45rem, .7cqh, .6rem) !important;
    font-size: clamp(.74rem, 1.7cqw, 1rem) !important;
    line-height: 1.42 !important;
  }

  .v72-opening[data-memory-mode="dual"] .v72-opening-actions {
    width: min(82cqw, 34rem) !important;
    margin-top: clamp(.55rem, .9cqh, .82rem) !important;
    gap: clamp(.44rem, .9cqw, .68rem) !important;
  }

  .v72-opening[data-memory-mode="dual"] .v72-enter,
  .v72-opening[data-memory-mode="dual"] .v72-archive-link {
    min-height: clamp(40px, 4.7cqh, 48px) !important;
  }

  .v72-opening[data-memory-mode="dual"] .v72-opening-footer {
    left: clamp(12px, 2.2cqw, 22px) !important;
    right: clamp(12px, 2.2cqw, 22px) !important;
    bottom: clamp(8px, 1.2cqh, 14px) !important;
  }
}

/* Slightly denser layout for portrait tablets with limited height. */
@media (min-width: 700px) and (orientation: portrait) and (max-height: 1080px) {
  .v72-opening[data-memory-mode="dual"] .v72-opening-shell {
    --v72-safe-top: clamp(48px, 8.3svh, 78px);
  }
}
