/* 999 朵玫瑰花束页 —— 外壳样式（画面由 Canvas 绘制） */

:root {
  color-scheme: light;
  --ink: #5a2440;
}

@font-face {
  font-family: "Rose Script";
  src: url("../assets/fonts/great-vibes-latin.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #fbe4ee;
  overscroll-behavior: none;
}

body {
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC",
    system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
}

#bouquet {
  position: fixed;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  touch-action: manipulation;
}

.vignette {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(
    ellipse at 50% 46%,
    rgba(120, 45, 80, 0) 42%,
    rgba(120, 45, 80, 0.06) 74%,
    rgba(110, 40, 70, 0.16) 100%
  );
}

/* ---------- 顶部标题 ---------- */

.bq-head {
  position: fixed;
  top: max(16px, env(safe-area-inset-top));
  left: 0;
  right: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  pointer-events: none;
  padding: 8px 20px 0;
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 1.4s ease 0.5s, transform 1.4s ease 0.5s;
}

.is-ready .bq-head {
  opacity: 1;
  transform: none;
}

.bq-back {
  position: absolute;
  left: max(18px, env(safe-area-inset-left));
  top: 2px;
  pointer-events: auto;
  font-size: 12px;
  letter-spacing: 0.1em;
  color: rgba(122, 48, 82, 0.78);
  text-decoration: none;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: background 0.25s ease, color 0.25s ease;
}

.bq-back:hover,
.bq-back:focus-visible {
  background: rgba(255, 255, 255, 0.68);
  color: #7a3052;
  outline: none;
}

.bq-script {
  margin: 0;
  font-family: "Rose Script", "Snell Roundhand", "Apple Chancery", "Segoe Script", cursive;
  font-size: 46px;
  line-height: 1.1;
  letter-spacing: 0.02em;
  color: #c93a67;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.7), 0 6px 24px rgba(200, 90, 130, 0.28);
}

.bq-script .signature-cn {
  font-family: "Songti SC", "STSong", "SimSun", "Noto Serif SC", serif;
  font-size: 0.62em;
  color: #a52a52;
  letter-spacing: 0.06em;
}

.bq-sub {
  margin: 2px 0 0;
  font-size: 12px;
  letter-spacing: 0.3em;
  color: rgba(140, 62, 95, 0.82);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.6);
}

/* ---------- 底部按钮 ---------- */

.bq-ui {
  position: fixed;
  left: 0;
  right: 0;
  bottom: max(22px, env(safe-area-inset-bottom));
  z-index: 2;
  display: flex;
  justify-content: center;
  pointer-events: none;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 1.4s ease 1s, transform 1.4s ease 1s;
}

.is-ready .bq-ui {
  opacity: 1;
  transform: none;
}

.bq-btn {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 24px 11px;
  font-family: "Songti SC", "STSong", "SimSun", "Noto Serif SC", "Source Han Serif SC", serif;
  font-size: 13.5px;
  letter-spacing: 0.24em;
  color: #fff;
  background: linear-gradient(135deg, #ffb2ca 0%, #e8577f 52%, #c03460 100%);
  border: 1px solid rgba(255, 230, 238, 0.78);
  border-radius: 999px;
  cursor: pointer;
  box-shadow:
    0 8px 24px rgba(178, 42, 88, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.55),
    0 0 0 4px rgba(255, 255, 255, 0.12);
  transition: transform 0.28s ease, filter 0.28s ease, box-shadow 0.28s ease;
}

.bq-btn:hover,
.bq-btn:focus-visible {
  transform: translateY(-2px);
  filter: brightness(1.05);
  box-shadow: 0 10px 28px rgba(180, 40, 86, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.4);
  outline: none;
}

.bq-btn:active {
  transform: translateY(0) scale(0.985);
}

.bq-btn-ico {
  font-size: 15px;
  line-height: 1;
}

/* ---------- 首屏薄纱 ---------- */

.veil {
  position: fixed;
  inset: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, #fff6f9 0%, #fbe4ee 55%, #f3cde0 100%);
  transition: opacity 1s ease;
  pointer-events: none;
}

.is-ready .veil {
  opacity: 0;
}

.veil-text {
  font-size: 12px;
  letter-spacing: 0.32em;
  color: rgba(170, 90, 125, 0.85);
  animation: breathe 2.4s ease-in-out infinite;
}

@keyframes breathe {
  0%,
  100% {
    opacity: 0.5;
  }
  50% {
    opacity: 1;
  }
}

/* ---------- 移动端 ---------- */

@media (max-width: 640px) {
  .bq-head {
    padding-top: 4px;
  }

  .bq-back {
    position: static;
    align-self: flex-start;
    margin: 0 0 8px 2px;
    font-size: 11px;
    padding: 9px 12px;
  }

  .bq-script {
    font-size: 34px;
  }

  .bq-sub {
    font-size: 10.5px;
    letter-spacing: 0.22em;
  }

  .bq-btn {
    min-height: 44px;
    padding: 0 20px;
    font-size: 12px;
  }

  .veil-text {
    font-size: 11px;
    letter-spacing: 0.26em;
  }
}

@media (max-height: 520px) {
  .bq-head {
    top: max(10px, env(safe-area-inset-top));
    flex-direction: row;
    justify-content: center;
    align-items: baseline;
    gap: 10px;
    padding-top: 4px;
  }

  .bq-script {
    font-size: 26px;
  }

  .bq-sub {
    font-size: 10px;
    letter-spacing: 0.14em;
  }

  .bq-back {
    font-size: 10px;
    padding: 6px 10px;
  }

  .bq-ui {
    bottom: max(10px, env(safe-area-inset-bottom));
  }

  .bq-btn {
    min-height: 36px;
    padding: 0 16px;
    font-size: 11px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .veil-text {
    animation: none;
  }
}
