/* UndanganKuuu Homepage Polish V7 — five-theme layout + mobile utility + showcase hardening */
html,body{max-width:100%;overflow-x:clip!important}
#showcaseGrid,.showcase-grid{visibility:visible!important;max-width:100%;min-width:0}
#showcaseGrid .template-item{visibility:visible!important;opacity:1!important}
#showcaseGrid[data-registry-source="database"] .template-item{transform:none!important}
.ukp-template-price{display:block;margin-top:6px;font-size:8px;line-height:1.2;letter-spacing:.04em;opacity:.72}

/* Hero is centered against the viewport, not an accidental theme sub-column. */
html[data-v8-home-theme] .element-1 .e1a,
html[data-v8-home-theme] .element-1 .hero-content{max-width:100%;min-width:0}
html[data-v8-home-theme] .element-1 .hero-content{width:100%;margin-inline:auto!important;text-align:center}
html[data-v8-home-theme] .element-1 .domain-signature{justify-content:center!important;text-align:center!important;transform-origin:center center!important}
@media(min-width:701px){
  html[data-v8-home-theme] .element-1 .hero-content{padding-inline:24px!important}
  html[data-v8-home-theme] .element-1 .domain-signature{font-size:clamp(48px,7vw,118px)!important;max-width:calc(100vw - 48px)!important;margin-inline:auto!important}
  html[data-v8-home-theme="ivory-champagne"] .element-1 .domain-signature{left:50%!important;right:auto!important;transform:translate(-50%,-50%)!important}
}

