/* ============================================================
   樱岛麻衣 12.02 生日特别页 · Midnight Rose-Gold & December Snow
   Hardened against Alook/mobile night-mode transparency issues
   ============================================================ */

:root {
  color-scheme: dark;
  color-scheme: only dark;
  --bday-deep: #091224;
  --bday-navy: #101d38;
  --bday-card: #132240;
  --bday-rose: #f09bb6;
  --bday-rose-soft: #f7c7d8;
  --bday-gold: #f0be88;
  --bday-sky: #92c8f7;
  --bday-white: #f8fbff;
  --font-serif: "Noto Serif SC", "Shippori Mincho", "Songti SC", Georgia, serif;
  --font-sans: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --font-display: "Cormorant Garamond", "Shippori Mincho", Georgia, serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, monospace;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  scroll-behavior: smooth;
  background-color: #091224 !important;
  color: var(--bday-white);
  font-family: var(--font-sans);
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}

body {
  background-color: #091224 !important;
  color: var(--bday-white);
  line-height: 1.75;
  overflow-x: clip;
  position: relative;
}

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

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

/* Scroll Progress & Ambient Canvas */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2.5px;
  width: 0%;
  z-index: 120;
  background: linear-gradient(90deg, var(--bday-rose), var(--bday-gold), var(--bday-sky));
}

#bday-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 5;
  pointer-events: none;
  opacity: 0.92;
  background: transparent !important;
  background-color: transparent !important;
}

/* Sticky Nav */
.bday-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.95rem clamp(1.1rem, 4vw, 3rem);
  border-bottom: 1px solid transparent;
  transition: background-color 0.35s ease, border-color 0.35s ease;
}

#bday-nav.bday-nav.is-scrolled,
.bday-nav.is-scrolled {
  background-color: rgba(10, 19, 38, 0.9) !important;
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border-bottom-color: rgba(240, 155, 182, 0.18);
}

.bday-back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  color: #fff;
  padding: 0.38rem 0.85rem 0.38rem 0.65rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(14, 26, 52, 0.65);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  transition: border-color 0.25s ease, background 0.25s ease;
}

.bday-back-link:hover {
  border-color: var(--bday-rose);
  background: rgba(240, 155, 182, 0.16);
}

.bday-back-text {
  display: flex;
  flex-direction: column;
  line-height: 1.18;
}

.bday-back-cn {
  font-family: var(--font-serif);
  font-size: 0.86rem;
  font-weight: 600;
  letter-spacing: 0.08em;
}

.bday-back-sub {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.15em;
  color: var(--bday-rose-soft);
}

.bday-nav-links {
  display: flex;
  align-items: center;
  gap: 1.6rem;
  list-style: none;
}

.bday-nav-links a {
  text-decoration: none;
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  color: rgba(240, 245, 255, 0.82);
  transition: color 0.25s ease;
}

.bday-nav-links a:hover {
  color: var(--bday-rose-soft);
}

.bday-nav-actions {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.music-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.46rem 0.95rem;
  border-radius: 999px;
  border: 1px solid rgba(240, 155, 182, 0.35);
  background: rgba(18, 30, 58, 0.65);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: all 0.25s ease;
}

.music-pill.is-on {
  background: rgba(240, 155, 182, 0.24);
  border-color: var(--bday-rose);
  color: #fff;
  box-shadow: 0 0 18px rgba(240, 155, 182, 0.32);
}

.nav-menu-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(14, 26, 52, 0.7);
  color: #fff;
  cursor: pointer;
}

#bday-drawer.bday-drawer,
.bday-drawer {
  position: fixed;
  top: var(--nav-height, 68px);
  right: 1.1rem;
  z-index: 95;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 220px;
  max-height: calc(100vh - var(--nav-height, 68px) - 16px);
  overflow-y: auto;
  padding: 0.85rem;
  border-radius: 18px;
  background-color: rgba(12, 22, 44, 0.96) !important;
  border: 1px solid rgba(240, 155, 182, 0.28);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  box-shadow: 0 22px 50px rgba(3, 8, 20, 0.62);
}

#bday-drawer[hidden] {
  display: none;
}

