/* Phone-only adjustments. Desktop styles are deliberately untouched. */
@media(max-width:750px),(max-width:1024px) and (max-height:500px) and (pointer:coarse){
 html,body{max-width:100%;overflow-x:clip;overscroll-behavior-x:none;-webkit-text-size-adjust:100%}
 .immersive header{height:calc(74px + env(safe-area-inset-top,0px));padding:env(safe-area-inset-top,0px) 16px 0;box-sizing:border-box}
 header #edit,header .sound-toggle,header .brand{min-height:44px;display:inline-flex;align-items:center;justify-content:center}
 header #edit{font-size:10px;padding:8px 4px}header .sound-toggle{font-size:9px;gap:6px;padding:8px 10px}header .sound-toggle svg{width:14px;height:14px}header .brand{font-size:29px}
 .immersive .chapter-nav{left:7px;gap:3px;max-height:60svh}.chapter-nav a{min-width:38px;min-height:44px;justify-content:center}.chapter-nav a b{font-size:9px}
 .journal-toggle{top:calc(80px + env(safe-area-inset-top,0px));right:16px;min-height:44px;font-size:10px;padding:10px 12px}.journal-toggle span{padding-left:8px;margin-left:8px}
 .story-copy{left:56px;top:calc(138px + env(safe-area-inset-top,0px));width:calc(100% - 76px);max-width:none}
 .story-copy .eyebrow{font-size:8px;letter-spacing:1.5px}.story-copy h1{font-size:clamp(32px,9.5vw,43px);line-height:1.07;margin-top:18px;letter-spacing:-1.3px}.story-copy h2{font-size:clamp(28px,8vw,36px);line-height:1.08;margin-top:15px}
 .story-copy p{font-size:13px;line-height:1.7;margin-top:15px;max-width:none}.story-copy small{font-size:10px;line-height:1.65;margin-top:13px;max-width:none}.enter-link{min-height:44px;font-size:10px;gap:20px;margin-top:16px;padding-bottom:7px}
 .room-copy{top:calc(135px + env(safe-area-inset-top,0px));max-height:38svh;overflow:auto;overscroll-behavior:contain;scrollbar-width:thin;padding-right:4px;padding-bottom:8px}
 .room-copy h2{font-size:clamp(27px,8vw,35px);max-width:none}.room-copy .room-intro{font-size:12.5px;line-height:1.65;max-width:none}.room-meta{font-size:10px;gap:15px;margin-top:12px}.room-copy p.room-materials{font-size:10px;line-height:1.6;margin-top:9px}
 .room-copy .explore-room{min-height:44px;min-width:190px;padding:10px 14px;font-size:11px;margin-top:13px}.next-room{min-height:44px;display:flex;align-items:center;font-size:11px;margin-top:6px}.room-copy small{font-size:9px}
 .model-hitarea{top:52%;bottom:128px;height:auto;right:10%;width:80%;border-radius:25%}
 .model-controls,.model-focused .model-controls{left:16px;right:auto;bottom:calc(16px + env(safe-area-inset-bottom,0px));width:calc(100% - 32px);gap:0}
 .model-controls>div{display:grid;width:100%;grid-template-columns:minmax(0,1.35fr) minmax(0,1fr) 44px 44px minmax(0,1fr);gap:4px;margin:0}.model-controls button{min-width:0;min-height:44px;font-size:10px;padding:7px 3px;touch-action:manipulation}
 body:not(.model-focused) #room-model-label,.model-focused #room-model-label{left:50%;right:auto;top:auto;bottom:calc(68px + env(safe-area-inset-bottom,0px));width:250px;max-width:calc(100% - 40px);margin-left:-125px;min-width:0;padding:10px 12px}
 #room-model-label>span{font-size:9px;letter-spacing:1.3px}#room-model-label small{font-size:8px;letter-spacing:.8px}#room-model-label small:not(.mobile-model-hint){display:none}#room-model-label .mobile-model-hint{display:block}
 .model-focused .model-hitarea{top:18%;bottom:130px;height:auto;right:8%;width:84%}
 body.in-bio-room .about-callout.callout-left,body.in-bio-room .about-callout.callout-right{left:64px!important;right:64px!important;width:auto!important;max-width:none!important;top:calc(140px + env(safe-area-inset-top,0px));max-height:calc(100svh - 275px);padding:18px 16px;box-sizing:border-box;overflow:auto}
 body.in-bio-room .about-callout h2{font-size:clamp(24px,7vw,30px)!important;line-height:1.12}body.in-bio-room .about-callout p{font-size:13px!important;line-height:1.7}body.in-bio-room .about-callout small{font-size:10px;line-height:1.6}.bio-panel-close{width:44px;height:44px;top:0;right:0;font-size:25px}.bio-panel-close+.eyebrow{padding-right:25px}
 .bio-discovery-marker{width:48px;height:48px;font-size:21px;touch-action:manipulation}.bio-discovery-marker.is-read{font-size:20px}
 #bio-discovery-progress{bottom:calc(78px + env(safe-area-inset-bottom,0px));width:auto;max-width:calc(100% - 48px);padding:10px 14px;font-size:11px}.bio-discovery-count{font-size:9px}
 .maker-greeting{bottom:calc(20px + env(safe-area-inset-bottom,0px));right:16px;min-height:44px;font-size:10px;padding:10px 12px}
 #detail,#journal,#editor{width:calc(100% - 20px);max-width:none;max-height:calc(100dvh - 24px);box-sizing:border-box;padding:28px 20px;overscroll-behavior:contain;scroll-padding-top:44px}
 #detail{width:100%;height:100dvh;max-height:100dvh;padding:24px 20px;border-left:0}dialog .close,#detail .close{width:44px;min-height:44px;top:0;right:0;font-size:25px;z-index:3;touch-action:manipulation}
 #detail h2,#journal h2,#editor h2{font-size:clamp(32px,10vw,43px);line-height:1.1}#detail .detail-story,#journal .notice,#editor .notice{font-size:13px;line-height:1.75}#detail .detail-stage{height:clamp(250px,44svh,380px)}.viewer-tools button{min-height:44px;min-width:70px;font-size:11px}.viewer-tools span{font-size:8px}
 .overlay-pagination{bottom:0;padding-bottom:env(safe-area-inset-bottom,0px);gap:8px}.overlay-pagination button{min-height:44px;font-size:11px}.overlay-pagination>span{font-size:9px}
 .journal-entry{grid-template-columns:22px 1fr;gap:10px;padding:20px 0}.journal-entry h3{font-size:24px}.journal-entry p{font-size:12px}.journal-actions{display:flex;flex-wrap:wrap;gap:8px 16px}.journal-actions a,.journal-actions button{min-height:44px;font-size:11px;display:inline-flex;align-items:center}
 #editor input:not([type=checkbox]):not([type=file]),#editor select,#editor textarea{font-size:16px;min-height:44px;box-sizing:border-box;max-width:100%}#editor button,#editor .filebtn{min-height:44px;font-size:12px}#editor .row{flex-direction:column;gap:12px}#editor .row>*{width:100%;box-sizing:border-box}#editor .edit-item{gap:8px}#editor .edit-item>span{flex-basis:100%}.studio-prompts{flex-wrap:wrap}.studio-prompts button{flex:1 1 130px}
 .social-icon{min-width:44px;min-height:44px;display:inline-flex;align-items:center;justify-content:center}.footer-social-links{gap:12px}.immersive footer{padding-bottom:calc(25px + env(safe-area-inset-bottom,0px))}
 .arrival-loading h1{font-size:32px;margin:32px 25px}.arrival-loading-foot{font-size:7px;letter-spacing:1.2px}.arrival-progress-meta{font-size:10px}.arrival-progress{height:2px}
}
@media(max-width:750px) and (max-height:680px){
 .story-copy{top:118px}.story-copy h1{font-size:32px}.story-copy p{font-size:11px;margin-top:11px}.story-copy small{font-size:9px;margin-top:10px}.room-copy{top:125px;max-height:36svh}.room-copy h2{font-size:27px}.room-copy .room-intro{font-size:11px}.room-meta{margin-top:8px}.room-copy p.room-materials{margin-top:7px}.room-copy small,.room-copy .next-room{display:none}.model-hitarea{top:55%;bottom:122px}body.in-bio-room .about-callout.callout-left,body.in-bio-room .about-callout.callout-right{top:125px;max-height:calc(100svh - 250px)}
}
@media(max-width:750px) and (orientation:landscape) and (max-height:500px),(max-width:1024px) and (orientation:landscape) and (max-height:500px) and (pointer:coarse){
 .immersive header{height:58px}.journal-toggle{top:62px;min-height:40px}.story-copy{left:54px;top:80px;width:43%;max-height:calc(100svh - 100px);overflow:auto}.story-copy h1{font-size:30px}.story-copy p{font-size:11px}.story-copy small{font-size:9px}.room-copy{top:75px;width:42%;max-height:calc(100svh - 95px)}.room-copy h2{font-size:28px}.model-hitarea{top:26%;bottom:110px;right:3%;width:47%}.model-controls{left:auto;right:12px;width:48%;bottom:12px}body:not(.model-focused) #room-model-label{left:auto;right:12px;bottom:64px;width:48%;margin:0}.model-focused .model-controls{left:16px;right:auto;width:calc(100% - 32px)}body.in-bio-room .about-callout.callout-left,body.in-bio-room .about-callout.callout-right{top:80px;max-height:calc(100svh - 160px);left:70px!important;right:70px!important}.maker-greeting{bottom:12px}#bio-discovery-progress{bottom:15px}
}

