/* Test revision: phone landscape only. Desktop and phone portrait keep v42. */
@media (orientation: landscape) and (max-height: 600px) and (max-width: 700px),
       (orientation: landscape) and (max-height: 600px) and (hover: none) and (pointer: coarse) {
  /* Move the column origin, not the logo: 18.6 + 26 = 44.6svh. */
  .home .brand-column { top: 0; height: 100svh; --logo-y: 44.6svh; }
  .home .line-upper { height: calc(44.6svh - 22px); }
  .home .line-lower { top: calc(44.6svh + 13px); bottom: 0; }

  .lookbook {
    --focus-x: 32vw;
    --focus-y: 50svh;
    --landscape-photo-height: min(66svh, 260px);
    --landscape-caption-width: clamp(200px, 30vw, 300px);
    --landscape-caption-gap: 20px;
  }
  .gallery-line {
    left: var(--focus-x);
    top: 0;
    width: var(--line-w);
    height: 100svh;
    transform: translateX(-50%);
    transform-origin: center;
  }
  .gallery-scroll {
    overflow-x: auto;
    overflow-y: hidden;
    touch-action: pan-x;
    scroll-behavior: auto;
    -webkit-overflow-scrolling: touch;
  }
  .gallery-track {
    flex-direction: row;
    align-items: center;
    gap: clamp(30px, 5vw, 44px);
    width: max-content;
    height: 100%;
    min-height: 100%;
    padding: 0 calc(100vw - var(--focus-x)) 0 var(--focus-x);
    /* Compensate only animation layout, never the user's native scroll. */
    transform: translateX(var(--landscape-shift, 0px));
  }
  .look-item, .look-item.active {
    display: flex;
    align-items: center;
    width: auto;
    height: auto;
    margin: 0;
    transition: none;
  }
  .look-item .photo-button, .look-item.active .photo-button {
    flex: 0 0 auto;
    width: var(--mobile-w);
    height: auto;
    aspect-ratio: var(--ratio);
    transform: none;
    touch-action: pan-x;
    transition: width .25s ease-in-out;
  }
  .look-item.active .photo-button {
    width: calc(var(--landscape-photo-height) * var(--ratio));
  }
  .look-item figcaption, .look-item.active figcaption {
    position: static;
    display: block;
    flex: 0 0 auto;
    width: 0;
    margin: 0;
    padding: 0;
    overflow: hidden;
    transform: none;
    text-align: left;
    /* Opaque white protects the text from the line as the native gallery moves. */
    background: var(--paper);
    opacity: 1;
    font-size: 11px;
    transition: width .25s ease-in-out, margin-left .25s ease-in-out;
  }
  .look-item.active figcaption {
    width: var(--landscape-caption-width);
    margin-left: var(--landscape-caption-gap);
    opacity: 1;
  }
  .look-item figcaption dl {
    width: var(--landscape-caption-width);
    min-width: var(--landscape-caption-width);
    margin: 0;
    overflow: visible;
  }
  .look-item figcaption div {
    display: flex;
    align-items: baseline;
    justify-content: flex-start;
    gap: 10px;
    margin-bottom: 9px;
  }
  .look-item figcaption div:last-child { margin-bottom: 0; }
  .look-item figcaption dt, .look-item figcaption dd { padding: 0; margin: 0; }
  .look-item figcaption dt { flex: none; }
  .look-item figcaption dd { min-width: 0; }
  .desktop-caption, .gallery-arrow { display: none; }
  .gallery-track.no-motion .photo-button { transition: none !important; }
  @media (prefers-reduced-motion: reduce) {
    .gallery-track .photo-button { transition: none; }
  }
}
