/* Actual touch/pen presses work on phones, tablets and hybrid computers.
   No synthetic hover, extra tap, overlay or change to the saved club palette. */
:root body [data-ui-touch-feedback]:not(:disabled):not([aria-disabled="true"]){filter:brightness(.96)}
:root body a[data-ui-touch-feedback]:not(.button){text-decoration:underline;text-underline-offset:3px}
@media(prefers-reduced-motion:no-preference){
 :root body [data-ui-touch-feedback]{transition:background-color .16s ease,border-color .16s ease,color .16s ease,box-shadow .16s ease,filter .12s ease,scale .14s cubic-bezier(.2,.75,.25,1)}
 :root body [data-ui-touch-pressed]:not(:disabled):not([aria-disabled="true"]){scale:.98}
 :root body :is(.member-card,.event-card,.calendar-agenda-item,.member-choice-chip)[data-ui-touch-pressed]{scale:.993}
 /* An independent scale leaves each component's existing transform untouched. */
}
/* The same two-sided fill as desktop login, held briefly even for a quick tap.
   Loading and submission still start immediately. The spinner remains visible. */
:root body #login-screen .login-card .login-form>button[type="submit"]:is(.primary,.secondary)[data-ui-touch-feedback],
:root body #password-recovery-dialog button.recovery-primary[data-ui-touch-feedback]{
 background-size:50.1% 100%,50.1% 100%;border-color:var(--auth-dark);filter:none;
}
@media(prefers-reduced-motion:no-preference){
 :root body #login-screen .login-card .login-form>button[type="submit"]:is(.primary,.secondary)[data-ui-touch-feedback],
 :root body #password-recovery-dialog button.recovery-primary[data-ui-touch-feedback]{transition:background-size .18s cubic-bezier(.22,.7,.3,1),border-color .16s,scale .14s ease}
}
/* Small arrivals on touch devices; no stagger, layout measurement or content delay. */
@media(any-pointer:coarse) and (prefers-reduced-motion:no-preference){
 :root body :is(button,a.button,summary,.staff-response,.availability-choice,.member-choice-chip,.member-choice-chip-button,.p19-color-tile){transition:background-color .16s ease,border-color .16s ease,color .16s ease,box-shadow .16s ease,filter .12s ease,scale .14s ease}
 :root body :is(.input,.select,textarea){transition:background-color .16s ease,border-color .16s ease,box-shadow .16s ease}
 #app-screen .view-section:not(.is-hidden){animation:ui-touch-view-in .18s ease-out}
 #modal-root .modal{animation:ui-touch-surface-in .18s cubic-bezier(.2,.75,.25,1)}
 .toast{animation:ui-touch-view-in .18s ease-out}
}
@keyframes ui-touch-view-in{from{opacity:.7;translate:0 4px}to{opacity:1;translate:0 0}}
@keyframes ui-touch-surface-in{from{opacity:.7;scale:.99}to{opacity:1;scale:1}}
@supports(interpolate-size:allow-keywords){
 @media(prefers-reduced-motion:no-preference){
  .appearance-editor details{interpolate-size:allow-keywords}
  .appearance-editor details::details-content{block-size:0;overflow:clip;transition:block-size .16s ease,content-visibility .16s allow-discrete}
  .appearance-editor details[open]::details-content{block-size:auto}
 }
}
@media(prefers-reduced-motion:reduce){
 :root body [data-ui-touch-feedback],:root body [data-ui-touch-pressed]{scale:none!important;transition:none!important;animation:none!important}
}

/* Touch menus have a short, anchored entrance; their position and hit targets stay native. */
@media(any-pointer:coarse) and (prefers-reduced-motion:no-preference){
 .modern-picker{animation:ui-touch-menu-in .17s cubic-bezier(.2,.75,.25,1);transform-origin:top center}
 [data-role-picker] [role="listbox"]:not([hidden]):not(.is-hidden),.role-picker-menu:not([hidden]):not(.is-hidden){animation:ui-touch-menu-in .17s ease-out}
 #bottom-nav .nav-btn .nav-icon{transition:color .16s ease,scale .16s ease}
 /* Focus is the touch equivalent of hovering over editable controls. */
 :root body :is(.input,.select,textarea):focus-visible{transition:border-color .16s ease,box-shadow .16s ease,background-color .16s ease}
}
@keyframes ui-touch-menu-in{from{opacity:.75;scale:.985}to{opacity:1;scale:1}}
/* Native details still open immediately when interpolation is not supported. */
@supports(interpolate-size:allow-keywords){
 @media(any-pointer:coarse) and (prefers-reduced-motion:no-preference){
  details:is(.training-suggestion-history,.merch-history-disclosure,.calendar-upcoming-disclosure,.communication-message-details,.clubwear-product-management){interpolate-size:allow-keywords}
  details:is(.training-suggestion-history,.merch-history-disclosure,.calendar-upcoming-disclosure,.communication-message-details,.clubwear-product-management)::details-content{block-size:0;overflow:clip;transition:block-size .18s ease,content-visibility .18s allow-discrete}
  details:is(.training-suggestion-history,.merch-history-disclosure,.calendar-upcoming-disclosure,.communication-message-details,.clubwear-product-management)[open]::details-content{block-size:auto}
 }
}