.bday-drawer a {
  text-decoration: none;
  padding: 0.56rem 0.9rem;
  border-radius: 10px;
  font-size: 0.86rem;
  color: rgba(240, 246, 255, 0.9);
}

.bday-drawer a:hover {
  background: rgba(240, 155, 182, 0.18);
  color: #fff;
}

.bday-drawer .drawer-home {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: 0.25rem;
  padding-top: 0.7rem;
  color: var(--bday-gold);
}

/* Buttons */
.btn-rose {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.9rem 1.85rem;
  border-radius: 999px;
  border: 1px solid rgba(247, 199, 216, 0.55);
  background: linear-gradient(135deg, rgba(196, 84, 126, 0.96), rgba(194, 120, 68, 0.94));
  color: #fff;
  text-decoration: none;
  font-weight: 500;
  letter-spacing: 0.07em;
  cursor: pointer;
  text-shadow: 0 1px 3px rgba(24, 8, 18, 0.35);
  box-shadow: 0 12px 34px rgba(196, 84, 126, 0.36);
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out);
}

.btn-rose:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 42px rgba(226, 125, 160, 0.48);
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.88rem 1.65rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(14, 26, 52, 0.52);
  color: rgba(247, 250, 255, 0.92);
  text-decoration: none;
  letter-spacing: 0.06em;
  cursor: pointer;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  transition: all 0.28s ease;
}

.btn-outline:hover {
  border-color: var(--bday-rose-soft);
  background: rgba(240, 155, 182, 0.16);
  transform: translateY(-2px);
}

/* HERO */
.bday-hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background-color: #091224;
  padding: 6.2rem clamp(1.3rem, 6vw, 5.2rem) 4.2rem;
}

.bday-hero-bg {
  position: absolute;
  inset: -3%;
  background-color: #091224;
  pointer-events: none;
}

.bday-hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transform: scale(1.04);
  animation: gentleDrift 26s ease-in-out infinite alternate;
}

@keyframes gentleDrift {
  from { transform: scale(1.03) translate3d(0, 0, 0); }
  to { transform: scale(1.09) translate3d(-1%, -0.8%, 0); }
}

.bday-hero-scrim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(108deg, rgba(9, 17, 36, 0.86) 0%, rgba(18, 25, 52, 0.58) 52%, rgba(16, 20, 42, 0.34) 100%),
    linear-gradient(180deg, rgba(9, 17, 36, 0.42) 0%, rgba(9, 17, 36, 0.12) 48%, rgba(9, 18, 36, 0.98) 100%);
}

.bday-hero-layout {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 3rem;
  align-items: center;
}

.bday-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.44rem 1.05rem;
  border-radius: 999px;
  background: rgba(26, 20, 46, 0.7);
  border: 1px solid rgba(240, 155, 182, 0.45);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.12em;
  color: var(--bday-rose-soft);
  margin-bottom: 1.35rem;
}

.bday-status-pill.is-today {
  background: linear-gradient(90deg, rgba(226, 125, 160, 0.32), rgba(240, 190, 136, 0.24));
  border-color: var(--bday-gold);
  color: #fff6ea;
  box-shadow: 0 0 24px rgba(240, 155, 182, 0.3);
}

.bday-hero-en {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.24em;
  color: var(--bday-gold);
  margin-bottom: 0.65rem;
}

.bday-hero-title {
  font-family: var(--font-serif);
  font-size: clamp(2.25rem, 4.8vw, 4rem);
  font-weight: 600;
  line-height: 1.22;
  letter-spacing: 0.08em;
  color: #fff;
  text-shadow: 0 12px 42px rgba(5, 10, 26, 0.62);
  margin-bottom: 1.1rem;
}

.bday-hero-sub {
  display: block;
  font-size: clamp(1.08rem, 1.9vw, 1.52rem);
  font-weight: 400;
  color: rgba(255, 238, 244, 0.92);
  margin-top: 0.5rem;
  letter-spacing: 0.12em;
}

.bday-hero-lead {
  max-width: 640px;
  font-size: clamp(0.95rem, 1.2vw, 1.06rem);
  line-height: 1.92;
  color: rgba(235, 242, 255, 0.88);
  margin-bottom: 1.9rem;
}

