/* Hallmark · Learning Kingdom · v2.0.0 · shape: app screen · genre: playful */
:root {
  --room-item-shadow: #4c33283d;
  --room-moon-gold: #fff09d;
  --room-moon-pink: #ffd0ed;
  --room-moon-sky: #b4eaff;
  --room-ladybug-ink: #412c26;
  --room-ladybug-red: #a44137;
  --room-ladybug-coral: #c85647;
  --room-bubble-rim: #fdfdffe0;
  --room-bubble-highlight: #fffdf3;
  --room-bubble-sky: #8dd7e969;
  --room-bubble-gold: #f8df8de0;
  --room-bubble-shadow: #afdbfa;
}
.room-object {
  --room-object-width: clamp(64px, var(--room-object-size, 27cqw), 120px);
  --room-contact-inset: 4.1%;
  --room-contact-width: 58%;
  --room-floor-offset: .041;
  position: absolute;
  z-index: 2;
  display: grid;
  place-items: center;
  width: var(--room-object-width);
  aspect-ratio: 1;
  border: 0;
  padding: 0;
  border-radius: 14px;
  background: transparent;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.room-object::before {
  content: '';
  position: absolute;
  bottom: calc(var(--room-contact-inset) - 5px);
  left: 50%;
  translate: -50% 0;
  width: var(--room-contact-width);
  height: 10px;
  border-radius: 50%;
  background: radial-gradient(ellipse, var(--room-item-shadow), transparent 72%);
  pointer-events: none;
}
.room-object > img {
  position: relative;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
  filter: drop-shadow(0 3px 2px var(--room-item-shadow));
}
.room-object:not(:disabled):active { transform: none; }
.room-object:focus-visible { outline-offset: -2px; }
.room-home { container-type: inline-size; }
.room-object[data-slot] {
  /* Keep the opaque base on the rug. Legacy sprites have more transparent padding. */
  bottom: calc(17% - var(--room-object-width) * var(--room-floor-offset));
}
.room-object[data-slot='left'] { left: 1.5%; }
.room-object[data-slot='right'] { right: 1.5%; }
.room-object.windup-mouse { --room-object-size: 24cqw; --room-contact-inset: 14.5%; --room-floor-offset: .145; }
.room-object:is(.bubble-maker,.moon-lamp,.cuckoo-clock,.ladybug-planter) {
  --room-contact-inset: 10%;
  --room-floor-offset: .10;
}
.room-object.star-garden-music-box { --room-contact-inset: .5%; --room-floor-offset: .005; }
.room-object.star-garden-lamp { --room-contact-inset: 3.1%; --room-floor-offset: .031; }
.room-object.sprout-figurine { --room-contact-inset: 2.6%; --room-floor-offset: .026; }
.room-object:is(.moon-lamp,.cuckoo-clock) { --room-object-size: 29cqw; --room-contact-width: 35%; }
.room-object.star-launcher { --room-contact-width: 74%; }
.room-object.bubble-maker > img { scale: -1 1; }
.moon-glow {
  position: absolute;
  inset: -33%;
  border-radius: 50%;
  opacity: 0;
  background: radial-gradient(circle, var(--moon-color, var(--room-moon-gold)) 0%, transparent 69%);
  transition: opacity 350ms, background 350ms;
  pointer-events: none;
}
:is(.moon-lamp,.star-garden-lamp)[data-light='1'] { --moon-color: var(--room-moon-gold); }
:is(.moon-lamp,.star-garden-lamp)[data-light='2'] { --moon-color: var(--room-moon-pink); }
:is(.moon-lamp,.star-garden-lamp)[data-light='3'] { --moon-color: var(--room-moon-sky); }
:is(.moon-lamp,.star-garden-lamp):not([data-light='0']) .moon-glow { opacity: .92; }
:is(.moon-lamp,.star-garden-lamp):not([data-light='0']) img { filter: drop-shadow(0 0 8px var(--moon-color)); }
.cuckoo-clock .cuckoo-visitor {
  position: absolute;
  inset: 25% auto auto 44%;
  width: 56%;
  height: 56%;
  opacity: 0;
  animation: bird-peek 1650ms ease-in-out both;
}
@keyframes bird-peek {
  0%, 100% { opacity: 0; transform: translate(-26%, -19%) scale(.28); }
  29%, 67% { opacity: 1; transform: translate(23%, -45%) scale(1); }
  46% { opacity: 1; transform: translate(30%, -53%) rotate(-9deg); }
}
.ladybug-visitor {
  position: absolute;
  left: 26%;
  top: 43%;
  width: 12px;
  height: 15px;
  border-radius: 60% 60% 54% 54%;
  background: radial-gradient(circle at 29% 44%, var(--room-ladybug-ink) 8%, transparent 15%),
    radial-gradient(circle at 69% 68%, var(--room-ladybug-ink) 8%, transparent 15%),
    linear-gradient(90deg, var(--room-ladybug-red) 47%, var(--room-ladybug-ink) 48% 53%, var(--room-ladybug-coral) 54%);
  box-shadow: inset 0 3px var(--room-ladybug-ink);
  pointer-events: none;
  animation: ladybug-peek 1850ms ease-in-out both;
}
@keyframes ladybug-peek {
  0%, 100% { opacity: 0; transform: translate(0, 8px) rotate(18deg) scale(.5); }
  19% { opacity: 1; transform: translate(1px, 0) rotate(18deg); }
  48% { opacity: 1; transform: translate(13px, -12px) rotate(58deg); }
  75% { opacity: 1; transform: translate(22px, -7px) rotate(125deg); }
}
.windup-mouse[data-variant='0'] { --mouse-path: 18vw; --mouse-hop: -7px; }
.windup-mouse[data-variant='1'] { --mouse-path: 24vw; --mouse-hop: -23px; }
.windup-mouse[data-variant='2'] { --mouse-path: 20vw; --mouse-hop: 6px; }
.windup-mouse .room-object-playing { animation: mouse-run 2900ms ease-in-out both paused; }
@keyframes mouse-run {
  0%, 100% { transform: none; }
  16% { transform: translate(4px, -2px) rotate(-9deg); }
  20% { transform: translateX(8px) scaleX(-1); }
  41% { transform: translate(min(104px, var(--mouse-path)), var(--mouse-hop)) scaleX(-1); }
  46% { transform: translate(min(104px, var(--mouse-path)), var(--mouse-hop)); }
  58% { transform: translate(min(78px, var(--mouse-path) * .63), calc(var(--mouse-hop) - 8px)) rotate(-8deg); }
  79% { transform: translate(6px, -3px) rotate(5deg); }
}
.bubble-maker .room-object-playing { animation: bubble-pump 860ms ease-out both paused; }
@keyframes bubble-pump {
  30% { transform: scale(.96, .93); }
  55% { transform: scale(1.035, 1.055); }
}
.toy-bubbles { position: absolute; inset: 0; pointer-events: none; }
.toy-bubbles i {
  position: absolute;
  left: 46%;
  top: 25%;
  width: var(--bubble-size);
  aspect-ratio: 1;
  border: 1.5px solid var(--room-bubble-rim);
  border-radius: 50%;
  background: radial-gradient(circle at 30% 24%, var(--room-bubble-highlight) 0%, transparent 25%),
    linear-gradient(145deg, var(--room-bubble-sky), transparent 61%, var(--room-bubble-gold));
  box-shadow: inset 0 0 3px var(--room-bubble-shadow);
  animation: bubble-float 2100ms var(--bubble-delay) ease-out both paused;
}
@keyframes bubble-float {
  0% { opacity: 0; transform: scale(.35); }
  19% { opacity: 1; }
  82% { opacity: .95; }
  94% { opacity: .6; transform: translate(var(--bubble-x), var(--bubble-y)) scale(1.17); }
  100% { opacity: 0; transform: translate(var(--bubble-x), var(--bubble-y)) scale(1.36); }
}
.shop-tabs { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); }
.shop-tabs .chip { padding-inline: 4px; }
.shop-room-link { display: grid; gap: 8px; }
.room-shop .merch:disabled { background: var(--paper-light); color: var(--muted); cursor: not-allowed; opacity: 1; }
@media (prefers-reduced-motion: reduce) {
  .moon-glow { transition: none; }
  .windup-mouse .room-object-playing, .bubble-maker .room-object-playing { animation: none; }
  .cuckoo-clock .cuckoo-visitor, .ladybug-visitor, .toy-bubbles i {
    animation: room-brief 1400ms steps(1) both;
    animation-duration: 1400ms !important;
  }
  .cuckoo-clock .cuckoo-visitor { transform: translate(23%, -45%); }
  .ladybug-visitor { transform: translate(13px, -12px) rotate(58deg); }
  .toy-bubbles i { transform: translate(var(--bubble-x), var(--bubble-y)); }
  .toy-bubbles i { animation-play-state: paused; }
}
@keyframes room-brief { 0% { opacity: 1; } 100% { opacity: 0; } }

