:root {
  color-scheme: light;
  --ink: #49352e;
  --ink-soft: #79665d;
  --paper: #fffaf0;
  --cream: #f8ecd8;
  --peach: #e77d36;
  --peach-deep: #c85e25;
  --peach-pale: #f9d2b7;
  --mint: #c6d8df;
  --mint-deep: #50799d;
  --yellow: #f4b92d;
  --blue: #6e9ec9;
  --pink: #f0a297;
  --line: #dec9af;
  --shadow: rgba(82, 60, 50, 0.16);
  --font-display: "Avenir Next Rounded", "Trebuchet MS", "Microsoft YaHei", sans-serif;
  --font-body: "Noto Sans SC", "Microsoft YaHei", "PingFang SC", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: #f3e8d1;
}

.food-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

body {
  min-height: 100vh;
  margin: 0;
  padding:
    env(safe-area-inset-top)
    env(safe-area-inset-right)
    env(safe-area-inset-bottom)
    env(safe-area-inset-left);
  overflow-x: hidden;
  color: var(--ink);
  background:
    linear-gradient(rgba(255, 255, 255, 0.35) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.35) 1px, transparent 1px),
    radial-gradient(circle at 20% 10%, #fffaf0 0, #f3e8d1 44%, #ead8be 100%);
  background-size: 22px 22px, 22px 22px, auto;
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}

.qixi-overlay {
  position: fixed;
  z-index: 24;
  inset: 0;
  display: none;
  overflow: hidden;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 45%, transparent 0 24%, rgba(72, 15, 33, 0.14) 58%, rgba(39, 6, 18, 0.38) 100%);
}

.qixi-overlay.is-active {
  display: block;
}

.qixi-roses,
.qixi-fireworks {
  position: absolute;
  inset: 0;
}

.qixi-rose {
  position: absolute;
  top: -12vh;
  left: var(--rose-x);
  font-size: var(--rose-size);
  opacity: var(--rose-opacity);
  filter: drop-shadow(0 3px 5px rgba(66, 7, 25, 0.25));
  animation: rose-fall var(--rose-duration) linear var(--rose-delay) infinite;
}

.qixi-firework {
  position: absolute;
  top: var(--firework-y);
  left: var(--firework-x);
  width: var(--firework-size);
  height: var(--firework-size);
  border-radius: 50%;
  background: repeating-conic-gradient(
    from 2deg,
    rgba(255, 232, 151, 0.96) 0deg 1.4deg,
    transparent 1.4deg 18deg
  );
  filter: drop-shadow(0 0 6px rgba(255, 204, 105, 0.9));
  mask: radial-gradient(circle, transparent 0 17%, #000 19% 70%, transparent 73%);
  opacity: 0;
  animation: firework-burst var(--firework-duration) ease-out var(--firework-delay) infinite;
}

.qixi-firework:nth-child(3n) {
  background: repeating-conic-gradient(
    from 7deg,
    rgba(255, 161, 194, 0.96) 0deg 1.5deg,
    transparent 1.5deg 20deg
  );
}

.qixi-firework:nth-child(3n + 2) {
  background: repeating-conic-gradient(
    from 12deg,
    rgba(183, 222, 255, 0.96) 0deg 1.5deg,
    transparent 1.5deg 22deg
  );
}

.qixi-greeting {
  position: absolute;
  z-index: 3;
  top: 43%;
  left: 50%;
  text-align: center;
  transform: translate(-50%, -50%);
  animation: birthday-glow 2.2s ease-in-out infinite alternate;
}

.qixi-greeting span {
  display: block;
  color: #fff6d7;
  font-family: var(--font-display);
  font-size: clamp(42px, 8vw, 92px);
  font-weight: 900;
  letter-spacing: 0.08em;
  line-height: 1.15;
  text-shadow:
    0 0 8px rgba(255, 232, 160, 0.95),
    0 0 24px rgba(255, 101, 143, 0.85),
    0 6px 0 rgba(111, 20, 45, 0.3);
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

button:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(85, 141, 125, 0.5);
  outline-offset: 3px;
}

.page-glow {
  position: fixed;
  z-index: -1;
  width: 34rem;
  height: 34rem;
  border-radius: 50%;
  filter: blur(2px);
  pointer-events: none;
}

.page-glow-one {
  top: -18rem;
  left: -12rem;
  background: radial-gradient(circle, rgba(239, 173, 133, 0.44), transparent 68%);
}

.page-glow-two {
  right: -14rem;
  bottom: -18rem;
  background: radial-gradient(circle, rgba(168, 207, 192, 0.54), transparent 68%);
}

.site-header,
.game-layout,
.journal-section,
.site-footer {
  width: min(1120px, calc(100% - 40px));
  margin-inline: auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px 0 22px;
}

.brand {
  display: inline-flex;
  gap: 12px;
  align-items: center;
  color: inherit;
  text-decoration: none;
}

.brand-avatar {
  display: block;
  width: 48px;
  height: 48px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: #fff6e8;
  object-fit: cover;
  box-shadow: 0 3px 0 rgba(73, 61, 60, 0.18);
}

.brand-ear {
  position: absolute;
  top: -8px;
  width: 16px;
  height: 20px;
  border: 2px solid var(--ink);
  background: var(--peach-pale);
  transform: rotate(-13deg);
}

.brand-ear-left {
  left: 6px;
  border-radius: 12px 2px 8px 4px;
}

.brand-ear-right {
  right: 6px;
  border-radius: 2px 12px 4px 8px;
  transform: rotate(13deg);
}

.brand-face {
  position: relative;
  z-index: 1;
  font-family: monospace;
  font-size: 12px;
  font-weight: 800;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-family: var(--font-display);
  font-size: 20px;
  letter-spacing: 0.08em;
}

.brand small {
  margin-top: 2px;
  color: var(--ink-soft);
  font-family: var(--font-display);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.2em;
}

.header-actions {
  display: flex;
  gap: 9px;
  align-items: center;
}

.save-state {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  margin-right: 6px;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 700;
}

.save-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #75a88f;
  box-shadow: 0 0 0 4px rgba(117, 168, 143, 0.13);
}

.save-state.is-saving .save-dot {
  background: var(--yellow);
  animation: pulse-dot 0.75s ease-in-out infinite alternate;
}

.shop-button {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  min-height: 38px;
  padding: 5px 11px 5px 8px;
  border: 1.5px solid rgba(73, 61, 60, 0.16);
  border-radius: 999px;
  background: #fff2d3;
  box-shadow: 0 3px 8px rgba(86, 64, 53, 0.07);
  cursor: pointer;
  font-size: 17px;
  transition: transform 0.16s ease, background 0.16s ease;
}

.shop-button:hover {
  background: #fff8e7;
  transform: translateY(-1px);
}

.shop-button-copy {
  display: grid;
  text-align: left;
}

.shop-button-copy small {
  color: var(--ink-soft);
  font-size: 8px;
  line-height: 1;
}

.shop-button-copy strong {
  color: #8d5a24;
  font-family: var(--font-display);
  font-size: 12px;
  line-height: 1.2;
}

.icon-button,
.close-button {
  display: grid;
  width: 38px;
  height: 38px;
  padding: 0;
  place-items: center;
  border: 1.5px solid rgba(73, 61, 60, 0.16);
  border-radius: 50%;
  background: rgba(255, 250, 240, 0.72);
  box-shadow: 0 3px 8px rgba(86, 64, 53, 0.07);
  cursor: pointer;
  font-weight: 800;
  transition: transform 0.16s ease, background 0.16s ease;
}

.icon-button:hover,
.close-button:hover {
  background: #fff;
  transform: translateY(-1px);
}

.account-button.is-logged-in {
  border-color: rgba(98, 133, 103, 0.28);
  background: #e8f2df;
}

.game-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.42fr) minmax(310px, 0.78fr);
  gap: 24px;
  align-items: start;
}

.device-column {
  min-width: 0;
  animation: rise 0.6s ease both;
}

