/* Mandir Designer (image based, CSS 3D) + header modes + login modal */
.mode{display:flex;flex-direction:column;flex:1 1 auto;min-height:0;min-width:0}
.brand{margin-right:0}
.modes{margin-right:auto;margin-left:6px}
.modes .sb{position:relative}
.pro{display:inline-flex;align-items:center;gap:4px;margin-left:3px;padding:2px 7px 2px 5px;border-radius:20px;font-size:9.5px;font-weight:900;letter-spacing:.06em;text-transform:uppercase;color:#5a3a00;background:linear-gradient(145deg,#ffe58f,#e8a823);box-shadow:0 1px 4px rgba(150,95,0,.4)}
.pro svg{width:11px;height:11px;fill:#7a4d00}
.pro.ok{opacity:.75}
@media(max-width:700px){.modes .sb{padding:7px 9px;font-size:12px}.modes .sb svg{width:15px;height:15px}.pro{display:none}.modes{margin-left:0}}
@media(max-width:440px){.modes{margin:0 auto}}
#modeTabs{display:none}
#ptools{display:flex}
.vp{position:absolute;inset:0;perspective:1700px;touch-action:none;cursor:grab;overflow:hidden;outline:0}
.vp:active{cursor:grabbing}
.world{position:absolute;inset:0;transform-style:preserve-3d}
.p{position:absolute;left:50%;top:50%;width:0;height:0;transform-style:preserve-3d}
.f{position:absolute;left:0;top:0;backface-visibility:hidden;-webkit-backface-visibility:hidden;background-repeat:no-repeat;background-position:center;background-size:100% 100%}
.f.sel{box-shadow:inset 0 0 0 5px rgba(238,46,74,.85)}
.f.both{backface-visibility:visible;-webkit-backface-visibility:visible}
#fChip{left:14px;top:14px}
.thumbs{display:flex;gap:8px;overflow-x:auto;padding:4px 4px 8px;max-width:78vw;scrollbar-width:thin}
@media(min-width:900px){.thumbs{flex-wrap:wrap;max-width:none;overflow:visible}}
.th{position:relative;flex:none;width:66px;height:66px;border:0;padding:0;border-radius:13px;cursor:pointer;overflow:hidden;font:inherit;color:var(--navy);
background:linear-gradient(145deg,#f8faff,#e4e9f5);box-shadow:3px 3px 8px var(--sd),-3px -3px 8px var(--sl);display:flex;align-items:center;justify-content:center}
.th img{width:100%;height:100%;object-fit:contain;display:block;pointer-events:none}
.th em{position:absolute;left:0;right:0;bottom:0;font-style:normal;font-size:10px;font-weight:800;text-align:center;padding:2px 0;background:rgba(15,37,87,.74);color:#fff;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
.th.on{outline:2px solid var(--red);outline-offset:2px}
.th.none{font-size:11px;font-weight:800;color:var(--red)}
.th:focus-visible{outline:2px solid var(--blue);outline-offset:2px}
.rng{display:flex;align-items:center;gap:10px;width:100%}
.rng input{flex:1;accent-color:var(--red);min-width:120px}
.rng b{font-size:12px;color:var(--navy);min-width:34px;text-align:right}
.modal{position:fixed;inset:0;z-index:30;display:flex;align-items:center;justify-content:center;padding:16px;background:rgba(15,37,87,.45);backdrop-filter:blur(3px)}
.modal .card{width:min(380px,100%);display:flex;flex-direction:column;gap:12px;padding:22px;border-radius:24px;background:linear-gradient(145deg,#f6f8fe,#e8edf7);box-shadow:12px 12px 30px rgba(15,37,87,.35),-6px -6px 16px var(--sl)}
.modal h2{margin:0;font-size:19px;color:var(--navy)}
.modal p{margin:0;font-size:12.5px;color:var(--mute);font-weight:600}
.modal .lk{width:46px;height:46px;border-radius:15px;display:flex;align-items:center;justify-content:center;background:linear-gradient(145deg,#ffe58f,#e8a823);box-shadow:0 4px 12px rgba(150,95,0,.4)}
.modal .lk svg{width:24px;height:24px;fill:#7a4d00}
.modal .fld input{flex:1;width:100%;font-size:15px}
.modal .err{min-height:16px;font-size:12px;color:var(--red2);font-weight:800}
.modal .ctl{justify-content:flex-end}
#chipHintF{right:14px;bottom:14px;color:var(--mute)}
@media(max-width:620px){#chipHintF{display:none}}
#freeRow .fld input[type=number]{width:42px}#freeRow .fld{padding:6px 8px;gap:5px}
.brand,.modes{flex:none}
@media(max-width:899px){
  #freeRow{flex-direction:column;align-items:stretch;overflow-x:hidden}
  #freeRow .grp{width:100%}
  #freeRow .thumbs{max-width:none}
  #freeRow .note{white-space:normal}
  #partsGrp{order:1}#fPane>.grp{order:2}#roomGrp{order:3}#sizeGrp{order:4}#viewGrp{order:5}
  #dockF.open>.in{max-height:42vh}
}
@media(max-width:1440px){.modes .sb{padding:8px 9px;font-size:12px}#btnRoom{font-size:0;gap:0;padding:0 13px}#btnRoom svg{width:19px;height:19px}}

/* design slider (click par khulta hai) */
.sl{position:absolute;left:12px;right:12px;bottom:12px;max-width:620px;margin:0 auto;z-index:4;display:flex;flex-direction:column;gap:6px;padding:8px;border-radius:20px;
background:linear-gradient(145deg,rgba(248,250,255,.96),rgba(228,233,245,.96));box-shadow:5px 5px 16px rgba(15,37,87,.28),-3px -3px 10px var(--sl)}
.sl[hidden]{display:none}
.slh{display:flex;align-items:center;gap:6px}
.slb{flex:none;width:46px;height:46px;border:0;border-radius:14px;cursor:pointer;font:inherit;font-size:30px;line-height:1;font-weight:700;color:#fff;background:linear-gradient(145deg,#ff4d66,#d81f3c);box-shadow:3px 3px 8px rgba(201,31,58,.35)}
.slb:active{transform:scale(.94)}
.slc{flex:1;min-width:0;height:46px;display:flex;flex-direction:column;align-items:center;justify-content:center;touch-action:none;cursor:ew-resize;border-radius:12px;background:rgba(15,37,87,.05)}
.slc b{font-size:14px;color:var(--navy);white-space:nowrap}.slc small{font-size:11px;color:var(--mute);font-weight:700;white-space:nowrap}
.slf{flex:none;height:36px;padding:0 10px;border:0;border-radius:11px;cursor:pointer;font:inherit;font-weight:800;font-size:12px;color:var(--navy);background:linear-gradient(145deg,#f8faff,#e4e9f5);box-shadow:3px 3px 7px var(--sd),-3px -3px 7px var(--sl)}
.slf[hidden]{display:none}
.slx{flex:none;width:36px;height:36px;border:0;border-radius:11px;cursor:pointer;font:inherit;font-size:15px;font-weight:800;color:var(--red2);background:linear-gradient(145deg,#f8faff,#e4e9f5);box-shadow:3px 3px 7px var(--sd),-3px -3px 7px var(--sl)}
.slr{display:flex;gap:8px;overflow-x:auto;padding:3px 3px 6px;scrollbar-width:thin;-webkit-overflow-scrolling:touch;touch-action:pan-x}
.slr .th{width:56px;height:56px;border-radius:11px}
.stage.slopen #chipHintF{display:none}
@media(max-width:620px){.sl{left:8px;right:8px;bottom:8px}.slb{width:44px;height:44px}.stage.slopen #fChip{display:none}}

/* project chip (auto-save status) + viewer / showcase */
#pChip{left:14px;bottom:14px;color:var(--mute);max-width:calc(100% - 28px);white-space:nowrap}
#pChip b{color:var(--navy);letter-spacing:.06em}
.stage.slopen #pChip{display:none}
body.viewer{display:block}
body.viewer .stage{position:fixed;inset:0;margin:0;border-radius:0;box-shadow:none;background:linear-gradient(160deg,#e7ecf8,#f5f8fe)}

/* Items slider (design chunne wali strip): ab preview box ke UPAR nahi aati, preview ke neeche alag jagah leti hai */
.stagecol{flex:1 1 auto;min-width:0;min-height:0;display:flex;flex-direction:column}
.stagecol>.stage{flex:1 1 0;min-height:140px}
.stagecol>.sl{position:relative;left:auto;right:auto;bottom:auto;flex:none;width:auto;max-width:none;margin:0 16px 14px 6px;z-index:4}
.stagecol>.sl .slr{justify-content:flex-start}
@media(max-width:899px){.stagecol>.sl{margin:0 10px 10px}}
@media(max-width:899px){.stagecol>.stage{margin-bottom:10px}}
