/* Touch layouts keep artwork primary and controls outside the artwork area. */
.chapter-toggle,.chapter-name,.step-touch-cue { display:none; }
@media (hover:none), (max-width:700px) {
  .chapter-preview { display:none!important; pointer-events:none!important; }
  .chapter-toggle { display:block; position:fixed; z-index:125; right:12px; bottom:max(16px,env(safe-area-inset-bottom)); min-height:44px; max-width:130px; padding:10px 14px; border:1px solid #53675a; border-radius:24px; color:var(--ink); background:#101713ed; font:inherit; font-size:12px; cursor:pointer; }
  .chapter-nav { display:none; top:auto; bottom:72px; right:12px; transform:none; width:168px; padding:8px; gap:2px; border:1px solid #53675a; border-radius:18px; background:#0d1410fa; box-shadow:0 12px 36px #0008; }
  .chapter-nav.is-open { display:flex; }
  .chapter-nav button { display:flex; align-items:center; gap:14px; width:100%; min-height:44px; padding:8px 12px; border-radius:10px; text-align:left; }
  .chapter-nav button[aria-current] { background:#8de8ac12; }
  .chapter-name { display:inline; font:inherit; font-size:13px; }
  .chapter-mark { flex:none; transform:none!important; }
  .chapter-toggle:focus-visible { outline:2px solid var(--accent); outline-offset:3px; }
  .design-hero:not(.graphic-static) { height:var(--graphic-scene-height,100svh); }
}
@media (max-width:600px), (max-width:950px) and (max-height:500px) {
  /* Reserve the lower left for gallery actions, center for native scroll. */
  .step-caption { left:12px; bottom:max(16px,env(safe-area-inset-bottom)); width:calc(50vw - 42px); max-width:160px; letter-spacing:0; }
  .step-caption > span,.step-caption > p { display:none; }
  .step-caption .step-all { width:100%; min-height:48px; padding:8px 10px; gap:7px; font-size:11px; line-height:1.3; text-align:left; white-space:normal; }
  .step-all > svg { flex:0 0 16px; }
  .step-all [data-step-copy] { min-width:0; overflow-wrap:anywhere; }
  .step-intro--belt { top:170px; width:160px; }
  .step-intro--belt #step-title { width:100%; margin:0 0 8px; }
  .step-intro--belt [data-step-logo] { width:88px; max-height:30px; }
  .step-intro--belt .step-challenge { gap:8px; }
  .step-intro--belt .step-challenge strong { font-size:40px; }
  .step-intro--belt .step-challenge [data-step-copy] { max-width:85px; font-size:11px; line-height:1.3; }
  .step-intro--belt::before { display:none; }
  .step-sheet { width:min(66vw,calc(var(--graphic-scene-height,100svh)*.44)); }
  .step-paper img { max-height:calc(var(--graphic-scene-height,100svh)*.38); }
  .step-drag-hint { top:auto; bottom:95px; left:50%; transform:translateX(-50%); }
  .step-drag-hint > svg,.step-drag-hint > span:not(.step-touch-cue) { display:none; }
  .step-touch-cue { display:block; color:#b5ddc2; opacity:0; }
  .step-touch-cue svg { width:40px; height:50px; }
  .is-touch-intro .step-touch-cue { animation:touch-cue-intro 4.8s both; }
  .is-touch-intro .touch-hand { animation:touch-cue-swipe 1.6s 3 ease-in-out; }
  .touch-direction { opacity:.4; }

  #work-process { --identity-top:166px; --identity-height:68px; }
  #work-process #work-process-title img { max-width:100px; }
  #work-process .adverso-carousel { --art-width:min(86vw,calc(var(--graphic-scene-height,100svh)*.68)); --stage-frame-top:0px; --stage-frame-bottom:0px; --stage-frame-before:0px; top:53%; margin-bottom:0; }
  #work-process .adverso-card:has(.adverso-content--poster) { height:calc(var(--graphic-scene-height,100svh)*.48); }
  #work-process .adverso-art--poster { max-width:100%; width:100%; height:100%; }
  #work-process .adverso-content--logo { scale:1; }
  #work-process .adverso-card:has(.adverso-content--logo) > .adverso-content { translate:0 0; }
  #work-process .adverso-art--logo { width:85%; max-width:85%; max-height:100%; }
  #work-process .adverso-art--normalized { width:calc(var(--art-width)*var(--logo-width)*1.25); height:calc(var(--art-width)*.55); max-width:85%; }
  #work-process .adverso-category { top:200px; max-width:calc(50% - 64px); font-size:11px; padding:9px 8px; min-height:44px; }
  #work-process .adverso-controls button { top:0; bottom:0; min-width:44px; }
  #work-process > .adverso-play { bottom:100px; padding:10px 16px; min-height:44px; max-width:calc(100% - 48px); }
  #work-process > .adverso-drag-hint { display:none!important; }
  #work-process > .adverso-all-posters { left:12px; bottom:max(16px,env(safe-area-inset-bottom)); }
  .adverso-logo-actions { inset:auto 12px max(16px,env(safe-area-inset-bottom)); width:calc(50% - 42px); height:auto; }
  .adverso-logo-actions > .adverso-all-logos { position:static; width:100%; height:auto; min-height:48px; padding:8px; gap:5px; font-size:10px; white-space:normal; text-align:left; }
  .adverso-logo-actions > .adverso-all-logos span { display:inline; }
  .work-process-progress-description { font-size:clamp(10px,3.2vw,14px); }
  .work-process-progress-track { display:none; }
  .step-viewer .step-close { min-height:44px; top:max(12px,env(safe-area-inset-top)); right:12px; }
  .step-viewer nav { bottom:max(16px,env(safe-area-inset-bottom)); }
  .step-viewer nav button { min-height:44px; }
}
@media (max-width:600px) and (max-height:700px) {
  .step-intro--belt { top:162px; }
  #work-process { --identity-top:146px; --identity-height:56px; }
  #work-process .adverso-category { top:174px; }
  #work-process .adverso-carousel { top:52%; --art-width:min(82vw,calc(var(--graphic-scene-height,100svh)*.61)); }
  #work-process .adverso-card:has(.adverso-content--poster) { height:calc(var(--graphic-scene-height,100svh)*.40); }
}
@keyframes touch-cue-swipe { 0%,100% { transform:translateY(7px); } 50% { transform:translateY(-7px); } }
@keyframes touch-cue-intro { 0%,100% { opacity:0; } 10%,85% { opacity:.9; } }
@media(prefers-reduced-motion:reduce) { .step-touch-cue { display:none; } }

@media (min-width:601px) and (max-width:950px) and (max-height:500px) {
  .step-intro--belt { left:22%; top:43%; width:150px; }
  .step-sheet { width:calc(var(--graphic-scene-height,100svh)*.6); }
  .step-paper img { max-height:calc(var(--graphic-scene-height,100svh)*.5); }
  .step-caption { width:150px; }
  .step-drag-hint { left:72%; bottom:68px; }
  #work-process { --identity-top:68px; --identity-height:46px; }
  #work-process .work-process-reveal { top:0; bottom:0; }
  #work-process .adverso-category { top:90px; max-width:150px; }
  #work-process .adverso-carousel { top:53%; --art-width:calc(var(--graphic-scene-height,100svh)*.58); }
  #work-process .adverso-card:has(.adverso-content--poster) { height:calc(var(--graphic-scene-height,100svh)*.48); }
  #work-process > .adverso-play { bottom:70px; font-size:12px; }
  .adverso-logo-actions { width:140px; }
}
