:root {
  --paper: #fffaf1;
  --pink: #ee8fa5;
  --pink-deep: #d86d86;
  --brown: #7b5347;
  --brown-soft: rgba(123, 83, 71, 0.56);
  --line: rgba(123, 83, 71, 0.52);
  --mint: #b8d9c4;
  --sun: #ffd984;
  --blue: #b9d5ef;
  --ink-light: rgba(123, 83, 71, 0.16);
  --theme-drawer-width: min(280px, 78%);
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html {
  height: 100%;
}

body {
  min-width: 320px;
  min-height: 100%;
  margin: 0;
  color: var(--brown);
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 248, 246, 0.95), transparent 42%),
    linear-gradient(180deg, #fff7f3 0%, #ffeef4 100%);
  font-family: "Hannotate SC", "Kaiti SC", "Yuanti SC", "STKaiti", "KaiTi", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", cursive;
  -webkit-font-smoothing: antialiased;
}

body.is-theme-drawer-open {
  overflow: hidden;
}

button,
input,
a {
  font: inherit;
}

button,
a {
  color: inherit;
}

button {
  border: 0;
  background: transparent;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}

a {
  text-decoration: none;
}

.phone-page {
  position: relative;
  width: 100%;
  max-width: 430px;
  height: 100vh;
  min-height: -webkit-fill-available;
  margin: 0 auto;
  overflow: hidden;
  background: #f3dde5;
}

.phone-shell {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  overflow: hidden;
  transition: transform 0.38s cubic-bezier(0.32, 0.72, 0, 1);
  will-change: transform;
  background:
    linear-gradient(90deg, rgba(123, 83, 71, 0.055) 0 1px, transparent 1px 100%),
    repeating-linear-gradient(102deg, rgba(255, 255, 255, 0.22) 0 2px, transparent 2px 9px),
    radial-gradient(circle at 16% 12%, rgba(255, 207, 218, 0.58), transparent 30%),
    linear-gradient(180deg, #fff1f5 0%, #fff7ef 58%, #ffeaf1 100%);
  background-size: 34px 100%, auto, auto, auto;
}

.phone-page.is-theme-open .phone-shell {
  transform: translateX(var(--theme-drawer-width));
  box-shadow: -10px 0 28px rgba(123, 83, 71, 0.14);
}

.phone-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.34;
  background-image:
    linear-gradient(45deg, rgba(123, 83, 71, 0.06) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(123, 83, 71, 0.045) 25%, transparent 25%);
  background-size: 13px 13px;
}

.phone-shell::after {
  content: "";
  position: absolute;
  left: 22px;
  top: 0;
  bottom: 0;
  width: 2px;
  border-left: 2px dashed rgba(216, 109, 134, 0.18);
  pointer-events: none;
}

