/* 和好缎带 · 样式表
   贴纸感：粗墨线描边 + 实色投影 + 网点；配色取自章鱼噼（粉色）、快乐星球（黄色星星）与晴空。 */

:root {
  --ink: #4a2f3a;
  --ink-2: #6e5360;
  --ink-3: #a5899a;
  --pink: #ff98b4;
  --pink-deep: #f0568c;
  --pink-light: #ffd6e1;
  --pink-pale: #fff0f4;
  --star: #ffd43b;
  --star-light: #fff1bf;
  --sky: #cfebff;
  --sky-deep: #8ccbff;
  --mint: #86ddb5;
  --mint-light: #d2f5e4;
  --lavender: #bda4ff;
  --lavender-light: #e7dcff;
  --peach: #ffb38a;
  --cream: #fff6ee;
  --paper: #fffdf9;
  --skin: #ffe2d2;
  --online: #5fd39a;

  --font: 'ZCOOL KuaiLe', 'Yuanti SC', 'PingFang SC', 'Hiragino Maru Gothic ProN', 'Microsoft YaHei UI', 'Microsoft YaHei', 'Noto Sans SC', system-ui, sans-serif;
  --font-kana: 'Hachi Maru Pop', 'ZCOOL KuaiLe', 'Hiragino Maru Gothic ProN', sans-serif;

  --line: 3px;
  --r-lg: 28px;
  --r: 22px;
  --r-sm: 14px;
  --lift: 0 5px 0 var(--ink);
  --lift-sm: 0 3px 0 var(--ink);
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --out: cubic-bezier(0.22, 1, 0.36, 1);
  --gutter: 16px;
  --maxw: 1100px;

  --outline: 2.5px 0 0 var(--ink), -2.5px 0 0 var(--ink), 0 2.5px 0 var(--ink), 0 -2.5px 0 var(--ink), 1.8px 1.8px 0 var(--ink),
    -1.8px 1.8px 0 var(--ink), 1.8px -1.8px 0 var(--ink), -1.8px -1.8px 0 var(--ink);
  --outline-strong: 4px 0 0 var(--ink), -4px 0 0 var(--ink), 0 4px 0 var(--ink), 0 -4px 0 var(--ink), 2.8px 2.8px 0 var(--ink),
    -2.8px 2.8px 0 var(--ink), 2.8px -2.8px 0 var(--ink), -2.8px -2.8px 0 var(--ink), 0 6px 0 var(--ink), 2.8px 6.5px 0 var(--ink),
    -2.8px 6.5px 0 var(--ink), 0 8px 0 var(--ink);

  color-scheme: light;
}

@media (min-width: 720px) {
  :root {
    --gutter: 24px;
  }
}

/* ------------------------------------------------------------------ 基础 */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: 96px;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
  overflow-x: clip;
}

img,
svg,
canvas {
  display: block;
  max-width: 100%;
}

a {
  color: var(--pink-deep);
}

button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}

::selection {
  background: var(--pink-light);
  color: var(--ink);
}

:focus-visible {
  outline: 3px dashed var(--pink-deep);
  outline-offset: 3px;
}

.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.kana {
  font-family: var(--font-kana);
}

.muted {
  color: var(--ink-2);
}

.icon {
  width: 1.25em;
  height: 1.25em;
  flex: none;
}

/* ------------------------------------------------------------------ 背景天空 */

.sky {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  background:
    radial-gradient(circle, rgba(74, 47, 58, 0.075) 1.25px, transparent 1.7px) 0 0 / 17px 17px,
    radial-gradient(120% 70% at 50% -10%, rgba(255, 214, 225, 0.9) 0%, rgba(255, 214, 225, 0) 60%),
    linear-gradient(180deg, #dcefff 0%, #fff6ee 46%, #ffeaf1 100%);
}

.sky-cloud {
  position: absolute;
  left: 0;
  width: var(--w);
  animation: cloud-drift var(--dur) linear infinite;
  filter: drop-shadow(0 5px 0 rgba(140, 203, 255, 0.35));
}

.sky-cloud svg {
  width: 100%;
  height: auto;
}

.sky-star {
  position: absolute;
  width: var(--s);
  height: var(--s);
  animation: twinkle 3.4s ease-in-out infinite;
}

.sky-star svg {
  width: 100%;
  height: 100%;
  overflow: visible;
  fill: var(--star);
  stroke: var(--ink);
  stroke-width: 2;
  stroke-linejoin: round;
}

.sky-planet {
  position: absolute;
  top: 96px;
  right: max(-24px, calc(50vw - 660px));
  width: 124px;
  opacity: 0.92;
  animation: planet-bob 7s ease-in-out infinite;
}

.sky-planet svg {
  width: 100%;
  height: auto;
  overflow: visible;
}

@media (max-width: 720px) {
  .sky-planet {
    top: 78px;
    right: -34px;
    width: 92px;
    opacity: 0.7;
  }
}

@keyframes cloud-drift {
  from {
    transform: translateX(calc(-1 * var(--w) - 20px));
  }
  to {
    transform: translateX(calc(100vw + 20px));
  }
}

@keyframes twinkle {
  0%,
  100% {
    transform: scale(1) rotate(0deg);
    opacity: 1;
  }
  50% {
    transform: scale(0.55) rotate(30deg);
    opacity: 0.55;
  }
}

@keyframes planet-bob {
  0%,
  100% {
    transform: translateY(0) rotate(-4deg);
  }
  50% {
    transform: translateY(-12px) rotate(5deg);
  }
}

/* ------------------------------------------------------------------ 顶栏 */

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  padding: max(10px, env(safe-area-inset-top)) var(--gutter) 0;
}

.topbar-inner {
  max-width: var(--maxw);
  height: 58px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 9px 0 12px;
  background: rgba(255, 253, 249, 0.88);
  -webkit-backdrop-filter: blur(10px) saturate(1.2);
  backdrop-filter: blur(10px) saturate(1.2);
  border: var(--line) solid var(--ink);
  border-radius: 999px;
  box-shadow: 0 4px 0 var(--ink);
  transition: box-shadow 0.3s;
}

.topbar.scrolled .topbar-inner {
  box-shadow:
    0 4px 0 var(--ink),
    0 14px 30px rgba(74, 47, 58, 0.14);
}

.brand {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  color: inherit;
  text-decoration: none;
  border-radius: 999px;
}

.brand-bow {
  width: 48px;
  flex: none;
  transition: transform 0.45s var(--spring);
}

.brand-bow svg {
  width: 100%;
  height: auto;
  overflow: visible;
}

.brand:hover .brand-bow {
  transform: rotate(-14deg) scale(1.1);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
  min-width: 0;
}

.brand-name {
  font-size: 22px;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.brand-kana {
  font-size: 10px;
  color: var(--pink-deep);
  letter-spacing: 0.1em;
  white-space: nowrap;
}

.topbar-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-link {
  padding: 5px 13px;
  border: 2px solid transparent;
  border-radius: 999px;
  color: var(--ink);
  font-size: 16px;
  text-decoration: none;
  white-space: nowrap;
  transition:
    background-color 0.2s,
    border-color 0.2s,
    transform 0.25s var(--spring);
}

.nav-link:hover {
  background: var(--pink-pale);
  transform: translateY(-1px);
}

.nav-link[aria-current='page'] {
  background: var(--pink-light);
  border-color: var(--ink);
}

.sound-toggle {
  margin-left: 4px;
}

@media (max-width: 560px) {
  .nav-new {
    display: none;
  }
  .brand-kana {
    display: none;
  }
  .brand-name {
    font-size: 20px;
  }
  .brand-bow {
    width: 42px;
  }
}

/* ------------------------------------------------------------------ 主体、页脚 */

#app {
  flex: 1;
  width: 100%;
  max-width: calc(var(--maxw) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 20px var(--gutter) 48px;
  outline: none;
}

.boot {
  display: grid;
  place-items: center;
  gap: 14px;
  padding: 18vh 0;
  color: var(--ink-2);
  animation: fade-in 0.3s ease 0.35s both;
}

.boot p {
  margin: 0;
}

.boot-bow {
  width: 54px;
  height: 50px;
  border-radius: 50% 50% 44% 44%;
  background: var(--pink);
  border: var(--line) solid var(--ink);
  box-shadow: inset -7px -6px 0 rgba(242, 124, 158, 0.55);
  animation: boot-bounce 0.6s ease-in-out infinite alternate;
}

.noscript {
  max-width: 420px;
  margin: 18vh auto;
  text-align: center;
}

.footer {
  padding: 26px var(--gutter) calc(30px + env(safe-area-inset-bottom));
  text-align: center;
  font-size: 13px;
  color: var(--ink-2);
}

.footer p {
  max-width: 760px;
  margin: 8px auto;
}

.footer-note {
  display: inline-block;
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.78);
  border: 2px dashed var(--pink);
  border-radius: 16px;
}

