/* Scene motion is distinct for every topic and every response. */
.x-visual{padding:0;scroll-margin-top:18px}.x-scene{position:relative;width:100%;max-width:510px;margin:0 auto;isolation:isolate}.x-scene>svg{display:block;width:100%;max-height:none;height:auto}.x-visual>p{font-size:15px;line-height:1.8;min-height:2em;margin:15px auto 0;max-width:30em}.x-scene-tools{display:flex;gap:17px;justify-content:center;align-items:center;flex-wrap:wrap;margin-top:13px}.x-scene-tools .x-link-button{font-size:11px}.x-scene-tools button:disabled{cursor:default;opacity:.8}.x-stage-labels{margin-top:17px}.x-object-controls{display:flex;justify-content:center;gap:12px;position:relative;margin:0 10px}.x-object-controls button{min-height:48px;border:1.5px solid var(--p-brown);border-radius:100px;background:var(--p-paper);padding:5px 15px 5px 9px;font-size:12px;font-weight:700;display:flex;align-items:center;gap:5px;line-height:1.5}.x-object-controls svg{width:28px;height:30px;max-height:none;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}.x-object-controls button[aria-pressed=true],.x-object-controls button:hover{background:var(--p-action)}.x-answer{padding:14px 17px;gap:16px}.x-answer>.x-choice-preview{width:52px;height:56px;border:0;border-radius:8px;background:var(--p-hero);flex:none;display:grid;place-items:center}.x-choice-preview svg{width:34px;height:36px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}.x-answer>span:nth-child(2){flex:1}.x-choice-action{font-size:11px;font-weight:700;white-space:nowrap}.x-answer[aria-pressed=true]>.x-choice-preview{background:var(--p-paper)}
/* Book: actual text reflows; both presets and a continuous range are usable. */
.x-book-scene{padding-top:40px}.x-book-backdrop{position:absolute;inset:10px -8px 72px;border-radius:48% 44% 38% 39%;background:var(--p-sage-light);z-index:-1}.x-open-book{display:grid;grid-template-columns:1fr 1fr;min-height:286px;max-width:475px;margin:0 auto;border:3px solid var(--p-ink);border-radius:8px 8px 12px 12px;background:var(--p-paper);box-shadow:0 7px 0 #dac9b6;transform:rotate(-2deg);transition:transform .6s var(--p-ease)}.x-book-page{position:relative;padding:20px 17px 29px;min-width:0;overflow:hidden;height:286px}.x-book-page-text{border-right:2px solid var(--p-line);transform-origin:right center}.x-book-page-picture{padding:12px 14px 22px}.x-book-page-picture>svg{width:100%;height:100%;max-height:250px}.x-book-chapter{font-size:10px!important;line-height:1.5!important;font-weight:700;margin:0 0 13px!important}.x-page-number{position:absolute;bottom:7px;left:0;right:0;font-size:9px;text-align:center}#x-preview-text{font-size:var(--book-size,17px);line-height:var(--book-leading,1.7);font-weight:500;letter-spacing:.025em;transition:font-size .35s,line-height .35s}.x-book-scene[data-mode=dense] .x-open-book{transform:rotate(-3deg)}.x-book-scene[data-mode=airy] .x-open-book{transform:rotate(1deg)}.x-book-scene[data-mode=airy] .x-book-page-text{animation:x-story-page-settle 1.2s ease-out}.x-book-adjust{margin:27px auto 0;max-width:450px;padding:0 10px}.x-book-adjust label{display:block;font-size:13px;font-weight:700;margin-bottom:10px}#x-book-spacing{width:100%;height:26px;accent-color:var(--p-strong);cursor:ew-resize}.x-range-labels{display:flex;justify-content:space-between;align-items:center;gap:10px;font-size:10px}.x-range-labels output{font-variant-numeric:tabular-nums}
.x-visual.is-paused *{animation-play-state:paused!important;transition:none!important}
@media(max-width:1100px){.x-workspace{gap:32px}.x-answer{gap:10px;padding:13px}.x-choice-action{display:none}.x-object-controls{gap:7px}.x-object-controls button{font-size:11px;padding-right:10px}.x-book-page{padding-inline:12px}}
@media(max-width:750px){.x-workspace{display:grid;grid-template-columns:1fr;gap:14px}.x-question-side{display:contents}.x-question-side>.x-kicker{grid-row:1;margin:0}.x-question-side>h2{grid-row:2;font-size:26px}.x-question-side>.x-prompt{grid-row:3;margin:0}.x-visual{grid-row:4;position:static;padding:0;margin-block:5px 7px}.x-answers{grid-row:5;margin:0}.x-feedback{grid-row:6;margin-top:8px}.x-scene>svg{max-height:235px}.x-object-controls{margin-top:0}.x-object-controls button{min-height:43px;padding-block:4px;font-size:11px}.x-object-controls svg{width:24px;height:26px}.x-visual>p{font-size:13px;margin-top:10px;min-height:0}.x-scene-tools{gap:13px;margin-top:10px}.x-stage-labels{display:none}.x-answer>.x-choice-preview{width:43px;height:48px}.x-answer{min-height:77px;font-size:14px}.x-choice-preview svg{width:30px;height:32px}.x-book-scene{padding:22px 6px 0}.x-book-backdrop{inset:0 0 75px}.x-open-book{min-height:258px}.x-book-page{height:258px;padding:14px 11px 25px}.x-book-chapter{font-size:9px!important;margin-bottom:9px!important}.x-book-adjust{margin-top:20px;padding:0 3px}.x-book-adjust label{font-size:12px;margin-bottom:5px}.x-range-labels{font-size:9px}.x-book-page-picture>svg{max-height:205px}.x-scene-tools .x-link-button{font-size:10px}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;transition:none!important}}