.theme-drawer {
  position: absolute;
  inset: 0 auto 0 0;
  z-index: 0;
  width: var(--theme-drawer-width);
  padding: calc(24px + env(safe-area-inset-top)) 20px 24px;
  overflow-y: auto;
  background:
    radial-gradient(circle at 18% 8%, rgba(255, 217, 132, 0.34), transparent 36%),
    radial-gradient(circle at 88% 18%, rgba(185, 213, 239, 0.28), transparent 32%),
    linear-gradient(180deg, #fff4f7 0%, #fff9f0 100%);
  border-right: 1.5px dashed rgba(123, 83, 71, 0.14);
}

.theme-drawer-head {
  margin-bottom: 18px;
}

.theme-drawer-kicker {
  margin: 0 0 4px;
  color: rgba(123, 83, 71, 0.52);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: lowercase;
}

.theme-drawer-title {
  margin: 0;
  font-size: 1.55rem;
  font-weight: 700;
  transform: rotate(-1deg);
}

.theme-list {
  display: grid;
  gap: 12px;
}

.theme-option {
  position: relative;
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 12px;
  align-items: center;
  width: 100%;
  padding: 12px 14px 12px 12px;
  border: 1.6px solid rgba(123, 83, 71, 0.18);
  border-radius: 16px 18px 15px 17px;
  background: rgba(255, 250, 241, 0.82);
  text-align: left;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.theme-option:not(:disabled):active {
  transform: scale(0.98);
}

.theme-option.is-active {
  border-color: rgba(216, 109, 134, 0.52);
  box-shadow: 0 8px 18px rgba(216, 109, 134, 0.14);
}

.theme-option.is-soon {
  opacity: 0.72;
  cursor: default;
}

.theme-option-swatch {
  width: 52px;
  height: 52px;
  border: 1.4px solid rgba(123, 83, 71, 0.16);
  border-radius: 14px 16px 13px 15px;
  overflow: hidden;
}

.theme-option-swatch span {
  display: block;
  height: 50%;
}

.theme-option-swatch span:nth-child(1) {
  background: linear-gradient(135deg, #fff1f5, #ffeef4);
}

.theme-option-swatch span:nth-child(2) {
  background: linear-gradient(135deg, #fff7ef, #ffeaf1);
}

.theme-option-copy strong {
  display: block;
  margin-bottom: 2px;
  font-size: 1rem;
}

.theme-option-copy em {
  display: block;
  color: rgba(123, 83, 71, 0.58);
  font-size: 0.82rem;
  font-style: normal;
}

.theme-option-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(216, 109, 134, 0.14);
  color: var(--pink-deep);
  font-size: 0.72rem;
}

.theme-option.is-soon .theme-option-badge {
  background: rgba(123, 83, 71, 0.08);
  color: rgba(123, 83, 71, 0.56);
}

.theme-drawer-hint {
  margin: 18px 0 0;
  color: rgba(123, 83, 71, 0.48);
  font-size: 0.82rem;
  line-height: 1.5;
}

.theme-drawer-scrim {
  position: absolute;
  inset: 0;
  z-index: 40;
  display: none;
  border: 0;
  background: rgba(123, 83, 71, 0.1);
  cursor: pointer;
}

.phone-page.is-theme-open .theme-drawer-scrim {
  display: block;
}

.theme-toggle {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
}

.theme-toggle-icon {
  position: relative;
  width: 28px;
  height: 28px;
  border: 1.8px solid rgba(123, 83, 71, 0.28);
  border-radius: 50% 46% 54% 48%;
  background: rgba(255, 250, 241, 0.58);
  transform: rotate(-8deg);
}

.theme-toggle-icon::before,
.theme-toggle-icon::after {
  content: "";
  position: absolute;
  border-radius: 50%;
}

.theme-toggle-icon::before {
  width: 8px;
  height: 8px;
  left: 5px;
  top: 6px;
  background: var(--pink);
}

.theme-toggle-icon::after {
  width: 6px;
  height: 6px;
  right: 5px;
  bottom: 6px;
  background: var(--mint);
}

/* Theme-specific styles live in separate theme files. */
.phone-page::before,
.phone-page::after {
  display: none;
}

.page-doodles {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.page-doodles span {
  position: absolute;
  color: rgba(123, 83, 71, 0.22);
}

.doodle-star {
  left: 31px;
  top: 278px;
  color: rgba(238, 143, 165, 0.52);
  font-size: 1.05rem;
  transform: rotate(-12deg);
}

.doodle-cloud {
  right: 20px;
  top: 246px;
  color: rgba(185, 213, 239, 0.86);
  font-size: 1.55rem;
  transform: rotate(8deg);
}

.doodle-flower {
  left: 20px;
  bottom: 86px;
  color: rgba(184, 217, 196, 0.9);
  font-size: 1.35rem;
  transform: rotate(-9deg);
}

.doodle-loop {
  right: -8px;
  bottom: 156px;
  width: 76px;
  height: 34px;
  border: 2px solid rgba(123, 83, 71, 0.14);
  border-color: transparent transparent rgba(123, 83, 71, 0.16) rgba(123, 83, 71, 0.16);
  border-radius: 50%;
  transform: rotate(-24deg);
}

.doodle-ribbon {
  left: 59px;
  top: 52px;
  width: 52px;
  height: 13px;
  border: 1px solid rgba(238, 143, 165, 0.22);
  border-radius: 4px;
  background:
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.34) 0 5px, transparent 5px 10px),
    rgba(255, 217, 132, 0.46);
  transform: rotate(-7deg);
}

.view {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: none;
  padding: calc(20px + env(safe-area-inset-top)) 22px 24px;
  overflow: hidden;
}

.view.is-active {
  display: block;
}

.phone-top,
.cover-section,
.today-card,
.home-hero,
.feature-grid,
.tool-header,
.tool-card {
  position: relative;
  z-index: 1;
}

.phone-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 38px;
}

.notebook-ring {
  position: absolute;
  left: 50%;
  top: -16px;
  display: flex;
  gap: 13px;
  transform: translateX(-50%);
}

.notebook-ring span {
  width: 11px;
  height: 34px;
  border: 2px solid rgba(123, 83, 71, 0.28);
  border-top: 0;
  border-radius: 0 0 999px 999px;
  background: rgba(255, 250, 241, 0.56);
  box-shadow: inset 0 -3px 0 rgba(255, 217, 132, 0.24);
}

.music-note {
  width: 42px;
  height: 42px;
  border: 1.6px solid rgba(123, 83, 71, 0.25);
  border-radius: 50% 46% 54% 48%;
  background: rgba(255, 250, 241, 0.58);
  font-size: 2rem;
  line-height: 1;
  transform: rotate(7deg);
}

.cover-section {
  padding-top: 10px;
  text-align: center;
}

.home-hero.asset-slot {
  display: none;
}

.float-doodles {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.heart,
.spark {
  position: absolute;
  color: rgba(238, 143, 165, 0.72);
  font-size: 1.35rem;
  transform: rotate(-12deg);
}

.h1 { left: 9px; top: 92px; }
.h2 { right: 42px; top: 14px; font-size: 1rem; }
.h3 { right: 18px; top: 115px; color: var(--pink-deep); }
.s1 { left: 80px; top: 138px; font-size: 0.9rem; }

.title-paper {
  --drop-rotate: 1deg;
  position: relative;
  width: 84%;
  max-width: 320px;
  margin: 0 auto;
  padding: 22px 18px 21px;
  border: 2px solid var(--line);
  border-radius: 32px 26px 34px 28px;
  background:
    repeating-linear-gradient(-9deg, rgba(216, 109, 134, 0.045) 0 1px, transparent 1px 9px),
    linear-gradient(135deg, rgba(255, 255, 255, 0.72), rgba(255, 245, 233, 0.82)),
    var(--paper);
  box-shadow: 0 12px 0 rgba(238, 143, 165, 0.09);
  transform: rotate(var(--drop-rotate));
}

.title-paper--art {
  padding: 18px 14px 15px;
}

.title-paper::before {
  content: "";
  position: absolute;
  inset: 6px 7px 7px 6px;
  border: 1.6px dashed rgba(216, 109, 134, 0.42);
  border-radius: 28px 23px 31px 25px;
  transform: rotate(-1.1deg);
  pointer-events: none;
}

.title-paper::after {
  content: "";
  position: absolute;
  left: 54px;
  right: 54px;
  bottom: 13px;
  height: 8px;
  border-bottom: 5px solid var(--pink);
  border-radius: 50%;
  transform: rotate(2deg);
}

.title-paper--art::after {
  display: none;
}

.title-paper h1 {
  position: relative;
  z-index: 1;
  margin: 0;
  color: var(--pink);
  font-size: 3.25rem;
  font-weight: 500;
  line-height: 1.02;
  letter-spacing: 0;
  text-shadow: 1px 1px 0 rgba(123, 83, 71, 0.12);
}

.title-art {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: auto;
  max-height: 168px;
  object-fit: contain;
}

.clip-left {
  position: absolute;
  top: -12px;
  left: 42px;
  width: 24px;
  height: 32px;
  border: 3px solid var(--brown-soft);
  border-radius: 7px 7px 3px 3px;
  transform: rotate(-8deg);
}

.clip-left::before {
  content: "";
  position: absolute;
  inset: 6px 5px;
  border: 2px solid rgba(123, 83, 71, 0.35);
  border-radius: 5px;
}

.clip-top {
  position: absolute;
  top: -17px;
  left: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid rgba(123, 83, 71, 0.38);
  border-radius: 50%;
  background: #ffdbe4;
  color: var(--pink);
  transform: translateX(-50%) rotate(-5deg);
}

.bow {
  position: absolute;
  right: -5px;
  top: 24px;
  width: 58px;
  height: 40px;
}

.bow::before,
.bow::after {
  content: "";
  position: absolute;
  top: 6px;
  width: 28px;
  height: 26px;
  border: 2px solid var(--line);
  background: #ffc2d1;
}

.bow::before {
  left: 1px;
  border-radius: 70% 35% 70% 35%;
  transform: rotate(-22deg);
}

.bow::after {
  right: 1px;
  border-radius: 35% 70% 35% 70%;
  transform: rotate(22deg);
}

.sticker-row {
  display: flex;
  justify-content: center;
  gap: 7px;
  margin-top: 6px;
}

.sticker-row span {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 0 8px;
  border: 1px solid rgba(123, 83, 71, 0.18);
  border-radius: 5px 7px 4px 6px;
  background: rgba(255, 250, 241, 0.56);
  color: rgba(123, 83, 71, 0.54);
  font-size: 0.66rem;
  letter-spacing: 0;
  transform: rotate(-2deg);
}

.sticker-row span:nth-child(2) {
  background: rgba(184, 217, 196, 0.36);
  transform: rotate(1.6deg);
}

.sticker-row span:nth-child(3) {
  background: rgba(185, 213, 239, 0.34);
  transform: rotate(-0.8deg);
}

.paper-card {
  position: relative;
  border: 2px solid rgba(123, 83, 71, 0.42);
  border-radius: 28px 34px 27px 31px;
  background:
    repeating-linear-gradient(97deg, rgba(216, 109, 134, 0.035) 0 1px, transparent 1px 10px),
    linear-gradient(135deg, rgba(255, 255, 255, 0.5), transparent 48%),
    #fffaf1;
  box-shadow: 0 8px 0 rgba(238, 143, 165, 0.08);
}

.view-home .paper-card::before {
  content: "";
  position: absolute;
  inset: 7px 8px 8px 7px;
  border: 1.4px dashed rgba(123, 83, 71, 0.24);
  border-radius: 23px 30px 22px 28px;
  transform: rotate(-0.7deg);
  pointer-events: none;
}

.today-card {
  margin-top: 8px;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.today-card .mimi-cat-art {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}

.tool-desc,
.result-note {
  margin: 0;
  color: var(--brown-soft);
  line-height: 1.55;
}

.tiny-paper-button,
.wide-paper-button,
.file-picker span,
.wish-form button,
.chat-form button {
  border: 1.8px solid rgba(123, 83, 71, 0.36);
  border-radius: 16px 14px 18px 13px;
  background: #ffd6df;
  color: var(--brown);
  box-shadow: 0 4px 0 rgba(238, 143, 165, 0.14);
}

.tiny-paper-button {
  min-width: 72px;
  min-height: 40px;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 9px;
  margin-top: 10px;
}

.feature-tile {
  --drop-rotate: 0deg;
  position: relative;
  min-width: 0;
  min-height: 88px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 9px 4px;
  border: 2px dashed rgba(216, 109, 134, 0.38);
  border-radius: 25px 20px 24px 22px;
  background:
    repeating-linear-gradient(-12deg, rgba(255, 255, 255, 0.36) 0 2px, transparent 2px 10px),
    rgba(255, 250, 241, 0.66);
  text-align: center;
  box-shadow: 0 4px 0 rgba(123, 83, 71, 0.035);
}

.feature-tile:nth-child(even) { --drop-rotate: 1deg; transform: rotate(var(--drop-rotate)); }
.feature-tile:nth-child(odd) { --drop-rotate: -1deg; transform: rotate(var(--drop-rotate)); }
.feature-tile:nth-child(2) { background-color: rgba(184, 217, 196, 0.26); }
.feature-tile:nth-child(3) { background-color: rgba(255, 217, 132, 0.24); }
.feature-tile:nth-child(4) { background-color: rgba(185, 213, 239, 0.25); }
.feature-tile:nth-child(5) { background-color: rgba(255, 250, 241, 0.72); }
.feature-tile:nth-child(6) { background-color: rgba(255, 220, 230, 0.42); }

.feature-tile::before {
  content: "";
  position: absolute;
  inset: 5px 6px 6px 5px;
  border: 1.4px solid rgba(123, 83, 71, 0.2);
  border-radius: 21px 17px 20px 18px;
  transform: rotate(-1.5deg);
  pointer-events: none;
}

.feature-tile::after {
  content: "";
  position: absolute;
  top: -5px;
  right: 14px;
  width: 30px;
  height: 10px;
  border: 1px solid rgba(238, 143, 165, 0.26);
  border-radius: 2px;
  background: rgba(255, 210, 222, 0.72);
  transform: rotate(5deg);
  pointer-events: none;
}

.feature-tile:nth-child(3n + 2)::before {
  border-style: dashed;
  transform: rotate(1.2deg);
}

.feature-tile:nth-child(3n)::after {
  left: 12px;
  right: auto;
  transform: rotate(-6deg);
}

.draw-icon {
  position: relative;
  z-index: 1;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.4px solid rgba(216, 109, 134, 0.22);
  border-radius: 14px 16px 13px 15px;
  background: rgba(255, 232, 238, 0.62);
  color: var(--pink-deep);
  font-size: 1.45rem;
  transform: rotate(-2deg);
}

.feature-tile b {
  position: relative;
  z-index: 1;
  font-size: 0.92rem;
  font-weight: 500;
}

.feature-tile em {
  position: relative;
  z-index: 1;
  display: block;
  color: rgba(123, 83, 71, 0.52);
  font-size: 0.7rem;
  font-style: normal;
  line-height: 1;
}

.feature-tile--lettering {
  padding: 8px 7px;
}

.tile-lettering {
  position: relative;
  z-index: 1;
  display: block;
  width: 110%;
  max-width: 130px;
  height: auto;
  max-height: 84px;
  object-fit: contain;
  filter: drop-shadow(0 2px 0 rgba(216, 109, 134, 0.08));
  transform: rotate(-1.4deg);
}

.feature-tile:first-child {
  padding: 4px 3px;
}

.tile-lettering--toolbox {
  width: 116%;
  max-width: 132px;
  max-height: 86px;
  transform: rotate(-1.4deg) scale(1.08);
}

.home-note {
  --drop-rotate: -0.8deg;
  display: grid;
  grid-template-columns: 1fr 48px;
  align-items: center;
  gap: 10px;
  margin-top: 13px;
  padding: 14px 16px;
  border-radius: 20px 17px 22px 18px;
  background:
    linear-gradient(90deg, rgba(185, 213, 239, 0.34) 0 8px, transparent 8px),
    repeating-linear-gradient(0deg, transparent 0 22px, rgba(123, 83, 71, 0.08) 22px 23px),
    #fffdf6;
  transform: rotate(var(--drop-rotate));
}

body.is-dropping .view-home.is-active .title-paper,
body.is-dropping .view-home.is-active .feature-tile,
body.is-dropping .view-home.is-active .home-note {
  animation: paperDrop 780ms cubic-bezier(0.18, 0.9, 0.26, 1.12) both;
  will-change: transform, opacity;
}

body.is-dropping .view-home.is-active .title-paper { animation-delay: 80ms; }
body.is-dropping .view-home.is-active .feature-tile:nth-child(1) { animation-delay: 350ms; }
body.is-dropping .view-home.is-active .feature-tile:nth-child(2) { animation-delay: 410ms; }
body.is-dropping .view-home.is-active .feature-tile:nth-child(3) { animation-delay: 470ms; }
body.is-dropping .view-home.is-active .feature-tile:nth-child(4) { animation-delay: 530ms; }
body.is-dropping .view-home.is-active .feature-tile:nth-child(5) { animation-delay: 590ms; }
body.is-dropping .view-home.is-active .feature-tile:nth-child(6) { animation-delay: 650ms; }
body.is-dropping .view-home.is-active .home-note { animation-delay: 720ms; }

@keyframes paperDrop {
  0% {
    opacity: 0;
    transform: translateY(-92px) rotate(calc(var(--drop-rotate) - 8deg)) scale(0.96);
  }
  62% {
    opacity: 1;
    transform: translateY(8px) rotate(calc(var(--drop-rotate) + 1.6deg)) scale(1.01);
  }
  82% {
    transform: translateY(-3px) rotate(calc(var(--drop-rotate) - 0.8deg)) scale(0.995);
  }
  100% {
    opacity: 1;
    transform: translateY(0) rotate(var(--drop-rotate)) scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  body.is-dropping .view-home.is-active .title-paper,
  body.is-dropping .view-home.is-active .feature-tile,
  body.is-dropping .view-home.is-active .home-note {
    animation: none;
  }
}

.home-note::before {
  content: "";
  position: absolute;
  left: 18px;
  right: 76px;
  bottom: 13px;
  height: 6px;
  border-bottom: 3px solid rgba(184, 217, 196, 0.66);
  border-radius: 50%;
  transform: rotate(1deg);
}

.home-note p,
.home-note strong,
.note-stamp {
  position: relative;
  z-index: 1;
}

.home-note p {
  margin: 0;
  color: var(--brown-soft);
  font-size: 0.88rem;
}

.home-note strong {
  display: block;
  margin-top: 2px;
  font-size: 1.02rem;
  font-weight: 500;
  line-height: 1.45;
  transition: opacity 160ms ease;
}

.home-note strong.is-refreshing {
  opacity: 0;
}

.note-pin {
  position: absolute;
  left: 50%;
  top: -9px;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(123, 83, 71, 0.24);
  border-radius: 50%;
  background: #ffd6df;
  box-shadow: inset 0 0 0 4px rgba(255, 250, 241, 0.45);
  transform: translateX(-50%);
}

.note-stamp {
  justify-self: end;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 2px solid rgba(216, 109, 134, 0.48);
  border-radius: 50% 44% 52% 48%;
  background: rgba(255, 250, 241, 0.72);
  color: rgba(216, 109, 134, 0.78);
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1;
  transform: rotate(11deg);
  transition: transform 140ms ease, box-shadow 140ms ease;
}

.note-stamp:active {
  transform: rotate(11deg) scale(0.94);
  box-shadow: 0 2px 0 rgba(216, 109, 134, 0.14);
}

.tool-view {
  padding-bottom: 18px;
}

.toolbox-view {
  overflow: hidden;
}

.toolbox-scene {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.toolbox-doodle {
  position: absolute;
  color: rgba(123, 83, 71, 0.22);
}

.toolbox-doodle--heart {
  left: 28px;
  top: 118px;
  color: rgba(238, 143, 165, 0.58);
  font-size: 1.2rem;
  transform: rotate(-14deg);
}

.toolbox-doodle--star {
  right: 34px;
  top: 96px;
  color: rgba(255, 217, 132, 0.92);
  font-size: 1.05rem;
  transform: rotate(10deg);
}

.toolbox-doodle--spark {
  right: 18px;
  bottom: 118px;
  color: rgba(185, 213, 239, 0.82);
  font-size: 0.95rem;
  transform: rotate(-8deg);
}

.toolbox-doodle--loop {
  left: -6px;
  bottom: 210px;
  width: 68px;
  height: 30px;
  border: 2px solid rgba(123, 83, 71, 0.12);
  border-color: transparent transparent rgba(123, 83, 71, 0.14) rgba(123, 83, 71, 0.14);
  border-radius: 50%;
  transform: rotate(-20deg);
}

.toolbox-doodle--ribbon {
  right: 52px;
  top: 54px;
  width: 46px;
  height: 12px;
  border: 1px solid rgba(238, 143, 165, 0.22);
  border-radius: 3px;
  background:
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.34) 0 5px, transparent 5px 10px),
    rgba(184, 217, 196, 0.42);
  transform: rotate(6deg);
}

.tool-header {
  height: 88px;
  display: grid;
  grid-template-columns: 48px 1fr;
  align-items: center;
  gap: 12px;
}

.tool-header--toolbox {
  position: relative;
  z-index: 1;
  align-items: center;
}

.tool-header-copy {
  position: relative;
  padding-top: 4px;
}

.tool-header-tag {
  display: inline-block;
  padding: 1px 10px 3px;
  border: 1px solid rgba(216, 109, 134, 0.24);
  border-radius: 6px 8px 5px 7px;
  background: rgba(255, 232, 238, 0.52);
  color: var(--pink-deep);
  font-size: 0.82rem;
  transform: rotate(-1.5deg);
}

.tool-header-copy h2 {
  margin: 3px 0 0;
  font-size: 2rem;
  font-weight: 500;
  line-height: 1;
}

.toolbox-body {
  position: relative;
  z-index: 1;
  height: calc(100% - 88px);
  padding-top: 4px;
  padding-bottom: 8px;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.toolbox-view.is-entering .toolbox-item {
  animation: paperDrop 780ms cubic-bezier(0.18, 0.9, 0.26, 1.12) both;
  will-change: transform, opacity;
}

.toolbox-view.is-entering .toolbox-item:nth-child(1) { animation-delay: 80ms; }
.toolbox-view.is-entering .toolbox-item:nth-child(2) { animation-delay: 160ms; }
.toolbox-view.is-entering .toolbox-item:nth-child(3) { animation-delay: 240ms; }

@media (prefers-reduced-motion: reduce) {
  .toolbox-view.is-entering .toolbox-item {
    animation: none;
  }
}

.tool-header {
  height: 88px;
  display: grid;
  grid-template-columns: 48px 1fr;
  align-items: center;
  gap: 12px;
}

.back-button {
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid rgba(123, 83, 71, 0.36);
  border-radius: 50%;
  background: #fffaf1;
  color: var(--pink-deep);
  font-family: Georgia, serif;
  font-size: 2.2rem;
  line-height: 1;
}

.tool-header span {
  color: var(--pink-deep);
  font-size: 0.95rem;
}

.tool-header h2 {
  margin: 3px 0 0;
  font-size: 2rem;
  font-weight: 500;
  line-height: 1;
}

.tool-card {
  height: calc(100% - 98px);
  padding: 22px 18px 18px;
  overflow: hidden;
}

.toolbox-grid {
  display: grid;
  gap: 12px;
  align-content: start;
}

.toolbox-item {
  --drop-rotate: -0.6deg;
  --item-tint: rgba(255, 250, 241, 0.74);
  position: relative;
  min-height: 86px;
  display: grid;
  grid-template-columns: 52px 1fr 24px;
  grid-template-rows: auto auto;
  column-gap: 12px;
  row-gap: 0;
  align-content: center;
  align-items: center;
  padding: 14px 14px 13px;
  border: 2px dashed rgba(216, 109, 134, 0.38);
  border-radius: 22px 18px 24px 19px;
  background:
    repeating-linear-gradient(-10deg, rgba(255, 255, 255, 0.36) 0 2px, transparent 2px 10px),
    var(--item-tint);
  text-align: left;
  box-shadow: 0 4px 0 rgba(123, 83, 71, 0.035);
  transform: rotate(var(--drop-rotate));
}

.toolbox-item--pdf {
  --item-tint: rgba(255, 220, 230, 0.38);
}

.toolbox-item--compress {
  --drop-rotate: 0.7deg;
  --item-tint: rgba(184, 217, 196, 0.28);
}

.toolbox-item--convert {
  --drop-rotate: -0.4deg;
  --item-tint: rgba(255, 217, 132, 0.24);
}

.toolbox-item:nth-child(even) {
  transform: rotate(var(--drop-rotate));
}

.toolbox-item::before {
  content: "";
  position: absolute;
  inset: 6px 7px 7px 6px;
  border: 1.4px solid rgba(123, 83, 71, 0.18);
  border-radius: 18px 15px 20px 16px;
  transform: rotate(0.7deg);
  pointer-events: none;
}

.toolbox-item::after {
  content: "";
  position: absolute;
  top: -6px;
  right: 28px;
  width: 38px;
  height: 12px;
  border: 1px solid rgba(238, 143, 165, 0.24);
  border-radius: 2px;
  background: rgba(255, 210, 222, 0.72);
  transform: rotate(4deg);
  pointer-events: none;
}

.toolbox-item--compress::after {
  left: 24px;
  right: auto;
  background: rgba(184, 217, 196, 0.62);
  transform: rotate(-5deg);
}

.toolbox-item--convert::after {
  right: 18px;
  background: rgba(255, 217, 132, 0.62);
  transform: rotate(6deg);
}

.toolbox-item-tape {
  position: absolute;
  left: 50%;
  top: -7px;
  width: 34px;
  height: 11px;
  margin-left: -17px;
  border: 1px solid rgba(123, 83, 71, 0.14);
  border-radius: 2px;
  background:
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.42) 0 4px, transparent 4px 8px),
    rgba(185, 213, 239, 0.58);
  transform: rotate(-2deg);
  pointer-events: none;
  z-index: 2;
}

.toolbox-icon {
  position: relative;
  z-index: 1;
  grid-row: 1 / 3;
  width: 46px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid rgba(216, 109, 134, 0.24);
  border-radius: 16px 18px 15px 17px;
  background: rgba(255, 232, 238, 0.68);
  color: var(--pink-deep);
  transform: rotate(-3deg);
}

.toolbox-icon--svg svg {
  width: 30px;
  height: 30px;
}

.toolbox-icon--svg path,
.toolbox-icon--svg rect,
.toolbox-icon--svg circle {
  fill: none;
  stroke: var(--pink-deep);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.toolbox-item--compress .toolbox-icon {
  background: rgba(214, 236, 221, 0.72);
  border-color: rgba(120, 168, 138, 0.28);
}

.toolbox-item--compress .toolbox-icon--svg path {
  stroke: rgba(76, 128, 98, 0.88);
}

.toolbox-item--convert .toolbox-icon {
  background: rgba(255, 241, 196, 0.78);
  border-color: rgba(196, 154, 62, 0.28);
}

.toolbox-item--convert .toolbox-icon--svg path {
  stroke: rgba(158, 118, 38, 0.88);
}

.toolbox-item-copy {
  position: relative;
  z-index: 1;
  grid-column: 2;
}

.toolbox-item-copy strong {
  display: block;
  font-size: 1.08rem;
  font-weight: 500;
}

.toolbox-item-copy em {
  display: block;
  margin-top: 4px;
  color: rgba(123, 83, 71, 0.52);
  font-size: 0.78rem;
  font-style: normal;
}

.toolbox-go {
  position: relative;
  z-index: 1;
  grid-column: 3;
  grid-row: 1 / 3;
  align-self: center;
  color: var(--pink-deep);
  font-family: Georgia, serif;
  font-size: 1.8rem;
  line-height: 1;
  transform: rotate(2deg);
}

.toolbox-badge {
  position: absolute;
  bottom: 11px;
  right: 12px;
  z-index: 2;
  min-width: 34px;
  padding: 2px 7px 3px;
  border: 1.4px dashed rgba(216, 109, 134, 0.42);
  border-radius: 999px;
  font-size: 0.62rem;
  letter-spacing: 0.04em;
  transform: rotate(8deg);
}

.toolbox-badge--ready {
  background: rgba(255, 232, 238, 0.82);
  color: var(--pink-deep);
}

.toolbox-badge--soon {
  background: rgba(255, 250, 241, 0.86);
  color: rgba(123, 83, 71, 0.58);
}

.toolbox-soon {
  opacity: 0.78;
  cursor: default;
}

.file-picker input,
.pdf-dropzone input {
  display: none;
}

.pdf-view {
  overflow: hidden;
}

.pdf-scene {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.pdf-doodle {
  position: absolute;
}

.pdf-doodle--heart {
  left: 24px;
  top: 132px;
  color: rgba(238, 143, 165, 0.56);
  font-size: 1.15rem;
  transform: rotate(-12deg);
}

.pdf-doodle--star {
  right: 28px;
  top: 108px;
  color: rgba(255, 217, 132, 0.9);
  font-size: 1rem;
  transform: rotate(8deg);
}

.pdf-doodle--page {
  right: 14px;
  bottom: 148px;
  width: 42px;
  height: 54px;
  border: 2px solid rgba(123, 83, 71, 0.18);
  border-radius: 4px 8px 6px 5px;
  background: rgba(255, 250, 241, 0.52);
  transform: rotate(12deg);
}

.pdf-doodle--page::before {
  content: "";
  position: absolute;
  left: 7px;
  right: 7px;
  top: 10px;
  height: 2px;
  background: rgba(123, 83, 71, 0.14);
  box-shadow: 0 8px 0 rgba(123, 83, 71, 0.12), 0 16px 0 rgba(123, 83, 71, 0.1);
}

.pdf-doodle--clip {
  left: 52px;
  top: 58px;
  width: 22px;
  height: 30px;
  border: 2.5px solid rgba(123, 83, 71, 0.28);
  border-radius: 6px 6px 3px 3px;
  transform: rotate(-10deg);
}

.tool-header--pdf {
  position: relative;
  z-index: 1;
}

.pdf-body {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
  height: calc(100% - 88px);
  padding-top: 2px;
  padding-bottom: 8px;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.pdf-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.pdf-step {
  --drop-rotate: -0.5deg;
  position: relative;
  display: grid;
  justify-items: center;
  gap: 4px;
  padding: 10px 6px 8px;
  border: 1.8px dashed rgba(216, 109, 134, 0.32);
  border-radius: 18px 15px 17px 16px;
  background: rgba(255, 250, 241, 0.62);
  text-align: center;
  transform: rotate(var(--drop-rotate));
}

.pdf-step:nth-child(2) {
  --drop-rotate: 0.6deg;
  background-color: rgba(255, 220, 230, 0.28);
}

.pdf-step:nth-child(3) {
  --drop-rotate: -0.3deg;
  background-color: rgba(255, 217, 132, 0.22);
}

.pdf-step span {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.4px solid rgba(216, 109, 134, 0.28);
  border-radius: 50%;
  background: rgba(255, 232, 238, 0.72);
  color: var(--pink-deep);
  font-size: 0.82rem;
}

.pdf-step b {
  font-size: 0.82rem;
  font-weight: 500;
}

.pdf-step.is-active {
  border-style: solid;
  box-shadow: 0 4px 0 rgba(238, 143, 165, 0.1);
}

.pdf-step.is-active span {
  background: var(--pink);
  border-color: rgba(123, 83, 71, 0.18);
  color: #fffaf1;
}

.pdf-step.is-done span {
  background: rgba(184, 217, 196, 0.72);
  border-color: rgba(120, 168, 138, 0.28);
  color: rgba(76, 128, 98, 0.92);
}

.pdf-album {
  --drop-rotate: -0.4deg;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 18px 16px 16px;
  border-radius: 26px 22px 28px 24px;
  background:
    repeating-linear-gradient(-8deg, rgba(216, 109, 134, 0.03) 0 1px, transparent 1px 11px),
    linear-gradient(145deg, rgba(255, 255, 255, 0.58), rgba(255, 245, 233, 0.72)),
    rgba(255, 220, 230, 0.22);
  transform: rotate(var(--drop-rotate));
}

.pdf-album::before {
  content: "";
  position: absolute;
  inset: 7px 8px 8px 7px;
  border: 1.4px dashed rgba(123, 83, 71, 0.22);
  border-radius: 22px 18px 24px 20px;
  transform: rotate(0.6deg);
  pointer-events: none;
}

.pdf-tape {
  position: absolute;
  top: -8px;
  width: 52px;
  height: 15px;
  border: 1px solid rgba(216, 109, 134, 0.22);
  border-radius: 3px;
  background:
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.42) 0 5px, transparent 5px 10px),
    rgba(255, 193, 209, 0.72);
  pointer-events: none;
  z-index: 2;
}

.pdf-tape--left {
  left: 22px;
  transform: rotate(-4deg);
}

.pdf-tape--right {
  right: 24px;
  transform: rotate(5deg);
}

.pdf-album-head {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 12px;
  align-items: center;
}

.pdf-album-icon {
  width: 46px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid rgba(216, 109, 134, 0.24);
  border-radius: 16px 18px 14px 17px;
  background: rgba(255, 232, 238, 0.68);
  transform: rotate(-3deg);
}

.pdf-album-icon svg {
  width: 28px;
  height: 28px;
}

.pdf-album-icon path,
.pdf-album-icon rect {
  fill: none;
  stroke: var(--pink-deep);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.pdf-album-head h3 {
  margin: 0;
  font-size: 1.18rem;
  font-weight: 500;
  line-height: 1.2;
}

.pdf-album-desc {
  margin: 5px 0 0;
  color: var(--brown-soft);
  font-size: 0.88rem;
  line-height: 1.45;
}

.pdf-dropzone {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  column-gap: 10px;
  row-gap: 1px;
  align-items: center;
  padding: 10px 12px;
  border: 2px dashed rgba(216, 109, 134, 0.42);
  border-radius: 18px 16px 20px 17px;
  background:
    repeating-linear-gradient(-12deg, rgba(255, 255, 255, 0.34) 0 2px, transparent 2px 10px),
    rgba(255, 250, 241, 0.78);
  cursor: pointer;
}

.pdf-dropzone-ring {
  position: absolute;
  inset: 5px 6px;
  border: 1.2px solid rgba(123, 83, 71, 0.14);
  border-radius: 14px 12px 16px 13px;
  transform: rotate(-0.8deg);
  pointer-events: none;
}

.pdf-dropzone-art {
  position: relative;
  z-index: 1;
  grid-row: 1 / 3;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.pdf-dropzone-art svg {
  width: 100%;
  height: 100%;
}

.pdf-dropzone-art path,
.pdf-dropzone-art rect {
  fill: none;
  stroke: var(--pink-deep);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.pdf-dropzone strong {
  position: relative;
  z-index: 1;
  align-self: end;
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1.2;
  text-align: left;
}

.pdf-dropzone em {
  position: relative;
  z-index: 1;
  align-self: start;
  color: rgba(123, 83, 71, 0.52);
  font-size: 0.68rem;
  font-style: normal;
  line-height: 1.3;
  text-align: left;
}

.pdf-preview {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
  flex: 1 1 auto;
}

.pdf-preview-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.pdf-preview-head p {
  margin: 0;
  color: var(--brown-soft);
  font-size: 0.88rem;
}

.pdf-preview-head strong {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--pink-deep);
}

.pdf-preview-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  min-height: 120px;
  max-height: min(42vh, 280px);
  padding: 12px 10px;
  border: 1.8px dashed rgba(216, 109, 134, 0.3);
  border-radius: 20px 16px 22px 18px;
  background:
    linear-gradient(90deg, rgba(185, 213, 239, 0.22) 0 7px, transparent 7px),
    repeating-linear-gradient(0deg, transparent 0 22px, rgba(123, 83, 71, 0.06) 22px 23px),
    rgba(255, 253, 246, 0.88);
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

.pdf-empty {
  grid-column: 1 / -1;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 6px;
  min-height: 96px;
  color: rgba(123, 83, 71, 0.42);
  text-align: center;
}

.pdf-empty span {
  color: rgba(238, 143, 165, 0.62);
  font-size: 1.6rem;
  transform: rotate(-8deg);
}

.pdf-empty p {
  margin: 0;
  font-size: 0.86rem;
}

.pdf-thumb {
  --thumb-rotate: -1deg;
  position: relative;
  margin: 0;
  padding: 6px 6px 14px;
  border: 1.5px solid rgba(123, 83, 71, 0.32);
  border-radius: 12px 10px 14px 11px;
  background: #fff;
  box-shadow: 0 3px 0 rgba(123, 83, 71, 0.06);
  transform: rotate(var(--thumb-rotate));
}

.pdf-thumb:nth-child(3n + 2) { --thumb-rotate: 1.2deg; }
.pdf-thumb:nth-child(3n) { --thumb-rotate: -1.6deg; }

.pdf-thumb img {
  display: block;
  width: 100%;
  height: 72px;
  object-fit: cover;
  border: 1px solid rgba(123, 83, 71, 0.12);
  border-radius: 8px 7px 9px 6px;
  background: #fff;
}

.pdf-thumb-index {
  position: absolute;
  top: -7px;
  left: -5px;
  z-index: 1;
  min-width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  border: 1.2px solid rgba(216, 109, 134, 0.32);
  border-radius: 999px;
  background: rgba(255, 232, 238, 0.92);
  color: var(--pink-deep);
  font-size: 0.66rem;
  transform: rotate(-8deg);
}

.pdf-actions {
  display: grid;
  gap: 8px;
  padding-bottom: 4px;
}

.pdf-make-button {
  position: relative;
  gap: 8px;
  margin-top: 0;
  font-size: 1rem;
}

.pdf-btn-icon {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1.4px solid rgba(123, 83, 71, 0.18);
  border-radius: 10px 11px 9px 12px;
  background: rgba(255, 255, 255, 0.42);
  font-size: 0.95rem;
  transform: rotate(-3deg);
}

.pdf-clear-button {
  min-height: 40px;
  border: 1.6px dashed rgba(123, 83, 71, 0.28);
  border-radius: 14px 12px 16px 13px;
  background: rgba(255, 250, 241, 0.56);
  color: rgba(123, 83, 71, 0.62);
  font-size: 0.88rem;
}

.pdf-view.is-entering .pdf-step,
.pdf-view.is-entering .pdf-album,
.pdf-view.is-entering .pdf-actions {
  animation: paperDrop 780ms cubic-bezier(0.18, 0.9, 0.26, 1.12) both;
  will-change: transform, opacity;
}

.pdf-view.is-entering .pdf-step:nth-child(1) { animation-delay: 60ms; }
.pdf-view.is-entering .pdf-step:nth-child(2) { animation-delay: 120ms; }
.pdf-view.is-entering .pdf-step:nth-child(3) { animation-delay: 180ms; }
.pdf-view.is-entering .pdf-album { animation-delay: 240ms; }
.pdf-view.is-entering .pdf-actions { animation-delay: 340ms; }

@media (prefers-reduced-motion: reduce) {
  .pdf-view.is-entering .pdf-step,
  .pdf-view.is-entering .pdf-album,
  .pdf-view.is-entering .pdf-actions {
    animation: none;
  }
}

.file-picker span,
.wide-paper-button {
  min-height: 48px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 14px;
}

.pdf-make-button.wide-paper-button {
  margin-top: 0;
}

.album-view {
  overflow: hidden;
}

.album-scene {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.album-doodle {
  position: absolute;
  color: rgba(123, 83, 71, 0.22);
}

.album-doodle--heart {
  left: 24px;
  top: 108px;
  color: rgba(238, 143, 165, 0.58);
  font-size: 1.15rem;
  transform: rotate(-12deg);
}

.album-doodle--star {
  right: 30px;
  top: 88px;
  color: rgba(255, 217, 132, 0.92);
  font-size: 1rem;
  transform: rotate(8deg);
}

.album-doodle--spark {
  right: 16px;
  bottom: 126px;
  color: rgba(185, 213, 239, 0.82);
  font-size: 0.92rem;
  transform: rotate(-6deg);
}

.album-doodle--film {
  left: -4px;
  bottom: 188px;
  width: 54px;
  height: 18px;
  border: 1.8px solid rgba(123, 83, 71, 0.14);
  border-radius: 4px;
  background:
    repeating-linear-gradient(90deg, rgba(123, 83, 71, 0.12) 0 6px, transparent 6px 12px),
    rgba(255, 250, 241, 0.42);
  transform: rotate(-14deg);
}

.album-doodle--clip {
  right: 48px;
  top: 52px;
  width: 20px;
  height: 28px;
  border: 2.5px solid rgba(123, 83, 71, 0.24);
  border-radius: 5px 5px 2px 2px;
  transform: rotate(9deg);
}

.tool-header--album {
  --drop-rotate: 0deg;
  position: relative;
  z-index: 1;
}

.album-body {
  position: relative;
  z-index: 1;
  height: calc(100% - 88px);
  padding-top: 2px;
  padding-bottom: 8px;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.album-spread {
  --drop-rotate: -0.4deg;
  position: relative;
  padding: 20px 16px 18px;
  border-radius: 28px 24px 30px 22px;
  transform: rotate(var(--drop-rotate));
}

.album-spread::before {
  border-radius: 23px 20px 26px 18px;
}

.album-tape {
  position: absolute;
  top: -8px;
  width: 48px;
  height: 14px;
  border: 1px solid rgba(216, 109, 134, 0.22);
  border-radius: 3px;
  background:
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.42) 0 5px, transparent 5px 10px),
    rgba(255, 193, 209, 0.72);
  pointer-events: none;
  z-index: 2;
}

.album-tape--left {
  left: 18px;
  transform: rotate(-5deg);
}

.album-tape--right {
  right: 20px;
  transform: rotate(4deg);
}

.album-lead {
  position: relative;
  z-index: 1;
  margin: 8px 0 0;
  padding: 0 4px;
  color: var(--brown-soft);
  font-size: 0.95rem;
  line-height: 1.55;
  text-align: center;
}

.album-create-form {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  margin-top: 14px;
}

.album-create-form input {
  min-width: 0;
  padding: 10px 12px;
  border: 1.8px dashed rgba(216, 109, 134, 0.36);
  border-radius: 16px 14px 18px 13px;
  background: rgba(255, 250, 241, 0.82);
  color: var(--brown);
}

.album-create-form input::placeholder {
  color: rgba(123, 83, 71, 0.42);
}

.album-create-form button {
  padding: 10px 14px;
  border: 1.8px solid rgba(123, 83, 71, 0.36);
  border-radius: 16px 14px 18px 13px;
  background: #ffd6df;
  color: var(--brown);
  white-space: nowrap;
}

.album-shelf {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 12px;
  margin-top: 16px;
}

.album-empty-hint {
  position: relative;
  z-index: 1;
  margin: 18px 0 0;
  color: var(--brown-soft);
  font-size: 0.9rem;
  text-align: center;
}

.album-book {
  --book-rotate: -1.4deg;
  --drop-rotate: var(--book-rotate);
  --book-cover: rgba(255, 220, 230, 0.52);
  --book-spine: rgba(238, 143, 165, 0.72);
  position: relative;
  min-height: 168px;
  transform: rotate(var(--book-rotate));
}

.album-book:nth-child(even) {
  --book-rotate: 1.2deg;
}

.album-book--mint {
  --book-cover: rgba(184, 217, 196, 0.42);
  --book-spine: rgba(152, 198, 170, 0.82);
}

.album-book--sun {
  --book-cover: rgba(255, 217, 132, 0.38);
  --book-spine: rgba(232, 178, 84, 0.82);
}

.album-book--blue {
  --book-cover: rgba(185, 213, 239, 0.42);
  --book-spine: rgba(132, 176, 214, 0.82);
}

.album-book-link {
  position: relative;
  display: grid;
  grid-template-columns: 18px 1fr;
  min-height: 168px;
  border: 2px solid rgba(123, 83, 71, 0.34);
  border-radius: 8px 18px 16px 8px;
  background: var(--book-cover);
  box-shadow: 0 6px 0 rgba(238, 143, 165, 0.1);
  overflow: hidden;
}

.album-book-link::before {
  content: "";
  position: absolute;
  inset: 7px 8px 8px 26px;
  border: 1.4px dashed rgba(123, 83, 71, 0.2);
  border-radius: 6px 12px 10px 6px;
  pointer-events: none;
}

.album-book-spine {
  background:
    repeating-linear-gradient(180deg, rgba(255, 255, 255, 0.18) 0 6px, transparent 6px 12px),
    var(--book-spine);
  border-right: 1.6px solid rgba(123, 83, 71, 0.22);
}

.album-book-cover {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-rows: 1fr auto auto;
  gap: 6px;
  padding: 12px 12px 14px 10px;
  min-width: 0;
}

.album-book-thumb {
  min-height: 78px;
  display: grid;
  place-items: center;
  border: 1.6px dashed rgba(216, 109, 134, 0.28);
  border-radius: 6px 10px 8px 6px;
  background: rgba(255, 250, 241, 0.56);
  overflow: hidden;
}

.album-book-thumb img {
  width: 100%;
  height: 100%;
  min-height: 78px;
  object-fit: cover;
}

.album-book-thumb-empty {
  color: var(--pink-deep);
  font-size: 1.6rem;
  transform: rotate(-6deg);
}

.album-book-title {
  margin: 0;
  color: var(--brown);
  font-size: 0.98rem;
  font-weight: 500;
  line-height: 1.3;
  word-break: break-all;
}

.album-book-count {
  color: var(--brown-soft);
  font-size: 0.78rem;
  font-style: normal;
}

.album-book-remove {
  position: absolute;
  top: -8px;
  right: -6px;
  z-index: 2;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.6px solid rgba(123, 83, 71, 0.32);
  border-radius: 50%;
  background: #fffaf1;
  color: var(--pink-deep);
  font-size: 1.1rem;
  line-height: 1;
  box-shadow: 0 2px 0 rgba(238, 143, 165, 0.12);
}

.album-detail-spread {
  --drop-rotate: -0.3deg;
  position: relative;
  padding: 18px 14px 16px;
  border-radius: 28px 24px 30px 22px;
  transform: rotate(var(--drop-rotate));
}

.album-detail-spread::before {
  border-radius: 23px 20px 26px 18px;
}

.album-detail-actions {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}

.album-upload-button,
.album-delete-button {
  min-height: 40px;
  padding: 8px 14px;
  border: 1.8px solid rgba(123, 83, 71, 0.36);
  border-radius: 16px 14px 18px 13px;
  font-size: 0.92rem;
}

.album-upload-button {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #ffd6df;
  color: var(--brown);
  cursor: pointer;
}

.album-delete-button {
  background: rgba(255, 250, 241, 0.88);
  color: var(--brown-soft);
}

.album-upload-button.is-uploading {
  opacity: 0.62;
  pointer-events: none;
  cursor: wait;
}

.album-upload-progress {
  position: relative;
  z-index: 1;
  margin-bottom: 14px;
  padding: 10px 12px 12px;
  border: 1.8px dashed rgba(123, 83, 71, 0.28);
  border-radius: 14px 12px 16px 11px;
  background: rgba(255, 250, 241, 0.92);
}

.album-upload-progress-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
  font-size: 0.86rem;
  color: var(--brown-soft);
}

.album-upload-progress-head strong {
  flex-shrink: 0;
  color: var(--pink-deep);
  font-size: 0.92rem;
}

.album-upload-progress-track {
  position: relative;
  height: 12px;
  overflow: hidden;
  border: 1.6px solid rgba(123, 83, 71, 0.24);
  border-radius: 999px;
  background: rgba(255, 214, 223, 0.35);
}

.album-upload-progress-fill {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #ffd6df 0%, var(--pink) 55%, var(--pink-deep) 100%);
  transition: width 180ms ease-out;
}

.album-upload-progress.is-indeterminate .album-upload-progress-fill {
  width: 36% !important;
  animation: albumUploadIndeterminate 1.1s ease-in-out infinite;
}

@keyframes albumUploadIndeterminate {
  0% { transform: translateX(-120%); }
  100% { transform: translateX(320%); }
}

.album-photo-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 10px;
}

.album-photo-empty {
  position: relative;
  z-index: 1;
  margin: 18px 0 0;
  color: var(--brown-soft);
  font-size: 0.9rem;
  text-align: center;
}

.album-photo-empty[hidden],
.album-photo-grid:not(:empty) + .album-photo-empty {
  display: none;
}

.album-photo-card {
  --photo-rotate: -1deg;
  --drop-rotate: var(--photo-rotate);
  position: relative;
  padding: 7px 7px 10px;
  border: 2px solid rgba(123, 83, 71, 0.32);
  border-radius: 4px 6px 5px 4px;
  background: #fffdf8;
  box-shadow: 0 4px 0 rgba(238, 143, 165, 0.08);
  transform: rotate(var(--photo-rotate));
}

.album-view.is-entering .tool-header--album,
.album-view.is-entering .album-spread,
.album-view.is-entering .album-book,
.album-detail-view.is-entering .tool-header--album,
.album-detail-view.is-entering .album-detail-spread,
.album-detail-view.is-entering .album-photo-card {
  animation: paperDrop 780ms cubic-bezier(0.18, 0.9, 0.26, 1.12) both;
  will-change: transform, opacity;
}

.album-view.is-entering .tool-header--album { animation-delay: 40ms; }
.album-view.is-entering .album-spread { animation-delay: 120ms; }
.album-view.is-entering .album-book:nth-child(1) { animation-delay: 280ms; }
.album-view.is-entering .album-book:nth-child(2) { animation-delay: 340ms; }
.album-view.is-entering .album-book:nth-child(3) { animation-delay: 400ms; }
.album-view.is-entering .album-book:nth-child(4) { animation-delay: 460ms; }
.album-view.is-entering .album-book:nth-child(5) { animation-delay: 520ms; }
.album-view.is-entering .album-book:nth-child(6) { animation-delay: 580ms; }
.album-view.is-entering .album-book:nth-child(n + 7) { animation-delay: 640ms; }

.album-detail-view.is-entering .tool-header--album { animation-delay: 40ms; }
.album-detail-view.is-entering .album-detail-spread { animation-delay: 120ms; }
.album-detail-view.is-entering .album-photo-card:nth-child(1) { animation-delay: 260ms; }
.album-detail-view.is-entering .album-photo-card:nth-child(2) { animation-delay: 320ms; }
.album-detail-view.is-entering .album-photo-card:nth-child(3) { animation-delay: 380ms; }
.album-detail-view.is-entering .album-photo-card:nth-child(4) { animation-delay: 440ms; }
.album-detail-view.is-entering .album-photo-card:nth-child(5) { animation-delay: 500ms; }
.album-detail-view.is-entering .album-photo-card:nth-child(6) { animation-delay: 560ms; }
.album-detail-view.is-entering .album-photo-card:nth-child(n + 7) { animation-delay: 620ms; }

@media (prefers-reduced-motion: reduce) {
  .album-view.is-entering .tool-header--album,
  .album-view.is-entering .album-spread,
  .album-view.is-entering .album-book,
  .album-detail-view.is-entering .tool-header--album,
  .album-detail-view.is-entering .album-detail-spread,
  .album-detail-view.is-entering .album-photo-card {
    animation: none;
  }
}

.album-photo-card:nth-child(even) {
  --photo-rotate: 1.4deg;
}

.album-photo-frame {
  aspect-ratio: 1;
  border: 1.6px dashed rgba(216, 109, 134, 0.28);
  border-radius: 3px 5px 4px 3px;
  overflow: hidden;
  background: rgba(255, 236, 242, 0.32);
  cursor: zoom-in;
}

.album-photo-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.album-photo-remove {
  position: absolute;
  top: -7px;
  right: -5px;
  z-index: 2;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.6px solid rgba(123, 83, 71, 0.3);
  border-radius: 50%;
  background: #fffaf1;
  color: var(--pink-deep);
  font-size: 1rem;
  line-height: 1;
}

.album-lightbox {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms ease;
}

.album-lightbox.is-open {
  opacity: 1;
  pointer-events: auto;
}

.album-lightbox-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(123, 83, 71, 0.3);
}

.album-lightbox-panel {
  position: relative;
  z-index: 1;
  width: min(100%, 380px);
  max-height: calc(100% - 36px);
  margin: 0;
  padding: 12px 12px 14px;
  border-radius: 22px 18px 24px 20px;
  transform: scale(0.94) rotate(-0.6deg);
  transition: transform 240ms cubic-bezier(0.18, 0.9, 0.26, 1.08);
}

.album-lightbox.is-open .album-lightbox-panel {
  transform: scale(1) rotate(-0.6deg);
}

.album-lightbox-panel img {
  display: block;
  width: 100%;
  max-height: calc(100vh - 120px);
  object-fit: contain;
  border-radius: 6px 8px 5px 7px;
}

.album-lightbox-close {
  position: absolute;
  top: -10px;
  right: -8px;
  z-index: 2;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.8px solid rgba(123, 83, 71, 0.34);
  border-radius: 50%;
  background: #fffaf1;
  color: var(--pink-deep);
  font-size: 1.2rem;
  line-height: 1;
  box-shadow: 0 3px 0 rgba(238, 143, 165, 0.12);
}

.scratch-view {
  overflow: hidden;
  background:
    radial-gradient(circle at 22% 20%, rgba(255, 217, 132, 0.2), transparent 24%),
    radial-gradient(circle at 82% 76%, rgba(184, 217, 196, 0.22), transparent 25%);
}

.scratch-scene {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.scratch-doodle {
  position: absolute;
  color: rgba(123, 83, 71, 0.2);
  font-family: "Hannotate SC", "Kaiti SC", "KaiTi", cursive;
}

.scratch-doodle--heart {
  --drop-rotate: -10deg;
  left: 28px;
  top: 118px;
  color: rgba(238, 143, 165, 0.55);
  font-size: 1rem;
  transform: rotate(var(--drop-rotate));
}

.scratch-doodle--spark {
  --drop-rotate: -6deg;
  right: 24px;
  bottom: 140px;
  color: rgba(185, 213, 239, 0.78);
  font-size: 1.08rem;
  transform: rotate(var(--drop-rotate));
}

.scratch-doodle--star {
  --drop-rotate: 12deg;
  left: 64px;
  bottom: 116px;
  color: rgba(255, 217, 132, 0.9);
  font-size: 1.25rem;
  transform: rotate(var(--drop-rotate));
}

.scratch-doodle--note {
  --drop-rotate: 11deg;
  right: 36px;
  top: 130px;
  padding: 2px 8px 3px;
  border: 1.4px solid rgba(123, 83, 71, 0.14);
  border-radius: 50%;
  color: rgba(216, 109, 134, 0.46);
  font-size: 0.72rem;
  transform: rotate(var(--drop-rotate));
}

.scratch-doodle--loop {
  --drop-rotate: 14deg;
  right: 52px;
  top: 64px;
  width: 44px;
  height: 20px;
  border: 2px solid rgba(123, 83, 71, 0.12);
  border-color: transparent transparent rgba(123, 83, 71, 0.14) rgba(123, 83, 71, 0.14);
  border-radius: 50%;
  transform: rotate(var(--drop-rotate));
}

.scratch-doodle--swirl {
  --drop-rotate: -18deg;
  left: 18px;
  bottom: 44px;
  width: 72px;
  height: 32px;
  border: 2px solid rgba(184, 217, 196, 0.38);
  border-color: rgba(184, 217, 196, 0.42) transparent transparent rgba(184, 217, 196, 0.28);
  border-radius: 50%;
  transform: rotate(var(--drop-rotate));
}

.tool-header--scratch {
  position: relative;
  z-index: 1;
}

.scratch-body {
  position: relative;
  z-index: 1;
  display: grid;
  place-content: start center;
  height: calc(100% - 88px);
  padding: 8px 18px 22px;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.scratch-voucher {
  --drop-rotate: -0.6deg;
  position: relative;
  width: min(100%, 320px);
  padding: 25px 18px 20px;
  border: 2.5px solid rgba(123, 83, 71, 0.38);
  border-radius: 24px 20px 26px 18px;
  background:
    radial-gradient(circle at 10% 18%, rgba(255, 217, 132, 0.18) 0 2px, transparent 2px 14px),
    radial-gradient(circle at 92% 74%, rgba(185, 213, 239, 0.18) 0 2px, transparent 2px 13px),
    repeating-linear-gradient(97deg, rgba(216, 109, 134, 0.035) 0 1px, transparent 1px 10px),
    linear-gradient(180deg, rgba(255, 255, 255, 0.55), transparent 36%),
    #fffaf1;
  box-shadow:
    0 9px 0 rgba(238, 143, 165, 0.1),
    0 18px 28px rgba(123, 83, 71, 0.08);
  transform: rotate(var(--drop-rotate));
}

.scratch-voucher::before {
  content: "";
  position: absolute;
  inset: 7px 8px 8px 7px;
  border: 1.6px dashed rgba(216, 109, 134, 0.32);
  border-radius: 20px 17px 23px 16px;
  pointer-events: none;
}

.scratch-voucher::after {
  content: "";
  position: absolute;
  left: 13px;
  right: 13px;
  bottom: 58px;
  height: 1px;
  border-top: 2px dotted rgba(123, 83, 71, 0.18);
  pointer-events: none;
}

.scratch-pin {
  position: absolute;
  left: 50%;
  top: -11px;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(123, 83, 71, 0.28);
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.75), transparent 42%),
    #ffc2d1;
  transform: translateX(-50%);
  z-index: 2;
}

.scratch-pin::after {
  content: "";
  position: absolute;
  left: 6px;
  top: 6px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(123, 83, 71, 0.28);
}

.scratch-tape {
  position: absolute;
  top: 12px;
  z-index: 2;
  width: 54px;
  height: 19px;
  border: 1.2px solid rgba(123, 83, 71, 0.12);
  border-radius: 4px 6px 5px 4px;
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.32) 0 4px, transparent 4px 8px),
    rgba(255, 217, 132, 0.54);
  box-shadow: 0 2px 0 rgba(123, 83, 71, 0.05);
  pointer-events: none;
}

