/* Shared small-screen treatment for the homepage and the studio. */
#pages{overscroll-behavior-y:contain;-webkit-overflow-scrolling:touch}
#studio-gesture-hint{display:none}
@media(max-width:700px),(pointer:coarse) and (max-width:1024px){
  html{-webkit-text-size-adjust:100%}
  #pages{overscroll-behavior-y:none;scroll-padding-top:max(20px,env(safe-area-inset-top));scroll-padding-bottom:max(24px,env(safe-area-inset-bottom))}
  .profile{padding-top:max(48px,calc(28px + env(safe-area-inset-top)));padding-right:max(24px,env(safe-area-inset-right));padding-bottom:max(58px,calc(32px + env(safe-area-inset-bottom)));padding-left:max(24px,env(safe-area-inset-left));justify-content:flex-start;align-content:start}
  .profile-name{font-size:36px;letter-spacing:-1.5px}
  .profile .inline-link{display:inline;padding:4px 0}
  .contact{column-gap:24px;row-gap:0}
  .contact a,.contact button{min-height:44px}
  .portfolio h2 button{display:inline-flex;align-items:center;min-height:44px;padding:0}
  .portfolio{row-gap:0}
  /* Phones start the two apps on their own line, flush with the statement text; desktop keeps them inline. */
  .built-apps{display:block;white-space:nowrap}
  .page.software{padding-top:max(64px,calc(36px + env(safe-area-inset-top)));padding-bottom:calc(90px + env(safe-area-inset-bottom))}
  .text-button{min-height:44px}
  /* Studio HUD: a floating translucent corner menu — About Jon | pause | more — with 44px targets inside the
     safe area. The rest (view label, Exhibition / Behind the wall, sound, guided/free, approach) opens one tap
     away as a list of labelled rows; the labels are the controls' live aria-labels, so the menu never goes stale. */
  #studio-signature{left:max(12px,env(safe-area-inset-left));top:calc(10px + env(safe-area-inset-top));width:auto;max-width:calc(100vw - max(12px,env(safe-area-inset-left)) - max(12px,env(safe-area-inset-right)));display:grid;grid-template-columns:auto auto auto;grid-template-areas:"home pause more" "label label label" "side side side" "sound sound sound" "mode mode mode" "distance distance distance";align-items:center;column-gap:2px;row-gap:0;padding:2px;color:#eeeae1;border:1px solid #ffffff1f;border-left-width:1px;border-radius:14px;background:#242726b8;box-shadow:0 6px 24px #0000002e;-webkit-backdrop-filter:blur(14px) saturate(140%);backdrop-filter:blur(14px) saturate(140%)}
  #studio-signature::after{display:none}
  .signature-title{grid-area:home;font-size:13px;letter-spacing:.015em}
  #studio-home{min-height:44px;padding:0 10px;border-radius:11px}
  #studio-signature .signature-pause{grid-area:pause;width:44px;height:44px;padding:12px;border-radius:11px}
  #studio-signature .signature-more{grid-area:more;display:grid;width:44px;height:44px;padding:12px;border-radius:11px}
  .signature-more[aria-expanded="true"]{background:#ffffff1f}
  #camera-mode-label{grid-area:label;margin-top:2px;padding:8px 10px 2px;border-top:1px solid #ffffff1f;font-size:11px;letter-spacing:.06em;text-transform:uppercase;color:#e9e2d3}
  #studio-signature .signature-side{grid-area:side;justify-content:flex-start;min-height:44px;padding:0 12px 0 10px;border-radius:11px;font-size:13px;letter-spacing:.01em;color:#ecdfc8}
  #studio-signature .signature-sound{grid-area:sound}
  #studio-signature #camera-mode{grid-area:mode}
  #studio-signature #camera-distance{grid-area:distance}
  #studio-signature .signature-sound,#studio-signature .signature-tool{display:flex;justify-content:flex-start;align-items:center;gap:10px;width:auto;height:44px;padding:0 12px 0 10px;border-radius:11px;color:#eeeae1}
  #studio-signature .signature-sound svg,#studio-signature .signature-tool svg{flex:none;width:20px;height:20px}
  #studio-signature .signature-sound::after,#studio-signature .signature-tool::after{content:attr(aria-label);font-size:13px;letter-spacing:.01em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  #studio-gesture-hint{display:block;position:fixed;left:50%;bottom:calc(18px + env(safe-area-inset-bottom));transform:translateX(-50%);z-index:3;color:#383a36;background:#f3f1e8dc;border:1px solid #ffffff8c;border-radius:20px;padding:9px 15px;font-size:12px;letter-spacing:.01em;white-space:nowrap;pointer-events:none;box-shadow:0 2px 12px #2527250a}
  #story{width:calc(100% - max(24px,env(safe-area-inset-left)) - max(24px,env(safe-area-inset-right)));max-height:calc(100dvh - max(24px,env(safe-area-inset-top)) - max(24px,env(safe-area-inset-bottom)));margin:auto;border-radius:14px;overscroll-behavior:contain;-webkit-overflow-scrolling:touch}
  #close-story{width:44px;height:44px;top:12px;margin:12px 12px 0 0;font-size:25px}
  #story-content{padding:64px 24px 28px;overflow-wrap:break-word}
  .story-title{font-size:clamp(28px,7.5vw,36px);line-height:1.15;margin-top:18px}
  .story-lead{font-size:17px;line-height:1.7}
  .story-eyebrow{font-size:10px;line-height:1.65;display:block;letter-spacing:.12em}
  .story-link{min-height:44px;line-height:1.4;max-width:100%}
  .story-grid{gap:15px}
  #scene-status{bottom:calc(20px + env(safe-area-inset-bottom));width:max-content;max-width:calc(100vw - 40px);line-height:1.5;text-align:center}
}
/* Without backdrop blur the translucent surface would sit directly on the scene; use a near-solid tint instead. */
@supports not ((-webkit-backdrop-filter:blur(1px)) or (backdrop-filter:blur(1px))){
  @media(max-width:700px),(pointer:coarse) and (max-width:1024px){#studio-signature{background:#242726ee}}
}
@media(max-width:360px){
  .profile{padding-left:20px;padding-right:20px}
  .contact{column-gap:19px}
  .signature-title{font-size:12px}
  #studio-home{padding:0 8px}
}
@media(max-height:500px) and (orientation:landscape) and (pointer:coarse){
  #studio-signature{top:calc(6px + env(safe-area-inset-top))}
  #studio-gesture-hint{bottom:calc(8px + env(safe-area-inset-bottom));padding:6px 12px}
}
/* Object callouts on a phone: narrower windows and tighter type, so three fit beside the software desk. */
@media(max-width:700px),(pointer:coarse) and (max-width:1024px){
  .callout{width:min(204px,calc(100vw - 24px));padding:9px 11px 10px}
  .callout.wide{width:min(264px,calc(100vw - 24px))}
  .callout-label{font-size:8.5px;margin-bottom:4px}
  .callout h3{font-size:13.5px;margin-bottom:3px}
  .callout p{font-size:11.5px;line-height:1.42}
  .callout a{margin-top:6px;padding:4px 0 2px}
  .callout.tour-hint button{margin-top:8px;padding:9px 12px;font-size:11.5px}
}
