/* The same gallery across devices; only its space and input affordances change. */
@media(max-width:1100px){
 html[data-edition="3"]{--v3-media-width:min(84vw,calc((100dvh - 240px)*16/9))}
 html[data-edition="3"] .gallery-thumbs{width:calc(100% - 48px);overflow-x:auto;overflow-y:hidden;gap:20px;height:100px;touch-action:pan-x;overscroll-behavior-x:contain;scrollbar-width:none}
 html[data-edition="3"] .gallery-thumb-group{flex:0 0 auto!important}
 html[data-edition="3"] .gallery-thumb{flex:0 0 60px;width:60px}
 html[data-edition="3"] .gallery-group-label{position:sticky;left:0;width:min(100%,calc(100vw - 48px));padding-top:10px}
 html[data-edition="3"] .gallery-thumbs::-webkit-scrollbar{display:none}
}
@media(max-width:700px){
 html[data-edition="3"]{--edition-header:72px;--v3-media-width:min(84vw,calc((100dvh - 220px)*16/9));scrollbar-gutter:auto!important}
 html[data-edition="3"] body .masthead{left:20px!important;right:20px!important;padding-top:env(safe-area-inset-top)!important;height:calc(72px + env(safe-area-inset-top))!important;border:0!important}
 html[data-edition="3"] .masthead .brand-logo{width:28px;height:28px}
 html[data-edition="3"] #back-level{display:none!important}
 html[data-edition="3"] body .site-footer{left:16px!important;bottom:max(8px,env(safe-area-inset-bottom))!important;right:auto!important;top:auto!important}
 html[data-edition="3"] .theme-icon{width:14px;height:14px}
 html[data-edition="3"] .edition-route-nav button{min-height:44px;font-size:12px!important}
 html[data-edition="3"] .masthead .edition-route-nav{gap:22px}
 html[data-edition="3"] #directory:not([hidden]),html[data-edition="3"] #workspace.project-detail:not([hidden]){position:fixed!important;inset:calc(72px + env(safe-area-inset-top)) 0 calc(60px + env(safe-area-inset-bottom))!important;height:auto!important;padding:0!important;min-height:0!important}
 html[data-edition="3"] .archive-gallery{padding:0;gap:22px;justify-content:center}
 html[data-edition="3"] .gallery-stage{flex:0 0 auto;min-height:0;height:calc(var(--v3-media-width)*9/16 + 40px)}
 html[data-edition="3"] .gallery-thumbs{height:104px;flex:none;width:calc(100% - 40px);padding:4px 0 8px}
 html[data-edition="3"] .gallery-thumb{flex-basis:80px;width:80px;height:45px}
 html[data-edition="3"] .gallery-title{font-size:clamp(16px,4.3vw,24px);max-width:94%;padding:14px 10px;min-height:44px;white-space:normal;text-wrap:balance}
 html[data-edition="3"] .gallery-description{display:none}
 html[data-edition="3"] .gallery-title .locked-title{filter:blur(5px);padding:8px 10px}
 html[data-edition="3"] #workspace.project-detail:not([hidden]){grid-template-rows:calc(var(--v3-media-width)*9/16 + 40px) 104px!important;align-content:center;gap:22px!important}
 html[data-edition="3"] #workspace .project-panel-tools{width:var(--v3-media-width);gap:12px;height:auto;flex-wrap:wrap;padding-top:0!important;align-content:start}
 html[data-edition="3"] #workspace .project-panel-tools .mode-switch{width:100%;gap:18px!important}
 html[data-edition="3"] #workspace .project-panel-tools button{min-height:44px!important;padding:0!important;font-size:11px!important}
 html[data-edition="3"] #workspace #page-range{height:44px!important;top:-22px;touch-action:none}
 html[data-edition="3"] #workspace .stage-wrap>.page-scrubber{height:0!important}
 html[data-edition="3"] .intro{height:100dvh;min-height:0;padding:90px 28px 80px!important}
 html[data-edition="3"] .intro-composition{transform:none!important;width:100%;grid-template-columns:minmax(0,1fr)!important;gap:30px!important;align-content:center}
 html[data-edition="3"] .intro-composition .intro-identity #intro-title{font-size:clamp(38px,9vw,64px)!important;line-height:.94!important}
 html[data-edition="3"] .intro-lower{padding:0;grid-column:1;grid-row:2}
 html[data-edition="3"] .intro-entries{display:flex;gap:28px;height:auto}
 html[data-edition="3"] .intro-entry{min-height:48px;padding:0!important;gap:6px!important}
 html[data-edition="3"] .entry-label>.entry-name{font-size:18px!important}
 html[data-edition="3"] .entry-plus{font-size:18px!important}
 /* Info uses one natural scroll surface on phones, with contacts after the resume. */
 html[data-edition="3"]:has(body[data-view=experience]){overflow-y:auto!important;scrollbar-width:none!important}
 html[data-edition="3"] body[data-view=experience]{height:auto!important;min-height:100dvh;overflow:visible!important}
 html[data-edition="3"] #experience:not([hidden]){display:flex!important;flex-direction:column;height:auto!important;min-height:100dvh!important;overflow:visible;padding:100px 24px 92px!important;gap:36px!important}
 html[data-edition="3"] #experience .experience-intro{display:contents}
 html[data-edition="3"] #experience #experience-title{order:0;font-size:38px!important;margin:0!important}
 html[data-edition="3"] #experience .resume-main{order:1;display:grid;grid-template-columns:minmax(0,1fr);gap:36px;height:auto;overflow:visible;padding:0;width:100%}
 html[data-edition="3"] #experience .resume-contact{order:2;margin:0!important;width:100%;gap:8px}
 html[data-edition="3"] #experience .resume-contact a{font-size:14px;min-height:44px!important}
 html[data-edition="3"] #experience .resume-profile p{font-size:20px;line-height:1.45}
 html[data-edition="3"] #experience .resume-section:nth-of-type(3)>div{grid-template-columns:minmax(0,1fr)}
 html[data-edition="3"] #experience .resume-section>h2{margin-bottom:22px}
 html[data-edition="3"] #experience .resume-record h3{font-size:21px}
 html[data-edition="3"] #project-access-dialog{max-height:calc(100dvh - 32px);overflow:auto}
 html[data-edition="3"] #project-access-dialog input{font-size:16px}
 html[data-edition="3"] body[data-view=experience] .site-footer .theme-toggle{background:var(--paper)!important;border-radius:50%;width:44px;justify-content:center!important}
}
@media(pointer:coarse),(max-width:700px){
 html[data-edition="3"] .fullscreen-viewer[open] :is(.viewer-close,.viewer-rotate){display:flex!important;position:absolute;bottom:max(10px,env(safe-area-inset-bottom));width:48px;height:48px;align-items:center;justify-content:center;z-index:10}
 html[data-edition="3"] .fullscreen-viewer .viewer-rotate{left:calc(50% - 54px)}
 html[data-edition="3"] .fullscreen-viewer .viewer-close{left:calc(50% + 6px)}
 html[data-edition="3"] .fullscreen-viewer .stage-wrap,html[data-edition="3"] .fullscreen-viewer .stage-wrap.has-scrubber{width:min(calc(100dvw - 20px),calc((100dvh - 92px)*16/9))!important}
 html[data-edition="3"] .fullscreen-viewer.is-rotated .stage-wrap,html[data-edition="3"] .fullscreen-viewer.is-rotated .stage-wrap.has-scrubber{width:min(calc(100dvh - 92px),calc((100dvw - 20px)*16/9))!important;transform:rotate(90deg)!important;flex-shrink:0;max-width:none!important}
 html[data-edition="3"] .fullscreen-viewer #page-range{height:48px!important;top:-24px!important;touch-action:none}
 html[data-edition="3"] .gallery-card.is-selected .gallery-art:after{opacity:.2}
 html[data-edition="3"] .gallery-card.is-selected:has(.gallery-title:hover) .gallery-art:after{opacity:.2}
}
@media(max-height:540px) and (orientation:landscape){
 html[data-edition="3"]{--edition-header:56px;--v3-media-width:min(70vw,calc((100dvh - 172px)*16/9))}
 html[data-edition="3"] #directory:not([hidden]),html[data-edition="3"] #workspace.project-detail:not([hidden]){inset:56px 0 12px!important}
 html[data-edition="3"] .archive-gallery{gap:12px}
 html[data-edition="3"] .gallery-stage{flex:1;height:auto}
 html[data-edition="3"] body .masthead{height:56px!important}
 html[data-edition="3"] .gallery-thumbs{height:72px;width:calc(100% - 140px)}
 html[data-edition="3"] .gallery-thumb{flex-basis:44px;width:44px}
 html[data-edition="3"] .gallery-group-label{margin-top:5px;padding-top:6px}
 html[data-edition="3"] #workspace.project-detail:not([hidden]){grid-template-rows:minmax(0,1fr) 72px!important;gap:12px!important}
 html[data-edition="3"] .intro-composition{grid-template-columns:1.5fr 1fr!important;gap:30px!important;max-width:650px;margin:auto}
 html[data-edition="3"] .intro-lower{grid-column:2;grid-row:1}
 html[data-edition="3"] .intro-entries{display:block}
}
