.mobile-heading,.mobile-explore{display:none}
@media (max-width:760px),(max-width:1000px) and (pointer:coarse){
 :root{--mobile-pad:clamp(12px,4vw,24px)}
 html,body{max-width:100%;overflow-x:clip}body.panel-open{overflow:hidden}
 .shell{min-height:100svh;padding-bottom:env(safe-area-inset-bottom,0px)}
 .shell>header{display:flex;min-height:64px;height:auto;gap:8px;justify-content:space-between;padding:10px var(--mobile-pad);padding-top:max(10px,env(safe-area-inset-top,0px))}
 header .brand{min-width:0;font-size:clamp(19px,5.6vw,30px);padding:5px 0;text-align:left}header .brand small{font-size:7px;letter-spacing:1.6px}header .prototype{display:none}header nav{margin-left:auto;flex-shrink:0}header nav button{font:normal 13px Arial;padding:10px 5px;min-height:44px;white-space:nowrap}
 .mobile-heading{display:flex;align-items:center;justify-content:space-between;padding:8px var(--mobile-pad);gap:12px;background:#1b1713;border-bottom:1px solid #42362a}
 .mobile-heading h1{font:normal italic clamp(19px,5vw,26px) Georgia;margin:0;color:#f2dfc2}.mobile-back{min-height:44px;padding:8px 12px;border:1px solid #846d4c;border-radius:3px;flex-shrink:0;font-size:14px}
 .stage,.stage:has(.layer[data-id=lobby]),.stage.lobby-expanded{width:100%;height:auto;flex:none;min-height:0;aspect-ratio:1648/653;overflow:hidden}
 .stage[data-current=outside]{aspect-ratio:1672/788}.stage[data-current=lobby],.stage[data-current=lobby]:has(.layer[data-id=lobby]){aspect-ratio:1448/870}
 .stage-top{display:none}.layer .scene{max-width:none;max-height:none}.bottom{display:none!important}
 .mobile-explore{display:block;padding:0 var(--mobile-pad) 24px;max-width:850px;width:100%;margin:0 auto}.mobile-group{margin-top:20px}.mobile-group h2,.mobile-welcome h2{font:normal 21px Georgia;margin:0 0 10px;color:#f4dfbf}.mobile-hint,.mobile-welcome p{font-size:14px;line-height:1.55;color:#cbbba5;margin:0 0 12px}
 .mobile-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.mobile-action{min-height:48px;width:100%;padding:12px 10px;border:1px solid #746047;background:linear-gradient(145deg,#30271e,#1c1915);border-radius:4px;text-align:left;display:flex;flex-direction:column;justify-content:center;gap:5px;font-size:15px;line-height:1.25;overflow-wrap:anywhere}.mobile-action small{font:12px Arial;color:#c4b39a}.room-action{min-height:68px;border-left:3px solid #44a1b9}.mobile-group:nth-child(2) .room-action{border-left-color:#d5a244}.mobile-group:nth-child(3) .room-action{border-left-color:#c64c62}.mobile-welcome{margin-top:18px}.mobile-primary{text-align:center;align-items:center;background:#d5a244;color:#1b1510;font-weight:700;border-color:#edc47a;min-height:54px;font-size:18px}
 .mobile-art-rail{display:flex;overflow-x:auto;scroll-snap-type:x mandatory;gap:12px;padding:2px 2px 10px;overscroll-behavior-x:contain;scrollbar-color:#9b7f55 #211b16}.mobile-art{flex:0 0 min(66%,225px);min-width:0;display:flex;flex-direction:column;gap:8px;text-align:left;padding:10px;border:1px solid #776045;border-radius:4px;background:#211c17;scroll-snap-align:start}.mobile-art img{width:100%;height:clamp(140px,43vw,220px);object-fit:contain;background:#141210}.mobile-art strong{font:normal 17px Georgia;line-height:1.25}.mobile-art small{font-size:12px;color:#d5a244}
 .overlay{padding:0;align-items:stretch!important;overflow:hidden;overscroll-behavior:contain}.overlay.open{display:flex}.panel,.panel:has(.chalk-panel){width:100%;max-width:none;height:100%;max-height:100%;overflow-y:auto;overscroll-behavior:contain;padding: max(62px,calc(env(safe-area-inset-top,0px) + 54px)) var(--mobile-pad) max(24px,env(safe-area-inset-bottom,0px));border:0;position:relative}.panel .close{position:fixed;top:max(7px,env(safe-area-inset-top,0px));right:max(12px,env(safe-area-inset-right,0px));width:48px;height:48px;padding:0;z-index:10;border:1px solid #977c57;background:#211b16;box-shadow:0 2px 12px #0008}.panel h1{font-size:clamp(26px,7vw,34px);overflow-wrap:anywhere}.panel p{overflow-wrap:anywhere}.art-detail{grid-template-columns:minmax(0,1fr);gap:14px}.art-detail>*{min-width:0}.picture{height:clamp(180px,44svh,450px)}.panel button.control,.guide button,.shop-panel .control,.chalk-panel .control,.shop-row button{min-height:44px}.panel input:not([type=checkbox]):not([type=radio]):not([type=range]),.panel textarea,.panel select{font-size:16px;max-width:100%;min-height:44px}.panel a{overflow-wrap:anywhere}.shop-actions>*{flex:1 1 120px}.shop-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.shop-tile{min-width:0}.shop-tile strong{overflow-wrap:anywhere}.shop-tile img{height:clamp(100px,34vw,180px)}.shop-row .grow{min-width:110px}.shop-search>*{width:100%!important}.shop-form .option{min-height:48px}.preview-space{height:clamp(220px,42svh,430px)}.preview-controls>*{max-width:100%}.chalk-panel canvas{border-width:5px;border-bottom-width:8px}.chalk-pick label{min-height:44px;padding:9px}.chalk-paging{gap:5px}.chalk-paging .control{padding:8px}.chalk-paging span{text-align:center;font-size:12px}.chalk-submit{width:100%;justify-self:stretch}.chalk-word{min-height:44px}.chalk-panel textarea{min-height:100px}.vibes button{min-height:68px}
}
@media(max-width:350px){.mobile-grid{grid-template-columns:minmax(0,1fr)}header .brand{font-size:18px}.mobile-heading h1{font-size:18px}.panel .chalk-neon{font-size:24px}}

/* v8.2 — the scene is the primary mobile interface, with native horizontal panning. */
@media (max-width:760px),(max-width:1000px) and (pointer:coarse){
 .shell>header{min-height:56px;padding-block:7px}.mobile-heading{padding-block:4px}.mobile-heading h1{font-size:clamp(19px,5vw,24px)}.mobile-back{min-height:44px;padding:6px 10px}
 .stage,.stage[data-current],.stage:has(.layer[data-id=lobby]),.stage[data-current=lobby]:has(.layer[data-id=lobby]),.stage.lobby-expanded{height:60svh;min-height:250px;aspect-ratio:auto;width:100%;flex:none;background:#100d0a}
 .stage[data-current=outside]{height:62svh}.stage[data-current=lobby],.stage[data-current=lobby]:has(.layer[data-id=lobby]){height:60svh}
 .stage.mobile-overview[data-current]{height:auto;min-height:0;aspect-ratio:1648/653}.stage.mobile-overview[data-current=outside]{aspect-ratio:1672/788}.stage.mobile-overview[data-current=lobby],.stage.mobile-overview[data-current=lobby]:has(.layer[data-id=lobby]){height:auto;min-height:0;aspect-ratio:1448/870}
 .stage .layer{display:block;overflow-x:auto;overflow-y:hidden;scrollbar-width:none;overscroll-behavior-x:contain;-webkit-overflow-scrolling:touch;touch-action:pan-x pan-y}.stage .layer::-webkit-scrollbar{display:none}.stage .scene{margin-inline:auto;touch-action:pan-x pan-y}.stage .scene>img{pointer-events:none}.stage .hot{touch-action:pan-x pan-y}
 .mobile-explore{padding:0 var(--mobile-pad) 12px}.mobile-dock{display:flex;align-items:center;gap:8px;border-bottom:1px solid #493a29;padding:5px 0}.mobile-pan{display:flex;align-items:center;justify-content:space-between;flex:1;min-width:0;gap:4px}.mobile-pan-arrow{font-size:30px;min-width:44px;min-height:44px;border:1px solid #806845;border-radius:4px;line-height:1}.mobile-pan-hint{font:12px Arial;text-align:center;color:#cbbba5;line-height:1.3}.mobile-view-toggle{min-height:44px;padding:8px;border:1px solid #806845;border-radius:4px;font-size:13px;white-space:nowrap;color:#f1cc89}.mobile-explore>.mobile-primary{margin-top:8px;min-height:48px}.mobile-directory{border-bottom:1px solid #493a29}.mobile-directory>summary{cursor:pointer;min-height:44px;padding:12px 2px;font:16px Georgia;color:#ead3ad}.mobile-directory-content{padding-bottom:10px}.mobile-directory-content .mobile-group:first-child{margin-top:7px}.mobile-directory .mobile-art{flex-basis:min(83%,290px)}.mobile-directory .mobile-art img{height:clamp(180px,55vw,270px)}
}
@media(max-width:1000px) and (orientation:landscape) and (pointer:coarse){.stage[data-current]:not(.mobile-overview){height:68svh;min-height:190px}}

/* v8.3: edge-to-edge mobile scenes with floating navigation. */
@media (max-width:760px),(max-width:1000px) and (pointer:coarse){
 html,body{height:100%;overflow:hidden;overscroll-behavior:none}
 .shell{position:relative;display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:auto minmax(0,1fr);height:100vh;height:100dvh;min-height:0;padding:0;overflow:hidden}
 .shell>header{grid-column:1;grid-row:1;min-height:54px;padding-block:6px;padding-top:max(6px,env(safe-area-inset-top,0px));border-bottom:1px solid #51433288}
 .shell>.stage,.shell>.stage[data-current],.shell>.stage[data-current=lobby]:has(.layer[data-id=lobby]),.shell>.stage:has(.layer[data-id=lobby]),.shell>.stage.lobby-expanded,.shell>.stage.mobile-overview[data-current],.shell>.stage.mobile-overview[data-current=lobby]:has(.layer[data-id=lobby]){grid-column:1;grid-row:2;align-self:stretch;width:100%;height:100%;min-height:0;aspect-ratio:auto;overflow:hidden;flex:none}
 .mobile-heading{grid-column:1;grid-row:2;align-self:start;position:relative;z-index:5;min-width:0;padding:8px 12px 22px;background:linear-gradient(180deg,#100d0bc9,transparent);border:0;pointer-events:none}
 .mobile-heading h1{font-size:clamp(19px,5vw,24px);text-shadow:0 2px 5px #000,0 0 9px #000;line-height:1.2}
 .mobile-back{pointer-events:auto;min-height:44px;border:1px solid #d4b57a88;border-radius:22px;background:#17120dd9;box-shadow:0 2px 10px #0005;padding:8px 13px}
 .mobile-explore{grid-column:1;grid-row:2;align-self:end;z-index:6;position:relative;display:flex;align-items:flex-end;justify-content:space-between;gap:6px;max-width:none;margin:0;padding:18px max(9px,env(safe-area-inset-right,0px)) max(9px,env(safe-area-inset-bottom,0px)) max(9px,env(safe-area-inset-left,0px));background:linear-gradient(0deg,#100d0b9c,transparent);pointer-events:none}
 .mobile-dock{display:flex;flex:0 0 auto;gap:5px;padding:0;border:0;pointer-events:auto}.mobile-pan{flex:none;gap:5px}.mobile-pan-hint{position:absolute;top:0;left:50%;transform:translateX(-50%);color:#fff2d9;font-size:11px;white-space:nowrap;text-shadow:0 1px 4px #000,0 0 8px #000;pointer-events:none}
 .mobile-pan-arrow,.mobile-view-toggle,.mobile-explore>.mobile-primary,.mobile-directory>summary{display:flex;align-items:center;justify-content:center;min-height:44px;border:1px solid #d3b47788;border-radius:23px;background:#17120de8;color:#fff0d6;box-shadow:0 2px 10px #0006;white-space:nowrap;padding:0 12px;font:500 13px Arial;pointer-events:auto}
 .mobile-pan-arrow{font-size:25px;width:44px;padding:0;line-height:1}.mobile-view-toggle{color:#f1cc89}.mobile-explore>.mobile-primary{width:auto;flex:0 1 auto;min-width:0;margin:0;font-weight:700;font-size:13px;border-color:#dfb460;background:#17120de8;color:#f8d48b;padding-inline:12px}
 .mobile-directory{flex:0 1 auto;min-width:0;border:0;pointer-events:auto}.mobile-directory>summary{list-style:none;gap:6px;cursor:pointer;padding-inline:12px}.mobile-directory>summary::-webkit-details-marker{display:none}.mobile-directory>summary:before{content:'☰';font-size:16px;line-height:1}.mobile-directory[open]>summary:before{content:'×';font-size:20px}.mobile-directory[open]>summary{background:#362719;border-color:#d5a244}
 .mobile-directory-content{position:absolute;bottom:calc(max(9px,env(safe-area-inset-bottom,0px)) + 53px);left:max(9px,env(safe-area-inset-left,0px));right:max(9px,env(safe-area-inset-right,0px));max-height:min(62dvh,520px);overflow-y:auto;overscroll-behavior:contain;background:#1b1612f7;border:1px solid #927451;border-radius:12px;padding:12px;box-shadow:0 8px 30px #0009;pointer-events:auto}
 .mobile-directory:not([open])>.mobile-directory-content{display:none}.mobile-directory-content .mobile-group h2{font-size:18px}.mobile-directory-content .mobile-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.mobile-directory-content .mobile-action{min-height:50px}.mobile-directory-content .mobile-art img{height:clamp(100px,30vw,180px)}
 .stage .layer{touch-action:pan-x;overscroll-behavior:contain}.stage .scene,.stage .hot{touch-action:pan-x}
 .shell .stage.mobile-overview .layer{touch-action:auto}.shell .stage.mobile-overview .scene,.shell .stage.mobile-overview .hot{touch-action:auto}
}
@media (max-width:350px){.mobile-pan-arrow{min-width:44px;width:44px}.mobile-view-toggle,.mobile-explore>.mobile-primary,.mobile-directory>summary{font-size:12px;padding-inline:8px}.mobile-explore{gap:4px}.mobile-dock,.mobile-pan{gap:4px}}

/* v8.4 — an independently scrolling product panel and visible purchase shortcut. */
.product-mobile-nav{display:none}
@media (max-width:760px),(max-width:1000px) and (pointer:coarse){
 .overlay.open{position:fixed;inset:0;display:flex;align-items:stretch!important;justify-content:stretch;overflow:hidden;height:100vh;height:100dvh;z-index:30}
 .overlay>.panel{flex:1 1 auto;min-height:0;min-width:0;height:100%;max-height:100%;overflow-x:hidden;overflow-y:auto;-webkit-overflow-scrolling:touch;touch-action:pan-y;overscroll-behavior-y:contain;scroll-padding-top:72px;padding-bottom:calc(24px + env(safe-area-inset-bottom,0px))}
 .panel:has(.product-mobile-nav){padding-top: max(62px,calc(env(safe-area-inset-top,0px) + 54px))}
 .product-mobile-nav{display:block;position:sticky;top:0;z-index:3;padding:0 0 8px;background:#211b16}
 .product-mobile-nav .control{display:block;width:100%;background:#d5a244;color:#18130e;font-weight:700;border:1px solid #edc47a;border-radius:4px;min-height:48px}
 .shop-panel .art-detail{align-items:start;grid-template-columns:minmax(0,1fr);gap:12px}
 .shop-panel .art-detail .picture{height:clamp(150px,34dvh,360px)}
 .shop-panel .art-detail #productStatus{scroll-margin-top:8px}
 .shop-panel .shop-form button[type=submit]{background:#d5a244;color:#18130e;font-weight:700}
}

/* v9.3.9 — allow native two-axis panning of the landscape welcome lounge. */
@media (orientation:landscape) and (max-width:760px), (orientation:landscape) and (max-width:1000px) and (pointer:coarse){
 .stage .layer[data-id="lobby"]{overflow:auto;touch-action:pan-x pan-y;overscroll-behavior:contain;scrollbar-width:none;-webkit-overflow-scrolling:touch}
 .stage .layer[data-id="lobby"] .scene,.stage .layer[data-id="lobby"] .hot{touch-action:pan-x pan-y}
 .stage.busy .layer[data-id="lobby"]{overflow:hidden}
}