.device {
  position: relative;
  padding: 15px 18px 18px;
  overflow: hidden;
  border: 2.5px solid #493d3c;
  border-radius: 31px 31px 38px 38px;
  background:
    radial-gradient(circle at 23% 20%, rgba(255, 255, 255, 0.52) 0 2px, transparent 2.5px),
    linear-gradient(145deg, #f6d9b3 0%, #eebc8c 54%, #e6ab7d 100%);
  background-size: 20px 20px, auto;
  box-shadow:
    0 8px 0 #c98562,
    0 15px 32px rgba(86, 57, 44, 0.22),
    inset 0 2px 1px rgba(255, 255, 255, 0.55);
}

.device::before {
  position: absolute;
  top: -6px;
  left: 50%;
  width: 90px;
  height: 15px;
  border: 2px solid #493d3c;
  border-top: 0;
  border-radius: 0 0 18px 18px;
  background: #f5e9d7;
  content: "";
  transform: translateX(-50%);
}

.device-topline {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 8px 10px;
  color: #6f4c3d;
  font-family: var(--font-display);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.15em;
}

.device-led {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #7aaa74;
  box-shadow: 0 0 8px #81b876;
}

.device.is-sleeping .device-led {
  background: #7a8071;
  box-shadow: none;
}

.screen-bezel {
  padding: 9px;
  border: 2px solid #493d3c;
  border-radius: 24px 24px 28px 28px;
  background: #594740;
  box-shadow:
    inset 0 3px 8px rgba(0, 0, 0, 0.35),
    0 2px 0 rgba(255, 255, 255, 0.36);
}

.screen {
  position: relative;
  min-height: 474px;
  overflow: hidden;
  isolation: isolate;
  border: 2px solid #453c39;
  border-radius: 16px 16px 22px 22px;
  background: linear-gradient(180deg, #d6edf0 0%, #eaf1dd 64%, #c7ce9c 64%, #bbc388 100%);
  box-shadow: inset 0 0 32px rgba(54, 78, 70, 0.15);
  transition: background 0.8s ease;
}

.screen::after {
  position: absolute;
  z-index: 9;
  inset: 0;
  border: 2px solid rgba(255, 255, 255, 0.12);
  border-radius: inherit;
  box-shadow: inset 0 0 30px rgba(56, 67, 59, 0.17);
  content: "";
  pointer-events: none;
}

.screen.is-night {
  background: linear-gradient(180deg, #53637e 0%, #8d8fa7 62%, #727568 62%, #686c60 100%);
}

.screen.is-playing {
  background: linear-gradient(180deg, #5e547c 0%, #a789a6 60%, #b3977d 60%, #9e806c 100%);
}

.screen-sky {
  position: absolute;
  z-index: -1;
  inset: 0 0 36%;
  overflow: hidden;
}

.sun-moon {
  position: absolute;
  top: 58px;
  right: 56px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #f6d272;
  box-shadow: 0 0 0 8px rgba(246, 210, 114, 0.2);
  transition: 0.6s ease;
}

.screen.is-night .sun-moon {
  background: #f1e6bd;
  box-shadow: 0 0 0 8px rgba(241, 230, 189, 0.12);
}

.sun-moon::after {
  position: absolute;
  top: 3px;
  left: -7px;
  width: 39px;
  height: 39px;
  border-radius: 50%;
  background: #8b8fa8;
  content: "";
  opacity: 0;
  transition: opacity 0.3s ease;
}

.screen.is-night .sun-moon::after {
  opacity: 1;
}

.cloud {
  position: absolute;
  width: 48px;
  height: 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.58);
}

.cloud::before,
.cloud::after {
  position: absolute;
  bottom: 2px;
  border-radius: 50%;
  background: inherit;
  content: "";
}

.cloud::before {
  left: 8px;
  width: 21px;
  height: 21px;
}

.cloud::after {
  right: 6px;
  width: 15px;
  height: 15px;
}

.cloud-one {
  top: 82px;
  left: 50px;
  animation: cloud-drift 13s ease-in-out infinite alternate;
}

.cloud-two {
  top: 130px;
  right: 110px;
  transform: scale(0.72);
  animation: cloud-drift 18s ease-in-out infinite alternate-reverse;
}

.star {
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #fff5c7;
  box-shadow: 0 0 5px #fff5c7;
  opacity: 0;
}

.screen.is-night .star {
  opacity: 1;
  animation: twinkle 1.8s ease-in-out infinite alternate;
}

.star-one {
  top: 52px;
  left: 94px;
}

.star-two {
  top: 105px;
  right: 36px;
  animation-delay: 0.5s !important;
}

.star-three {
  top: 35px;
  right: 130px;
  animation-delay: 1s !important;
}

.scene-hud {
  position: absolute;
  z-index: 5;
  top: 15px;
  left: 17px;
  right: 17px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #45504d;
}

.screen.is-night .scene-hud {
  color: #eef1e5;
}

.pet-id {
  display: flex;
  gap: 6px;
  align-items: center;
  padding: 6px 9px;
  border: 1.5px solid rgba(71, 67, 55, 0.2);
  border-radius: 999px;
  background: rgba(255, 252, 232, 0.72);
  font-size: 11px;
  font-weight: 800;
  backdrop-filter: blur(6px);
}

.screen.is-night .pet-id {
  border-color: rgba(255, 255, 255, 0.13);
  background: rgba(56, 57, 72, 0.48);
}

.online-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #72aa7e;
  box-shadow: 0 0 0 3px rgba(114, 170, 126, 0.14);
}

.stage-badge {
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(94, 135, 121, 0.12);
  color: #4f796d;
  font-size: 9px;
}

.screen.is-night .stage-badge {
  background: rgba(255, 255, 255, 0.12);
  color: #eaf2e4;
}

.scene-clock {
  padding: 5px 8px;
  border-radius: 8px;
  background: rgba(58, 57, 47, 0.25);
  color: #fffdf1;
  font-family: "Courier New", monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.mini-meters {
  position: absolute;
  z-index: 5;
  top: 54px;
  left: 17px;
  display: flex;
  gap: 8px;
  align-items: center;
}

.mini-meter {
  display: flex;
  gap: 3px;
  align-items: center;
  padding: 4px 6px;
  border-radius: 999px;
  background: rgba(255, 252, 235, 0.67);
  font-size: 9px;
  backdrop-filter: blur(3px);
}

.screen.is-night .mini-meter {
  background: rgba(56, 57, 72, 0.46);
}

.mini-track {
  display: block;
  width: 18px;
  height: 4px;
  overflow: hidden;
  border-radius: 99px;
  background: rgba(73, 61, 60, 0.15);
}

.mini-track span {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: #6fa58e;
  transition: width 0.35s ease;
}

.bubble-glyph {
  position: relative;
  display: inline-block;
  width: 22px;
  height: 22px;
}

.bubble-glyph i {
  position: absolute;
  display: block;
  border: 1.5px solid currentColor;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
}

.bubble-glyph i:nth-child(1) {
  left: 2px;
  bottom: 2px;
  width: 12px;
  height: 12px;
}

.bubble-glyph i:nth-child(2) {
  top: 1px;
  right: 2px;
  width: 9px;
  height: 9px;
}

.bubble-glyph i:nth-child(3) {
  top: 3px;
  left: 4px;
  width: 5px;
  height: 5px;
}

.bubble-glyph-small {
  width: 13px;
  height: 13px;
  color: #70a5ad;
}

.bubble-glyph-small i {
  border-width: 1px;
}

.bubble-glyph-small i:nth-child(1) {
  left: 0;
  bottom: 0;
  width: 9px;
  height: 9px;
}

.bubble-glyph-small i:nth-child(2) {
  top: 0;
  right: 0;
  width: 7px;
  height: 7px;
}

.bubble-glyph-small i:nth-child(3) {
  top: 1px;
  left: 2px;
  width: 4px;
  height: 4px;
}

.rice-glyph {
  position: relative;
  display: inline-block;
  width: 22px;
  height: 22px;
  color: #775744;
}

.rice-glyph::before {
  position: absolute;
  inset: 2px 1px 3px;
  border: 1.5px solid currentColor;
  border-radius: 52% 52% 42% 42%;
  background: #fff5dc;
  clip-path: polygon(50% 0, 100% 75%, 95% 100%, 5% 100%, 0 75%);
  content: "";
}

.rice-glyph::after {
  position: absolute;
  bottom: 4px;
  left: 50%;
  width: 6px;
  height: 8px;
  border-radius: 1px 1px 3px 3px;
  background: #75947d;
  content: "";
  transform: translateX(-50%);
}

.rice-glyph-small {
  width: 13px;
  height: 13px;
}

.rice-glyph-small::before {
  inset: 1px 0 2px;
  border-width: 1px;
}

.rice-glyph-small::after {
  bottom: 2px;
  width: 4px;
  height: 5px;
}

.rice-glyph-large {
  width: 34px;
  height: 34px;
}

.rice-glyph-large::before {
  inset: 3px 1px 5px;
  border-width: 2px;
}

.rice-glyph-large::after {
  bottom: 6px;
  width: 9px;
  height: 12px;
}

.scene-room {
  position: absolute;
  z-index: -1;
  inset: 0;
}

.window-frame {
  position: absolute;
  top: 83px;
  left: 27px;
  width: 102px;
  height: 104px;
  border: 7px solid #f9ecd8;
  background:
    linear-gradient(90deg, transparent 48%, #f9ecd8 48% 52%, transparent 52%),
    linear-gradient(0deg, transparent 48%, #f9ecd8 48% 52%, transparent 52%),
    linear-gradient(#97cbd8, #d7e7cb);
  box-shadow:
    0 0 0 2px rgba(82, 72, 56, 0.18),
    6px 7px 0 rgba(83, 71, 57, 0.1);
}

.window-sill {
  position: absolute;
  right: -13px;
  bottom: -15px;
  left: -13px;
  height: 9px;
  border: 2px solid rgba(76, 65, 53, 0.28);
  border-radius: 4px;
  background: #f6e4ca;
}

.wall-picture {
  position: absolute;
  top: 84px;
  right: 128px;
  width: 58px;
  height: 48px;
  overflow: hidden;
  border: 5px solid #fff2de;
  background: #cae2e4;
  box-shadow: 0 2px 0 rgba(73, 61, 60, 0.14);
}

.string-lights {
  position: absolute;
  z-index: 2;
  top: 52px;
  right: 24px;
  left: 145px;
  display: none;
  height: 45px;
  justify-content: space-around;
  align-items: flex-start;
  border-top: 1.5px solid rgba(76, 65, 53, 0.42);
  border-radius: 50%;
}

.screen.has-lights .string-lights {
  display: flex;
}

.string-lights i {
  display: block;
  width: 8px;
  height: 11px;
  margin-top: -1px;
  border-radius: 50% 50% 55% 55%;
  background: #ffe48c;
  box-shadow: 0 0 8px rgba(255, 224, 116, 0.9);
  animation: twinkle 1.5s ease-in-out infinite alternate;
}

.string-lights i:nth-child(2n) {
  animation-delay: -0.75s;
  background: #ffd0b7;
}

.scene.is-night .string-lights i {
  box-shadow: 0 0 12px rgba(255, 235, 157, 1);
}

.picture-sun {
  position: absolute;
  top: 5px;
  right: 7px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #e8b85a;
}

.picture-hill {
  position: absolute;
  right: -12px;
  bottom: -22px;
  width: 68px;
  height: 49px;
  border-radius: 50%;
  background: #9bbd94;
  transform: rotate(-8deg);
}

.plant {
  position: absolute;
  right: 35px;
  bottom: 88px;
  width: 54px;
  height: 83px;
}

.plant-pot {
  position: absolute;
  right: 9px;
  bottom: 0;
  width: 37px;
  height: 33px;
  border: 2px solid rgba(73, 61, 60, 0.3);
  border-radius: 4px 4px 12px 12px;
  background: #d98b70;
}

.leaf {
  position: absolute;
  width: 25px;
  height: 42px;
  border-radius: 100% 0 100% 0;
  background: #6e9f79;
  transform-origin: bottom right;
}

.leaf-one {
  bottom: 27px;
  left: 8px;
  transform: rotate(-35deg);
}

.leaf-two {
  bottom: 31px;
  left: 23px;
  transform: rotate(6deg);
  background: #7aac7f;
}

.leaf-three {
  right: 4px;
  bottom: 29px;
  transform: rotate(43deg);
  background: #5e9070;
}

.floor {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 36%;
  background:
    linear-gradient(90deg, transparent 49.5%, rgba(73, 61, 60, 0.07) 49.5% 50.5%, transparent 50.5%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.18), transparent);
  background-size: 32px 100%, auto;
}

.rug {
  position: absolute;
  left: 50%;
  bottom: 31px;
  width: 270px;
  height: 80px;
  border: 2px solid rgba(73, 61, 60, 0.11);
  border-radius: 50%;
  background:
    radial-gradient(ellipse, rgba(255, 255, 255, 0.17), transparent 62%),
    #eab28b;
  box-shadow: inset 0 0 0 8px #efc29e;
  transform: translateX(-50%);
}

.screen.rug-checker .rug {
  border-color: rgba(91, 76, 57, 0.2);
  background:
    linear-gradient(45deg, rgba(255, 255, 255, 0.22) 25%, transparent 25% 75%, rgba(255, 255, 255, 0.22) 75%),
    #b8cfb6;
  background-size: 20px 20px;
  box-shadow: inset 0 0 0 8px #d3dfc4;
}

.screen.rug-starry .rug {
  border-color: rgba(56, 70, 117, 0.22);
  background:
    radial-gradient(circle at 20% 35%, #ffe7a4 0 2px, transparent 3px),
    radial-gradient(circle at 65% 65%, #fff0ba 0 2px, transparent 3px),
    radial-gradient(circle at 82% 28%, #ffd1c5 0 1.5px, transparent 2.5px),
    #8da8cd;
  box-shadow: inset 0 0 0 8px #afc4df;
}

.screen.picture-heart .wall-picture {
  background: linear-gradient(#f7d8d8, #f1c5c8);
}

.screen.picture-heart .picture-sun {
  top: 9px;
  right: 10px;
  width: 28px;
  height: 25px;
  border-radius: 0;
  background: #e88488;
  clip-path: polygon(50% 95%, 5% 48%, 5% 22%, 25% 5%, 50% 20%, 75% 5%, 95% 22%, 95% 48%);
}

.screen.picture-heart .picture-hill {
  display: none;
}

.toy-ball {
  position: absolute;
  left: 55px;
  bottom: 45px;
  width: 29px;
  height: 29px;
  border: 2px solid rgba(73, 61, 60, 0.22);
  border-radius: 50%;
  background: conic-gradient(from 30deg, #f1d472, #e6a195, #f1d472);
  box-shadow: 0 5px 0 rgba(73, 61, 60, 0.08);
}

.bowl {
  position: absolute;
  right: 49px;
  bottom: 35px;
  width: 54px;
  height: 24px;
  border: 2px solid rgba(73, 61, 60, 0.24);
  border-radius: 4px 4px 24px 24px;
  background: #d5e0cb;
}

.bowl-food {
  position: absolute;
  top: -5px;
  left: 10px;
  width: 30px;
  height: 9px;
  border-radius: 50%;
  background: #b7815d;
}

.speech-bubble {
  position: absolute;
  z-index: 6;
  top: 145px;
  right: 24px;
  max-width: 168px;
  padding: 8px 11px;
  border: 1.5px solid rgba(73, 61, 60, 0.2);
  border-radius: 12px 12px 4px 12px;
  background: rgba(255, 253, 239, 0.9);
  box-shadow: 0 4px 9px rgba(73, 61, 60, 0.08);
  color: #554b45;
  cursor: pointer;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.55;
  text-align: left;
  backdrop-filter: blur(4px);
  animation: bubble-in 0.35s ease both;
}

.speech-bubble::after {
  position: absolute;
  right: 14px;
  bottom: -7px;
  width: 12px;
  height: 12px;
  border-right: 1.5px solid rgba(73, 61, 60, 0.2);
  border-bottom: 1.5px solid rgba(73, 61, 60, 0.2);
  background: rgba(255, 253, 239, 0.9);
  content: "";
  transform: rotate(45deg);
}

.pet-button {
  position: absolute;
  z-index: 4;
  bottom: 17px;
  left: 50%;
  width: 250px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  transform: translateX(-50%);
  -webkit-tap-highlight-color: transparent;
}

.pet {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  overflow: visible;
  object-fit: contain;
  user-select: none;
  filter: none;
  transition: filter 180ms ease, opacity 120ms ease;
  animation: ju-e-idle 3.1s ease-in-out infinite;
}

.pet-button::before {
  position: absolute;
  left: 50%;
  bottom: 8px;
  width: 58%;
  height: 16px;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(73, 61, 60, 0.2), transparent 72%);
  content: "";
  pointer-events: none;
  transform: translateX(-50%);
}

.pet-legacy {
  display: none;
}

.outfit-layer {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  animation: ju-e-idle 3.1s ease-in-out infinite;
}

.outfit-head,
.outfit-neck,
.outfit-hand,
.outfit-side {
  position: absolute;
  left: 50%;
  display: none;
  white-space: nowrap;
  filter: drop-shadow(0 2px 2px rgba(73, 61, 60, 0.2));
}

.outfit-head {
  top: 18%;
  z-index: 3;
  font-size: 24px;
  transform: translateX(-50%) rotate(-3deg);
}

.outfit-neck {
  top: 55%;
  z-index: 3;
  font-size: 24px;
  transform: translateX(-50%);
}

.outfit-hand {
  top: 55%;
  z-index: 3;
  left: 72%;
  font-size: 28px;
  transform: translateX(-50%) rotate(8deg);
}

.outfit-side {
  top: 55%;
  left: 0;
  z-index: 2;
  width: 135px;
  height: 76px;
  transform: translateX(-65%);
  filter: drop-shadow(0 7px 5px rgba(73, 61, 60, 0.26));
}

.outfit-symbol {
  display: block;
  width: 100%;
  height: 100%;
}

.outfit-hand .outfit-symbol {
  width: 34px;
  height: 26px;
}

.outfit-head:not(:empty),
.outfit-neck:not(:empty),
.outfit-hand:not(:empty),
.outfit-side:not(:empty) {
  display: block;
}

.outfit-head[data-accessory="flower-crown"] {
  letter-spacing: 4px;
}

.outfit-head[data-accessory="strawberry-bow"] {
  top: 20%;
  font-size: 29px;
  transform: translateX(-50%) rotate(7deg);
}

.outfit-head[data-accessory="star-clips"] {
  top: 25%;
  color: #ffe28a;
  font-size: 22px;
  letter-spacing: 18px;
  text-shadow: 0 0 5px rgba(255, 218, 98, 0.9);
}

.outfit-neck[data-accessory="berry-scarf"] {
  top: 53%;
  font-size: 30px;
}

.pet-button[data-action="jump"] .outfit-layer {
  animation: ju-e-jump 0.48s ease-in-out infinite alternate;
}

.pet-button[data-action="wave"] .outfit-layer,
.pet-button[data-action="remind"] .outfit-layer {
  animation: ju-e-wave 0.72s ease-in-out infinite alternate;
}

.pet-button[data-action="headpat"] .outfit-layer,
.pet-button[data-action="shy"] .outfit-layer {
  animation: ju-e-shy 0.9s ease-in-out infinite alternate;
}

.device.is-sleeping .outfit-layer {
  opacity: 0;
}

.item-effect {
  position: absolute;
  z-index: 6;
  bottom: 7%;
  left: 50%;
  display: none;
  width: 96px;
  height: 96px;
  pointer-events: none;
  filter: drop-shadow(0 5px 5px rgba(73, 61, 60, 0.2));
  transform: translateX(-50%);
}

.item-effect.is-active {
  display: block;
  animation: item-use-pop 1.8s ease both;
}

.item-effect svg {
  display: block;
  width: 100%;
  height: 100%;
}

.item-effect::before,
.item-effect::after {
  position: absolute;
  display: none;
  pointer-events: none;
}

.item-effect[data-effect="roujiamo"]::before {
  top: -24px;
  left: 50%;
  display: block;
  color: #f4bd55;
  content: "✦   ·   ✦";
  font-size: 22px;
  text-shadow: 0 0 7px rgba(255, 214, 108, 0.8);
  animation: food-sparkle 1.1s ease-out infinite;
}

.item-effect[data-effect="beer"]::before {
  top: -18px;
  left: -8px;
  display: block;
  width: 112px;
  height: 112px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 18% 74%, rgba(255, 246, 201, 0.9) 0 5px, transparent 6px),
    radial-gradient(circle at 66% 82%, rgba(255, 246, 201, 0.8) 0 4px, transparent 5px),
    radial-gradient(circle at 82% 58%, rgba(255, 246, 201, 0.85) 0 3px, transparent 4px),
    radial-gradient(circle at 36% 90%, rgba(255, 246, 201, 0.7) 0 3px, transparent 4px);
  animation: beer-bubbles 1.2s ease-out infinite;
}

.item-effect[data-effect="beer"]::after {
  top: -11px;
  right: -3px;
  display: block;
  color: #fff2b8;
  content: "°";
  font-size: 38px;
  font-weight: 900;
  animation: beer-bubbles 1.5s ease-out -0.45s infinite;
}

.item-effect[data-effect="yogurt"]::before {
  top: -18px;
  left: 50%;
  display: block;
  color: #9ed7e8;
  content: "✧   ♡   ✧";
  font-size: 19px;
  letter-spacing: 2px;
  text-shadow: 0 0 8px rgba(183, 231, 240, 0.9);
  animation: yogurt-sparkle 1.25s ease-out infinite;
}

.item-effect[data-effect="roast-goose"]::before {
  top: -35px;
  left: 50%;
  display: block;
  color: #ffd87b;
  content: "〜   〜";
  font-size: 19px;
  font-weight: 900;
  text-shadow: 0 0 8px rgba(255, 193, 86, 0.9);
  animation: goose-steam 1.4s ease-out infinite;
}

.item-effect[data-effect="roast-goose"]::after {
  top: 10%;
  right: 7%;
  display: block;
  color: #ffdd85;
  content: "✦";
  font-size: 22px;
  animation: food-sparkle 0.9s ease-out -0.3s infinite;
}

.pet[data-action="jump"] {
  animation: ju-e-jump 0.48s ease-in-out infinite alternate;
}

.pet[data-action="wave"],
.pet[data-action="remind"] {
  transform-origin: 50% 100%;
  animation: ju-e-wave 0.72s ease-in-out infinite alternate;
}

.pet[data-action="headpat"],
.pet[data-action="shy"] {
  animation: ju-e-shy 0.9s ease-in-out infinite alternate;
}

.pet[data-action="blink"],
.pet[data-action="wake"] {
  animation: ju-e-pop 0.24s ease-out;
}

.pet-body {
  transform-origin: 130px 190px;
  animation: pet-breathe 2.7s ease-in-out infinite;
}

.pet-shadow {
  transform-origin: 130px 198px;
  animation: shadow-breathe 2.7s ease-in-out infinite;
}

.pet-tail {
  transform-origin: 188px 154px;
  animation: tail-wiggle 2.1s ease-in-out infinite;
}

.eyes-open {
  transform-origin: center;
  animation: blink 5.4s infinite;
}

.eyes-sleep,
.mouth-sad,
.mouth-sleep,
.dirt-marks,
.sleep-z {
  display: none;
}

.pet.is-sleeping .eyes-open,
.pet.is-sleeping .mouth-happy {
  display: none;
}

.pet.is-sleeping .eyes-sleep,
.pet.is-sleeping .mouth-sleep {
  display: block;
}

.pet.is-sleeping .sleep-z {
  display: block;
  fill: #f9f0ce;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 900;
  animation: sleep-z 2s ease-in-out infinite;
}

.pet.is-sad .mouth-happy {
  display: none;
}

.pet.is-sad .mouth-sad {
  display: block;
}

.pet.is-dirty .dirt-marks {
  display: block;
}

.pet.is-sleeping .pet-body {
  animation-duration: 4.2s;
}

.pet.is-poked {
  animation: pet-poked 0.4s ease;
}

.screen.is-night .pet {
  filter: brightness(0.87);
}

.screen.is-night .pet-button::before {
  background: radial-gradient(ellipse, rgba(49, 42, 53, 0.28), transparent 72%);
}

.clean-layer,
.play-layer {
  position: absolute;
  z-index: 8;
  inset: 0;
  display: none;
}

.clean-layer.is-active,
.play-layer.is-active {
  display: block;
}

.clean-layer {
  background: rgba(198, 235, 238, 0.23);
  cursor: crosshair;
}

.clean-hint {
  position: absolute;
  top: 96px;
  left: 50%;
  padding: 8px 13px;
  border: 1.5px solid rgba(73, 61, 60, 0.2);
  border-radius: 999px;
  background: #fffdf4;
  box-shadow: 0 5px 12px rgba(73, 61, 60, 0.14);
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
  transform: translateX(-50%);
}

.stain {
  position: absolute;
  width: 43px;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: 55% 45% 62% 38%;
  background:
    radial-gradient(circle at 32% 32%, #b69c88 0 18%, transparent 19%),
    #947966;
  box-shadow:
    0 0 0 4px rgba(255, 255, 255, 0.16),
    0 3px 7px rgba(73, 61, 60, 0.2);
  cursor: pointer;
  transform: rotate(var(--stain-rotate));
  animation: stain-pop 0.25s ease both;
}

.stain::after {
  position: absolute;
  top: 7px;
  left: 11px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
  content: "";
}

.stain.is-cleaned {
  pointer-events: none;
  animation: vanish 0.22s ease forwards;
}

.soap-bubble {
  position: absolute;
  width: 28px;
  height: 28px;
  border: 2px solid rgba(255, 255, 255, 0.75);
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.9), rgba(157, 213, 223, 0.22));
  box-shadow: inset -3px -4px 8px rgba(120, 185, 196, 0.24);
  pointer-events: none;
  animation: bubble-float 0.8s ease-out forwards;
}

.play-layer {
  background: linear-gradient(180deg, rgba(59, 44, 77, 0.24), rgba(111, 76, 84, 0.12));
}

.play-scoreboard {
  position: absolute;
  z-index: 2;
  top: 92px;
  left: 50%;
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 8px 12px;
  border: 1.5px solid rgba(255, 255, 255, 0.3);
  border-radius: 999px;
  background: rgba(48, 40, 59, 0.66);
  color: #fff9e8;
  font-size: 10px;
  white-space: nowrap;
  transform: translateX(-50%);
  backdrop-filter: blur(5px);
}

.play-scoreboard strong {
  color: #ffe893;
  font-family: var(--font-display);
  font-size: 14px;
}

.play-time {
  min-width: 34px;
  padding-left: 8px;
  border-left: 1px solid rgba(255, 255, 255, 0.22);
  font-family: monospace;
  text-align: right;
}

.stars-field {
  position: absolute;
  inset: 122px 20px 50px;
}

.play-star {
  position: absolute;
  display: grid;
  width: 42px;
  height: 42px;
  padding: 0;
  place-items: center;
  border: 0;
  background: transparent;
  color: #ffe894;
  cursor: pointer;
  font-size: 30px;
  text-shadow: 0 0 14px rgba(255, 225, 123, 0.8);
  animation: star-spawn 1.15s ease-out forwards;
}

.play-star:active {
  transform: scale(0.8);
}

.play-star.is-collected {
  animation: star-collect 0.25s ease-out forwards;
  pointer-events: none;
}

.screen-shine {
  position: absolute;
  z-index: 10;
  top: -80px;
  left: -90px;
  width: 280px;
  height: 200px;
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.25), transparent 68%);
  pointer-events: none;
  transform: rotate(-10deg);
}

.device-actions {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  padding: 18px 13px 12px;
}

.hardware-button {
  display: flex;
  min-width: 0;
  padding: 5px 2px;
  flex-direction: column;
  gap: 5px;
  align-items: center;
  border: 0;
  background: transparent;
  cursor: pointer;
  font-size: 10px;
  font-weight: 900;
}

.button-icon {
  display: grid;
  width: 52px;
  height: 36px;
  place-items: center;
  border: 2px solid #493d3c;
  border-radius: 999px;
  background: #f8ebd9;
  box-shadow:
    0 5px 0 #b47a5c,
    inset 0 2px 1px rgba(255, 255, 255, 0.7);
  font-size: 17px;
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.hardware-button:hover .button-icon {
  transform: translateY(-1px);
}

.hardware-button:active .button-icon {
  transform: translateY(4px);
  box-shadow:
    0 1px 0 #b47a5c,
    inset 0 2px 1px rgba(255, 255, 255, 0.6);
}

.hardware-feed .button-icon {
  background: #f5d6ad;
}

.hardware-clean .button-icon {
  background: #cbe5e6;
  color: #51909a;
}

.hardware-play .button-icon {
  background: #ead8ef;
}

.hardware-sleep .button-icon {
  background: #d8dfca;
}

.hardware-button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.device-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2px 10px 0;
  color: #76503e;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.speaker-grille {
  display: flex;
  gap: 2px;
}

.speaker-grille i {
  display: block;
  width: 2px;
  height: 8px;
  border-radius: 2px;
  background: rgba(73, 61, 60, 0.35);
}

.dashboard {
  display: grid;
  gap: 14px;
  animation: rise 0.65s 0.08s ease both;
}

.pet-summary,
.live-card,
.leaderboard-card,
.stats-card,
.wallet-card,
.inventory-card,
.info-card {
  border: 1.5px solid rgba(73, 61, 60, 0.12);
  border-radius: 22px;
  background: rgba(255, 250, 240, 0.8);
  box-shadow: 0 8px 22px rgba(91, 66, 53, 0.07);
  backdrop-filter: blur(10px);
}

.pet-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 22px 23px 20px;
}

.eyebrow {
  margin: 0 0 6px;
  color: #a0705c;
  font-family: var(--font-display);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.18em;
}

.pet-summary h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(24px, 3vw, 32px);
  letter-spacing: -0.04em;
}

.summary-line {
  margin: 7px 0 0;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.6;
}

.live-card {
  position: relative;
  overflow: hidden;
  padding: 16px 17px;
  background:
    radial-gradient(circle at 90% 16%, rgba(255, 255, 255, 0.4), transparent 28%),
    linear-gradient(130deg, rgba(255, 239, 216, 0.96), rgba(250, 208, 186, 0.9));
}

.live-card::after {
  position: absolute;
  top: -25px;
  right: -18px;
  width: 92px;
  height: 92px;
  border: 1px dashed rgba(190, 102, 78, 0.22);
  border-radius: 50%;
  content: "";
  pointer-events: none;
}

.live-card.is-live {
  border-color: rgba(211, 88, 74, 0.3);
  box-shadow: 0 8px 24px rgba(172, 77, 58, 0.12);
}

.live-card-top,
.live-card-main {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.live-card-top {
  align-items: center;
  margin-bottom: 12px;
  color: #8d675b;
  font-size: 8px;
  font-weight: 800;
}

.live-pill,
.live-now {
  display: inline-flex;
  gap: 5px;
  align-items: center;
  padding: 4px 7px;
  border-radius: 999px;
  background: #bb6556;
  color: #fff8ef;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.live-pill i,
.live-now i {
  display: block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #fff7ea;
  box-shadow: 0 0 0 3px rgba(255, 247, 234, 0.2);
}

.live-card.is-live .live-pill i,
.live-now i {
  animation: live-pulse 1s ease-in-out infinite alternate;
}

.live-card-main {
  align-items: end;
}

.live-card-main h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 16px;
}

.live-card-main p:last-child {
  margin: 5px 0 0;
  color: #86695f;
  font-size: 9px;
}

.live-open-button {
  flex: 0 0 auto;
  padding: 8px 10px;
  border: 1px solid rgba(107, 68, 51, 0.16);
  border-radius: 10px;
  background: #fff8eb;
  color: #745449;
  cursor: pointer;
  font-size: 9px;
  font-weight: 900;
}

.live-open-button:not(:disabled) {
  border-color: #b85c4d;
  background: #bd6556;
  color: #fff9f0;
}

.live-open-button:disabled {
  cursor: default;
  opacity: 0.55;
}

.leaderboard-card {
  padding: 17px;
}

.leaderboard-card .section-heading {
  margin-bottom: 11px;
}

.leaderboard-card .eyebrow {
  margin-bottom: 3px;
}

.leaderboard-open-button {
  display: inline-flex;
  padding: 5px 8px;
  align-items: center;
  border: 1px solid rgba(112, 80, 59, 0.14);
  border-radius: 8px;
  background: #f4e5d2;
  color: #7b5c48;
  cursor: pointer;
  font-size: 9px;
  font-weight: 800;
  text-decoration: none;
}

.leaderboard-open-button:hover {
  background: #fff3e3;
}

.leaderboard-preview {
  display: grid;
  gap: 5px;
}

.leaderboard-preview-row {
  display: grid;
  grid-template-columns: 24px 1fr auto;
  gap: 8px;
  align-items: center;
  padding: 6px 8px;
  border-radius: 9px;
  background: rgba(246, 234, 216, 0.68);
  color: var(--ink-soft);
  font-size: 9px;
}

.leaderboard-preview-row.is-player {
  background: #f9dfbd;
  color: var(--ink);
  font-weight: 800;
}

.leaderboard-medal {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 50%;
  background: #e9dbc7;
  color: #715746;
  font-size: 8px;
  font-weight: 900;
}

.leaderboard-preview-row:nth-child(1) .leaderboard-medal {
  background: #f4c95d;
}

.leaderboard-preview-row:nth-child(2) .leaderboard-medal {
  background: #d8d8d2;
}

.leaderboard-preview-row:nth-child(3) .leaderboard-medal {
  background: #d9a077;
}

.leaderboard-preview-row strong {
  color: #8a5d3e;
  font-size: 9px;
}

.my-rank-line {
  display: flex;
  gap: 6px;
  align-items: center;
  margin-top: 9px;
  padding-top: 9px;
  border-top: 1px dashed rgba(73, 61, 60, 0.13);
  color: var(--ink-soft);
  font-size: 9px;
}

.my-rank-line strong {
  color: #a35643;
  font-size: 13px;
}

.my-rank-line span {
  margin-left: auto;
  font-size: 8px;
}

.level-orb {
  display: flex;
  width: 65px;
  height: 65px;
  flex: 0 0 65px;
  border: 1.5px solid #d9ba91;
  border-radius: 50%;
  background:
    radial-gradient(circle at 38% 30%, #fff5d6 0 13%, transparent 14%),
    linear-gradient(145deg, #f6dc9a, #e9b878);
  box-shadow:
    inset 0 0 0 5px rgba(255, 250, 236, 0.38),
    0 5px 0 rgba(183, 125, 76, 0.18);
  align-content: center;
  justify-content: center;
  color: #775439;
  text-align: center;
}

.level-orb span {
  font-family: var(--font-display);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.level-orb strong {
  margin-top: -4px;
  font-family: var(--font-display);
  font-size: 27px;
  line-height: 1;
}

.stats-card {
  padding: 21px 22px 20px;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 19px;
}

.section-heading h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 16px;
}

.care-streak {
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 700;
}

.care-streak span {
  color: #d99a61;
}

.care-streak strong {
  color: var(--ink);
}

.stats-list {
  display: grid;
  gap: 15px;
}

.stat-row {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 11px;
  align-items: center;
}

.stat-icon {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 11px;
  font-size: 15px;
}

.stat-icon-hunger {
  background: #fae2c4;
}

.stat-icon-clean {
  background: #dbecef;
}

.stat-icon-energy {
  background: #f7ebc3;
}

.stat-icon-mood {
  background: #f5dfe1;
}

.stat-label {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  margin-bottom: 7px;
  font-size: 11px;
  font-weight: 700;
}

.stat-label strong {
  font-family: var(--font-display);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.meter {
  height: 7px;
  overflow: hidden;
  border-radius: 99px;
  background: #eadfd2;
}

.meter-fill {
  display: block;
  width: 50%;
  height: 100%;
  border-radius: inherit;
  transition: width 0.45s ease, background 0.3s ease;
}

.meter-hunger {
  background: linear-gradient(90deg, #e8a566, #efc178);
}

.meter-clean {
  background: linear-gradient(90deg, #78b8c5, #aad5d8);
}

.meter-energy {
  background: linear-gradient(90deg, #e7bc55, #f1d57a);
}

.meter-mood {
  background: linear-gradient(90deg, #de8c9a, #eeb0b5);
}

.meter-fill.is-low {
  background: #d68170;
}

.growth-block {
  margin-top: 19px;
  padding-top: 16px;
  border-top: 1px dashed rgba(73, 61, 60, 0.16);
}

.growth-copy {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
  color: var(--ink-soft);
  font-size: 10px;
}

.growth-copy strong {
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.xp-track {
  height: 5px;
  overflow: hidden;
  border-radius: 99px;
  background: #e9dfd2;
}

.xp-track span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #87b8a7, #b9d8c7);
  transition: width 0.45s ease;
}

.wallet-card {
  display: flex;
  gap: 12px;
  justify-content: space-between;
  align-items: center;
  padding: 15px 17px;
}

.wallet-copy {
  display: flex;
  gap: 10px;
  align-items: center;
}

.wallet-icon {
  display: grid;
  width: 39px;
  height: 39px;
  place-items: center;
  border-radius: 13px;
  background: #e5f0ea;
  font-size: 20px;
}

.wallet-copy small,
.wallet-copy strong {
  display: block;
}

.wallet-copy small {
  margin-bottom: 2px;
  color: var(--ink-soft);
  font-size: 9px;
}

.wallet-copy strong {
  font-family: var(--font-display);
  font-size: 13px;
}

.wallet-copy strong span {
  font-size: 17px;
}

.text-button {
  padding: 7px 9px;
  border: 1.5px solid rgba(73, 61, 60, 0.14);
  border-radius: 9px;
  background: #f7ecdb;
  color: #6d554a;
  cursor: pointer;
  font-size: 9px;
  font-weight: 800;
  white-space: nowrap;
}

.text-button:hover {
  background: #fff5e6;
}

.text-button:disabled {
  cursor: default;
  opacity: 0.55;
}

.inventory-card {
  padding: 17px;
}

.inventory-card .section-heading {
  margin-bottom: 12px;
}

.inventory-card .eyebrow {
  margin-bottom: 3px;
}

.inventory-shop-link {
  padding: 5px 8px;
  border: 0;
  border-radius: 8px;
  background: #f3e5d2;
  color: #826552;
  cursor: pointer;
  font-size: 9px;
  font-weight: 800;
}

.inventory-shop-link:hover {
  background: #faeedf;
}

.inventory-list {
  display: grid;
  gap: 7px;
}

.inventory-item {
  display: grid;
  grid-template-columns: 34px 1fr auto;
  gap: 9px;
  align-items: center;
  padding: 8px;
  border: 1px solid rgba(73, 61, 60, 0.1);
  border-radius: 12px;
  background: rgba(248, 236, 218, 0.72);
}

.inventory-item-icon {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 10px;
  background: #fff3da;
  font-size: 18px;
}

.inventory-item-glyph {
  display: block;
  width: 29px;
  height: 29px;
}

.inventory-item-copy strong,
.inventory-item-copy small {
  display: block;
}

.inventory-item-copy strong {
  font-size: 10px;
}

.inventory-item-copy small {
  margin-top: 2px;
  color: var(--ink-soft);
  font-size: 8px;
}

.inventory-use {
  padding: 5px 8px;
  border: 1px solid rgba(73, 61, 60, 0.14);
  border-radius: 8px;
  background: #fff8e9;
  cursor: pointer;
  color: #755742;
  font-size: 9px;
  font-weight: 800;
}

.inventory-use:hover {
  background: #fff;
}

.inventory-empty {
  padding: 13px;
  border-radius: 12px;
  background: #f3e8d8;
  color: var(--ink-soft);
  font-size: 9px;
  line-height: 1.6;
  text-align: center;
}

.info-card {
  padding: 7px 17px 15px;
}

.info-line {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 11px 1px;
  border-bottom: 1px solid rgba(73, 61, 60, 0.08);
  color: var(--ink-soft);
  font-size: 10px;
}

.info-line strong {
  color: var(--ink);
  font-size: 10px;
}

.tip-box {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  margin-top: 13px;
  padding: 11px;
  border-radius: 12px;
  background: #f1e7d7;
}

.tip-box > span {
  flex: 0 0 auto;
  padding: 2px 5px;
  border-radius: 4px;
  background: #d7bb96;
  color: #5a463b;
  font-family: var(--font-display);
  font-size: 7px;
  font-weight: 900;
  letter-spacing: 0.06em;
}

.tip-box p {
  margin: 0;
  color: #6d5b51;
  font-size: 10px;
  line-height: 1.7;
}

.journal-section {
  margin-top: 27px;
  padding: 24px 26px;
  border: 1.5px solid rgba(73, 61, 60, 0.13);
  border-radius: 23px;
  background: rgba(255, 250, 240, 0.72);
  box-shadow: 0 8px 22px rgba(91, 66, 53, 0.06);
  backdrop-filter: blur(10px);
  animation: rise 0.65s 0.16s ease both;
}

.journal-heading {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-end;
}

.journal-heading h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 19px;
}

.journal-date {
  color: var(--ink-soft);
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 700;
}

.journal-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 11px;
  margin-top: 18px;
}

.journal-entry {
  display: grid;
  min-height: 90px;
  grid-template-columns: 35px 1fr;
  gap: 10px;
  align-items: start;
  padding: 13px;
  border-radius: 14px;
  background: rgba(247, 236, 219, 0.66);
  animation: entry-in 0.3s ease both;
}

.journal-entry-icon {
  display: grid;
  width: 35px;
  height: 35px;
  place-items: center;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.62);
  font-size: 16px;
}

.journal-entry-content strong {
  display: block;
  margin: 2px 0 5px;
  font-size: 10px;
}

.journal-entry-content p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 9px;
  line-height: 1.65;
}

.journal-entry-content time {
  display: block;
  margin-top: 7px;
  color: #a88d7c;
  font-family: monospace;
  font-size: 8px;
}

.journal-empty {
  grid-column: 1 / -1;
  padding: 26px;
  border: 1px dashed rgba(73, 61, 60, 0.16);
  border-radius: 14px;
  color: var(--ink-soft);
  font-size: 11px;
  text-align: center;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 2px 30px;
  color: #8f7668;
  font-size: 9px;
  font-weight: 600;
}

.site-footer a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

dialog {
  width: min(93vw, 520px);
  max-height: min(92vh, 820px);
  padding: 0;
  overflow: auto;
  border: 1.5px solid rgba(73, 61, 60, 0.18);
  border-radius: 24px;
  background: #fffaf0;
  box-shadow: 0 24px 80px rgba(48, 34, 27, 0.3);
  color: var(--ink);
}

dialog::backdrop {
  background: rgba(45, 38, 34, 0.38);
  backdrop-filter: blur(4px);
}

dialog[open] {
  animation: dialog-in 0.24s ease both;
}

.dialog-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  padding: 24px 24px 0;
}

.dialog-head h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 22px;
}

.close-button {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  font-size: 22px;
  font-weight: 500;
}

.dialog-subtitle {
  margin: 9px 24px 18px;
  color: var(--ink-soft);
  font-size: 11px;
  line-height: 1.7;
}

.food-grid {
  display: grid;
  gap: 9px;
  padding: 0 24px 20px;
}

.food-option {
  display: grid;
  grid-template-columns: 48px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 10px 13px;
  border: 1.5px solid rgba(73, 61, 60, 0.12);
  border-radius: 15px;
  background: #f8eedd;
  cursor: pointer;
  text-align: left;
  transition: border-color 0.16s ease, transform 0.16s ease, background 0.16s ease;
}

.food-option:hover {
  border-color: rgba(73, 61, 60, 0.28);
  background: #fff5e6;
  transform: translateY(-1px);
}

.food-option:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.food-illustration {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 13px;
  font-size: 26px;
}

.food-liangpi {
  background: #f7dfcb;
}

.food-chemian {
  background: #f2e3c7;
}

.food-turkey-noodle {
  background: #f5d7c5;
}

.food-roujiamo {
  background: #f4e0bd;
}

.food-beer {
  background: #f5e9b7;
}

.food-yogurt {
  background: #dcebef;
}

.food-roast-goose {
  background: #f2dfc4;
}

.food-icon {
  display: block;
  width: 42px;
  height: 42px;
}

.food-toast-icon {
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
}

.food-copy strong,
.food-copy small {
  display: block;
}

.food-copy strong {
  margin-bottom: 4px;
  font-size: 12px;
}

.food-copy small {
  color: var(--ink-soft);
  font-size: 9px;
}

.food-price {
  color: #997356;
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.account-dialog {
  width: min(94vw, 470px);
}

.auth-guest,
.auth-profile {
  padding: 4px 24px 22px;
}

.auth-intro,
.auth-footnote {
  margin: 0;
  color: var(--ink-soft);
  font-size: 9px;
  line-height: 1.7;
}

.auth-intro {
  margin-bottom: 15px;
}

.auth-footnote {
  margin-top: 12px;
}

.auth-form {
  display: grid;
  gap: 11px;
}

.auth-form > label:not(.auth-consent),
.account-edit {
  display: grid;
  gap: 6px;
  color: var(--ink-soft);
  font-size: 9px;
  font-weight: 800;
}

.auth-form input,
.account-edit input {
  min-width: 0;
  padding: 10px 11px;
  border: 1px solid rgba(73, 61, 60, 0.15);
  border-radius: 10px;
  background: #fffaf0;
  color: var(--ink);
  font-size: 12px;
  outline: none;
}

.auth-form input:focus,
.account-edit input:focus {
  border-color: rgba(77, 128, 113, 0.55);
  box-shadow: 0 0 0 3px rgba(99, 151, 127, 0.12);
}

.auth-input-row {
  display: grid;
  grid-template-columns: 40px 1fr auto;
  gap: 7px;
  align-items: center;
}

.auth-prefix {
  display: grid;
  min-height: 38px;
  place-items: center;
  border-radius: 10px;
  background: #f1e4d2;
  color: #765849;
  font-size: 10px;
}

.auth-code-button {
  min-height: 38px;
  padding: 7px 9px;
  border: 1px solid rgba(73, 61, 60, 0.14);
  border-radius: 9px;
  background: #f3e2cc;
  color: #745447;
  cursor: pointer;
  font-size: 9px;
  font-weight: 800;
  white-space: nowrap;
}

.auth-code-button:disabled {
  cursor: default;
  opacity: 0.5;
}

.auth-consent {
  display: flex;
  gap: 7px;
  align-items: flex-start;
  color: var(--ink-soft);
  font-size: 8px;
  line-height: 1.55;
}

.auth-consent input {
  margin-top: 2px;
  accent-color: #668c79;
}

.auth-message {
  min-height: 14px;
  margin: 0;
  color: #a14d42;
  font-size: 9px;
  line-height: 1.55;
}

.auth-message.is-ok {
  color: #558166;
}

.auth-submit,
.account-logout-button {
  min-height: 39px;
  border: 0;
  border-radius: 10px;
  cursor: pointer;
  font-size: 10px;
  font-weight: 900;
}

.auth-submit {
  background: #6f927e;
  color: #fffaf0;
}

.auth-submit:disabled {
  cursor: default;
  opacity: 0.55;
}

.account-identity {
  display: grid;
  grid-template-columns: 48px 1fr auto;
  gap: 11px;
  align-items: center;
  padding: 13px;
  border-radius: 15px;
  background: #f5e9d7;
}

.account-avatar {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 50%;
  background: #fff5dc;
  font-size: 25px;
}

.account-identity strong,
.account-identity small {
  display: block;
}

.account-identity strong {
  font-size: 13px;
}

.account-identity small {
  margin-top: 3px;
  color: var(--ink-soft);
  font-size: 9px;
}

.cloud-state {
  display: inline-flex;
  gap: 5px;
  align-items: center;
  color: #63806f;
  font-size: 8px;
  font-weight: 800;
}

.cloud-state i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #6da37d;
}

.cloud-state.is-offline {
  color: #a27253;
}

.cloud-state.is-offline i {
  background: #d49b6b;
}

.account-stats {
  display: flex;
  gap: 18px;
  margin: 13px 2px;
  color: var(--ink-soft);
  font-size: 9px;
}

.account-stats strong {
  margin-left: 4px;
  color: #7c5843;
  font-size: 12px;
}

.account-edit {
  grid-template-columns: auto 1fr auto;
  align-items: center;
}

.account-edit button {
  min-height: 37px;
  padding: 7px 10px;
  border: 1px solid rgba(73, 61, 60, 0.14);
  border-radius: 9px;
  background: #f3e4d0;
  color: #745446;
  cursor: pointer;
  font-size: 9px;
  font-weight: 800;
}

.account-logout-button {
  width: 100%;
  margin-top: 8px;
  border: 1px solid rgba(175, 83, 68, 0.2);
  background: #fff3ec;
  color: #a65347;
}

.account-dialog-foot {
  padding-top: 13px;
}

.leaderboard-dialog {
  width: min(94vw, 560px);
}

.leaderboard-note {
  margin: 8px 24px 15px;
  color: var(--ink-soft);
  font-size: 9px;
  line-height: 1.6;
}

.leaderboard-list {
  display: grid;
  gap: 7px;
  padding: 0 24px 20px;
}

.leaderboard-row {
  display: grid;
  grid-template-columns: 34px 36px 1fr auto;
  gap: 9px;
  align-items: center;
  padding: 9px 11px;
  border: 1px solid rgba(73, 61, 60, 0.1);
  border-radius: 12px;
  background: #f8eedd;
}

.leaderboard-row.is-player {
  border-color: rgba(209, 142, 74, 0.36);
  background: linear-gradient(100deg, #fff0cf, #f9e5be);
  box-shadow: 0 5px 14px rgba(148, 96, 52, 0.08);
}

.leaderboard-rank {
  color: #9b7358;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 900;
  text-align: center;
}

.leaderboard-row:nth-child(1) .leaderboard-rank {
  color: #d49a1d;
}

.leaderboard-row:nth-child(2) .leaderboard-rank {
  color: #8e918d;
}

.leaderboard-row:nth-child(3) .leaderboard-rank {
  color: #b66f44;
}

.leaderboard-avatar {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 12px;
  background: #fff5df;
  font-size: 20px;
}

.leaderboard-person strong,
.leaderboard-person small {
  display: block;
}

.leaderboard-person strong {
  font-size: 10px;
}

.leaderboard-person small {
  margin-top: 2px;
  color: var(--ink-soft);
  font-size: 8px;
}

.leaderboard-level {
  color: #8a5d3e;
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 900;
}

.leaderboard-foot {
  padding-top: 13px;
}

.live-dialog {
  width: min(94vw, 620px);
}

.live-dialog-head {
  padding-bottom: 8px;
}

.live-room {
  padding: 0 24px 18px;
}

.live-room-hud {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 9px;
  color: #7f6257;
  font-size: 9px;
  font-weight: 800;
}

.live-room-hud .live-remaining {
  margin-left: auto;
  color: #b24f42;
  font-family: var(--font-display);
  font-size: 12px;
}

.live-stage {
  position: relative;
  height: 360px;
  overflow: hidden;
  border: 2px solid rgba(73, 61, 60, 0.2);
  border-radius: 21px;
  background:
    radial-gradient(circle at 50% 26%, rgba(255, 226, 186, 0.68), transparent 35%),
    linear-gradient(155deg, #7d79a5, #9e7f91 56%, #d6a083);
  isolation: isolate;
}

.live-stage::before {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 36%;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.06) 50%, transparent 50%),
    #596654;
  background-size: 42px 100%;
  content: "";
}

.live-stage-light {
  position: absolute;
  top: -90px;
  left: 50%;
  width: 340px;
  height: 340px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 236, 191, 0.48), transparent 68%);
  transform: translateX(-50%);
}

.live-pet {
  position: absolute;
  z-index: 2;
  bottom: 12px;
  left: 50%;
  width: 290px;
  height: 290px;
  object-fit: contain;
  filter: drop-shadow(0 8px 6px rgba(50, 38, 39, 0.2));
  transform: translateX(-50%);
  animation: live-idle 2.8s ease-in-out infinite;
}

.live-chat {
  position: absolute;
  z-index: 5;
  bottom: 15px;
  left: 15px;
  display: grid;
  gap: 5px;
  width: min(64%, 330px);
}

.live-chat p {
  width: fit-content;
  max-width: 100%;
  margin: 0;
  padding: 6px 8px;
  border-radius: 9px;
  background: rgba(255, 250, 240, 0.86);
  color: #574b44;
  font-size: 8px;
  line-height: 1.45;
  animation: bubble-in 0.25s ease both;
  backdrop-filter: blur(4px);
}

.live-chat strong {
  color: #a45147;
}

.live-heart-field {
  position: absolute;
  z-index: 6;
  inset: 0;
  pointer-events: none;
}

.live-heart {
  position: absolute;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  font-size: 27px;
  line-height: 1;
  pointer-events: auto;
  filter: drop-shadow(0 3px 3px rgba(56, 38, 37, 0.2));
  animation: live-heart-rise 1.45s ease-out forwards;
}

.live-heart:active {
  transform: scale(1.25);
}

.live-scoreboard {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 10px;
  align-items: center;
  margin-top: 11px;
  padding: 10px 12px;
  border: 1px solid rgba(73, 61, 60, 0.1);
  border-radius: 14px;
  background: #f5e8d7;
}

.live-scoreboard small,
.live-scoreboard strong {
  display: block;
}

.live-scoreboard small {
  color: var(--ink-soft);
  font-size: 8px;
}

.live-scoreboard strong {
  margin-top: 2px;
  color: #8a4d43;
  font-family: var(--font-display);
  font-size: 14px;
}

.live-start-button {
  min-width: 106px;
  padding: 9px 12px;
  border: 0;
  border-radius: 10px;
  background: #ba5f50;
  color: #fff8ee;
  cursor: pointer;
  font-size: 9px;
  font-weight: 900;
}

.live-start-button:disabled {
  cursor: default;
  opacity: 0.55;
}

.live-dialog-foot {
  padding-top: 13px;
}

.shop-dialog {
  width: min(94vw, 650px);
}

.shop-head {
  padding-bottom: 4px;
}

.shop-balance {
  display: flex;
  gap: 9px;
  align-items: center;
  margin: 10px 24px 16px;
  padding: 10px 12px;
  border: 1px solid rgba(156, 107, 49, 0.14);
  border-radius: 13px;
  background: linear-gradient(100deg, #fff1cf, #f9e3b0);
  color: #7d5b39;
  font-size: 10px;
  font-weight: 700;
}

.shop-balance .wallet-icon {
  width: 31px;
  height: 31px;
  background: #fff8df;
  font-size: 17px;
}

.shop-balance strong {
  margin-left: auto;
  font-family: var(--font-display);
  font-size: 15px;
}

.shop-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin: 0 24px 14px;
  padding: 4px;
  border-radius: 12px;
  background: #efe2cf;
}

.shop-tab {
  padding: 8px 7px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--ink-soft);
  cursor: pointer;
  font-size: 10px;
  font-weight: 800;
}

.shop-tab.is-active {
  background: #fffaf0;
  box-shadow: 0 2px 7px rgba(82, 60, 50, 0.09);
  color: var(--ink);
}

.shop-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  padding: 0 24px 20px;
}

.shop-card {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border: 1.5px solid rgba(73, 61, 60, 0.11);
  border-radius: 15px;
  background: #f8eedd;
}

.shop-card-icon {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 13px;
  background: #fff4dd;
  font-size: 25px;
}

.shop-card-glyph {
  display: block;
  width: 41px;
  height: 41px;
}

.shop-card-copy strong,
.shop-card-copy small {
  display: block;
}

.shop-card-copy strong {
  font-size: 11px;
}

.shop-card-copy small {
  margin-top: 4px;
  color: var(--ink-soft);
  font-size: 8px;
  line-height: 1.5;
}

.shop-card-action {
  grid-column: 1 / -1;
  padding: 7px 9px;
  border: 1px solid rgba(73, 61, 60, 0.13);
  border-radius: 9px;
  background: #fffaf0;
  color: #78573f;
  cursor: pointer;
  font-size: 9px;
  font-weight: 900;
}

.shop-card-action:hover {
  background: #fff;
}

.shop-card-action.is-owned {
  border-color: rgba(113, 160, 120, 0.25);
  background: #e9f2df;
  color: #55704f;
}

.shop-card-action.is-equipped {
  border-color: rgba(214, 157, 65, 0.32);
  background: #fff0c7;
  color: #795728;
}

.shop-card-action:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.shop-dialog-foot {
  padding-top: 13px;
}

.dialog-foot {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 24px 20px;
  border-top: 1px dashed rgba(73, 61, 60, 0.15);
  color: var(--ink-soft);
  font-size: 9px;
}

.dialog-foot strong {
  color: var(--ink);
}

.help-list {
  display: grid;
  gap: 12px;
  padding: 21px 24px;
}

.help-item {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(73, 61, 60, 0.08);
}

.help-item > span {
  color: #b48864;
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 900;
}

.help-item p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 10px;
  line-height: 1.75;
}