.sprout-wiggle { transform-origin: 50% 92%; animation: sprout-wiggle 540ms ease-in-out both; }
@keyframes sprout-wiggle {
  30% { transform: rotate(-8deg); }
  68% { transform: rotate(6deg); }
}
@media (prefers-reduced-motion: reduce) {
  .sprout-wiggle { animation: none; }
}

.music-box-notes {
  pointer-events: none;
  position: absolute;
  inset: 0;
}
.music-box-notes i {
  position: absolute;
  left: 43%;
  top: 18%;
  color: #fff0a6;
  font: 900 17px/1 system-ui, sans-serif;
  font-style: normal;
  text-shadow: 0 1px 2px #68471f, 0 0 5px #a24f24;
  animation: music-box-note 980ms ease-out both;
  --note-x: -17px;
  --note-y: -31px;
}
.music-box-notes i:nth-child(2) { --note-x: 9px; --note-y: -39px; animation-delay: 140ms; }
.music-box-notes i:nth-child(3) { --note-x: -6px; --note-y: -44px; animation-delay: 280ms; }
@keyframes music-box-note {
  0% { opacity: 0; transform: scale(.55); }
  22% { opacity: 1; }
  80% { opacity: .9; }
  100% { opacity: 0; transform: translate(var(--note-x),var(--note-y)); }
}
@media (prefers-reduced-motion: reduce) {
  .music-box-notes i {
    transform: translate(var(--note-x),var(--note-y));
    animation: room-brief 1050ms steps(1) both;
    animation-duration: 1050ms !important;
  }
}

