/* Phone-sized controls around the original illustrated worlds. */
.phone-world-switch,body.js-ready .mobile-shortcuts{display:none}

@media(max-width:760px),(max-width:1000px) and (max-height:480px){
 html{scroll-padding-top:calc(82px + env(safe-area-inset-top,0px));scroll-padding-bottom:96px;-webkit-text-size-adjust:100%;text-size-adjust:100%}
 body{--gutter:max(20px,env(safe-area-inset-left,0px),env(safe-area-inset-right,0px));padding-bottom:calc(82px + env(safe-area-inset-bottom,0px))}
 .section{padding-block:52px}
 section[id]{scroll-margin-top:18px}
 .site-header{padding-top:env(safe-area-inset-top,0px)}
 .site-header .header-inner{min-height:64px;gap:12px}
 .site-header .brand{min-width:0;min-height:48px}
 .site-header .studio-wordmark{width:200px;max-width:calc(100vw - 148px)}
 .site-header .menu-toggle{min-width:82px;min-height:46px;padding:10px 12px}
 body.js-ready .site-header #main-nav.is-open{max-height:calc(var(--phone-viewport-height,100dvh) - 86px - env(safe-area-inset-top,0px));overflow-y:auto;overscroll-behavior:contain;box-shadow:0 14px 24px #17382b20}
 body.phone-menu-open{overflow:hidden}
 body.js-ready .site-header #main-nav>a{min-height:48px;font-size:16px}

 /* Normal scrolling, with two explicit worlds instead of a long scroll trap. */
 #journey .journey-stage{padding-top:24px;min-height:0;height:auto}
 #journey .journey-copy{padding-bottom:12px}
 #journey .journey-copy .eyebrow{font-size:10px;margin-bottom:12px;letter-spacing:.06em}
 #journey .journey-copy .journey-title,#journey .journey-copy h2{font-size:clamp(36px,10vw,44px);line-height:1.09;letter-spacing:-.045em}
 #journey .journey-copy .journey-lede{max-width:34ch!important;font-size:16px;line-height:1.6;margin:16px auto 18px}
 #journey .journey-copy .actions{gap:4px}
 #journey .journey-copy .actions .button{width:100%;max-width:none;min-height:50px;font-size:15px;padding:12px 16px}
 #journey .journey-copy .actions .text-link{width:auto;align-self:center;min-height:44px;padding:8px 10px;border:0;background:transparent;box-shadow:none;font-size:14px}
 #journey .journey-copy[data-chapter]{display:none}
 #journey[data-scene-chapter='0'] .journey-copy[data-chapter='0'],#journey[data-scene-chapter='1'] .journey-copy[data-chapter='1']{display:block}
 .phone-world-switch{order:1;display:grid;grid-template-columns:1fr 1fr;gap:6px;width:100%;margin:0 0 16px;padding:4px;border:1px solid #a5b49a;background:#e2e9d9}
 .phone-world-switch button{display:flex;align-items:center;justify-content:center;gap:9px;min-height:44px;padding:9px 8px;border:1px solid transparent;background:transparent;color:#496044;font:600 13px/1.4 var(--sans)}
 .phone-world-switch button span{font:10px/1.4 var(--mono);opacity:.75}
 .phone-world-switch button[aria-pressed='true']{border-color:#607d59;background:#f8f6eb;color:#294735;box-shadow:2px 2px 0 #84977640}
 .phone-world-switch button:focus-visible{outline:3px solid #355a3c;outline-offset:2px}
 #journey .journey-scenery{height:clamp(270px,72vw,330px);aspect-ratio:auto}
 #journey .journey-image{object-position:50% 50%}
 #journey .workshop-v45{display:block}
 #journey .journey-footer{padding-block:8px}
 #journey .journey-skip{min-height:44px;font-size:13px}
 .living-marker{min-width:36px;min-height:36px;font-size:22px}
 .living-gardener .living-robot-label{left:0;transform:none}
 .living-coder .living-robot-label{left:auto;right:0;transform:none}
 .living-planner .living-marker{width:28px;height:28px;min-width:28px;min-height:28px;font-size:18px}
 .living-robot-label{width:max-content;max-width:142px;white-space:nowrap;text-align:center;line-height:1.4}
 .desk-is-open .phone-world-switch,.desk-is-returning .phone-world-switch{visibility:hidden}
 .desk-view-controls button{min-height:46px}

 /* The same request button stays available next to two useful destinations. */
 body.js-ready .mobile-shortcuts{position:fixed;inset:auto 0 0;z-index:29;display:grid;grid-template-columns:1fr 1fr 1.65fr;align-items:stretch;gap:6px;margin:0;padding:9px max(12px,env(safe-area-inset-right,0px)) calc(9px + env(safe-area-inset-bottom,0px)) max(12px,env(safe-area-inset-left,0px));border-top:1px solid #aab89d;background:#f6f3eaf5;backdrop-filter:blur(12px);box-shadow:0 -5px 20px #24423612}
 .mobile-shortcuts>a{display:flex;flex-direction:column;justify-content:center;align-items:center;gap:2px;min-height:50px;padding:5px 6px;border:1px solid #c2ccb4;background:#efefe2;color:#34523c;font:600 12px/1.4 var(--sans)}
 .mobile-shortcuts>a>span{color:#758765;font:9px/1.2 var(--mono)}
 .mobile-shortcuts>a[aria-current='location']{border-color:#748f60;background:#e2ebcd}
 .mobile-shortcuts .quick-request-fab{pointer-events:auto;position:static;inset:auto;display:flex!important;visibility:visible;justify-content:center;gap:7px;min-width:0;min-height:50px;padding:9px 10px;margin:0;box-shadow:2px 2px 0 #a9b99c60;font-size:13px;line-height:1.35}
 .mobile-shortcuts .quick-request-fab img{width:20px;height:20px;flex:none}
 .mobile-shortcuts>a:focus-visible,.mobile-shortcuts button:focus-visible{outline:3px solid #45663b;outline-offset:2px}
 body.phone-menu-open .mobile-shortcuts,body.phone-dialog-open .mobile-shortcuts,body.phone-keyboard-open .mobile-shortcuts{visibility:hidden;pointer-events:none}
 body.phone-menu-open .mobile-shortcuts .quick-request-fab,body.phone-dialog-open .mobile-shortcuts .quick-request-fab,body.phone-keyboard-open .mobile-shortcuts .quick-request-fab{visibility:hidden!important;pointer-events:none!important}

 /* Keep the current demo beside a compact swipeable project selector. */
 #work .work-cartridges{display:flex;gap:10px;overflow-x:auto;overscroll-behavior-x:contain;scroll-snap-type:x proximity;scroll-padding-inline:3px;padding:3px 3px 12px;margin:0 -3px 12px;-webkit-overflow-scrolling:touch}
 #work .work-cartridge{flex:0 0 156px;min-height:88px;padding:12px;scroll-snap-align:start;grid-template-columns:minmax(0,1fr) 12px}
 #work .cartridge-name{font-size:17px}
 #work .cartridge-name small{font-size:12px}
 #work .work-preview-copy{padding:22px 18px}
 #work .work-control-hint{font-size:12px}
 #work .work-preview-actions .button{min-height:48px}
 #work .tend-screen-choices{overflow-x:auto;flex-wrap:nowrap;overscroll-behavior-x:contain}
 #work .tend-screen-choices button{min-height:44px;flex:none}
 #work .picnic-controls{flex-wrap:wrap}
 #skills .tools-list{min-width:0}
 #skills .tools-list li{min-width:0}
 #skills .tool-logo{flex-wrap:wrap}
 #skills .service-proof{padding:18px}
 #skills .apex-chapters{gap:8px;overflow-x:auto;overscroll-behavior-x:contain}
 #skills .apex-chapters button{min-height:44px;flex:none}
 .form-body input,.form-body select,.form-body textarea{font-size:16px!important;min-height:48px}
 #start .form-body{padding:20px}
 #start .form-actions .button{min-height:50px}
 #start .form-note,#start .inquiry-privacy{font-size:13px;line-height:1.65}

 /* Visual viewport height follows the iPhone keyboard without shrinking text. */
 body.request-active,body.phone-dialog-open{overflow:hidden}
 #quick-request,#service-closeup,#project-dialog,.living-dialog,#blueprint-dialog{
   max-width:calc(100% - 20px);max-height:calc(var(--phone-viewport-height,100dvh) - 20px - env(safe-area-inset-top,0px));overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;scroll-padding-block:76px 24px;
 }
 #quick-request{position:fixed;inset:auto 10px;top:calc(var(--phone-viewport-top,0px) + 10px + env(safe-area-inset-top,0px));width:auto;margin:0 auto;box-shadow:4px 5px 0 #243e3430}
 #quick-request .quick-request-bar{padding:8px 12px;font-size:9px;min-height:58px}
 #quick-request .quick-request-close{min-width:44px;min-height:44px}
 #quick-request .quick-request-intro{padding:20px 20px 0}
 #quick-request .quick-request-intro h2{font-size:29px}
 #quick-request .form-body{padding:18px 20px 22px;gap:16px}
 #quick-request input,#quick-request select,#quick-request textarea{font-size:16px!important;min-height:48px}
 #quick-request textarea{min-height:112px}
 #service-closeup .service-closeup-bar{position:sticky;top:0}
 #service-closeup .service-closeup-art{height:min(66.666667cqi,calc(var(--phone-viewport-height,100dvh) - 340px));min-height:140px}
 #service-closeup .service-closeup-actions{flex-wrap:wrap;gap:10px}
 #service-closeup .service-closeup-request{min-height:48px;flex:1;justify-content:space-between}
 #service-closeup .service-closeup-motion{min-height:44px}
 #service-closeup .service-closeup-back{min-height:44px}
 dialog .close,dialog .living-dialog-close{min-width:44px;min-height:44px}
 footer .footer-bottom{padding-bottom:20px}
}

@media(max-width:380px){
 body{--gutter:18px}
 .site-header .studio-wordmark{width:185px}
 #journey .journey-copy .journey-title,#journey .journey-copy h2{font-size:37px}
 body.js-ready .mobile-shortcuts{grid-template-columns:1fr 1fr 1.65fr;gap:5px;padding-inline:9px}
 .mobile-shortcuts .quick-request-fab{font-size:12px;padding-inline:6px}
}

@media(max-height:480px) and (max-width:1000px){
 #quick-request,#service-closeup{max-height:calc(var(--phone-viewport-height,100dvh) - 16px);overflow-y:auto}
 #quick-request .quick-request-bar{position:sticky;top:0}
 body.js-ready .mobile-shortcuts{padding-block:6px}
 #service-closeup .service-closeup-art{min-height:100px;height:150px}
}

@media(prefers-reduced-motion:reduce){.phone-world-switch *,.mobile-shortcuts *{scroll-behavior:auto;transition:none}}