.bday-hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.95rem;
  margin-bottom: 2.2rem;
}

.bday-meta-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(150px, 1fr));
  gap: 0.9rem;
  max-width: 620px;
}

.bday-meta-box {
  padding: 0.9rem 1.05rem;
  border-radius: 16px;
  background: rgba(13, 24, 48, 0.64);
  border: 1px solid rgba(240, 155, 182, 0.22);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.bday-meta-val {
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 600;
  color: #fff;
  line-height: 1.15;
}

.bday-meta-lbl {
  font-size: 0.74rem;
  color: rgba(220, 232, 248, 0.78);
  margin-top: 0.22rem;
}

.bday-vertical-jp {
  writing-mode: vertical-rl;
  font-family: var(--font-serif);
  font-size: 1.04rem;
  letter-spacing: 0.42em;
  color: rgba(255, 242, 247, 0.84);
  padding: 1.5rem 0.9rem;
  border-left: 1px solid rgba(240, 155, 182, 0.35);
  display: flex;
  gap: 1.2rem;
  align-items: center;
}

/* Shared Sections */
.bday-section {
  position: relative;
  z-index: 10;
  padding: clamp(4.2rem, 8vw, 6.8rem) clamp(1.2rem, 5vw, 3.8rem);
  scroll-margin-top: 82px;
}

.container {
  max-width: 1220px;
  margin: 0 auto;
}

.sec-head {
  max-width: 760px;
  margin-bottom: clamp(2.2rem, 4.5vw, 3.4rem);
}

.sec-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--bday-rose);
  margin-bottom: 0.8rem;
}

.sec-kicker::before {
  content: "";
  width: 26px;
  height: 1px;
  background: currentColor;
}

.sec-title {
  font-family: var(--font-serif);
  font-size: clamp(1.75rem, 3.3vw, 2.7rem);
  font-weight: 600;
  letter-spacing: 0.06em;
  line-height: 1.32;
  margin-bottom: 0.8rem;
}

.sec-desc {
  font-size: 0.96rem;
  color: rgba(218, 232, 248, 0.78);
  line-height: 1.85;
}

/* Section 1: Cake Ritual */
.bday-section-cake {
  background-color: #0b162c;
  background-image:
    radial-gradient(circle at 22% 24%, rgba(240, 155, 182, 0.14), transparent 50%),
    linear-gradient(180deg, #091224 0%, #0d1a33 100%);
}

.cake-grid {
  display: grid;
  grid-template-columns: 0.95fr 1.15fr;
  gap: 2rem;
  align-items: stretch;
}

.cake-stage {
  position: relative;
  border-radius: 26px;
  padding: 2rem 1.6rem;
  background-color: #11203d;
  border: 1px solid rgba(240, 155, 182, 0.22);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  overflow: hidden;
}

.cake-glow {
  position: absolute;
  width: 280px;
  height: 280px;
  top: 6%;
  left: 50%;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 198, 122, 0.32), rgba(240, 155, 182, 0.1) 52%, transparent 72%);
  opacity: 0.15;
  transition: opacity 0.65s ease, transform 0.65s ease;
  pointer-events: none;
}

.cake-stage.is-lit .cake-glow {
  opacity: 1;
  transform: translateX(-50%) scale(1.12);
}

.cake-svg {
  width: min(320px, 85%);
  height: auto;
  position: relative;
  z-index: 2;
}

.candle-flames {
  opacity: 0;
  transform-origin: center;
  transition: opacity 0.45s ease;
}

.cake-stage.is-lit .candle-flames {
  opacity: 1;
}

.cake-stage.is-lit .flame-core {
  animation: flameFlicker 1.25s ease-in-out infinite alternate;
  transform-origin: center bottom;
}

@keyframes flameFlicker {
  from { transform: scale(0.95, 0.96) rotate(-2deg); }
  to { transform: scale(1.06, 1.08) rotate(2deg); }
}

.cake-controls {
  text-align: center;
  position: relative;
  z-index: 2;
}

.cake-counter {
  margin-top: 0.75rem;
  font-size: 0.82rem;
  color: rgba(220, 232, 248, 0.76);
}

