/* V9 functional + polish fixes */
html,body{max-width:100%;overflow-x:hidden}
body.v6 .container{box-sizing:border-box}

/* House cards: no right-side cropping, no huge accidental columns */
body.v6 .house-circle-v4{width:100%;max-width:100%;box-sizing:border-box;grid-template-columns:repeat(auto-fit,minmax(168px,1fr))!important;gap:18px!important;overflow:visible!important}
body.v6 .house-node-v4{min-width:0!important;max-width:100%;box-sizing:border-box;min-height:220px!important;padding:20px!important;justify-content:flex-start}
body.v6 .house-node-v4 img{width:86px!important;height:86px!important;flex:0 0 auto;margin-bottom:10px!important;object-fit:contain!important;padding:5px!important}
body.v6 .house-node-v4 h3{font-size:clamp(20px,1.65vw,24px)!important;line-height:1.08!important;min-height:0!important;margin:8px 0 8px!important;max-width:100%}
body.v6 .house-node-v4 p{font-size:15px!important;line-height:1.55!important;max-width:100%}
@media(min-width:1220px){body.v6.page-home .house-circle-v4{grid-template-columns:repeat(6,minmax(0,1fr))!important}}
@media(max-width:1219px) and (min-width:760px){body.v6.page-home .house-circle-v4{grid-template-columns:repeat(3,minmax(0,1fr))!important}}
@media(max-width:759px){body.v6.page-home .house-circle-v4{grid-template-columns:1fr!important}}

/* Doma-sily cards: responsive, aligned and not cut */
body.v6.page-houses .grid-3{grid-template-columns:repeat(auto-fit,minmax(286px,1fr))!important;align-items:stretch}
body.v6.page-houses .house-card-v4{min-width:0!important;min-height:0!important;display:flex;flex-direction:column;gap:8px;padding:24px!important;overflow:hidden}
body.v6.page-houses .house-card-v4 .house-icon{width:88px!important;height:88px!important;object-fit:contain!important;padding:5px!important;border-radius:16px!important;background:rgba(0,0,0,.45)}
body.v6.page-houses .house-card-v4 h3{margin:8px 0 0!important;line-height:1.1!important;min-height:0!important}
body.v6.page-houses .house-card-v4 p{line-height:1.55!important;margin:0 0 auto!important}
body.v6.page-houses .house-card-v4 .badge{width:max-content;margin-top:8px}

/* More usable izba scene */
body.v6 .izba-scroll-wrap{overflow:hidden!important;position:relative}
body.v6 .izba-panorama{cursor:grab;touch-action:pan-x;overscroll-behavior-x:contain}
body.v6 .izba-panorama:active{cursor:grabbing}
body.v6 .izba-stage img.izba-bg{pointer-events:none}
body.v6 .hotspot{pointer-events:auto!important;z-index:20!important;min-width:150px!important;padding:11px 15px!important;border-width:1px!important;outline:none}
body.v6 .hotspot:focus-visible{box-shadow:0 0 0 4px rgba(255,220,140,.22),0 0 0 1px rgba(255,220,140,.9),0 18px 48px rgba(0,0,0,.42)}
body.v6 .hotspot.is-active,body.v6 .hotspot:hover{background:linear-gradient(180deg,rgba(91,53,28,.92),rgba(28,16,12,.92));border-color:rgba(255,229,170,.95)}
body.v6 .category-bar{gap:10px;align-items:center;overflow-x:auto;padding:2px 2px 8px;scrollbar-color:#d4aa63 #111;scrollbar-width:thin}
body.v6 .category-bar .chip-v6{cursor:pointer;flex:0 0 auto;white-space:nowrap}
body.v6 .category-bar .chip-v6.active{background:linear-gradient(135deg,rgba(105,75,37,.92),rgba(51,20,26,.88));border-color:rgba(255,225,160,.88);box-shadow:0 10px 34px rgba(0,0,0,.35),0 0 0 1px rgba(255,225,160,.12)}

/* Cart room: always readable and clearly functional */
body.v6.page-cart #cart-content{min-height:220px}
body.v6.page-cart .chest-room{margin-top:0;min-height:560px}
body.v6.page-cart .cart-scroll{max-width:720px;width:100%;box-sizing:border-box;max-height:none!important}
body.v6.page-cart .cart-item{grid-template-columns:70px 1fr auto!important;min-width:0}
body.v6.page-cart .cart-item-title,body.v6.page-cart .cart-item-meta{overflow-wrap:anywhere}
body.v6.page-cart .cart-controls{flex-wrap:wrap;min-width:122px}
body.v6.page-cart .cart-total .btn{width:auto!important}
@media(max-width:700px){body.v6.page-cart .cart-item{grid-template-columns:58px 1fr!important}body.v6.page-cart .cart-controls{grid-column:2;justify-content:flex-start}.cart-total{display:block!important}.cart-total .btn{width:100%!important;margin-top:12px}.chest-room-content{padding:16px!important}}

/* Header final alignment */
body.v6 .header .logo{align-items:center!important}
body.v6 .header .logo-mark{display:grid;place-items:center}
body.v6 .header .logo-title{display:block;transform:translateY(1px)}
body.v6 .header .menu a{box-sizing:border-box}

/* Safer media */
.bg-cover,.moon-card img,.card-img img{user-select:none}