.help-item strong {
  color: var(--ink);
}

.help-dialog-foot {
  align-items: center;
}

.reset-button {
  padding: 8px 11px;
  border: 1.5px solid #d6b7aa;
  border-radius: 9px;
  background: #fff4ea;
  color: #a85f50;
  cursor: pointer;
  font-size: 9px;
  font-weight: 800;
  white-space: nowrap;
}

.toast-stack {
  position: fixed;
  z-index: 30;
  right: 22px;
  bottom: 22px;
  display: grid;
  width: min(340px, calc(100vw - 32px));
  gap: 9px;
  pointer-events: none;
}

.toast {
  display: grid;
  grid-template-columns: 33px 1fr;
  gap: 10px;
  align-items: center;
  padding: 11px 14px;
  border: 1.5px solid rgba(73, 61, 60, 0.15);
  border-radius: 14px;
  background: rgba(255, 250, 240, 0.96);
  box-shadow: 0 10px 28px rgba(67, 44, 32, 0.16);
  animation: toast-in 0.28s ease both;
  backdrop-filter: blur(10px);
}

.toast.is-out {
  animation: toast-out 0.24s ease forwards;
}

.toast-icon {
  display: grid;
  width: 33px;
  height: 33px;
  place-items: center;
  border-radius: 10px;
  background: #f4e5d2;
  font-size: 16px;
}

