/* Small screens switch camera angles and app views with native-sized targets. */
@media (max-width:760px), (max-height:500px) and (orientation:landscape) {
  .site > .nav { padding-inline: max(6%, env(safe-area-inset-left)) max(6%, env(safe-area-inset-right)); }
  .nav-tools details > nav, .nav-tools details > div {
    max-height: calc(100svh - 74px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
    overflow-y: auto;
    overscroll-behavior-y: contain;
    scrollbar-width: thin;
  }
  .nav-tools details a {
    display: flex;
    align-items: center;
    min-height: 44px;
    line-height: 1.3;
  }
  .faq-list details { padding-block: 0; }
  .faq-list summary { display:flex; align-items:center; min-height: 54px; padding-block: 10px; }
  .faq-list details[open] p { margin: 0 0 16px; }
  .footer-nav a { min-width: 44px; }
  .site-footer .footer-signature { min-height: 44px; align-items: center; }
  .product-tour .tour-seek { height: 44px; }
  .product-tour .tour-cues button { min-height: 44px; }
  .product-tour video { cursor: pointer; }
  .garage-paints label { width: 44px; }
  .garage-angle select { font-size: 16px; }
  .lightbox[open] {
    margin: auto;
    width: min(calc(100vw - 12px),calc((100svh - 70px) * var(--shot-ratio,.46) + 14px));
    max-width: calc(100vw - 12px);
    max-height: calc(100svh - 8px);
    padding: 3px 6px 6px;
  }
  .lightbox button { width: 44px; height: 44px; margin-bottom: 3px; }
  .lightbox img { max-width: 100%; max-height: calc(100svh - 70px); }
}

@media (max-width:700px) and (orientation:portrait) {
  .site > .nav { padding-top: max(23px,env(safe-area-inset-top)); }
  .app-console {
    padding: clamp(44px,7svh,68px) max(6%, env(safe-area-inset-left)) 40px max(6%, env(safe-area-inset-right));
    grid-template-columns: minmax(0,1fr);
    gap: 0;
    /* Show the actual screen as the focal point on a phone. */
    background: radial-gradient(ellipse 90% 40% at 60% 54%,#1c1e20 0%,#0b0c0d 70%,#08090a 100%);
  }
  .app-console::before { display: none; }
  .console-copy { display: contents; }
  .console-copy > .eyebrow { grid-row: 1; }
  .app-console h2 { grid-row: 2; margin-top: 10px; }
  .console-copy .tabs { grid-row: 3; margin: 17px 0; gap: 5px; }
  .console-copy .scene-tab { padding: 6px 12px; }
  .console-art { grid-row: 4; }
  .console-art .phone-glass { width: min(72vw,32svh,280px); }
  .console-copy .screen-panel { grid-row: 5; margin-top: 19px; }
  .console-tools { grid-row: 6; margin-top: 8px; }
  .product-tour .tour-glass { width: min(81%,calc((100svh - 141px) * .46),260px); }
  .product-tour .tour-stage { padding-block: 12px; }
}

/* Keep the compact player and navigation usable in landscape. */
@media (max-height:500px) and (orientation:landscape) {
  .site > .nav { padding-top:max(7px,env(safe-area-inset-top)); justify-content:flex-start; gap:clamp(20px,3.8vw,42px); }
  .nav-tools .nav-tagline { display:none; }
  .product-tour .tour-layout { display:grid; grid-template-columns: minmax(0,1fr) minmax(0,.9fr); align-items: center; gap:4%; padding:28px 6%; }
  .product-tour .tour-copy { display:block; }
  .product-tour h2 { font-size:clamp(31px,4.4vw,44px); }
  .product-tour .tour-summary { font-size:14px; }
  .product-tour .tour-stage { min-height:0; padding-block:8px; }
  .product-tour .tour-glass { width:min(86%,calc((100svh - 85px) * .46)); }
  .product-tour .tour-controls { gap:4px; padding-inline:2px; }
}
