/* Teléfono: vertical ≤720px, o girado (poco alto). No pisa una PC de verdad. */

@media (max-width: 720px), (orientation: landscape) and (max-height: 520px) {
  html {
    -webkit-text-size-adjust: 100%;
    overflow-x: hidden;
    max-width: 100%;
  }

  body {
    overflow-x: hidden;
    max-width: 100%;
  }

  .kpc-layout-desk { display: none; }
  .kpc-layout-phone { display: inline; }

  .kpc-top {
    position: sticky;
    top: 0;
    z-index: 50;
    padding: 10px 14px;
    padding-top: max(10px, env(safe-area-inset-top));
    gap: 10px;
  }

  body[class*="is-"] .kpc-brand-sub {
    display: none;
  }

  .kpc-top-actions {
    gap: 6px;
    flex-shrink: 0;
  }

  .kpc-nav-group {
    gap: 4px;
  }

  .kpc-nav-group + .kpc-nav-group {
    padding-left: 6px;
  }

  .kpc-top-actions .kpc-ghost,
  .kpc-top-actions .kpc-nav-pill {
    height: 34px;
    padding: 0 10px;
    font-size: 11px;
  }

  .kpc-top-actions .kpc-nav-arrow {
    min-width: 34px;
    padding: 0 8px;
  }

  .kpc-page-no {
    height: 34px;
    padding: 0 8px;
    font-size: 11px;
  }

  .kpc-top-actions .kpc-music-btn {
    width: 100%;
    min-width: auto;
    padding: 0 10px;
    font-size: 11px;
  }

  .kpc-music-dock {
    min-width: 104px;
  }

  .kpc-top-actions .kpc-ana-gear,
  .kpc-top-actions .kpc-lang:not(.kpc-music-btn) {
    width: 34px;
    height: 34px;
    min-width: 34px;
    padding: 0;
  }

  .kpc-top-actions .kpc-lang {
    padding: 0 8px;
    width: auto;
  }

  .kpc-lang {
    height: 32px;
    padding: 0 10px;
  }

  .kpc-page,
  .kpc-video-page {
    max-width: 100%;
    overflow-x: hidden;
    padding: 18px 14px 72px;
    padding-bottom: max(72px, calc(24px + env(safe-area-inset-bottom)));
  }

  .kpc-intro-hero,
  .kpc-hero {
    min-width: 0;
    min-height: 0;
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 12px 0 8px;
  }

  .kpc-hero-logo {
    margin-bottom: 16px;
  }

  .kpc-hero-logo img,
  .kpc-offer-logo {
    width: 56px;
    height: 56px;
    flex-basis: 56px;
  }

  .kpc-intro-hero h1,
  .kpc-hero h1 {
    font-size: clamp(34px, 11vw, 48px);
    margin: 8px 0 12px;
  }

  .kpc-lead,
  .kpc-hero p {
    font-size: 16px;
    line-height: 1.5;
  }

  .kpc-intro-photo img {
    min-height: 200px;
    max-height: 260px;
  }

  .kpc-section {
    padding: 36px 0 6px;
  }

  .kpc-section h2 {
    font-size: clamp(24px, 7vw, 32px);
  }

  .kpc-section-title {
    font-size: clamp(20px, 5.4vw, 26px);
    letter-spacing: 0.02em;
    margin: 26px 0 10px;
  }

  .kpc-section p {
    font-size: 15px;
    line-height: 1.55;
  }

  .kpc-facts {
    grid-template-columns: 1fr;
    gap: 10px;
    margin-top: 18px;
  }

  .kpc-fact {
    padding: 14px 13px;
  }

  .kpc-offer {
    margin-top: 28px;
    padding-top: 20px;
  }

  .kpc-offer-head {
    flex-direction: column;
    gap: 12px;
  }

  .kpc-grid {
    grid-template-columns: 1fr;
    gap: 12px;
    margin-top: 18px;
  }

  .kpc-card {
    min-height: 0;
    padding: 16px 14px 14px;
  }

  .kpc-videos-button {
    min-width: 0;
    width: 100%;
    letter-spacing: 0.16em;
    text-indent: 0;
    padding: 0 18px;
  }

  .kpc-video-hero {
    flex-direction: column;
    text-align: center;
    gap: 10px;
    margin-bottom: 18px;
  }

  .kpc-video-hero h1 {
    font-size: clamp(36px, 12vw, 56px);
  }

  .kpc-openness {
    gap: 6px;
    margin: 8px 0 10px;
  }

  .kpc-openness button {
    min-width: 46px;
    height: 36px;
    font-size: 12px;
  }

  .kpc-openness .kpc-tone {
    width: 36px;
    min-width: 36px;
    height: 36px;
    padding: 0;
    flex: 0 0 36px;
  }

  .kpc-tones {
    flex-wrap: wrap;
    margin: 0 0 10px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 2px;
  }

  .kpc-tones .kpc-open-label {
    flex: 1 0 100%;
    margin: 0 0 8px;
  }

  .kpc-tone i {
    width: 18px;
    height: 18px;
  }

  .kpc-unit.is-window,
  .kpc-unit.is-french {
    min-height: 0;
  }

  .kpc-pair {
    padding: 12px 10px 12px;
    gap: 22px;
    margin-top: 14px;
  }

  .kpc-unit.is-window .kpc-wall-under {
    flex: 0 0 14px;
    min-height: 14px;
  }

  .kpc-unit.is-french .kpc-arch {
    min-height: 300px;
  }

  .kpc-win3 {
    aspect-ratio: 16 / 10;
  }

  .kpc-motor-play {
    gap: 22px;
  }

  .kpc-motor-room,
  .kpc-color-wall {
    padding: 12px 10px 12px;
    border-radius: 4px;
  }

  .kpc-motor-room .kpc-unit {
    display: flex;
    flex-direction: column;
  }
  .kpc-motor-room .kpc-unit > .kpc-unit-label { order: 0; }
  .kpc-motor-room .kpc-unit > .kpc-hang { order: 1; }
  .kpc-motor-room .kpc-unit > .kpc-openness:not(.kpc-tones) { order: 2; }
  .kpc-motor-room .kpc-unit > .kpc-tones { order: 3; }

  .kpc-motor-room .kpc-openness {
    margin: 8px 0 6px;
  }

  .kpc-motor-room .kpc-openness .kpc-open-label {
    flex: 1 0 100%;
  }

  .kpc-motor-room .kpc-tones {
    margin: 0 0 8px;
    flex-wrap: wrap;
  }

  .kpc-zb-play > div:has(.kpc-zb-stage) {
    display: flex;
    flex-direction: column;
  }

  .kpc-zb-play .kpc-zb-stage {
    order: 1;
  }

  .kpc-zb-play .kpc-tones {
    order: 2;
    margin: 10px 0 8px;
    flex-wrap: wrap;
  }

  .kpc-sec-play > div:has(.kpc-sec-stage) {
    display: flex;
    flex-direction: column;
  }

  .kpc-sec-play .kpc-sec-stage {
    order: 1;
  }

  .kpc-sec-play .kpc-openness:not(.kpc-tones) {
    order: 2;
    margin: 10px 0 6px;
  }

  .kpc-sec-play .kpc-tones {
    order: 3;
    margin: 0 0 8px;
    flex-wrap: wrap;
  }

  .kpc-sec-play .kpc-openness .kpc-open-label {
    flex: 1 0 100%;
  }

  .kpc-motor-room .kpc-unit.is-window,
  .kpc-motor-room .kpc-unit.is-french,
  .kpc-color-wall .kpc-unit.is-window {
    flex: 0 0 auto;
    min-height: 0;
  }

  .kpc-motor-room .kpc-unit.is-french .kpc-arch {
    min-height: 300px;
  }

  .kpc-motor-block .kpc-remote,
  .kpc-sec-play .kpc-remote,
  .kpc-end-play .kpc-remote,
  .kpc-motor-room .kpc-remote,
  .kpc-color-wall .kpc-remote,
  .kpc-sg-play .kpc-remote,
  .kpc-zb-play .kpc-remote {
    position: static;
    width: 100%;
    max-width: none;
    margin: 10px 0 0;
    z-index: auto;
  }

  .kpc-remote {
    width: 100%;
    max-width: none;
    border-radius: 26px;
    padding: 10px 12px 12px;
  }

  .kpc-remote-cap {
    margin-bottom: 6px;
  }

  .kpc-remote-brand {
    font-size: 9px;
    margin-bottom: 4px;
  }

  .kpc-remote h3 {
    margin-bottom: 8px;
    font-size: 9px;
  }

  .kpc-ch {
    margin-bottom: 8px;
    gap: 6px;
  }

  .kpc-ch button,
  .kpc-pad button {
    min-height: 44px;
    height: 44px;
    font-size: 12px;
    border-radius: 12px;
  }

  .kpc-pad {
    grid-template-columns: 1fr 1fr 1fr;
    gap: 8px;
  }

  .kpc-pad .up,
  .kpc-pad .dn,
  .kpc-pad .my {
    height: 48px;
    border-radius: 16px;
    font-size: 16px;
  }

  .kpc-pad .my {
    letter-spacing: 0.12em;
    font-size: 13px;
  }

  .kpc-remote small {
    margin-top: 8px;
    font-size: 9px;
  }

  .kpc-sec-play,
  .kpc-end-play,
  .kpc-sg-play,
  .kpc-zb-play {
    gap: 12px;
  }

  .kpc-zb-stage canvas {
    width: 100%;
    height: auto;
  }

  .kpc-stage.is-row {
    min-height: 0;
    padding: 28px 8px 10px;
    gap: 6px;
  }

  .kpc-stage.is-row .kpc-vano {
    height: 168px;
  }

  .kpc-colors {
    gap: 8px;
    margin: 6px 0 12px;
  }

  .kpc-color {
    min-width: 0;
    flex: 1 1 calc(25% - 8px);
    max-width: 72px;
    padding: 8px 4px 6px;
  }

  .kpc-color i {
    width: 28px;
    height: 28px;
  }

  .kpc-color small {
    font-size: 9px;
  }

  .kpc-home-blink {
    min-width: 0;
    width: 100%;
  }

  .kpc-solid,
  .kpc-video-back {
    height: 48px;
    width: 100%;
  }

  .kpc-cta-row {
    margin-top: 22px;
  }

  .kpc-foot {
    margin-top: 28px;
    gap: 8px;
  }

  .kpc-sx-sheet {
    width: calc(100% - 16px);
    min-height: calc(100vh - 12px);
    max-height: calc(100vh - 12px);
    margin: 6px auto;
    padding: 16px 14px 20px;
    border-radius: 12px;
  }

  .kpc-sx-pair {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .kpc-sx-dual-live {
    grid-template-columns: 52px minmax(0, 1fr) 52px;
    gap: 6px;
  }

  .kpc-sx-pair.is-chain-pair {
    grid-template-columns: 1fr;
  }

  .kpc-sx-solo-live,
  .kpc-sx-solo-live.is-right {
    grid-template-columns: 52px minmax(0, 1fr);
  }

  .kpc-sx-solo-live.is-right .kpc-sx-chain-live {
    order: -1;
  }

  .kpc-sx-photo img {
    height: 170px;
  }

  .kpc-sx-chain-live {
    padding: 6px 2px 8px;
  }

  .kpc-sx-chain-live > button {
    width: 32px;
    height: 32px;
  }

  .kpc-sx-chain-hand,
  .kpc-sx-chain-live[data-sx-lift="sc"] .kpc-sx-chain-hand,
  .kpc-sx-chain-live[data-sx-lift="bo"] .kpc-sx-chain-hand {
    left: 50%;
    right: auto;
    width: 24px;
    height: 32px;
    transform: translate(-50%, -50%);
  }

  .kpc-sx-live-win {
    min-height: 200px;
  }

  .kpc-hw {
    width: 13px;
  }

  .kpc-dlever {
    height: 36px;
  }

  .kpc-dlever::after {
    width: 20px;
  }

  .kpc-sx-fingers-board .kpc-sx-pair {
    grid-template-columns: 1fr;
  }

  .kpc-sx-motor-live .kpc-remote {
    width: 100%;
    max-width: none;
    margin: 0;
  }

  .kpc-sx-chain-live small {
    font-size: 8px;
    letter-spacing: 0.04em;
  }

  .kpc-sx-motor-live {
    grid-template-columns: 1fr;
  }

  .kpc-sx-openings {
    grid-template-columns: 1fr;
  }

  .kpc-pp-all-fabrics,
  .kpc-rf-all-fabrics {
    flex-direction: column;
    align-items: stretch;
  }

  .kpc-pp-all-fabrics > div,
  .kpc-rf-all-fabrics > div {
    justify-content: flex-start;
  }

  .kpc-pp-open-picks,
  .kpc-rf-open-picks {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .kpc-pp-open-picks button,
  .kpc-rf-open-picks button {
    grid-template-columns: 28px minmax(0, 1fr) auto;
    align-items: center;
    min-height: 56px;
    padding: 10px 12px;
    gap: 10px;
  }

  .kpc-pp-open-picks button b,
  .kpc-rf-open-picks button b {
    font-size: 16px;
  }

  .kpc-pp-open-picks button small,
  .kpc-rf-open-picks button small {
    justify-self: end;
  }

  .kpc-sx-sheet h3 {
    margin-right: 40px;
    font-size: 22px;
  }

  .kpc-sx-lead {
    font-size: 15px;
  }

  .kpc-sx-x {
    width: 44px;
    height: 44px;
  }

  .kpc-sx-return {
    width: 100%;
    min-height: 52px;
    font-size: 14px;
  }

  .kpc-sx-zb-height {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .kpc-sx-zb-height-win {
    width: min(100%, 262px);
    max-height: 210px;
    aspect-ratio: 5 / 4;
    margin-inline: auto;
  }

  .kpc-sx-zb-height-pad {
    padding: 12px 10px 14px;
  }

  .kpc-sx-zb-height-pad p {
    font-size: 11px;
  }

  .kpc-ana-work {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  body.kpc-foto-page,
  html:has(body.kpc-foto-page) {
    height: auto;
    max-height: none;
    overflow: auto;
  }

  body.kpc-foto-page {
    display: block;
  }

  body.kpc-foto-page .kpc-foto-main {
    display: block;
    height: auto;
    max-height: none;
    overflow: visible;
    padding: 20px 16px 40px;
  }

  body.kpc-foto-page .kpc-ana-intro {
    display: block;
  }

  body.kpc-foto-page .kpc-ana-work {
    height: auto;
    min-height: 0;
  }

  body.kpc-foto-page .kpc-ana-stage {
    height: auto;
    max-height: none;
    max-width: 100% !important;
    width: 100% !important;
    display: block;
    container-type: normal;
    background: #0a0d10;
  }

  body.kpc-foto-page .kpc-ana-zoom {
    width: 100%;
    max-width: 100% !important;
    height: auto;
    margin: 0 auto;
  }

  body.kpc-foto-page .kpc-ana-zoom > img:first-of-type {
    max-width: 100%;
    max-height: none;
    width: 100%;
    height: auto !important;
    object-fit: contain;
    aspect-ratio: var(--foto-ar, auto);
  }

  body.kpc-foto-page .kpc-ana-fabric {
    max-width: 100%;
    gap: 12px;
    padding: 10px;
  }

  body.kpc-foto-page .kpc-ana-fabric img {
    width: 64px;
    height: 64px;
  }

  body.kpc-foto-page .kpc-ana-fabric figcaption {
    font-size: 12px;
  }

  body.kpc-foto-page .kpc-ana-fabrics,
  body.kpc-foto-page .kpc-ana-fabric-side {
    max-width: min(280px, 100%);
    margin: 10px auto 0;
  }

  body.kpc-foto-page .kpc-ana-fabrics.is-chip {
    max-width: none;
    width: auto;
    margin: 8px 0 0;
  }

  body.kpc-foto-page .kpc-ana-fabric-side img {
    height: 72px;
  }

  body.kpc-foto-page .kpc-ana-lead {
    font-size: 14px;
    line-height: 1.45;
  }

  body.kpc-foto-page .kpc-vti,
  body.kpc-foto-page .kpc-situo {
    transform: none;
    margin-bottom: 0;
  }

  body.kpc-foto-page .kpc-vti small,
  body.kpc-foto-page .kpc-situo small {
    display: block;
  }

  body.kpc-foto-page .kpc-foto-foot {
    display: flex;
  }

  body.kpc-foto-page .kpc-foto-foot .kpc-legal {
    display: block;
  }

  .kpc-ana-side {
    width: min(220px, 100%);
    margin: 0 auto;
    position: static;
  }

  .kpc-ana-work .kpc-remote,
  .kpc-vti,
  .kpc-situo {
    width: 100%;
    max-width: 236px;
    margin: 0 auto;
    position: static;
  }

  .kpc-ana-photos {
    grid-template-columns: 1fr;
  }

  .kpc-ana-lead {
    font-size: 15px;
  }

  /* En teléfono el remoto/cuadro no se queda tapando la foto. */
  #kpc-ana-remote.is-float,
  #kpc-zip-remote.is-float,
  .kpc-ana-carta.is-float {
    position: static !important;
    inset: auto !important;
    transform: none !important;
    width: 100% !important;
    max-width: 236px;
    z-index: auto;
  }

  .kpc-remote-grab {
    display: none;
  }
}

/* Teléfono de lado: la foto cabe y se puede bajar al control. */
@media (orientation: landscape) and (max-height: 520px) {
  .kpc-top {
    padding: 6px 12px;
    padding-top: max(6px, env(safe-area-inset-top));
  }

  body.kpc-foto-page .kpc-foto-main {
    padding: 12px 16px 28px;
  }

  body.kpc-foto-page .kpc-ana-zoom > img:first-of-type {
    max-height: 68dvh !important;
    width: auto;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
  }

  body.kpc-album-home .kpc-ana-photos {
    grid-template-columns: 1fr 1fr;
  }

  .kpc-prop-toolbar {
    margin: 10px 0 8px;
  }

  .kpc-prop-pdf-wrap {
    min-height: 0;
  }

  .kpc-prop-pdf-wrap iframe {
    height: 58dvh;
  }

  .kpc-portada {
    padding-top: 12px;
  }

  .kpc-portada-logo {
    width: min(280px, 46vw);
    margin: 4px auto 12px;
  }
}
