/* Artwork is a transparent 3D render. WebP carries the articulated run cycle. */
[data-mascot] { object-fit: contain; }
.empty-state .empty-state-illustration[data-mascot] { transform: none; }
[data-mascot-motion] { transform-origin: 50% 78%; animation-play-state: paused; }
[data-mascot-motion="wave"] { animation: mascot-hello 5s ease-in-out infinite paused; }
[data-mascot-motion="happy"] { animation: mascot-cheer 4.8s ease-in-out infinite paused; }
[data-mascot-motion="curious"] { animation: mascot-curious 5.6s ease-in-out infinite paused; }
[data-mascot-motion][data-mascot-active="true"] { animation-play-state: running; }
[data-mascot-animated] { animation: none; }
.mascot-result-heading { display: flex; align-items: center; gap: var(--gap-controls); }
.mascot-result-cheer { display: block; flex: 0 0 64px; width: 64px; height: 64px; }

.home-mascot-note {
  grid-column: 1 / -1; display: flex; align-items: center; gap: var(--space-5);
  min-width: 0; padding: var(--card-inset); border: 1px solid #f1dfbd;
  border-radius: var(--radius-card); background: linear-gradient(118deg, #fff8e9, #fffdf8 58%, #f9f5ff);
}
.home-welcome-character { display: block; flex: 0 0 132px; width: 132px; height: 132px; }
/* Opaque ankle pivots stay inside the torso throughout the slow gait. Whole-body
   bounce belongs to the shared rig, never to a torso detached from its limbs. */
.home-celebration { position: relative; isolation: isolate; pointer-events: none; }
.home-celebration-poster, .home-celebration-scene { position: absolute; inset: 0; display: block; width: 100%; height: 100%; }
.home-celebration-poster { object-fit: contain; }
.home-celebration-scene { top: 50%; bottom: auto; left: 0; height: auto; aspect-ratio: 1; transform: translateY(-50%); opacity: 0; }
.home-celebration-scene img { display: block; width: 100%; height: auto; max-width: none; }
.home-celebration-rig { position: absolute; inset: 0; display: block; width: 100%; height: 100%; animation: celebration-jog-bounce .75s ease-in-out infinite paused; }
.home-celebration-torso { position: absolute; z-index: 3; inset: 0; display: block; width: 100%; height: 100%; }
.home-celebration .home-celebration-body { position: absolute; z-index: 2; left: 10%; top: 8%; width: 80%; height: auto; animation: none; transform: none; transform-origin: initial; }
.home-celebration-leg { position: absolute; z-index: 1; width: 22%; animation: celebration-jog-stride 1.5s ease-in-out infinite paused; }
/* Source-alpha ankle points: left (220,50), right (155,40). Both hips remain
   deeply inside the cream torso; rotation cannot move these attachment points. */
.home-celebration-leg-left { left: 33.6845%; top: 62.7010%; transform-origin: 55.9796% 12.3762%; }
.home-celebration-leg-right { left: 55.5174%; top: 64.3109%; transform-origin: 38.5572% 9.6386%; animation-delay: -.75s; }
.home-celebration-hand { position: absolute; z-index: 1; display: block; left: 68%; top: 45%; width: 20%; transform-origin: 20% 80%; animation: celebration-jog-hand 1.5s ease-in-out infinite paused; }
.home-celebration-hand img { transform: scaleX(-1); }
.home-celebration-confetti { position: absolute; z-index: 4; inset: 0; }
.home-celebration-confetti-bit { position: absolute; inset: 0; opacity: 0; animation: celebration-confetti-flight 3s linear infinite paused; }
.home-celebration-confetti-bit::before { content: ''; position: absolute; left: 15%; top: 34%; width: 4%; height: 7%; border-radius: 35%; background: #ffc43e; animation: celebration-confetti-turn 3s linear infinite paused; }
.home-celebration-confetti-bit[data-confetti-color="pink"]::before { background: #ff7799; }
.home-celebration-confetti-bit[data-confetti-color="purple"]::before { background: #b77aea; }
.home-celebration-scene[data-celebration-ready="true"]:has(.home-celebration-body[data-mascot-active="true"]) { opacity: 1; }
.home-celebration:has(.home-celebration-scene[data-celebration-ready="true"] .home-celebration-body[data-mascot-active="true"]) > .home-celebration-poster { opacity: 0; }
.home-celebration-scene[data-celebration-ready="true"]:has(.home-celebration-body[data-mascot-active="true"]) :is(.home-celebration-rig, .home-celebration-leg, .home-celebration-hand, .home-celebration-confetti-bit),
.home-celebration-scene[data-celebration-ready="true"]:has(.home-celebration-body[data-mascot-active="true"]) .home-celebration-confetti-bit::before { animation-play-state: running; }
@keyframes celebration-jog-bounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-1.5%); } }
@keyframes celebration-jog-stride {
  0%, 100% { transform: rotate(28deg); z-index: 2; }
  25% { transform: rotate(0deg); z-index: 2; }
  50% { transform: rotate(-28deg); z-index: 1; }
  75% { transform: rotate(0deg); z-index: 1; }
}
@keyframes celebration-jog-hand { 0%, 100% { transform: rotate(-12deg); } 50% { transform: rotate(12deg); } }
@keyframes celebration-confetti-flight {
  0% { opacity: 0; transform: translate(0, 0); }
  7% { opacity: 1; transform: translate(calc(var(--confetti-x) * .24), calc(var(--confetti-y) * .34)); }
  35% { opacity: 1; transform: translate(var(--confetti-x), var(--confetti-y)); }
  70% { opacity: .85; transform: translate(calc(var(--confetti-x) * .4 + var(--confetti-fall-x) * .6), calc(var(--confetti-y) * .5 + var(--confetti-fall-y) * .4)); }
  100% { opacity: 0; transform: translate(var(--confetti-fall-x), var(--confetti-fall-y)); }
}
@keyframes celebration-confetti-turn { from { transform: rotate(-12deg); } to { transform: rotate(var(--confetti-turn)); } }
.home-mascot-copy { min-width: 0; flex: 1; }
.home-mascot-eyebrow { color: #a77b3f; font-size: 12px; font-weight: 700; }
.home-mascot-title { margin: 7px 0 0; color: #594229; font-family: var(--font-display); font-size: 22px; line-height: 1.4; letter-spacing: -.025em; word-break: keep-all; }
.home-mascot-description { margin: 9px 0 0; color: #857768; font-size: 14px; line-height: 1.6; word-break: keep-all; }
.home-mascot-action { display: inline-flex; align-items: center; justify-content: center; gap: 8px; flex: 0 0 auto; min-height: 44px; padding: 10px 14px; border: 1px solid #e4d8f6; border-radius: var(--radius-button); background: #fff; color: #7658df; font-size: 14px; font-weight: 700; line-height: 1.5; text-decoration: none; }
.home-mascot-action:hover { background: #f5f0ff; }
.home-mascot-action .icon { width: 17px; height: 17px; }
.home-empty .home-empty-character[data-mascot] { width: 104px; height: 104px; }
.home-empty .home-empty-character[data-mascot-motion="cry"] {
  width: 160px; height: 128px;
  --home-empty-edge-mask: linear-gradient(90deg, transparent 2%, #000 8%, #000 92%, transparent 98%), linear-gradient(180deg, transparent 2%, #000 8%, #000 92%, transparent 98%);
  -webkit-mask-image: var(--home-empty-edge-mask);
  mask-image: var(--home-empty-edge-mask);
  -webkit-mask-composite: source-in;
  mask-composite: intersect;
}
.guide-shot img.guide-shot-gun { object-fit: contain; }

.properties-empty-scene { position: relative; isolation: isolate; flex: 0 0 auto; width: min(280px, 100%); aspect-ratio: 5 / 4; margin-bottom: var(--space-6); --properties-empty-ground: 92.4%; }
.properties-empty-scene::before { content: ""; position: absolute; z-index: 0; left: 14%; right: 14%; top: var(--properties-empty-ground); height: 8%; border-radius: 50%; background: #402c3926; filter: blur(8px); transform: translateY(-50%); pointer-events: none; }
/* The full-alpha crying artwork already includes its soft contact shadow. */
.properties-empty-scene[data-empty-scene="cry"]::before { content: none; }
.properties-empty-layer { position: absolute; inset: 0; opacity: 0; pointer-events: none; transition: opacity 210ms ease-in-out; }
.properties-empty-layer[data-empty-active="true"] { opacity: 1; }
.properties-empty-scene[data-empty-instant="true"] .properties-empty-layer { transition: none; }
.properties-empty-scene .properties-empty-character { position: absolute; z-index: 2; inset: 0; display: block; width: 100%; height: 100%; max-width: none; margin: 0; }
.properties-empty-layer[data-empty-layer="sad"] .properties-empty-character { inset: 50% auto auto 50%; width: auto; height: 110%; transform: translate(-50%, -50%); }
/* The prone render has extra transparent space below its hands and puddle. */
.properties-empty-layer[data-empty-layer="cry"] { inset: 23.2% 4% -15.2%; }
.properties-empty-layer[data-empty-layer="cry"] .properties-empty-character {
  inset: 15% auto auto -5%; width: 82%; height: 82%; transition: opacity 100ms ease-in-out;
  /* Fade only distant studio-shadow edges; every limb stays inside the solid centre. */
  --properties-empty-edge-mask: linear-gradient(90deg, transparent 2%, #000 8%, #000 92%, transparent 98%), linear-gradient(180deg, transparent 2%, #000 8%, #000 92%, transparent 98%);
  -webkit-mask-image: var(--properties-empty-edge-mask);
  mask-image: var(--properties-empty-edge-mask);
  -webkit-mask-composite: source-in;
  mask-composite: intersect;
}
.properties-empty-layer[data-empty-layer="cry"] #properties-empty-cry { opacity: 0; }
.properties-empty-layer[data-empty-animation-ready="true"] .properties-empty-poster { opacity: 0; }
.properties-empty-layer[data-empty-animation-ready="true"] #properties-empty-cry { opacity: 1; }
.properties-empty h2 { width: 100%; font-size: clamp(16px, 4.6vw, 20px); line-height: 1.5; }
/* Reserve the upper-right area for the whole sheet, clear of the crying mascot. */
.properties-empty-list { position: absolute; z-index: 3; top: -22%; right: 0; width: 48%; height: 60%; padding: var(--space-4) var(--space-3); border: 1px solid #e1d9ec; border-radius: var(--radius-control); background: linear-gradient(135deg, #fff, #fcfaff); box-shadow: 0 6px 12px #6d4e8c10; transform: rotate(5deg); }
.properties-empty-list strong { display: block; color: #78628d; font-family: var(--font-display); font-size: clamp(13px, 3.8vw, 17px); line-height: 1.5; text-align: center; white-space: nowrap; }
.properties-empty-list-status { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); color: #78628d; font-family: var(--font-display); font-size: clamp(14px, 4vw, 18px); line-height: 1.5; white-space: nowrap; }

.mascot-run-stage { position: relative; isolation: isolate; width: min(288px, 100%); aspect-ratio: 1.12; margin: 0 auto var(--space-5); }
.mascot-run { position: relative; z-index: 2; display: block; width: 100%; height: 100%; }
.mascot-run-stage::before { content: ''; position: absolute; z-index: -1; inset: 8% 3% 0; border-radius: 50%; background: radial-gradient(ellipse, #fff2cf 0, #fff8e8 46%, #fff8e800 72%); }
.mascot-run-track { position: absolute; z-index: 1; left: 16%; right: 16%; bottom: 8%; height: 8%; border-radius: 50%; background: #8e582d18; filter: blur(7px); }
.mascot-run-streaks { position: absolute; z-index: 3; width: 16%; height: 5px; left: 1%; top: 47%; border-radius: 8px; background: #f7c36b; box-shadow: 8px 15px 0 -1px #f3d99e, -8px -15px 0 -1px #f8d899; opacity: 0; animation: mascot-speed .36s linear infinite paused; }
.mascot-run-cheer { position: absolute; z-index: 3; top: 5%; right: 0; padding: 8px 11px; border: 1px solid #f4dbb5; border-radius: 13px 13px 13px 3px; background: #fffcf4; color: #a77637; font-family: var(--font-display); font-size: 14px; transform: rotate(7deg); animation: mascot-chant .52s ease-in-out infinite paused; }
.mascot-run-stage:has([data-mascot-active="true"]) .mascot-run-streaks,
.mascot-run-stage:has([data-mascot-active="true"]) .mascot-run-cheer { animation-play-state: running; }
.loading-page .mascot-loading-copy { margin: var(--space-3) 0 0; color: #8c8198; font-size: 14px; line-height: 1.75; }
.loading-page:has(.mascot-run-stage) h1 { font-family: var(--font-display); font-size: clamp(23px, 4.8vw, 30px); color: #665044; }
.loading-page:has(.mascot-run-stage) .loading-progress { margin-top: var(--space-5); background: #eee5f6; }
.loading-page:has(.mascot-run-stage) .loading-progress > span { width: 35%; border-radius: inherit; animation: mascot-progress .9s ease-in-out infinite alternate paused; }
.loading-page:has([data-mascot-active="true"]) .loading-progress > span { animation-play-state: running; }

@keyframes mascot-hello { 0%, 8%, 28%, 100% { transform: rotate(0); } 13%, 23% { transform: rotate(-5deg); } 18% { transform: rotate(4deg); } }
@keyframes mascot-cheer { 0%, 12%, 30%, 100% { transform: translateY(0) rotate(0); } 18% { transform: translateY(-4px) rotate(-2deg); } 24% { transform: translateY(0) rotate(2deg); } }
@keyframes mascot-curious { 0%, 14%, 50%, 100% { transform: rotate(0); } 26%, 38% { transform: rotate(-3deg); } }
@keyframes mascot-speed { 0% { opacity: 0; transform: translateX(18px) scaleX(.5); } 30% { opacity: .8; } 100% { opacity: 0; transform: translateX(-20px) scaleX(1); } }
@keyframes mascot-chant { 0%, 100% { transform: rotate(7deg) translateY(0); } 50% { transform: rotate(4deg) translateY(-3px); } }
@keyframes mascot-progress { from { transform: translateX(0); } to { transform: translateX(186%); } }

@media (max-width: 760px) {
  .home-mascot-note { display: grid; grid-template-columns: 100px minmax(0, 1fr); gap: var(--space-3) var(--space-4); }
  .home-welcome-character { flex-basis: 100px; width: 100px; height: 100px; }
  .home-mascot-title { font-size: 19px; }
  .home-mascot-description { font-size: 13px; }
  .home-mascot-action { grid-column: 1 / -1; justify-self: end; }
}
@media (max-width: 380px) {
  .home-mascot-note { grid-template-columns: 76px minmax(0, 1fr); }
  .home-welcome-character { flex-basis: 76px; width: 76px; height: 88px; }
  .home-mascot-title { font-size: 17px; }
  .home-mascot-action { width: 100%; }
  .mascot-run-stage { width: min(244px, 100%); }
}
@media (prefers-reduced-motion: reduce) {
  .home-celebration-scene { opacity: 0 !important; }
  .home-celebration > .home-celebration-poster { opacity: 1 !important; }
  .home-celebration-scene *, .home-celebration-confetti-bit::before { animation: none !important; }
  .properties-empty-layer[data-empty-layer="cry"] .properties-empty-character { transition: none; }
  .properties-empty-layer { transition: none; }
  [data-mascot-motion], .mascot-run-streaks, .mascot-run-cheer,
  .loading-page:has(.mascot-run-stage) .loading-progress > span { animation: none !important; transform: none; }
  .mascot-run-streaks { display: none; }
  .loading-page:has(.mascot-run-stage) .loading-progress > span { width: 100%; opacity: .55; }
}

/* The runner travels above the step labels while its articulated run loops in place. */
.step-nav { position: relative; }
.step-run-track { position: absolute; top: var(--space-12); height: 2px; border-radius: 2px; background: var(--line); pointer-events: none; }
#step-run-fill { display: block; height: 100%; border-radius: inherit; background: var(--color-accent); transition: width 1100ms cubic-bezier(.25,.46,.45,.94); }
.step-runner { position: absolute; z-index: 1; left: 0; top: -8px; display: block; width: 64px; height: 64px; pointer-events: none; }
.step-runner > img { display: block; width: 100%; height: 100%; object-fit: contain; }
@media (prefers-reduced-motion: reduce) {
  #step-run-fill { transition: none; }
}