.scratch-tape--left {
  --tape-rotate: -10deg;
  left: 13px;
  transform: rotate(var(--tape-rotate));
}

.scratch-tape--right {
  --tape-rotate: 8deg;
  right: 13px;
  transform: rotate(var(--tape-rotate));
}

.scratch-voucher-head {
  --drop-rotate: 0.4deg;
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  gap: 6px;
  text-align: center;
  transform: rotate(var(--drop-rotate));
}

.scratch-kicker {
  color: rgba(123, 83, 71, 0.42);
  font-size: 0.62rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.scratch-date {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 11px;
  border: 1.6px solid rgba(216, 109, 134, 0.28);
  border-radius: 7px 9px 6px 8px;
  color: var(--pink-deep);
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  background: rgba(255, 232, 238, 0.58);
  transform: rotate(-1.5deg);
}

.scratch-voucher-title {
  margin: 0;
  color: var(--pink-deep);
  font-size: 1.65rem;
  font-weight: 500;
  line-height: 1.1;
  text-shadow: 1px 1px 0 rgba(255, 217, 132, 0.45);
}

.scratch-title-art {
  display: block;
  width: min(100%, 248px);
  height: auto;
  margin: -3px auto -4px;
  filter: drop-shadow(0 2px 0 rgba(255, 217, 132, 0.22));
  transform: rotate(-0.8deg);
}

.scratch-voucher-desc {
  margin: 0;
  padding: 0 8px;
  color: var(--brown-soft);
  font-size: 0.9rem;
  line-height: 1.5;
}

.scratch-desc-art {
  display: block;
  width: min(100%, 252px);
  height: auto;
  margin: -2px auto 0;
  filter: drop-shadow(0 1px 0 rgba(255, 255, 255, 0.6));
  transform: rotate(0.5deg);
}

.scratch-board {
  --drop-rotate: -0.5deg;
  position: relative;
  z-index: 1;
  min-height: 176px;
  margin-top: 8px;
  overflow: hidden;
  border: 2px solid rgba(123, 83, 71, 0.34);
  border-radius: 16px 14px 18px 12px;
  background:
    linear-gradient(90deg, rgba(123, 83, 71, 0.05) 0 1px, transparent 1px 100%),
    #fff8ef;
  background-size: 18px 100%, auto;
  box-shadow:
    inset 0 2px 6px rgba(123, 83, 71, 0.06),
    0 4px 0 rgba(123, 83, 71, 0.05);
  transform: rotate(var(--drop-rotate));
}

.scratch-board::before,
.scratch-board::after {
  content: "";
  position: absolute;
  z-index: 3;
  top: 50%;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(123, 83, 71, 0.28);
  border-radius: 50%;
  background: #fffaf1;
  pointer-events: none;
}

.scratch-board::before {
  left: -11px;
}

.scratch-board::after {
  right: -11px;
}

.scratch-prize {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 10px;
  padding: 20px 16px;
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.72), transparent 45%),
    radial-gradient(circle at 15% 72%, rgba(184, 217, 196, 0.34), transparent 32%),
    repeating-linear-gradient(-8deg, rgba(123, 83, 71, 0.035) 0 1px, transparent 1px 8px),
    linear-gradient(180deg, #fff5d8 0%, #ffe297 100%);
  text-align: center;
}