.footer-note a {
  color: var(--pink-deep);
  font-weight: bold;
}

.footer-legal {
  color: var(--ink-3);
  font-size: 12px;
}

.fx-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 90;
  pointer-events: none;
}

/* ------------------------------------------------------------------ 视图切换 */

.view {
  min-height: 40vh;
}

.view-enter [data-anim] {
  animation: rise-in 0.6s var(--out) backwards;
  animation-delay: calc(min(var(--i, 0), 10) * 55ms);
}

.view-leave {
  animation: view-out 0.17s ease-in forwards;
  pointer-events: none;
}

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

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

@keyframes fade-in {
  from {
    opacity: 0;
  }
}

/* ------------------------------------------------------------------ 按钮 */

.btn {
  --btn-bg: #fff;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 50px;
  padding: 0 22px;
  font-size: 18px;
  line-height: 1.2;
  color: var(--ink);
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  background: var(--btn-bg);
  border: var(--line) solid var(--ink);
  border-radius: 999px;
  box-shadow: var(--lift);
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
  transition:
    transform 0.18s var(--spring),
    box-shadow 0.18s,
    background-color 0.2s,
    filter 0.2s;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 7px 0 var(--ink);
  filter: brightness(1.03);
}

.btn:active {
  transform: translateY(4px);
  box-shadow: 0 1px 0 var(--ink);
  transition-duration: 0.06s;
}

.btn:hover .icon {
  animation: icon-wiggle 0.5s ease;
}

.btn-primary {
  --btn-bg: var(--pink);
}

.btn-star {
  --btn-bg: var(--star);
}

.btn-sky {
  --btn-bg: #bfe3ff;
}

.btn-mint {
  --btn-bg: var(--mint-light);
}

.btn-white {
  --btn-bg: #fff;
}

.btn-lg {
  min-height: 62px;
  padding: 0 30px;
  font-size: 22px;
}

.btn-sm {
  min-height: 38px;
  padding: 0 14px;
  font-size: 15px;
  box-shadow: var(--lift-sm);
}

.btn-sm:hover {
  box-shadow: 0 5px 0 var(--ink);
}

.btn-sm:active {
  transform: translateY(3px);
  box-shadow: 0 0 0 var(--ink);
}

.btn-block {
  width: 100%;
}

.btn-link {
  min-height: 0;
  padding: 4px 6px;
  background: none;
  border: 0;
  box-shadow: none;
  color: var(--ink-2);
  font-size: 15px;
  text-decoration: underline wavy var(--pink);
  text-underline-offset: 5px;
}

.btn-link:hover,
.btn-link:active {
  transform: none;
  box-shadow: none;
  color: var(--ink);
}

.btn:disabled,
.btn[aria-disabled='true'] {
  cursor: not-allowed;
  opacity: 0.55;
  transform: none;
  box-shadow: var(--lift);
}

.btn-shine {
  overflow: hidden;
  isolation: isolate;
}

.btn-shine::after {
  content: '';
  position: absolute;
  inset: -3px;
  z-index: -1;
  background: linear-gradient(105deg, transparent 38%, rgba(255, 255, 255, 0.8) 50%, transparent 62%);
  transform: translateX(-120%);
  animation: shine 4.2s ease-in-out 1.4s infinite;
  pointer-events: none;
}

.btn.is-busy {
  color: transparent;
  pointer-events: none;
}

.btn.is-busy::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 24px;
  height: 24px;
  margin: -12px 0 0 -12px;
  border: 3.5px solid var(--ink);
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 42px;
  height: 42px;
  padding: 0;
  color: var(--ink);
  background: #fff;
  border: var(--line) solid var(--ink);
  border-radius: 50%;
  box-shadow: var(--lift-sm);
  cursor: pointer;
  transition:
    transform 0.18s var(--spring),
    box-shadow 0.18s,
    background-color 0.2s;
}

.icon-btn:hover {
  transform: translateY(-1px);
  background: var(--star-light);
}

.icon-btn:active {
  transform: translateY(3px);
  box-shadow: 0 0 0 var(--ink);
}

.icon-btn .icon {
  width: 21px;
  height: 21px;
}

.icon-btn.pop {
  animation: pop-in 0.45s var(--spring);
}

@keyframes shine {
  0% {
    transform: translateX(-120%);
  }
  38%,
  100% {
    transform: translateX(120%);
  }
}

@keyframes icon-wiggle {
  0%,
  100% {
    transform: rotate(0);
  }
  30% {
    transform: rotate(-14deg) scale(1.1);
  }
  60% {
    transform: rotate(10deg);
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ------------------------------------------------------------------ 卡片、徽章、通用排版 */

.card {
  position: relative;
  padding: 22px;
  background: var(--paper);
  border: var(--line) solid var(--ink);
  border-radius: var(--r-lg);
  box-shadow: 0 6px 0 var(--ink);
}

@media (max-width: 480px) {
  .card {
    padding: 18px 16px;
    border-radius: 24px;
  }
}

.card-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  font-size: 21px;
  font-weight: 400;
  line-height: 1.3;
}

.card-title .icon {
  width: 24px;
  height: 24px;
  color: var(--pink-deep);
}

.card-title small {
  margin-left: auto;
  font-size: 13px;
  color: var(--ink-2);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 1px 12px;
  font-size: 14px;
  line-height: 1.7;
  white-space: nowrap;
  background: #fff;
  border: 2px solid var(--ink);
  border-radius: 999px;
}

.badge-star {
  background: var(--star);
}
.badge-wait {
  background: #fff;
}
.badge-seen {
  background: var(--sky);
}
.badge-think {
  background: var(--lavender-light);
}
.badge-tied {
  background: var(--pink-light);
}
.badge-gone {
  background: #efe6ea;
  color: var(--ink-2);
}

.page-head {
  margin: 4px 0 22px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 4px 12px 4px 6px;
  color: var(--ink-2);
  font-size: 15px;
  text-decoration: none;
  border-radius: 999px;
  transition:
    background-color 0.2s,
    transform 0.25s var(--spring);
}

.back-link:hover {
  background: rgba(255, 255, 255, 0.75);
  transform: translateX(-3px);
}

.back-link .icon {
  width: 18px;
  height: 18px;
}

.page-title {
  margin: 6px 0 4px;
  font-size: clamp(30px, 5.2vw, 44px);
  font-weight: 400;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.page-sub {
  margin: 0;
  color: var(--ink-2);
}

.section {
  margin-top: 64px;
}

.section-head {
  margin-bottom: 26px;
  text-align: center;
}

.section-head .kana {
  margin: 0 0 2px;
  color: var(--pink-deep);
  font-size: 14px;
  letter-spacing: 0.16em;
}

.section-title {
  display: inline;
  margin: 0;
  padding: 0 8px;
  font-size: clamp(27px, 4.4vw, 38px);
  font-weight: 400;
  line-height: 1.4;
  background: linear-gradient(transparent 60%, var(--star) 60%, var(--star) 88%, transparent 88%);
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

/* ------------------------------------------------------------------ 章鱼噼 */

.takopi {
  position: relative;
  display: inline-block;
  flex: none;
  width: var(--size, 160px);
  height: var(--size, 160px);
  isolation: isolate;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-user-select: none;
}

.takopi[role='img'] {
  cursor: default;
}

.takopi .tk-svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.takopi::after {
  content: '';
  position: absolute;
  z-index: -1;
  left: 24%;
  right: 24%;
  bottom: 1%;
  height: 7%;
  border-radius: 50%;
  background: rgba(74, 47, 58, 0.15);
}

.takopi:focus-visible {
  outline-offset: 2px;
  border-radius: 32%;
}

.takopi.float .tk-float {
  animation: tk-float 3.4s ease-in-out infinite;
}

.takopi.float::after {
  animation: tk-shadow 3.4s ease-in-out infinite;
}

.tk-leg {
  transform-box: fill-box;
  transform-origin: 50% 0;
  animation: tk-sway 2.4s ease-in-out infinite alternate;
}

.tk-eye {
  transform-box: fill-box;
  transform-origin: center;
  transition: transform 0.07s ease-in;
}

.takopi.blink .tk-eye {
  transform: scaleY(0.1);
}

.tk-look {
  transition: transform 0.35s var(--out);
}

.tk-root {
  transform-box: view-box;
  transform-origin: 100px 188px;
}

.takopi.jump .tk-root {
  animation: tk-jump 0.76s var(--out);
}

.takopi.squash .tk-root {
  animation: tk-squash 0.5s var(--spring);
}

.takopi.wiggle .tk-root {
  animation: tk-wiggle 0.7s ease-in-out;
}

.takopi.excited .tk-float {
  animation: tk-hop 0.42s ease-in-out infinite alternate;
}

.takopi.excited .tk-leg {
  animation-duration: 0.42s;
}

.tk-wing {
  transform-box: fill-box;
  transform-origin: 100% 60%;
  animation: tk-flap 0.3s ease-in-out infinite alternate;
}

.tk-tear {
  transform-box: fill-box;
  animation: tk-tear 1.9s ease-in infinite;
}

.takopi.talking .tk-face {
  transform-box: fill-box;
  transform-origin: 50% 85%;
  animation: tk-talk 0.2s ease-in-out infinite alternate;
}

.tk-acc-bow {
  transform-box: fill-box;
  transform-origin: center;
}

.takopi.acc-pop .tk-acc-bow {
  animation: pop-in 0.6s var(--spring);
}

.takopi:hover .tk-acc-bow {
  animation: bow-sway 0.9s ease-in-out;
}

@keyframes tk-float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-7px);
  }
}

