/* Phone screens use the visible browser area; the home screen is a pager, not a document. */
:root{--viewport-height:100dvh;--viewport-top:0px}
.hero-identity{display:contents}.mobile-portrait,.compact-label,.company-picker{display:none}
body[data-shell=phone]{--phone-top:42px;--phone-tabs:62px;--home-dock:90px;--safe-top:env(safe-area-inset-top,0px);--safe-bottom:env(safe-area-inset-bottom,0px);--safe-left:env(safe-area-inset-left,0px);--safe-right:env(safe-area-inset-right,0px)}
body[data-shell=phone] .menubar{top:var(--viewport-top);height:calc(var(--phone-top) + var(--safe-top));padding:var(--safe-top) max(16px,var(--safe-right)) 0 max(16px,var(--safe-left));gap:10px}
body[data-shell=phone] .menubar-right{gap:2px}body[data-shell=phone] .system-button{width:38px;height:38px;justify-content:center;padding:0}body[data-shell=phone] .menu-context{margin-left:8px}body[data-shell=phone] .menu-context time{font-size:10px}body[data-shell=phone] .os-brand{min-height:38px}body[data-shell=phone] .os-brand strong{font-size:12px}
body[data-shell=phone] .launcher{top:calc(var(--viewport-top) + var(--phone-top) + var(--safe-top));left:var(--safe-left);right:var(--safe-right);bottom:auto;height:calc(var(--viewport-height) - var(--phone-top) - var(--safe-top) - var(--home-dock) - var(--safe-bottom));padding:14px 0 8px;display:grid;grid-template-rows:auto minmax(0,1fr) 28px;gap:18px;overflow:hidden;overscroll-behavior:none;min-height:0}
body[data-shell=phone] .launcher-heading{padding:0 28px;margin:0;min-width:0}body[data-shell=phone] .launcher-heading .edition{font-size:8px;letter-spacing:.13em}body[data-shell=phone] .launcher-heading h1{font-size:clamp(29px,8.9vw,40px);line-height:1.05;margin:9px 0 7px;letter-spacing:-.055em}body[data-shell=phone] .launcher-legal{font:9px/1.5 var(--mono);margin:0;color:var(--muted)}body[data-shell=phone] .launcher-heading p{display:none}
body[data-shell=phone] .launch-swipe{margin:0 32px;min-height:0;overflow:hidden;touch-action:pinch-zoom;isolation:isolate}body[data-shell=phone] .launch-pages{height:100%;display:flex;gap:0;align-items:stretch}body[data-shell=phone] .launch-page{height:100%;display:flex;flex:0 0 100%;flex-direction:column;gap:24px;min-height:0;padding:0 0 4px;overflow:hidden}
body[data-shell=phone] .home-widgets{display:block;flex:0 1 185px;height:185px;max-height:min(185px,calc(100% - 100px));min-height:104px;margin:0;gap:0}body[data-shell=phone] .identity-widget{display:none}body[data-shell=phone] .build-widget{width:100%;height:100%;min-height:0;padding:20px 22px;border-radius:22px;justify-content:center}body[data-shell=phone] .build-widget small{font-size:8px}body[data-shell=phone] .build-widget strong{font-size:28px;margin:9px 0 7px}body[data-shell=phone] .build-widget>span:not(.widget-clover){font-size:12px;line-height:1.45;position:relative;z-index:1}body[data-shell=phone] .widget-clover{right:4px;bottom:-27px}body[data-shell=phone] .widget-clover .clover{width:125px;height:145px;opacity:.45}
body[data-shell=phone] .motto-widget{flex:0 1 185px;max-height:min(185px,calc(100% - 100px));height:185px;min-height:104px;width:100%;margin:0;padding:18px 22px;border-radius:22px;display:flex;flex-direction:column;justify-content:center}body[data-shell=phone] .motto-widget strong{font-size:clamp(27px,7.3vw,34px);line-height:1.05;margin:10px 0 0;letter-spacing:-.05em;overflow-wrap:normal}body[data-shell=phone] .motto-widget>span{display:none}body[data-shell=phone] .motto-widget>small{font-size:7px}body[data-shell=phone] .motto-widget>.clover{width:135px;height:150px;top:18px;right:-12px}
body[data-shell=phone] .launch-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;flex:0 0 auto}body[data-shell=phone] .launch-app{font-size:10px;line-height:1.25;gap:8px;min-height:76px;min-width:0;text-align:center;justify-content:flex-start}body[data-shell=phone] .launch-app>.app-tile{width:clamp(48px,13.6vw,58px);height:clamp(48px,13.6vw,58px);border-radius:16px}body[data-shell=phone] .launch-app .app-tile .icon{width:37px;height:37px}body[data-shell=phone] .launch-app>span:last-child{max-width:100%;overflow-wrap:normal}
body[data-shell=phone] .home-pages{display:flex;align-items:center;justify-content:center;gap:0;margin:0 auto;padding:0 4px;height:28px;background:#a78c9d15;border-radius:20px}body[data-shell=phone] .home-pages button{width:34px;height:28px}body[data-shell=phone] .home-pages button:after{top:11px;left:14px;width:6px;height:6px}body[data-shell=phone] .home-gesture-hint{display:none}
body[data-shell=phone] .app-dock{top:calc(var(--viewport-top) + var(--viewport-height) - 78px - var(--safe-bottom));bottom:auto;height:68px;max-width:calc(100% - var(--safe-left) - var(--safe-right) - 28px);width:358px;padding:8px 12px;gap:clamp(7px,2.5vw,12px);justify-content:space-around;border-radius:23px;transition:none}body[data-shell=phone] .dock-item{padding:0;min-width:0}body[data-shell=phone] .dock-item .app-tile{width:clamp(43px,12vw,50px);height:clamp(43px,12vw,50px);border-radius:14px}body[data-shell=phone] .dock-item .app-tile .icon{width:33px;height:33px}body[data-shell=phone] .dock-overview{display:flex}body[data-shell=phone] .dock-item.app-home,body[data-shell=phone] .dock-divider{display:none}body[data-shell=phone].app-open .app-dock{display:none}
/* App sheets get the full width and a single, thumb-friendly tab bar. */
body[data-shell=phone] .app-window,body[data-shell=phone] .app-window.maximized{position:fixed;top:calc(var(--viewport-top) + var(--phone-top) + var(--safe-top));left:var(--safe-left);right:var(--safe-right);bottom:auto;width:auto;height:calc(var(--viewport-height) - var(--phone-top) - var(--safe-top) - var(--phone-tabs) - var(--safe-bottom));max-width:none;margin:0;border:0;border-top:1px solid #aa97a238;border-radius:19px 19px 0 0;box-shadow:none;overflow:hidden;background:var(--paper)}
body[data-shell=phone] .window-titlebar{height:47px;border-radius:18px 18px 0 0;background:#e9e1d9;flex-shrink:0;padding:0 52px}body[data-shell=phone] .window-name{font-size:12px;max-width:100%;padding-top:8px;font-weight:600}body[data-shell=phone] .sheet-grip{top:0;height:18px;width:96px;left:calc(50% - 48px);padding:5px 25px}body[data-shell=phone] .sheet-grip>span{width:33px;height:3px}body[data-shell=phone] .mobile-apps{top:9px;right:9px;width:42px;height:36px;padding:0;font-size:21px;display:grid;place-items:center}body[data-shell=phone] .window-content{min-height:0;overflow-y:auto;overflow-x:hidden;scroll-padding:18px;overscroll-behavior-y:contain}
body[data-shell=phone] .mobile-navigation,body[data-shell=phone].app-open .mobile-navigation{position:fixed;top:calc(var(--viewport-top) + var(--viewport-height) - var(--phone-tabs) - var(--safe-bottom));bottom:auto;left:var(--safe-left);right:var(--safe-right);transform:none;width:auto;height:calc(var(--phone-tabs) + var(--safe-bottom));margin:0;padding:4px 7px calc(4px + var(--safe-bottom));display:grid;grid-template-columns:repeat(5,minmax(0,1fr));align-items:start;gap:0;background:#f3ecdfef;border:0;border-top:1px solid #bca5af40;border-radius:0;box-shadow:none;color:#86717f;backdrop-filter:blur(20px)}body[data-shell=phone].on-home .mobile-navigation{display:none}body[data-shell=phone] .mobile-navigation button{min-height:52px;width:100%;padding:5px 2px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;font-size:9px;line-height:1.1;font-weight:500;border-radius:8px;white-space:nowrap}body[data-shell=phone] .mobile-navigation button>.icon{width:25px;height:25px;color:#564451}body[data-shell=phone] .mobile-navigation .clover{width:21px;height:25px}body[data-shell=phone] .switcher-symbol{font-size:23px;line-height:25px;height:25px}body[data-shell=phone] .mobile-navigation button.active{color:#9f3d52;background:#a4475810}body[data-shell=phone] .mobile-navigation button.active>.icon{filter:drop-shadow(0 1px 2px #a3415340)}
/* Welcome leads with the person and the actions, with a smaller illustration below. */
body[data-shell=phone] .home-page{padding:22px 22px 0}body[data-shell=phone] .hero{display:block;min-height:0}body[data-shell=phone] .hero-copy .eyebrow{display:none}body[data-shell=phone] .hero-identity{display:grid;grid-template-columns:minmax(0,1fr) 80px;gap:14px;align-items:center;margin-bottom:13px}body[data-shell=phone] .hero h1{font-size:clamp(33px,9.4vw,42px);line-height:1.02;margin:0;letter-spacing:-.05em}body[data-shell=phone] .hero-greeting{font-size:14px;line-height:1.3;letter-spacing:-.01em;font-weight:450;display:block;margin-bottom:5px;color:var(--muted)}body[data-shell=phone] .mobile-portrait{display:block;width:80px;height:98px;object-fit:cover;object-position:50% 40%;border-radius:15px;border:1px solid #aa839b38;box-shadow:0 3px 10px #27172215}body[data-shell=phone] .hero-legal{font:10px/1.5 var(--mono);margin:0 0 20px;letter-spacing:-.025em}body[data-shell=phone] .hero .lead{font-size:14px;line-height:1.65;margin:0 0 15px;max-width:none}body[data-shell=phone] .hero .current-line{font-size:12px;line-height:1.6;margin:0 0 18px;max-width:none}body[data-shell=phone] .hero .button-row{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:0}body[data-shell=phone] .hero .button{padding:11px 10px;min-height:44px;gap:12px;font-size:12px;justify-content:center}body[data-shell=phone] .wide-label{display:none}body[data-shell=phone] .compact-label{display:inline}body[data-shell=phone] .hero-copy>.small-note{display:none}body[data-shell=phone] .hero-art{height:170px;min-height:0;margin:18px 0 0;display:flex;align-items:center;justify-content:center;overflow:hidden}body[data-shell=phone] .desk-art{width:260px;max-width:90%;height:170px;object-fit:contain;margin:0}body[data-shell=phone] .hero-art .portrait-card,body[data-shell=phone] .art-caption{display:none}body[data-shell=phone] .folder-shelf{margin-top:12px}body[data-shell=phone] .shelf-item{min-height:67px;padding:14px 0}body[data-shell=phone] .shelf-item strong{font-size:13px}body[data-shell=phone] .shelf-item small{font-size:10px;line-height:1.4}
/* Readable content and controls on small phone screens. */
body[data-shell=phone] .work-page,body[data-shell=phone] .story-page,body[data-shell=phone] .play-page{padding:25px 21px 30px}body[data-shell=phone] .page-heading{margin-bottom:22px}body[data-shell=phone] .page-heading h1{font-size:29px;line-height:1.1;margin:8px 0 12px}body[data-shell=phone] .page-heading p{font-size:13px;line-height:1.65}body[data-shell=phone] .page-heading .label{font-size:8px;line-height:1.6}body[data-shell=phone] .company-picker{display:block;margin:0 0 21px}body[data-shell=phone] .company-picker>span{display:block;font:8px/1.5 var(--mono);letter-spacing:.08em;color:var(--muted);margin-bottom:7px}body[data-shell=phone] .company-picker select{width:100%;height:46px;appearance:auto;padding:9px 13px;font-size:16px;border:1px solid var(--line-dark);border-radius:10px;background:var(--paper-raised);color:var(--ink)}body[data-shell=phone] .file-sidebar{display:none}body[data-shell=phone] .file-browser{display:block;min-height:0;border:0;background:none;overflow:visible}body[data-shell=phone] .project-detail{padding:0}body[data-shell=phone] .project-meta{font-size:9px;line-height:1.6;gap:10px}body[data-shell=phone] .project-detail h2{font-size:34px;margin:11px 0 7px}body[data-shell=phone] .project-role{font-size:11px;line-height:1.6;margin-bottom:21px}body[data-shell=phone] .project-detail>p:not(.project-role){font-size:14px;line-height:1.75}body[data-shell=phone] .project-detail .project-body{font-size:14px!important}body[data-shell=phone] .pipeline{margin-top:23px;border-radius:10px}body[data-shell=phone] .pipeline-top{padding:14px 12px}body[data-shell=phone] .pipeline-top strong{font-size:11px;line-height:1.5}body[data-shell=phone] .pipeline-steps button{min-height:52px;font-size:10px;line-height:1.2;padding:9px 2px}body[data-shell=phone] .pipeline-steps button span{display:block;margin-bottom:4px;font-size:8px}body[data-shell=phone] .pipeline-body{padding:16px;grid-template-columns:1fr;gap:16px}body[data-shell=phone] .pipeline-body p{font-size:12px;line-height:1.75}body[data-shell=phone] .pipeline-body small{font-size:10px;line-height:1.7}body[data-shell=phone] .sample-terminal code{font-size:10px;overflow-wrap:anywhere}body[data-shell=phone] .technical{font-size:12px}body[data-shell=phone] .technical summary{min-height:44px;align-items:center}body[data-shell=phone] .tech-strip{font-size:10px;line-height:1.7}body[data-shell=phone] .timeline-item p{font-size:13px;line-height:1.7}body[data-shell=phone] .timeline-item .text-link{display:inline-flex;align-items:center;min-height:40px;font-size:12px}body[data-shell=phone] .rooms-copy p,body[data-shell=phone] .game-card p{font-size:12px;line-height:1.65}body[data-shell=phone] .game-card h2{font-size:25px}body[data-shell=phone] .game-card>span:last-child{font-size:12px}body[data-shell=phone] .journey-note{padding:20px}body[data-shell=phone] .journey-note .button{min-height:44px}
/* Contact details stay close to the identity, rather than below a full-height photo. */
body[data-shell=phone] .contact-page{display:grid;grid-template-columns:minmax(0,1fr) 80px;gap:0 17px;padding:28px 23px 30px;align-items:start}body[data-shell=phone] .contact-portrait{width:80px;max-width:none;margin:0;grid-column:2;grid-row:1/3}body[data-shell=phone] .photo-frame{padding:4px;background:#e5d8c7;border-radius:12px;transform:rotate(3deg);box-shadow:3px 5px #27172212}body[data-shell=phone] .photo-frame img{aspect-ratio:4/5;border-radius:8px}body[data-shell=phone] .photo-frame>span,body[data-shell=phone] .location-stamp{display:none}body[data-shell=phone] .contact-copy{display:contents}body[data-shell=phone] .contact-copy>.label{display:none}body[data-shell=phone] .contact-copy h1{grid-column:1;grid-row:1;font-size:33px;line-height:1.02;margin:2px 0 10px}body[data-shell=phone] .contact-copy .legal{grid-column:1;grid-row:2;font:9px/1.6 var(--mono);margin:0 0 22px}body[data-shell=phone] .contact-copy .lead{grid-column:1/-1;font-size:14px;line-height:1.7;margin:9px 0 0}body[data-shell=phone] .contact-list{grid-column:1/-1;margin:24px 0 12px}body[data-shell=phone] .contact-list>a{min-height:72px;padding:14px 0;font-size:14px}body[data-shell=phone] .contact-list small{font-size:11px;overflow-wrap:anywhere}body[data-shell=phone] .copy-email{grid-column:1/-1;justify-self:start;min-height:42px;font-size:12px!important}body[data-shell=phone] .channel-note{grid-column:1/-1;margin:20px 0 0;font-size:12px;padding:17px;border-radius:10px}body[data-shell=phone] .channel-note a{padding:5px 0}
/* App overview is height-aware; shorter screens use a compact list. */
body[data-shell=phone] #app-switcher{position:fixed;top:calc(var(--viewport-top) + var(--safe-top) + 30px);bottom:auto;left:max(8px,var(--safe-left));right:max(8px,var(--safe-right));width:auto;height:calc(var(--viewport-height) - var(--safe-top) - var(--safe-bottom) - 44px);max-height:none;margin:0;border-radius:24px;padding:20px 0 14px;overflow:hidden}body[data-shell=phone] #app-switcher[open]{display:grid;grid-template-rows:auto minmax(0,1fr) auto}body[data-shell=phone] .switcher-heading{padding:0 21px;margin:0}body[data-shell=phone] .switcher-heading h2{font-size:25px;line-height:1.1}body[data-shell=phone] .switcher-done{min-height:42px;padding:10px 14px;font-size:12px}body[data-shell=phone] .switcher-cards{height:auto;min-height:0;padding:22px 27px 14px;align-items:center;gap:17px}body[data-shell=phone] .recent-card{flex-basis:calc(100vw - 92px)}body[data-shell=phone] .recent-name{font-size:12px;padding:0 5px 12px}body[data-shell=phone] .recent-name button{width:40px;height:40px;font-size:24px}body[data-shell=phone] .recent-preview{height:clamp(220px,calc(var(--viewport-height) - 310px),370px);min-height:0;padding:0 22px 22px}body[data-shell=phone] .recent-preview>strong{font-size:27px}body[data-shell=phone] .recent-preview>span:not(.mini-titlebar,.mini-app-icon,.mini-lines){font-size:12px}body[data-shell=phone] .switcher-help{font-size:11px;line-height:1.5;margin:8px 0 0;padding:0 23px}body[data-shell=phone] .no-apps{padding:15px 5px}body[data-shell=phone] .no-apps button{min-height:44px}
body[data-shell=phone] #search-dialog{position:fixed;top:calc(var(--viewport-top) + var(--safe-top) + 10px);bottom:auto;margin:0 auto;max-height:calc(var(--viewport-height) - var(--safe-top) - 20px);width:calc(100% - var(--safe-left) - var(--safe-right) - 20px);border-radius:18px}body[data-shell=phone] .search-field{padding:11px 15px}body[data-shell=phone] .search-field input{font-size:16px}body[data-shell=phone] .search-field button{min-width:36px;min-height:36px}body[data-shell=phone] #search-results{max-height:calc(var(--viewport-height) - var(--safe-top) - 136px)}body[data-shell=phone] #search-results button{min-height:56px}
/* Both palettes share exactly the same geometry. */
body.night[data-shell=phone] .app-window{border-color:#60526340!important}body.night[data-shell=phone] .mobile-navigation,body.night[data-shell=phone].app-open .mobile-navigation{background:#26232deF;border-color:#70627345;box-shadow:none;color:#a997ac}body.night[data-shell=phone] .mobile-navigation button.active{color:#e7a6ba;background:#d99ab812}body.night[data-shell=phone] .mobile-navigation button>.icon{color:#493744}body.night[data-shell=phone] .mobile-portrait{border-color:#bfa0b540}body.night[data-shell=phone] .company-picker select{background:#302a35;border-color:#69586b}body.night[data-shell=phone] .photo-frame{background:#bba99e}
/* Small portrait screens, including browser bars taking up part of an iPhone screen. */
@media(max-height:720px){body[data-shell=phone] .launcher{gap:13px;padding-top:8px}body[data-shell=phone] .launcher-heading h1{font-size:31px;margin-top:6px}body[data-shell=phone] .launcher-heading .edition{display:none}body[data-shell=phone] .home-widgets,body[data-shell=phone] .motto-widget{max-height:min(155px,calc(100% - 100px))}body[data-shell=phone] .launch-page{gap:19px}body[data-shell=phone] .build-widget{padding:15px 20px}body[data-shell=phone] .build-widget strong{font-size:26px;margin:7px 0 5px}body[data-shell=phone] .motto-widget strong{font-size:29px}body[data-shell=phone] .hero-art{height:145px}body[data-shell=phone] .desk-art{height:145px}}
@media(max-width:350px){body[data-shell=phone] .launcher-heading{padding:0 25px}body[data-shell=phone] .launcher-heading h1{font-size:29px}body[data-shell=phone] .launcher-legal{font-size:8px}body[data-shell=phone] .home-page{padding:20px 20px 0}body[data-shell=phone] .hero-identity{grid-template-columns:minmax(0,1fr) 70px;gap:12px}body[data-shell=phone] .mobile-portrait{width:70px;height:91px}body[data-shell=phone] .hero h1{font-size:34px}body[data-shell=phone] .hero-legal{font-size:9px;margin-bottom:18px}body[data-shell=phone] .hero .button{font-size:11px;gap:8px}body[data-shell=phone] .launch-app{font-size:9px}body[data-shell=phone] .launch-grid{gap:9px}body[data-shell=phone] .launch-app>.app-tile{width:48px;height:48px}body[data-shell=phone] .motto-widget{padding:16px 18px}body[data-shell=phone] .motto-widget strong{font-size:27px}body[data-shell=phone] .build-widget>span:not(.widget-clover){font-size:11px}body[data-shell=phone] .contact-page{grid-template-columns:minmax(0,1fr) 70px;gap:0 14px;padding:25px 20px}body[data-shell=phone] .contact-portrait{width:70px}body[data-shell=phone] .contact-copy h1{font-size:30px}body[data-shell=phone] .work-page,body[data-shell=phone] .story-page,body[data-shell=phone] .play-page{padding-inline:20px}body[data-shell=phone] .pipeline-steps button{font-size:9px}}
@media(max-height:600px){body[data-shell=phone] #app-switcher{padding-top:15px}body[data-shell=phone] .switcher-cards{display:block;overflow-y:auto;overflow-x:hidden;padding:14px 18px;touch-action:pan-y pinch-zoom;scroll-snap-type:none}body[data-shell=phone] .recent-card{position:relative;margin:0 0 10px;border:1px solid var(--line);border-radius:13px;background:var(--paper-raised);touch-action:pan-y pinch-zoom}body[data-shell=phone] .recent-name{position:absolute;inset:0 0 auto;justify-content:flex-end;padding:0;pointer-events:none;height:74px}body[data-shell=phone] .recent-name>.icon,body[data-shell=phone] .recent-name>strong{display:none}body[data-shell=phone] .recent-name button{margin:0 9px 0 0;pointer-events:auto;z-index:1;color:var(--ink)}body[data-shell=phone] .recent-preview{height:74px;min-height:74px;width:100%;border:0;border-radius:13px;padding:12px 57px 12px 16px;background:none;box-shadow:none;display:grid;grid-template-columns:40px 1fr;grid-template-rows:auto auto;column-gap:13px;align-items:center;color:var(--ink);touch-action:pan-y pinch-zoom}body[data-shell=phone] .mini-titlebar,body[data-shell=phone] .mini-lines,body[data-shell=phone] .recent-preview>b{display:none}body[data-shell=phone] .mini-app-icon{grid-column:1;grid-row:1/3}body[data-shell=phone] .mini-app-icon .icon{width:35px;height:35px}body[data-shell=phone] .recent-preview>strong{grid-column:2;font-size:17px;margin:0;line-height:1.2}body[data-shell=phone] .recent-preview>span:not(.mini-titlebar,.mini-app-icon,.mini-lines){grid-column:2;font-size:10px;line-height:1.3;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:100%;color:var(--muted)}body[data-shell=phone] .switcher-heading h2{font-size:22px}body[data-shell=phone] .switcher-help{font-size:10px}}
/* A landscape phone is still a phone: side-by-side widget and icons, with no vertical pan. */
@media(orientation:landscape) and (max-height:500px){body[data-shell=phone]{--phone-top:34px;--phone-tabs:52px;--home-dock:69px}body[data-shell=phone] .menubar{padding-inline:max(18px,var(--safe-left)) max(18px,var(--safe-right))}body[data-shell=phone] .system-button{height:32px;width:36px}body[data-shell=phone] .os-brand{min-height:32px}body[data-shell=phone] .launcher{grid-template-columns:minmax(155px,.7fr) minmax(0,2fr);grid-template-rows:minmax(0,1fr) 20px;column-gap:18px;row-gap:3px;padding:5px 24px 0}body[data-shell=phone] .launcher-heading{grid-column:1;grid-row:1/3;align-self:center;padding:0;margin:0}body[data-shell=phone] .launcher-heading h1{font-size:30px;line-height:1.05;margin:0 0 10px}body[data-shell=phone] .launcher-heading .edition{display:none}body[data-shell=phone] .launcher-legal{font-size:9px;line-height:1.7}body[data-shell=phone] .launch-swipe{grid-column:2;grid-row:1;margin:0;align-self:stretch}body[data-shell=phone] .home-pages{grid-column:2;grid-row:2;height:20px}body[data-shell=phone] .home-pages button{height:20px}body[data-shell=phone] .home-pages button:after{top:7px}body[data-shell=phone] .launch-page{display:grid;grid-template-columns:minmax(125px,1fr) minmax(160px,1fr);grid-template-rows:1fr;align-items:center;gap:16px;height:100%;padding:0 2px}body[data-shell=phone] .home-widgets,body[data-shell=phone] .motto-widget{height:100%;min-height:0;max-height:165px;max-width:100%;margin:0;flex:none}body[data-shell=phone] .build-widget{height:100%;padding:15px;min-height:0;border-radius:17px}body[data-shell=phone] .build-widget small{font-size:7px}body[data-shell=phone] .build-widget strong{font-size:25px}body[data-shell=phone] .build-widget>span:not(.widget-clover){font-size:10px;line-height:1.4}body[data-shell=phone] .widget-clover{right:-45px}body[data-shell=phone] .motto-widget{padding:16px;border-radius:17px}body[data-shell=phone] .motto-widget strong{font-size:26px;margin-top:7px}body[data-shell=phone] .motto-widget>small{font-size:6px}body[data-shell=phone] .launch-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px 15px;align-items:center}body[data-shell=phone] .launch-app{min-height:53px;gap:4px;font-size:9px}body[data-shell=phone] .launch-app>.app-tile{width:min(42px,11vh);height:min(42px,11vh);border-radius:11px}body[data-shell=phone] .launch-app .app-tile .icon{width:27px;height:27px}body[data-shell=phone] .app-dock{top:calc(var(--viewport-top) + var(--viewport-height) - 60px - var(--safe-bottom));height:54px;width:300px;padding:5px 12px;border-radius:18px}body[data-shell=phone] .dock-item .app-tile{width:39px;height:39px;border-radius:11px}body[data-shell=phone] .dock-item .app-tile .icon{width:27px;height:27px}body[data-shell=phone] .mobile-navigation button{min-height:44px;flex-direction:row;gap:8px;font-size:10px}body[data-shell=phone] .mobile-navigation button>.icon,body[data-shell=phone] .mobile-navigation .clover{width:22px;height:22px}body[data-shell=phone] .window-titlebar{height:40px}body[data-shell=phone] .window-name{padding-top:6px}body[data-shell=phone] .mobile-apps{top:6px;height:31px}body[data-shell=phone] .home-page{padding:20px 28px 0}body[data-shell=phone] .hero{display:grid;grid-template-columns:minmax(0,1.3fr) minmax(0,1fr);gap:25px;align-items:center}body[data-shell=phone] .hero-art{height:210px;margin:0}body[data-shell=phone] .desk-art{height:210px;width:100%;max-width:100%}body[data-shell=phone] .mobile-portrait{display:none}body[data-shell=phone] .hero-identity{display:block}body[data-shell=phone] .hero h1{font-size:36px}body[data-shell=phone] .hero h1 br{display:none}body[data-shell=phone] .hero h1 .marked{margin-left:.15em}body[data-shell=phone] .hero .lead{font-size:13px}body[data-shell=phone] .hero .button{font-size:11px}body[data-shell=phone] .switcher-cards{display:grid;grid-template-columns:1fr 1fr;gap:10px;align-content:start}body[data-shell=phone] .recent-card{margin:0}body[data-shell=phone] .recent-preview{min-height:68px;height:68px}body[data-shell=phone] .recent-name{height:68px}body[data-shell=phone] .switcher-help{margin-top:4px}body[data-shell=phone] #app-switcher{top:calc(var(--viewport-top) + var(--safe-top) + 8px);height:calc(var(--viewport-height) - var(--safe-top) - var(--safe-bottom) - 16px)}body[data-shell=phone] .contact-page{grid-template-columns:minmax(0,1fr) 80px;max-width:650px;margin:auto}body[data-shell=phone] .game-cards{grid-template-columns:repeat(3,minmax(0,1fr))}body[data-shell=phone] .game-card{display:block;min-width:0}}
/* iPad home fits all eight apps on one screen, including landscape. */
body[data-shell=tablet] .launcher{top:calc(var(--viewport-top) + 49px + env(safe-area-inset-top,0px));bottom:auto;left:max(24px,env(safe-area-inset-left,0px));right:max(24px,env(safe-area-inset-right,0px));height:calc(var(--viewport-height) - 147px - env(safe-area-inset-top,0px) - env(safe-area-inset-bottom,0px));overflow:hidden;padding:14px 24px 12px;display:grid;grid-template-rows:auto minmax(0,1fr);gap:28px}
body[data-shell=tablet] .launcher-heading{margin:0;padding:0}body[data-shell=tablet] .launcher-heading h1{font-size:43px;margin:11px 0 10px}body[data-shell=tablet] .launcher-heading p{display:none}body[data-shell=tablet] .launcher-legal{font-size:10px;margin:0}body[data-shell=tablet] .launch-swipe{min-height:0;overflow:hidden}body[data-shell=tablet] .launch-pages{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));height:100%;gap:26px;transform:none!important}body[data-shell=tablet] .launch-page{display:flex;flex-direction:column;gap:22px;min-height:0;padding:0;align-items:stretch}body[data-shell=tablet] .home-widgets{display:block;margin:0;height:160px;min-height:125px;max-height:calc(100% - 104px)}body[data-shell=tablet] .identity-widget{width:100%;height:100%;min-height:0;padding:21px;gap:16px}body[data-shell=tablet] .identity-widget strong{font-size:28px}body[data-shell=tablet] .motto-widget{height:160px;min-height:125px;max-height:calc(100% - 104px);margin:0;padding:22px}body[data-shell=tablet] .motto-widget strong{font-size:30px;margin:12px 0 0}body[data-shell=tablet] .motto-widget>span{display:none}body[data-shell=tablet] .launch-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}body[data-shell=tablet] .launch-app{font-size:10px;min-height:80px;gap:8px}body[data-shell=tablet] .launch-app .app-tile{width:clamp(46px,5.8vw,62px);height:clamp(46px,5.8vw,62px);border-radius:16px}body[data-shell=tablet] .launch-app .app-tile .icon{width:36px;height:36px}body[data-shell=tablet] .app-dock{top:calc(var(--viewport-top) + var(--viewport-height) - 90px - env(safe-area-inset-bottom,0px));bottom:auto;height:76px}body[data-shell=tablet] .app-window,body[data-shell=tablet] .app-window.maximized{top:calc(var(--viewport-top) + 56px + env(safe-area-inset-top,0px));bottom:auto;height:calc(var(--viewport-height) - 157px - env(safe-area-inset-top,0px) - env(safe-area-inset-bottom,0px));left:4%;right:4%;width:auto;border-radius:20px}
@media(max-width:700px){body[data-shell=tablet] .launcher{padding-inline:12px;gap:22px}body[data-shell=tablet] .launch-pages{gap:20px}body[data-shell=tablet] .identity-widget{padding:14px;gap:12px}body[data-shell=tablet] .identity-widget strong{font-size:24px}body[data-shell=tablet] .widget-photo img{width:58px;height:72px}body[data-shell=tablet] .motto-widget{padding:17px}body[data-shell=tablet] .motto-widget strong{font-size:28px}body[data-shell=tablet] .launch-app{font-size:9px}body[data-shell=tablet] .launch-app .app-tile .icon{width:31px;height:31px}}
@media(max-height:700px){body[data-shell=tablet] .launcher{gap:18px;padding-top:8px}body[data-shell=tablet] .launcher-heading .edition{display:none}body[data-shell=tablet] .launcher-heading h1{font-size:36px;margin-top:0}body[data-shell=tablet] .home-widgets,body[data-shell=tablet] .motto-widget{height:135px;min-height:115px}body[data-shell=tablet] .motto-widget strong{font-size:28px}}
body[data-shell=phone] .arcade,body[data-shell=phone] .world{position:fixed;top:calc(var(--viewport-top) + env(safe-area-inset-top,0px) + 8px);bottom:auto;width:calc(100% - env(safe-area-inset-left,0px) - env(safe-area-inset-right,0px) - 16px);max-height:calc(var(--viewport-height) - env(safe-area-inset-top,0px) - env(safe-area-inset-bottom,0px) - 16px);margin:0 auto;border-radius:18px;overscroll-behavior:contain}body[data-shell=phone] .arcade .arcade-close,body[data-shell=phone] .world .world-top-actions #closeWorld{width:36px;height:36px;position:relative;flex-shrink:0}body[data-shell=phone] .arcade .arcade-close:after,body[data-shell=phone] .world .world-top-actions #closeWorld:after{content:'';position:absolute;inset:-4px}body[data-shell=phone] .arcade .sound-toggle,body[data-shell=phone] .world #worldSound{min-height:36px}body[data-shell=phone] .world .world-controller{flex-wrap:wrap;gap:14px}body[data-shell=phone] .world-chapterbar{flex-wrap:wrap;gap:0 12px}body[data-shell=phone] .arcade .game-primary,body[data-shell=phone] .arcade .game-secondary{min-height:44px}body[data-shell=phone] .world-chapterbar button{min-height:40px}

/* Keep the board and touch controls visible together on portrait phones. */
@media(orientation:portrait){
body[data-shell=phone] .arcade-head{min-height:50px;padding:7px 14px;gap:10px}
body[data-shell=phone] .arcade-head-actions{gap:10px}
body[data-shell=phone] .arcade-tabs{padding:6px 12px 0;gap:5px}
body[data-shell=phone] .arcade-tabs button{min-height:44px;padding:7px 5px;font-size:11px;gap:2px}
body[data-shell=phone] .arcade-tabs button span{font-size:8px}
body[data-shell=phone] .arcade :is(#snakeView,#stackView){display:grid;grid-template-columns:minmax(0,1fr) 140px;gap:10px;padding:12px}
body[data-shell=phone] :is(#snakeView,#stackView) .game-heading{grid-column:1/-1;grid-row:auto;display:flex;flex-direction:row;margin:0;gap:12px}
body[data-shell=phone] :is(#snakeView,#stackView) .game-heading h2{font-size:25px;margin:0 0 4px}
body[data-shell=phone] :is(#snakeView,#stackView) .game-heading p{font-size:11px;line-height:1.4;max-width:none}
body[data-shell=phone] :is(#snakeView,#stackView) .game-era{font-size:9px}
body[data-shell=phone] :is(#snakeView,#stackView) .game-meta{grid-column:1/-1;grid-row:auto;margin:0;max-width:none;padding:6px 10px;font-size:9px}
body[data-shell=phone] :is(#snakeView,#stackView) .canvas-wrap{grid-column:1/-1;grid-row:auto;width:100%;max-width:min(330px,max(160px,calc(var(--viewport-height) - 410px - env(safe-area-inset-top,0px) - env(safe-area-inset-bottom,0px))));padding:4px}
body[data-shell=phone] :is(#snakeView,#stackView) .game-controls{grid-column:1;grid-row:auto;flex-direction:column;align-items:stretch;justify-content:center;gap:6px}
body[data-shell=phone] #stackView .game-controls{grid-column:1/-1;flex-direction:row;flex-wrap:wrap}
body[data-shell=phone] :is(#snakeView,#stackView) .direction-pad{grid-column:2;grid-row:auto;display:grid;grid-template-columns:repeat(3,44px);grid-template-rows:repeat(2,44px);gap:4px;margin:0;justify-content:end}
body[data-shell=phone] :is(#snakeView,#stackView) .game-help{grid-column:1/-1;grid-row:auto;margin:0;padding:10px 2px 0;font-size:11px;line-height:1.6;min-height:0}
body[data-shell=phone] .arcade-foot{display:none}
}
@media(orientation:portrait) and (max-height:650px){body[data-shell=phone] :is(#snakeView,#stackView) .game-heading p{display:none}body[data-shell=phone] :is(#snakeView,#stackView) .game-heading h2{font-size:22px;margin:0}body[data-shell=phone] .arcade :is(#snakeView,#stackView){gap:8px;padding:10px 12px}}

/* Fluid type follows the widget width, including very short landscape screens. */
.motto-widget strong>span{display:block}
body:is([data-shell=phone],[data-shell=tablet]) .motto-widget{container-type:inline-size}
body:is([data-shell=phone],[data-shell=tablet]) .motto-widget strong{width:100%;min-width:0;font-size:clamp(12px,13cqw,34px);line-height:1.08;letter-spacing:-.05em;overflow-wrap:normal}
body:is([data-shell=phone],[data-shell=tablet]) .motto-widget strong>span{white-space:nowrap}
/* Preserve the entire illustration. Portrait screens have their own composition. */
body:is([data-shell=phone],[data-shell=tablet]) .desktop-background{background-color:#eee7d8;background-size:contain;background-position:center}
body.night:is([data-shell=phone],[data-shell=tablet]) .desktop-background{background-color:#17181d}
@media(orientation:portrait){
body:is([data-shell=phone],[data-shell=tablet]) .desktop-background{top:var(--viewport-top);bottom:auto;height:var(--viewport-height);background-image:radial-gradient(#7f72781c .6px,transparent .6px);background-size:13px 17px}
body:is([data-shell=phone],[data-shell=tablet]) .desktop-background:after{content:'';position:absolute;left:0;right:0;bottom:calc(85px + env(safe-area-inset-bottom,0px));height:clamp(110px,calc(var(--viewport-height) - 450px - env(safe-area-inset-top,0px) - env(safe-area-inset-bottom,0px)),350px);background:url('assets/asta-wallpaper-compact.svg') center bottom / contain no-repeat;pointer-events:none}
body.night:is([data-shell=phone],[data-shell=tablet]) .desktop-background:after{background-image:url('assets/asta-wallpaper-compact-night.svg')}
body[data-shell=tablet] .desktop-background:after{bottom:100px;height:clamp(200px,calc(var(--viewport-height) - 470px),450px)}
}
