.mobile-dock,.mobile-sheet,.mobile-studio-tabs,.mobile-studio-panel-close,.mobile-studio-export{display:none}
@media(max-width:760px){
  body.mobile-layout{--mobile-dock:calc(64px + env(safe-area-inset-bottom));--mobile-header:62px;padding-bottom:var(--mobile-dock)}
  body.mobile-layout>header{box-sizing:border-box;min-height:var(--mobile-header);height:var(--mobile-header);padding:4px 12px;gap:7px;flex-wrap:nowrap;z-index:15}
  .mobile-layout>header .path-nav{display:none}
  .mobile-layout>header .brand{min-width:0;margin-inline-end:auto;gap:5px}
  .mobile-layout>header .brand-mark{width:32px;height:40px}
  .mobile-layout>header .brand strong{font-size:clamp(15px,4.5vw,22px);line-height:1.04}
  .mobile-layout>header .brand small{display:none}
  .mobile-layout>header>.language-switcher{width:70px;min-height:44px;padding:5px;font-size:11px}
  .mobile-layout .garden-music summary{display:grid;place-items:center;min-width:44px;min-height:44px;font-size:0;padding:0}
  .mobile-layout .garden-music summary::after{content:"♫";font-size:22px}
  .mobile-layout .garden-music-panel{max-width:calc(100vw - 24px)}
  .mobile-layout .mobile-dock{position:fixed;z-index:14;inset:auto 0 0;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:3px;background:#fff8f0;border-top:1px solid #dec8d9;padding:5px 8px calc(5px + env(safe-area-inset-bottom));height:var(--mobile-dock);box-sizing:border-box}
  .mobile-dock a{display:grid;place-content:center;justify-items:center;gap:3px;min-width:0;border-radius:12px;color:#4b0d5c;text-decoration:none;font:600 11px/1.2 Lato,system-ui,sans-serif;text-align:center;overflow-wrap:anywhere}
  .mobile-dock a[aria-current]{background:#ead8ec}
  .mobile-dock svg,.mobile-garden-actions svg,.mobile-back svg,.mobile-garden-settings svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round;flex:none}
  .mobile-layout.home main,.mobile-layout .heart{width:100%;box-sizing:border-box;padding:10px 12px 24px;margin:0}
  .mobile-layout.home .welcome.journey-hero{min-height:clamp(380px,66svh,600px);box-sizing:border-box;align-items:end;padding:55px 18px 63px;touch-action:pan-y}
  .mobile-layout .journey-copy h1{position:absolute;width:1px;height:1px;clip-path:inset(50%);overflow:hidden;white-space:nowrap}
  .mobile-layout .journey-hero .journey-question{font-size:clamp(28px,7vw,37px);text-wrap:balance}
  .mobile-layout .journey-hero .journey-reminder{font-size:14px;line-height:1.42}
  .mobile-layout .journey-hero .journey-shade{background:linear-gradient(0deg,#211328f2,#211328bf 32%,#2113281a 75%)}
  .mobile-layout .journey-controls{bottom:10px;inset-inline:0;justify-content:center;gap:4px}
  .mobile-layout .journey-controls>button{min-height:44px;min-width:44px}
  .mobile-layout .journey-dots button{min-width:18px;min-height:44px}
  .mobile-home-actions .home-actions{display:grid;grid-template-columns:1fr;text-align:center;margin:10px 0 16px;gap:3px}
  .mobile-home-actions .home-actions a{min-height:44px;display:grid;place-items:center;box-sizing:border-box}
  .mobile-home-actions .home-actions a[href="quiet.html"]{display:none}
  .mobile-home-actions #favoriteReturn{border:0;background:none;text-decoration:underline}
  .mobile-layout #gardens,.mobile-layout #resultHeading,.mobile-layout #journalTitle{scroll-margin-top:calc(var(--mobile-header) + 12px)}
  .mobile-layout .heart-hero{min-height:190px;padding:20px}
  .mobile-layout .heart-grid{display:grid;grid-template-columns:minmax(0,1fr)}
  .mobile-layout .heart-panel{padding:14px}
  .mobile-layout .garden-journal{margin:0}
  .mobile-layout .garden-journal textarea{font-size:16px}
  .mobile-layout .journal-actions button,.mobile-layout .feelings button,.mobile-layout #heartNames button{min-height:44px}
  .mobile-journal-link{display:inline-flex;align-items:center;min-height:44px;font-size:.9rem}
  .mobile-garden>header .brand{display:none}
  .mobile-garden .mobile-back,.mobile-garden .mobile-garden-settings{width:44px;height:44px;display:grid;place-items:center;padding:0;flex:none;color:#4b0d5c}
  .mobile-garden>header .garden-switch{min-width:0;flex:1}
  .mobile-garden>header .garden-switch select{width:100%;min-height:44px;background:transparent;border:0;color:#4b0d5c;font:600 clamp(16px,4.5vw,23px) 'Playfair Display',Georgia,serif;text-overflow:ellipsis;padding:5px 3px}
  .mobile-garden>main{max-width:none;width:100%;margin:0;padding:0}
  .mobile-garden .intro,.mobile-garden .worldtop,.mobile-garden .worldbottom{display:none}
  .mobile-garden .layout{display:block}
  .mobile-garden .garden-stage{position:relative;display:flex;flex-direction:column;height:calc(100dvh - var(--mobile-header) - var(--mobile-dock));min-height:310px}
  .mobile-world-viewport{flex:1;min-height:0;overflow-x:auto;overflow-y:hidden;touch-action:pan-x;overscroll-behavior-inline:contain;scrollbar-width:none;background:#263a2c}
  .mobile-world-viewport::-webkit-scrollbar{display:none}
  .mobile-world-viewport .world{width:auto;min-width:100%;height:100%;aspect-ratio:16/9;border:0;border-radius:0}
  .mobile-world-viewport .plot.open{border:1px solid #ffe2a6;background:#ffde6922;box-shadow:0 0 8px #ffcc5980}
  .mobile-world-viewport .plot.open:active{background:#ffe2a688}
  .mobile-garden-actions{display:flex;justify-content:space-around;gap:7px;padding:7px 9px;background:#fff8f0}
  .mobile-garden-actions button{display:flex;align-items:center;justify-content:center;gap:5px;flex:1 1 0;min-width:0;min-height:44px;padding:5px 4px;font-size:clamp(11px,3.3vw,15px)}
  .mobile-garden-actions .mobile-primary{background:#64184f;color:#fff8ed}
  .mobile-garden-actions .mobile-primary svg{color:inherit}
  .mobile-garden-actions svg{width:18px;height:18px}
  .mobile-garden-feedback{position:absolute;bottom:59px;z-index:2;inset-inline:12px;width:max-content;max-width:calc(100% - 24px);padding:5px 10px;margin:0 auto;background:#fff8efd9;color:#4b0d5c;border-radius:12px;font-size:11px;pointer-events:none}
  .mobile-garden-feedback:empty,.mobile-garden-actions[hidden],.mobile-placement[hidden],.mobile-garden-actions[hidden]~.mobile-garden-feedback{display:none}
  .mobile-garden-actions[hidden]~.mobile-placement{display:grid}
  .mobile-garden-feedback:has(~.mobile-placement:not([hidden])){display:none}
  .mobile-placement{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:2px 8px;position:relative;background:#fff8f0;padding:6px 10px 7px;color:#4b0d5c}
  .mobile-placement>p{position:absolute;bottom:100%;left:50%;transform:translateX(-50%);margin:0 0 8px;width:max-content;max-width:calc(100% - 20px);background:#fff9eedf;border-radius:20px;padding:7px 11px;font-size:12px;pointer-events:none}
  .mobile-placement>span{font:600 15px 'Playfair Display',Georgia,serif}
  .mobile-placement>button{min-height:36px;padding:4px 10px}
  .mobile-placement #workshop{grid-column:1/-1;margin:0;padding:0;border:0;background:none;display:flex;justify-content:space-between;align-items:center;gap:4px}
  .mobile-placement #giftArt{width:36px;height:36px;touch-action:auto}
  .mobile-placement #readyGift{display:none}
  .mobile-placement .gift-controls{justify-content:flex-end;gap:3px}
  .mobile-placement .gift-controls button{min-height:44px;min-width:40px}
  .mobile-placement .gift-sizes{gap:2px}
  .mobile-sheet:not([hidden]){display:block;position:fixed;z-index:13;inset:auto 0 var(--mobile-dock);max-height:min(72dvh,650px);overflow:auto;overscroll-behavior:contain;background:#fff8ef;border:1px solid #dfcbdc;border-radius:21px 21px 0 0;padding:0 13px 12px;box-shadow:0 -10px 40px #3b204b39;color:#4b0d5c}
  .mobile-sheet-heading{position:sticky;top:0;z-index:2;display:flex;align-items:center;justify-content:space-between;gap:10px;background:#fff8ef;padding:10px 0 6px}
  .mobile-sheet-heading h2{margin:0;font:600 26px 'Playfair Display',Georgia,serif}
  .mobile-sheet-heading button,.mobile-sheet>button,.mobile-sheet .garden-tools button{min-height:44px}
  .mobile-sheet .inventory,.mobile-sheet .lesson{padding:6px 0;border:0;background:none;margin:0}
  .mobile-sheet .invhead h2{display:none}
  .mobile-sheet .invhead{min-height:24px}
  .mobile-sheet .milestone-note,.mobile-sheet #milestones{display:none}
  .mobile-sheet #gifts{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;max-height:31dvh;overflow:auto;overscroll-behavior:contain;padding:2px}
  .mobile-sheet #gifts .item:not([hidden]){display:grid;min-height:76px;touch-action:pan-y;cursor:pointer}
  .mobile-sheet #gifts .item img{height:50px;max-width:90%;object-fit:contain}
  .mobile-sheet .lesson{min-height:0}
  .mobile-sheet .lesson-index button{min-height:44px}
  .mobile-sheet .garden-tools{margin-bottom:9px}
  .mobile-sheet #undoGift{display:none}
  .mobile-sheet .language-switcher{min-height:44px;margin-inline-start:8px}
  .mobile-layout .keepsake-shell{padding:0 12px 65px}
  .mobile-layout .keepsake-header{position:sticky;top:0;z-index:5;display:flex;align-items:center;justify-content:space-between;gap:6px;min-height:56px;padding:3px 0;margin-bottom:7px;background:#fff8f0}
  .mobile-layout .keepsake-header h2{font-size:clamp(17px,4.5vw,25px);margin:0}
  .mobile-layout .keepsake-header p{display:none}
  .mobile-layout .keepsake .mobile-studio-export,.mobile-layout .keepsake .mobile-studio-panel-close{display:block;min-height:44px;padding:5px 10px}
  .mobile-layout .keepsake .mobile-studio-export{background:#64184f;color:#fff8ed}
  .mobile-layout .keepsake #ksClose{order:-1;min-width:44px}
  .mobile-layout .keepsake #ksMobileToolbar{display:none}
  .mobile-layout .mobile-studio-tabs:not([hidden]){position:fixed;z-index:6;inset:auto 0 0;display:grid;grid-template-columns:repeat(4,1fr);gap:4px;padding:6px 8px calc(6px + env(safe-area-inset-bottom));background:#fff8ef;border-top:1px solid #e4cedc}
  .mobile-layout .mobile-studio-tabs button{min-width:0;min-height:44px;padding:3px;font-size:12px}
  .mobile-studio-tabs button[aria-pressed=true]{background:#ead8ec}
  .mobile-layout .keepsake .ks-workspace{display:block}
  .mobile-layout .keepsake .ks-visual{position:relative}
  .mobile-layout .keepsake #ksCanvas{max-height:calc(100dvh - 190px)}
  .mobile-layout .keepsake #ksLayerHandle{width:34px;height:34px}
  .mobile-layout .keepsake .ks-editor{display:none;position:fixed;z-index:5;inset:auto 0 calc(57px + env(safe-area-inset-bottom));max-height:49dvh;overflow:auto;overscroll-behavior:contain;background:#fff8ef;border:1px solid #dfcbdc;border-radius:18px 18px 0 0;padding:9px 13px 14px;box-shadow:0 -5px 27px #3c174532}
  .mobile-layout .keepsake[data-mobile-panel]:not([data-mobile-panel=""]) .ks-editor{display:block}
  .mobile-layout .keepsake .ks-editor> :is(#ksCards,#ksLayers,#ksMessageFields,#ksSound,#ksGiftFields,#ksOutputActions){display:none}
  .mobile-layout .keepsake[data-mobile-panel=layout] .ks-editor> :is(#ksCards,#ksLayers),
  .mobile-layout .keepsake[data-mobile-panel=layers] .ks-editor>#ksLayers,
  .mobile-layout .keepsake[data-mobile-panel=verse] .ks-editor>#ksMessageFields,
  .mobile-layout .keepsake[data-mobile-panel=audio] .ks-editor>#ksSound,
  .mobile-layout .keepsake[data-mobile-panel=export] .ks-editor>#ksGiftFields{display:block}
  .mobile-layout .keepsake[data-mobile-panel=layout] .ks-editor>#ksCards{display:grid}
  .mobile-layout .keepsake[data-mobile-panel=export] .ks-editor>#ksOutputActions{display:flex}
  .mobile-layout .keepsake .mobile-studio-panel-close{margin:0 0 6px auto}
  .mobile-layout .keepsake[data-mobile-panel=layout] #ksLayerSettings{display:none}
  .mobile-layout .keepsake[data-mobile-panel=layers] #ksLayers>div:first-of-type>label:nth-child(-n+3){display:none}
}
.studio-mobile-title{display:none}
@media(max-width:760px){
  .mobile-garden>header>.mobile-back{order:0}
  .mobile-garden>header>.garden-switch{order:1}
  .mobile-garden>header>.mobile-garden-settings{order:2}
  .mobile-garden>header>.garden-music{order:3}
  .mobile-layout .keepsake-header{display:grid;grid-template-columns:44px minmax(0,1fr) auto;text-align:center}
  .mobile-layout .keepsake-header .studio-desktop-title{display:none}
  .mobile-layout .keepsake-header .studio-mobile-title{display:inline}
  .mobile-layout .keepsake .ks-editor select,.mobile-layout .keepsake .ks-editor input:not([type=range]),.mobile-layout .keepsake .ks-editor textarea{font-size:16px}
}