@keyframes tk-shadow {
  0%,
  100% {
    transform: scaleX(1);
    opacity: 1;
  }
  50% {
    transform: scaleX(0.8);
    opacity: 0.65;
  }
}

@keyframes tk-sway {
  from {
    transform: rotate(7deg);
  }
  to {
    transform: rotate(-7deg);
  }
}

@keyframes tk-jump {
  0% {
    transform: none;
  }
  14% {
    transform: scale(1.14, 0.84);
  }
  40% {
    transform: translateY(-36px) scale(0.92, 1.1);
  }
  62% {
    transform: translateY(0) scale(1.12, 0.88);
  }
  80% {
    transform: scale(0.97, 1.04);
  }
  100% {
    transform: none;
  }
}

@keyframes tk-squash {
  0% {
    transform: none;
  }
  30% {
    transform: scale(1.1, 0.9);
  }
  60% {
    transform: scale(0.95, 1.06);
  }
  100% {
    transform: none;
  }
}

@keyframes tk-wiggle {
  0%,
  100% {
    transform: rotate(0);
  }
  20% {
    transform: rotate(-8deg);
  }
  40% {
    transform: rotate(7deg);
  }
  60% {
    transform: rotate(-5deg);
  }
  80% {
    transform: rotate(3deg);
  }
}

@keyframes tk-hop {
  from {
    transform: translateY(0);
  }
  to {
    transform: translateY(-11px);
  }
}

@keyframes tk-flap {
  from {
    transform: rotate(-16deg);
  }
  to {
    transform: rotate(16deg);
  }
}

@keyframes tk-tear {
  0% {
    transform: translateY(-4px);
    opacity: 0;
  }
  20% {
    opacity: 1;
  }
  80% {
    transform: translateY(10px);
    opacity: 1;
  }
  100% {
    transform: translateY(15px);
    opacity: 0;
  }
}

@keyframes tk-talk {
  from {
    transform: scale(1, 1);
  }
  to {
    transform: scale(1.03, 0.95);
  }
}

@keyframes pop-in {
  0% {
    transform: scale(0);
  }
  60% {
    transform: scale(1.18);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes bow-sway {
  0%,
  100% {
    transform: rotate(0);
  }
  25% {
    transform: rotate(-8deg) scale(1.04);
  }
  75% {
    transform: rotate(7deg) scale(1.02);
  }
}

/* ------------------------------------------------------------------ 对话气泡 */

.bubble {
  position: relative;
  display: grid;
  align-items: center;
  min-height: 46px;
  padding: 9px 16px;
  font-size: 16px;
  line-height: 1.55;
  text-align: left;
  background: #fff;
  border: var(--line) solid var(--ink);
  border-radius: 20px;
  box-shadow: 0 4px 0 var(--ink);
  overflow-wrap: anywhere;
}

.bubble > .bubble-ghost,
.bubble > .bubble-typed {
  grid-area: 1 / 1;
}

.bubble-ghost {
  visibility: hidden;
}

.bubble:has(.bubble-ghost:empty) {
  visibility: hidden;
}

.bubble::before {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  background: #fff;
  border-left: var(--line) solid var(--ink);
  border-bottom: var(--line) solid var(--ink);
  border-radius: 0 0 0 4px;
}

.bubble-left {
  transform-origin: 0 50%;
}

.bubble-left::before {
  left: -10px;
  top: 50%;
  margin-top: -8px;
  transform: rotate(45deg);
}

.bubble-down {
  transform-origin: 50% 100%;
}

.bubble-down::before {
  left: 50%;
  bottom: -10px;
  margin-left: -8px;
  transform: rotate(-45deg);
}

.bubble.pop {
  animation: bubble-pop 0.5s var(--spring);
}

@keyframes bubble-pop {
  0% {
    transform: scale(0.82);
  }
  60% {
    transform: scale(1.04);
  }
  100% {
    transform: none;
  }
}

.guide {
  display: flex;
  align-items: center;
  gap: 14px;
}

.guide .bubble {
  flex: 1;
  min-width: 0;
}

.guide-tight {
  gap: 12px;
}

/* ------------------------------------------------------------------ 首页 */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  align-items: center;
  gap: 8px 28px;
  min-height: min(620px, calc(100svh - 130px));
  padding-bottom: 20px;
}

.hero-art {
  position: relative;
  height: clamp(320px, 44vw, 480px);
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
}

.hero-art.can-grab {
  cursor: grab;
}

.hero-art.grabbing {
  cursor: grabbing;
}

.hero-rope {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.hero-glow {
  position: absolute;
  left: 40%;
  top: 56%;
  width: min(84%, 420px);
  aspect-ratio: 1;
  translate: -50% -50%;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.6) 55%, rgba(255, 255, 255, 0));
}

.hero-glow::before {
  content: '';
  position: absolute;
  inset: -12%;
  border-radius: 50%;
  background: repeating-conic-gradient(from 0deg, rgba(255, 212, 59, 0.32) 0deg 9deg, rgba(255, 212, 59, 0) 9deg 22.5deg);
  -webkit-mask: radial-gradient(closest-side, #000 40%, transparent 100%);
  mask: radial-gradient(closest-side, #000 40%, transparent 100%);
  animation: spin 50s linear infinite;
}

.hero-takopi {
  position: absolute;
  z-index: 2;
  left: 40%;
  top: 58%;
  translate: -50% -50%;
}

.hero-bubble {
  position: absolute;
  z-index: 3;
  left: 40%;
  top: 2%;
  width: max-content;
  max-width: min(330px, 94%);
  translate: -50% 0;
  font-size: 17px;
}

.hero-copy {
  position: relative;
  z-index: 2;
}

.hero-kana {
  margin: 0 0 6px;
  color: var(--pink-deep);
  font-size: 18px;
  letter-spacing: 0.14em;
}

.hero-title {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  margin: 0;
  font-size: clamp(56px, 9.2vw, 100px);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: 0.02em;
}

.hero-char {
  display: inline-block;
  color: var(--pink);
  text-shadow: var(--outline-strong);
  animation: char-in 0.8s var(--spring) backwards;
  animation-delay: calc(0.2s + var(--c) * 0.09s);
  cursor: default;
}

.hero-char:nth-child(1) {
  rotate: -6deg;
}
.hero-char:nth-child(2) {
  rotate: 4deg;
  translate: 0 5px;
  color: #fff;
}
.hero-char:nth-child(3) {
  rotate: -3deg;
}
.hero-char:nth-child(4) {
  rotate: 6deg;
  translate: 0 3px;
  color: #fff;
}

.hero-char:hover {
  animation: char-boing 0.6s var(--spring);
}

.hero-title-bow {
  width: clamp(58px, 8vw, 88px);
  margin: 0 0 0.12em 8px;
  animation: bow-sway 3.2s ease-in-out infinite;
}

.hero-title-bow svg {
  width: 100%;
  height: auto;
  overflow: visible;
}

.hero-lead {
  max-width: 30em;
  margin: 20px 0 24px;
  color: var(--ink-2);
  font-size: 18px;
  line-height: 1.75;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}

.hero-tip {
  margin: 16px 0 0;
  font-size: 14px;
  color: var(--ink-3);
}

@keyframes char-in {
  0% {
    opacity: 0;
    transform: translateY(-60px) scale(0.4);
  }
  60% {
    opacity: 1;
    transform: translateY(6px) scale(1.12);
  }
  100% {
    transform: none;
  }
}

@keyframes char-boing {
  0% {
    transform: none;
  }
  30% {
    transform: scale(1.2, 0.8) translateY(6px);
  }
  60% {
    transform: scale(0.9, 1.15) translateY(-8px);
  }
  100% {
    transform: none;
  }
}

@media (max-width: 820px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: 0;
    text-align: center;
  }
  .hero-art {
    height: clamp(300px, 80vw, 420px);
    margin: 0 -8px;
  }
  .hero-takopi,
  .hero-glow,
  .hero-bubble {
    left: 44%;
  }
  .hero-title,
  .hero-actions {
    justify-content: center;
  }
  .hero-lead {
    margin-left: auto;
    margin-right: auto;
  }
}

/* 统计 */

.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 10px;
}