.scratch-prize-tag {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 12px;
  border: 1.8px solid rgba(123, 83, 71, 0.3);
  border-radius: 8px 6px 9px 5px;
  color: var(--pink-deep);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  background: rgba(255, 232, 238, 0.75);
  transform: rotate(-2deg);
}

.scratch-prize p {
  margin: 0;
  color: var(--brown);
  font-size: 1.2rem;
  font-weight: 500;
  line-height: 1.45;
}

.scratch-prize-note {
  color: rgba(123, 83, 71, 0.48);
  font-size: 0.76rem;
  text-decoration: underline wavy rgba(216, 109, 134, 0.3);
  text-underline-offset: 4px;
}

.scratch-board.is-revealed .scratch-prize {
  animation: scratchPrizePop 480ms cubic-bezier(0.18, 0.9, 0.26, 1.1);
}

@keyframes scratchPrizePop {
  0% { transform: scale(0.97); }
  55% { transform: scale(1.02); }
  100% { transform: scale(1); }
}

#scratchCanvas {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 176px;
  touch-action: none;
  cursor: grab;
}

#scratchCanvas:active {
  cursor: grabbing;
}

#scratchCanvas.is-revealed {
  opacity: 0;
  pointer-events: none;
  transition: opacity 380ms ease;
}

.scratch-mini-stamps {
  --drop-rotate: 0.3deg;
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 8px;
  color: rgba(123, 83, 71, 0.42);
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transform: rotate(var(--drop-rotate));
}

.scratch-mini-stamps span {
  padding: 1px 7px 2px;
  border: 1px solid rgba(123, 83, 71, 0.13);
  border-radius: 5px 7px 4px 6px;
  background: rgba(255, 255, 255, 0.34);
}

.scratch-reset-button {
  --drop-rotate: 0.4deg;
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  min-height: 42px;
  margin-top: 14px;
  padding: 10px 16px;
  border: 1.8px solid rgba(123, 83, 71, 0.36);
  border-radius: 16px 14px 18px 13px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.28), transparent),
    #ffd6df;
  color: var(--brown);
  font-size: 0.94rem;
  box-shadow: 0 4px 0 rgba(216, 109, 134, 0.16);
  transform: rotate(var(--drop-rotate));
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.scratch-reset-button:active {
  box-shadow: 0 2px 0 rgba(216, 109, 134, 0.16);
  transform: translateY(2px) rotate(var(--drop-rotate));
}

@keyframes scratchPinDrop {
  0% {
    opacity: 0;
    transform: translateX(-50%) translateY(-110px) scale(0.9);
  }
  62% {
    opacity: 1;
    transform: translateX(-50%) translateY(8px) scale(1.04);
  }
  82% {
    transform: translateX(-50%) translateY(-3px) scale(0.98);
  }
  100% {
    opacity: 1;
    transform: translateX(-50%) translateY(0) scale(1);
  }
}

@keyframes scratchTapeDrop {
  0% {
    opacity: 0;
    transform: rotate(var(--tape-rotate)) translateY(-110px) scale(0.92);
  }
  62% {
    opacity: 1;
    transform: rotate(var(--tape-rotate)) translateY(8px) scale(1.02);
  }
  82% {
    transform: rotate(var(--tape-rotate)) translateY(-3px) scale(0.99);
  }
  100% {
    opacity: 1;
    transform: rotate(var(--tape-rotate)) translateY(0) scale(1);
  }
}

.scratch-view.is-entering .tool-header--scratch,
.scratch-view.is-entering .scratch-voucher,
.scratch-view.is-entering .scratch-voucher-head,
.scratch-view.is-entering .scratch-board,
.scratch-view.is-entering .scratch-mini-stamps,
.scratch-view.is-entering .scratch-reset-button,
.scratch-view.is-entering .scratch-doodle {
  animation: paperDrop 820ms cubic-bezier(0.18, 0.9, 0.26, 1.12) both;
  will-change: transform, opacity;
}

.scratch-view.is-entering .scratch-pin {
  animation: scratchPinDrop 820ms cubic-bezier(0.18, 0.9, 0.26, 1.12) both;
  will-change: transform, opacity;
}

.scratch-view.is-entering .scratch-tape--left,
.scratch-view.is-entering .scratch-tape--right {
  animation: scratchTapeDrop 820ms cubic-bezier(0.18, 0.9, 0.26, 1.12) both;
  will-change: transform, opacity;
}

.scratch-view.is-entering .tool-header--scratch { animation-delay: 40ms; }
.scratch-view.is-entering .scratch-doodle:nth-child(1) { animation-delay: 70ms; }
.scratch-view.is-entering .scratch-doodle:nth-child(2) { animation-delay: 110ms; }
.scratch-view.is-entering .scratch-doodle:nth-child(3) { animation-delay: 150ms; }
.scratch-view.is-entering .scratch-doodle:nth-child(4) { animation-delay: 190ms; }
.scratch-view.is-entering .scratch-doodle:nth-child(5) { animation-delay: 230ms; }
.scratch-view.is-entering .scratch-doodle:nth-child(6) { animation-delay: 270ms; }
.scratch-view.is-entering .scratch-voucher { animation-delay: 90ms; }
.scratch-view.is-entering .scratch-pin { animation-delay: 150ms; }
.scratch-view.is-entering .scratch-tape--left { animation-delay: 190ms; }
.scratch-view.is-entering .scratch-tape--right { animation-delay: 220ms; }
.scratch-view.is-entering .scratch-voucher-head { animation-delay: 260ms; }
.scratch-view.is-entering .scratch-board { animation-delay: 380ms; }
.scratch-view.is-entering .scratch-mini-stamps { animation-delay: 500ms; }
.scratch-view.is-entering .scratch-reset-button { animation-delay: 600ms; }

@media (prefers-reduced-motion: reduce) {
  .scratch-view.is-entering .tool-header--scratch,
  .scratch-view.is-entering .scratch-voucher,
  .scratch-view.is-entering .scratch-voucher-head,
  .scratch-view.is-entering .scratch-board,
  .scratch-view.is-entering .scratch-mini-stamps,
  .scratch-view.is-entering .scratch-reset-button,
  .scratch-view.is-entering .scratch-doodle,
  .scratch-view.is-entering .scratch-pin,
  .scratch-view.is-entering .scratch-tape--left,
  .scratch-view.is-entering .scratch-tape--right {
    animation: none;
  }
}

.mini-link {
  margin-top: 12px;
  color: var(--pink-deep);
  text-decoration: underline wavy rgba(216, 109, 134, 0.45);
  text-underline-offset: 5px;
}

.period-view {
  overflow: hidden;
}

.period-scene {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.period-doodle {
  position: absolute;
}

.period-doodle--heart {
  left: 26px;
  top: 112px;
  color: rgba(238, 143, 165, 0.58);
  font-size: 1.15rem;
  transform: rotate(-12deg);
}

.period-doodle--star {
  right: 28px;
  top: 92px;
  color: rgba(255, 217, 132, 0.9);
  font-size: 1rem;
  transform: rotate(8deg);
}

.period-doodle--drop {
  right: 18px;
  bottom: 132px;
  width: 16px;
  height: 22px;
  border: 2px solid rgba(185, 213, 239, 0.52);
  border-radius: 50% 50% 50% 50% / 35% 35% 65% 65%;
  background: rgba(185, 213, 239, 0.28);
  transform: rotate(6deg);
}

.period-doodle--ribbon {
  left: 52px;
  top: 56px;
  width: 44px;
  height: 12px;
  border: 1px solid rgba(238, 143, 165, 0.22);
  border-radius: 3px;
  background:
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.34) 0 5px, transparent 5px 10px),
    rgba(255, 193, 209, 0.52);
  transform: rotate(-5deg);
}

.tool-header--period {
  --drop-rotate: 0deg;
  position: relative;
  z-index: 1;
}

.period-body {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
  height: calc(100% - 88px);
  padding-top: 2px;
  padding-bottom: 8px;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.period-hero {
  --drop-rotate: -0.5deg;
  position: relative;
  padding: 18px 16px 16px;
  border-radius: 26px 22px 28px 24px;
  background:
    repeating-linear-gradient(-8deg, rgba(216, 109, 134, 0.03) 0 1px, transparent 1px 11px),
    linear-gradient(145deg, rgba(255, 255, 255, 0.58), rgba(255, 236, 242, 0.72)),
    rgba(255, 220, 230, 0.28);
  transform: rotate(var(--drop-rotate));
}

.period-hero::before {
  content: "";
  position: absolute;
  inset: 7px 8px 8px 7px;
  border: 1.4px dashed rgba(123, 83, 71, 0.22);
  border-radius: 22px 18px 24px 20px;
  transform: rotate(0.6deg);
  pointer-events: none;
}

.period-tape {
  position: absolute;
  top: -8px;
  width: 48px;
  height: 14px;
  border: 1px solid rgba(216, 109, 134, 0.22);
  border-radius: 3px;
  background:
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.42) 0 5px, transparent 5px 10px),
    rgba(255, 193, 209, 0.72);
  pointer-events: none;
  z-index: 2;
}

.period-tape--left {
  left: 20px;
  transform: rotate(-4deg);
}

.period-tape--right {
  right: 22px;
  transform: rotate(5deg);
}

.period-hero-top {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
}

.period-countdown-kicker {
  margin: 0;
  color: var(--brown-soft);
  font-size: 0.86rem;
}

.period-countdown-value {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin-top: 2px;
}

.period-countdown-value strong {
  color: var(--pink-deep);
  font-size: 2.8rem;
  font-weight: 500;
  line-height: 1;
}

.period-countdown-value span {
  color: var(--pink-deep);
  font-size: 1rem;
}

.period-next-date {
  margin: 6px 0 0;
  color: rgba(123, 83, 71, 0.58);
  font-size: 0.82rem;
  line-height: 1.45;
}

.period-ring {
  --progress: 0%;
  position: relative;
  width: 96px;
  height: 96px;
  flex-shrink: 0;
  border-radius: 50%;
  background:
    conic-gradient(var(--pink) var(--progress), rgba(255, 210, 222, 0.42) 0);
  box-shadow: inset 0 0 0 3px rgba(255, 250, 241, 0.5);
  transform: rotate(-8deg);
}

.period-ring::before {
  content: "";
  position: absolute;
  inset: 7px;
  border-radius: 50%;
  background: #fffaf1;
  border: 1.6px dashed rgba(216, 109, 134, 0.28);
}

.period-ring-inner {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 0;
  transform: rotate(8deg);
}

.period-ring-label,
.period-ring-unit {
  color: rgba(123, 83, 71, 0.52);
  font-size: 0.62rem;
}