@media(max-width:750px){body.in-bio-room .about-callout{pointer-events:auto!important;touch-action:pan-y;-webkit-overflow-scrolling:touch}}

@media(max-width:750px){dialog h2{padding-right:32px}}

@media(max-width:750px),(max-width:1024px) and (max-height:500px) and (pointer:coarse){.journey-control-mode{display:none!important}.header-actions{gap:12px}}

/* Phone navigation: horizontal room index and explicit previous / next actions. */
@media(max-width:750px),(max-width:1024px) and (max-height:500px) and (pointer:coarse){
 .immersive .chapter-nav{left:16px;right:16px;top:calc(74px + env(safe-area-inset-top,0px));bottom:auto;transform:none;flex-direction:row;justify-content:safe center;gap:4px;max-height:none;height:44px;overflow-x:auto;overflow-y:hidden;scrollbar-width:none;pointer-events:auto}.chapter-nav::-webkit-scrollbar{display:none}.chapter-nav a{flex:0 0 40px;min-width:40px;min-height:44px}.chapter-nav a span{display:none}
 .journal-toggle{top:calc(121px + env(safe-area-inset-top,0px));left:50%;right:auto;transform:translateX(-50%);margin:0;white-space:nowrap;min-height:36px;padding:8px 15px}
 .story-copy,.room-copy{left:24px;right:24px;top:calc(170px + env(safe-area-inset-top,0px));width:auto;text-align:center}.room-copy{max-height:34svh}.story-copy .enter-link{justify-content:center}.room-copy .room-meta{justify-content:center}.room-copy .explore-room{display:inline-flex;align-items:center;justify-content:center}.room-copy .next-room{justify-content:center}
 .mobile-journey-arrows{position:fixed;z-index:28;bottom:calc(14px + env(safe-area-inset-bottom,0px));left:50%;transform:translateX(-50%);display:flex;align-items:center;justify-content:center;gap:18px;width:max-content;padding:6px 10px;border:1px solid #c4ad7755;background:#15243ae8;backdrop-filter:blur(0px);transition:opacity .5s ease}.mobile-journey-arrows button{width:48px;height:48px;min-height:48px;border:1px solid #c4ad77a0;background:#c4ad7715;color:#ecdcb6;font-size:24px;touch-action:manipulation;border-radius:50%;transition:transform .25s ease,background .25s ease}.mobile-journey-arrows button:active{transform:scale(.91);background:#c4ad7755}.mobile-journey-arrows>span{font-size:8px;letter-spacing:1.5px;color:#d9c694}
 body:has(dialog[open]) .mobile-journey-arrows{opacity:0;visibility:hidden;pointer-events:none}
 .model-controls,.model-focused .model-controls{left:24px;right:24px;width:auto;bottom:calc(90px + env(safe-area-inset-bottom,0px))}.model-controls>div{display:grid;grid-template-columns:1.3fr 48px 48px 1.3fr;justify-content:center;gap:8px}.model-controls button{font-size:11px;min-height:44px}
 body:not(.model-focused) #room-model-label,.model-focused #room-model-label{left:50%;right:auto;bottom:calc(145px + env(safe-area-inset-bottom,0px));width:250px;margin-left:-125px;text-align:center}.model-hitarea,.model-focused .model-hitarea{bottom:205px}
 #scene-tip{display:none}#bio-discovery-progress{bottom:calc(94px + env(safe-area-inset-bottom,0px))}
 body.in-bio-room .about-callout.callout-left,body.in-bio-room .about-callout.callout-right{left:24px!important;right:24px!important;top:calc(173px + env(safe-area-inset-top,0px));max-height:calc(100svh - 285px);text-align:center}
 #personal-callout-panel{left:16px;right:16px;top:calc(165px + env(safe-area-inset-top,0px));width:auto;max-height:calc(100svh - 265px);transform:translateY(8px)}#personal-callout-panel.is-entering{transform:translateY(0)}.personal-slide-controls{gap:20px}.personal-slide-controls button{min-width:44px;min-height:44px}
 .viewer-tools,.journal-actions,.overlay-pagination{justify-content:center;flex-wrap:wrap;gap:10px}.social-links{justify-content:center}.arrival-phone-note{display:block}.arrival-loading h1{margin-top:12px;margin-bottom:20px}.arrival-start h2{font-size:42px}.arrival-start p{font-size:12px}.arrival-start>img{width:230px;margin-bottom:20px}
}
@media(max-width:1024px) and (max-height:500px) and (pointer:coarse){.immersive .chapter-nav{top:55px;left:20%;right:20%;height:40px}.journal-toggle{top:auto;bottom:14px;left:16px;transform:none}.story-copy,.room-copy{left:24px;right:auto;top:100px;width:42%;max-height:calc(100svh - 190px)}.model-controls,.model-focused .model-controls{left:auto;right:24px;width:44%;bottom:90px}.arrival-start{padding:15px}.arrival-start>img{width:150px;margin-bottom:8px}.arrival-start h2{font-size:30px;margin:8px 0}.arrival-start .gold-button{margin-top:8px}.arrival-start .eyebrow{font-size:7px}}
@media(max-width:750px),(max-width:1024px) and (max-height:500px) and (pointer:coarse){.mobile-journey-arrows button:disabled{opacity:.45;cursor:wait}}

@media(max-width:750px),(max-width:1024px) and (max-height:500px) and (pointer:coarse){
 .floating-gallery-zone{height:auto;min-height:100svh;padding:160px 22px 110px;pointer-events:auto}.mobile-gallery-heading{display:block;text-align:center;margin-bottom:30px;color:#20334f}.mobile-gallery-heading .eyebrow{justify-content:center}.mobile-gallery-heading h2{font-size:40px;margin-top:16px}.mobile-gallery-heading p{font-size:12px;line-height:1.8;margin-top:16px}
 .gallery-accessible,.gallery-accessible:focus-within{position:relative!important;inset:auto!important;width:100%!important;height:auto!important;max-height:none;clip-path:none!important;overflow:visible!important;white-space:normal;padding:0!important;background:transparent;border:0;pointer-events:auto;display:flex!important;flex-direction:column!important;gap:24px!important}.gallery-row{display:contents!important}.gallery-card{width:100%!important;max-width:100%!important;flex:none!important;opacity:1!important;transform:none!important;background:#f2eee3e8;box-shadow:0 15px 45px #13243b24;border:1px solid #b6a16c99}.gallery-open{width:100%;text-align:left}.gallery-thumb{height:auto!important;aspect-ratio:4/3}.gallery-info{text-align:center}.gallery-room-link{display:block;width:max-content;margin:0 auto 24px}.gallery-only-label{display:block;text-align:center}.gallery-card button:active{transform:scale(.985)}
}

@media(max-width:750px),(max-width:1024px) and (max-height:500px) and (pointer:coarse){#personal-insights-prompt{bottom:calc(95px + env(safe-area-inset-bottom,0px));width:calc(100% - 44px);padding:13px 16px}#personal-insights-prompt p{font-size:11px}}

@media(max-width:750px),(max-width:1024px) and (max-height:500px) and (pointer:coarse){#personal-callout-panel.is-leaving{transform:translateY(8px)}.skills-symbol-row{gap:9px}.skill-symbol{width:53px}#award-lightbox>img{min-width:0;width:100%}}

/* Mobile scroll journey and concise exhibition labels. */
.room-description-mobile{display:none}
@media(max-width:750px),(max-width:1024px) and (max-height:500px) and (pointer:coarse){
 .mobile-journey-arrows,.immersive header #edit{display:none!important}
 #world canvas{touch-action:pan-y}
 .room-description-full{display:none}.room-description-mobile{display:inline}
 .room-copy,.story-copy[data-scene="farewell"]{left:24px!important;right:24px!important;width:auto!important;text-align:left!important}
 .room-copy .eyebrow,.story-copy[data-scene="farewell"] .eyebrow{justify-content:flex-start}
 .room-copy small,.room-copy .next-room{display:none!important}
 #room-model-label{display:none!important}
 .model-controls,.model-focused .model-controls{left:auto!important;right:14px!important;width:auto!important;bottom:calc(22px + env(safe-area-inset-bottom,0px))!important}
 .model-controls>div{display:flex;width:auto;gap:5px;justify-content:flex-end}
 .model-controls button{min-width:44px;min-height:44px;padding:8px;font-size:10px}
 .model-hitarea,.model-focused .model-hitarea{bottom:90px}
 .story-copy[data-scene="farewell"]{top:calc(145px + env(safe-area-inset-top,0px));height:calc(100svh - 170px - env(safe-area-inset-top,0px));overflow:visible}
 .story-copy[data-scene="farewell"] .final-social-links{position:absolute;left:0;right:0;bottom:calc(16px + env(safe-area-inset-bottom,0px));display:flex;flex-wrap:nowrap;justify-content:center;gap:18px;margin:0}
 #personal-insights-prompt{bottom:calc(24px + env(safe-area-inset-bottom,0px))}
 .gallery-card.mobile-pending{opacity:0!important;transform:translateY(22px)!important}
 .gallery-card{transition:opacity .7s ease,transform .7s ease}
}

@media(max-width:750px),(max-width:1024px) and (max-height:500px) and (pointer:coarse){
 #gallery-year-control{display:none!important}
 .immersive #work.floating-gallery-zone{margin-top:0;padding:90px 20px 70px;height:auto!important;min-height:100svh}
 #work #projects.gallery-accessible{position:relative!important;left:auto!important;right:auto!important;margin:0 auto!important;padding:0!important;width:100%!important;max-width:560px;align-items:stretch}
 #work .gallery-card{margin-left:auto;margin-right:auto}
 #work .timeline-year,#work .timeline-origin{text-align:center;width:100%}
 #work .timeline-year:before{display:none}
 .immersive #about.about{display:flex;flex-direction:column;align-items:stretch;gap:20px}
 #about>.eyebrow{order:0}#about>.monogram{order:1;padding:10px 0;width:100%;margin:0 auto;text-align:center}#about>div:not(.eyebrow):not(.monogram){order:2}
 #about>.monogram img{display:block;max-width:min(260px,80%);height:auto;margin:0 auto}
 #about h2{margin-top:0}
}

@media(max-width:750px),(max-width:1024px) and (max-height:500px) and (pointer:coarse){
 .immersive #work.floating-gallery-zone{padding-left:5px!important;padding-right:5px!important}
 #work #projects.gallery-accessible,#work #projects.gallery-accessible:focus-within{width:100%!important;max-width:none!important;padding:0!important;border:0!important;gap:12px!important}
 #work .timeline-origin,#work .timeline-year{display:none!important}
 #work .gallery-thumb{aspect-ratio:2.35/1!important}
}

@media(max-width:750px),(max-width:1024px) and (max-height:500px) and (pointer:coarse){
 #arrival-film{height:100svh;bottom:auto}
 #arrival-film .arrival-loading,#arrival-film .arrival-start{inset:0;min-height:0;height:100%;box-sizing:border-box;justify-content:center;align-items:center;padding:24px;text-align:center;gap:0}
 #arrival-film .arrival-loading-foot{position:static;bottom:auto;margin-top:28px;line-height:1.7;text-align:center}
 #arrival-film .arrival-loading .arrival-monogram,#arrival-film .arrival-start>img{flex-shrink:0;width:min(230px,65vw);height:auto;margin:0 0 20px}
 #arrival-film .arrival-loading h1{margin:0 0 26px;line-height:1.15}
 #arrival-film .arrival-start h2{margin:16px 0}
 #arrival-film .arrival-start .gold-button{margin-top:20px}
}

@media(max-width:750px),(max-width:1024px) and (max-height:500px) and (pointer:coarse){
 .immersive #work.floating-gallery-zone{margin-top:-100svh!important;padding-top:140px!important;opacity:var(--timeline-alpha,0)!important;transition:opacity .45s ease}
 #work #projects .gallery-card{opacity:1!important;transform:none!important;visibility:visible!important}
}

@media(max-width:750px),(max-width:1024px) and (max-height:500px) and (pointer:coarse){.immersive header .brand .brand-mark{width:min(235px,64vw);height:auto;max-height:58px}.immersive header .brand{flex-shrink:0}}

@media(max-width:750px),(max-width:1024px) and (max-height:500px) and (pointer:coarse){.room-copy .room-meta{justify-content:flex-start!important;text-align:left!important;margin-left:0!important;margin-right:0!important}.room-copy .room-meta span{flex:0 0 auto;text-align:left}}

@media(max-width:750px),(max-width:1024px) and (max-height:500px) and (pointer:coarse){#personal-callout-hotspots{transition:opacity .8s cubic-bezier(.4,0,.2,1)}#personal-callout-hotspots:not(.is-visible) .personal-hotspot{pointer-events:none}#personal-callout-hotspots .personal-hotspot{transition:opacity .7s ease,transform .7s ease,box-shadow .5s ease,visibility .7s ease}#personal-callout-panel{transition:opacity .65s ease,transform .65s ease}}

@media(max-width:750px),(max-width:1024px) and (max-height:500px) and (pointer:coarse){.immersive #work.floating-gallery-zone{opacity:1!important;transition:none!important}#work #projects .gallery-card{opacity:1!important;transition:transform .3s ease,box-shadow .3s ease!important}}

@media(max-width:750px),(max-width:1024px) and (max-height:500px) and (pointer:coarse){#personal-callout-hotspots .personal-hotspot{width:72px;height:72px}#personal-callout-hotspots .personal-hotspot svg{width:48%;height:48%}}

/* Centre the complete content group inside the visible, safe phone frame. */
@media(max-width:750px),(max-width:1024px) and (max-height:500px) and (pointer:coarse){
 #arrival-film{inset:auto;top:var(--arrival-top,0px);left:var(--arrival-left,0px);width:var(--arrival-width,100vw);height:var(--arrival-height,100dvh);box-sizing:border-box}
 #arrival-film .arrival-loading,#arrival-film .arrival-start{padding: max(18px,env(safe-area-inset-top)) max(22px,env(safe-area-inset-right)) max(18px,env(safe-area-inset-bottom)) max(22px,env(safe-area-inset-left));overflow-y:auto;justify-content:safe center}
 #arrival-film .arrival-loading .arrival-monogram,#arrival-film .arrival-start>img{width:min(230px,60vw,calc(var(--arrival-height,100dvh)*.32));max-height:calc(var(--arrival-height,100dvh)*.17);object-fit:contain;padding:0;margin:0 0 clamp(10px,2dvh,20px)}
 #arrival-film .arrival-loading h1,#arrival-film .arrival-start h2{font-size:clamp(25px,min(7.6vw,5.5dvh),40px);line-height:1.12;margin:clamp(8px,1.6dvh,16px) 0}
 #arrival-film .arrival-start p{font-size:clamp(11px,1.7dvh,13px);line-height:1.6;max-width:340px;margin:0 0 8px}
 #arrival-film .arrival-start .gold-button{flex-shrink:0;margin-top:clamp(10px,2dvh,20px);min-height:48px}
 #arrival-film .arrival-loading-foot{margin-top:clamp(14px,3dvh,28px)}
 #arrival-film .arrival-loading::before{inset:max(12px,env(safe-area-inset-top)) max(12px,env(safe-area-inset-right)) max(12px,env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left))}
}