.bday-letter-card {
  border-radius: 26px;
  padding: clamp(1.6rem, 3.2vw, 2.5rem);
  background-color: #122240;
  background-image: linear-gradient(155deg, rgba(240, 155, 182, 0.08), rgba(146, 200, 247, 0.05));
  border: 1px solid rgba(240, 190, 136, 0.26);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1.25rem;
}

.letter-ribbon {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  color: var(--bday-gold);
}

.letter-title {
  font-family: var(--font-serif);
  font-size: clamp(1.25rem, 2.2vw, 1.65rem);
  color: #fff6ee;
  line-height: 1.45;
}

.letter-body {
  display: grid;
  gap: 0.9rem;
  font-size: 0.93rem;
  line-height: 1.92;
  color: rgba(235, 242, 255, 0.86);
  transition: filter 0.6s ease, opacity 0.6s ease;
}

.bday-letter-card.is-wished {
  border-color: rgba(240, 190, 136, 0.62);
  box-shadow: 0 22px 54px rgba(210, 106, 146, 0.18);
}

.letter-sign {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-family: var(--font-serif);
  font-size: 0.88rem;
  color: var(--bday-rose-soft);
}

.letter-seal {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  padding: 0.24rem 0.72rem;
  border-radius: 999px;
  border: 1px solid rgba(240, 190, 136, 0.4);
  color: var(--bday-gold);
}

/* Section 2: Mai Memories & Portrait */
.bday-section-memories {
  background-color: #0c1931;
  background-image:
    radial-gradient(circle at 82% 25%, rgba(146, 200, 247, 0.12), transparent 50%),
    linear-gradient(180deg, #0d1a33 0%, #0a162c 100%);
}

.memories-layout {
  display: grid;
  grid-template-columns: 0.78fr 1.22fr;
  gap: 2.2rem;
  align-items: start;
}

.mai-portrait-frame {
  border-radius: 24px;
  overflow: hidden;
  background-color: #10203b;
  border: 1px solid rgba(240, 155, 182, 0.28);
  box-shadow: 0 26px 60px rgba(3, 8, 20, 0.55);
}

.mai-portrait-frame img {
  width: 100%;
  aspect-ratio: 5 / 7;
  object-fit: cover;
  object-position: center top;
}

.mai-portrait-cap {
  padding: 1.1rem 1.35rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.mai-portrait-cap span {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  color: var(--bday-rose-soft);
}

.mai-portrait-cap strong {
  font-family: var(--font-serif);
  font-size: 1.12rem;
  color: #fff;
}

.memories-content {
  display: grid;
  gap: 1.4rem;
}

.memories-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.memory-item {
  padding: 1.25rem 1.3rem;
  border-radius: 18px;
  background-color: #11213e;
  border: 1px solid rgba(146, 200, 247, 0.14);
}

.memory-year {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  color: var(--bday-gold);
  margin-bottom: 0.45rem;
}

.memory-item h4 {
  font-family: var(--font-serif);
  font-size: 1.06rem;
  color: #fff;
  margin-bottom: 0.45rem;
}

.memory-item p {
  font-size: 0.86rem;
  line-height: 1.78;
  color: rgba(218, 232, 248, 0.8);
}

.mai-quote-box {
  padding: 1.65rem 1.8rem;
  border-radius: 22px;
  background-color: #122342;
  border: 1px solid rgba(240, 155, 182, 0.26);
}

.mai-quote-kicker {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  color: var(--bday-rose);
  margin-bottom: 0.75rem;
}

.mai-quote-cn {
  font-family: var(--font-serif);
  font-size: clamp(1.15rem, 2vw, 1.48rem);
  color: #fff;
  line-height: 1.68;
  margin-bottom: 0.55rem;
}

.mai-quote-jp {
  font-family: var(--font-serif);
  font-size: 0.86rem;
  color: rgba(206, 224, 246, 0.72);
  margin-bottom: 1.15rem;
}

.mai-quote-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.quote-pill {
  padding: 0.34rem 0.8rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.04);
  font-size: 0.76rem;
  color: rgba(226, 238, 252, 0.82);
  cursor: pointer;
  transition: all 0.22s ease;
}

.quote-pill.is-active,
.quote-pill:hover {
  border-color: var(--bday-rose);
  background: rgba(240, 155, 182, 0.22);
  color: #fff;
}

/* Section 3: Keepsake Card Studio */
.bday-section-card {
  background-color: #0b172e;
  background-image:
    radial-gradient(circle at 18% 80%, rgba(240, 190, 136, 0.12), transparent 50%),
    linear-gradient(180deg, #0a162c 0%, #0d1b34 100%);
}

.card-studio-box {
  padding: clamp(1.4rem, 3.2vw, 2.3rem);
  border-radius: 26px;
  background-color: #11213f;
  border: 1px solid rgba(240, 155, 182, 0.22);
}

.card-studio-grid {
  display: grid;
  grid-template-columns: 0.84fr 1.26fr;
  gap: 2rem;
  align-items: center;
}

.card-form {
  display: grid;
  gap: 1.1rem;
}

.field-label {
  display: block;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  color: rgba(224, 236, 250, 0.86);
  margin-bottom: 0.42rem;
}

.text-input,
.text-area {
  width: 100%;
  padding: 0.76rem 0.98rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(8, 17, 34, 0.78);
  color: #fff;
  outline: none;
  transition: border-color 0.22s ease, box-shadow 0.22s ease;
}

.text-input:focus,
.text-area:focus {
  border-color: var(--bday-rose);
  box-shadow: 0 0 0 3px rgba(240, 155, 182, 0.2);
}

.mono-input {
  font-family: var(--font-mono);
}

.art-picker {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.6rem;
}

.art-btn {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  padding: 0;
  border: 2px solid rgba(255, 255, 255, 0.16);
  background: #0a1529;
  aspect-ratio: 4 / 3;
  cursor: pointer;
  transition: border-color 0.22s ease, transform 0.22s ease;
}

.art-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 22%;
}

.art-btn span {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 0.22rem;
  background: linear-gradient(180deg, transparent, rgba(8, 15, 30, 0.92));
  font-size: 0.66rem;
  color: #fff;
  text-align: center;
}

.art-btn.is-active {
  border-color: var(--bday-gold);
  box-shadow: 0 0 0 2px rgba(240, 190, 136, 0.35);
}

.preset-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.55rem;
}

