/* Phone-only refinements; desktop layout and motion retain their existing rules. */
@media(max-width:760px){
  html{scroll-padding-top:calc(96px + env(safe-area-inset-top,0px))}
  html:has(.case-nav){scroll-padding-top:calc(148px + env(safe-area-inset-top,0px))}
  .nav{height:calc(72px + env(safe-area-inset-top,0px));padding:env(safe-area-inset-top,0px) 5vw 0;gap:10px}
  .nav .brand,.nav nav a{display:inline-flex;align-items:center;justify-content:center;min-width:44px;min-height:44px}
  .nav nav{gap:4px;min-width:0}.nav nav a{padding:6px 8px;white-space:nowrap}.nav nav .nav-resume{display:none}
  .case-nav{top:calc(72px + env(safe-area-inset-top,0px));padding:8px 5vw;gap:16px;touch-action:pan-x pan-y pinch-zoom;scrollbar-width:thin;overscroll-behavior-x:contain}
  .case-nav a{display:inline-flex;align-items:center;min-height:44px;min-width:44px}
  .case-section,#projects,#about,#lab,#more{scroll-margin-top:12px}
  .case-body,.case-section>div,.two-col>*,.section-title>*,.note-card,.steps article>div,.result-grid>*{min-width:0}
  h1,h2,h3{line-break:strict;word-break:normal;overflow-wrap:normal;text-wrap:pretty}
  .section-title h2,.more-row h2,.about h2{font-size:clamp(26px,7.3vw,32px);text-wrap:balance}
  motion-glyph,motion-ink{display:inline}motion-glyph canvas{display:none}motion-ink{mask-image:none!important;-webkit-mask-image:none!important}
  .brand,.nav nav a,.text-link,.back-link,.tabs button,.pill.mini,.intro-ui a,.section-label>a,.footer-bottom>a,summary{min-height:44px}
  .text-link,.back-link,.intro-ui a,.section-label>a,.footer-bottom>a{display:inline-flex;align-items:center}
  .tabs button{min-width:44px;padding-block:10px}.gallery-controls button{width:44px;height:44px}
  summary{padding-block:9px}.section-label{align-items:center}.section-label>span{min-width:0}
  .footer-bottom{grid-template-columns:minmax(0,1fr) auto}.footer-bottom>a:first-child{overflow-wrap:anywhere}
  .case-head-visual img{height:auto;max-width:100%}
  .image-open img{height:auto;object-fit:contain}
  .gallery-three,.evidence-gallery{display:grid;grid-template-columns:none;grid-auto-flow:column;grid-auto-columns:84%;overflow-x:auto;gap:16px;scroll-snap-type:x proximity;scroll-padding-inline:0;padding-bottom:12px;touch-action:pan-x pan-y pinch-zoom;overscroll-behavior-x:contain;scrollbar-width:thin}
  .gallery-three>figure,.evidence-gallery>figure{min-width:0;scroll-snap-align:start;margin:0}
  .gallery-three .video-open img{object-fit:contain}
  .zoom-label{opacity:1}.card-link{opacity:1}.project-motion .card-art{opacity:1;translate:none}
  .project-card.project-motion,.project-card:hover,.more-row:hover .more-image{transform:none}
  .media-dialog,.media-dialog.image-only,.media-dialog.video-only{max-height:calc(94svh - env(safe-area-inset-top,0px) - env(safe-area-inset-bottom,0px));overscroll-behavior:contain}
  .dialog-close{position:absolute;top:10px;right:12px;min-width:72px;min-height:44px;padding:8px 14px}
  .media-dialog.image-only{width:94vw;padding:64px 12px 16px}
  .image-zoom-toggle{display:inline-flex;align-items:center;min-height:44px;margin-bottom:10px;padding:6px 14px;border:1px solid var(--line);border-radius:24px;background:transparent;color:var(--ink);font-size:14px}
  .mobile-image-stage{width:100%;max-height:calc(90svh - 210px);overflow:auto;touch-action:pan-x pan-y pinch-zoom;overscroll-behavior:contain;scrollbar-width:thin}
  .media-dialog.image-only .mobile-image-stage .full-image{max-height:calc(90svh - 210px);max-width:100%;width:auto;height:auto}
  .mobile-image-stage.is-zoomed{height:calc(90svh - 210px)}
  .media-dialog.image-only .mobile-image-stage.is-zoomed .full-image{max-width:none;max-height:none;margin:0;object-fit:contain}
  .intro-ui .pill{min-height:44px}
}

.title-phrase{display:contents}@media(max-width:760px){.section-title .title-phrase{display:inline-block;white-space:nowrap;max-width:100%}}