.period-ring-inner strong {
  color: var(--brown);
  font-size: 1.45rem;
  font-weight: 500;
  line-height: 1;
}

.period-phase-badge {
  --drop-rotate: 0.6deg;
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 14px;
  padding: 5px 12px 6px;
  border: 1.6px dashed rgba(216, 109, 134, 0.36);
  border-radius: 999px;
  background: rgba(255, 250, 241, 0.72);
  color: var(--brown);
  font-size: 0.88rem;
  transform: rotate(var(--drop-rotate));
}

.period-phase-badge.is-menstrual {
  background: rgba(255, 220, 230, 0.62);
  border-color: rgba(238, 143, 165, 0.42);
}

.period-phase-badge.is-follicular {
  background: rgba(184, 217, 196, 0.34);
  border-color: rgba(120, 168, 138, 0.32);
}

.period-phase-badge.is-ovulation {
  background: rgba(255, 241, 196, 0.56);
  border-color: rgba(232, 178, 84, 0.32);
}

.period-phase-badge.is-luteal {
  background: rgba(185, 213, 239, 0.34);
  border-color: rgba(132, 176, 214, 0.32);
}

.period-phase-icon {
  font-size: 1rem;
  line-height: 1;
}

.period-info-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.period-info-card {
  --drop-rotate: -0.4deg;
  display: grid;
  gap: 4px;
  padding: 10px 8px;
  border: 1.8px dashed rgba(216, 109, 134, 0.3);
  border-radius: 16px 14px 18px 13px;
  background: rgba(255, 250, 241, 0.66);
  text-align: center;
  transform: rotate(var(--drop-rotate));
}

.period-info-card:nth-child(2) { --drop-rotate: 0.5deg; }
.period-info-card:nth-child(3) { --drop-rotate: -0.2deg; }

.period-info-tag {
  color: rgba(123, 83, 71, 0.52);
  font-size: 0.68rem;
}

.period-info-card strong {
  color: var(--brown);
  font-size: 0.78rem;
  font-weight: 500;
  line-height: 1.35;
  word-break: break-all;
}

.period-care {
  --drop-rotate: 0.4deg;
  position: relative;
  padding: 16px 16px 14px;
  border-radius: 20px 18px 22px 17px;
  background:
    linear-gradient(90deg, rgba(184, 217, 196, 0.28) 0 8px, transparent 8px),
    repeating-linear-gradient(0deg, transparent 0 22px, rgba(123, 83, 71, 0.06) 22px 23px),
    #fffdf6;
  transform: rotate(var(--drop-rotate));
}

.period-care-pin {
  position: absolute;
  left: 50%;
  top: -9px;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(123, 83, 71, 0.24);
  border-radius: 50%;
  background: #ffd6df;
  transform: translateX(-50%);
}

.period-care-title {
  margin: 4px 0 0;
  color: var(--pink-deep);
  font-size: 0.88rem;
}

.period-care-text {
  margin: 6px 0 0;
  color: var(--brown-soft);
  font-size: 0.92rem;
  line-height: 1.55;
}

.period-settings {
  --drop-rotate: -0.3deg;
  position: relative;
  padding: 16px 14px 14px;
  border-radius: 24px 20px 26px 18px;
  transform: rotate(var(--drop-rotate));
}

.period-settings-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 500;
}

.period-settings-desc {
  margin: 6px 0 0;
  color: rgba(123, 83, 71, 0.52);
  font-size: 0.76rem;
  line-height: 1.45;
}

.period-field {
  display: grid;
  gap: 6px;
  margin-top: 12px;
}

.period-field > span {
  color: var(--brown-soft);
  font-size: 0.86rem;
}

.period-field input {
  min-width: 0;
  min-height: 44px;
  padding: 0 12px;
  border: 1.8px dashed rgba(216, 109, 134, 0.36);
  border-radius: 14px 12px 16px 13px;
  background: rgba(255, 250, 241, 0.82);
  color: var(--brown);
  -webkit-appearance: none;
  appearance: none;
}

.period-cycle-controls {
  display: grid;
  gap: 8px;
}

.period-cycle-presets {
  display: flex;
  gap: 8px;
}

.period-preset {
  flex: 1;
  min-height: 36px;
  border: 1.6px solid rgba(123, 83, 71, 0.28);
  border-radius: 12px 10px 14px 11px;
  background: rgba(255, 250, 241, 0.72);
  color: var(--brown-soft);
  font-size: 0.88rem;
}

.period-preset.is-active {
  border-color: rgba(216, 109, 134, 0.42);
  background: rgba(255, 220, 230, 0.52);
  color: var(--pink-deep);
  font-weight: 500;
}

.period-save-button {
  margin-top: 14px;
}

.period-view.is-entering .tool-header--period,
.period-view.is-entering .period-hero,
.period-view.is-entering .period-info-card,
.period-view.is-entering .period-care,
.period-view.is-entering .period-settings {
  animation: paperDrop 780ms cubic-bezier(0.18, 0.9, 0.26, 1.12) both;
  will-change: transform, opacity;
}

.period-view.is-entering .tool-header--period { animation-delay: 40ms; }
.period-view.is-entering .period-hero { animation-delay: 100ms; }
.period-view.is-entering .period-info-card:nth-child(1) { animation-delay: 180ms; }
.period-view.is-entering .period-info-card:nth-child(2) { animation-delay: 220ms; }
.period-view.is-entering .period-info-card:nth-child(3) { animation-delay: 260ms; }
.period-view.is-entering .period-care { animation-delay: 320ms; }
.period-view.is-entering .period-settings { animation-delay: 400ms; }

@media (prefers-reduced-motion: reduce) {
  .period-view.is-entering .tool-header--period,
  .period-view.is-entering .period-hero,
  .period-view.is-entering .period-info-card,
  .period-view.is-entering .period-care,
  .period-view.is-entering .period-settings {
    animation: none;
  }
}

.date-row {
  display: grid;
  grid-template-columns: 88px 1fr;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
}

.date-row input,
.wish-form input,
.chat-form input {
  min-width: 0;
  min-height: 44px;
  padding: 0 12px;
  border: 1.8px solid rgba(123, 83, 71, 0.32);
  border-radius: 14px 12px 16px 13px;
  background: #fffdf6;
  color: var(--brown);
  -webkit-appearance: none;
  appearance: none;
}

/* ── 小愿望 · 心愿罐 ── */

.wishes-view {
  overflow: hidden;
  background:
    radial-gradient(circle at 18% 16%, rgba(255, 217, 132, 0.22), transparent 26%),
    radial-gradient(circle at 84% 78%, rgba(184, 217, 196, 0.24), transparent 28%),
    radial-gradient(circle at 52% 42%, rgba(238, 143, 165, 0.12), transparent 34%);
}

.wishes-scene {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.wishes-doodle {
  position: absolute;
  color: rgba(123, 83, 71, 0.2);
  font-family: "Hannotate SC", "Kaiti SC", "KaiTi", cursive;
}

.wishes-doodle--heart {
  --drop-rotate: -12deg;
  left: 26px;
  top: 112px;
  color: rgba(238, 143, 165, 0.56);
  font-size: 1.15rem;
  transform: rotate(var(--drop-rotate));
  animation: wishFloat 4.8s ease-in-out infinite;
}

.wishes-doodle--star {
  --drop-rotate: 10deg;
  right: 30px;
  top: 92px;
  color: rgba(255, 217, 132, 0.9);
  font-size: 1.05rem;
  transform: rotate(var(--drop-rotate));
  animation: wishFloat 5.4s ease-in-out infinite 0.6s;
}

.wishes-doodle--spark {
  --drop-rotate: -8deg;
  right: 16px;
  bottom: 128px;
  color: rgba(185, 213, 239, 0.78);
  font-size: 0.95rem;
  transform: rotate(var(--drop-rotate));
  animation: wishFloat 4.2s ease-in-out infinite 1.1s;
}

.wishes-doodle--balloon {
  --drop-rotate: 8deg;
  left: 14px;
  bottom: 168px;
  width: 22px;
  height: 28px;
  border: 2px solid rgba(238, 143, 165, 0.38);
  border-radius: 50% 50% 46% 46% / 58% 58% 42% 42%;
  background: rgba(255, 220, 230, 0.42);
  transform: rotate(var(--drop-rotate));
  animation: wishBalloon 6s ease-in-out infinite;
}

.wishes-doodle--balloon::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -10px;
  width: 1.5px;
  height: 12px;
  margin-left: -0.75px;
  background: rgba(123, 83, 71, 0.22);
  transform: rotate(6deg);
}

.wishes-doodle--ribbon {
  --drop-rotate: -5deg;
  left: 54px;
  top: 56px;
  width: 44px;
  height: 12px;
  border: 1px solid rgba(238, 143, 165, 0.22);
  border-radius: 3px;
  background:
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.34) 0 5px, transparent 5px 10px),
    rgba(255, 193, 209, 0.52);
  transform: rotate(var(--drop-rotate));
}

.wishes-doodle--loop {
  --drop-rotate: 16deg;
  right: 48px;
  top: 58px;
  width: 46px;
  height: 20px;
  border: 2px solid rgba(123, 83, 71, 0.12);
  border-color: transparent transparent rgba(123, 83, 71, 0.14) rgba(123, 83, 71, 0.14);
  border-radius: 50%;
  transform: rotate(var(--drop-rotate));
}

.wishes-doodle--note {
  --drop-rotate: -6deg;
  left: 18px;
  bottom: 54px;
  padding: 2px 8px 3px;
  border: 1.4px solid rgba(123, 83, 71, 0.14);
  border-radius: 10px 12px 9px 14px;
  color: rgba(216, 109, 134, 0.44);
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  transform: rotate(var(--drop-rotate));
}

.wishes-doodle--cloud {
  --drop-rotate: 6deg;
  right: 22px;
  top: 138px;
  color: rgba(185, 213, 239, 0.72);
  font-size: 1.35rem;
  transform: rotate(var(--drop-rotate));
  animation: wishFloat 5.8s ease-in-out infinite 0.3s;
}

.wishes-doodle--scribble {
  --drop-rotate: -4deg;
  left: 12px;
  top: 64px;
  width: 78px;
  height: 24px;
  color: rgba(184, 217, 196, 0.55);
  transform: rotate(var(--drop-rotate));
}

.wishes-doodle--arrow {
  --drop-rotate: -18deg;
  right: 64px;
  bottom: 72px;
  color: rgba(238, 143, 165, 0.42);
  font-size: 1.2rem;
  transform: rotate(var(--drop-rotate));
  animation: wishArrowNudge 3.2s ease-in-out infinite;
}

@keyframes wishFloat {
  0%, 100% { transform: rotate(var(--drop-rotate)) translateY(0); }
  50% { transform: rotate(calc(var(--drop-rotate) + 4deg)) translateY(-6px); }
}

@keyframes wishBalloon {
  0%, 100% { transform: rotate(var(--drop-rotate)) translateY(0); }
  50% { transform: rotate(calc(var(--drop-rotate) - 3deg)) translateY(-10px); }
}

@keyframes wishArrowNudge {
  0%, 100% { transform: rotate(var(--drop-rotate)) translateX(0); opacity: 0.42; }
  50% { transform: rotate(calc(var(--drop-rotate) + 6deg)) translateX(4px); opacity: 0.72; }
}

.tool-header--wishes {
  --drop-rotate: 0deg;
  position: relative;
  z-index: 1;
}

.wishes-body {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
  height: calc(100% - 88px);
  min-height: 0;
  padding-top: 2px;
  padding-bottom: 8px;
  overflow: hidden;
}

.wishes-hero,
.wishes-compose {
  flex-shrink: 0;
}

.wishes-hero {
  --drop-rotate: -0.5deg;
  position: relative;
  padding: 18px 16px 14px;
  border-radius: 26px 22px 28px 24px;
  background:
    repeating-linear-gradient(-8deg, rgba(216, 109, 134, 0.03) 0 1px, transparent 1px 11px),
    linear-gradient(145deg, rgba(255, 255, 255, 0.58), rgba(255, 236, 242, 0.72)),
    rgba(255, 220, 230, 0.28);
  transform: rotate(var(--drop-rotate));
}

.wishes-hero::before {
  content: "";
  position: absolute;
  inset: 7px 8px 8px 7px;
  border: 1.4px dashed rgba(123, 83, 71, 0.22);
  border-radius: 22px 18px 24px 20px;
  transform: rotate(0.6deg);
  pointer-events: none;
}

.wishes-tape {
  position: absolute;
  top: -8px;
  width: 48px;
  height: 14px;
  border: 1px solid rgba(216, 109, 134, 0.22);
  border-radius: 3px;
  background:
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.42) 0 5px, transparent 5px 10px),
    rgba(255, 193, 209, 0.72);
  pointer-events: none;
  z-index: 2;
}

.wishes-tape--left {
  left: 20px;
  transform: rotate(-4deg);
}

.wishes-tape--right {
  right: 22px;
  transform: rotate(5deg);
}

.wishes-pin {
  position: absolute;
  left: 50%;
  top: -10px;
  z-index: 3;
  width: 18px;
  height: 18px;
  margin-left: -9px;
  border: 2px solid rgba(123, 83, 71, 0.24);
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.72), transparent 42%),
    #ee8fa5;
  box-shadow: 0 3px 0 rgba(123, 83, 71, 0.1);
  transform: rotate(-8deg);
}

.wishes-hero-top {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
}

.wishes-hero-kicker {
  margin: 0;
  color: rgba(123, 83, 71, 0.42);
  font-size: 0.62rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.wishes-hero-title {
  margin: 4px 0 0;
  color: var(--pink-deep);
  font-size: 1.48rem;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: 0.04em;
  text-shadow: 0 2px 0 rgba(216, 109, 134, 0.1);
  transform: rotate(-1.2deg);
}

.wishes-hero-desc {
  margin: 6px 0 0;
  color: var(--brown-soft);
  font-size: 0.84rem;
  line-height: 1.45;
}

.wishes-jar {
  --jar-fill: 0%;
  position: relative;
  width: 78px;
  height: 92px;
  flex-shrink: 0;
  border: 2.2px solid rgba(123, 83, 71, 0.32);
  border-radius: 10px 10px 16px 16px / 8px 8px 22px 22px;
  background:
    radial-gradient(circle at 72% 18%, rgba(255, 255, 255, 0.42), transparent 34%),
    linear-gradient(180deg, rgba(255, 250, 241, 0.94) 0%, rgba(255, 245, 238, 0.78) 100%);
  box-shadow:
    inset 0 -4px 0 rgba(238, 143, 165, 0.08),
    inset 2px 0 6px rgba(255, 255, 255, 0.28);
  transform: rotate(6deg);
  overflow: hidden;
}

.wishes-jar-liquid {
  position: absolute;
  left: 3px;
  right: 3px;
  bottom: 3px;
  z-index: 0;
  height: var(--jar-fill);
  min-height: 0;
  border-radius: 0 0 12px 14px / 0 0 18px 20px;
  background:
    radial-gradient(ellipse at 28% 18%, rgba(255, 255, 255, 0.34), transparent 46%),
    radial-gradient(ellipse at 72% 62%, rgba(255, 193, 209, 0.42), transparent 38%),
    linear-gradient(
      180deg,
      rgba(255, 214, 226, 0.96) 0%,
      rgba(244, 164, 184, 0.9) 38%,
      rgba(232, 132, 158, 0.86) 72%,
      rgba(216, 109, 134, 0.82) 100%
    );
  transition: height 760ms cubic-bezier(0.22, 1.05, 0.36, 1), opacity 420ms ease;
  overflow: hidden;
}

.wishes-jar-wave {
  position: absolute;
  left: 0;
  right: 0;
  width: 100%;
  height: 9px;
  border-radius: 48% 52% 46% 54% / 88% 88% 12% 12%;
  pointer-events: none;
  transform-origin: center bottom;
}

.wishes-jar-wave--back {
  top: -3px;
  background: rgba(238, 143, 165, 0.58);
  animation: wishWaveDrift 4.6s ease-in-out infinite;
}

.wishes-jar-wave--front {
  top: -5px;
  background: rgba(255, 220, 232, 0.92);
  box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.38);
  animation: wishWaveDrift 3.4s ease-in-out infinite reverse;
}

.wishes-jar-bubble {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 28%, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.08) 68%);
  opacity: 0.42;
  animation: wishLiquidBubble 3.8s ease-in-out infinite;
}

.wishes-jar-bubble--1 {
  left: 18%;
  bottom: 22%;
  width: 5px;
  height: 5px;
}

.wishes-jar-bubble--2 {
  right: 22%;
  bottom: 38%;
  width: 4px;
  height: 4px;
  animation-delay: -1.4s;
}

.wishes-jar-bubble--3 {
  left: 52%;
  bottom: 14%;
  width: 3px;
  height: 3px;
  animation-delay: -2.2s;
  opacity: 0.28;
}

.wishes-jar-glass {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  border-radius: inherit;
  background:
    linear-gradient(128deg, rgba(255, 255, 255, 0.46) 0%, transparent 42%),
    linear-gradient(180deg, transparent 58%, rgba(123, 83, 71, 0.05) 100%);
  box-shadow: inset 1px 0 0 rgba(255, 255, 255, 0.22);
}

@keyframes wishWaveDrift {
  0%, 100% {
    transform: rotate(0deg) scaleY(1);
  }
  33% {
    transform: rotate(-1.5deg) scaleY(1.05);
  }
  66% {
    transform: rotate(1.2deg) scaleY(0.96);
  }
}

@keyframes wishLiquidBubble {
  0%, 100% {
    transform: translateY(0) scale(1);
    opacity: 0.28;
  }
  50% {
    transform: translateY(-5px) scale(1.12);
    opacity: 0.52;
  }
}

.wishes-jar-lid {
  position: absolute;
  left: -3px;
  right: -3px;
  top: -7px;
  height: 10px;
  border: 2px solid rgba(123, 83, 71, 0.28);
  border-radius: 4px;
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.28) 0 4px, transparent 4px 8px),
    rgba(255, 217, 132, 0.62);
  z-index: 4;
}

.wishes-jar[data-empty] .wishes-jar-liquid {
  opacity: 0;
}

.wishes-jar-inner {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 0;
  transform: rotate(-6deg);
}

.wishes-jar-label {
  color: rgba(123, 83, 71, 0.52);
  font-size: 0.58rem;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.72);
}

.wishes-jar-inner strong {
  color: var(--pink-deep);
  font-size: 1.1rem;
  font-weight: 500;
  line-height: 1;
  text-shadow:
    0 1px 0 rgba(255, 255, 255, 0.82),
    0 0 8px rgba(255, 250, 241, 0.72);
}

.wishes-stats {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}