.room-object.room-toy { --room-floor-offset: 0; } /* Match the canvas dock frame. */
.room-home:has(.pet-actor canvas[data-toy]) .room-object.room-toy > img { opacity: 0; }
.room-home:has(.pet-actor canvas[data-toy]) .room-object.room-toy:not(.surprise-box)::before { opacity: 0; }

.room-object[data-decor] > img { transform-origin: 50% 87%; }
.room-object[data-decor='drops'] { --room-contact-width: 44%; }
.room-object[data-decor='drops']::after {
  /* Display the moving cloud as a little mobile on a wooden stand. */
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 50% 34%, #edb67a 15%, #b27851 62%, #88583c 68%, transparent 73%) center 96% / 48% 15% no-repeat,
    linear-gradient(90deg, #965e42, #edb67a 42%, #b27851 78%, #88583c) center 86% / 6% 56% no-repeat;
}
.room-object[data-decor='drops'] > img {
  z-index: 1;
  align-self: start;
  width: 76%;
  height: 76%;
  transform-origin: center 24%;
}
.decor-response { animation: decor-rock 1700ms ease-in-out both; }
[data-decor='drops'] .decor-response { animation: cloud-sway 2280ms ease-in-out both; }
[data-decor='glow'] .decor-response { animation: lamp-brighten 1900ms ease-in-out both; }
[data-decor='fish'] .decor-response { animation: fishbowl-ripple 1850ms ease-out both; }
[data-decor='notes'] .decor-response { animation: carousel-rock 1950ms ease-in-out both; }

@keyframes decor-rock {
  14% { transform: rotate(-10deg); }
  28% { transform: rotate(8deg); }
  46% { transform: rotate(-4deg); }
  56% { transform: rotate(2deg); }
}
@keyframes cloud-sway {
  15%, 55% { transform: rotate(-7deg); }
  36%, 70% { transform: rotate(6deg); }
}
@keyframes lamp-brighten {
  30%, 73% { filter: drop-shadow(0 0 9px #ffbd61) brightness(1.2); }
}
@keyframes fishbowl-ripple {
  25% { transform: rotate(-4deg); }
  42% { transform: rotate(2deg); }
}
@keyframes carousel-rock {
  13%, 42%, 67% { transform: translateY(-3px) rotate(-5deg); }
  27%, 53%, 79% { transform: translateY(-1px) rotate(4deg); }
}

.fish-water, .mushroom-glow, .cloud-rain, .snow-swirl { position: absolute; pointer-events: none; }
.fish-water { inset: 26% 12% 15%; overflow: hidden; border-radius: 24% 24% 50% 50%; }
.fish-water img {
  position: absolute; width: 56%; left: 4%; top: 4%;
  animation: goldfish-swim 2800ms ease-in-out both;
}
@keyframes goldfish-swim {
  0%, 100% { opacity: 0; transform: translate(-42%, 8%) scale(.67); }
  12% { opacity: 1; }
  42% { opacity: 1; transform: translate(62%, 0) scale(.92); }
  55% { opacity: 1; transform: translate(53%, 10%) scaleX(-.92) scaleY(.92); }
  88% { opacity: 1; }
  91% { opacity: .82; transform: translate(-30%, 29%) scaleX(-.73) scaleY(.73); }
}
.fish-water i {
  position: absolute; left: 60%; top: 66%; width: 7px; aspect-ratio: 1;
  border: 1px solid #fff8e3; border-radius: 50%; animation: fish-bubble 1470ms .6s ease-out both;
}
.fish-water i:last-child { left: 52%; animation-delay: .84s; width: 5px; }
@keyframes fish-bubble {
  0%, 100% { opacity: 0; }
  29% { opacity: 1; }
  90% { opacity: .8; transform: translate(4px,-24px); }
}
.mushroom-glow {
  inset: 5% -17% -10%; border-radius: 50%;
  background: radial-gradient(ellipse,#fff4a47a, #ffd97748 44%,transparent 72%);
  animation: mushroom-shine 1900ms ease-in-out both;
}
@keyframes mushroom-shine {
  0%, 100% { opacity: 0; transform: scale(.74); }
  36%, 74% { opacity: 1; transform: scale(1.08); }
}
.cloud-rain { z-index: 2; inset: 47% 18% 3%; }
.cloud-rain i {
  position: absolute; left: 14%; width: 7px; height: 13px; border-radius: 65% 35% 60% 49%;
  background: linear-gradient(125deg,#f0fcff,#519bbd 64%,#3d75a8); transform: rotate(28deg);
  animation: play-raindrop 650ms .14s ease-in 3 both;
}
.cloud-rain i:nth-child(2) { left: 47%; top: 13%; animation-delay: .30s; }
.cloud-rain i:nth-child(3) { left: 78%; animation-delay: .20s; }
@keyframes play-raindrop {
  0%, 100% { opacity: 0; }
  18%, 78% { opacity: .94; }
  100% { transform: translate(-6px,31px) rotate(28deg); }
}
.snow-swirl { inset: 2% 6% 25%; border-radius: 50%; overflow: hidden; }
.snow-swirl i {
  position: absolute; width: 4px; aspect-ratio: 1; border-radius: 50%;
  background: #fffefa; box-shadow: 0 1px 2px #7ba7ba;
  animation: snow-drift 2250ms var(--flake-delay) ease-out both;
}
.snow-swirl i:nth-child(2n) { width: 6px; }
@keyframes snow-drift {
  0%, 100% { opacity: 0; }
  22%, 65% { opacity: .96; }
  42% { transform: translate(8px,-10px); }
  100% { transform: translate(-4px,22px); }
}
[data-decor='notes'] .music-box-notes i { animation-duration: 1600ms; }
[data-decor='notes'] .music-box-notes i:nth-child(2) { animation-delay: 260ms; }
[data-decor='notes'] .music-box-notes i:nth-child(3) { animation-delay: 520ms; }
@media (prefers-reduced-motion: reduce) {
  .decor-response { animation: none; }
  .fish-water img, .mushroom-glow, .cloud-rain i, .snow-swirl i, [data-decor='notes'] .music-box-notes i {
    animation: room-brief 1450ms steps(1) both !important;
  }
}
