/* Shared spring feedback, matching 知材. Only cards move; reading text never loops. */
html[data-ui-motion="on"] body :is(.btn,.icon-btn,.chip-btn,.row:is(button,a),.segmented button,.words-fab,.home-avatar,.home-background,.home-search,.home-card,.home-record,.write-card,.words-tile,.reading-item,.reading-nce-row,.lib-item,.word-row,.tabbar a) {
  transition: scale .4s cubic-bezier(.18,1.8,.35,1), background-color .2s, border-color .2s, color .2s !important;
}
html[data-ui-motion="on"] body :is(.btn,.icon-btn,.chip-btn,.row:is(button,a),.segmented button,.words-fab,.home-avatar,.home-background,.home-search,.home-card,.home-record,.write-card,.words-tile,.reading-item,.reading-nce-row,.lib-item,.word-row,.tabbar a):not(:disabled):active {
  scale: .94 .91; transition-duration: .08s !important;
}
html[data-ui-motion="on"] body :is(.study-actions button,.ln-actions button,.ln-option) {
  transition: scale .32s cubic-bezier(.18,1.8,.35,1), background-color .16s, border-color .16s, color .16s !important;
}
html[data-ui-motion="on"] body :is(.study-actions button,.ln-actions button,.ln-option):not(:disabled):active {
  scale: .97 .94; transition-duration: .06s !important;
}
html[data-ui-motion="on"] body :is(.btn,.ln-option):active { transform: none; }
@media (hover:hover) and (pointer:fine) {
  html[data-ui-motion="on"] body :is(.home-card,.home-record,.write-card,.words-tile,.reading-item,.lib-item):hover { scale: 1.018; }
}
html[data-ui-motion="on"] body .tabbar a[aria-current="page"] svg { animation: vocab-icon-pop .5s both !important; }
html[data-ui-motion="on"] body .sheet { animation: vocab-veil-in .18s both !important; }
html[data-ui-motion="on"] body .sheet-panel { animation: vocab-sheet-in .48s both !important; transform-origin: bottom center; }
html[data-ui-motion="on"] body dialog[open] { animation: vocab-dialog-in .36s both !important; }
html[data-ui-motion="on"] body details[open] > :not(summary) { animation: vocab-details-in .28s ease-out both !important; }
html[data-ui-motion="on"] body .toast.show { animation: vocab-toast-pop .35s both !important; }
@keyframes vocab-veil-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes vocab-sheet-in {
  0% { opacity: 0; translate: 0 24px; scale: .97 .93; }
  60% { opacity: 1; translate: 0 -4px; scale: 1.012 1.018; }
  80% { translate: 0 2px; scale: .997 .995; }
  100% { opacity: 1; translate: 0 0; scale: 1; }
}
@keyframes vocab-dialog-in { 0% { opacity: 0; scale: .92; } 65% { opacity: 1; scale: 1.025; } 100% { opacity: 1; scale: 1; } }
@keyframes vocab-details-in { from { opacity: 0; translate: 0 -6px; } to { opacity: 1; translate: 0 0; } }
@keyframes vocab-icon-pop { 0% { scale: .8; rotate: -8deg; } 45% { scale: 1.18; rotate: 5deg; } 75% { scale: .96; rotate: -2deg; } 100% { scale: 1; rotate: 0deg; } }
@keyframes vocab-toast-pop { 0% { scale: .92; } 65% { scale: 1.025; } 100% { scale: 1; } }
html[data-ui-motion="off"] body *, html[data-ui-motion="off"] body *::before, html[data-ui-motion="off"] body *::after {
  animation: none !important; transition: none !important; scroll-behavior: auto !important;
}
/* Keep the existing 6 settings rows; the optional switch lives in the page header. */
[data-act="motion"][aria-pressed="true"] { color: var(--accent); background: var(--accent-soft); }