.stats[hidden] {
  display: none;
}

.stat {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  background: #fff;
  border: var(--line) solid var(--ink);
  border-radius: var(--r);
  box-shadow: var(--lift);
}

.stat-pink {
  --tone: var(--pink-light);
}
.stat-mint {
  --tone: var(--mint-light);
}
.stat-sky {
  --tone: var(--sky);
}

.stat-icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 48px;
  height: 48px;
  background: var(--tone);
  border: var(--line) solid var(--ink);
  border-radius: 15px;
  rotate: -6deg;
}

.stat-icon .icon {
  width: 26px;
  height: 26px;
}

.stat-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.stat-value {
  font-size: 32px;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.stat-value small {
  margin-left: 3px;
  font-size: 15px;
  color: var(--ink-2);
}

.stat-label {
  font-size: 14px;
  color: var(--ink-2);
}

@media (max-width: 700px) {
  .stats {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

/* 使用方法 */

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

.step {
  padding: 32px 20px 24px;
  text-align: center;
  transition: transform 0.3s var(--spring);
}

.step:hover {
  transform: translateY(-5px) rotate(-0.8deg);
}

.step:nth-child(2):hover {
  transform: translateY(-5px) rotate(0.8deg);
}

.step-num {
  position: absolute;
  top: -20px;
  left: 50%;
  translate: -50% 0;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  font-size: 23px;
  background: var(--star);
  border: var(--line) solid var(--ink);
  border-radius: 50%;
  box-shadow: var(--lift-sm);
}

.step-art {
  display: grid;
  place-items: center;
  height: 100px;
  margin-bottom: 12px;
}

.step-art svg {
  width: auto;
  height: 96px;
  overflow: visible;
}

.step:hover .step-art > svg {
  animation: bow-sway 0.9s ease-in-out;
}

.step-art-bow svg {
  height: 80px;
}

.step-hands {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.step-hand {
  width: 96px;
  flex: none;
}

.step-hand svg {
  width: 100%;
  height: auto;
}

.step-hand + .step-hand {
  margin-left: -22px;
}

.step-hands-bow {
  position: absolute;
  left: 50%;
  top: 38px;
  width: 44px;
  translate: -50% 0;
  animation: bow-sway 2.8s ease-in-out infinite;
}

.step-hands-bow svg {
  width: 100%;
  height: auto;
}

.step-title {
  margin: 0 0 6px;
  font-size: 23px;
  font-weight: 400;
}

.step-title small {
  display: block;
  font-size: 12px;
  color: var(--pink-deep);
  letter-spacing: 0.14em;
}

.step-text {
  margin: 0;
  font-size: 15.5px;
  color: var(--ink-2);
}

@media (max-width: 780px) {
  .steps {
    grid-template-columns: 1fr;
    gap: 34px;
  }
}

/* 道具说明书 */

.gadget {
  display: grid;
  grid-template-columns: minmax(0, 260px) minmax(0, 1fr);
  align-items: center;
  gap: 28px;
  padding: 28px;
  overflow: hidden;
  background:
    radial-gradient(circle, rgba(255, 212, 59, 0.22) 1.4px, transparent 1.8px) 0 0 / 15px 15px,
    linear-gradient(135deg, #fff8df 0%, #fffdf9 62%);
}

.gadget-art {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 1;
}

.gadget-rays {
  position: absolute;
  inset: -8%;
  border-radius: 50%;
  background: repeating-conic-gradient(from 0deg, rgba(255, 212, 59, 0.6) 0deg 10deg, rgba(255, 212, 59, 0) 10deg 22.5deg);
  -webkit-mask: radial-gradient(closest-side, #000 50%, transparent);
  mask: radial-gradient(closest-side, #000 50%, transparent);
  animation: spin 40s linear infinite;
}

.gadget-bow {
  position: relative;
  width: 80%;
  filter: drop-shadow(0 7px 0 rgba(74, 47, 58, 0.16));
  animation: gadget-float 4s ease-in-out infinite;
}

.gadget-bow svg {
  width: 100%;
  height: auto;
  overflow: visible;
}

.gadget-spark {
  position: absolute;
  width: 20px;
  height: 20px;
  background: var(--star);
  clip-path: polygon(50% 0, 61% 39%, 100% 50%, 61% 61%, 50% 100%, 39% 61%, 0 50%, 39% 39%);
  animation: twinkle 2.4s ease-in-out infinite;
}

.gadget-spark.s1 {
  top: 8%;
  left: 10%;
}
.gadget-spark.s2 {
  top: 16%;
  right: 6%;
  width: 13px;
  height: 13px;
  background: var(--pink-deep);
  animation-delay: -0.8s;
}
.gadget-spark.s3 {
  bottom: 10%;
  left: 20%;
  width: 15px;
  height: 15px;
  background: var(--sky-deep);
  animation-delay: -1.6s;
}

.gadget-title {
  margin: 10px 0 12px;
  font-size: 34px;
  font-weight: 400;
  line-height: 1.2;
}

.gadget-title small {
  margin-left: 10px;
  font-size: 14px;
  color: var(--pink-deep);
  letter-spacing: 0.08em;
}

.gadget-quote {
  margin: 0 0 16px;
  padding: 12px 16px;
  background: #fff;
  border: var(--line) dashed var(--pink);
  border-radius: 18px;
}

.gadget-quote p {
  margin: 0;
  font-size: 19px;
}

.gadget-quote cite {
  display: block;
  font-size: 14px;
  font-style: normal;
  text-align: right;
  color: var(--ink-2);
}

.gadget-specs {
  display: grid;
  gap: 6px;
  margin: 0 0 14px;
  padding: 0;
  list-style: none;
  color: var(--ink-2);
}

.gadget-note {
  margin: 0;
  padding-top: 12px;
  border-top: 2px dotted var(--ink-3);
}

@keyframes gadget-float {
  0%,
  100% {
    transform: translateY(0) rotate(-4deg);
  }
  50% {
    transform: translateY(-10px) rotate(4deg);
  }
}

@media (max-width: 760px) {
  .gadget {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 22px 18px;
  }
  .gadget-art {
    width: 190px;
    margin: 0 auto;
  }
}

.cta {
  padding: 42px 20px;
  text-align: center;
  background: rgba(255, 255, 255, 0.55);
  border: var(--line) dashed var(--ink-3);
  border-radius: var(--r-lg);
}

.cta p {
  margin: 12px 0 22px;
  color: var(--ink-2);
}

/* ------------------------------------------------------------------ 表单 */

.input {
  width: 100%;
  padding: 12px 14px;
  font-size: 17px;
  line-height: 1.5;
  color: var(--ink);
  background: #fff;
  border: var(--line) solid var(--ink);
  border-radius: var(--r-sm);
  box-shadow: inset 0 3px 0 rgba(74, 47, 58, 0.07);
  -webkit-appearance: none;
  appearance: none;
  transition:
    box-shadow 0.2s,
    border-color 0.2s,
    background-color 0.2s;
}

.input::placeholder {
  color: var(--ink-3);
  opacity: 1;
}

.input:focus {
  outline: none;
  background: #fffefc;
  box-shadow:
    0 0 0 4px var(--pink-light),
    inset 0 3px 0 rgba(74, 47, 58, 0.05);
}

.input[aria-invalid='true'] {
  border-color: var(--pink-deep);
  box-shadow: 0 0 0 4px rgba(240, 86, 140, 0.2);
}

.input[readonly] {
  background: var(--pink-pale);
}

.textarea {
  min-height: 150px;
  resize: vertical;
  line-height: 1.75;
}

.textarea.flash {
  animation: flash 0.7s ease;
}

@keyframes flash {
  0% {
    background: var(--star-light);
  }
  100% {
    background: #fff;
  }
}

.field {
  min-width: 0;
  margin: 0 0 20px;
  padding: 0;
  border: 0;
}

.field-label {
  display: block;
  margin-bottom: 8px;
  padding: 0;
  font-size: 18px;
}

legend.field-label {
  float: left;
  width: 100%;
}

legend.field-label + * {
  clear: both;
}

.field-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 14px;
}

@media (max-width: 560px) {
  .field-row {
    grid-template-columns: 1fr;
  }
}

.field-error {
  margin: 6px 0 0;
  font-size: 14px;
  color: var(--pink-deep);
}

.field-error:empty {
  display: none;
}

.textarea-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
}

.counter {
  font-size: 14px;
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
}

.counter.over {
  color: var(--pink-deep);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.chip,
.swatch {
  position: relative;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.chip input,
.swatch input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  opacity: 0;
  pointer-events: none;
}

.chip-face {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 15px 7px 11px;
  background: #fff;
  border: var(--line) solid var(--ink);
  border-radius: 999px;
  box-shadow: var(--lift-sm);
  user-select: none;
  -webkit-user-select: none;
  transition:
    transform 0.22s var(--spring),
    background-color 0.2s,
    box-shadow 0.2s;
}

.chip:hover .chip-face {
  transform: translateY(-2px);
}

.chip input:checked + .chip-face {
  background: var(--pink-light);
  box-shadow: 0 1px 0 var(--ink);
  transform: translateY(2px);
}

.chip input:checked + .chip-face .chip-emoji {
  animation: emoji-bounce 0.55s var(--spring);
}

.chip input:focus-visible + .chip-face,
.swatch input:focus-visible + .swatch-face {
  outline: 3px dashed var(--pink-deep);
  outline-offset: 3px;
}

.chip-emoji {
  display: inline-block;
  font-size: 20px;
  line-height: 1;
}

@keyframes emoji-bounce {
  0% {
    transform: scale(1);
  }
  40% {
    transform: scale(1.45) rotate(-12deg);
  }
  100% {
    transform: scale(1);
  }
}

.swatches {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}

@media (max-width: 520px) {
  .swatches {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.swatch {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.swatch-face {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 1.12;
  padding: 8px;
  background: var(--sw-light);
  border: var(--line) solid var(--ink);
  border-radius: 18px;
  box-shadow: var(--lift-sm);
  transition:
    transform 0.25s var(--spring),
    box-shadow 0.2s;
}

.swatch-face .bow {
  width: 100%;
  max-width: 66px;
  height: auto;
  overflow: visible;
  transition: transform 0.35s var(--spring);
}

.swatch:hover .swatch-face {
  transform: translateY(-3px) rotate(-3deg);
}

.swatch input:checked + .swatch-face {
  transform: translateY(1px);
  box-shadow:
    0 0 0 3px #fff,
    0 0 0 6px var(--ink);
}

.swatch input:checked + .swatch-face .bow {
  transform: scale(1.14) rotate(-6deg);
}

.swatch input:checked + .swatch-face::after {
  content: '✓';
  position: absolute;
  top: -10px;
  right: -8px;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  font-size: 14px;
  line-height: 1;
  background: var(--star);
  border: 2px solid var(--ink);
  border-radius: 50%;
  animation: pop-in 0.4s var(--spring);
}

.swatch-name {
  font-size: 13px;
  color: var(--ink-2);
}

.swatch input:checked ~ .swatch-name {
  color: var(--ink);
}

.form-note {
  margin: 12px 0 0;
  font-size: 13px;
  text-align: center;
  color: var(--ink-2);
}

.shake {
  animation: shake 0.45s ease;
}

@keyframes shake {
  10%,
  90% {
    translate: -1px 0;
  }
  20%,
  80% {
    translate: 3px 0;
  }
  30%,
  50%,
  70% {
    translate: -6px 0;
  }
  40%,
  60% {
    translate: 6px 0;
  }
}

/* ------------------------------------------------------------------ 制作页 */

.create-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  align-items: start;
  gap: 26px;
}

.create-preview {
  position: sticky;
  top: 96px;
}

.preview-card {
  padding: 26px 20px 26px;
  background: linear-gradient(180deg, #fff6f9, var(--paper) 55%);
}

.preview-label {
  position: absolute;
  top: -15px;
  left: 20px;
  margin: 0;
  padding: 1px 12px;
  font-size: 12px;
  background: var(--star);
  border: var(--line) solid var(--ink);
  border-radius: 999px;
}

.preview-card .guide {
  margin-bottom: 34px;
}

@media (max-width: 880px) {
  .create-grid {
    grid-template-columns: 1fr;
  }
  .create-preview {
    position: static;
  }
}

/* 信纸 */

.letter {
  --ribbon: var(--pink);
  --ribbon-light: var(--pink-light);
  position: relative;
  padding: 30px 20px 20px;
  background: #fffefa;
  border: var(--line) solid var(--ink);
  border-radius: 18px;
  box-shadow: 0 5px 0 var(--ink);
  rotate: -0.8deg;
}

.letter::before {
  content: '';
  position: absolute;
  left: 10px;
  right: 10px;
  top: 10px;
  height: 8px;
  border-radius: 6px;
  background: repeating-linear-gradient(90deg, var(--ribbon-light) 0 12px, transparent 12px 20px);
}

.letter-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 4px;
}

.letter-to {
  min-width: 0;
  font-size: 19px;
  overflow-wrap: anywhere;
}

.letter-stamp {
  flex: none;
  padding: 1px 10px;
  font-size: 13px;
  color: var(--pink-deep);
  background: #fff;
  border: 2px dashed var(--pink-deep);
  border-radius: 999px;
  rotate: 5deg;
}

.letter-body {
  margin: 0;
  font-size: 17px;
  line-height: 35px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  background: repeating-linear-gradient(to bottom, transparent 0 33px, rgba(240, 86, 140, 0.2) 33px 35px);
}

.letter-body.is-placeholder {
  color: var(--ink-3);
}

.letter-sign {
  margin: 8px 0 0;
  font-size: 17px;
  text-align: right;
  overflow-wrap: anywhere;
}

.letter-bow {
  position: absolute;
  top: -30px;
  left: 50%;
  width: 78px;
  margin-left: -39px;
  filter: drop-shadow(0 3px 0 rgba(74, 47, 58, 0.16));
}

.letter-bow svg {
  width: 100%;
  height: auto;
  overflow: visible;
}

.letter-bow.pop svg {
  animation: pop-in 0.5s var(--spring);
}

.letter.send-away {
  animation: send-away 0.72s var(--out) forwards;
}

@keyframes send-away {
  0% {
    transform: none;
  }
  25% {
    transform: translateY(10px) scale(0.95);
  }
  100% {
    transform: translate(40vw, -70vh) rotate(28deg) scale(0.3);
    opacity: 0;
  }
}

/* ------------------------------------------------------------------ 我的缎带 */

.mine-body {
  margin-top: 22px;
}

.mine-section + .mine-section {
  margin-top: 32px;
}

.mine-title {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 0 0 12px;
  font-size: 23px;
  font-weight: 400;
}

.mine-title small {
  font-size: 12px;
  color: var(--pink-deep);
  letter-spacing: 0.1em;
}

.mine-count {
  margin-left: auto;
  padding: 0 10px;
  font-size: 14px;
  color: var(--ink-2);
  background: #fff;
  border: 2px solid var(--ink);
  border-radius: 999px;
}

.ri-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ri {
  display: flex;
  align-items: center;
  gap: 8px;
  transition:
    opacity 0.28s,
    transform 0.28s var(--out);
}

.ri-leaving {
  opacity: 0;
  transform: translateX(40px) scale(0.96);
}

.ri-link {
  display: flex;
  flex: 1;
  align-items: center;
  gap: 14px;
  min-width: 0;
  padding: 12px 16px 12px 12px;
  color: inherit;
  text-decoration: none;
  background: #fff;
  border: var(--line) solid var(--ink);
  border-radius: var(--r);
  box-shadow: var(--lift);
  transition:
    transform 0.2s var(--spring),
    box-shadow 0.2s;
}

.ri-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 7px 0 var(--ink);
}

.ri-link:active {
  transform: translateY(3px);
  box-shadow: 0 2px 0 var(--ink);
}

.ri-bow {
  flex: none;
  width: 56px;
  transition: transform 0.35s var(--spring);
}

.ri-bow svg {
  width: 100%;
  height: auto;
  overflow: visible;
}

.ri-link:hover .ri-bow {
  transform: rotate(-12deg) scale(1.08);
}

.ri-main {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
}

.ri-title {
  overflow: hidden;
  font-size: 19px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.ri-sub {
  font-size: 14px;
  color: var(--ink-2);
}

/* 窄屏换行时让「2 分钟前」整体换到下一行，不要拆开 */
.ri-time {
  white-space: nowrap;
}

.ri-dot {
  width: 9px;
  height: 9px;
  background: var(--pink-deep);
  border-radius: 50%;
  animation: pulse-pink 1.4s ease-out infinite;
}

.ri-gone .ri-link {
  background: #f8f2f4;
}

.ri-gone .ri-bow {
  filter: grayscale(1);
  opacity: 0.55;
}

@media (max-width: 480px) {
  .ri-link {
    gap: 10px;
    padding: 10px 12px 10px 10px;
  }
  .ri-bow {
    width: 44px;
  }
  .ri-link .badge {
    padding: 0 8px;
    font-size: 12px;
  }
}

.empty {
  padding: 30px 20px;
  text-align: center;
}

.empty-bow {
  width: 120px;
  margin: 0 auto 6px;
  animation: bow-sway 3s ease-in-out infinite;
}

.empty-bow svg {
  width: 100%;
  height: auto;
}

.empty p {
  margin: 0 0 16px;
  font-size: 19px;
}

@keyframes pulse-pink {
  0% {
    box-shadow: 0 0 0 0 rgba(240, 86, 140, 0.55);
  }
  100% {
    box-shadow: 0 0 0 8px rgba(240, 86, 140, 0);
  }
}

@keyframes pulse-green {
  0% {
    box-shadow: 0 0 0 0 rgba(95, 211, 154, 0.6);
  }
  100% {
    box-shadow: 0 0 0 8px rgba(95, 211, 154, 0);
  }
}

/* ------------------------------------------------------------------ 找不到页面 */

.notfound {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 26px 0;
  text-align: center;
}

.notfound .bubble {
  margin-bottom: 6px;
}

.notfound-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 20px;
}

/* ------------------------------------------------------------------ 提示、对话框 */

.toasts {
  position: fixed;
  z-index: 100;
  top: calc(14px + env(safe-area-inset-top));
  left: 50%;
  translate: -50% 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: max-content;
  max-width: calc(100vw - 32px);
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  font-size: 16px;
  background: #fff;
  border: var(--line) solid var(--ink);
  border-radius: 999px;
  box-shadow: 0 4px 0 var(--ink);
  opacity: 0;
  transform: translateY(-22px) scale(0.9);
  transition:
    opacity 0.3s,
    transform 0.5s var(--spring);
}

.toast.show {
  opacity: 1;
  transform: none;
}

.toast.hide {
  opacity: 0;
  transform: translateY(-14px) scale(0.95);
  transition-duration: 0.3s;
}

.toast-success {
  background: var(--mint-light);
}
.toast-error {
  background: #ffe1e8;
}
.toast-love {
  background: var(--pink-light);
}
.toast-star {
  background: var(--star-light);
}

.toast-icon .icon {
  width: 20px;
  height: 20px;
}

.dialog-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 20px var(--gutter);
  background: rgba(74, 47, 58, 0.36);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
  opacity: 0;
  transition: opacity 0.25s;
}

.dialog-backdrop.open {
  opacity: 1;
}

.dialog-backdrop.closing {
  opacity: 0;
}

.dialog {
  position: relative;
  width: min(450px, 100%);
  max-height: calc(100dvh - 40px);
  overflow: auto;
  padding: 26px 22px 22px;
  background: var(--paper);
  border: var(--line) solid var(--ink);
  border-radius: var(--r-lg);
  box-shadow: 0 8px 0 var(--ink);
  transform: translateY(26px) scale(0.9);
  transition: transform 0.45s var(--spring);
}

.dialog-backdrop.open .dialog {
  transform: none;
}

.dialog-backdrop.closing .dialog {
  transform: translateY(14px) scale(0.96);
  transition-duration: 0.2s;
}

.dialog-title {
  margin: 0 0 8px;
  padding-right: 36px;
  font-size: 24px;
  font-weight: 400;
  line-height: 1.3;
}

.dialog-text {
  margin: 0;
  color: var(--ink-2);
}

.dialog-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}

.dialog-actions .btn {
  min-height: 46px;
  font-size: 17px;
}

.dialog-close {
  position: absolute;
  top: 12px;
  right: 12px;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  color: var(--ink);
  background: #fff;
  border: 2px solid var(--ink);
  border-radius: 50%;
  cursor: pointer;
  transition:
    transform 0.25s var(--spring),
    background-color 0.2s;
}

.dialog-close:hover {
  transform: rotate(90deg);
  background: var(--pink-light);
}

.dialog-close svg {
  width: 18px;
  height: 18px;
}

.dialog-art {
  display: grid;
  place-items: center;
  margin: -4px 0 8px;
}

.dialog .field {
  margin: 14px 0 0;
}

.dialog .textarea {
  min-height: 110px;
}

.dialog-wide {
  width: min(560px, 100%);
}

/* ------------------------------------------------------------------ 缎带页 */

.ribbon-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin-top: 8px;
}

.live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--ink-2);
}

.live::before {
  content: '';
  width: 9px;
  height: 9px;
  background: var(--online);
  border: 2px solid var(--ink);
  border-radius: 50%;
}

.live[data-state='reconnecting']::before {
  background: var(--star);
  animation: blink 1s steps(2) infinite;
}

.live[data-state='polling']::before {
  background: var(--sky-deep);
}

.live[data-state='connecting']::before {
  background: var(--star);
  animation: blink 1s steps(2) infinite;
}

@keyframes blink {
  50% {
    opacity: 0.2;
  }
}

.ribbon-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  align-items: start;
  gap: 24px;
}

.ribbon-main,
.ribbon-side {
  display: grid;
  gap: 24px;
  min-width: 0;
}

@media (max-width: 920px) {
  .ribbon-grid {
    grid-template-columns: 1fr;
  }
}

.ribbon-guide .bubble {
  font-size: 17px;
}

/* 舞台：两只手和一条缎带 */

.stage-card {
  padding: 0;
  overflow: hidden;
}

.stage {
  position: relative;
  height: clamp(240px, 36vw, 320px);
  overflow: hidden;
  background:
    radial-gradient(circle, rgba(74, 47, 58, 0.07) 1.2px, transparent 1.6px) 0 0 / 14px 14px,
    linear-gradient(180deg, #e2f3ff 0%, #fff4f8 100%);
  border-bottom: var(--line) solid var(--ink);
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
}

.stage.can-grab {
  cursor: grab;
}

.stage.grabbing {
  cursor: grabbing;
}

.stage-canvas {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.stage-hand {
  position: absolute;
  z-index: 3;
  top: 0;
  left: 0;
  pointer-events: none;
  will-change: transform;
}

.stage-hand svg {
  width: 100%;
  height: auto;
}

.stage-hand::before {
  content: '';
  position: absolute;
  z-index: -1;
  left: var(--ax);
  top: var(--ay);
  width: 110px;
  height: 110px;
  margin: -55px 0 0 -55px;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255, 212, 59, 0.9), rgba(255, 212, 59, 0));
  opacity: 0;
  transform: scale(0.4);
  transition:
    opacity 0.3s,
    transform 0.4s var(--spring);
}

.stage-hand.holding::before {
  opacity: 1;
  transform: scale(1);
  animation: glow-pulse 0.9s ease-in-out infinite alternate;
}

.stage-hand .hand-band {
  transform-box: fill-box;
  transform-origin: center;
  transition:
    transform 0.45s var(--spring),
    opacity 0.2s;
}

.stage-hand.unbanded .hand-band {
  transform: scale(0);
  opacity: 0;
}

@keyframes glow-pulse {
  from {
    transform: scale(0.85);
  }
  to {
    transform: scale(1.12);
  }
}

.stage-bow {
  position: absolute;
  z-index: 4;
  top: 0;
  left: 0;
  width: var(--bw, 76px);
  pointer-events: none;
  will-change: transform;
}

.stage-bow svg {
  width: 100%;
  height: auto;
  overflow: visible;
  filter: drop-shadow(0 3px 0 rgba(74, 47, 58, 0.2));
}

.stage-tag {
  position: absolute;
  z-index: 5;
  bottom: 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 46%;
  padding: 2px 12px 2px 8px;
  font-size: 14px;
  background: #fff;
  border: 2px solid var(--ink);
  border-radius: 999px;
  box-shadow: 0 2px 0 var(--ink);
}

.stage-tag-a {
  left: 10px;
}

.stage-tag-b {
  right: 10px;
}

.stage-tag .name {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.stage-tag .state {
  flex: none;
  font-size: 12px;
  color: var(--ink-2);
}

.stage-tag .state:empty {
  display: none;
}

.stage-tag .dot {
  flex: none;
  width: 10px;
  height: 10px;
  background: #ddd0d6;
  border: 2px solid var(--ink);
  border-radius: 50%;
  transition: background-color 0.3s;
}

.stage-tag.online .dot {
  background: var(--online);
  animation: pulse-green 1.6s ease-out infinite;
}

.stage-ping {
  position: absolute;
  z-index: 6;
  top: 16%;
  padding: 3px 12px;
  font-size: 14px;
  white-space: nowrap;
  background: var(--star);
  border: 2px solid var(--ink);
  border-radius: 14px;
  box-shadow: 0 3px 0 var(--ink);
  opacity: 0;
  transform: translateY(10px) scale(0.6);
  transition:
    opacity 0.2s,
    transform 0.4s var(--spring);
  pointer-events: none;
}

.stage-ping-a {
  left: 12px;
}

.stage-ping-b {
  right: 12px;
}

.stage-ping.show {
  opacity: 1;
  transform: none;
}

.stage-hint {
  position: absolute;
  z-index: 5;
  top: 10px;
  left: 50%;
  translate: -50% 0;
  max-width: calc(100% - 20px);
  margin: 0;
  padding: 1px 12px;
  overflow: hidden;
  font-size: 13px;
  color: var(--ink-2);
  white-space: nowrap;
  text-overflow: ellipsis;
  background: rgba(255, 255, 255, 0.82);
  border-radius: 999px;
  pointer-events: none;
  transition: opacity 0.3s;
}

.stage-hint:empty {
  opacity: 0;
}

.stage-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 20px 18px 22px;
  background: var(--paper);
}

.stage-actions-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.stage-actions .field {
  width: 100%;
  margin: 0;
}

.stage-actions .textarea {
  min-height: 92px;
}

.stage-note {
  margin: 0;
  font-size: 14px;
  text-align: center;
  color: var(--ink-2);
}

/* 长按握住缎带的大按钮 */

.hold-btn {
  --p: 0;
  position: relative;
  display: grid;
  place-items: center;
  width: 150px;
  height: 150px;
  padding: 0;
  color: var(--ink);
  background: none;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

.hold-btn::before {
  content: '';
  position: absolute;
  inset: 16px;
  border: 3px solid var(--pink);
  border-radius: 50%;
  animation: halo 2s ease-out infinite;
}

.hold-btn.pressing::before,
.hold-btn.done::before {
  animation: none;
  opacity: 0;
}

.hold-ring {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  transform: rotate(-90deg);
}

.hold-ring circle {
  fill: none;
}

.ring-ink {
  stroke: var(--ink);
  stroke-width: 17;
}

.ring-bg {
  stroke: #fff;
  stroke-width: 11;
}

.ring-fg {
  stroke: var(--pink-deep);
  stroke-width: 11;
  stroke-linecap: round;
  stroke-dasharray: 1 1;
  stroke-dashoffset: calc(1 - var(--p));
  opacity: clamp(0, calc(var(--p) * 40), 1);
}

.hold-btn:not(.pressing) .ring-fg {
  transition:
    stroke-dashoffset 0.4s var(--out),
    opacity 0.4s;
}

.hold-face {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  width: 112px;
  height: 112px;
  background: var(--pink);
  border: var(--line) solid var(--ink);
  border-radius: 50%;
  box-shadow: var(--lift);
  transition:
    transform 0.2s var(--spring),
    box-shadow 0.2s,
    background-color 0.25s;
}

.hold-face .icon {
  width: 40px;
  height: 40px;
}

.hold-face span {
  font-size: 15px;
  line-height: 1.2;
}

.hold-btn:hover .hold-face {
  transform: translateY(-2px);
}

.hold-btn.pressing .hold-face {
  background: #ff86a8;
  box-shadow: 0 1px 0 var(--ink);
  transform: translateY(4px) scale(calc(0.96 + var(--p) * 0.06));
}

.hold-btn.pressing .hold-face .icon {
  animation: hold-tremble 0.12s linear infinite;
}

.hold-btn.done .hold-face {
  background: var(--star);
}

.hold-btn:disabled {
  cursor: default;
  opacity: 0.6;
}

@keyframes halo {
  0% {
    transform: scale(1);
    opacity: 0.85;
  }
  100% {
    transform: scale(1.32);
    opacity: 0;
  }
}

@keyframes hold-tremble {
  0%,
  100% {
    transform: translate(0, 0);
  }
  25% {
    transform: translate(-1px, 1px);
  }
  75% {
    transform: translate(1px, -1px);
  }
}

/* 主人那边的“握紧缎带”按钮 */

.grip-btn {
  touch-action: none;
  -webkit-touch-callout: none;
}

.grip-btn.gripping {
  --btn-bg: var(--star);
  transform: translateY(4px);
  box-shadow:
    0 1px 0 var(--ink),
    0 0 0 6px rgba(255, 212, 59, 0.45);
}

/* 分享 */

.share-link {
  display: flex;
  gap: 8px;
}

.share-link .input {
  min-width: 0;
  font-size: 15px;
  text-overflow: ellipsis;
}

.share-link .btn {
  flex: none;
}

.share-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.qr-box {
  display: grid;
  place-items: center;
  margin-top: 16px;
  padding: 18px;
  text-align: center;
  background: #fff;
  border: var(--line) dashed var(--ink-3);
  border-radius: 20px;
  animation: pop-in 0.45s var(--spring);
}

.qr-box svg {
  width: min(240px, 100%);
  height: auto;
}

.qr-box p {
  margin: 10px 0 0;
  font-size: 14px;
  color: var(--ink-2);
}

/* 时间线 */

.timeline {
  position: relative;
  margin: 0;
  padding: 0;
  list-style: none;
}

.timeline::before {
  content: '';
  position: absolute;
  top: 18px;
  bottom: 18px;
  left: 16px;
  border-left: 3px dotted var(--ink-3);
}

.tl {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 7px 0;
}

.tl-dot {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  flex: none;
  width: 35px;
  height: 35px;
  font-size: 16px;
  background: #fff;
  border: var(--line) solid var(--ink);
  border-radius: 50%;
}

.tl.done .tl-dot {
  background: var(--mint-light);
}

.tl.current .tl-dot {
  background: var(--star);
  animation: pop-in 0.5s var(--spring);
}

.tl.todo {
  opacity: 0.5;
}

.tl-body {
  min-width: 0;
  padding-top: 4px;
}

.tl-title {
  display: block;
  font-size: 17px;
  line-height: 1.4;
}

.tl-time {
  font-size: 13px;
  color: var(--ink-2);
}

.tl-note {
  margin: 6px 0 0;
  padding: 8px 12px;
  font-size: 15px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  background: var(--lavender-light);
  border: 2px solid var(--ink);
  border-radius: 12px;
}

.manage-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.expire-note {
  margin: 12px 0 0;
  font-size: 13px;
  color: var(--ink-2);
}

/* 和好之后 */

.tied-banner {
  overflow: hidden;
  padding: 28px 18px 24px;
  text-align: center;
  background: linear-gradient(180deg, #fff0f5, var(--paper));
}

.tied-banner::before {
  content: '';
  position: absolute;
  left: 50%;
  bottom: -60%;
  width: 180%;
  aspect-ratio: 1;
  translate: -50% 0;
  border-radius: 50%;
  background: repeating-conic-gradient(from 0deg, rgba(255, 152, 180, 0.2) 0deg 8deg, rgba(255, 152, 180, 0) 8deg 18deg);
  animation: spin 60s linear infinite;
  pointer-events: none;
}

.tied-banner > * {
  position: relative;
}

.tied-title {
  margin: 0;
  font-size: clamp(46px, 9vw, 72px);
  font-weight: 400;
  line-height: 1.15;
  color: var(--pink);
  text-shadow: var(--outline-strong);
}

.tied-title .kana {
  display: block;
  margin-top: 6px;
  font-size: 16px;
  color: var(--pink-deep);
  text-shadow: none;
  letter-spacing: 0.1em;
}

.tied-names {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 4px 10px;
  margin: 14px 0 4px;
  font-size: 21px;
}

.tied-names .bow {
  width: 46px;
  height: auto;
  animation: bow-sway 2.6s ease-in-out infinite;
}

.tied-date {
  margin: 0;
  font-size: 14px;
  color: var(--ink-2);
}

.together-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  padding: 3px 14px;
  font-size: 15px;
  background: var(--star);
  border: 2px solid var(--ink);
  border-radius: 999px;
  box-shadow: 0 3px 0 var(--ink);
  animation: wobble 2.4s ease-in-out infinite;
}

@keyframes wobble {
  0%,
  100% {
    rotate: -2deg;
  }
  50% {
    rotate: 2deg;
  }
}

.chat {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.chat-msg {
  max-width: 90%;
}

.chat-msg-a {
  align-self: flex-start;
}

.chat-msg-b {
  align-self: flex-end;
}

.chat-who {
  margin: 0 8px 4px;
  font-size: 13px;
  color: var(--ink-2);
}

.chat-msg-b .chat-who {
  text-align: right;
}

.chat-bubble {
  padding: 12px 16px;
  line-height: 1.7;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  background: #fff;
  border: var(--line) solid var(--ink);
  border-radius: 20px 20px 20px 6px;
  box-shadow: 0 4px 0 var(--ink);
}

.chat-msg-b .chat-bubble {
  background: var(--pink-light);
  border-radius: 20px 20px 6px 20px;
}

.chat-empty {
  margin: 0;
  font-size: 14px;
  color: var(--ink-3);
  text-align: right;
}

.gone-card {
  max-width: 560px;
  margin: 6vh auto 0;
  text-align: center;
}

.gone-card .takopi {
  margin: 0 auto 8px;
}

/* 信、回复、还需要一点时间 */

.letter-wrap {
  padding-top: 28px;
}

.reply-tip {
  font-size: 14px;
  color: var(--ink-2);
}

.think-text {
  margin: 0 0 14px;
  color: var(--ink-2);
}

.think-body .tl-note {
  margin: 0 0 14px;
}

.ribbon-cta p {
  margin: 0 0 16px;
}

/* 证明书预览 */

.cert-preview {
  display: grid;
  place-items: center;
  margin-top: 6px;
}

.cert-preview img {
  width: min(100%, 340px);
  height: auto;
  border: var(--line) solid var(--ink);
  border-radius: 14px;
  box-shadow: 0 5px 0 var(--ink);
  animation: pop-in 0.5s var(--spring);
}

/* ------------------------------------------------------------------ 信封开场 */

.envelope-overlay {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: grid;
  place-items: center;
  padding: 20px;
  overflow: hidden;
  background:
    radial-gradient(circle, rgba(240, 86, 140, 0.1) 1.4px, transparent 1.9px) 0 0 / 16px 16px,
    radial-gradient(circle at 50% 42%, #fff6f9 0%, #ffd6e1 100%);
  transition:
    opacity 0.55s ease,
    visibility 0.55s;
}

.envelope-overlay.leaving {
  opacity: 0;
  visibility: hidden;
}

.env-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
}

.env-courier {
  position: relative;
  z-index: 2;
  margin-bottom: -46px;
  animation: courier-in 1.3s var(--out) backwards;
}

.envelope-overlay.opened .env-courier {
  animation: courier-out 0.9s var(--out) forwards;
}

.envelope {
  --ew: min(330px, 84vw);
  position: relative;
  width: var(--ew);
  aspect-ratio: 3 / 2;
  padding: 0;
  border: 0;
  background: none;
  perspective: 900px;
  cursor: pointer;
  animation: env-in 1.3s var(--out) backwards 0.05s;
}

.envelope:focus-visible {
  outline-offset: 8px;
  border-radius: 16px;
}

.env-back {
  position: absolute;
  inset: 0;
  background: #ffbfd0;
  border: var(--line) solid var(--ink);
  border-radius: 14px;
}

.env-letter {
  position: absolute;
  z-index: 1;
  top: 7%;
  left: 7%;
  right: 7%;
  height: 86%;
  padding: 9% 8% 0;
  font-size: 15px;
  line-height: 1.5;
  text-align: left;
  background: #fffefa;
  border: var(--line) solid var(--ink);
  border-radius: 10px;
  transition: transform 0.75s var(--spring) 0.32s;
}

.env-letter .line {
  height: 8px;
  margin: 10px 0;
  background: var(--pink-light);
  border-radius: 4px;
}

.env-letter .line:last-child {
  width: 70%;
}

.envelope.open .env-letter {
  transform: translateY(-56%);
}

.env-pocket {
  position: absolute;
  inset: 0;
  z-index: 2;
}

.env-pocket svg,
.env-flap svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.env-flap {
  position: absolute;
  z-index: 3;
  top: 0;
  left: 0;
  right: 0;
  height: 62%;
  transform-origin: 50% 0;
  transition:
    transform 0.55s var(--out),
    z-index 0s linear 0.22s;
}

.envelope.open .env-flap {
  z-index: 0;
  transform: rotateX(180deg);
}

.env-seal {
  position: absolute;
  z-index: 4;
  top: 57%;
  left: 50%;
  width: 34%;
  translate: -50% -50%;
  pointer-events: none;
  animation: seal-beat 1.5s ease-in-out infinite;
  transition:
    transform 0.4s var(--spring),
    opacity 0.3s;
}

.env-seal svg {
  width: 100%;
  height: auto;
  overflow: visible;
  filter: drop-shadow(0 3px 0 rgba(74, 47, 58, 0.2));
}

.envelope.open .env-seal {
  opacity: 0;
  transform: scale(1.7) rotate(24deg);
  animation: none;
}

.env-caption {
  position: relative;
  z-index: 2;
  margin-top: 26px;
  animation: rise-in 0.6s var(--out) backwards 1s;
}

.env-caption h2 {
  margin: 0;
  font-size: clamp(22px, 5vw, 28px);
  font-weight: 400;
  line-height: 1.35;
}

.env-caption p {
  margin: 6px 0 0;
  color: var(--ink-2);
}

.env-tap {
  display: inline-block;
  margin-top: 14px;
  padding: 4px 16px;
  font-size: 15px;
  background: #fff;
  border: 2px solid var(--ink);
  border-radius: 999px;
  box-shadow: 0 3px 0 var(--ink);
  animation: tap-hint 1.4s ease-in-out infinite;
}

.envelope-overlay.opened .env-caption {
  opacity: 0;
  transition: opacity 0.3s;
}

@keyframes courier-in {
  from {
    transform: translate(-70vw, -40vh) rotate(-24deg) scale(0.7);
  }
  to {
    transform: none;
  }
}

@keyframes courier-out {
  to {
    transform: translate(70vw, -50vh) rotate(18deg) scale(0.7);
  }
}

@keyframes env-in {
  0% {
    transform: translate(-70vw, -36vh) rotate(-28deg) scale(0.6);
  }
  72% {
    transform: translate(0, 0) rotate(4deg) scale(1.03);
  }
  100% {
    transform: none;
  }
}

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

@keyframes tap-hint {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-5px);
  }
}

/* ------------------------------------------------------------------ 和好庆祝 */

.celebrate {
  position: fixed;
  inset: 0;
  z-index: 75;
  display: grid;
  place-items: center;
  padding: 20px;
  overflow: hidden;
  background: rgba(255, 233, 240, 0.9);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity 0.35s;
}

.celebrate.open {
  opacity: 1;
}

.celebrate.closing {
  opacity: 0;
}

.celebrate-rays {
  position: absolute;
  top: 42%;
  left: 50%;
  width: 220vmax;
  height: 220vmax;
  margin: -110vmax 0 0 -110vmax;
  background: repeating-conic-gradient(from 0deg, rgba(255, 212, 59, 0.38) 0deg 8deg, rgba(255, 212, 59, 0) 8deg 20deg);
  -webkit-mask: radial-gradient(circle, #000 0%, transparent 45%);
  mask: radial-gradient(circle, #000 0%, transparent 45%);
  animation: spin 28s linear infinite;
}

.celebrate-body {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 560px;
  text-align: center;
  opacity: 0;
  transform: scale(0.7);
  transition:
    transform 0.65s var(--spring),
    opacity 0.3s;
}

.celebrate.open .celebrate-body {
  opacity: 1;
  transform: none;
}

.celebrate-title {
  display: flex;
  gap: 0.02em;
  margin: 4px 0 0;
  font-size: clamp(66px, 17vw, 124px);
  font-weight: 400;
  line-height: 1;
}

.celebrate-title span {
  display: inline-block;
  text-shadow: var(--outline-strong);
  animation: letter-drop 0.75s var(--spring) backwards;
  animation-delay: calc(0.25s + var(--c) * 0.12s);
}

.celebrate-title span:nth-child(1) {
  color: var(--pink);
}
.celebrate-title span:nth-child(2) {
  color: var(--star);
}
.celebrate-title span:nth-child(3) {
  color: #9fd6ff;
}
.celebrate-title span:nth-child(4) {
  color: var(--pink);
}

.celebrate-kana {
  margin: 12px 0 0;
  font-family: var(--font-kana);
  font-size: 20px;
  color: var(--pink-deep);
  animation: rise-in 0.6s var(--out) backwards 0.85s;
}

.celebrate-names {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 4px 10px;
  margin: 10px 0 0;
  font-size: 22px;
  animation: rise-in 0.6s var(--out) backwards 1s;
}

.celebrate-names .bow {
  width: 48px;
  height: auto;
}

.celebrate-together {
  margin-top: 14px;
  animation: pop-in 0.6s var(--spring) backwards 1.3s;
}

.celebrate-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 24px;
  animation: rise-in 0.6s var(--out) backwards 1.15s;
}

@keyframes letter-drop {
  0% {
    opacity: 0;
    transform: translateY(-140px) scale(0.3) rotate(-24deg);
  }
  60% {
    opacity: 1;
    transform: translateY(8px) scale(1.16) rotate(6deg);
  }
  100% {
    transform: none;
  }
}

@keyframes boot-bounce {
  from {
    transform: translateY(0) scale(1.06, 0.94);
  }
  to {
    transform: translateY(-16px) scale(0.97, 1.03);
  }
}

/* ------------------------------------------------------------------ 减少动态效果 */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-delay: 0ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
    transition-delay: 0ms !important;
    scroll-behavior: auto !important;
  }
  .sky-cloud,
  .sky-star,
  .sky-planet,
  .btn-shine::after {
    animation: none !important;
  }
}