.preset-chip {
  padding: 0.26rem 0.68rem;
  border-radius: 999px;
  border: 1px solid rgba(240, 155, 182, 0.26);
  background: rgba(240, 155, 182, 0.08);
  font-size: 0.72rem;
  color: var(--bday-rose-soft);
  cursor: pointer;
}

.preset-chip:hover {
  background: rgba(240, 155, 182, 0.22);
  color: #fff;
}

.card-canvas-wrap {
  border-radius: 18px;
  padding: 0.9rem;
  background: rgba(6, 13, 27, 0.68);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

#mai-card-canvas {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 12px;
  box-shadow: 0 18px 44px rgba(2, 6, 16, 0.6);
}

.save-preview {
  margin-top: 0.95rem;
  padding: 0.85rem;
  border-radius: 14px;
  background: rgba(14, 27, 52, 0.88);
  border: 1px solid rgba(240, 155, 182, 0.34);
}

.save-preview[hidden] {
  display: none;
}

.save-preview-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  font-size: 0.78rem;
  color: rgba(240, 245, 255, 0.9);
  margin-bottom: 0.6rem;
}

.save-preview-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.save-preview-link {
  padding: 0.2rem 0.68rem;
  border-radius: 999px;
  border: 1px solid rgba(240, 190, 136, 0.55);
  background: rgba(240, 190, 136, 0.16);
  color: #fff4e4;
  text-decoration: none;
  font-size: 0.72rem;
}

.save-preview-link[hidden] {
  display: none;
}

.field-error {
  margin-top: 0.4rem;
  font-size: 0.78rem;
  color: #ffb0c7;
}

.field-error[hidden] {
  display: none;
}

.text-area[aria-invalid="true"] {
  border-color: #ff8aa8;
  box-shadow: 0 0 0 3px rgba(255, 138, 168, 0.22);
}

.save-preview-close {
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.08);
  font-size: 0.72rem;
  cursor: pointer;
}

