:root {
  --ink: #24222a;
  --muted: #6f6473;
  --paper: #fff8f1;
  --paper-strong: #ffffff;
  --rose: #ff8fa3;
  --coral: #ff6f61;
  --sun: #ffd166;
  --mint: #8edfc2;
  --leaf: #75bf72;
  --sky: #9bd5ff;
  --blue: #5db7de;
  --teal: #49c5ba;
  --violet: #b8a8ff;
  --shadow: rgba(46, 35, 45, 0.18);
  --deep-shadow: rgba(36, 34, 42, 0.32);
  --ring: rgba(255, 143, 163, 0.52);
  color-scheme: light;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 10%, rgba(255, 209, 102, 0.32), transparent 28rem),
    linear-gradient(145deg, #fef4f6 0%, #e9f8ff 38%, #eef9ef 100%);
  overflow-x: hidden;
}

button {
  font: inherit;
}

.app {
  width: min(1440px, 100%);
  min-height: 100dvh;
  margin: 0 auto;
  padding: 18px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 14px;
}

.topbar,
.mood-dock,
.message-panel,
.letter-modal {
  border: 1px solid rgba(255, 255, 255, 0.68);
  background: rgba(255, 255, 255, 0.66);
  box-shadow: 0 18px 60px var(--shadow);
  backdrop-filter: blur(22px);
}

.topbar {
  min-height: 64px;
  border-radius: 24px;
  padding: 10px 12px 10px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.brand-copy {
  min-width: 0;
  display: grid;
  gap: 1px;
}

.name-button {
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--ink);
  width: fit-content;
  max-width: 100%;
  font-size: 1.52rem;
  font-weight: 900;
  letter-spacing: 0;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: rgba(255, 143, 163, 0.45);
  text-decoration-thickness: 8px;
  text-underline-offset: -3px;
}

.me-avatar {
  position: relative;
  flex: 0 0 54px;
  width: 54px;
  height: 54px;
  border-radius: 18px;
  background:
    radial-gradient(circle at 50% 18%, rgba(255, 255, 255, 0.9), transparent 18px),
    linear-gradient(145deg, rgba(255, 255, 255, 0.88), rgba(255, 238, 221, 0.62));
  box-shadow: inset 0 -2px 0 rgba(36, 34, 42, 0.07), 0 12px 22px rgba(36, 34, 42, 0.1);
  overflow: hidden;
}

.me-sprite {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 76px;
  height: 76px;
  object-fit: contain;
  transform: translate(-50%, -45%);
  filter: drop-shadow(0 5px 6px rgba(36, 34, 42, 0.22));
  pointer-events: none;
  user-select: none;
}