.wishes-stat-card {
  --drop-rotate: -0.4deg;
  display: grid;
  gap: 3px;
  padding: 9px 6px;
  border: 1.8px dashed rgba(216, 109, 134, 0.3);
  border-radius: 14px 12px 16px 13px;
  background: rgba(255, 250, 241, 0.66);
  text-align: center;
  transform: rotate(var(--drop-rotate));
}

.wishes-stat-card:nth-child(2) { --drop-rotate: 0.5deg; }
.wishes-stat-card:nth-child(3) { --drop-rotate: -0.2deg; }

.wishes-stat-card--done {
  background: rgba(184, 217, 196, 0.28);
  border-color: rgba(120, 168, 138, 0.28);
}

.wishes-stat-card--total {
  background: rgba(255, 217, 132, 0.22);
  border-color: rgba(232, 178, 84, 0.28);
}

.wishes-stat-tag {
  color: rgba(123, 83, 71, 0.52);
  font-size: 0.66rem;
}

.wishes-stat-card strong {
  color: var(--brown);
  font-size: 1.2rem;
  font-weight: 500;
  line-height: 1;
}

.wishes-compose {
  --drop-rotate: 0.4deg;
  position: relative;
  padding: 14px 14px 12px;
  border-radius: 22px 18px 24px 20px;
  background:
    linear-gradient(90deg, rgba(185, 213, 239, 0.24) 0 8px, transparent 8px),
    repeating-linear-gradient(0deg, transparent 0 22px, rgba(123, 83, 71, 0.06) 22px 23px),
    #fffdf6;
  transform: rotate(var(--drop-rotate));
}

.wishes-compose-tape {
  position: absolute;
  top: -7px;
  left: 50%;
  width: 52px;
  height: 13px;
  margin-left: -26px;
  border: 1px solid rgba(255, 217, 132, 0.38);
  border-radius: 2px 3px 2px 4px;
  background:
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.38) 0 4px, transparent 4px 8px),
    rgba(255, 217, 132, 0.52);
  transform: rotate(-3deg);
  pointer-events: none;
  z-index: 2;
}

.wishes-compose-label {
  position: relative;
  z-index: 1;
  margin: 2px 0 0;
  color: var(--pink-deep);
  font-size: 0.9rem;
}

.wish-form {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  margin-top: 10px;
}

.wish-input-corner {
  position: absolute;
  top: 50%;
  width: 8px;
  height: 18px;
  margin-top: -9px;
  pointer-events: none;
}

.wish-input-corner::before {
  content: "";
  position: absolute;
  inset: 0;
  border: 2px solid rgba(123, 83, 71, 0.16);
  border-right: 0;
  border-radius: 6px 0 0 6px;
}

.wish-input-corner--left {
  left: -2px;
  transform: rotate(-6deg);
}

.wish-input-corner--right {
  right: 74px;
  transform: scaleX(-1) rotate(-6deg);
}

.wish-form input {
  border-style: dashed;
  border-color: rgba(216, 109, 134, 0.36);
  background: rgba(255, 250, 241, 0.82);
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

.wish-form input:focus {
  outline: none;
  border-color: rgba(238, 143, 165, 0.52);
  box-shadow: 0 0 0 3px rgba(255, 220, 230, 0.42);
}

.wish-submit-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: 72px;
  min-height: 44px;
  padding: 0 12px;
  border: 1.8px solid rgba(123, 83, 71, 0.36);
  border-radius: 16px 14px 18px 13px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.28), transparent),
    #ffd6df;
  color: var(--brown);
  box-shadow: 0 4px 0 rgba(238, 143, 165, 0.14);
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.wish-submit-button:active {
  transform: translateY(2px);
  box-shadow: 0 2px 0 rgba(238, 143, 165, 0.14);
}

.wish-submit-icon {
  color: var(--pink-deep);
  font-size: 0.9rem;
  transform: rotate(-8deg);
}

.wishes-compose-hint {
  position: relative;
  z-index: 1;
  margin: 8px 0 0;
  color: rgba(123, 83, 71, 0.48);
  font-size: 0.72rem;
}

.wishes-board {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.wishes-board-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-shrink: 0;
  margin-bottom: 10px;
  padding: 0 4px;
}

.wishes-board-title {
  margin: 0;
  color: var(--brown-soft);
  font-size: 0.9rem;
}

.wishes-board-stamp {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 10px;
  border: 1.6px solid rgba(216, 109, 134, 0.32);
  border-radius: 50% 44% 52% 48%;
  color: rgba(216, 109, 134, 0.68);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  background: rgba(255, 250, 241, 0.72);
  transform: rotate(8deg);
}

.wishes-list {
  display: grid;
  gap: 10px;
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 2px 2px 6px 0;
}

.wishes-empty {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 6px;
  flex: 1 1 auto;
  min-height: 120px;
  padding: 28px 16px;
  border: 1.8px dashed rgba(216, 109, 134, 0.28);
  border-radius: 20px 16px 22px 18px;
  background:
    radial-gradient(circle at 50% 30%, rgba(255, 220, 230, 0.22), transparent 48%),
    rgba(255, 250, 241, 0.56);
  color: rgba(123, 83, 71, 0.48);
  text-align: center;
}

.wishes-empty[hidden],
.wishes-list:not(:empty) + .wishes-empty {
  display: none;
}

.wishes-empty-heart {
  color: rgba(238, 143, 165, 0.62);
  font-size: 1.6rem;
  transform: rotate(-8deg);
  animation: wishHeartPulse 2.4s ease-in-out infinite;
}

.wishes-empty p {
  margin: 0;
  font-size: 0.86rem;
}

@keyframes wishHeartPulse {
  0%, 100% { transform: rotate(-8deg) scale(1); }
  50% { transform: rotate(-4deg) scale(1.08); }
}

.wish-item {
  --drop-rotate: -0.8deg;
  --note-tint: rgba(255, 250, 241, 0.78);
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 12px 12px 12px 10px;
  border: 2px solid rgba(123, 83, 71, 0.28);
  border-radius: 4px 14px 16px 6px / 6px 16px 14px 4px;
  background:
    repeating-linear-gradient(-11deg, rgba(255, 255, 255, 0.34) 0 2px, transparent 2px 10px),
    var(--note-tint);
  box-shadow: 0 4px 0 rgba(123, 83, 71, 0.04);
  transform: rotate(var(--drop-rotate));
  transition: transform 220ms ease, opacity 220ms ease, background 220ms ease;
}

.wish-item:nth-child(even) {
  --drop-rotate: 0.9deg;
  --note-tint: rgba(255, 236, 242, 0.62);
}

.wish-item:nth-child(3n) {
  --note-tint: rgba(255, 248, 220, 0.58);
}

.wish-item::before {
  content: "";
  position: absolute;
  top: -6px;
  left: 18px;
  width: 34px;
  height: 11px;
  border: 1px solid rgba(238, 143, 165, 0.22);
  border-radius: 2px;
  background:
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.38) 0 4px, transparent 4px 8px),
    rgba(185, 213, 239, 0.52);
  transform: rotate(-4deg);
  pointer-events: none;
}

.wish-item.is-appearing {
  animation: wishNoteIn 620ms cubic-bezier(0.18, 0.9, 0.26, 1.1) both;
}

.wish-item.is-stamping .wish-stamp-button {
  animation: wishStampPop 480ms cubic-bezier(0.18, 0.9, 0.26, 1.12);
}

.wish-item.is-done {
  --note-tint: rgba(214, 236, 221, 0.42);
  opacity: 0.88;
}

.wish-item.is-done::after {
  content: "done";
  position: absolute;
  right: 52px;
  top: 50%;
  margin-top: -12px;
  padding: 2px 8px 3px;
  border: 1.6px solid rgba(216, 109, 134, 0.38);
  border-radius: 50% 44% 52% 48%;
  color: rgba(216, 109, 134, 0.62);
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(255, 250, 241, 0.56);
  transform: rotate(14deg);
  pointer-events: none;
  animation: wishDoneStamp 520ms cubic-bezier(0.18, 0.9, 0.26, 1.1) both;
}

@keyframes wishNoteIn {
  0% {
    opacity: 0;
    transform: translateY(-24px) rotate(calc(var(--drop-rotate) - 6deg)) scale(0.94);
  }
  70% {
    opacity: 1;
    transform: translateY(4px) rotate(calc(var(--drop-rotate) + 1deg)) scale(1.01);
  }
  100% {
    opacity: 1;
    transform: translateY(0) rotate(var(--drop-rotate)) scale(1);
  }
}

@keyframes wishStampPop {
  0% { transform: rotate(6deg) scale(1); }
  45% { transform: rotate(-4deg) scale(1.12); }
  100% { transform: rotate(6deg) scale(1); }
}

@keyframes wishDoneStamp {
  0% {
    opacity: 0;
    transform: rotate(28deg) scale(1.4);
  }
  100% {
    opacity: 1;
    transform: rotate(14deg) scale(1);
  }
}

.wish-item-index {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.4px solid rgba(216, 109, 134, 0.28);
  border-radius: 50%;
  background: rgba(255, 232, 238, 0.72);
  color: var(--pink-deep);
  font-size: 0.72rem;
  transform: rotate(-6deg);
}

.wish-item-text {
  margin: 0;
  color: var(--brown);
  font-size: 0.96rem;
  line-height: 1.45;
  word-break: break-all;
}

.wish-item.is-done .wish-item-text {
  text-decoration: line-through wavy rgba(216, 109, 134, 0.55);
  color: var(--brown-soft);
}

.wish-item-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.wish-stamp-button,
.wish-remove-button {
  min-width: 40px;
  min-height: 36px;
  display: grid;
  place-items: center;
  padding: 0 8px;
  border: 1.6px solid rgba(123, 83, 71, 0.28);
  border-radius: 12px 10px 14px 11px;
  background: rgba(255, 250, 241, 0.82);
  color: var(--pink-deep);
  font-size: 0.78rem;
  transition: transform 140ms ease, background 140ms ease;
}

.wish-stamp-button {
  transform: rotate(6deg);
}

.wish-remove-button {
  width: 32px;
  min-width: 32px;
  padding: 0;
  color: rgba(123, 83, 71, 0.52);
  font-size: 1rem;
  line-height: 1;
  transform: rotate(-4deg);
}

.wish-stamp-button:active,
.wish-remove-button:active {
  transform: scale(0.94);
}

@keyframes wishPinDrop {
  0% {
    opacity: 0;
    transform: translateX(-50%) translateY(-110px) scale(0.9);
  }
  62% {
    opacity: 1;
    transform: translateX(-50%) translateY(8px) scale(1.04);
  }
  82% {
    transform: translateX(-50%) translateY(-3px) scale(0.98);
  }
  100% {
    opacity: 1;
    transform: translateX(-50%) translateY(0) scale(1);
  }
}

@keyframes wishTapeDrop {
  0% {
    opacity: 0;
    transform: rotate(var(--tape-rotate)) translateY(-110px) scale(0.92);
  }
  62% {
    opacity: 1;
    transform: rotate(var(--tape-rotate)) translateY(8px) scale(1.02);
  }
  82% {
    transform: rotate(var(--tape-rotate)) translateY(-3px) scale(0.99);
  }
  100% {
    opacity: 1;
    transform: rotate(var(--tape-rotate)) translateY(0) scale(1);
  }
}

.wishes-view.is-entering .tool-header--wishes,
.wishes-view.is-entering .wishes-hero,
.wishes-view.is-entering .wishes-compose,
.wishes-view.is-entering .wishes-board-head,
.wishes-view.is-entering .wish-item,
.wishes-view.is-entering .wishes-empty,
.wishes-view.is-entering .wishes-doodle {
  animation: paperDrop 780ms cubic-bezier(0.18, 0.9, 0.26, 1.12) both;
  will-change: transform, opacity;
}

.wishes-view.is-entering .wishes-pin {
  animation: wishPinDrop 780ms cubic-bezier(0.18, 0.9, 0.26, 1.12) both;
  will-change: transform, opacity;
}

.wishes-view.is-entering .wishes-tape--left {
  --tape-rotate: -4deg;
  animation: wishTapeDrop 780ms cubic-bezier(0.18, 0.9, 0.26, 1.12) both;
}

.wishes-view.is-entering .wishes-tape--right {
  --tape-rotate: 5deg;
  animation: wishTapeDrop 780ms cubic-bezier(0.18, 0.9, 0.26, 1.12) both;
}

.wishes-view.is-entering .wishes-compose-tape {
  --tape-rotate: -3deg;
  animation: wishTapeDrop 780ms cubic-bezier(0.18, 0.9, 0.26, 1.12) both;
}

.wishes-view.is-entering .tool-header--wishes { animation-delay: 40ms; }
.wishes-view.is-entering .wishes-doodle:nth-child(1) { animation-delay: 60ms; }
.wishes-view.is-entering .wishes-doodle:nth-child(2) { animation-delay: 90ms; }
.wishes-view.is-entering .wishes-doodle:nth-child(3) { animation-delay: 120ms; }
.wishes-view.is-entering .wishes-doodle:nth-child(4) { animation-delay: 150ms; }
.wishes-view.is-entering .wishes-doodle:nth-child(5) { animation-delay: 180ms; }
.wishes-view.is-entering .wishes-doodle:nth-child(6) { animation-delay: 210ms; }
.wishes-view.is-entering .wishes-doodle:nth-child(7) { animation-delay: 240ms; }
.wishes-view.is-entering .wishes-doodle:nth-child(8) { animation-delay: 270ms; }
.wishes-view.is-entering .wishes-doodle:nth-child(9) { animation-delay: 300ms; }
.wishes-view.is-entering .wishes-doodle:nth-child(10) { animation-delay: 330ms; }
.wishes-view.is-entering .wishes-hero { animation-delay: 100ms; }
.wishes-view.is-entering .wishes-pin { animation-delay: 160ms; }
.wishes-view.is-entering .wishes-tape--left { animation-delay: 190ms; }
.wishes-view.is-entering .wishes-tape--right { animation-delay: 220ms; }
.wishes-view.is-entering .wishes-compose { animation-delay: 220ms; }
.wishes-view.is-entering .wishes-compose-tape { animation-delay: 280ms; }
.wishes-view.is-entering .wishes-board-head { animation-delay: 320ms; }
.wishes-view.is-entering .wish-item:nth-child(1) { animation-delay: 380ms; }
.wishes-view.is-entering .wish-item:nth-child(2) { animation-delay: 440ms; }
.wishes-view.is-entering .wish-item:nth-child(3) { animation-delay: 500ms; }
.wishes-view.is-entering .wish-item:nth-child(4) { animation-delay: 560ms; }
.wishes-view.is-entering .wish-item:nth-child(5) { animation-delay: 620ms; }
.wishes-view.is-entering .wish-item:nth-child(n + 6) { animation-delay: 680ms; }
.wishes-view.is-entering .wishes-empty { animation-delay: 380ms; }

@media (prefers-reduced-motion: reduce) {
  .wishes-doodle--heart,
  .wishes-doodle--star,
  .wishes-doodle--spark,
  .wishes-doodle--balloon,
  .wishes-doodle--cloud,
  .wishes-doodle--arrow,
  .wishes-empty-heart,
  .wishes-jar-wave,
  .wishes-jar-bubble {
    animation: none;
  }

  .wishes-view.is-entering .tool-header--wishes,
  .wishes-view.is-entering .wishes-hero,
  .wishes-view.is-entering .wishes-compose,
  .wishes-view.is-entering .wishes-board-head,
  .wishes-view.is-entering .wish-item,
  .wishes-view.is-entering .wishes-empty,
  .wishes-view.is-entering .wishes-doodle,
  .wishes-view.is-entering .wishes-pin,
  .wishes-view.is-entering .wishes-tape--left,
  .wishes-view.is-entering .wishes-tape--right,
  .wishes-view.is-entering .wishes-compose-tape,
  .wish-item.is-appearing,
  .wish-item.is-stamping .wish-stamp-button,
  .wish-item.is-done::after {
    animation: none;
  }
}

.chat-form {
  display: grid;
  grid-template-columns: 1fr 72px;
  gap: 8px;
  margin-top: 14px;
}

.chat-form button {
  min-height: 44px;
}

.chat-card {
  display: grid;
  grid-template-rows: auto 1fr auto;
}

.chat-box {
  display: grid;
  align-content: start;
  gap: 9px;
  overflow: auto;
  padding-right: 2px;
  margin: 12px 0;
}

.bubble {
  max-width: 88%;
  margin: 0;
  padding: 10px 12px;
  border: 1.5px solid rgba(123, 83, 71, 0.28);
  border-radius: 16px 14px 18px 13px;
  line-height: 1.55;
}

.bubble.bot {
  justify-self: start;
  background: #fff3df;
}

.bubble.user {
  justify-self: end;
  background: #ffdce6;
}

/* ── AI 小伙伴 · 选择页 ── */

.mimi-ai-pick-view {
  overflow: hidden;
  padding-bottom: 0;
  background:
    radial-gradient(circle at 18% 14%, rgba(185, 213, 239, 0.34), transparent 28%),
    radial-gradient(circle at 84% 22%, rgba(184, 217, 196, 0.28), transparent 24%),
    radial-gradient(circle at 50% 88%, rgba(238, 143, 165, 0.16), transparent 32%),
    linear-gradient(168deg, #eef6ff 0%, #f4f0ff 42%, #fff4f8 100%);
}

.mimi-ai-pick-body {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 14px;
  height: calc(100% - 88px);
  min-height: 0;
  padding-top: 4px;
  padding-bottom: 12px;
}

.mimi-ai-pick-lead {
  margin: 0;
  padding: 0 6px;
  color: rgba(123, 83, 71, 0.72);
  font-family: "Hannotate SC", "Kaiti SC", "KaiTi", cursive;
  font-size: 0.92rem;
  letter-spacing: 0.04em;
}

.mimi-ai-pick-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding-right: 2px;
}

.mimi-ai-pick-card {
  --pick-rotate: -1deg;
  position: relative;
  display: grid;
  grid-template-columns: 72px 1fr;
  grid-template-rows: auto auto;
  gap: 4px 14px;
  align-items: center;
  padding: 16px 16px 14px;
  border-radius: 24px 20px 26px 22px;
  background:
    repeating-linear-gradient(-8deg, rgba(216, 109, 134, 0.03) 0 1px, transparent 1px 11px),
    linear-gradient(145deg, rgba(255, 255, 255, 0.62), rgba(255, 236, 242, 0.74)),
    rgba(255, 220, 230, 0.24);
  color: inherit;
  text-decoration: none;
  transform: rotate(var(--pick-rotate));
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.mimi-ai-pick-card::before {
  content: "";
  position: absolute;
  inset: 7px 8px 8px 7px;
  border: 1.4px dashed rgba(123, 83, 71, 0.18);
  border-radius: 20px 16px 22px 18px;
  transform: rotate(0.5deg);
  pointer-events: none;
}

.mimi-ai-pick-card:not(.is-soon):active {
  transform: rotate(var(--pick-rotate)) scale(0.985);
}

.mimi-ai-pick-card.is-soon {
  opacity: 0.62;
  filter: saturate(0.85);
}

.mimi-ai-pick-avatar {
  grid-row: 1 / span 2;
  width: 72px;
  height: 72px;
  border-radius: 22px 18px 24px 20px;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.72);
  box-shadow: 0 6px 16px rgba(216, 109, 134, 0.14);
  background: rgba(255, 255, 255, 0.5);
}

