/* SHP iOS INTERACTIONS / 2026-12-05
   Second iOS layer, additive to /shp-ios-motion.css (see .agents/skills):
   artwork gestures, sliding segmented selectors, list insertions, player
   entrances, smooth disclosure and press feedback on thumbnails.
   Motion only: colours, layout, copy, links and business logic are untouched. */
:root{--shp-ios-out:cubic-bezier(.23,1,.32,1);--shp-ios-drawer:cubic-bezier(.32,.72,0,1)}

/* Artwork viewer: the image is a gesture surface (swipe to browse, pull down to close). */
html.shp-ios-touch .artwork-dialog[open] #artwork-full{
  touch-action:none;-webkit-user-select:none;user-select:none;-webkit-user-drag:none;
}
@media(hover:hover) and (pointer:fine){
  html.shp-ios-touch .artwork-dialog[open] #artwork-full{cursor:grab}
  html.shp-ios-touch .artwork-dialog.shp-ios-dragging #artwork-full{cursor:grabbing}
}
html.shp-ios-touch .artwork-dialog.shp-ios-pulling:not(.shp-ios-dismiss)::backdrop{
  opacity:calc(1 - var(--shp-pull,0) * .85);
}

/* Segmented selectors: the active mark slides between options, like UISegmentedControl. */
html.shp-ios-touch .platform-switch,
html.shp-ios-touch #studio-demo .shp-demo-views{position:relative}
html.shp-ios-touch #studio-demo .shp-demo-views button{position:relative;z-index:1}
.shp-seg-ink{position:absolute;left:0;top:0;pointer-events:none;transform-origin:0 50%;will-change:transform}
.platform-switch .shp-seg-ink{top:auto;bottom:0;height:2px}
#studio-demo .shp-demo-views .shp-seg-ink{z-index:0}
html.shp-ios-touch .platform-switch button.shp-seg-arriving{border-bottom-color:transparent!important}
html.shp-ios-touch #studio-demo .shp-demo-views button.shp-seg-arriving{background:transparent!important}

@media (prefers-reduced-motion:no-preference){
  /* Players open like a widget expanding in place. */
  html.shp-ios-touch #streaming-container > *,
  html.shp-ios-touch .beat-media > iframe,
  html.shp-ios-touch #shp-sc-player:not([hidden]){
    animation:shp-ios-rise 340ms var(--shp-ios-drawer) both;
  }
  /* Thumbnails answer the finger on press, before release. */
  html.shp-ios-touch :is(.artwork-open,.beat-play){transition:scale 160ms var(--shp-ios-out)}
  html.shp-ios-touch :is(.artwork-open,.beat-play):active{scale:.97;transition-duration:110ms}
}
@keyframes shp-ios-rise{
  from{opacity:0;transform:translate3d(0,12px,0) scale(.985)}
  to{opacity:1;transform:none}
}

/* Licences & limites: the disclosure opens with a drawer curve where supported. */
@supports selector(::details-content) and (interpolate-size:allow-keywords){
  @media (prefers-reduced-motion:no-preference){
    html.shp-ios-touch .license-details{interpolate-size:allow-keywords}
    html.shp-ios-touch .license-details::details-content{
      block-size:0;overflow-y:clip;
      transition:block-size 320ms var(--shp-ios-drawer),content-visibility 320ms allow-discrete;
    }
    html.shp-ios-touch .license-details[open]::details-content{block-size:auto}
  }
}

@media (prefers-reduced-motion:reduce){
  html.shp-ios-touch #streaming-container > *,
  html.shp-ios-touch .beat-media > iframe,
  html.shp-ios-touch #shp-sc-player,
  html.shp-ios-touch :is(.artwork-open,.beat-play){animation:none!important;transition:none!important;scale:none!important}
  .shp-seg-ink{display:none}
}
