/* Original My Heaven artwork with clear content layers and a larger HUD. */
:root{--profile-width:clamp(440px,40vw,640px);--profile-height:clamp(104px,9.34vw,150px);--resource-width:clamp(310px,24vw,410px);--resource-height:68px;--resource-icon:88px;--build-width:clamp(176px,16vw,240px);--build-height:clamp(172px,15.6vw,232px);--dhikr-width:clamp(666px,61.2vw,990px);--dhikr-height:clamp(158px,13.5vw,212px);--dhikr-button-height:clamp(133px,11.7vw,184px);--edge:18px;--side-size:96px;--counter-font:40px}
.scene-vignette{position:fixed;inset:0;z-index:9;pointer-events:none;background:url('/assets/ui/vignette.webp') center/100% 100% no-repeat;opacity:.55}
.topbar{inset:12px var(--edge) auto var(--edge);gap:28px;align-items:flex-start}
.brand{width:var(--profile-width);height:var(--profile-height);max-width:none;max-height:none;flex:none}
.brand-level{left:7%;top:26%;width:10%;height:45%;font:600 clamp(26px,2.7vw,40px)/1 Tahoma,sans-serif;background:#cab466;border:3px solid #f3de9d;border-radius:5px;color:#514119;box-shadow:inset 0 0 7px #796438}
.brand>div:not(.profile-xp){left:25%;right:9%;top:26%;height:40%;gap:0}
.brand strong{font:400 clamp(30px,3vw,48px)/1 Raphaelum,Georgia,serif}
.brand::before{left:23%;top:26%;width:71%;height:44%;background:url('/assets/ui/profile-caps.webp') center/100% 100% no-repeat,url('/assets/ui/profile-frame.webp') center/95% 100% no-repeat,url('/assets/ui/profile-glow.webp') center/94% 100% no-repeat,url('/assets/ui/profile-fill.webp') center/94% 88% no-repeat}
.profile-avatar{position:absolute;right:-3%;top:20%;width:12%;height:51%;object-fit:contain}
.profile-xp{left:26%;top:67%;width:63%;height:5px;opacity:.8}
.garden-stats{left:calc(var(--profile-width)*.26 + var(--edge));top:calc(var(--profile-height) + 12px);gap:8px;font-size:14px;color:#f2ffec;opacity:.9}
/* A dedicated icon column and vertically centered numeral prevent clipping. */
.wallet{gap:18px;padding:13px 0 0;direction:ltr;flex:none}
.resource{position:relative;isolation:isolate;display:grid;grid-template-columns:var(--resource-icon) minmax(0,1fr);gap:0;align-items:center;width:var(--resource-width);height:var(--resource-height);min-width:0;min-height:0;padding:0;background:none;direction:ltr}
.resource::before{display:none}
.resource-symbol,.resource.gems .resource-symbol{position:relative;grid-column:1;width:var(--resource-icon);height:var(--resource-icon);left:auto;bottom:auto;object-fit:contain;z-index:2;filter:drop-shadow(0 2px 6px #051d3150)}
.resource.gems .resource-symbol{width:calc(var(--resource-icon)*.77);justify-self:center}
.resource>div{grid-column:2;display:flex;align-items:center;justify-content:center;min-width:0;width:100%;height:100%;padding:8px 20px;background:url('/assets/ui/resource-bar.webp') center/100% 100% no-repeat,linear-gradient(#133844eb,#09242aee);border-radius:4px;box-shadow:0 3px 12px #041b394d,inset 0 0 12px #8fede21a}
.resource.gems{background:none;order:2}.resource.gold{order:1}
.resource.gems>div{background-image:url('/assets/ui/gem-bar.webp'),linear-gradient(#37213ce8,#24142be8)}
.resource.gold>div{background-image:url('/assets/ui/resource-bar.webp'),linear-gradient(#43391fe8,#2c2516e8)}
.resource strong{display:block;position:static;width:100%;margin:0;padding:0;text-align:center;direction:ltr;unicode-bidi:isolate;white-space:nowrap;font-family:Tahoma,Arial,sans-serif;font-size:min(var(--counter-font),calc((var(--resource-width) - var(--resource-icon) - 40px) / var(--number-chars,7) * 1.6));line-height:1.15;font-weight:600;font-variant-numeric:tabular-nums;color:#efffff;text-shadow:0 2px 3px #092331;overflow:visible}
.resource.gold strong{color:#fff0bb}.resource.gems strong{color:#ffe2ff}
.resource-label{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}
.gold-symbol{display:flex;align-items:center;justify-content:center;font-size:calc(var(--resource-icon)*.8);line-height:1;color:#ffdf69;text-shadow:0 2px 0 #9c711e}
.left-actions{position:fixed;left:var(--edge);top:calc(var(--profile-height) + 42px);z-index:25;display:flex;flex-direction:column;gap:22px}
.left-actions button{padding:0;border:0;background:none;width:var(--side-size);height:var(--side-size)}
.left-actions img{width:100%;height:100%;object-fit:contain}
.toolbar{right:var(--edge);top:auto;bottom:calc(var(--dhikr-height) + 40px);gap:26px}
.toolbar #open-inventory{display:none}
.toolbar .tool:not(#open-shop){width:var(--side-size);height:var(--side-size);min-height:0;padding:0}
.toolbar .tool:not(#open-shop)>img{width:92%;height:92%}
.toolbar .tool:not(#open-shop)>span{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}
#open-shop{left:var(--edge);bottom:var(--edge);width:var(--build-width);height:var(--build-height);font-size:44px;filter:drop-shadow(0 5px 6px #0b292756)}
#open-shop img{width:100%;height:100%}#open-shop>span{left:14%;bottom:14%;font-family:Raphaelum,Tahoma;line-height:1}
.camera-controls{left:var(--edge);top:auto;bottom:calc(var(--build-height) + var(--edge) + 14px);display:flex;flex-direction:row;gap:8px;opacity:.9;align-items:center;direction:ltr}
.camera-controls button{width:64px;height:64px;font-size:38px}.camera-controls #recenter{height:64px;margin:0}.camera-controls img{width:48px;height:52px}
.save-status{left:calc(var(--build-width) + var(--edge) + 16px);bottom:24px;font-size:13px;line-height:1.5;max-width:220px;opacity:.9}.save-status svg{width:20px;height:20px}
/* 1.8× buttons; the native circular artwork is larger than the calligraphy. */
.dhikr-dock{width:min(var(--dhikr-width),calc(100vw - var(--build-width) - 65px));max-width:none;height:var(--dhikr-height);right:var(--edge);bottom:12px;background:url('/assets/ui/dhikr-vines.webp') center 12%/100% 74% no-repeat;text-align:center;overflow:visible}
.dhikr-buttons{display:flex;direction:ltr;align-items:center;gap:0;height:var(--dhikr-button-height)}
.dhikr,.dhikr:nth-child(n+4){position:relative;width:auto;height:var(--dhikr-button-height);flex:1;grid-column:auto;justify-self:auto;isolation:isolate;min-width:0}
.dhikr-2{order:0}.dhikr-1{order:1}.dhikr-5{order:2}.dhikr-3{order:3}.dhikr-4{order:4}
.dhikr-orb{inset:auto;left:50%;top:50%;transform:translate(-50%,-50%);width:146%;height:146%;max-width:none;object-fit:contain;z-index:-1;pointer-events:none}
.dhikr-calligraphy{left:50%;top:50%;width:65%;height:65%;transform:translate(-50%,-50%);object-fit:contain;filter:drop-shadow(0 1px 2px #07384260)}
.dhikr-4 .dhikr-calligraphy{width:70%;height:48%}
.dhikr-5 .dhikr-orb{filter:hue-rotate(-25deg)}.dhikr-5:hover .dhikr-orb{filter:hue-rotate(-25deg) brightness(1.2)}
.dhikr small{font-size:22px;width:36px;height:36px;line-height:36px;top:0;right:4px}
.dock-note{font-size:13px;line-height:1.4;padding:4px 12px;background:#0a30365c;border-radius:18px;color:#f4fff6;white-space:normal}
/* Frame and vines are behind all tabs, cards, and controls. One inner sheet. */
.shop-backdrop{display:none;position:fixed;inset:0;z-index:32;background:#051716a8;border:0;width:100%;height:100%}
.shop-open .shop-backdrop{display:block}
.shop-open :is(.toolbar,.dhikr-dock,.camera-controls,.left-actions),.shop-open :is(.toolbar,.dhikr-dock,.camera-controls,.left-actions) button{pointer-events:none}
.shop{left:50%;top:50%;transform:translate(-50%,-50%);width:min(1100px,calc((100vw - 44px)*.5),calc((100dvh - 44px)*.7525));height:auto;aspect-ratio:1530/1017;max-width:none;max-height:none;padding:0;background:none;isolation:isolate;container:build-menu / inline-size}
.shop::before{content:'';position:absolute;inset:0;z-index:0;background:url('/assets/ui/frame.webp') center/88% 89% no-repeat;pointer-events:none}
.shop::after{content:'';position:absolute;inset:0;z-index:0;background:url('/assets/ui/panel-vines.webp') center/100% 100% no-repeat;border:0;border-radius:0;box-shadow:none;pointer-events:none}
.shop-surface{position:absolute;inset:22% 12% 14%;z-index:1;border:2px solid #ccffffb8;border-radius:28px;background:linear-gradient(145deg,#d8ffffdf,#6ebfc8e8);box-shadow:0 0 0 7px #2f8e94d9,inset 0 0 32px #e5ffff3d;pointer-events:none}
.shop[data-category=flowers] .shop-surface{background:linear-gradient(145deg,#f5daeee8,#af9eceeb)}
.shop[data-category=plants] .shop-surface{background:linear-gradient(145deg,#e1f2d2eb,#82c2a2eb)}
.shop[data-category=rocks] .shop-surface{background:linear-gradient(145deg,#d4dfe7eb,#8fa6bde8)}
.shop[data-category=structures] .shop-surface{background:linear-gradient(145deg,#faf0d1eb,#bec4a5eb)}
.shop .panel-heading{position:static;min-height:0;padding:0}
.shop .panel-heading>div,.shop .shop-footer{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}
.shop .crystal-close{z-index:6;right:1.8%;top:1%;width:10%;height:13%;min-width:50px;min-height:50px;filter:drop-shadow(0 4px 8px #16446655)}
.shop .category-tabs{position:absolute;left:11%;right:12%;top:7%;height:16%;margin:0;padding:0;border:0;direction:ltr;gap:1.3%;z-index:3;overflow:visible;justify-content:stretch}
.shop .category-tabs button{position:relative;min-width:0;flex:1;border:0;border-radius:12px;padding:0;background:var(--tab) center bottom/100% 92% no-repeat;box-shadow:none;transition:transform .15s,filter .15s}
.shop .category-tabs button[data-category=all]{--tab:url('/assets/ui/tab-flying.webp')}
.shop .category-tabs button[data-category=flowers]{--tab:url('/assets/ui/tab-flowers.webp')}
.shop .category-tabs button[data-category=water]{--tab:url('/assets/ui/tab-water.webp')}
.shop .category-tabs button[data-category=plants]{--tab:url('/assets/ui/tab-plants.webp')}
.shop .category-tabs button[data-category=rocks]{--tab:url('/assets/ui/tab-rocks.webp')}
.shop .category-tabs button[data-category=structures]{--tab:url('/assets/ui/tab-structures.webp')}
.shop .category-tabs button[data-category=flying]{--tab:url('/assets/ui/tab-flying.webp')}
.shop .category-tabs button[aria-pressed=true]{transform:translateY(-6%);filter:brightness(1.13) drop-shadow(0 0 8px #c5ffff99);z-index:4;background-color:transparent}
.shop .category-tabs button:focus-visible{outline:3px solid #fff1ac;outline-offset:3px}
.shop .category-tabs img{width:78%;height:87%;max-height:none;object-fit:contain;margin:0}
.shop .category-tabs span{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}
.shop .shop-list{position:absolute;left:14.5%;right:14.5%;top:25%;bottom:17%;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));grid-template-rows:repeat(2,minmax(0,1fr));grid-auto-rows:minmax(0,1fr);gap:3% 3%;padding:0;margin:0;direction:ltr;overflow:auto;z-index:2;scrollbar-color:#447e89 transparent}
.shop .shop-card{min-height:0;padding:5% 6% 6%;gap:5px;background:url('/assets/ui/reference-slot.webp') center/100% 100% no-repeat;direction:rtl}
.shop .shop-card>img{width:100%;height:0;flex:1;min-height:0;object-fit:contain;cursor:pointer;transition:filter .15s}
.shop .shop-card:hover>img{filter:brightness(1.1)}
.shop .shop-card h2,.shop .shop-card .item-type{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);margin:0}
.shop .shop-card button{width:90%;max-width:none;height:18%;min-height:32px;flex-shrink:0;padding:3px 9%;margin:0;gap:10px;font:600 clamp(17px,1.9vw,30px)/1.15 Tahoma,Arial,sans-serif;direction:ltr;background-size:100% 100%;color:#e0ffff;text-shadow:0 1px 3px #194f56;white-space:nowrap}
.shop .shop-card button.gems{background-image:url('/assets/ui/gem-price.webp');color:#ffe6ff}
.shop .shop-card button[data-owned]{font-family:Swissra,Tahoma;font-size:clamp(13px,1.3vw,21px)}
.shop .currency{display:inline-flex;align-items:center;justify-content:center;width:30px;height:30px;flex-shrink:0;font-size:28px;position:relative}
.shop .currency img{height:36px;width:36px;max-width:none;object-fit:contain}
.shop .currency.gems img{height:40px;width:32px}
.shop .shop-pagination{position:absolute;inset:0;pointer-events:none;margin:0;z-index:4}
.shop .shop-pagination button{position:absolute;top:43%;height:14%;width:5%;pointer-events:auto;min-height:44px}
.shop #shop-previous{left:6.5%}.shop #shop-next{right:6.5%}
.shop #shop-page-label{position:absolute;bottom:7%;left:57%;right:auto;width:12%;height:32px;font:600 18px/32px Tahoma,sans-serif;text-align:center;color:#e9ffff;border-radius:18px;background:#143e4bbd;border:1px solid #c2f8ed77}
.shop-inventory{position:absolute;bottom:6.5%;left:31%;width:23%;height:42px;padding:4px 12px;background:linear-gradient(#256879,#164654);border:1px solid #d5fff7;border-radius:12px;font:400 18px/1.3 Swissra,Tahoma;color:#f0ffff;box-shadow:0 3px 9px #153b4860;z-index:5}
.empty-inventory{grid-row:1/-1;align-self:center;direction:rtl;font-size:20px;color:#164958}
/* Larger actions sit above the dhikr dock instead of covering it. */
.selected-panel,.placement-bar{bottom:calc(var(--dhikr-height) + 36px)}
.selected-panel{width:min(780px,calc(100vw - 64px));max-width:none;padding:30px 40px;background:url('/assets/ui/frame.webp') center/100% 100% no-repeat,linear-gradient(#d0f1efed,#8ebbcceF);border-radius:24px}
.selected-heading h2{font-size:34px}.selected-heading .icon-button{width:50px;height:50px;min-width:50px}
.selected-content{gap:24px}.selected-image{width:230px;height:230px}.item-description{font-size:19px;line-height:1.75;margin:12px 0}
.level-chips{gap:8px;margin:12px 0}.level-chips span{width:40px;height:6px}
.selected-panel .primary{min-height:52px;padding:10px 14px;font-size:19px;gap:12px}.action-icon{width:36px;height:40px}
.selected-actions{min-height:70px;margin-top:16px;gap:24px}.selected-actions button{font-size:20px;gap:12px}.selected-actions img{width:42px;height:45px}
.placement-bar{width:min(1020px,calc(100vw - 56px));min-width:0;gap:24px;padding:24px 32px;border:1px solid #b9e9e399;background:linear-gradient(#205d6dec,#124251f2);box-shadow:0 9px 30px #061e3555;border-radius:24px}
.placement-bar strong{font-size:30px}.placement-bar>div>span{font-size:19px}.placement-bar .art-confirm{min-width:108px;gap:8px}.art-confirm img{width:80px;height:58px}.art-confirm span{font-size:22px}
.placement-bar .art-cancel{width:60px;height:56px;min-width:60px}.placement-nudges{grid-template-columns:repeat(2,44px);gap:5px}.placement-nudges button{width:44px;height:42px;font-size:25px}
#placement-ghost.anchored{filter:drop-shadow(0 0 5px #bcff81)}#placement-ghost.anchored img{opacity:1}.placing #grid polygon{stroke:#efffd64a;fill:transparent}.placing .world-item{pointer-events:none}
/* Dialog contents use a blank frame; decorative atlas dividers never cross text. */
dialog{width:min(1000px,calc(100vw - 48px));max-height:calc(100dvh - 40px);padding:54px 64px 44px;border:1px solid #d2ffffab;border-radius:28px;background:linear-gradient(135deg,#d8f5eeeF,#a0cdd3f5);color:#194451;box-shadow:0 24px 80px #00151c88;overflow-y:auto}
dialog::before{content:'';position:absolute;inset:13px;border:1px solid #f2ffffb3;border-radius:19px;pointer-events:none}
dialog::backdrop{background:#03191eb5;backdrop-filter:blur(3px)}
dialog h2{font-size:46px;line-height:1.3;margin:12px 0 25px}.dialog-close{left:22px;top:20px;width:64px;height:56px;min-width:64px;z-index:3}
.eyebrow{font-size:18px}.setting-row{font-size:23px;padding:20px 0;gap:24px}.setting-row input{width:32px;height:32px}
.settings-note strong{font-size:23px}.settings-note p{font-size:20px;line-height:1.9}.settings-note{padding-top:25px}
dialog .primary{min-height:62px;padding:14px 24px;font-size:24px}.primary:disabled{opacity:1;background:#8eafb7;color:#284b57;border-color:#c8dddf;cursor:not-allowed}
#progress-dialog p,#messages-dialog p{font-size:24px;line-height:1.8}
#castle-dialog{width:min(1100px,calc(100vw - 48px));padding:40px 48px 30px;background:linear-gradient(135deg,#d7f7f0f7,#9ccdd5f7);border-radius:28px;text-align:center}
#castle-dialog .castle-heading{padding:0 60px 10px}.castle-heading .eyebrow{font-size:17px;color:#397282}#castle-dialog h2{font-size:40px;margin:6px 0 18px}
.castle-comparison{display:grid;grid-template-columns:minmax(0,1fr) 56px minmax(0,1fr);gap:14px;align-items:center;margin:0 0 20px;direction:rtl}
.castle-stage{margin:0;padding:18px 18px 10px;min-width:0;border:1px solid #f0ffffc2;border-radius:20px;background:linear-gradient(#f2ffff75,#e3ffff20);box-shadow:inset 0 0 26px #faffff35}
.castle-stage figcaption{font-size:18px;color:#427582;display:flex;align-items:center;justify-content:center;gap:12px;flex-wrap:wrap}
.castle-stage figcaption strong{font-size:20px;color:#174b59;background:#f1fffba1;border:1px solid #ffffff91;border-radius:20px;padding:5px 16px}
#castle-image,#castle-next-image{display:block;width:100%;height:clamp(170px,27dvh,280px);object-fit:contain;margin:12px auto 0;filter:drop-shadow(0 8px 12px #31535a2b)}
.castle-arrow{font-size:42px;color:#338194;font-weight:400}
#castle-content{font-size:22px;line-height:1.7;color:#215668;max-width:750px;margin:0 auto 20px}
.castle-purchase{padding-top:20px;border-top:1px solid #47858b4d;max-width:750px;margin:auto}
#upgrade-castle{width:100%;margin:0;display:flex;align-items:center;justify-content:center;gap:30px;min-height:68px;padding:14px 26px;border:1px solid #f1ffff;color:#f0ffff;background:linear-gradient(#358899,#1d5b70);box-shadow:0 5px 14px #14495625;font-size:24px;border-radius:14px}
#upgrade-castle:disabled{background:#87aeb9;color:#234b59;box-shadow:none;border-color:#cfebec}
.castle-cost{display:inline-flex;align-items:center;gap:9px;font-size:20px;color:#fff4c8}.castle-cost b{font:600 29px/1.2 Tahoma,sans-serif}.castle-cost>span{font-size:31px;color:#f8d779}
#upgrade-castle:disabled .castle-cost{color:#4b451e}#castle-affordability{font-size:17px;line-height:1.6;min-height:27px;margin:14px 0 0;color:#315d68}
.castle-complete .castle-comparison{grid-template-columns:minmax(0,560px);justify-content:center}
#toast{top:calc(var(--profile-height) + 36px);font-size:20px;padding:15px 24px;max-width:min(740px,calc(100vw - 32px))}
/* Reflow the enlarged controls when two full-size columns cannot fit. */
@media(max-width:1050px) and (min-width:701px){
 :root{--profile-width:clamp(352px,38vw,440px);--profile-height:104px;--resource-width:clamp(260px,27vw,310px);--resource-icon:66px;--resource-height:58px;--counter-font:32px;--side-size:72px;--build-width:180px;--build-height:176px;--dhikr-width:clamp(500px,61vw,660px);--dhikr-height:154px;--dhikr-button-height:133px}
 .brand strong{font-size:34px}.brand-level{font-size:30px}.left-actions{gap:14px}.toolbar{gap:18px}
 .camera-controls button,.camera-controls #recenter{width:50px;height:50px;font-size:30px}.camera-controls img{width:40px;height:42px}
 .save-status{font-size:11px;bottom:8px;max-width:160px}.dock-note{font-size:11px}
 .selected-panel{width:min(700px,calc(100vw - 40px));padding:25px 32px}.selected-image{width:180px;height:180px}
 .selected-heading h2{font-size:29px}.item-description{font-size:17px}.selected-panel .primary{font-size:17px}
 .placement-bar{padding:18px 24px;gap:16px}.placement-bar strong{font-size:25px}.placement-bar>div>span{font-size:16px}
}
@media(max-width:700px){
 :root{--edge:10px;--profile-width:min(380px,calc(100vw - 48px));--profile-height:calc(var(--profile-width)*.233);--resource-width:calc((100vw - 40px)/3);--resource-height:52px;--resource-icon:32px;--counter-font:24px;--side-size:58px;--build-width:152px;--build-height:156px;--dhikr-width:min(480px,calc(100vw - 186px));--dhikr-height:220px;--dhikr-button-height:94px}
 .topbar{inset:8px var(--edge) auto;display:flex;flex-direction:column;gap:8px;align-items:flex-start}
 .brand{width:var(--profile-width);height:var(--profile-height)}.brand strong{font-size:30px}.brand-level{font-size:25px}
 .brand>div:not(.profile-xp){left:25%;right:9%;top:26%;height:40%}.profile-xp{left:26%;top:67%;width:63%;height:4px}
 .garden-stats{display:none}.wallet{width:100%;display:flex;flex-direction:row;gap:10px;padding:0}
 .resource{grid-template-columns:32px minmax(0,1fr)}.resource>div{padding:7px 5px}
 .resource strong{font-size:min(24px,calc((var(--resource-width) - 42px) / var(--number-chars,7) * 1.65));font-weight:700;line-height:1.2}
 .resource-symbol,.resource.gems .resource-symbol{width:38px;height:48px;left:-3px;bottom:auto}.resource.gems .resource-symbol{width:29px;left:0}
 .gold-symbol{font-size:36px}.resource.gems{order:2}.resource.gold{order:1}
 .left-actions{top:calc(var(--profile-height) + 85px);left:8px;gap:13px}.left-actions button{width:58px;height:58px}
 .toolbar{right:10px;bottom:calc(var(--dhikr-height) + 25px);top:auto;gap:16px}.toolbar .tool:not(#open-shop){width:58px;height:58px}.toolbar .tool:not(#open-shop)>img{width:52px;height:52px}
 #open-shop{width:152px;height:156px;left:8px;bottom:12px;font-size:36px}
 .camera-controls{left:12px;top:auto;bottom:182px;gap:6px}.camera-controls button,.camera-controls #recenter{width:44px;height:44px;font-size:28px}.camera-controls img{width:32px;height:36px}
 .save-status{left:10px;bottom:5px;font-size:9px;max-width:150px;gap:3px}.save-status svg{width:13px;height:13px}
 .dhikr-dock{width:var(--dhikr-width);height:var(--dhikr-height);right:10px;bottom:10px;background-size:100% 85%;background-position:center 0}
 .dhikr-buttons{height:192px;display:grid;grid-template-columns:repeat(6,minmax(0,1fr));grid-template-rows:repeat(2,94px);gap:0;direction:ltr}
 .dhikr,.dhikr:nth-child(n+4){width:100%;height:94px;grid-column:span 2;justify-self:center}
 .dhikr-3,.dhikr-4{grid-column:span 3!important;width:80%!important}
 .dhikr-orb{width:146%;height:146%}.dhikr-calligraphy{width:49%;height:49%}.dhikr-4 .dhikr-calligraphy{width:70%;height:48%}
 .dhikr small{font-size:16px;line-height:26px;width:26px;height:26px;top:4px;right:0}.dock-note{font-size:10px;line-height:1.3;padding:3px 4px;white-space:normal}
 .shop{width:calc(100vw - 28px);height:clamp(320px,calc((100dvh - 28px)*.5),520px);aspect-ratio:auto;top:50%;padding:0;max-height:calc(100dvh - 28px)}
 .shop::before{background-size:94% 92%}.shop::after{background-size:100% 100%}
 .shop-surface{inset:21% 8% 15%;border-radius:20px;box-shadow:0 0 0 4px #2f8e94d9}
 .shop .category-tabs{left:8%;right:8%;top:8%;height:13%;gap:1%;overflow:visible}
 .shop .category-tabs button{flex-basis:0;min-width:0;min-height:44px;flex-shrink:1;padding:0}
 .shop .category-tabs img{width:94%;height:87%;margin:0}
 .shop .shop-list{left:11%;right:11%;top:24%;bottom:18%;grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:repeat(2,minmax(150px,1fr));grid-auto-rows:minmax(150px,1fr);gap:12px}
 .shop .shop-card{min-height:150px;padding:7px 8px 10px;gap:7px}.shop .shop-card>img{height:0;flex:1;min-height:0}
 .shop .shop-card button{height:32px;min-height:32px;font-size:18px;padding:3px 8px;gap:5px}.shop .shop-card button[data-owned]{font-size:13px}
 .shop .currency{width:23px;height:23px;font-size:23px}.shop .currency img{width:29px;height:29px}.shop .currency.gems img{width:24px;height:32px}
 .shop .crystal-close{right:1%;top:2%;width:14%;height:9%;min-width:44px;min-height:44px}
 .shop #shop-previous{left:1%}.shop #shop-next{right:1%}.shop .shop-pagination button{width:8%;min-height:54px;height:10%;top:45%}
 .shop #shop-page-label{bottom:7%;left:59%;width:17%;font-size:15px;height:36px;line-height:36px}
 .shop-inventory{left:22%;bottom:7%;width:32%;height:38px;font-size:15px;padding:4px 8px}
 .empty-inventory{font-size:16px;padding:20px 8px}
 .selected-panel{bottom:calc(var(--dhikr-height) + 26px);width:calc(100vw - 26px);max-width:none;padding:22px;max-height:calc(100dvh - var(--dhikr-height) - 50px);overflow-y:auto}
 .selected-heading h2{font-size:25px}.selected-heading .icon-button{width:42px;height:42px;min-width:42px}
 .selected-content{gap:12px}.selected-image{width:115px;height:160px}.item-description{font-size:15px;line-height:1.65;margin:8px 0}
 .selected-panel .primary{font-size:15px;padding:8px;min-height:44px;gap:7px}.action-icon{width:25px;height:30px}.level-chips{gap:5px}.level-chips span{width:26px;height:5px}
 .selected-actions{min-height:52px;gap:12px;padding:7px;margin-top:10px}.selected-actions button{font-size:15px;gap:6px}.selected-actions img{width:30px;height:34px}
 .placement-bar{bottom:calc(var(--dhikr-height) + 25px);width:calc(100vw - 24px);min-width:0;padding:16px;gap:12px;flex-wrap:wrap}
 .placement-bar>div:first-child{flex-basis:100%;text-align:center}.placement-bar strong{font-size:23px}.placement-bar>div>span{font-size:15px}
 .placement-nudges{display:none}.placement-bar .art-confirm{margin:0 auto;flex-direction:row;gap:12px;min-width:0}.art-confirm img{width:60px;height:43px}.art-confirm span{font-size:18px}.placement-bar .art-cancel{width:44px;height:42px;min-width:44px;margin:0 auto}
 dialog{width:calc(100vw - 24px);max-height:calc(100dvh - 24px);padding:62px 28px 30px;border-radius:24px}dialog h2{font-size:32px;margin:8px 0 22px}.dialog-close{left:18px;top:16px;width:44px;height:40px;min-width:44px}
 .eyebrow{font-size:15px}.setting-row{font-size:18px;padding:16px 0;gap:18px}.setting-row input{width:28px;height:28px}.settings-note strong{font-size:20px}.settings-note p{font-size:17px}.settings-note{padding-top:20px}dialog .primary{font-size:20px;min-height:52px}
 #progress-dialog p,#messages-dialog p{font-size:19px;line-height:1.8}
 #castle-dialog{width:calc(100vw - 24px);padding:55px 22px 25px}.castle-heading .eyebrow{font-size:15px}#castle-dialog .castle-heading{padding:0 0 12px}#castle-dialog h2{font-size:30px;margin:8px 0 10px}
 .castle-comparison{grid-template-columns:minmax(0,1fr) 24px minmax(0,1fr);gap:5px;margin-bottom:18px}.castle-stage{padding:12px 5px 6px;border-radius:14px}
 .castle-stage figcaption{font-size:13px;gap:7px}.castle-stage figcaption strong{font-size:14px;padding:4px 8px}.castle-arrow{font-size:26px}
 #castle-image,#castle-next-image{height:160px;margin-top:7px}.castle-complete #castle-image{height:210px}
 #castle-content{font-size:17px;margin-bottom:18px}.castle-purchase{padding-top:18px}
 #upgrade-castle{min-height:58px;font-size:18px;gap:16px;padding:10px 12px;flex-wrap:wrap}.castle-cost{font-size:16px;gap:5px}.castle-cost b{font-size:24px}.castle-cost>span{font-size:25px}
 #castle-affordability{font-size:14px;line-height:1.6;margin-top:12px}
 #toast{top:calc(var(--profile-height) + 83px);font-size:16px;padding:12px 17px;max-width:calc(100vw - 26px);min-width:0}
}
@media(max-height:600px) and (min-width:701px){
 :root{--profile-width:360px;--profile-height:84px;--resource-width:280px;--resource-height:48px;--resource-icon:60px;--counter-font:30px;--side-size:60px;--build-width:160px;--build-height:156px;--dhikr-width:630px;--dhikr-height:136px;--dhikr-button-height:112px}
 .brand strong{font-size:32px}.brand-level{font-size:27px}.garden-stats,.save-status{display:none}.wallet{padding-top:6px;gap:10px}
 .left-actions{top:108px;gap:12px}.toolbar{gap:14px;bottom:calc(var(--dhikr-height) + 20px)}
 .camera-controls button,.camera-controls #recenter{width:44px;height:44px;font-size:29px}.camera-controls img{width:34px;height:38px}
 #open-shop{font-size:34px}.dock-note{font-size:11px}
 .selected-panel{padding:20px 28px;max-height:calc(100dvh - var(--dhikr-height) - 55px);overflow-y:auto}.selected-image{width:150px;height:160px}.selected-heading h2{font-size:26px}.item-description{font-size:16px}
 .selected-panel .primary{font-size:16px;min-height:40px}.selected-actions{min-height:50px;margin-top:8px}.selected-actions button{font-size:17px}.selected-actions img{width:30px;height:32px}
 .placement-bar{padding:16px 22px;gap:18px}.placement-bar strong{font-size:24px}.placement-bar>div>span{font-size:16px}.art-confirm img{width:60px;height:43px}.art-confirm span{font-size:18px}
 .shop .shop-card button{font-size:18px;min-height:28px}.shop .currency{width:22px;height:22px;font-size:21px}.shop .currency img{width:28px;height:28px}.shop .currency.gems img{width:24px;height:31px}
 .shop-inventory{font-size:14px;height:32px;bottom:6%}.shop #shop-page-label{font-size:14px;height:26px;line-height:26px;bottom:7%}
 #castle-dialog{padding:28px 40px 22px}#castle-dialog h2{font-size:31px}.castle-stage{padding:10px}.castle-stage figcaption{font-size:15px}.castle-stage figcaption strong{font-size:16px}
 #castle-image,#castle-next-image{height:140px}.castle-comparison{margin-bottom:12px}#castle-content{font-size:18px;margin-bottom:12px}.castle-purchase{padding-top:12px}#upgrade-castle{min-height:54px;font-size:20px}.castle-cost b{font-size:25px}#castle-affordability{font-size:14px;margin-top:8px}
}

/* Compact shop: half the previous desktop width and height, readable controls. */
.shop-surface{border-radius:16px;box-shadow:0 0 0 4px #2f8e94d9,inset 0 0 24px #e5ffff29}
.shop .category-tabs button{border-radius:8px}.shop .category-tabs button:focus-visible{outline-width:2px;outline-offset:1px}
.shop .shop-list{gap:10px;scrollbar-width:thin}.shop .shop-card{padding:6px 7px 8px;gap:4px;border-radius:12px;transition:filter .15s,box-shadow .15s}
.shop .shop-card:hover{box-shadow:inset 0 0 18px #f5ffff40;filter:brightness(1.03)}
.shop .shop-card button{height:26px;min-height:26px;width:92%;padding:3px 7px;gap:5px;font-size:clamp(12px,1vw,17px);line-height:1.2}
.shop .shop-card button[data-owned]{font-size:13px}.shop .currency{width:20px;height:20px;font-size:20px}.shop .currency img{width:25px;height:25px}.shop .currency.gems img{width:21px;height:28px}
.shop .crystal-close{min-width:34px;min-height:34px}.shop .shop-pagination button{min-height:32px}
.shop-inventory{height:29px;min-height:26px;font-size:13px;padding:3px 8px;border-radius:8px;bottom:6.5%}
.shop #shop-page-label{font-size:12px;height:24px;line-height:24px;bottom:7%;border-radius:8px}
.shop .shop-card>img{display:block;image-rendering:auto}.empty-inventory{font-size:15px;padding:20px 12px}
.shop[data-page-size="4"] .shop-list{grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:repeat(2,minmax(0,1fr));grid-auto-rows:minmax(0,1fr);gap:8px}
.shop[data-page-size="4"] .shop-card{min-height:0;padding:5px 7px 7px}
@media(max-width:700px){
 .shop .category-tabs{top:7%;height:15%}.shop .category-tabs button{min-height:32px}
 .shop .shop-list{top:24%;bottom:18%;grid-template-rows:repeat(2,minmax(0,1fr));grid-auto-rows:minmax(0,1fr)}
 .shop .shop-card{min-height:0}.shop .shop-card button{font-size:14px;height:26px;min-height:26px}.shop .shop-card button[data-owned]{font-size:13px}
 .shop .currency{width:18px;height:18px;font-size:18px}.shop .currency img{width:23px;height:23px}.shop .currency.gems img{width:19px;height:26px}
 .shop-inventory{height:28px;font-size:13px;bottom:6%}.shop #shop-page-label{font-size:12px;height:24px;line-height:24px;bottom:7%}
}
