.cl-gesture { margin: .65rem 0 0; }
.cl-gesture-print {
  display: grid;
  aspect-ratio: 2 / 1;
  border: 3px solid #fffaf0;
  box-shadow: 0 1px 4px #382d253f;
  background: #e9ddc7;
  pointer-events: none;
}
.cl-gesture-print[data-scene="maya"] { --frames: url('gesture-art/maya.jpg'); }
.cl-gesture-print[data-scene="vera"] { --frames: url('gesture-art/vera.jpg'); }
.cl-gesture-print[data-scene="nika"] { --frames: url('gesture-art/nika.jpg'); }
.cl-gesture-print > span {
  background: var(--frames) center top / auto 300% no-repeat;
}
.cl-gesture-print > span + span { display: none; background-position-y: 100%; }
@media (prefers-reduced-motion: no-preference) {
  .cl-gesture-print > span:first-child { animation: cl-letter-gesture 2s steps(1, end) 1 forwards; }
  @keyframes cl-letter-gesture {
    from { background-position-y: 0%; }
    32% { background-position-y: 50%; }
    68%, to { background-position-y: 100%; }
  }
}
@media (prefers-reduced-motion: reduce) {
  .cl-gesture-print { grid-template-columns: 1fr 1fr; gap: 3px; }
  .cl-gesture-print > span + span { display: block; }
  /* For Maya, cut from her face to the score she has just turned. */
  .cl-gesture-print[data-scene="maya"] > span:first-child { background-position-x: 12%; }
  .cl-gesture-print[data-scene="maya"] > span + span { background-position-x: 86%; }
}
.cl-gesture figcaption { margin: .55rem 0 0; font: italic 1.05rem/1.35 Georgia, serif; }
.cl-full-letter summary { padding: .7rem 0; min-height: 44px; box-sizing: border-box; color: var(--chapter); cursor: pointer; }
#clientDesk .cl-full-letter blockquote { margin-top: 0; }

/* The held letter plate is registered to two small local changes, not a pan:
   a breath through the shoulders and a hand/prop settling into place. */
@media (prefers-reduced-motion:no-preference) {
  .cl-gesture-print > span:first-child { position:relative; }
  .cl-gesture-print > span:first-child::before,
  .cl-gesture-print > span:first-child::after { content:''; position:absolute; inset:0; opacity:0; pointer-events:none;
    background:var(--idle-print) center / auto 100% no-repeat; animation:cl-letter-rest var(--rest-time) 2.4s ease-in-out infinite; }
  .cl-gesture-print > span:first-child::after { background-image:var(--prop-print); animation-delay:3.4s; }
  .cl-gesture-print[data-scene=maya] { --idle-print:url('gesture-art/maya-idle.png'); --prop-print:url('guest-art/maya-rest.webp'); --rest-time:11s; }
  .cl-gesture-print[data-scene=vera] { --idle-print:url('gesture-art/vera-idle.png'); --prop-print:url('guest-art/vera-rest.webp'); --rest-time:13s; }
  .cl-gesture-print[data-scene=nika] { --idle-print:url('gesture-art/nika-idle.png'); --prop-print:url('guest-art/nika-rest.webp'); --rest-time:12s; }
  @keyframes cl-letter-rest { 0%,36%,100% {opacity:0} 12%,18% {opacity:1} }
}

/* The large reaction is its own sheet, not an overlay on a tool or hit area.
   Keep the same footprint through the gesture, the cutaway and every replay. */
.guest-study { margin:0 auto; width:min(100%,26rem); background:#fff9ec; border:1px solid #bdaa8f; box-sizing:border-box; box-shadow:0 2px 6px #59412e25; }
.guest-proof { position:relative; margin:3px; aspect-ratio:16/9; overflow:hidden; background:#e7d5b9; pointer-events:none; }
.guest-proof #clientWornHero { width:100%; height:100%; max-width:none; object-fit:cover; display:block; }
.guest-study figcaption { display:flex; justify-content:space-between; align-items:center; gap:.35rem; padding:0 .45rem; color:#443a30; }
.guest-study figcaption span { font:italic .93rem/1.16 Georgia,serif; }
#clientDesk .guest-study .cl-gesture-replay { flex:none; border:0; box-shadow:none; background:transparent; color:#674451; min-height:44px;
  padding:3px .3rem; font: .8rem/1.1 Georgia,serif; text-decoration:underline; text-underline-offset:3px; }
.guest-reaction,.guest-reaction i { position:absolute; inset:0; pointer-events:none; }
@media(prefers-reduced-motion:no-preference) {
  .guest-proof[data-pending]::after {content:'';position:absolute;inset:0;background:#e7d5b9 var(--thanks) center top / 100% 300% no-repeat;}
}
.guest-proof[data-pending=maya], .guest-reaction[data-scene=maya] { --thanks:url('gesture-art/maya-thanks.jpg'); }
.guest-proof[data-pending=vera], .guest-reaction[data-scene=vera] { --thanks:url('gesture-art/vera-thanks.jpg'); }
.guest-proof[data-pending=nika], .guest-reaction[data-scene=nika] { --thanks:url('gesture-art/nika-thanks.jpg'); }
.guest-reaction i { background:var(--thanks) center top / 100% 300% no-repeat; }
.guest-lines { display:grid; min-width:0; }
.guest-lines > span {grid-area:1/1;align-self:center;}
.guest-lines > [aria-hidden] {visibility:hidden;}
.gift-scene[data-mode=wide] .guest-reaction {display:none;}
.gift-print > .guest-reaction i {background-size:auto 300%;}
.guest-reaction i:nth-child(2) {background-position-y:center;}
.guest-reaction i:nth-child(3) {background-position-y:bottom;}
.guest-reaction:not([data-beat=thanks]) { opacity:0; }
@media(prefers-reduced-motion:no-preference) {
  .guest-reaction {transition:opacity .30s ease-out;}
  .guest-reaction i:nth-child(2) { animation:guest-pose-in .14s .40s ease-out both; }
  .guest-reaction i:nth-child(3) { animation:guest-pose-in .16s .89s ease-out both; }
  @keyframes guest-pose-in {from{opacity:0}to{opacity:1}}
}
@media(prefers-reduced-motion:reduce) {
  .guest-reaction {display:none;}
  .guest-reaction[data-beat=thanks] {display:block; inset:2px auto auto 2px; width:26%; aspect-ratio:16/9; border:1px solid #fff4db;}
  .guest-reaction[data-beat=thanks] i {background-position-y:bottom;}
}
/* Full-body print and its manual inspection tools form the second, smaller row.
   Manual close still gets the original large camera and full grade labels. */
#clientDesk .gift-scene[data-mode=wide] {display:grid;grid-template-columns:minmax(0,.8fr) minmax(0,1.2fr);align-items:center;gap:.35rem .8rem;}
#clientDesk .gift-scene[data-mode=wide] .gift-print {grid-row:1 / 3; width:min(100%,29vh,10rem);}
#clientDesk .gift-scene[data-mode=wide] .gift-tools {display:grid;grid-template-columns:minmax(0,1fr);gap:.35rem;margin:0;}
#clientDesk .gift-scene[data-mode=wide] .gift-tools button {width:100%;min-height:44px;}
#clientDesk .guest-study:has(+ .gift-scene[data-mode=close]) .guest-proof {display:none;}
@media(max-height:650px) {
  .guest-study {width:min(100%,46vh);}
  #clientDesk .gift-scene[data-mode=wide] .gift-print {width:min(100%,19vh);}
}