.mimi-ai-pick-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.mimi-ai-pick-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.mimi-ai-pick-copy strong {
  font-size: 1.08rem;
  color: #7b5347;
  letter-spacing: 0.03em;
}

.mimi-ai-pick-tagline {
  font-size: 0.74rem;
  color: rgba(216, 109, 134, 0.82);
  letter-spacing: 0.06em;
}

.mimi-ai-pick-copy p {
  margin: 4px 0 0;
  font-size: 0.78rem;
  line-height: 1.45;
  color: rgba(123, 83, 71, 0.68);
}

.mimi-ai-pick-action {
  grid-column: 2;
  justify-self: start;
  padding: 4px 10px 5px;
  border-radius: 999px;
  background: rgba(255, 220, 230, 0.72);
  border: 1px solid rgba(216, 109, 134, 0.18);
  color: rgba(123, 83, 71, 0.78);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
}

.mimi-ai-pick-card:not(.is-soon) .mimi-ai-pick-action {
  background: rgba(184, 217, 196, 0.42);
  border-color: rgba(123, 83, 71, 0.12);
}

.mimi-ai-pick-hint {
  margin: 0;
  padding: 0 8px;
  text-align: center;
  color: rgba(123, 83, 71, 0.42);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
}

.mimi-ai-pick-view.is-entering .tool-header--mimi-ai,
.mimi-ai-pick-view.is-entering .mimi-ai-doodle,
.mimi-ai-pick-view.is-entering .mimi-ai-pick-lead,
.mimi-ai-pick-view.is-entering .mimi-ai-pick-card,
.mimi-ai-pick-view.is-entering .mimi-ai-pick-hint {
  animation: paperDrop 780ms cubic-bezier(0.18, 0.9, 0.26, 1.12) both;
  will-change: transform, opacity;
}

.mimi-ai-pick-view.is-entering .tool-header--mimi-ai { animation-delay: 40ms; }
.mimi-ai-pick-view.is-entering .mimi-ai-doodle:nth-child(1) { animation-delay: 70ms; }
.mimi-ai-pick-view.is-entering .mimi-ai-doodle:nth-child(2) { animation-delay: 110ms; }
.mimi-ai-pick-view.is-entering .mimi-ai-doodle:nth-child(3) { animation-delay: 150ms; }
.mimi-ai-pick-view.is-entering .mimi-ai-pick-lead { animation-delay: 120ms; }
.mimi-ai-pick-view.is-entering .mimi-ai-pick-card:nth-child(1) { animation-delay: 180ms; }
.mimi-ai-pick-view.is-entering .mimi-ai-pick-hint { animation-delay: 260ms; }

@media (prefers-reduced-motion: reduce) {
  .mimi-ai-pick-view.is-entering .tool-header--mimi-ai,
  .mimi-ai-pick-view.is-entering .mimi-ai-doodle,
  .mimi-ai-pick-view.is-entering .mimi-ai-pick-lead,
  .mimi-ai-pick-view.is-entering .mimi-ai-pick-card,
  .mimi-ai-pick-view.is-entering .mimi-ai-pick-hint {
    animation: none;
  }
}

/* ── AI 小伙伴 · 口袋通话亭 ── */

.mimi-ai-view {
  overflow: hidden;
  padding-bottom: 0;
  background:
    radial-gradient(circle at 18% 14%, rgba(185, 213, 239, 0.34), transparent 28%),
    radial-gradient(circle at 84% 22%, rgba(184, 217, 196, 0.28), transparent 24%),
    radial-gradient(circle at 50% 88%, rgba(238, 143, 165, 0.16), transparent 32%),
    linear-gradient(168deg, #eef6ff 0%, #f4f0ff 42%, #fff4f8 100%);
}

.mimi-ai-scene {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.mimi-ai-doodle {
  position: absolute;
  color: rgba(123, 83, 71, 0.18);
  font-family: "Hannotate SC", "Kaiti SC", "KaiTi", cursive;
}

.mimi-ai-doodle--heart {
  --drop-rotate: -14deg;
  left: 24px;
  top: 108px;
  color: rgba(238, 143, 165, 0.5);
  font-size: 1.1rem;
  transform: rotate(var(--drop-rotate));
}

.mimi-ai-doodle--star {
  --drop-rotate: 10deg;
  right: 30px;
  top: 88px;
  color: rgba(255, 217, 132, 0.88);
  font-size: 1.05rem;
  transform: rotate(var(--drop-rotate));
}

.mimi-ai-doodle--spark {
  --drop-rotate: -8deg;
  left: 58px;
  bottom: 108px;
  color: rgba(185, 213, 239, 0.72);
  font-size: 1rem;
  transform: rotate(var(--drop-rotate));
}

.mimi-ai-doodle--loop {
  --drop-rotate: 16deg;
  right: 48px;
  top: 58px;
  width: 46px;
  height: 20px;
  border: 2px solid rgba(123, 83, 71, 0.12);
  border-color: transparent transparent rgba(123, 83, 71, 0.14) rgba(123, 83, 71, 0.14);
  border-radius: 50%;
  transform: rotate(var(--drop-rotate));
}

.mimi-ai-doodle--note {
  --drop-rotate: -6deg;
  left: 18px;
  bottom: 54px;
  padding: 2px 8px 3px;
  border: 1.4px solid rgba(123, 83, 71, 0.14);
  border-radius: 10px 12px 9px 14px;
  color: rgba(216, 109, 134, 0.44);
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  transform: rotate(var(--drop-rotate));
}

.mimi-ai-doodle--phone {
  --drop-rotate: 12deg;
  right: 20px;
  bottom: 148px;
  width: 34px;
  height: 34px;
  color: rgba(123, 83, 71, 0.22);
  transform: rotate(var(--drop-rotate));
}

.mimi-ai-doodle--phone svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.mimi-ai-doodle--scribble {
  --drop-rotate: -4deg;
  left: 12px;
  top: 64px;
  width: 78px;
  height: 24px;
  color: rgba(184, 217, 196, 0.55);
  transform: rotate(var(--drop-rotate));
}

.mimi-ai-doodle--wave {
  --drop-rotate: -12deg;
  right: 64px;
  bottom: 72px;
  width: 54px;
  height: 18px;
  border: 2px solid rgba(185, 213, 239, 0.38);
  border-color: rgba(185, 213, 239, 0.42) transparent transparent rgba(185, 213, 239, 0.28);
  border-radius: 50%;
  transform: rotate(var(--drop-rotate));
}

.tool-header--mimi-ai {
  --drop-rotate: 0deg;
  position: relative;
  z-index: 1;
  grid-template-columns: 48px 1fr auto;
  padding-right: 16px;
}

.tool-header--mimi-ai::after {
  content: "";
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 10px;
  height: 3px;
  border-bottom: 2px dashed rgba(185, 213, 239, 0.42);
  border-radius: 0 0 40% 50% / 0 0 8px 6px;
  transform: rotate(-0.4deg);
  pointer-events: none;
}

.mimi-ai-body {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-rows: 1fr auto auto;
  gap: 10px;
  height: calc(100% - 88px);
  padding: 6px 12px 14px;
  padding-bottom: calc(14px + env(safe-area-inset-bottom));
  overflow: hidden;
}

.mimi-chat-head {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 10px;
  align-items: center;
  margin-bottom: 10px;
  padding-bottom: 10px;
}

.mimi-chat-head::after {
  content: "";
  position: absolute;
  left: 2px;
  right: 2px;
  bottom: 0;
  border-bottom: 1.5px dashed rgba(123, 83, 71, 0.16);
  transform: rotate(-0.3deg);
}

.mimi-chat-avatar {
  width: 42px;
  height: 42px;
  object-fit: cover;
  border: none;
  border-radius: 50% 46% 52% 44% / 44% 52% 48% 54%;
  background: #fff;
  box-shadow:
    0 0 0 2px rgba(123, 83, 71, 0.3),
    0 0 0 3px rgba(255, 255, 255, 0.45),
    0 4px 0 rgba(238, 143, 165, 0.12);
  transform: rotate(-2deg);
}

.mimi-chat-status {
  margin: 2px 0 0;
  color: rgba(123, 83, 71, 0.48);
  font-size: 0.72rem;
}

.mimi-chat-pending {
  position: relative;
  width: fit-content;
  max-width: 120px;
  margin-left: 6px;
  padding: 6px 8px 8px;
}

.mimi-chat-pending::before {
  content: "";
  position: absolute;
  inset: 0;
  border: 2px solid rgba(123, 83, 71, 0.26);
  border-radius: 16px 12px 18px 14px / 14px 18px 12px 16px;
  transform: rotate(-1.2deg);
  pointer-events: none;
}

.mimi-chat-pending img {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  max-height: 88px;
  object-fit: cover;
  border: 1.5px dashed rgba(216, 109, 134, 0.34);
  border-radius: 12px 14px 11px 15px / 15px 11px 14px 12px;
  background: #fff;
}

.mimi-chat-pending-remove {
  position: absolute;
  top: -2px;
  right: -2px;
  z-index: 2;
  width: 22px;
  height: 22px;
  border: 2px solid rgba(123, 83, 71, 0.3);
  border-radius: 50% 46% 48% 52% / 52% 48% 46% 50%;
  background: #fffaf1;
  color: var(--pink-deep);
  font-size: 0.9rem;
  line-height: 1;
  transform: rotate(4deg);
}

.mimi-ai-debug-toggle {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1.6px solid rgba(123, 83, 71, 0.24);
  border-radius: 50% 46% 48% 44% / 44% 50% 46% 52%;
  background: rgba(255, 255, 255, 0.5);
  color: rgba(123, 83, 71, 0.72);
  font-size: 1rem;
}

.mimi-bubble-head {
  display: flex;
  align-items: center;
  gap: 6px;
}

.mimi-bubble-avatar {
  width: 22px;
  height: 22px;
  object-fit: cover;
  border: none;
  border-radius: 50% 48% 52% 46% / 46% 52% 48% 50%;
  background: #fff;
  box-shadow: 0 0 0 1.5px rgba(123, 83, 71, 0.26);
}

.mimi-bubble-text p {
  margin: 0;
  line-height: 1.55;
}

.mimi-bubble-media {
  margin: 8px 0 0;
}

.mimi-bubble-media img {
  display: block;
  max-width: min(220px, 100%);
  border: 1.5px dashed rgba(123, 83, 71, 0.24);
  border-radius: 13px 15px 11px 14px / 14px 11px 15px 13px;
  background: #fff;
  box-shadow: 2px 3px 0 rgba(238, 143, 165, 0.08);
}

.mimi-attach-button {
  position: relative;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 15px 11px 17px 12px / 12px 17px 11px 15px;
  background: rgba(255, 255, 255, 0.58);
  color: rgba(123, 83, 71, 0.72);
  box-shadow:
    0 0 0 2px rgba(123, 83, 71, 0.24),
    0 3px 0 rgba(185, 213, 239, 0.18);
  transform: rotate(-2deg);
}

.mimi-attach-button::after {
  content: "";
  position: absolute;
  inset: 3px 4px 4px 3px;
  border: 1px dashed rgba(185, 213, 239, 0.42);
  border-radius: 12px 10px 14px 11px;
  pointer-events: none;
}

.mimi-attach-button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.mimi-ai-debug-panel[hidden] {
  display: none !important;
}

.mimi-ai-debug-panel:not([hidden]) {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: grid;
  align-items: end;
  padding: 12px 12px calc(12px + env(safe-area-inset-bottom));
  background: rgba(72, 52, 48, 0.28);
}

.mimi-ai-debug-toggle[hidden] {
  display: none !important;
}

.mimi-ai-debug-sheet {
  max-height: calc(100% - 24px);
  overflow: auto;
  padding: 16px 14px 14px;
  border-radius: 24px 22px 26px 20px;
}

.mimi-ai-debug-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.mimi-ai-debug-head p {
  margin: 0;
  color: var(--brown-soft);
  font-size: 0.78rem;
}

.mimi-ai-debug-head strong {
  display: block;
  margin-top: 2px;
  font-size: 1.1rem;
  font-weight: 500;
}

.mimi-ai-debug-close {
  width: 32px;
  height: 32px;
  border: 1.6px solid rgba(123, 83, 71, 0.24);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.58);
  color: var(--brown);
  font-size: 1.2rem;
  line-height: 1;
}

.mimi-debug-switch {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  padding: 10px 12px;
  border: 1.5px dashed rgba(216, 109, 134, 0.34);
  border-radius: 14px 16px 13px 18px;
  background: rgba(255, 255, 255, 0.42);
}

.mimi-debug-fields {
  display: grid;
  gap: 10px;
}

.mimi-debug-field {
  display: grid;
  gap: 6px;
}

.mimi-debug-field > span {
  color: rgba(123, 83, 71, 0.68);
  font-size: 0.8rem;
}

.mimi-debug-field input,
.mimi-debug-field textarea {
  width: 100%;
  min-height: 40px;
  padding: 8px 10px;
  border: 1.6px solid rgba(123, 83, 71, 0.24);
  border-radius: 14px 12px 16px 13px;
  background: #fffdf6;
  color: var(--brown);
  resize: vertical;
}

.mimi-debug-field em {
  color: rgba(123, 83, 71, 0.48);
  font-size: 0.72rem;
  font-style: normal;
}

.mimi-debug-avatar-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mimi-debug-avatar-row img {
  width: 52px;
  height: 52px;
  object-fit: cover;
  border: 1.8px solid rgba(123, 83, 71, 0.24);
  border-radius: 50% 46% 52% 44% / 44% 52% 48% 54%;
  background: #fff;
}

.mini-paper-button {
  min-height: 36px;
  padding: 0 12px;
  border: 1.6px solid rgba(123, 83, 71, 0.28);
  border-radius: 14px 12px 16px 13px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(255, 236, 242, 0.72)),
    #fff6f8;
  color: var(--brown);
}

.mimi-debug-catchphrases {
  display: grid;
  gap: 6px;
}

.mimi-debug-slider-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
}

.mimi-debug-slider-row > span {
  color: rgba(123, 83, 71, 0.68);
  font-size: 0.8rem;
  white-space: nowrap;
}

.mimi-debug-slider-row input[type="range"] {
  width: 100%;
  accent-color: var(--pink-deep);
}

.mimi-debug-slider-row em {
  min-width: 36px;
  color: rgba(123, 83, 71, 0.62);
  font-size: 0.78rem;
  font-style: normal;
  text-align: right;
}

.mimi-debug-hint {
  margin: -4px 0 10px;
  color: rgba(123, 83, 71, 0.52);
  font-size: 0.74rem;
  line-height: 1.45;
}

.mimi-debug-sticker-upload {
  display: grid;
  grid-template-columns: 88px 1fr auto;
  gap: 6px;
}

.mimi-debug-sticker-upload select {
  min-height: 40px;
  padding: 8px 10px;
  border: 1.6px solid rgba(123, 83, 71, 0.24);
  border-radius: 14px 12px 16px 13px;
  background: #fffdf6;
  color: var(--brown);
}

.mimi-debug-sticker-list {
  display: grid;
  gap: 10px;
  margin-top: 8px;
}

.mimi-debug-sticker-group h4 {
  margin: 0 0 6px;
  color: rgba(123, 83, 71, 0.72);
  font-size: 0.82rem;
  font-weight: 600;
}

.mimi-debug-sticker-grid {
  display: grid;
  gap: 8px;
}

.mimi-debug-sticker-item {
  display: grid;
  grid-template-columns: 42px 1fr auto;
  gap: 8px;
  align-items: center;
  padding: 8px 10px;
  border: 1.4px dashed rgba(216, 109, 134, 0.3);
  border-radius: 14px 16px 13px 18px;
  background: rgba(255, 255, 255, 0.42);
}

.mimi-debug-sticker-item img {
  width: 42px;
  height: 42px;
  object-fit: cover;
  border-radius: 10px;
}

.mimi-debug-sticker-item strong {
  display: block;
  font-size: 0.86rem;
  font-weight: 500;
}

.mimi-debug-sticker-item em {
  display: block;
  margin-top: 2px;
  color: rgba(123, 83, 71, 0.48);
  font-size: 0.72rem;
  font-style: normal;
}

.mimi-debug-sticker-item button {
  color: var(--pink-deep);
}

.mimi-debug-empty {
  margin: 0;
  color: rgba(123, 83, 71, 0.48);
  font-size: 0.78rem;
}

.mimi-debug-api {
  padding: 10px 12px;
  border: 1.4px dashed rgba(185, 213, 239, 0.42);
  border-radius: 14px 16px 13px 18px;
  background: rgba(255, 255, 255, 0.34);
}

.mimi-debug-api summary {
  cursor: pointer;
  color: rgba(123, 83, 71, 0.72);
  font-size: 0.84rem;
}

.mimi-debug-api[open] {
  display: grid;
  gap: 10px;
}

.mimi-debug-actions {
  display: grid;
  gap: 8px;
  margin-top: 4px;
}

.mimi-call-transcript {
  --drop-rotate: -0.5deg;
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr;
  min-height: 0;
  padding: 18px 15px 14px;
  border: none;
  border-radius: 28px 22px 30px 24px / 24px 30px 22px 28px;
  background:
    radial-gradient(circle at 8% 12%, rgba(255, 217, 132, 0.14) 0 2px, transparent 2px 14px),
    radial-gradient(circle at 94% 86%, rgba(185, 213, 239, 0.14) 0 2px, transparent 2px 12px),
    repeating-linear-gradient(0deg, rgba(123, 83, 71, 0.035) 0 1px, transparent 1px 28px),
    linear-gradient(180deg, rgba(255, 255, 255, 0.76), rgba(255, 248, 238, 0.9)),
    #fff9ee;
  box-shadow:
    0 7px 0 rgba(238, 143, 165, 0.1),
    0 14px 24px rgba(123, 83, 71, 0.05);
  transform: rotate(var(--drop-rotate));
  isolation: isolate;
}

.mimi-call-transcript::before {
  content: "";
  position: absolute;
  inset: 4px 5px 5px 4px;
  border: 2px solid rgba(123, 83, 71, 0.34);
  border-radius: 24px 20px 26px 22px / 22px 26px 20px 24px;
  transform: rotate(0.7deg);
  pointer-events: none;
  z-index: 0;
}

