/* P3: a quiet desktop corner. Layout and projected shadows only. */
:root{--safe-top:env(safe-area-inset-top,0px);--safe-bottom:env(safe-area-inset-bottom,0px);--room-height:100dvh;--space-horizon:36dvh;--play-home-y:49dvh;--sheet-height:min(300px,34dvh)}
html{min-height:100%;background:#f3ece2}
body{overflow:auto;min-height:100dvh;touch-action:auto}
.soft-space{height:var(--room-height);background:#f4ede3}
.soft-space:before{display:none}
.room{position:absolute;inset:0;overflow:hidden;pointer-events:none;z-index:-1}
.room-wall{position:absolute;inset:0 0 auto;height:calc(var(--space-horizon) + 36px);background:#f7f3ed}
.room-surface{position:absolute;inset:var(--space-horizon) -5% 0;border-radius:50% 50% 0 0 / 28px 28px 0 0;background:#eee4d7;box-shadow:0 -1px 0 #e7ded366,inset 0 14px 22px -19px #b9a58e4d}
.room-light{position:absolute;inset:0;background:radial-gradient(ellipse 78% 78% at 31% 24%,#fffdf788,transparent 78%)}
.desk-edge{position:absolute;inset:auto 0 0;height:calc(24px + var(--safe-bottom));background:#dbc6ae;border-top:1px solid #fff3e3;box-shadow:0 -3px 8px #a48b7020,inset 0 4px 8px #baa08815}
.space-header{top:calc(26px + var(--safe-top));left:max(28px,env(safe-area-inset-left));right:max(28px,env(safe-area-inset-right))}
.stage{overflow:visible}
#toy{filter:none;touch-action:none;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}
.lift-shadow,.ambient-shadow{position:absolute;pointer-events:none;border-radius:50%;background:#76604e;transform:translate(-50%,-45%);will-change:transform,width,height,opacity}
.lift-shadow{filter:blur(3px)}.ambient-shadow{filter:blur(11px)}
.play-hint{top:calc(var(--object-foot,60dvh) + 28px);font-size:13px;letter-spacing:.09em}
.collection{bottom:calc(var(--safe-bottom) - 6px);filter:drop-shadow(0 -4px 9px #8d755319)}
.collection-tray:before{content:'';position:absolute;left:11%;right:11%;bottom:6%;height:12%;border-radius:50%;box-shadow:0 10px 18px #896d4c30;z-index:-1;pointer-events:none}
.collection-handle{min-height:48px}
.drawer{backdrop-filter:none;background:#fbf7f0f5;max-height:calc(var(--room-height) - var(--safe-top));top:var(--safe-top)}
.drawer-scroll,.photo-dialog,.item-menu{overscroll-behavior-y:contain;touch-action:pan-y pinch-zoom;-webkit-overflow-scrolling:touch}
.drawer-scroll{min-height:0}
input[type=text],select,#bagLabelInput,.photo-dialog #customNameInput{font-size:16px}
button{touch-action:manipulation}
#feelAxis{height:44px;margin:9px 0 2px;background:linear-gradient(90deg,#d9bdb2,#b8848b) center/100% 4px no-repeat;touch-action:pan-y;cursor:pointer}
#feelAxis::-webkit-slider-thumb{width:26px;height:26px;border-width:5px;box-shadow:0 2px 4px #80605220}
#feelAxis::-moz-range-thumb{width:18px;height:18px;border:5px solid white;box-shadow:0 2px 4px #80605220}
.feel-anchors button{min-height:44px;min-width:48px}
.feel-anchors button:before{top:-25px}
.mobile-controls,.sheet-grip{display:none}
.photo-dialog{max-height:calc(var(--room-height) - var(--safe-top) - var(--safe-bottom) - 24px);touch-action:pan-y pinch-zoom}
.photo-dialog::backdrop{backdrop-filter:none;background:#75645522}
.photo-dialog #thumb,.bag-print,.bag-sticker,.collectible,.collection-handle,.sticker-tools button{touch-action:none;-webkit-user-select:none;-webkit-touch-callout:none}
.item-menu{max-height:calc(var(--room-height) - var(--safe-top) - var(--safe-bottom) - 24px)}
@media(min-width:1101px){
 .drawer{width:var(--drawer-width)}
 .space-header{gap:24px}
}
@media(max-width:1100px){
 .space-header{top:calc(12px + var(--safe-top));left:max(16px,env(safe-area-inset-left));right:max(16px,env(safe-area-inset-right));align-items:center;gap:8px}
 .brand{font-size:18px;letter-spacing:2px;line-height:1.2}.brand small{font-size:10px;line-height:1.3;letter-spacing:.04em;margin-top:5px}
 .header-actions{gap:1px}.sound-pill{width:44px;height:44px;padding:12px;flex:none}.sound-pill>span{display:none}
 .language-switch button{min-height:44px;padding:7px 6px}.language-switch button+button:before{margin-right:9px}
 .drawer-handle{display:none}
 .mobile-controls{display:block;position:fixed;z-index:16;left:50%;bottom:calc(86px + var(--safe-bottom));transform:translateX(-50%);width:min(330px,calc(100vw - 56px));pointer-events:auto}
 #mobileAxisDock .feel-axis-control{padding:0;margin:0}
 #mobileAxisDock .feel-axis-control>label{font-size:13px;margin:0;min-height:36px;max-width:42%}
 #mobileAxisDock #feelAxis{margin:0 0 0;height:44px}
 #mobileAxisDock .feel-anchors{height:44px;margin-inline:13px}
 #mobileAxisDock .feel-anchors button{font-size:13px;padding:0 3px;top:-4px}
 #mobileAxisDock .feel-anchors small{font-size:10px;margin:0}
 #mobileAxisDock .feel-anchors button:before{top:-19px}
 .mobile-settings{position:absolute;right:-8px;top:-4px;min-height:44px;padding:8px;border:0;background:none;font-size:13px;color:#826e64}
 .mobile-settings:after{content:'\203A';display:inline-block;margin-left:8px;transform:rotate(-90deg);color:#a78977}
 .drawer-open .mobile-controls,.collection-open .mobile-controls,.stage-empty #mobileAxisDock,.entering-room .mobile-controls{visibility:hidden;pointer-events:none}
 .stage-empty .mobile-settings{opacity:.35}
 .play-hint{top:calc(var(--object-foot,50dvh) + 20px);font-size:12px;max-width:80vw}
 .drawer-open .play-hint{opacity:0}
 /* Same preferences and controls, presented below a permanently reserved play area. */
 .drawer{inset:auto 0 0;top:auto;width:100%;height:calc(var(--sheet-height) + var(--safe-bottom));max-height:calc(var(--room-height) - var(--safe-top) - 90px);padding-bottom:var(--safe-bottom);border:1px solid #fff6;border-bottom:0;border-radius:23px 23px 0 0;background:#fbf7f0;box-shadow:0 -5px 25px #836c5219;transform:translateY(104%);transition:transform .32s cubic-bezier(.2,.7,.2,1);z-index:24}
 .drawer.visible{transform:translateY(0)}
 .sheet-grip{display:flex;align-items:center;justify-content:center;width:100%;height:28px;min-height:28px;padding:0;border:0;background:none;touch-action:none;flex:none}
 .sheet-grip span{width:32px;height:3px;border-radius:5px;background:#c4ad9b}
 .drawer-heading{padding:0 16px 5px;gap:8px;min-height:34px}
 .drawer-object{gap:8px}.drawer-object img{width:26px;height:29px}
 .drawer h2{font-size:14px;line-height:1.2;margin:0}.drawer-heading p{display:none}
 .icon-button{min-width:44px;min-height:44px}.drawer-heading .icon-button{min-height:34px}
 .drawer-tabs{margin:0 18px;gap:12px}.drawer-tabs button{padding:7px 0;min-height:38px;font-size:13px}
 .drawer-scroll{padding:12px 20px 18px;flex:1;overflow-y:auto;scroll-padding:16px}
 .drawer-scroll .control{margin-bottom:18px}.drawer-scroll .micro{margin:8px 0;font-size:12px;line-height:1.45}
 .drawer-scroll .textbtn{min-height:44px}.drawer-scroll .toggleline{min-height:44px}
 .drawer-foot{padding:0 17px 4px;min-height:36px;gap:6px}
 .drawer-foot .language-switch button{min-height:34px}.drawer-foot .textbtn{min-height:34px;font-size:12px}
 .sticker-tools button{width:44px;height:44px}.sticker-tools #stickerResize{width:44px;height:44px}
 .collection{bottom:calc(var(--safe-bottom) - 4px)}
 .collection-handle{bottom:6px;height:56px;min-height:48px;width:140px}
 .collection.open .collection-handle{bottom:16%;height:25%;min-height:48px}
 .handle-caption{display:block;font-size:11px;letter-spacing:.06em}
 .item-manage{width:44px;height:44px}.item-menu button{min-height:44px}
 .photo-dialog{width:calc(100vw - 24px);padding:16px;margin:auto;border-radius:20px}
 .photo-heading h2{font-size:16px;flex-basis:105px}.photo-heading{gap:4px}
 .photo-dialog #thumb{width:min(240px,100%,calc(var(--room-height) * .30));border-radius:18px}
 .photo-dialog .photo-actions>button,.crop-modes button,.photo-dialog .upload{min-height:44px}
 .photo-dialog .photo-actions{gap:8px}.photo-dialog .photo-actions .use-photo{padding-inline:12px}
 .photo-dialog .name-label{margin-top:10px}
 .intro-language{left:16px;top:calc(12px + var(--safe-top))}.intro-skip{right:16px;top:calc(12px + var(--safe-top))}
}
@media(max-width:360px){.brand{font-size:16px}.brand small{font-size:9px}.mobile-controls{width:calc(100vw - 64px)}.mobile-settings{font-size:12px}}
@media(max-width:1100px) and (max-height:630px){.mobile-controls{bottom:calc(67px + var(--safe-bottom))}.play-hint{display:none}.drawer-foot{display:none}.drawer-scroll{padding-top:8px}.sheet-grip{height:22px;min-height:22px}.drawer-heading{padding-bottom:0}.drawer-tabs button{min-height:34px}}
@media(prefers-reduced-motion:reduce){.drawer{transition:none}}