.x-book-page-text{text-align:left}.x-feedback{animation:none}
/* Reference pass: stage the explanation, keep direct manipulation immediate. */
#x-preview-text{transition:none}.x-topic:hover .x-island,.x-topic:nth-child(2):hover .x-island{transform:none}
@media(hover:hover) and (pointer:fine){.x-topic:hover .x-island{transform:translateY(-6px) rotate(-2deg)}.x-topic:nth-child(2):hover .x-island{transform:translateY(-6px) rotate(2deg)}}
@media(prefers-reduced-motion:reduce){.x-topic:hover .x-island,.x-topic:nth-child(2):hover .x-island{transform:none}}

#x-feedback-title{scroll-margin-top:125px}
#x-response{margin:12px 0 24px;line-height:1.85}


/* The artwork stays still. Each choice has a small, optional visual cue. */
.x-topic .x-island {
  aspect-ratio: 3 / 2;
}
.x-topic .x-island img,
.x-story-art img,
.x-book-page-picture img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.x-story-art {
  position: relative;
  aspect-ratio: 3 / 2;
  margin: 0 auto 12px;
}
.x-story-art .x-story-cues {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-height: none;
  pointer-events: none;
}
.x-story-bubble {
  fill: #fff2dc;
  stroke: #af7651;
  stroke-width: 3;
}
.x-story-bubble circle:not(.x-thought-tail) {
  fill: #a56036;
  stroke: none;
}
.x-cue-line, .x-clock-hand {
  fill: none;
  stroke: #ad6a35;
  stroke-width: 6;
  stroke-linecap: round;
}
.x-listen-cue, .x-suggest-cue, .x-wait-cue, .x-gesture-cue {
  opacity: 0;
}
.x-listening-scene .x-listen-cue,
.x-listening-scene[data-mode=suggest] .x-suggest-cue,
.x-expression-scene[data-mode=wait] .x-wait-cue,
.x-expression-scene[data-mode=gesture] .x-gesture-cue {
  opacity: 1;
}
.x-bubble-motion {
  transform-box: fill-box;
  transform-origin: center bottom;
}
.x-listening-scene .x-listen-cue .x-bubble-motion,
.x-listening-scene[data-mode=suggest] .x-suggest-cue .x-bubble-motion,
.x-expression-scene[data-mode=wait] .x-bubble-motion {
  animation: x-bubble-speak 4.8s ease-in-out infinite;
}
.x-listening-scene[data-mode=suggest] .x-listen-cue .x-bubble-motion {
  animation-delay: 1.35s;
}
.x-speaking-dot {
  animation: x-speech-dot 1.5s ease-in-out infinite;
}
.x-speaking-dot:nth-of-type(2) { animation-delay: .16s; }
.x-speaking-dot:nth-of-type(3) { animation-delay: .32s; }
.x-listening-scene[data-mode=suggest] .x-suggest-cue .x-cue-line {
  stroke-dasharray: 90;
  animation: x-speech-lines 4.8s ease-out infinite;
}
.x-clock-sweep { transform-origin: 75px 40px; }
.x-expression-scene[data-mode=wait] .x-clock-sweep {
  animation: x-wait-clock 4.8s ease-in-out infinite;
}
.x-story-pointing-pose {
  position: absolute;
  inset: 0;
  opacity: 0;
  /* Confine the alternate illustration to the painted sleeve and hand. */
  clip-path: inset(59% 54% 10% 18%);
}
.x-point-trail, .x-bun-ring {
  fill: none;
  stroke-width: 7;
  stroke-linecap: round;
}
.x-point-trail {
  stroke: #a65d2e;
  stroke-dasharray: 2 18;
}
.x-bun-ring {
  stroke: #a65d2e;
  transform-box: fill-box;
  transform-origin: center;
}
.x-expression-scene[data-mode=gesture] .x-story-pointing-pose {
  opacity: 1;
  animation: x-point-pose 4.8s ease-in-out infinite;
}
.x-expression-scene[data-mode=gesture] .x-point-trail {
  animation: x-point-path 4.8s ease-in-out infinite;
}
.x-expression-scene[data-mode=gesture] .x-bun-ring {
  animation: x-mark-bun 4.8s ease-in-out infinite;
}
@keyframes x-bubble-speak {
  0%, 100% { transform: translateY(24px) scale(.73); }
  14%, 60% { transform: translateY(0) scale(1); }
  27%, 52% { transform: translateY(-13px) scale(1.04); }
}
@keyframes x-speech-dot {
  0%, 50%, 100% { translate: 0 0; }
  25% { translate: 0 -13px; }
}
@keyframes x-speech-lines {
  0%, 100% { stroke-dashoffset: 70; }
  23%, 78% { stroke-dashoffset: 0; }
}
@keyframes x-wait-clock {
  0% { transform: rotate(0); }
  74%, 100% { transform: rotate(360deg); }
}
@keyframes x-point-pose {
  0%, 10%, 100% { opacity: 0; clip-path: inset(59% 74% 10% 18%); }
  22%, 81% { opacity: 1; clip-path: inset(59% 54% 10% 18%); }
}
@keyframes x-point-path {
  0%, 21%, 100% { opacity: 0; stroke-dashoffset: 75; }
  34%, 74% { opacity: 1; stroke-dashoffset: 0; }
}
@keyframes x-mark-bun {
  0%, 28%, 100% { opacity: 0; transform: scale(.78); }
  40% { opacity: 1; transform: scale(1.1); }
  56%, 76% { opacity: .86; transform: scale(1); }
}