.toast strong,
.toast span {
  display: block;
}

.toast strong {
  margin-bottom: 2px;
  font-size: 10px;
}

.toast span {
  color: var(--ink-soft);
  font-size: 9px;
  line-height: 1.45;
}

.heart-pop {
  position: absolute;
  z-index: 15;
  color: #e27786;
  font-size: 19px;
  pointer-events: none;
  animation: heart-float 0.8s ease-out forwards;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes bubble-in {
  from {
    opacity: 0;
    transform: translateY(5px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes pet-breathe {
  0%,
  100% {
    transform: scaleY(1) translateY(0);
  }
  50% {
    transform: scaleY(0.985) translateY(2px);
  }
}

@keyframes shadow-breathe {
  0%,
  100% {
    transform: scaleX(1);
    opacity: 1;
  }
  50% {
    transform: scaleX(0.96);
    opacity: 0.78;
  }
}

@keyframes tail-wiggle {
  0%,
  100% {
    transform: rotate(-5deg);
  }
  50% {
    transform: rotate(8deg);
  }
}

@keyframes blink {
  0%,
  45%,
  49%,
  100% {
    transform: scaleY(1);
  }
  47% {
    transform: scaleY(0.12);
  }
}

@keyframes ju-e-idle {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(-3px) scale(1.006);
  }
}

@keyframes ju-e-jump {
  from {
    transform: translateY(2px) scale(0.985);
  }
  to {
    transform: translateY(-12px) scale(1.015);
  }
}

@keyframes ju-e-wave {
  from {
    transform: rotate(-1.4deg) translateY(0);
  }
  to {
    transform: rotate(1.8deg) translateY(-2px);
  }
}

@keyframes ju-e-shy {
  from {
    transform: translateY(0) scale(1);
  }
  to {
    transform: translateY(2px) scale(1.01, 0.99);
  }
}

@keyframes ju-e-pop {
  from {
    transform: scale(0.97);
  }
  to {
    transform: scale(1);
  }
}

@keyframes item-use-pop {
  0% {
    opacity: 0;
    transform: translateX(-50%) translateY(18px) scale(0.72);
  }
  22% {
    opacity: 1;
    transform: translateX(-50%) translateY(0) scale(1.06);
  }
  72% {
    opacity: 1;
    transform: translateX(-50%) translateY(-3px) scale(1);
  }
  100% {
    opacity: 0;
    transform: translateX(-50%) translateY(-16px) scale(0.96);
  }
}

@keyframes food-sparkle {
  0% {
    opacity: 0;
    transform: translateY(7px) scale(0.7);
  }
  35% {
    opacity: 1;
    transform: translateY(-3px) scale(1);
  }
  100% {
    opacity: 0;
    transform: translateY(-24px) scale(1.12);
  }
}

@keyframes beer-bubbles {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.85);
  }
  35% {
    opacity: 1;
  }
  to {
    opacity: 0;
    transform: translateY(-28px) scale(1.08);
  }
}

@keyframes yogurt-sparkle {
  from {
    opacity: 0;
    transform: translate(-50%, 7px) scale(0.75);
  }
  35% {
    opacity: 1;
    transform: translate(-50%, -2px) scale(1);
  }
  to {
    opacity: 0;
    transform: translate(-50%, -18px) scale(1.1);
  }
}

@keyframes goose-steam {
  from {
    opacity: 0;
    transform: translate(-50%, 8px) scale(0.8);
  }
  30% {
    opacity: 1;
  }
  to {
    opacity: 0;
    transform: translate(-50%, -24px) scale(1.12);
  }
}

@keyframes rose-fall {
  0% {
    opacity: 0;
    transform: translate3d(0, -8vh, 0) rotate(0deg) scale(0.82);
  }
  8% {
    opacity: var(--rose-opacity);
  }
  50% {
    transform: translate3d(var(--rose-drift), 54vh, 0) rotate(160deg) scale(1);
  }
  92% {
    opacity: var(--rose-opacity);
  }
  100% {
    opacity: 0;
    transform: translate3d(calc(var(--rose-drift) * -0.45), 116vh, 0) rotate(330deg) scale(0.9);
  }
}

@keyframes firework-burst {
  0%,
  18% {
    opacity: 0;
    transform: scale(0.16) rotate(0deg);
  }
  28% {
    opacity: 1;
    transform: scale(0.72) rotate(20deg);
  }
  58% {
    opacity: 0.8;
    transform: scale(1) rotate(55deg);
  }
  82%,
  100% {
    opacity: 0;
    transform: scale(1.24) rotate(90deg);
  }
}

@keyframes birthday-glow {
  from {
    filter: brightness(1);
    transform: translate(-50%, -50%) scale(0.985);
  }
  to {
    filter: brightness(1.16);
    transform: translate(-50%, -50%) scale(1.018);
  }
}

@keyframes live-pulse {
  from {
    opacity: 0.45;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1.2);
  }
}