.me-face {
  position: absolute;
  left: 50%;
  top: 13px;
  width: 32px;
  height: 34px;
  border-radius: 43% 43% 49% 49%;
  background: linear-gradient(145deg, #e2b08e 0%, #c98a69 100%);
  box-shadow:
    inset 4px -3px 0 rgba(255, 255, 255, 0.12),
    inset -4px -4px 0 rgba(88, 43, 35, 0.08);
  transform: translateX(-50%);
  z-index: 2;
}

.me-hair {
  position: absolute;
  left: 50%;
  top: 4px;
  width: 45px;
  height: 24px;
  border-radius: 56% 48% 30% 34%;
  background:
    radial-gradient(ellipse at 30% 12%, rgba(255, 255, 255, 0.16), transparent 30%),
    repeating-linear-gradient(115deg, transparent 0 7px, rgba(255, 255, 255, 0.08) 8px 9px, transparent 10px 15px),
    linear-gradient(145deg, #3d302b, #151213);
  box-shadow:
    inset -6px -2px 0 rgba(0, 0, 0, 0.2),
    0 2px 0 rgba(36, 34, 42, 0.12);
  transform: translateX(-50%) rotate(-3deg);
  z-index: 4;
}

.me-hair::before,
.me-hair::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  background: #11100f;
}

.me-hair::before {
  left: 4px;
  top: 15px;
  width: 10px;
  height: 20px;
  transform: rotate(12deg);
}

.me-hair::after {
  right: 4px;
  top: 12px;
  width: 9px;
  height: 20px;
  transform: rotate(-17deg);
}

.me-shirt {
  position: absolute;
  left: 50%;
  bottom: -14px;
  width: 46px;
  height: 29px;
  border-radius: 16px 16px 6px 6px;
  background:
    linear-gradient(120deg, transparent 0 43%, rgba(255, 255, 255, 0.07) 44% 51%, transparent 52%),
    linear-gradient(145deg, #242123, #080808);
  transform: translateX(-50%);
  z-index: 1;
}

.me-brow,
.me-eye,
.me-nose,
.me-mouth {
  position: absolute;
  z-index: 3;
}

.me-brow {
  top: 10px;
  width: 10px;
  height: 4px;
  border-top: 2px solid #211615;
  border-radius: 50%;
}

.me-brow.left {
  left: 5px;
  transform: rotate(-12deg);
}

.me-brow.right {
  right: 5px;
  transform: rotate(12deg);
}

.me-eye {
  top: 15px;
  width: 8px;
  height: 4px;
  border-radius: 50%;
  background: #241f1e;
  box-shadow: inset 1px 1px 0 rgba(255, 255, 255, 0.28);
}

.me-eye.left {
  left: 6px;
}

.me-eye.right {
  right: 6px;
}

.me-nose {
  left: 50%;
  top: 16px;
  width: 4px;
  height: 9px;
  border-radius: 50%;
  background: rgba(89, 49, 42, 0.26);
  transform: translateX(-50%);
}

.me-mouth {
  left: 50%;
  bottom: 7px;
  width: 11px;
  height: 4px;
  border-bottom: 2px solid rgba(54, 26, 24, 0.72);
  border-radius: 50%;
  transform: translateX(-50%);
}

.name-button:focus-visible,
.icon-button:focus-visible,
.place:focus-visible,
.avatar-button:focus-visible,
.sina-avatar:focus-visible,
.mood-button:focus-visible,
.primary-button:focus-visible,
.modal-close:focus-visible {
  outline: 3px solid var(--ring);
  outline-offset: 4px;
}

.brand-subtitle {
  color: var(--muted);
  font-weight: 700;
  max-width: min(68vw, 680px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.top-actions,
.panel-actions,
.mood-dock {
  display: flex;
  align-items: center;
  gap: 10px;
}

.icon-button {
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 14px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.78);
  box-shadow: inset 0 -2px 0 rgba(36, 34, 42, 0.08);
  cursor: pointer;
}

.icon-button.is-on {
  background: linear-gradient(135deg, var(--sun), rgba(142, 223, 194, 0.86));
}

.stage {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 14px;
}

.world {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  border-radius: 32px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  background:
    linear-gradient(to bottom, rgba(155, 213, 255, 0.92) 0%, rgba(220, 245, 255, 0.9) 47%, rgba(154, 221, 165, 0.82) 48%, rgba(129, 206, 123, 0.86) 100%),
    var(--sky);
  box-shadow: 0 26px 80px rgba(83, 120, 124, 0.24);
  isolation: isolate;
}

.sky,
.world-effects {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.sun {
  position: absolute;
  top: 42px;
  right: 24%;
  width: 78px;
  height: 78px;
  border-radius: 50%;
  background: var(--sun);
  box-shadow: 0 0 0 18px rgba(255, 209, 102, 0.18), 0 0 60px rgba(255, 209, 102, 0.54);
  animation: pulseSun 4.8s ease-in-out infinite;
}

.cloud {
  position: absolute;
  width: 112px;
  height: 42px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  filter: drop-shadow(0 10px 16px rgba(96, 129, 155, 0.14));
}

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

.cloud::before {
  left: 18px;
  width: 48px;
  height: 48px;
}

.cloud::after {
  right: 20px;
  width: 62px;
  height: 62px;
}

.cloud-one {
  top: 70px;
  left: 10%;
  animation: drift 18s ease-in-out infinite;
}

.cloud-two {
  top: 150px;
  right: 8%;
  transform: scale(0.78);
  animation: drift 21s ease-in-out infinite reverse;
}

.hill {
  position: absolute;
  bottom: -130px;
  border-radius: 50% 50% 0 0;
}

.hill-one {
  left: -10%;
  width: 72%;
  height: 330px;
  background: rgba(117, 191, 114, 0.72);
}

.hill-two {
  right: -12%;
  bottom: -96px;
  width: 62%;
  height: 280px;
  background: rgba(142, 223, 194, 0.76);
}

.path {
  position: absolute;
  left: 50%;
  bottom: -40px;
  width: 210px;
  height: 330px;
  transform: translateX(-50%) perspective(200px) rotateX(22deg);
  border-radius: 100% 100% 0 0;
  background: linear-gradient(to bottom, rgba(255, 248, 241, 0.82), rgba(255, 209, 102, 0.38));
  box-shadow: inset 22px 0 42px rgba(255, 255, 255, 0.28);
}

.firefly {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #fff4a8;
  box-shadow: 0 0 18px #fff4a8;
  opacity: 0.8;
  animation: firefly 5s ease-in-out infinite;
}

.f1 {
  left: 21%;
  top: 55%;
}

.f2 {
  right: 18%;
  top: 42%;
  animation-delay: 1.2s;
}

.f3 {
  left: 66%;
  top: 62%;
  animation-delay: 2.1s;
}

.place {
  position: absolute;
  width: 118px;
  min-height: 106px;
  border: 0;
  padding: 0;
  display: grid;
  place-items: center;
  gap: 4px;
  color: var(--ink);
  background: transparent;
  cursor: pointer;
  z-index: 7;
  transform-origin: center bottom;
}

.place:hover {
  transform: translateY(-4px);
}

.place:active {
  transform: translateY(0) scale(0.98);
}

.object {
  position: relative;
  display: block;
  transition: transform 180ms ease;
}

.place:hover .object {
  transform: translateY(-2px) rotate(-1deg);
}

.object-label,
figcaption {
  min-width: 70px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 10px 22px rgba(36, 34, 42, 0.1);
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 900;
  text-align: center;
  letter-spacing: 0;
}

.place-cloud {
  top: 18%;
  left: 8%;
}

.cloud-object {
  width: 86px;
  height: 42px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 13px 26px rgba(70, 112, 140, 0.14);
}

.cloud-object::before,
.cloud-object::after {
  content: "";
  position: absolute;
  bottom: 13px;
  border-radius: 50%;
  background: #fff;
}

.cloud-object::before {
  left: 11px;
  width: 42px;
  height: 42px;
}

.cloud-object::after {
  right: 12px;
  width: 52px;
  height: 52px;
}

.place-mailbox {
  left: 7%;
  bottom: 18%;
}

.mailbox-object {
  width: 70px;
  height: 58px;
  border-radius: 36px 36px 8px 8px;
  background: linear-gradient(145deg, var(--rose), var(--coral));
  box-shadow: inset 0 -7px 0 rgba(120, 40, 55, 0.16), 0 16px 24px rgba(125, 54, 69, 0.18);
  z-index: 2;
}

.mailbox-object::before {
  content: "";
  position: absolute;
  left: 30px;
  bottom: -48px;
  width: 10px;
  height: 48px;
  border-radius: 6px;
  background: #7d665f;
  z-index: -1;
}

.mailbox-object span {
  position: absolute;
  left: 17px;
  top: 24px;
  width: 36px;
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
}

.place-mailbox .object-label {
  margin-top: 20px;
  position: relative;
  z-index: 3;
}

.place-tea {
  right: 25%;
  bottom: 22%;
}

.tea-object {
  width: 84px;
  height: 72px;
}

.cup {
  position: absolute;
  left: 12px;
  bottom: 6px;
  width: 56px;
  height: 42px;
  border-radius: 8px 8px 24px 24px;
  background: linear-gradient(135deg, #ffffff, #dff8f1);
  box-shadow: inset 0 -7px 0 rgba(73, 197, 186, 0.16), 0 14px 20px rgba(42, 100, 98, 0.16);
}

.cup::after {
  content: "";
  position: absolute;
  right: -17px;
  top: 10px;
  width: 22px;
  height: 20px;
  border: 6px solid #dff8f1;
  border-left: 0;
  border-radius: 0 18px 18px 0;
}

.steam {
  position: absolute;
  top: 6px;
  width: 10px;
  height: 30px;
  border-radius: 999px;
  border-left: 3px solid rgba(255, 255, 255, 0.78);
  animation: steam 2.4s ease-in-out infinite;
}

.s1 {
  left: 31px;
}

.s2 {
  left: 47px;
  animation-delay: 0.7s;
}

.place-garden {
  left: 23%;
  bottom: 8%;
}

.garden-object {
  width: 96px;
  height: 74px;
  border-radius: 0 0 50px 50px;
  background: linear-gradient(to top, rgba(84, 152, 73, 0.52), transparent);
}

.flower {
  position: absolute;
  bottom: 16px;
  width: 12px;
  height: 38px;
  border-radius: 999px;
  background: #4ea861;
}

.flower::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -13px;
  width: 28px;
  height: 28px;
  transform: translateX(-50%);
  border-radius: 50%;
  background:
    radial-gradient(circle at center, var(--sun) 0 24%, transparent 25%),
    conic-gradient(var(--rose), var(--violet), var(--mint), var(--rose));
}

.fl1 {
  left: 18px;
}

.fl2 {
  left: 43px;
  height: 50px;
}

.fl3 {
  right: 20px;
  height: 32px;
}

.place-pond {
  right: 8%;
  bottom: 10%;
}

.pond-object {
  width: 98px;
  height: 56px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 28% 35%, rgba(255, 255, 255, 0.85) 0 7px, transparent 8px),
    linear-gradient(145deg, var(--blue), var(--teal));
  box-shadow: inset 0 -8px 0 rgba(25, 99, 115, 0.18), 0 18px 32px rgba(37, 131, 151, 0.2);
}

.pond-object span {
  position: absolute;
  right: 18px;
  top: 19px;
  width: 18px;
  height: 18px;
  transform: rotate(45deg);
  background: rgba(255, 244, 168, 0.92);
  clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%);
}

.place-moon {
  top: 18%;
  right: 11%;
}

.moon-object {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #fff7b4;
  box-shadow: 0 0 34px rgba(255, 247, 180, 0.82);
}

.moon-object::after {
  content: "";
  position: absolute;
  top: -4px;
  left: 20px;
  width: 60px;
  height: 72px;
  border-radius: 50%;
  background: rgba(172, 221, 255, 0.96);
}

.place-secret {
  right: 5%;
  top: 50%;
  width: 44px;
  min-height: 44px;
  border-radius: 50%;
  color: rgba(255, 255, 255, 0.72);
  background: rgba(255, 143, 163, 0.16);
  opacity: 0.44;
  z-index: 8;
}

.place-secret:hover,
.place-secret:focus-visible {
  opacity: 1;
  background: rgba(255, 143, 163, 0.72);
}

.sina-avatar {
  position: absolute;
  left: 50%;
  bottom: 17%;
  z-index: 6;
  width: 132px;
  min-width: 132px;
  margin: 0;
  transform: translate(-50%, 0);
  display: grid;
  justify-items: center;
  gap: 2px;
  transition:
    left 2.8s cubic-bezier(0.34, 0.98, 0.38, 1),
    bottom 2.8s cubic-bezier(0.34, 0.98, 0.38, 1),
    transform 180ms ease;
}

.sina-avatar.is-quick-step {
  transition:
    left 1.55s cubic-bezier(0.34, 0.98, 0.38, 1),
    bottom 1.55s cubic-bezier(0.34, 0.98, 0.38, 1),
    transform 180ms ease;
}

.avatar-button {
  position: relative;
  width: 100%;
  height: 198px;
  padding: 0;
  border: 0;
  border-radius: 32px;
  background: transparent;
  cursor: pointer;
  filter: drop-shadow(0 18px 18px rgba(36, 34, 42, 0.18));
}

.avatar-shadow {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 86px;
  height: 20px;
  border-radius: 50%;
  background: rgba(38, 73, 47, 0.18);
  filter: blur(1px);
  transform: translateX(-50%);
}

.mii-character {
  position: absolute;
  left: 50%;
  bottom: 8px;
  width: 124px;
  height: 214px;
  transform: translateX(-50%);
  transform-origin: center bottom;
}

.sina-sprite {
  position: absolute;
  left: 50%;
  bottom: 2px;
  width: 154px;
  max-width: none;
  height: auto;
  transform: translateX(-50%);
  transform-origin: center bottom;
  pointer-events: none;
  user-select: none;
  filter: drop-shadow(0 14px 13px rgba(37, 50, 58, 0.2));
}

.sina-avatar.is-facing-left .sina-sprite {
  transform: translateX(-50%) scaleX(-1);
}

.sina-avatar.is-walking .sina-sprite {
  animation: walkBob 560ms ease-in-out infinite;
}

.sina-avatar.is-happy .sina-sprite {
  filter:
    drop-shadow(0 14px 13px rgba(37, 50, 58, 0.2))
    drop-shadow(0 0 16px rgba(255, 232, 136, 0.72));
}

.sina-avatar.is-facing-left .mii-character {
  transform: translateX(-50%) scaleX(-1);
}

.sina-avatar.is-walking .mii-character {
  animation: walkBob 560ms ease-in-out infinite;
}

.mii-head {
  position: absolute;
  left: 50%;
  top: -12px;
  width: 124px;
  height: 176px;
  transform: translateX(-50%);
  z-index: 3;
}

.mii-hair.back {
  position: absolute;
  left: 50%;
  top: 0;
  width: 114px;
  height: 176px;
  border-radius: 48% 48% 28% 34%;
  background:
    radial-gradient(ellipse at 42% 7%, rgba(255, 255, 255, 0.96) 0 14%, transparent 34%),
    radial-gradient(ellipse at 67% 24%, rgba(145, 190, 228, 0.16) 0 24%, transparent 45%),
    linear-gradient(92deg, transparent 0 49%, rgba(88, 111, 135, 0.26) 50% 52%, transparent 53%),
    repeating-linear-gradient(96deg, transparent 0 9px, rgba(74, 99, 124, 0.15) 10px 11px, transparent 12px 21px),
    linear-gradient(105deg, #fbfdff 0%, #e3edf8 45%, #bac9d7 100%);
  box-shadow:
    inset -10px 0 0 rgba(99, 123, 148, 0.14),
    inset 10px -4px 0 rgba(255, 255, 255, 0.28);
  transform: translateX(-50%);
}

.mii-hair-cloud {
  position: absolute;
  top: 34px;
  width: 24px;
  height: 158px;
  border-radius: 999px 999px 16px 22px;
  background:
    linear-gradient(96deg, rgba(255, 255, 255, 0.68) 0 18%, transparent 19%),
    repeating-linear-gradient(104deg, transparent 0 13px, rgba(80, 105, 130, 0.14) 14px 15px),
    linear-gradient(100deg, #f8fbff, #ccd9e7);
  box-shadow:
    inset -5px 0 0 rgba(92, 116, 141, 0.12),
    0 1px 0 rgba(255, 255, 255, 0.18);
  z-index: 2;
}

.mii-hair-cloud.left {
  left: 4px;
  transform: rotate(7deg);
}

.mii-hair-cloud.right {
  right: 3px;
  top: 31px;
  width: 27px;
  height: 168px;
  transform: rotate(-6deg);
}

.mii-hair-cloud::before,
.mii-hair-cloud::after {
  content: "";
  position: absolute;
  width: 2px;
  height: 104px;
  top: 18px;
  border: 0;
  border-radius: 999px;
  background: rgba(74, 98, 122, 0.2);
}

.mii-hair-cloud::before {
  left: 9px;
  transform: rotate(2deg);
}

.mii-hair-cloud::after {
  right: 7px;
  transform: rotate(-2deg);
}

.mii-face {
  position: absolute;
  left: 50%;
  top: 28px;
  width: 72px;
  height: 94px;
  border-radius: 41% 41% 54% 54%;
  background: linear-gradient(145deg, #ffe5d8 0%, #f4bdad 100%);
  box-shadow:
    inset 5px -6px 0 rgba(255, 255, 255, 0.18),
    inset -5px -8px 0 rgba(182, 95, 88, 0.09),
    0 3px 0 rgba(255, 255, 255, 0.38);
  transform: translateX(-50%);
  z-index: 3;
}

.mii-bangs {
  position: absolute;
  left: -12px;
  top: -34px;
  width: 96px;
  height: 61px;
  border-radius: 50px 50px 22px 18px;
  background:
    radial-gradient(ellipse at 44% 8%, rgba(255, 255, 255, 0.95) 0 17%, transparent 39%),
    linear-gradient(92deg, transparent 0 47%, rgba(76, 101, 126, 0.28) 48% 50%, transparent 51%),
    repeating-linear-gradient(98deg, transparent 0 10px, rgba(74, 99, 124, 0.14) 11px 12px, transparent 13px 23px),
    linear-gradient(105deg, #fbfdff 0 42%, #dce8f5 43% 100%);
  box-shadow:
    inset -9px -4px 0 rgba(96, 119, 143, 0.12),
    0 2px 0 rgba(255, 255, 255, 0.26);
  transform: rotate(-1deg);
  z-index: 4;
}

.mii-bangs::before,
.mii-bangs::after {
  content: "";
  position: absolute;
  top: 19px;
  border-radius: 999px;
  background: #e9f2fb;
  box-shadow: inset -4px -2px 0 rgba(91, 116, 142, 0.13);
}

.mii-bangs::before {
  left: 35px;
  width: 8px;
  height: 42px;
  transform: rotate(7deg);
}

.mii-bangs::after {
  right: 6px;
  width: 13px;
  height: 78px;
  transform: rotate(-12deg);
}

.mii-brow {
  position: absolute;
  top: 31px;
  width: 19px;
  height: 6px;
  border-top: 3px solid #7c8090;
  border-radius: 50%;
  z-index: 5;
}

.mii-brow.left {
  left: 13px;
  transform: rotate(-16deg);
}

.mii-brow.right {
  right: 13px;
  transform: rotate(16deg);
}

.mii-eye {
  position: absolute;
  top: 42px;
  width: 20px;
  height: 10px;
  border-radius: 72% 72% 48% 48%;
  background:
    radial-gradient(circle at 38% 26%, #fff 0 2px, transparent 3px),
    radial-gradient(circle at 50% 58%, #a7d8ff 0 3px, #2774b9 4px 6px, transparent 7px);
  box-shadow:
    0 -2px 0 #2b2428,
    7px -2px 0 -2px #17151a,
    -7px -2px 0 -2px #17151a,
    0 2px 0 -1px rgba(103, 61, 64, 0.18);
  z-index: 5;
}

.mii-eye::after {
  content: "";
  position: absolute;
  right: -5px;
  top: -2px;
  width: 7px;
  height: 4px;
  border-top: 2px solid #17151a;
  border-radius: 50%;
  transform: rotate(16deg);
}

.mii-eye.left {
  left: 11px;
  transform: rotate(-6deg);
}

.mii-eye.right {
  right: 11px;
  transform: rotate(6deg);
}

.mii-cheek {
  position: absolute;
  top: 58px;
  width: 13px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255, 143, 163, 0.3);
}

.mii-cheek.left {
  left: 8px;
}

.mii-cheek.right {
  right: 8px;
}

.mii-mouth {
  position: absolute;
  left: 50%;
  bottom: 15px;
  width: 20px;
  height: 5px;
  border-radius: 58% 58% 48% 48%;
  background:
    radial-gradient(ellipse at 50% 18%, rgba(255, 198, 196, 0.65) 0 18%, transparent 19%),
    linear-gradient(#d79590 0 47%, #9d5a58 48% 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    0 1px 0 rgba(127, 58, 61, 0.14);
  transform: translateX(-50%);
}

.mii-nose {
  position: absolute;
  left: 50%;
  top: 53px;
  width: 6px;
  height: 8px;
  border-radius: 50%;
  background: rgba(224, 130, 118, 0.18);
  box-shadow: 3px 4px 0 -3px rgba(141, 66, 63, 0.32);
  transform: translateX(-50%);
}

.mii-earring {
  display: none;
}

.mii-earring.left {
  left: -8px;
}

.mii-earring.right {
  right: -8px;
}

.sina-avatar.is-happy .mii-mouth {
  width: 20px;
  height: 9px;
  border-radius: 30% 30% 70% 70%;
}

.mii-body {
  position: absolute;
  left: 50%;
  bottom: 6px;
  width: 82px;
  height: 96px;
  transform: translateX(-50%);
  z-index: 2;
}

.mii-body::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 80px;
  width: 44px;
  height: 12px;
  border-top: 2px solid rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  transform: translateX(-50%);
  z-index: 5;
}

.mii-shirt {
  position: absolute;
  left: 50%;
  top: 30px;
  width: 82px;
  height: 61px;
  border-radius: 21px 21px 13px 13px;
  background:
    radial-gradient(ellipse at 70% 37%, rgba(255, 255, 255, 0.13) 0 18%, transparent 19%),
    linear-gradient(145deg, #9b1437 0%, #5a061e 100%);
  box-shadow:
    inset 0 -9px 0 rgba(42, 0, 16, 0.16),
    inset 12px 0 0 rgba(255, 255, 255, 0.05);
  transform: translateX(-50%);
  z-index: 3;
}

.mii-shirt::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 1px;
  width: 34px;
  height: 13px;
  border-radius: 0 0 999px 999px;
  background: #f4c2af;
  transform: translateX(-50%);
}

.mii-shirt::after {
  content: "";
  position: absolute;
  right: 7px;
  bottom: -9px;
  width: 31px;
  height: 21px;
  border-radius: 42% 58% 54% 46%;
  background:
    radial-gradient(circle at 47% 44%, rgba(42, 0, 16, 0.22) 0 12%, transparent 13%),
    linear-gradient(135deg, #a3163e, #620820);
  box-shadow: -11px 2px 0 -4px #77102b;
  transform: rotate(-5deg);
}

.mii-choker {
  display: none;
}

.mii-arm {
  position: absolute;
  top: 35px;
  width: 15px;
  height: 53px;
  border-radius: 999px;
  background: linear-gradient(#f3c2af, #d99d8d);
  transform-origin: center 8px;
  z-index: 1;
}

.mii-arm.left {
  left: -4px;
  transform: rotate(15deg);
}

.mii-arm.right {
  right: -4px;
  transform: rotate(-15deg);
}

.mii-leg {
  position: absolute;
  bottom: 0;
  width: 20px;
  height: 47px;
  border-radius: 12px 12px 10px 10px;
  background: linear-gradient(#24252b, #111216);
  transform-origin: center 4px;
}

.mii-leg::after {
  content: "";
  position: absolute;
  bottom: -3px;
  width: 24px;
  height: 10px;
  border-radius: 999px;
  background: #ffffff;
  box-shadow: inset 0 -2px 0 rgba(36, 34, 42, 0.12);
}

.mii-leg.left {
  left: 22px;
}

.mii-leg.left::after {
  right: -2px;
}

.mii-leg.right {
  right: 22px;
}

.mii-leg.right::after {
  left: -2px;
}

.sina-avatar.is-walking .mii-arm.left,
.sina-avatar.is-walking .mii-leg.right {
  animation: limbForward 560ms ease-in-out infinite;
}

.sina-avatar.is-walking .mii-arm.right,
.sina-avatar.is-walking .mii-leg.left {
  animation: limbBack 560ms ease-in-out infinite;
}

.smile-spark {
  position: absolute;
  right: 12px;
  top: 17px;
  z-index: 8;
  width: 26px;
  height: 26px;
  background: var(--sun);
  clip-path: polygon(50% 0, 61% 37%, 100% 50%, 61% 63%, 50% 100%, 39% 63%, 0 50%, 39% 37%);
  opacity: 0;
  transform: scale(0.6);
}

.sina-avatar.is-happy .smile-spark {
  animation: popSpark 900ms ease both;
}

.message-panel {
  min-height: 100%;
  border-radius: 28px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 14px;
}

.panel-kicker {
  margin: 0;
  color: var(--coral);
  font-size: 0.78rem;
  font-weight: 950;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.message-panel h1,
.letter-modal h2 {
  margin: 0;
  font-size: 2rem;
  line-height: 1.03;
  letter-spacing: 0;
}

.message-panel p,
.letter-modal p {
  margin: 0;
  color: #4d4751;
  font-size: 1.02rem;
  line-height: 1.65;
}

.panel-actions {
  align-items: center;
  flex-wrap: wrap;
  margin-top: 6px;
}

.primary-button,
.chip-button {
  border: 0;
  border-radius: 14px;
  padding: 11px 14px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: inset 0 -2px 0 rgba(36, 34, 42, 0.08), 0 10px 18px rgba(36, 34, 42, 0.08);
  font-weight: 900;
  cursor: pointer;
}

.chip-button:disabled,
.primary-button:disabled {
  cursor: not-allowed;
  opacity: 0.62;
  transform: none;
}

.primary-button {
  background: linear-gradient(135deg, var(--sun), #ffe8a3);
}

.chip-button.is-done {
  background: linear-gradient(135deg, rgba(142, 223, 194, 0.95), rgba(255, 255, 255, 0.88));
}

.letter-chip {
  min-width: 104px;
}

.letter-chip.is-today {
  box-shadow:
    inset 0 -2px 0 rgba(36, 34, 42, 0.08),
    0 0 0 3px rgba(255, 143, 163, 0.22),
    0 10px 18px rgba(36, 34, 42, 0.08);
}

.letter-chip.is-locked {
  background: rgba(255, 255, 255, 0.48);
  color: rgba(36, 34, 42, 0.58);
}

.mood-dock {
  min-height: 72px;
  border-radius: 24px;
  padding: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

.mood-button {
  min-width: 104px;
  min-height: 48px;
  border: 0;
  border-radius: 16px;
  padding: 8px 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.74);
  box-shadow: inset 0 -2px 0 rgba(36, 34, 42, 0.08);
  font-weight: 900;
  cursor: pointer;
}

.mood-button span:first-child {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  background: rgba(255, 143, 163, 0.18);
  color: var(--coral);
}

.tool-button span:first-child {
  background: rgba(142, 223, 194, 0.24);
  color: #168f83;
}

.breath-orb {
  flex: 0 0 94px;
  width: 94px;
  height: 94px;
  margin: 2px auto;
  border-radius: 50%;
  background:
    radial-gradient(circle at 38% 32%, rgba(255, 255, 255, 0.95), transparent 18px),
    linear-gradient(145deg, rgba(142, 223, 194, 0.9), rgba(184, 168, 255, 0.72));
  box-shadow: 0 16px 36px rgba(73, 197, 186, 0.24);
  animation: breatheOrb 4.8s ease-in-out infinite;
}

.mood-button:hover,
.primary-button:hover,
.chip-button:hover,
.icon-button:hover {
  transform: translateY(-2px);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 22px;
  z-index: 20;
  width: min(520px, calc(100% - 36px));
  padding: 14px 16px;
  border-radius: 18px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 18px 60px var(--shadow);
  backdrop-filter: blur(18px);
  text-align: center;
  font-weight: 900;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 18px);
  transition: opacity 220ms ease, transform 220ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.letter-modal {
  width: min(560px, calc(100% - 34px));
  border-radius: 28px;
  padding: 28px;
  color: var(--ink);
}

.letter-modal::backdrop {
  background: rgba(36, 34, 42, 0.36);
  backdrop-filter: blur(6px);
}

.letter-modal[open] {
  display: grid;
  gap: 14px;
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  font-size: 1.5rem;
  cursor: pointer;
}

.sparkle,
.heart,
.confetti,
.new-flower,
.flying-bee {
  position: absolute;
  z-index: 10;
  pointer-events: none;
}

.flying-bee {
  left: -180px;
  top: var(--bee-y, 28%);
  width: 168px;
  min-height: 76px;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  animation: beeFlight 12s linear forwards;
}

.bee-body {
  position: relative;
  width: 44px;
  height: 32px;
  border-radius: 50%;
  background:
    linear-gradient(90deg, transparent 0 18%, rgba(36, 34, 42, 0.85) 19% 27%, transparent 28% 47%, rgba(36, 34, 42, 0.85) 48% 58%, transparent 59%),
    linear-gradient(145deg, #ffe36b, #ffc145);
  box-shadow: 0 10px 16px rgba(36, 34, 42, 0.12);
}

.bee-body::before,
.bee-body::after {
  content: "";
  position: absolute;
  top: -16px;
  width: 24px;
  height: 20px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(93, 183, 222, 0.18);
  animation: wingFlutter 170ms ease-in-out infinite alternate;
}

.bee-body::before {
  left: 8px;
  transform-origin: right bottom;
}

.bee-body::after {
  right: 2px;
  transform-origin: left bottom;
}

.bee-face {
  position: absolute;
  right: 4px;
  top: 10px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--ink);
  box-shadow: 7px 2px 0 -1px rgba(255, 143, 163, 0.72);
}

.bee-speech {
  position: relative;
  max-width: 116px;
  padding: 9px 10px;
  border-radius: 16px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 12px 26px rgba(36, 34, 42, 0.14);
  font-size: 0.76rem;
  line-height: 1.22;
  font-weight: 900;
}

.bee-speech::before {
  content: "";
  position: absolute;
  left: -6px;
  top: 24px;
  width: 14px;
  height: 14px;
  border-radius: 3px;
  background: inherit;
  transform: rotate(45deg);
}

.sparkle {
  width: 18px;
  height: 18px;
  background: var(--sun);
  clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%);
  animation: floatUp 1.2s ease-out forwards;
}

.heart {
  color: var(--rose);
  font-size: 1.55rem;
  animation: floatUp 1.35s ease-out forwards;
}

.confetti {
  width: 10px;
  height: 16px;
  border-radius: 4px;
  animation: confettiFall 1.4s ease-in forwards;
}

.new-flower {
  width: 16px;
  height: 46px;
  border-radius: 999px;
  background: #4ea861;
  animation: growFlower 620ms ease-out both;
}

.new-flower::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -14px;
  width: 34px;
  height: 34px;
  transform: translateX(-50%);
  border-radius: 50%;
  background:
    radial-gradient(circle at center, var(--sun) 0 23%, transparent 24%),
    conic-gradient(var(--rose), var(--mint), var(--violet), var(--rose));
}

.app[data-scene="night"] .world {
  background:
    radial-gradient(circle at 74% 18%, rgba(255, 247, 180, 0.3), transparent 12rem),
    linear-gradient(to bottom, #1d3154 0%, #49698a 46%, #6eb08d 47%, #569266 100%);
}

.app[data-scene="dawn"] .world {
  background:
    radial-gradient(circle at 24% 22%, rgba(255, 209, 102, 0.26), transparent 13rem),
    linear-gradient(to bottom, #ffd7bd 0%, #bfe7ff 44%, rgba(154, 221, 165, 0.86) 45%, rgba(129, 206, 123, 0.9) 100%);
}

.app[data-scene="dusk"] .world {
  background:
    radial-gradient(circle at 76% 18%, rgba(255, 151, 119, 0.26), transparent 14rem),
    linear-gradient(to bottom, #7a85b8 0%, #f0b08a 44%, rgba(118, 190, 139, 0.9) 45%, rgba(91, 157, 99, 0.92) 100%);
}

.app[data-scene="night"] .sun {
  opacity: 0.25;
}

.app[data-scene="dawn"] .sun,
.app[data-scene="dusk"] .sun {
  opacity: 0.72;
}

.app[data-scene="night"] .cloud,
.app[data-scene="night"] .cloud-object {
  background: rgba(255, 255, 255, 0.68);
}

.app[data-scene="night"] .firefly {
  opacity: 1;
}

.app[data-scene="dawn"] .firefly,
.app[data-scene="dusk"] .firefly {
  opacity: 0.55;
}

@keyframes pulseSun {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

@keyframes drift {
  0%,
  100% {
    translate: 0 0;
  }
  50% {
    translate: 26px 8px;
  }
}

@keyframes steam {
  0%,
  100% {
    opacity: 0.28;
    transform: translateY(6px) scaleY(0.8);
  }
  50% {
    opacity: 0.9;
    transform: translateY(-8px) scaleY(1.05);
  }
}

@keyframes firefly {
  0%,
  100% {
    transform: translate(0, 0);
  }
  45% {
    transform: translate(18px, -22px);
  }
  70% {
    transform: translate(-12px, -10px);
  }
}

@keyframes popSpark {
  0% {
    opacity: 0;
    transform: scale(0.35) rotate(0);
  }
  45% {
    opacity: 1;
    transform: scale(1.15) rotate(24deg);
  }
  100% {
    opacity: 0;
    transform: scale(0.8) rotate(48deg);
  }
}

@keyframes walkBob {
  0%,
  100% {
    translate: 0 0;
  }
  50% {
    translate: 0 -5px;
  }
}

@keyframes limbForward {
  0%,
  100% {
    rotate: 15deg;
  }
  50% {
    rotate: -18deg;
  }
}

@keyframes limbBack {
  0%,
  100% {
    rotate: -15deg;
  }
  50% {
    rotate: 18deg;
  }
}

@keyframes floatUp {
  0% {
    opacity: 0;
    transform: translateY(16px) scale(0.5);
  }
  18% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translateY(-76px) scale(1.1);
  }
}

@keyframes confettiFall {
  0% {
    opacity: 1;
    transform: translateY(-40px) rotate(0deg);
  }
  100% {
    opacity: 0;
    transform: translateY(130px) rotate(280deg);
  }
}

@keyframes growFlower {
  from {
    opacity: 0;
    transform: translateY(32px) scaleY(0.15);
  }
  to {
    opacity: 1;
    transform: translateY(0) scaleY(1);
  }
}

@keyframes breatheOrb {
  0%,
  100% {
    transform: scale(0.78);
  }
  45%,
  60% {
    transform: scale(1.08);
  }
}

@keyframes beeFlight {
  0% {
    opacity: 0;
    transform: translate(-20px, 22px) rotate(-4deg);
  }
  15% {
    opacity: 0;
    transform: translate(20px, 10px) rotate(3deg);
  }
  18%,
  88% {
    opacity: 1;
  }
  28% {
    transform: translate(calc(36vw + 20px), -22px) rotate(5deg);
  }
  58% {
    transform: translate(calc(68vw + 20px), 20px) rotate(-3deg);
  }
  100% {
    opacity: 0;
    transform: translate(calc(100vw + 260px), -14px) rotate(4deg);
  }
}

@keyframes wingFlutter {
  from {
    rotate: -18deg;
    scale: 1 0.82;
  }
  to {
    rotate: 16deg;
    scale: 1 1;
  }
}

@media (max-width: 980px) {
  .app {
    padding: 12px;
  }

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

  .world {
    min-height: 560px;
  }

  .message-panel {
    min-height: auto;
  }
}

@media (max-width: 680px) {
  .topbar {
    align-items: center;
    border-radius: 20px;
  }

  .brand {
    gap: 8px;
  }

  .name-button {
    font-size: 1.16rem;
  }

  .brand-subtitle {
    max-width: 210px;
    font-size: 0.78rem;
    white-space: normal;
    line-height: 1.15;
  }

  .me-avatar {
    flex-basis: 46px;
    width: 46px;
    height: 46px;
    border-radius: 15px;
  }

  .me-avatar > * {
    transform-origin: center;
  }

  .me-sprite {
    width: 66px;
    height: 66px;
  }

  .world {
    min-height: 510px;
    border-radius: 24px;
  }

  .sina-avatar {
    width: 108px;
    min-width: 108px;
    bottom: 17%;
  }

  .avatar-button {
    height: 160px;
  }

  .mii-character {
    scale: 0.84;
  }

  .sina-sprite {
    width: 136px;
  }

  .place {
    width: 88px;
    min-height: 88px;
  }

  .place-cloud {
    top: 19%;
    left: 3%;
  }

  .place-mailbox {
    left: 2%;
    bottom: 20%;
  }

  .place-tea {
    right: 0;
    bottom: 31%;
  }

  .place-garden {
    left: 9%;
    bottom: 4%;
  }

  .place-pond {
    right: 2%;
    bottom: 8%;
  }

  .place-moon {
    top: 17%;
    right: 4%;
  }

  .object-label,
  figcaption {
    min-width: 58px;
    padding: 5px 8px;
    font-size: 0.75rem;
  }

  .message-panel {
    border-radius: 22px;
    padding: 20px;
  }

  .message-panel h1,
  .letter-modal h2 {
    font-size: 1.62rem;
  }

  .mood-button {
    min-width: 88px;
    flex: 1 1 88px;
  }
}

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