/* TPH V13 — iPad/tablet portrait only. Surgical stability layer. */
@media (pointer:coarse) and (hover:none) and (orientation:portrait) and (min-width:700px) and (max-width:1100px) and (min-height:700px){
  html,body{width:100%!important;max-width:100%!important;overflow-x:hidden!important;-webkit-text-size-adjust:100%!important;scroll-behavior:auto!important}

  /* ONE stable tablet header. Compact is deliberately neutralised. */
  body > .tph-site-header,
  body > .tph-site-header.tph-compact{
    position:sticky!important;top:0!important;z-index:20000!important;
    width:100%!important;margin:0!important;padding:0!important;
    background:#f4eee5!important;border:0!important;
    border-bottom:1px solid rgba(126,88,46,.12)!important;
    border-radius:0!important;box-shadow:0 5px 18px rgba(66,43,20,.07)!important;
    overflow:visible!important;isolation:isolate!important;
  }
  body > .tph-site-header .tph-header-inner,
  body > .tph-site-header.tph-compact .tph-header-inner{
    display:block!important;width:100%!important;max-width:none!important;
    margin:0!important;padding:14px 22px 12px!important;
    background:rgba(255,251,245,.97)!important;border:0!important;
    border-radius:0!important;box-shadow:none!important;
    -webkit-backdrop-filter:blur(16px)!important;backdrop-filter:blur(16px)!important;
    transition:none!important;transform:none!important;
  }
  body > .tph-site-header .tph-mobile-row,
  body > .tph-site-header.tph-compact .tph-mobile-row{
    display:block!important;width:100%!important;margin:0!important;padding:0!important;
  }
  body > .tph-site-header .tph-header-logo,
  body > .tph-site-header.tph-compact .tph-header-logo{
    display:block!important;width:280px!important;max-width:70vw!important;min-width:0!important;
    margin:0 auto 10px!important;padding:0!important;transform:none!important;transition:none!important;
  }
  body > .tph-site-header .tph-header-logo img,
  body > .tph-site-header.tph-compact .tph-header-logo img{
    display:block!important;width:100%!important;max-width:none!important;height:auto!important;
    margin:0!important;padding:0!important;transform:none!important;
  }
  body > .tph-site-header .tph-mobile-menu,
  body > .tph-site-header.tph-compact .tph-mobile-menu{display:none!important}
  body > .tph-site-header .tph-nav-wrap,
  body > .tph-site-header.tph-compact .tph-nav-wrap{
    display:flex!important;align-items:center!important;justify-content:center!important;
    position:relative!important;width:100%!important;min-height:40px!important;height:40px!important;max-height:40px!important;
    margin:0!important;padding:0!important;overflow:visible!important;transform:none!important;
  }
  body > .tph-site-header .tph-main-nav,
  body > .tph-site-header.tph-compact .tph-main-nav{
    display:flex!important;align-items:center!important;justify-content:center!important;flex-wrap:nowrap!important;
    width:max-content!important;max-width:100%!important;min-height:40px!important;height:40px!important;max-height:40px!important;
    margin:0 auto!important;padding:0!important;gap:18px!important;overflow:visible!important;transform:none!important;transition:none!important;
  }
  body > .tph-site-header .tph-nav-group,
  body > .tph-site-header.tph-compact .tph-nav-group{
    position:relative!important;display:inline-flex!important;align-items:center!important;
    min-height:40px!important;height:40px!important;margin:0!important;padding:0!important;overflow:visible!important;
  }
  body > .tph-site-header .tph-main-nav > a,
  body > .tph-site-header .tph-nav-group > a,
  body > .tph-site-header.tph-compact .tph-main-nav > a,
  body > .tph-site-header.tph-compact .tph-nav-group > a{
    display:inline-flex!important;align-items:center!important;justify-content:center!important;
    min-height:40px!important;height:40px!important;margin:0!important;padding:9px 0 11px!important;
    font-size:.84rem!important;line-height:1.2!important;font-weight:650!important;letter-spacing:normal!important;
    white-space:nowrap!important;transform:none!important;
  }
  body > .tph-site-header .tph-nav-cta,
  body > .tph-site-header.tph-compact .tph-nav-cta{
    min-height:40px!important;height:40px!important;padding:10px 18px!important;border-radius:999px!important;white-space:nowrap!important;
  }

  /* No Referenzen item in the upper navigation; it remains in the footer. */
  body > .tph-site-header .tph-main-nav > a[href*="referenzen"],
  body > .tph-site-header .tph-main-nav > a[href*="#referenzen"]{display:none!important}

  /* Native same-page anchors get a stable landing point below the fixed/sticky header. */
  body.tph-tablet-portrait section[id],
  body.tph-tablet-portrait main [id],
  body.tph-tablet-portrait form[id]{scroll-margin-top:calc(var(--tph-header-h, 170px) + 18px)!important}

  /* Wedding HUB: ONLY the glass field is moved. Image and contents are untouched. */
  body.tph-tablet-portrait.tph-hub-page .hub63-card{top:49%!important}

  /* Fotografie: ensure the existing hero image shows the right-hand family. */
  body.tph-tablet-portrait.tph-fotografie-page .hero{background-position:100% center!important;background-size:cover!important}

  /* Grafikdesign/Webdesign: stop motion that can visually shake the page in portrait. */
  body.tph-tablet-portrait.tph-stability-page .reveal,
  body.tph-tablet-portrait.tph-stability-page .ref-track,
  body.tph-tablet-portrait.tph-stability-page .marquee,
  body.tph-tablet-portrait.tph-stability-page [class*="marquee"],
  body.tph-tablet-portrait.tph-stability-page [class*="float"]{
    animation:none!important;transition:none!important
  }

  /* Do not let any legacy compact selector alter the tablet header while scrolling. */
  body > .tph-site-header.tph-compact .tph-header-inner,
  body > .tph-site-header.tph-compact .tph-header-logo,
  body > .tph-site-header.tph-compact .tph-nav-wrap,
  body > .tph-site-header.tph-compact .tph-main-nav{transform:none!important}

  @media (min-width:901px) and (max-width:1100px){
    body > .tph-site-header .tph-header-logo,
    body > .tph-site-header.tph-compact .tph-header-logo{width:min(480px,64vw)!important;max-width:480px!important}
  }
}
