/*
  Nancy Project — Tablet Portrait Refinement P4
  Owner-review adjustments isolated to the exact 768×1024, 800×1280 and
  1024×1366 portrait viewports. Copy, typography, color and source assets
  remain inherited from P3 without alteration.
*/

/* 768×1024 · wider Theater proof stack with a 13% top-only source crop. */
@media (orientation: portrait) and (width: 768px) and (height: 1024px) {
  .nancy-tablet-portrait-p4 #slide-05 {
    padding: 18px 0;
  }

  .nancy-tablet-portrait-p4 #slide-05 .v24-container {
    gap: 14px;
  }

  .nancy-tablet-portrait-p4 #slide-05 .v24-image-pair {
    width: min(100%, 430px);
    gap: 10px;
  }

  .nancy-tablet-portrait-p4 #slide-05 .v24-image-frame {
    width: 100%;
    height: auto !important;
    aspect-ratio: 3500 / 2436 !important;
  }

  .nancy-tablet-portrait-p4 #slide-05 .v24-image-frame > img,


  .nancy-tablet-portrait-p4 #slide-05 .v24-image-frame >picture>img{
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100% !important;
    object-fit: cover;
    object-position: 50% 100%;
  }

  .nancy-tablet-portrait-p4 #slide-05 .v24-figure figcaption {
    width: min(100%, 430px);
  }

  /* One approved Powder Room portrait; the existing copy stays above it. */
  .nancy-tablet-portrait-p4 #slide-07 .v24-powder-pair {
    width: min(100%, 420px);
    grid-template-columns: minmax(0, 1fr);
  }

  .nancy-tablet-portrait-p4 #slide-07 .v24-powder-pair .v24-image-frame:nth-child(2) {
    display: none;
  }

  .nancy-tablet-portrait-p4 #slide-07 .v24-figure figcaption {
    width: min(100%, 420px);
    margin-inline: auto;
  }
}

/* 800×1280 · wider Theater stack with 6% top-only crop and a single
   Powder Room proof placed beside its unchanged copy. */
@media (orientation: portrait) and (width: 800px) and (height: 1280px) {
  .nancy-tablet-portrait-p4 #slide-05 .v24-image-pair {
    width: min(100%, 620px);
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
    margin-inline: auto;
  }

  .nancy-tablet-portrait-p4 #slide-05 .v24-image-frame {
    width: 100%;
    height: auto !important;
    aspect-ratio: 3500 / 2632 !important;
  }

  .nancy-tablet-portrait-p4 #slide-05 .v24-image-frame > img,


  .nancy-tablet-portrait-p4 #slide-05 .v24-image-frame >picture>img{
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100% !important;
    object-fit: cover;
    object-position: 50% 100%;
  }

  .nancy-tablet-portrait-p4 #slide-05 .v24-figure figcaption {
    width: min(100%, 620px);
    margin-inline: auto;
  }

  .nancy-tablet-portrait-p4 #slide-07 .v24-container {
    grid-template-columns: minmax(0, 430px) minmax(0, 1fr);
    grid-template-areas: "figure copy";
    gap: 40px;
    align-items: center;
  }

  .nancy-tablet-portrait-p4 #slide-07 .v24-copy {
    grid-area: copy;
    width: 100%;
  }

  .nancy-tablet-portrait-p4 #slide-07 .v24-figure {
    grid-area: figure;
    width: 430px;
  }

  .nancy-tablet-portrait-p4 #slide-07 .v24-powder-pair {
    width: 100%;
    grid-template-columns: minmax(0, 1fr);
    margin: 0;
  }

  .nancy-tablet-portrait-p4 #slide-07 .v24-powder-pair .v24-image-frame:nth-child(2) {
    display: none;
  }
}

/* 1024×1366 · a top-led Spiritual Arrival and 10%-larger Bedroom proofs. */
@media (orientation: portrait) and (width: 1024px) and (height: 1366px) {
  .nancy-tablet-portrait-p4 #slide-02 .slide-02-f3-container {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "copy"
      "figure";
    gap: 44px;
    align-items: start;
  }

  .nancy-tablet-portrait-p4 #slide-02 .slide-02-copy {
    grid-area: copy;
    width: min(100%, 820px);
  }

  .nancy-tablet-portrait-p4 #slide-02 .slide-02-figure {
    grid-area: figure;
    width: 100%;
  }

  .nancy-tablet-portrait-p4 #slide-02 .slide-02-image-frame {
    width: 100%;
    height: 544px !important;
  }

  .nancy-tablet-portrait-p4 #slide-02 .slide-02-image-frame > img,


  .nancy-tablet-portrait-p4 #slide-02 .slide-02-image-frame >picture>img{
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100% !important;
    object-fit: cover;
    object-position: 100% 50%;
  }

  .nancy-tablet-portrait-p4 #slide-09 .v24-image-pair {
    width: min(100%, 682px);
  }

  .nancy-tablet-portrait-p4 #slide-09 .v24-figure figcaption {
    width: min(100%, 682px);
  }
}
