/* Public-site tokens; the recorded app uses src/design-system components. */
.demo-section { background: var(--paper-deep); scroll-margin-top: var(--help-anchor-offset); padding-block: 2.5rem; }
.demo-section [hidden], .tell-voice [hidden] { display: none !important; }
.demo-gallery { position: relative; box-sizing: border-box; width: 100%; max-width: 436px; padding-inline: 68px; min-width: 0; justify-self: center; }
.demo-navigation { position: absolute; inset-inline: 0; top: calc(50% + 1.75rem); transform: translateY(-50%); display: flex; justify-content: space-between; pointer-events: none; }
.demo-navigation button:disabled { opacity: .45; cursor: default; box-shadow: none; }
.demo-arrow { display: grid; place-items: center; pointer-events: auto; width: 56px; height: 56px; border: 0; border-radius: 50%; background: transparent; color: var(--ink); cursor: pointer; font: inherit; }
.demo-arrow:hover:not(:disabled) { background: var(--surface); }
.demo-arrow:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.demo-arrow svg { width: 32px; height: 32px; }
.demo-arrow.is-nudging { animation: demo-next-pulse .8s ease-in-out 3; }
@keyframes demo-next-pulse {
  0%, 100% { transform: scale(1); background: transparent; }
  50% { transform: scale(1.12); background: var(--brand-soft); }
}
@media (min-width: 761px) {
  .demo-section .preview-grid { grid-template-columns: 1fr minmax(436px, .9fr); gap: clamp(32px, 4vw, 64px); }
}
.demo-rail { display: flex; align-items: stretch; gap: 0; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: 0; padding: 0; scrollbar-width: none; overscroll-behavior-x: contain; scrollbar-color: var(--brand-soft) var(--paper); }
.demo-card { flex: 0 0 100%; min-width: 0; scroll-snap-align: start; }
.demo-card h3 { min-height: 2.5em; margin: 0 0 .5rem; display: flex; align-items: center; }
.demo-player { position: relative; border-radius: var(--radius-sm); overflow: hidden; }
.demo-card video { width: 100%; height: auto; aspect-ratio: 390 / 600; display: block; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.demo-toggle { position: absolute; inset: 0; width: 100%; height: 100%; min-height: 44px; border: 0; background: transparent; padding: 0; cursor: pointer; display: grid; place-items: center; }
.demo-play-icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.demo-play-icon::before {
  content: "";
  width: 30%;
  height: 33.3333%;
  background: currentColor;
  clip-path: polygon(0 0, 100% 50%, 0 100%);
  /* Center the triangle's visual weight, independent of font metrics or direction. */
  transform: translateX(16.6667%);
}
.demo-player[data-playing="true"] .demo-play-icon { opacity: 0; }
.demo-progress { display: block; height: 4px; background: var(--line); pointer-events: none; }
.demo-progress > span { display: block; width: 100%; height: 100%; background: var(--ember); transform: scaleX(0); transform-origin: left; }
.demo-toggle:focus-visible { outline: 3px solid var(--focus); outline-offset: -4px; }
.demo-language { display: block; color: var(--ink-soft); margin-top: .5rem; }
.demo-error { color: var(--error); }
.tell-voice { margin-block: 1.25rem; }
.tell-voice audio { width: 100%; }
.tell-voice blockquote { margin: 1rem 0 .75rem; padding-inline-start: 1rem; border-inline-start: 3px solid var(--ember); color: var(--ink); }
.tell-voice small { color: var(--ink-soft); }
.step-panel-art-voice img { object-fit: contain; }
@media (max-width: 760px) {
  .demo-section .preview-grid { gap: 1.5rem; }
  .demo-gallery { max-width: 300px; padding-inline: 0; }
  .demo-navigation { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .demo-rail { scroll-behavior: auto; }
  .demo-arrow.is-nudging { animation: none; }
}

.demo-rail::-webkit-scrollbar { display: none; }

/* English supplied-art review keeps the complete original in each frame. */
.keepsake-art-frame > img.supplied-art, .step-panel-art > img.supplied-art { object-fit: contain; }