@keyframes live-idle {
  0%,
  100% {
    transform: translateX(-50%) translateY(0);
  }
  50% {
    transform: translateX(-50%) translateY(-5px);
  }
}

@keyframes live-heart-rise {
  0% {
    opacity: 0;
    transform: translateY(16px) scale(0.75);
  }
  18% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  100% {
    opacity: 0;
    transform: translateY(-78px) scale(1.1) rotate(8deg);
  }
}

@keyframes sleep-z {
  0% {
    opacity: 0.2;
    transform: translateY(6px);
  }
  50% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translateY(-10px);
  }
}

@keyframes pet-poked {
  0%,
  100% {
    transform: translateX(0) scale(1);
  }
  35% {
    transform: translateX(-2px) scale(1.02, 0.98);
  }
  65% {
    transform: translateX(2px) scale(0.98, 1.02);
  }
}

@keyframes cloud-drift {
  from {
    transform: translateX(-5px);
  }
  to {
    transform: translateX(12px);
  }
}

@keyframes twinkle {
  from {
    opacity: 0.25;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1.3);
  }
}

@keyframes pulse-dot {
  from {
    opacity: 0.45;
  }
  to {
    opacity: 1;
  }
}

@keyframes stain-pop {
  from {
    opacity: 0;
    transform: scale(0.5) rotate(var(--stain-rotate));
  }
  to {
    opacity: 1;
    transform: scale(1) rotate(var(--stain-rotate));
  }
}