/* Section 4: Blessing Wall */
.bday-section-wishes {
  background-color: #0d1b34;
  background-image:
    radial-gradient(circle at 84% 75%, rgba(240, 155, 182, 0.13), transparent 50%),
    linear-gradient(180deg, #0d1b34 0%, #0a1428 100%);
}

.wishes-layout {
  display: grid;
  grid-template-columns: 0.84fr 1.26fr;
  gap: 2rem;
  align-items: start;
}

.wish-form {
  padding: 1.7rem;
  border-radius: 22px;
  background-color: #122240;
  border: 1px solid rgba(240, 155, 182, 0.22);
  display: grid;
  gap: 1rem;
  position: sticky;
  top: 5.5rem;
}

.wish-form-title {
  font-family: var(--font-serif);
  font-size: 1.28rem;
}

.wish-storage-note {
  font-size: 0.76rem;
  color: rgba(204, 220, 242, 0.72);
  margin-top: -0.45rem;
}

.charm-picker {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
}

.charm-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.18rem;
  padding: 0.5rem 0.3rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.04);
  font-size: 0.72rem;
  cursor: pointer;
}

.charm-btn span:first-child {
  font-size: 1.15rem;
}

.charm-btn.is-active,
.charm-btn:hover {
  border-color: var(--bday-rose);
  background: rgba(240, 155, 182, 0.2);
}

.wishes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
  gap: 1.15rem;
}

.wish-card {
  padding: 1.35rem;
  border-radius: 18px;
  background-color: #122240;
  border: 1px solid rgba(240, 155, 182, 0.18);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.9rem;
}

.wish-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.wish-tag {
  font-family: var(--font-serif);
  font-size: 0.86rem;
  color: var(--bday-gold);
}

.wish-text {
  font-size: 0.9rem;
  line-height: 1.8;
  color: rgba(238, 245, 255, 0.9);
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.wish-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.76rem;
  color: rgba(196, 214, 240, 0.72);
  padding-top: 0.7rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.wish-like-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.24rem 0.65rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.05);
  font-size: 0.74rem;
  cursor: pointer;
}

.wish-like-btn.is-liked,
.wish-like-btn:hover {
  border-color: var(--bday-rose);
  background: rgba(240, 155, 182, 0.24);
  color: #fff;
}

/* Footer */
.bday-footer {
  position: relative;
  z-index: 10;
  background-color: #081020;
  background-image: radial-gradient(circle at 50% 0%, rgba(240, 155, 182, 0.16), transparent 60%);
  padding: 4.5rem 1.5rem 4rem;
  text-align: center;
  border-top: 1px solid rgba(240, 155, 182, 0.16);
}

.bday-footer-inner {
  max-width: 720px;
  margin: 0 auto;
}

.bday-footer-date {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.24em;
  color: var(--bday-gold);
  margin-bottom: 0.85rem;
}

.bday-footer-title {
  font-family: var(--font-serif);
  font-size: clamp(1.8rem, 3.8vw, 2.8rem);
  color: #fff;
  margin-bottom: 0.9rem;
}

.bday-footer-note {
  font-size: 0.92rem;
  color: rgba(215, 230, 248, 0.78);
  margin-bottom: 2rem;
}

.bday-footer-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.95rem;
}

/* Toast */
#bday-toast.toast,
.toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translate(-50%, 24px);
  z-index: 150;
  padding: 0.75rem 1.45rem;
  border-radius: 999px;
  background-color: rgba(16, 28, 54, 0.95) !important;
  border: 1px solid rgba(240, 155, 182, 0.48);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  font-size: 0.85rem;
  color: #fff;
  opacity: 0;
  pointer-events: none;
  transition: all 0.35s var(--ease-out);
}

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

/* Responsive */
@media (max-width: 1020px) {
  .bday-nav-links {
    display: none;
  }
  .nav-menu-btn {
    display: inline-flex;
  }
  .bday-hero-layout,
  .cake-grid,
  .memories-layout,
  .card-studio-grid,
  .wishes-layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .bday-vertical-jp {
    display: none;
  }
  .wish-form {
    position: static;
  }
}

@media (max-width: 680px) {
  .bday-meta-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .memories-list {
    grid-template-columns: minmax(0, 1fr);
  }
  .music-label {
    display: none;
  }
}

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