.td-study .td-hero:has(.fm-card) {
  grid-template-columns: 240px minmax(0, 1fr);
}

.td-study .td-card-figure.fm-card {
  width: 240px;
  max-width: 240px;
  margin: 0;
  transform: none !important;
  transition: none !important;
}

.td-study .fm-stage {
  position: relative;
  display: block;
  width: 100%;
  line-height: 0;
  overflow: hidden;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

.td-study .fm-stage .td-card-image {
  display: block;
  width: 100%;
  height: auto;
  pointer-events: none;
  transform: none !important;
}

.td-study .fm-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease;
}

.td-study .fm-card.fm-playing .fm-overlay {
  opacity: 1;
  visibility: visible;
}

.td-study .fm-layer {
  animation-play-state: paused;
  will-change: transform, opacity;
}

.td-study .fm-card.fm-playing .fm-layer {
  animation-play-state: running;
}

/* Sun rays and warm glow (max opacity <= 0.14) */
.td-study .fm-sun-layer {
  opacity: 0.08;
  transform-box: view-box;
  transform-origin: 638px 84px;
  animation: fm-sun-pulse 6.8s ease-in-out infinite;
}

/* Red feather subtle sway around base (385, 211), max 0.75deg */
.td-study .fm-feather-mover {
  transform-box: view-box;
  transform-origin: 385px 211px;
  animation: fm-feather-sway 5.6s ease-in-out infinite;
}

/* Right cape subtle breeze around shoulder/back (500, 446), max 0.95deg & <= 1.5px */
.td-study .fm-cape-mover {
  transform-box: view-box;
  transform-origin: 500px 446px;
  animation: fm-cape-wave 7.4s ease-in-out infinite;
}

@keyframes fm-sun-pulse {
  0%, 100% {
    opacity: 0.06;
    transform: scale(0.99);
  }
  50% {
    opacity: 0.14;
    transform: scale(1.02);
  }
}

@keyframes fm-feather-sway {
  0%, 100% {
    transform: rotate(0deg) translate3d(0, 0, 0);
  }
  45% {
    transform: rotate(-0.75deg) translate3d(-0.6px, 0.4px, 0);
  }
  75% {
    transform: rotate(0.45deg) translate3d(0.4px, -0.3px, 0);
  }
}

@keyframes fm-cape-wave {
  0%, 100% {
    transform: rotate(0deg) translate3d(0, 0, 0);
  }
  40% {
    transform: rotate(-0.95deg) translate3d(1.4px, -1px, 0);
  }
  75% {
    transform: rotate(0.55deg) translate3d(-0.8px, 0.6px, 0);
  }
}

/* Compact accessible motion toggle button below stage */
.td-study .fm-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  min-height: 44px;
  margin-top: 8px;
  padding: 6px 10px;
  border: 1px solid rgba(90, 72, 48, 0.28);
  border-radius: 6px;
  background: rgba(248, 243, 232, 0.85);
  color: #3b2f1e;
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.2;
  cursor: pointer;
  touch-action: manipulation;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.td-study .fm-toggle[hidden] {
  display: none !important;
}

.td-study .fm-toggle:hover {
  background: rgba(242, 234, 217, 0.95);
  border-color: rgba(90, 72, 48, 0.45);
}

.td-study .fm-toggle:focus-visible {
  outline: 2px solid #7a5c2e;
  outline-offset: 2px;
}

.td-study .fm-toggle-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: #9c8c74;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.td-study .fm-toggle[aria-pressed="true"] .fm-toggle-dot {
  background-color: #b85d28;
  transform: scale(1.15);
}

@media (max-width: 760px) {
  .td-study .td-hero:has(.fm-card) {
    grid-template-columns: 120px minmax(0, 1fr);
  }

  .td-study .td-card-figure.fm-card {
    width: 120px;
    max-width: 120px;
  }

  .td-study .fm-toggle {
    font-size: 0.75rem;
    padding: 6px 6px;
  }
}

@media (max-width: 359px) {
  .td-study .td-hero:has(.fm-card) {
    grid-template-columns: 104px minmax(0, 1fr);
  }

  .td-study .td-card-figure.fm-card {
    width: 104px;
    max-width: 104px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .td-study .fm-overlay,
  .td-study .fm-card.fm-playing .fm-overlay {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
  }

  .td-study .fm-layer,
  .td-study .fm-card.fm-playing .fm-layer {
    animation: none !important;
    transform: none !important;
  }
}

.td-study .fm-card:not(.fm-playing) .fm-layer {
  animation-play-state: paused;
  will-change: auto;
}
.td-study .fm-card.fm-playing .fm-layer {
  animation-play-state: running;
  will-change: transform, opacity;
}
.td-study .fm-toggle:focus-visible {
  outline: 2px solid #e7c79a;
  outline-offset: 2px;
}
.td-study .fm-toggle[disabled] {
  opacity: 0.65;
  cursor: not-allowed;
}