@keyframes vanish {
  to {
    opacity: 0;
    transform: scale(1.7) rotate(var(--stain-rotate));
  }
}

@keyframes bubble-float {
  from {
    opacity: 0.9;
    transform: translate(-50%, -50%) scale(0.5);
  }
  to {
    opacity: 0;
    transform: translate(-50%, -120%) scale(1.35);
  }
}

@keyframes star-spawn {
  0% {
    opacity: 0;
    transform: scale(0.4) rotate(-20deg);
  }
  20% {
    opacity: 1;
    transform: scale(1) rotate(0);
  }
  80% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: scale(0.78) rotate(18deg);
  }
}

@keyframes star-collect {
  to {
    opacity: 0;
    transform: scale(1.8) rotate(30deg);
  }
}

@keyframes heart-float {
  from {
    opacity: 0;
    transform: translate(-50%, 0) scale(0.6);
  }
  20% {
    opacity: 1;
  }
  to {
    opacity: 0;
    transform: translate(-50%, -65px) scale(1.2) rotate(9deg);
  }
}

@keyframes entry-in {
  from {
    opacity: 0;
    transform: translateY(5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes dialog-in {
  from {
    opacity: 0;
    transform: translateY(9px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(9px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes toast-out {
  to {
    opacity: 0;
    transform: translateY(5px);
  }
}

@media (max-width: 900px) {
  .game-layout {
    grid-template-columns: 1fr;
    max-width: 680px;
  }

  .dashboard {
    grid-template-columns: 1fr 1fr;
  }

  .pet-summary,
  .stats-card {
    grid-column: span 1;
  }

  .stats-card {
    grid-row: span 2;
  }

  .wallet-card,
  .info-card {
    align-self: stretch;
  }

  .journal-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .site-header,
  .game-layout,
  .journal-section,
  .site-footer {
    width: min(100% - 24px, 500px);
  }

  .site-header {
    padding: 18px 0 14px;
  }

  .save-state {
    display: none;
  }

  .icon-button {
    width: 36px;
    height: 36px;
  }

  .shop-button {
    gap: 5px;
    padding: 4px 8px 4px 7px;
  }

  .shop-button-copy small {
    display: none;
  }

  .shop-grid {
    grid-template-columns: 1fr;
  }

  .live-room {
    padding: 0 14px 15px;
  }

  .live-stage {
    height: 305px;
    border-radius: 17px;
  }

  .live-pet {
    width: 240px;
    height: 240px;
  }

  .live-chat {
    bottom: 10px;
    left: 9px;
    width: 72%;
  }

  .live-scoreboard {
    grid-template-columns: 1fr 1fr;
  }

  .live-start-button {
    grid-column: 1 / -1;
  }

  .device {
    padding: 12px 10px 15px;
    border-radius: 24px 24px 31px 31px;
  }

  .screen-bezel {
    padding: 6px;
    border-radius: 19px;
  }

  .screen {
    min-height: 405px;
  }

  .device-actions {
    gap: 4px;
    padding: 15px 2px 9px;
  }

  .button-icon {
    width: 47px;
    height: 33px;
  }

  .pet-button {
    bottom: 13px;
    width: 225px;
  }

  .outfit-side {
    top: 58%;
    left: -8%;
    width: 96px;
    height: 54px;
    transform: translateX(-35%);
  }

  .speech-bubble {
    top: 130px;
    right: 12px;
    max-width: 150px;
  }

  .mini-meters {
    top: 51px;
    left: 12px;
    gap: 4px;
  }

  .mini-meter {
    padding: 4px;
  }

  .mini-track {
    width: 12px;
  }

  .scene-hud {
    top: 11px;
    left: 11px;
    right: 11px;
  }

  .pet-id {
    font-size: 10px;
  }

  .stage-badge {
    display: none;
  }

  .window-frame {
    top: 76px;
    left: 18px;
    width: 82px;
    height: 86px;
  }

  .wall-picture {
    top: 78px;
    right: 86px;
  }

  .rug {
    width: 225px;
  }

  .dashboard {
    grid-template-columns: 1fr;
  }

  .pet-summary,
  .stats-card {
    grid-column: auto;
    grid-row: auto;
  }

  .pet-summary {
    padding: 19px 20px;
  }

  .stats-card {
    padding: 19px 19px;
  }

  .journal-section {
    padding: 19px;
  }

  .journal-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .site-footer {
    display: grid;
    gap: 5px;
    text-align: center;
  }

  .food-option {
    grid-template-columns: 43px 1fr;
  }

  .food-price {
    grid-column: 2;
  }

  .dialog-foot {
    flex-direction: column;
  }

  .help-dialog-foot {
    align-items: flex-start;
  }

  .toast-stack {
    right: 16px;
    bottom: 16px;
  }
}

@media (max-width: 380px) {
  .screen {
    min-height: 380px;
  }

  .pet-button {
    width: 205px;
  }

  .wall-picture {
    display: none;
  }

  .speech-bubble {
    top: 125px;
  }

  .device-footer > span:first-child {
    display: none;
  }

  .device-footer {
    justify-content: flex-end;
  }

  .hardware-button {
    font-size: 9px;
  }
}

@media (max-width: 900px) {
  .pet-id,
  .mini-meter,
  .speech-bubble,
  .play-scoreboard,
  .pet-summary,
  .live-card,
  .leaderboard-card,
  .stats-card,
  .wallet-card,
  .inventory-card,
  .info-card,
  .journal-section,
  .live-chat p,
  .toast,
  dialog::backdrop {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }

  .pet-id {
    background: rgba(255, 252, 232, 0.94);
  }

  .mini-meter {
    background: rgba(255, 252, 235, 0.9);
  }

  .pet-summary,
  .live-card,
  .leaderboard-card,
  .stats-card,
  .wallet-card,
  .inventory-card,
  .info-card {
    background: rgba(255, 250, 240, 0.94);
  }

  .journal-section {
    background: rgba(255, 250, 240, 0.92);
  }

  dialog::backdrop {
    background: rgba(45, 38, 34, 0.56);
  }

  .screen.is-night .pet-id {
    background: rgba(56, 57, 72, 0.9);
  }

  .screen.is-night .mini-meter {
    background: rgba(56, 57, 72, 0.9);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