.mimi-call-transcript::after {
  content: "";
  position: absolute;
  inset: 10px 11px 11px 10px;
  border: 1.5px dashed rgba(216, 109, 134, 0.26);
  border-radius: 20px 24px 18px 26px / 18px 26px 24px 20px;
  transform: rotate(-0.5deg);
  pointer-events: none;
  z-index: 0;
}

.mimi-frame-corner {
  position: absolute;
  width: 18px;
  height: 18px;
  z-index: 2;
  pointer-events: none;
}

.mimi-frame-corner::before,
.mimi-frame-corner::after {
  content: "";
  position: absolute;
  background: rgba(123, 83, 71, 0.34);
  border-radius: 2px;
}

.mimi-frame-corner--tl {
  left: 10px;
  top: 10px;
  transform: rotate(-4deg);
}

.mimi-frame-corner--tl::before {
  left: 0;
  top: 0;
  width: 14px;
  height: 2.5px;
}

.mimi-frame-corner--tl::after {
  left: 0;
  top: 0;
  width: 2.5px;
  height: 14px;
}

.mimi-frame-corner--tr {
  right: 10px;
  top: 10px;
  transform: rotate(5deg);
}

.mimi-frame-corner--tr::before {
  right: 0;
  top: 0;
  width: 14px;
  height: 2.5px;
}

.mimi-frame-corner--tr::after {
  right: 0;
  top: 0;
  width: 2.5px;
  height: 14px;
}

.mimi-frame-corner--bl {
  left: 10px;
  bottom: 10px;
  transform: rotate(3deg);
}

.mimi-frame-corner--bl::before {
  left: 0;
  bottom: 0;
  width: 14px;
  height: 2.5px;
}

.mimi-frame-corner--bl::after {
  left: 0;
  bottom: 0;
  width: 2.5px;
  height: 14px;
}

.mimi-frame-corner--br {
  right: 10px;
  bottom: 10px;
  transform: rotate(-6deg);
}

.mimi-frame-corner--br::before {
  right: 0;
  bottom: 0;
  width: 14px;
  height: 2.5px;
}

.mimi-frame-corner--br::after {
  right: 0;
  bottom: 0;
  width: 2.5px;
  height: 14px;
}

.mimi-transcript-pin {
  position: absolute;
  top: -9px;
  left: 50%;
  z-index: 3;
  width: 16px;
  height: 16px;
  margin-left: -8px;
  border: 2px solid rgba(123, 83, 71, 0.22);
  border-radius: 50% 48% 52% 46% / 46% 52% 48% 54%;
  background:
    radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.72), transparent 42%),
    #ee8fa5;
  box-shadow: 0 3px 0 rgba(123, 83, 71, 0.1);
  transform: rotate(-8deg);
}

.mimi-transcript-tape {
  position: absolute;
  top: 12px;
  left: -8px;
  z-index: 3;
  width: 42px;
  height: 13px;
  border: 1px solid rgba(255, 217, 132, 0.38);
  border-radius: 2px 3px 2px 4px;
  background:
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.38) 0 4px, transparent 4px 8px),
    rgba(255, 217, 132, 0.52);
  transform: rotate(-10deg);
  pointer-events: none;
}

.mimi-transcript-label {
  margin: 0;
  padding-left: 0;
  color: rgba(123, 83, 71, 0.72);
  font-size: 0.92rem;
  letter-spacing: 0.04em;
  text-decoration: underline wavy rgba(216, 109, 134, 0.32);
  text-underline-offset: 5px;
}

.mimi-chat-box {
  position: relative;
  z-index: 1;
  display: grid;
  align-content: start;
  gap: 12px;
  min-height: 0;
  overflow: auto;
  padding-right: 2px;
  -webkit-overflow-scrolling: touch;
}

.mimi-bubble {
  position: relative;
  display: grid;
  gap: 4px;
  max-width: 90%;
  margin: 0;
}

.mimi-bubble.is-appearing {
  animation: mimiBubbleIn 520ms cubic-bezier(0.18, 0.9, 0.26, 1.08) both;
}

@keyframes mimiBubbleIn {
  0% {
    opacity: 0;
    transform: translateY(10px) scale(0.96);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.mimi-bubble--bot {
  justify-self: start;
  padding: 0 0 0 2px;
}

.mimi-bubble--bot.mimi-bubble--compact {
  margin-top: -2px;
}

.mimi-bubble--bot.mimi-bubble--compact .mimi-bubble-head {
  display: none;
}

.mimi-bubble--bot.mimi-bubble--media-only {
  margin-top: 4px;
}

.mimi-bubble--bot.mimi-bubble--media-only .mimi-bubble-text {
  padding: 4px;
  background: transparent;
  box-shadow: none;
}

.mimi-bubble--bot.mimi-bubble--media-only .mimi-bubble-text::before {
  display: none;
}

.mimi-bubble--bot.mimi-bubble--media-only .mimi-bubble-tail {
  display: none;
}

.mimi-bubble--user {
  justify-self: end;
  padding: 0 2px 0 0;
}

.mimi-bubble-tag {
  color: rgba(216, 109, 134, 0.72);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
}

.mimi-bubble-text {
  position: relative;
  margin: 0;
  padding: 10px 12px 11px;
  border: none;
  border-radius: 17px 13px 19px 11px / 13px 19px 11px 17px;
  line-height: 1.55;
  box-shadow:
    0 0 0 2px rgba(123, 83, 71, 0.24),
    0 3px 0 rgba(123, 83, 71, 0.05);
}

.mimi-bubble-text::before {
  content: "";
  position: absolute;
  inset: 4px 5px 5px 4px;
  border: 1px dashed rgba(123, 83, 71, 0.14);
  border-radius: 14px 11px 16px 10px / 11px 16px 10px 14px;
  pointer-events: none;
}

.mimi-bubble--bot .mimi-bubble-text {
  background: linear-gradient(145deg, #fff8ec, #fff3df);
  border-radius: 15px 19px 11px 17px / 17px 11px 19px 15px;
  transform: rotate(-0.4deg);
}

.mimi-bubble--user .mimi-bubble-text {
  background: linear-gradient(145deg, #ffe8f0, #ffdce6);
  border-radius: 19px 11px 17px 15px / 15px 17px 11px 19px;
  text-align: right;
  transform: rotate(0.5deg);
}

.mimi-bubble-tail {
  position: absolute;
  bottom: 8px;
  width: 12px;
  height: 12px;
  border: 1.6px solid rgba(123, 83, 71, 0.26);
  background: inherit;
  pointer-events: none;
}

.mimi-bubble--bot .mimi-bubble-tail {
  left: 34px;
  bottom: 10px;
  background: #fff3df;
  border-radius: 0 0 0 8px;
  border-top: 0;
  border-right: 0;
  transform: rotate(-28deg) skewX(-8deg);
}

.mimi-bubble--user .mimi-bubble-tail {
  right: 18px;
  background: #ffdce6;
  border-radius: 0 0 8px 0;
  border-top: 0;
  border-left: 0;
  transform: rotate(28deg) skewX(8deg);
}

.mimi-bubble--typing .mimi-bubble-tail {
  display: none;
}

.mimi-bubble--typing .mimi-typing-dots {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 10px 14px;
  border: none;
  border-radius: 15px 19px 11px 17px / 17px 11px 19px 15px;
  background: #fff3df;
  box-shadow:
    0 0 0 2px rgba(123, 83, 71, 0.24),
    0 3px 0 rgba(123, 83, 71, 0.05);
}

.mimi-call-compose {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr 46px;
  align-items: center;
  gap: 8px;
  padding: 9px 11px 10px;
  border: none;
  border-radius: 22px 26px 18px 24px / 24px 18px 26px 22px;
  background:
    radial-gradient(circle at 12% 18%, rgba(185, 213, 239, 0.12) 0 2px, transparent 2px 12px),
    repeating-linear-gradient(97deg, rgba(185, 213, 239, 0.05) 0 1px, transparent 1px 10px),
    linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(238, 246, 255, 0.66));
  box-shadow:
    0 0 0 2px rgba(123, 83, 71, 0.28),
    0 6px 0 rgba(185, 213, 239, 0.14);
  transform: rotate(0.4deg);
}

.mimi-call-compose::before {
  content: "";
  position: absolute;
  inset: 5px 6px 6px 5px;
  border: 1.5px dashed rgba(123, 83, 71, 0.18);
  border-radius: 18px 22px 16px 20px / 20px 16px 22px 18px;
  transform: rotate(-0.6deg);
  pointer-events: none;
}

.mimi-compose-corner {
  position: absolute;
  top: 50%;
  width: 10px;
  height: 22px;
  margin-top: -11px;
  pointer-events: none;
}

.mimi-compose-corner::before {
  content: "";
  position: absolute;
  inset: 0;
  border: 2px solid rgba(123, 83, 71, 0.22);
  border-right: 0;
  border-radius: 8px 0 0 8px;
}

.mimi-compose-corner--left {
  left: -3px;
  transform: rotate(-8deg);
}

.mimi-compose-corner--right {
  right: -3px;
  transform: scaleX(-1) rotate(-8deg);
}

.mimi-call-compose input {
  position: relative;
  z-index: 1;
  min-width: 0;
  min-height: 40px;
  padding: 0 10px;
  border: 1.8px solid rgba(123, 83, 71, 0.2);
  border-radius: 15px 11px 17px 12px / 12px 17px 11px 15px;
  background: rgba(255, 255, 255, 0.62);
  color: var(--brown);
  -webkit-appearance: none;
  appearance: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.mimi-send-button {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 46px;
  height: 40px;
  border: none;
  border-radius: 50% 44% 48% 42% / 42% 48% 44% 50%;
  background:
    radial-gradient(circle at 30% 28%, rgba(255, 255, 255, 0.5), transparent 48%),
    linear-gradient(145deg, #ffdce6, #ee8fa5);
  color: var(--brown);
  box-shadow:
    0 0 0 2px rgba(123, 83, 71, 0.24),
    0 4px 0 rgba(238, 143, 165, 0.2);
  transition: transform 160ms ease;
  transform: rotate(2deg);
}

.mimi-typing-dots i {
  display: block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(216, 109, 134, 0.55);
  animation: mimiTypingDot 1s ease-in-out infinite;
}

.mimi-typing-dots i:nth-child(2) { animation-delay: 160ms; }
.mimi-typing-dots i:nth-child(3) { animation-delay: 320ms; }

@keyframes mimiTypingDot {
  0%, 80%, 100% {
    opacity: 0.35;
    transform: translateY(0);
  }
  40% {
    opacity: 1;
    transform: translateY(-3px);
  }
}

.mimi-compose-sketch {
  display: none;
}

.mimi-send-button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.mimi-send-button:active {
  transform: scale(0.94) rotate(-1deg);
}

.mimi-ai-view.is-entering .tool-header--mimi-ai,
.mimi-ai-view.is-entering .mimi-ai-doodle,
.mimi-ai-view.is-entering .mimi-call-transcript,
.mimi-ai-view.is-entering .mimi-call-compose {
  animation: paperDrop 780ms cubic-bezier(0.18, 0.9, 0.26, 1.12) both;
  will-change: transform, opacity;
}

.mimi-ai-view.is-entering .tool-header--mimi-ai { animation-delay: 40ms; }
.mimi-ai-view.is-entering .mimi-ai-doodle:nth-child(1) { animation-delay: 70ms; }
.mimi-ai-view.is-entering .mimi-ai-doodle:nth-child(2) { animation-delay: 110ms; }
.mimi-ai-view.is-entering .mimi-ai-doodle:nth-child(3) { animation-delay: 150ms; }
.mimi-ai-view.is-entering .mimi-ai-doodle:nth-child(4) { animation-delay: 190ms; }
.mimi-ai-view.is-entering .mimi-ai-doodle:nth-child(5) { animation-delay: 230ms; }
.mimi-ai-view.is-entering .mimi-ai-doodle:nth-child(6) { animation-delay: 270ms; }
.mimi-ai-view.is-entering .mimi-ai-doodle:nth-child(7) { animation-delay: 310ms; }
.mimi-ai-view.is-entering .mimi-ai-doodle:nth-child(8) { animation-delay: 350ms; }
.mimi-ai-view.is-entering .mimi-call-transcript { animation-delay: 160ms; }
.mimi-ai-view.is-entering .mimi-call-compose { animation-delay: 320ms; }

@media (prefers-reduced-motion: reduce) {
  .mimi-typing-dots i {
    animation: none;
  }

  .mimi-ai-view.is-entering .tool-header--mimi-ai,
  .mimi-ai-view.is-entering .mimi-ai-doodle,
  .mimi-ai-view.is-entering .mimi-call-transcript,
  .mimi-ai-view.is-entering .mimi-call-compose,
  .mimi-bubble.is-appearing {
    animation: none;
  }
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 22px;
  bottom: calc(22px + env(safe-area-inset-bottom));
  z-index: 10;
  width: calc(100% - 34px);
  max-width: 360px;
  padding: 14px 18px;
  border: 2px solid rgba(123, 83, 71, 0.42);
  border-radius: 22px 18px 24px 20px;
  color: var(--brown);
  background: #fffaf1;
  box-shadow: 0 10px 0 rgba(238, 143, 165, 0.1);
  font-size: 1.08rem;
  line-height: 1.6;
  text-align: center;
  transform: translate(-50%, 18px) rotate(-1deg);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s ease;
}

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

body.is-device-blocked .phone-page {
  filter: blur(6px);
  pointer-events: none;
  user-select: none;
}

.device-gate[hidden] {
  display: none !important;
}

.device-gate {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(255, 238, 244, 0.72);
  backdrop-filter: blur(4px);
}

.device-gate-card {
  width: min(100%, 380px);
  padding: 28px 22px 24px;
  text-align: center;
}

.device-gate-kicker {
  margin: 0 0 8px;
  color: rgba(123, 83, 71, 0.72);
  font-size: 0.92rem;
  letter-spacing: 0.08em;
}

.device-gate-card h1 {
  margin: 0 0 12px;
  color: var(--brown);
  font-size: 1.45rem;
  line-height: 1.35;
}

.device-gate-text {
  margin: 0 0 18px;
  color: rgba(123, 83, 71, 0.82);
  font-size: 0.98rem;
  line-height: 1.65;
}

.device-gate-code-wrap {
  display: grid;
  gap: 10px;
  margin-bottom: 16px;
}

.device-gate-code-wrap code {
  display: block;
  padding: 14px 12px;
  border: 2px dashed rgba(123, 83, 71, 0.28);
  border-radius: 16px;
  background: rgba(255, 250, 241, 0.92);
  color: var(--brown);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.86rem;
  line-height: 1.5;
  word-break: break-all;
}

.device-gate-status {
  margin: 0 0 14px;
  color: rgba(123, 83, 71, 0.78);
  font-size: 0.92rem;
  line-height: 1.55;
}

.device-gate-copy-btn,
.device-gate-retry {
  border: 2px solid rgba(123, 83, 71, 0.42);
  border-radius: 18px;
  background: #fffaf1;
  color: var(--brown);
  font: inherit;
  cursor: pointer;
}

.device-gate-copy-btn {
  padding: 12px 16px;
}

.device-gate-retry {
  width: 100%;
  padding: 13px 16px;
  background: linear-gradient(180deg, #ffd9d9 0%, #f8c4d0 100%);
}

.device-gate-copy-btn:disabled,
.device-gate-retry:disabled {
  opacity: 0.6;
  cursor: wait;
}

@media (min-width: 700px) {
  body {
    display: grid;
    min-height: 100vh;
    align-items: center;
    justify-items: center;
    padding: 24px;
    overflow: hidden;
  }

  .phone-page {
    width: 390px;
    height: calc(100vh - 48px);
    max-height: 844px;
    min-height: 0;
    border: 10px solid #282828;
    border-radius: 46px;
    box-shadow: 0 22px 80px rgba(123, 83, 71, 0.2);
  }
}

@media (max-width: 380px), (max-height: 760px) {
  .view {
    padding-left: 16px;
    padding-right: 16px;
  }

  .cover-section {
    padding-top: 8px;
  }

  .title-paper h1 {
    font-size: 2.65rem;
  }

  .title-art {
    max-height: 138px;
  }

  .sticker-row {
    margin-top: 7px;
  }

  .feature-tile {
    min-height: 78px;
  }

  .feature-tile em {
    display: none;
  }

  .home-note {
    margin-top: 10px;
    padding: 11px 14px;
  }

  .tool-header {
    height: 76px;
  }

  .tool-header--toolbox {
    min-height: 0;
  }

  .toolbox-body {
    height: calc(100% - 76px);
  }

  .tool-card {
    height: calc(100% - 86px);
  }

  .toolbox-item {
    min-height: 76px;
    padding: 11px 12px;
    grid-template-columns: 46px 1fr 20px;
  }

  .pdf-body {
    height: calc(100% - 76px);
  }

  .album-body {
    height: calc(100% - 76px);
  }

  .period-body {
    height: calc(100% - 76px);
  }

  .wishes-body {
    height: calc(100% - 76px);
  }

  .wishes-jar {
    width: 68px;
    height: 82px;
  }

  .wishes-hero-title {
    font-size: 1.28rem;
  }

  .mimi-ai-body {
    height: calc(100% - 76px);
    gap: 6px;
    padding-bottom: calc(10px + env(safe-area-inset-bottom));
  }

  .mimi-debug-sticker-upload {
    grid-template-columns: 1fr;
  }

  .mimi-debug-slider-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .scratch-body {
    height: calc(100% - 76px);
    padding: 6px 14px 14px;
  }

  .scratch-voucher {
    padding: 18px 14px 16px;
  }

  .scratch-board,
  #scratchCanvas {
    min-height: 152px;
    height: 152px;
  }

  .period-countdown-value strong {
    font-size: 2.35rem;
  }

  .period-ring {
    width: 84px;
    height: 84px;
  }

  .period-info-card strong {
    font-size: 0.72rem;
  }

  .album-spread,
  .album-detail-spread {
    padding: 16px 14px 14px;
  }

  .album-shelf {
    gap: 12px 10px;
    margin-top: 12px;
  }

  .album-book {
    min-height: 152px;
  }

  .album-book-link {
    min-height: 152px;
  }

  .album-book-thumb {
    min-height: 68px;
  }

  .album-book-thumb img {
    min-height: 68px;
  }

  .pdf-album {
    padding: 14px 13px 13px;
  }

  .pdf-preview-grid {
    max-height: min(36vh, 220px);
  }

  .pdf-thumb img {
    height: 64px;
  }

  .toolbox-icon {
    width: 40px;
    height: 40px;
  }
}