.x-book-backdrop {
  background: radial-gradient(ellipse at center, #f8d9b1 15%, #fbe9d1 60%, transparent 76%);
}
.x-open-book {
  border: 2px solid #b07850;
  background: #f8e8cc;
  box-shadow: 0 4px 0 #d4ac80, 0 9px 0 -2px #e5c6a2;
  transform: none;
}
.x-book-page {
  background: linear-gradient(90deg, #fff3dd 62%, #f1d5ae);
}
.x-book-page-text {
  border-right: 1px solid #cb9c6d;
  border-radius: 6px 0 0 9px;
}
.x-book-page-picture {
  background: linear-gradient(90deg, #f1d5ae, #fff3dd 28%);
  border-radius: 0 6px 9px 0;
  transform-origin: left center;
  animation: x-story-page-lift 8s ease-in-out infinite;
}
.x-book-scene[data-mode=dense] .x-open-book {
  transform: rotate(-1deg);
}
.x-book-scene[data-mode=airy] .x-open-book {
  transform: rotate(.5deg);
}
@keyframes x-story-page-lift {
  0%, 48%, 90%, 100% { transform: perspective(600px) rotateY(0); }
  69% { transform: perspective(600px) rotateY(-6deg); }
}
@keyframes x-story-page-settle {
  from { transform: perspective(600px) rotateY(-8deg); }
  to { transform: perspective(600px) rotateY(0); }
}
@media (max-width: 750px) {
  .x-story-art { max-width: 352px; }
}
