/* Compact, shared viewport for the three animated scenes. */
#pieces { padding-top: 48px; padding-bottom: 48px; }
#pieces .steps-copy { display: block; margin: 0 auto 28px; text-align: center; }
#pieces .steps-copy h2 { font-size: clamp(28px, 3.4vw, 40px); line-height: 1.2; }
.steps-card { max-width: 980px; margin: 0 auto; overflow: hidden; border: 1px solid var(--line); border-radius: 22px; background: var(--surface); }
.steps-viewport { position: relative; overflow: hidden; aspect-ratio: 2; touch-action: pan-y pinch-zoom; }
.steps-track { display: flex; height: 100%; transition: transform .35s cubic-bezier(.22,.7,.2,1); }
.step-slide { flex: 0 0 100%; min-width: 0; height: 100%; position: relative; overflow: hidden; }
.steps-card .story-stage { width: 100%; max-width: none; height: 100%; aspect-ratio: auto; border: 0; border-radius: 0; margin: 0; background: var(--surface); }
.steps-card .story-interior,.steps-card .story-overhead,.steps-card .story-outside { inset: 0; }
.steps-card .story-found { display: none; }
.steps-card .story-room { width: 93%; }
.steps-card .story-stage * { animation-play-state: paused !important; }
.steps-current { display: flex; align-items: center; gap: 20px; padding: 23px 26px 13px; border-top: 1px solid var(--line); }
.step-counter { color: var(--accent); font-size: 23px; white-space: nowrap; font-weight: 600; }
.step-counter small { color: var(--muted); font-size: 12px; font-weight: 400; }
.step-current-copy { flex: 1; min-width: 0; }
.step-current-copy h3 { margin: 0 0 4px; font-size: 20px; font-weight: 550; letter-spacing: -.5px; }
.step-current-copy p { margin: 0; font-size: 13px; line-height: 1.5; color: var(--muted); }
.step-arrows { display: flex; gap: 8px; }
.step-arrows .icon-button { width: 38px; height: 38px; }
.steps-controls { display: flex; align-items: center; justify-content: space-between; gap: 22px; padding: 0 26px 14px; }
.steps-dots { display: flex; align-items: center; gap: 7px; flex: 1; max-width: 250px; }
.step-dot { width: 33.333%; height: 28px; position: relative; padding: 0; background: transparent; }
.step-dot::before,.step-dot span { content: ''; position: absolute; top: 12px; left: 0; width: 100%; height: 3px; border-radius: 4px; background: var(--line); }
.step-dot.is-active::before { background: color-mix(in srgb,var(--accent) 40%,transparent); }
.step-dot span { background: var(--accent); transform-origin: left; transform: scaleX(0); }
.step-dot.is-active span { transform: scaleX(var(--step-progress,0)); }
.steps-controls .icon-button { width: 30px; height: 30px; }
.steps-controls .icon-button svg { width: 14px; height: 14px; }
.story-couch { position: absolute; inset: 0; overflow: hidden; background: #5c5550; container-type: size; }
.story-couch-world { position: absolute; left: 50%; top: 50%; width: max(100cqw, 177.7cqh); aspect-ratio: 1672 / 941; transform-origin: 51% 55%; animation: couchCamera 6.5s ease-in-out infinite paused; }
.story-couch-world > img { width: 100%; height: 100%; display: block; }
.couch-tap { position: absolute; left: 50.8%; top: 64.5%; width: 2.6%; aspect-ratio: 1; border: 2px solid #fff; border-radius: 50%; background: #ffffff40; animation: couchTap 6.5s ease-out infinite paused; }
.couch-purchased { position: absolute; left: 45%; top: 62.2%; width: 9.5%; height: 4.1%; display: flex; justify-content: center; align-items: center; gap: 4px; border-radius: 4px; background: #098590; color: white; font: 600 clamp(7px,1.1vw,14px)/1 'DM Sans',sans-serif; transform: rotate(4deg); animation: couchBought 6.5s ease infinite paused; }
.couch-purchased svg { width: 12px; height: 12px; }
.couch-receipt { position: absolute; left: 22px; bottom: 20px; display: flex; align-items: center; gap: 10px; border: 1px solid #b399d855; background: #151019e8; padding: 11px 15px; border-radius: 12px; box-shadow: 0 8px 25px #0003; color: #eee6f7; font-size: 11px; animation: couchReceipt 6.5s ease infinite paused; }
.couch-receipt > svg { color: #b69bed; width: 18px; }
.couch-receipt strong { display: block; font-size: 20px; line-height: 1.25; }
@keyframes couchCamera { 0%,12% { transform: translate(-50%,-50%) scale(1); } 70%,100% { transform: translate(-50%,-50%) scale(1.03); } }
@keyframes couchTap { 0%,30%,50%,100% { opacity: 0; transform: scale(.6); } 34% { opacity: 1; transform: scale(.6); } 47% { opacity: 0; transform: scale(1.8); } }
@keyframes couchBought { 0%,39% { opacity: 0; } 43%,100% { opacity: 1; } }
@keyframes couchReceipt { 0%,40% { opacity: 0; transform: translateY(10px); } 47%,95% { opacity: 1; transform: none; } 100% { opacity: 0; transform: translateY(-5px); } }
@media (max-width: 760px) {
  #pieces { padding-top: 30px; padding-bottom: 35px; }
  #pieces .steps-copy { margin-bottom: 20px; }
  #pieces .steps-copy h2 { font-size: 28px; }
  .steps-card { border-radius: 16px; }
  .steps-viewport { aspect-ratio: 1.5; }
  .steps-card .story-world { width: 160%; }
  .steps-current { padding: 16px 16px 5px; gap: 12px; align-items: flex-start; }
  .step-counter { font-size: 18px; padding-top: 2px; }
  .step-counter small { font-size: 10px; }
  .step-current-copy h3 { font-size: 16px; line-height: 1.3; letter-spacing: -.25px; }
  .step-current-copy p { font-size: 11px; line-height: 1.5; min-height: 33px; }
  .step-arrows { gap: 4px; }
  .step-arrows .icon-button { width: 30px; height: 30px; }
  .step-arrows svg { width: 14px; }
  .steps-controls { padding: 2px 16px 10px; }
  .steps-dots { max-width: 165px; }
  .steps-card .story-room { width: 110%; }
  .steps-card .story-top-box { top: 20%; }
  .steps-card .story-top-bag { top: 29%; }
  .couch-receipt { left: 12px; bottom: 12px; padding: 7px 10px; font-size: 9px; gap: 7px; }
  .story-couch-world { left: 41.5%; }
  .couch-receipt strong { font-size: 16px; }
  .couch-purchased { font-size: 7px; gap: 2px; }
  .couch-purchased svg { width: 8px; height: 8px; }
}
@media (max-width: 400px) { .steps-current { flex-wrap: wrap; } .step-current-copy { flex-basis: calc(100% - 68px); } .step-arrows { margin-left: auto; margin-top: -5px; } .steps-controls { margin-top: -31px; padding-right: 94px; min-height: 45px; } }
@media (prefers-reduced-motion: reduce) {
  .steps-track { transition: none; }
  .story-couch * { animation: none !important; }
  .story-couch-world { transform: translate(-50%,-50%); }
  .couch-tap { display: none; }
  .couch-purchased { opacity: 0; }
  .couch-receipt { opacity: 1; }
  #steps-pause { display: none; }
}
