/* Handheld layouts keep the original CarPlay assets, without shrinking a desktop screen. */
.resume-mobile-actions{display:none}
@media(max-width:900px), (max-width:1100px) and (max-height:550px){
 html{-webkit-text-size-adjust:100%;text-size-adjust:100%}
 body{align-items:flex-start;padding:calc(8px + env(safe-area-inset-top)) calc(8px + env(safe-area-inset-right)) calc(8px + env(safe-area-inset-bottom)) calc(8px + env(safe-area-inset-left))}
 .device-wrap{width:100%;min-width:0}
 .device{padding:6px;border-radius:24px;box-shadow:0 12px 35px #0005,0 0 0 1px #08080b}
 .screen{aspect-ratio:auto;min-height:0;max-height:none;height:calc(100svh - 96px - env(safe-area-inset-top) - env(safe-area-inset-bottom));height:calc(100dvh - 96px - env(safe-area-inset-top) - env(safe-area-inset-bottom));border-radius:18px}
 .carplay-viewport{width:100%;height:100%;border-radius:18px;transform:none;font-size:16px}
 .content{width:auto;height:100%;min-width:0;min-height:0}
 .view{min-width:0;min-height:0}
 .sidebar{width:60px;flex-basis:60px;padding:14px 0 12px}
 .status time{font-size:17px}
 .dock{top:50%;left:8px;gap:12px;transform:translateY(-50%)}
 .dock-button{width:44px;height:44px;display:grid;place-items:center}
 .dock .app-icon{width:39px;height:39px}
 .dock-button[aria-current=true]::after{inset:-2px;border-width:2px;border-radius:12px}
 .home-button{left:8px;bottom:12px;width:44px;height:44px;display:grid;place-items:center}
 .under-device{display:block;text-align:center;padding:6px 0 0;line-height:16px;font-size:11px}
 .under-device>span{display:block}
 .under-links{justify-content:center;gap:8px;height:44px}
 .under-links button{min-height:44px;min-width:44px;padding:0 9px;font-size:12px}

 /* Fixed navigation, scrolling content, and generous invisible hit areas. */
 .home-view{padding:16px 10px 0}
 .app-grid{flex:1;min-height:0;min-width:0;height:auto;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;touch-action:pan-y;grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:none;grid-auto-rows:104px;align-content:start;gap:10px 8px;padding:2px 2px 8px;scrollbar-width:thin}
 .app-button{min-width:0;min-height:96px;gap:8px}
 .app-label{max-width:100%;height:auto;min-height:24px;font-size:12px;line-height:18px;padding:3px 6px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
 .page-dots{height:44px;flex:0 0 44px;gap:0;margin:0}
 .page-dot{width:44px;height:44px;min-width:44px;min-height:44px;background:transparent;display:grid;place-items:center;border-radius:10px}
 .page-dot::after{content:"";width:7px;height:7px;border-radius:50%;background:#ffffff70}
 .page-dot.active{background:transparent}
 .page-dot.active::after{background:#fff}
 .page-dot:hover{box-shadow:none;background:#ffffff0d}
 .scroll,.music-player,.music-playlists,.pm-inbox-list,.pm-thread{min-width:0;min-height:0;overflow-y:auto;overflow-x:hidden;-webkit-overflow-scrolling:touch}
 .app-header{grid-template-columns:58px minmax(0,1fr) auto;height:56px;flex-basis:56px;gap:4px;padding:0 10px;font-size:18px;letter-spacing:-.3px}
 .app-header>span{min-width:0}
 .back{min-height:44px;font-size:14px;padding:0;gap:3px}
 .back>span{font-size:27px}
 .header-action{min-width:0;font-size:13px;max-width:76px}
 .header-action a{display:flex;align-items:center;min-height:44px}
 .tabs{height:56px;flex-basis:56px;padding:6px 8px;gap:4px}
 .tabs button{min-width:0;min-height:44px;padding:8px 4px;font-size:13px;white-space:nowrap}
 .list{padding:10px}
 .list-row{min-width:0;padding:12px;gap:10px;min-height:88px}
 .list-row .row-title{font-size:17px;line-height:22px;white-space:normal;overflow-wrap:anywhere}
 .list-row .row-sub{font-size:13px;line-height:18px;white-space:normal;overflow-wrap:anywhere}
 .detail{padding:20px 16px 28px}
 .detail h1{font-size:25px;line-height:1.15;letter-spacing:-.7px;overflow-wrap:anywhere}
 .detail h2{font-size:21px}
 .detail p,.detail ul{font-size:16px;line-height:1.55}
 .detail p.lead{font-size:17px;line-height:1.5}
 .experience-title{min-width:0;flex-wrap:wrap}
 .experience-title>div{min-width:0;flex:1 1 145px}
 .blue-button{min-height:44px;max-width:100%;text-align:center}
 .pill{max-width:100%;overflow-wrap:anywhere}
 .project-art{height:130px;font-size:38px}
 .contact-top{padding:20px 14px;flex-wrap:wrap;gap:12px}
 .contact-top>div:last-child{min-width:0;flex:1 1 130px}
 .contact-top h1{font-size:22px;overflow-wrap:anywhere}
 .contact-actions{padding:14px 10px;gap:6px}
 .contact-actions a,.contact-actions button{min-width:0;min-height:72px;padding:12px 4px;font-size:12px}
 .contact-field{padding:16px 14px;overflow-wrap:anywhere}
 .setting-row{width:100%;padding:14px 12px;gap:10px;min-height:64px;font-size:15px}
 .setting-row>span:first-child{min-width:0;flex:1}
 .toggle{position:relative;width:53px;height:44px;padding:9px 3px;flex:none;background:transparent}
 .toggle::before{content:"";position:absolute;inset:6px 0;background:#55555d;border-radius:16px}
 .toggle[aria-checked=true]{background:transparent}
 .toggle[aria-checked=true]::before{background:#30d158}
 .toggle i{position:relative;z-index:1}
 .speed-options{flex-wrap:wrap;justify-content:flex-end;gap:3px}
 .speed-options button{min-width:44px;min-height:44px;padding:6px;font-size:12px}
 .setting-row:has(.speed-options){flex-wrap:wrap}
 .resume-mobile-actions{display:flex;flex:none;padding:0 14px;border-bottom:1px solid var(--line);background:var(--surface)}
 .resume-mobile-actions a{display:flex;align-items:center;justify-content:space-between;width:100%;min-height:48px;font-size:15px;color:var(--blue)}
 .resume-mobile-actions .chevron-text{font-size:23px}

 /* Dashboard cards use normal flow, so metadata cannot collide with playback. */
 .dashboard-view{padding:8px;grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(130px,1fr) 64px 166px;gap:8px;overflow-y:auto}
 .dash-map{min-width:0;min-height:130px}
 .dash-destinations{padding:4px;min-width:0}
 .dash-destinations button{min-width:0;min-height:44px;flex-direction:row;gap:6px;padding:0}
 .dash-destinations button strong{font-size:14px;line-height:18px}
 .shortcut-icon,.shortcut-icon.work{width:32px;height:32px}
 .shortcut-icon img{width:90px;height:90px;transform:scale(.3555555556)}
 .dash-music{padding:10px 12px;display:grid;grid-template-rows:minmax(0,1fr) 3px 44px;gap:8px;min-width:0;align-items:center}
 .dash-now{position:static;width:100%;margin:0;display:grid;grid-template-columns:50px minmax(0,1fr);grid-template-rows:1fr 1fr;column-gap:10px;align-items:center;text-align:left;min-width:0;height:100%}
 .dash-now .app-icon{grid-column:1;grid-row:1/3;width:50px;height:50px;border-radius:8px;margin:0;--native-scale:.2777777778}
 .dash-now strong{grid-column:2;grid-row:1;text-align:left;font-size:16px;line-height:20px;align-self:end;min-width:0}
 .dash-now>span:last-child{grid-column:2;grid-row:2;text-align:left;font-size:13px;line-height:18px;margin:2px 0 0;align-self:start;min-width:0}
 .dash-seek{position:static;width:100%;height:3px}
 .dash-music .transport{position:static;width:100%;height:44px;margin:0;gap:0;justify-content:space-around}
 .dash-music .transport button,.music-player .transport button{width:48px;height:44px;min-width:48px;min-height:44px}
 .dash-map .drive-guidance{left:8px;right:8px;top:8px;max-width:none;padding:9px 10px;gap:8px}
 .dash-map .drive-guidance>div{min-width:0}
 .dash-map .drive-guidance strong{font-size:15px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
 .dash-map .drive-guidance span:not(.direction-glyph){font-size:12px}
 .dash-trip{left:8px;right:8px;bottom:22px;padding:7px}
 .drive-metrics{grid-template-columns:repeat(3,minmax(0,1fr));gap:4px}
 .drive-metrics strong{font-size:14px;line-height:19px;letter-spacing:-.3px}
 .drive-metrics span{font-size:10px;line-height:13px}

 /* Full Maps keeps guidance, route metrics and controls in separate areas. */
 .destinations-button{top:8px;left:8px;right:8px;height:44px;min-height:44px;padding:8px 12px;font-size:17px}
 .parked-card,.road-map-view .drive-guidance{top:68px;left:8px;right:60px;width:auto;min-width:0;max-width:none;padding:10px;gap:8px}
 .road-map-view .drive-guidance>div{min-width:0;flex:1}
 .road-map-view .drive-guidance strong{font-size:16px;line-height:20px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
 .road-map-view .drive-guidance span:not(.direction-glyph){font-size:12px;line-height:16px;margin-top:2px}
 .road-map-view .direction-glyph{min-width:25px}
 .map-controls{top:68px;right:8px;bottom:auto;width:44px;height:auto;display:flex;flex-direction:column;gap:8px}
 .map-heading-control,.map-zoom-control,.map-overview-control{position:static;width:44px;flex:none}
 .map-heading-control,.map-zoom-control{height:88px}
 .map-heading-control button,.map-zoom-control button{width:44px;height:44px;min-width:44px;min-height:44px}
 .map-overview-control{height:44px;min-width:44px;min-height:44px}
 .road-map-view .trip-panel{left:8px;right:8px;bottom:8px;width:auto;padding:10px;border-radius:16px}
 .trip-title{gap:8px;margin-bottom:6px;min-width:0}
 .trip-title>div{min-width:0;flex:1}
 .trip-title strong{display:block;font-size:16px;line-height:20px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
 .trip-title small{font-size:10px;line-height:14px;margin-bottom:2px}
 .trip-title button{width:44px;height:44px;min-width:44px;min-height:44px;flex:none}
 .trip-progress{height:3px;margin:7px 0 4px}
 .trip-bottom{gap:4px;min-width:0;font-size:11px;align-items:center}
 .trip-bottom>span{flex:1;min-width:0}
 .trip-bottom button{min-width:44px;min-height:44px;font-size:12px;padding:4px}
 .favorites-panel{inset:8px;width:calc(100% - 16px);min-width:0;padding-bottom:8px}
 .favorites-heading{padding:10px 12px 6px;gap:8px;min-width:0}
 .favorites-heading h2{font-size:24px}
 .favorites-heading>button{width:44px;height:44px;min-width:44px;min-height:44px}
 .favorites-tabs{flex:none;gap:4px;margin:0 10px;padding:0 0 8px;overflow-x:auto;overscroll-behavior-x:contain;scrollbar-width:none}
 .favorites-tabs button{flex:0 0 auto;min-width:44px;min-height:44px;padding:8px 11px;font-size:12px;white-space:nowrap}
 .favorite-row{min-height:80px;padding:12px 3px;gap:10px;min-width:0}
 .favorite-row .row-copy strong{font-size:16px;line-height:21px;overflow-wrap:anywhere}
 .favorite-row .row-copy>span{font-size:13px;line-height:18px;overflow-wrap:anywhere}

 /* Now Playing and library screens remain readable at narrow widths. */
 .music-player{padding:18px 16px 24px;gap:16px;align-items:center;justify-content:flex-start}
 .album{width:min(170px,100%);max-width:170px}
 .player-info h1{font-size:23px;line-height:28px;letter-spacing:-.5px}
 .player-info p{font-size:16px;line-height:21px;overflow-wrap:anywhere}
 .music-player .transport{gap:16px;margin:14px 0 6px;justify-content:center}
 .seek{height:32px;margin:0;accent-color:var(--text)}
 .seek-labels{font-size:12px;margin-top:0}
 .volume-label{gap:10px;margin-top:10px;font-size:13px}
 .volume-label input{height:32px;accent-color:var(--text)}
 .music-search input{font-size:16px;min-height:44px}
 .music-playlists{grid-template-columns:repeat(2,minmax(0,1fr));padding:14px 10px 20px;gap:18px 10px}
 .playlist-card{padding:4px 2px 8px}
 .playlist-art{width:100%;max-width:170px}
 .playlist-card>strong{font-size:15px;line-height:20px;margin-top:8px}
 .playlist-toolbar{grid-template-columns:56px minmax(0,1fr);padding:12px 10px;gap:8px 10px}
 .playlist-cover{width:56px;height:56px}
 .playlist-count{font-size:13px}
 .playlist-controls{gap:4px}
 .playlist-controls button{min-width:44px;min-height:44px;height:44px;font-size:12px;padding:6px 8px;gap:5px}

 /* Pinned conversations scroll sideways; the inbox keeps room to read. */
 .pm-pinned{display:flex;overflow-x:auto;flex:none;gap:10px;padding:8px 10px 14px;overscroll-behavior-x:contain;scrollbar-width:none}
 .pm-pinned-contact{flex:0 0 68px;min-height:88px;padding:2px 3px 6px}
 .pm-pinned-avatar{width:50px;height:50px}
 .pm-pinned-name{font-size:12px;max-width:68px}
 .pm-conversation{display:grid;grid-template-columns:42px minmax(0,1fr) 12px;gap:3px 9px;padding:12px 3px;min-height:100px}
 .pm-conversation>.pm-avatar{grid-column:1;grid-row:1/3;width:42px;height:42px;align-self:start;margin-top:2px}
 .pm-conversation-copy{grid-column:2;grid-row:1;min-width:0}
 .pm-conversation-date{grid-column:2;grid-row:2;width:auto;font-size:11px;line-height:16px;text-align:left}
 .pm-chevron{grid-column:3;grid-row:1/3;font-size:24px}
 .pm-conversation-copy strong{font-size:16px}
 .pm-conversation-role{white-space:normal;line-height:17px}
 .pm-thread-contact h1,.pm-thread-contact p{overflow-wrap:anywhere}
 .pm-thread-actions button{min-height:44px;max-width:100%;text-align:left;overflow-wrap:anywhere}
 .toast{font-size:14px;max-width:calc(100% - 20px)}

 .device-wrap:fullscreen{padding:calc(6px + env(safe-area-inset-top)) calc(6px + env(safe-area-inset-right)) calc(6px + env(safe-area-inset-bottom)) calc(6px + env(safe-area-inset-left))}
 .device-wrap:fullscreen .device{width:100%;align-self:stretch}
 .device-wrap:fullscreen .screen{min-height:0;max-height:none;height:calc(100svh - 92px - env(safe-area-inset-top) - env(safe-area-inset-bottom));height:calc(100dvh - 92px - env(safe-area-inset-top) - env(safe-area-inset-bottom))}
}

/* More columns on tablets; a wide CarPlay dashboard when a phone is rotated. */
@media(min-width:600px) and (max-width:900px){
 .app-grid{grid-template-columns:repeat(3,minmax(0,1fr));grid-auto-rows:112px}
 .music-playlists{grid-template-columns:repeat(3,minmax(0,1fr))}
}
@media(max-width:900px) and (max-height:650px) and (orientation:portrait){
 .road-map-view .map-controls{top:60px;left:8px;right:8px;width:auto;flex-direction:row;justify-content:center;gap:0}
 .map-heading-control,.map-zoom-control{display:flex;width:88px;height:44px;border-radius:0}
 .map-heading-control{border-radius:22px 0 0 22px}
 .map-zoom-control{border-radius:0 22px 22px 0}
 .map-heading-control button+button,.map-zoom-control button+button{border-top:0;border-left:1px solid var(--map-separator)}
 .map-overview-control{border-radius:0}
 .road-map-view .drive-guidance,.parked-card{top:112px;left:8px;right:8px}
}
@media(max-width:1100px) and (max-height:550px) and (orientation:landscape){
 body{padding:calc(6px + env(safe-area-inset-top)) calc(8px + env(safe-area-inset-right)) calc(6px + env(safe-area-inset-bottom)) calc(8px + env(safe-area-inset-left))}
 .screen{height:calc(100svh - 70px - env(safe-area-inset-top) - env(safe-area-inset-bottom));height:calc(100dvh - 70px - env(safe-area-inset-top) - env(safe-area-inset-bottom))}
 .under-device{display:flex;align-items:center;justify-content:space-between;text-align:left;padding:0 4px;font-size:11px;gap:8px}
 .under-links{gap:6px}
 .under-links button{padding:0 6px;font-size:12px}
 .sidebar{width:60px;flex-basis:60px;padding-top:8px}
 .status{height:44px}
 .status-bottom{display:none}
 .dock{gap:6px;top:51%}
 .home-button{bottom:6px}
 .home-view{padding:10px 10px 0}
 .app-grid{grid-template-columns:repeat(5,minmax(0,1fr));grid-auto-rows:100px;gap:8px}
 .app-button{min-height:96px}
 .dashboard-view{grid-template-columns:minmax(0,1.4fr) minmax(220px,1fr);grid-template-rows:64px minmax(166px,1fr);gap:8px}
 .dash-map{grid-column:1;grid-row:1/3}
 .dash-destinations{grid-column:2;grid-row:1}
 .dash-music{grid-column:2;grid-row:2}
 .music-player{display:grid;grid-template-columns:minmax(100px,28%) minmax(0,1fr);padding:12px 20px;gap:20px;align-items:center}
 .album{width:100%;max-width:170px;justify-self:center}
 .player-info{text-align:left}
 .player-info h1{font-size:20px;line-height:24px}
 .player-info p{font-size:14px;line-height:18px}
 .music-player .transport{justify-content:flex-start;margin:8px 0 0;gap:20px}
 .volume-label{margin-top:0}
 .music-playlists{grid-template-columns:repeat(4,minmax(0,1fr))}
 .playlist-art{max-width:145px}
 .destinations-button{right:auto;width:200px}
 .road-map-view .drive-guidance,.parked-card{top:8px;left:224px;right:auto;width:min(240px,calc(100% - 240px));min-width:0;max-width:none;padding:8px 10px}
 .road-map-view .trip-panel{left:8px;right:auto;bottom:8px;width:min(380px,calc(100% - 260px));padding:8px}
 .trip-title{margin-bottom:2px}
 .trip-title small{display:none}
 .trip-progress{margin:4px 0}
 .road-map-view .map-controls{top:auto;left:auto;right:8px;bottom:8px;width:236px;flex-direction:row;gap:8px}
 .map-heading-control,.map-zoom-control{display:flex;width:88px;height:44px;border-radius:22px}
 .map-heading-control button+button,.map-zoom-control button+button{border-top:0;border-left:1px solid var(--map-separator)}
 .map-overview-control{height:44px}
 .favorites-panel{inset:8px;width:calc(100% - 16px)}
 .favorites-heading{padding-top:6px;padding-bottom:2px}
 .favorites-tabs{padding-bottom:4px}
 .device-wrap:fullscreen .screen{height:calc(100svh - 70px - env(safe-area-inset-top) - env(safe-area-inset-bottom));height:calc(100dvh - 70px - env(safe-area-inset-top) - env(safe-area-inset-bottom))}
}
@media(max-width:1100px) and (max-height:350px) and (orientation:landscape){
 .sidebar{overflow-y:auto;gap:8px;padding:8px 0}
 .status{display:none}
 .dock{position:static;transform:none;flex:0 0 auto;gap:6px;margin:0}
 .home-button{position:static;flex:0 0 44px;margin-top:auto}
}
@media print{.resume-mobile-actions{display:none}}