@media(max-width:700px){
  html[data-v8-home-theme] .shell{max-width:100%!important}
  html[data-v8-home-theme] .depth-cards,
  html[data-v8-home-theme] .mini-board,
  html[data-v8-home-theme] .ukp-features-grid,
  html[data-v8-home-theme] .ukp-steps-grid{max-width:100%!important;min-width:0!important}
  html[data-v8-home-theme] .depth-cards{grid-template-columns:1fr!important;gap:12px!important;margin-top:30px!important}
  html[data-v8-home-theme] .depth-cards article{min-width:0!important;min-height:auto!important;padding:20px!important}
  html[data-v8-home-theme] .depth-cards h3{margin:18px 0 8px!important;font-size:18px!important}
  html[data-v8-home-theme] .depth-cards p{font-size:12px!important;line-height:1.55!important;overflow-wrap:anywhere}

  /* One authoritative safe-area utility layout for Light/Dark/Charcoal/OLED/Ivory. */
  html[data-v8-home-theme] .uk-v81-theme{z-index:2147481000!important}
  html[data-v8-home-theme] .home-profile-wrap{
    position:fixed!important;top:calc(max(8px,env(safe-area-inset-top)) + 2px)!important;
    right:10px!important;bottom:auto!important;left:auto!important;transform:none!important;
    margin:0!important;z-index:2147480900!important
  }
  html[data-v8-home-theme] .home-public-auth{
    position:fixed!important;top:calc(max(8px,env(safe-area-inset-top)) + 2px)!important;
    right:10px!important;bottom:auto!important;left:auto!important;transform:none!important;
    margin:0!important;z-index:2147480900!important
  }
  html[data-v8-home-theme] .home-cart{
    position:fixed!important;top:calc(max(8px,env(safe-area-inset-top)) + 54px)!important;
    right:58px!important;bottom:auto!important;left:auto!important;transform:none!important;
    margin:0!important;z-index:2147480800!important;display:none;gap:0!important
  }
  html[data-v8-home-theme] .home-cart[data-visible="true"]{display:grid!important}
  html[data-v8-home-theme] .home-live-chat{
    position:fixed!important;top:calc(max(8px,env(safe-area-inset-top)) + 54px)!important;
    right:8px!important;bottom:auto!important;left:auto!important;transform:none!important;
    margin:0!important;z-index:2147480800!important;max-width:calc(100vw - 16px)!important;gap:0!important
  }
  html[data-v8-home-theme] .home-cart-btn{width:44px!important;height:44px!important;border-radius:14px!important}
  html[data-v8-home-theme] .home-cart-icon{width:25px!important;height:25px!important}
  html[data-v8-home-theme] .home-live-chat-launcher{width:46px!important;height:46px!important}
  html[data-v8-home-theme] .home-live-chat-bot{width:43px!important;height:43px!important}
  html[data-v8-home-theme] .home-cart-label,
  html[data-v8-home-theme] .home-live-chat-label{display:none!important}
  html[data-v8-home-theme] .home-live-chat-badge{top:-1px!important;right:1px!important}
  html[data-v8-home-theme] .home-live-chat-panel{
    position:fixed!important;top:auto!important;right:10px!important;
    bottom:max(10px,env(safe-area-inset-bottom))!important;width:min(320px,calc(100vw - 20px))!important;
    max-height:calc(100dvh - 20px - env(safe-area-inset-top) - env(safe-area-inset-bottom))!important;
    overflow:auto!important
  }
  html[data-v8-home-theme].ukp-home-scrolled .home-cart,
  html[data-v8-home-theme].ukp-home-scrolled .home-live-chat{opacity:.86}
  html[data-v8-home-theme].ukp-home-scrolled .home-cart-btn,
  html[data-v8-home-theme].ukp-home-scrolled .home-live-chat-launcher{scale:.9;transform-origin:top right!important}

  /* Reserve a predictable top lane for utilities without letting them cover hero type. */
  html[data-v8-home-theme] .element-1 .hero-content{padding-top:96px!important;padding-inline:10px!important}
  html[data-v8-home-theme] .element-1 .domain-signature{max-width:calc(100vw - 18px)!important;justify-content:center!important;text-align:center!important}

  /* Showcase is always rendered as a contained two-column touch grid. */
  html[data-v8-home-theme] #showcaseGrid,
  html[data-v8-home-theme] .showcase-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:20px 10px!important;margin-inline:auto!important}
  html[data-v8-home-theme] #showcaseGrid .template-item{min-width:0!important}
  html[data-v8-home-theme] #showcaseGrid .action-btn{touch-action:manipulation!important}

  /* Restore the intended three-piece animated composition instead of a huge center envelope. */
  html[data-v8-home-theme] .motion-trio{
    display:grid!important;grid-template-columns:minmax(0,.72fr) minmax(0,1.35fr) minmax(0,.72fr)!important;
    gap:4px!important;align-items:center!important;justify-items:center!important;width:100%!important;
    max-width:100%!important;margin-top:18px!important;overflow:visible!important
  }
  html[data-v8-home-theme] .motion-trio .motion-item{
    min-width:0!important;width:100%!important;min-height:220px!important;display:grid!important;
    place-items:center!important;overflow:visible!important
  }
  html[data-v8-home-theme] .motion-trio .motion-item:first-child,
  html[data-v8-home-theme] .motion-trio .motion-item:last-child{scale:.72;transform-origin:center!important}
  html[data-v8-home-theme] .motion-trio .motion-item:not(.mail-float)>img,
  html[data-v8-home-theme] .motion-trio .motion-item:not(.mail-float) img:first-child{
    width:min(84px,20vw)!important;max-width:84px!important;min-width:0!important
  }
  html[data-v8-home-theme] .motion-trio .mail-box{scale:.56;transform-origin:center center!important}
  html[data-v8-home-theme="ivory-champagne"] .motion-trio .ic-ring-pair,
  html[data-v8-home-theme="ivory-champagne"] .motion-trio .ic-pearl-gift{scale:.78;transform-origin:center!important}
  html[data-v8-home-theme] .motion-trio .motion-halo{width:150px!important;height:150px!important}

  html[data-v8-home-theme] .future-space{height:72px!important;min-height:0!important}
}

@media(max-width:390px){
  html[data-v8-home-theme] .element-1 .hero-content{padding-top:92px!important}
  html[data-v8-home-theme] .home-cart{right:54px!important}
  html[data-v8-home-theme] .home-live-chat{right:6px!important}
  html[data-v8-home-theme] #showcaseGrid,html[data-v8-home-theme] .showcase-grid{gap:16px 8px!important}
  html[data-v8-home-theme] .motion-trio{grid-template-columns:minmax(0,.68fr) minmax(0,1.42fr) minmax(0,.68fr)!important}
  html[data-v8-home-theme] .motion-trio .mail-box{scale:.50}
  html[data-v8-home-theme] .motion-trio .motion-item:first-child,
  html[data-v8-home-theme] .motion-trio .motion-item:last-child{scale:.66}
}

@media(prefers-reduced-motion:reduce){
  html[data-v8-home-theme].ukp-home-scrolled .home-cart-btn,
  html[data-v8-home-theme].ukp-home-scrolled .home-live-chat-launcher{transition:none!important}
}
