#mascot-preview {
  position: fixed;
  inset: 0;
  z-index: 7;
  pointer-events: none;
  isolation: isolate;
  color: #fff8e9;
  --panel: #24362e;
}
#mascot-figures {
  position: absolute;
  right: clamp(14px, 7vw, 110px);
  bottom: 0;
  display: flex;
  align-items: end;
  gap: clamp(0px, 1.1vw, 20px);
  --guide-height: min(94svh, 62vw);
}
.guide-figure {
  position: relative;
  flex: none;
  transform-origin: 50% 99%;
  filter: drop-shadow(3px 4px 13px #26190c37);
  transform: translate(var(--shift, 0px), var(--lift, 0px)) rotate(var(--lean, 0deg));
  transition: transform 95ms linear;
}
.guide-figure > img { display: block; width: 100%; height: 100%; }
.guide-figure.huego { height: var(--guide-height); aspect-ratio: 375 / 1096; }
.guide-figure.sola { height: calc(var(--guide-height) * .45); aspect-ratio: 436 / 497; }
.guide-mouth {
  position: absolute;
  background-size: 500% 100%;
  background-repeat: no-repeat;
}
.mascot-dock {
  position: absolute;
  left: max(12px, env(safe-area-inset-left), 4vw);
  bottom: max(12px, env(safe-area-inset-bottom));
  width: min(38rem, 43vw);
}
.mascot-controls { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.mascot-controls button, #mascot-show {
  pointer-events: auto;
  min-height: 44px;
  padding: 0 13px;
  border-radius: 999px;
  border: 1px solid #d8bb8d88;
  background: var(--panel);
  color: inherit;
  font: 650 .82rem/1.15 system-ui, sans-serif;
  box-shadow: 0 3px 12px #16261e42;
}
.mascot-controls button:hover, #mascot-show:hover { background: #344c3d; }
#mascot-show {
  position: fixed;
  z-index: 7;
  --panel: #24362e;
  color: #fff8e9;
  right: max(12px, env(safe-area-inset-right));
  bottom: max(12px, env(safe-area-inset-bottom));
}
#mascot-caption {
  width: fit-content;
  max-width: 100%;
  margin: 0 0 8px;
  padding: .6rem .8rem;
  border-radius: .55rem;
  background: #18281ff5;
  color: inherit;
  font: 500 clamp(.8rem, 1.36vw, 1rem)/1.43 system-ui, sans-serif;
}
.mascot-doors {
  pointer-events: auto;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(5px, 1vw, 11px);
  padding: 9px 9px 11px;
  margin-bottom: 8px;
  border-radius: 12px;
  background: #202e27f5;
  box-shadow: 0 5px 20px #17261d55;
}
.mascot-door {
  display: grid;
  place-items: center;
  position: relative;
  min-height: clamp(82px, 13vw, 150px);
  padding: 7px 3px;
  border: 3px solid #5a3e2c;
  border-radius: 45% 45% 4px 4px / 25% 25% 4px 4px;
  box-shadow: inset 0 0 0 2px #d0ab726e, inset 4px 0 9px #16150c85;
  background: var(--door-fill);
  text-decoration: none;
  text-align: center;
  line-height: 1.15;
  font: 650 clamp(.67rem, 1.15vw, .91rem)/1.15 system-ui, sans-serif;
}
.mascot-door span {
  z-index: 1;
  background: #231c16f5;
  padding: .37em .28em;
  border-radius: 3px;
  color: #fff8e9;
}
.mascot-door::after {
  content: '';
  position: absolute;
  right: 9%;
  bottom: 21%;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 25%, #ffe1a4, #97612f 73%);
  box-shadow: 0 1px 2px #20170f;
}
.mascot-door:hover span { background: #304736; }
.mascot-door:nth-child(1) {
  --door-fill: repeating-linear-gradient(100deg, #ffffff08 0 3px, #2a160829 4px 6px), repeating-linear-gradient(90deg, #895131 0 27px, #3d271b 28px 30px, #b07549 31px 49px, #4a3020 50px 52px);
}
.mascot-door:nth-child(2) {
  border-radius: 8px;
  --door-fill: repeating-linear-gradient(0deg, #141e1733 0 2px, transparent 3px 27px), repeating-linear-gradient(98deg, #47625c 0 8px, #89918a 10px 14px, #3f534e 16px 20px);
}
.mascot-door:nth-child(3) {
  --door-fill: linear-gradient(153deg, transparent 27%, #271d15ad 28%, #a6814e 31% 39%, #2c2115ad 41%, transparent 42%), repeating-linear-gradient(90deg, #775947 0 12px, #a58d58 13px 23px, #50645a 24px 37px, #513828 38px 51px);
}
.mascot-door:nth-child(4) {
  border-radius: 50% 50% 7px 7px / 17% 17% 7px 7px;
  --door-fill: linear-gradient(0deg, transparent 13%, #33291f 14% 17%, #9e8054 18%, transparent 20% 79%, #3a3022 80% 83%, transparent 84%), repeating-linear-gradient(90deg, #885f43 0 15px, #666958 16px 31px, #a17744 32px 51px);
}
@media (max-width: 760px) {
  #mascot-figures { right: 3vw; --guide-height: min(86svh, 125vw); }
  .mascot-dock { left: 9px; right: 9px; width: auto; }
  .mascot-controls { justify-content: end; gap: 4px; }
  .mascot-controls button { padding-inline: 10px; }
  #mascot-caption { margin-left: auto; }
}
@media (prefers-reduced-motion: reduce) {
  .guide-figure { transform: none; }
}

.mascot-toolbar {
  position: absolute;
  top: max(8px, env(safe-area-inset-top));
  left: auto;
  right: max(8px, env(safe-area-inset-right));
  bottom: auto;
}
.mascot-toolbar {
  max-width: calc(100% - 16px);
  flex-wrap: nowrap;
  justify-content: flex-end;
  gap: 3px;
  z-index: 2;
}
#mascot-show { top: auto; }
.mascot-toolbar button, #mascot-show {
  min-width: 44px;
  padding-inline: 8px;
  font-size: .75rem;
  white-space: nowrap;
}
#mascot-caption {
  position: absolute;
  top: 37%;
  left: 3%;
  max-width: 21%;
  margin: 0;
  z-index: 1;
}
.mascot-dock {
  bottom: max(10px, env(safe-area-inset-bottom));
  z-index: 1;
  width: min(24rem, 29vw);
}
#mascot-figures, #mascot-preview .guide-performance-canvas {
  position: absolute;
  inset: auto;
  bottom: var(--figure-bottom, 8px);
  left: var(--figure-center, 58%);
  width: var(--figure-width, 66vw);
  height: var(--figure-height, 80svh);
  transform: translateX(-50%);
}
#mascot-figures {
  --guide-height: 94%;
  justify-content: center;
  gap: 10%;
}
.guide-figure { filter: none; }
@media (max-width: 760px) {
  #mascot-caption {
    top: max(58px, calc(env(safe-area-inset-top) + 50px));
    left: 10px;
    right: 10px;
    max-width: 34rem;
    margin-inline: auto;
    text-align: center;
  }
  .mascot-dock { left: 8px; right: 8px; width: auto; }
  .mascot-doors { margin: 0; padding: 4px; }
  .mascot-door { min-height: 54px; }
}
@media (max-width: 300px) {
  .mascot-toolbar button { min-width: 40px; padding-inline: 4px; }
}
