/* The semantic text and native buttons form the front layers of the 3D atelier. */
#atelier .lab-title-word { display: inline-block; white-space: nowrap; }
#atelier .lab-title-char { display: inline-block; backface-visibility: hidden; }
#atelier #playground-title { position: relative; overflow: visible; }
#atelier .lab-doodles { position: absolute; inset: -34px -6px -22px; pointer-events: none; }
#atelier .lab-doodle { position: absolute; display: block; transform-origin: 50% 50%; }
#atelier .lab-doodle--flower { width: 42px; height: 42px; top: 0; right: 12%; display: grid; grid-template-columns: 1fr 1fr; }
#atelier .lab-doodle--flower i { background: linear-gradient(140deg, #efabdb, #ef8952); border-radius: 0 100% 0 0; }
#atelier .lab-doodle--flower i:nth-child(2) { rotate: 90deg; }
#atelier .lab-doodle--flower i:nth-child(3) { rotate: -90deg; }
#atelier .lab-doodle--flower i:nth-child(4) { rotate: 180deg; }
#atelier .lab-doodle--dot { width: 13px; height: 13px; border-radius: 50%; background: #efb966; right: 3%; top: 18%; }
#atelier .lab-doodle--ring { width: 22px; height: 22px; border: 4px solid #ad87c4; border-radius: 50%; left: -24px; top: 48%; }
#atelier .lab-doodle--spring { width: 26px; height: 60px; bottom: -8px; right: 9%; color: #af88c6; }
#atelier .lab-title-char { transform-origin: 50% 85%; }
#atelier .lab-replay .lab-title-word,
#atelier .lab-replay .lab-title-char { font-size: inherit; }
#atelier.lab-live-type.atelier--three .has-three-scene .lab-core {
  position: absolute; inset: 28% 8% auto; width: auto; height: auto;
  overflow: visible; clip-path: none; padding: 22px 8px; z-index: 4;
}
#atelier.lab-live-type.atelier--three .has-three-scene .poster-title { font-size: clamp(46px, 4.6vw, 70px); }
@media (max-width: 480px) {
  #atelier .lab-doodle--flower { width: 32px; height: 32px; right: 4%; top: 4px; }
  #atelier .lab-doodle--ring { width: 14px; height: 14px; left: -15px; border-width: 3px; }
  #atelier .lab-doodle--spring { width: 20px; height: 44px; bottom: -4px; right: 0; }
}
#atelier .lab-title-text { perspective: 800px; }
#atelier:not(.atelier--three) .lab-orbit { animation: none; }
#atelier:not(.atelier--three) .lab-core { animation: none; transform: none; transition: none; }
#atelier:not(.atelier--three) .lab-replay { display: none; }
#atelier:not(.atelier--three) .atelier-physics-hint { display: none; }
#atelier:not(.atelier--three) .lab-stage { height: clamp(490px, 47vw, 650px); }
#atelier .atelier-launch-actions { display: grid; justify-items: center; gap: 10px; margin-top: 18px; }
#atelier .atelier-visual { padding-bottom: 0; }
#atelier .atelier-launch {
  display: inline-flex; align-items: center; gap: 10px; border: 1px solid var(--wine);
  border-radius: 30px; padding: 13px 22px; color: var(--paper); background: var(--wine);
  font: 600 12px/1.5 var(--heading); cursor: pointer;
}
#atelier .atelier-launch:disabled { cursor: wait; opacity: .75; }
#atelier .atelier-launch.is-loading::before {
  content: ''; width: 13px; height: 13px; border: 2px solid currentColor;
  border-right-color: transparent; border-radius: 50%; animation: atelier-loader .8s linear infinite;
}
#atelier .atelier-load-status { min-height: 1.6em; margin: 0; max-width: 380px; text-align: center; font-size: 12px; color: var(--wine); }
#atelier .atelier-physics-hint { position: static; margin-top: 14px; }
@keyframes atelier-loader { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { #atelier .atelier-launch.is-loading::before { animation: none; } }
#atelier.atelier--three { position: relative; isolation: isolate; overflow: clip; }
#atelier.atelier--three .playground-inner {
  perspective: 1300px; transform-style: preserve-3d;
}
#atelier.atelier--three .playground-copy {
  transform-style: preserve-3d;
  transform: rotateX(var(--atelier-rx, 0deg)) rotateY(var(--atelier-ry, 0deg));
  transition: transform .35s ease-out;
}
#atelier.atelier--three .playground-copy h2 {
  transform: translateZ(38px);
  text-shadow: 0 1px 0 rgba(255,255,255,.7), 2px 4px 0 rgba(68,35,49,.06), 0 18px 24px rgba(68,35,49,.08);
}
#atelier.atelier--three .mood-controls,
#atelier.atelier--three .effect-controls { transform: translateZ(24px); }
#atelier.atelier--three .mood-choice {
  box-shadow: 0 4px 0 rgba(68,35,49,.1), 0 10px 22px rgba(68,35,49,.05);
  transition: box-shadow .2s, background .2s;
}
#atelier.atelier--three .mood-choice.active { box-shadow: 0 4px 0 rgba(68,35,49,.22), 0 12px 24px rgba(68,35,49,.12); }
#atelier.atelier--three .lab-stage.has-three-scene {
  border-radius: 28px; overflow: hidden; background: var(--lab-light);
  box-shadow: 0 34px 65px -28px rgba(68,35,49,.3), inset 0 0 0 1px rgba(255,255,255,.6);
  height: clamp(490px, 47vw, 650px);
}
#atelier .atelier-three-canvas {
  position: absolute; inset: 0; width: 100%; height: 100%; display: block;
  z-index: 3; touch-action: none; cursor: grab;
}
#atelier .atelier-three-canvas[hidden] { display: none; }
#atelier .atelier-three-canvas.is-grabbed { cursor: grabbing; touch-action: none; }
#atelier .has-three-scene .lab-orbit,
#atelier .has-three-scene .lab-impulse { display: none; }
#atelier .has-three-scene .lab-core {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip-path: inset(50%); padding: 0; inset: 0; border: 0;
}
#atelier .has-three-scene .poster-edition,
#atelier .has-three-scene .lab-signature { z-index: 4; pointer-events: none; }
#atelier .has-three-scene .poster-edition { top: 28px; }
#atelier.atelier--three .atelier-physics { display: none; }
#atelier .has-three-scene .lab-replay { z-index: 6; box-shadow: 0 5px 18px rgba(68,35,49,.12); }
#atelier .atelier-shape-control {
  position: absolute; z-index: 5; width: 56px; height: 56px; margin: -28px;
  padding: 0; border: 2px solid currentColor; border-radius: 50%; opacity: 0;
  pointer-events: none; background: rgba(255,255,255,.8); color: var(--lab-ink);
}
#atelier .atelier-shape-control:focus-visible { opacity: 1; outline: 3px solid var(--lab-ink); outline-offset: 4px; }
@media (max-width: 900px) {
  #atelier.atelier--three .playground-copy { transform: none; }
  #atelier.atelier--three .lab-stage.has-three-scene { height: 500px; }
}
[data-motion="off"] #atelier.atelier--three .playground-copy { transform: none; transition: none; }
@media (prefers-reduced-motion: reduce) {
  #atelier.atelier--three .playground-copy { transform: none; transition: none; }
}
