/* ============================================================
   生日快乐 · 3D  —  visual layer
   ============================================================ */

:root {
  --ink: #4f3a3b;
  --ink-soft: #7d6261;
  --ink-faint: #a98d8a;
  --gold: #c3a06a;
  --gold-soft: #dcc39a;
  --rose: #c98f8a;
  --line: rgba(122, 82, 82, 0.13);
  --serif: "LXGW WenKai", "Songti SC", "STSong", "SimSun", serif;
  --latin: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", sans-serif;
  --dock-h: 150px;
}

* { box-sizing: border-box; }

html, body {
  height: 100%;
  margin: 0;
}

body {
  overflow: hidden;
  background: #f7e9e4;
  color: var(--ink);
  font-family: var(--serif);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  -webkit-tap-highlight-color: transparent;
}

button, input { font: inherit; color: inherit; }
button { -webkit-appearance: none; appearance: none; }
::selection { background: rgba(195, 160, 106, 0.26); }

:focus-visible {
  outline: 1px solid rgba(195, 160, 106, 0.75);
  outline-offset: 3px;
}

/* ---------------- background ---------------- */

.backdrop {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.backdrop__wash {
  position: absolute;
  inset: -10%;
  background:
    radial-gradient(120% 90% at 16% 6%, #fdf8f3 0%, rgba(253, 248, 243, 0) 56%),
    radial-gradient(85% 65% at 84% 14%, #fbe9e7 0%, rgba(251, 233, 231, 0) 62%),
    radial-gradient(110% 95% at 50% 112%, #e3c4c9 0%, rgba(227, 196, 201, 0) 62%),
    linear-gradient(158deg, #faf1eb 0%, #f6e5e3 40%, #efd8db 72%, #ead0d4 100%);
}

.backdrop__glow {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(38% 34% at 50% 46%, rgba(255, 253, 249, 0.92) 0%, rgba(255, 250, 244, 0.42) 42%, rgba(255, 248, 242, 0) 72%),
    radial-gradient(26% 24% at 78% 24%, rgba(255, 232, 226, 0.55) 0%, rgba(255, 232, 226, 0) 70%),
    radial-gradient(30% 30% at 18% 78%, rgba(246, 214, 216, 0.5) 0%, rgba(246, 214, 216, 0) 70%);
  filter: blur(6px);
}

.bokeh {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.bokeh i {
  position: absolute;
  display: block;
  border-radius: 50%;
  filter: blur(46px);
  background: radial-gradient(circle at 38% 36%, rgba(255, 248, 240, 0.92) 0%, rgba(255, 214, 206, 0.34) 58%, rgba(255, 214, 206, 0) 72%);
  animation: bokeh-drift var(--d) ease-in-out var(--delay) infinite alternate;
  will-change: transform;
}

@keyframes bokeh-drift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(var(--dx), var(--dy), 0) scale(1.15); }
}

.backdrop__grain {
  position: absolute;
  inset: 0;
  opacity: 0.05;
  mix-blend-mode: soft-light;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.86' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 180px 180px;
}

.backdrop__vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 78% 72% at 50% 46%, rgba(90, 55, 58, 0) 46%, rgba(90, 55, 58, 0.14) 100%);
}

/* ---------------- canvases & petals ---------------- */

#scene {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  touch-action: none;
  display: block;
}

#fx {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  pointer-events: none;
  display: block;
}

.petals {
  position: fixed;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  overflow: hidden;
}

.petal {
  position: absolute;
  top: -10vh;
  left: var(--x);
  width: var(--size);
  height: calc(var(--size) * 1.3);
  border-radius: 100% 0 100% 0;
  background: linear-gradient(155deg, rgba(255, 247, 244, 0.95) 0%, rgba(240, 199, 203, 0.72) 55%, rgba(214, 160, 168, 0.45) 100%);
  box-shadow: inset 0 0 4px rgba(255, 255, 255, 0.65);
  opacity: 0;
  filter: blur(0.4px);
  transform-origin: 50% 50%;
  animation: petal-fall var(--dur) linear var(--delay) infinite;
  will-change: transform, opacity;
}

@keyframes petal-fall {
  0%   { transform: translate3d(0, -8vh, 0) rotate(0deg); opacity: 0; }
  8%   { opacity: 0.72; }
  45%  { transform: translate3d(var(--sway), 46vh, 0) rotate(190deg); opacity: 0.62; }
  75%  { opacity: 0.45; }
  100% { transform: translate3d(calc(var(--sway) * -0.7), 112vh, 0) rotate(380deg); opacity: 0; }
}

/* ---------------- stage ---------------- */

.stage {
  position: fixed;
  inset: 0;
  z-index: 5;
  pointer-events: none;
}

/* ---------------- hero ---------------- */

.hero {
  position: absolute;
  top: clamp(30px, 7vh, 72px);
  left: 50%;
  width: min(92vw, 880px);
  transform: translateX(-50%);
  text-align: center;
  pointer-events: none;
  animation: hero-in 1.7s 0.2s cubic-bezier(0.22, 0.7, 0.25, 1) both;
}

@keyframes hero-in {
  from { opacity: 0; transform: translate(-50%, 16px); filter: blur(10px); }
  to   { opacity: 1; transform: translate(-50%, 0); filter: blur(0); }
}

.eyebrow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin: 0;
  font-family: var(--sans);
  font-size: 10.5px;
  font-weight: 400;
  letter-spacing: 0.38em;
  text-indent: 0.38em;
  color: #ab8f8b;
  text-transform: uppercase;
}

.eyebrow .rule {
  display: block;
  width: clamp(24px, 4vw, 44px);
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(160, 120, 115, 0.5));
}

.eyebrow .rule:last-child {
  background: linear-gradient(90deg, rgba(160, 120, 115, 0.5), transparent);
}

.title {
  margin: 20px 0 0;
  padding-left: 0.14em;
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(3.2rem, 8.4vw, 7rem);
  line-height: 1.06;
  letter-spacing: 0.14em;
  filter: drop-shadow(0 12px 34px rgba(150, 95, 95, 0.16)) drop-shadow(0 1px 0 rgba(255, 255, 255, 0.55));
}

.title span {
  display: inline-block;
  background: linear-gradient(176deg, #5b4143 0%, #7b5856 44%, #a97e70 76%, #c9a68e 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: char-in 1.3s cubic-bezier(0.2, 0.7, 0.2, 1) both;
  animation-delay: calc(0.3s + var(--i) * 0.11s);
  will-change: transform, opacity, filter;
}

@keyframes char-in {
  0%   { opacity: 0; transform: translateY(28px) scale(0.96); filter: blur(12px); }
  100% { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
}

.subtitle {
  margin: 18px 0 0;
  font-size: clamp(12.5px, 1.15vw, 15px);
  font-weight: 400;
  letter-spacing: 0.22em;
  text-indent: 0.22em;
  color: #8a6c69;
  opacity: 0;
  animation: soft-in 1.5s 0.85s cubic-bezier(0.22, 0.7, 0.25, 1) both;
}

.ornament {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 22px;
  opacity: 0;
  animation: soft-in 1.5s 1.05s cubic-bezier(0.22, 0.7, 0.25, 1) both;
}

.ornament i {
  display: block;
  width: 46px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(195, 160, 106, 0.55));
}

.ornament i:last-child {
  background: linear-gradient(90deg, rgba(195, 160, 106, 0.55), transparent);
}

.ornament b {
  display: block;
  width: 4px;
  height: 4px;
  background: var(--gold);
  transform: rotate(45deg);
  opacity: 0.75;
}

@keyframes soft-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---------------- music ---------------- */

.music {
  position: absolute;
  top: clamp(18px, 3.2vh, 30px);
  right: clamp(18px, 3vw, 34px);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 15px 9px 13px;
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.36);
  box-shadow: 0 12px 30px -16px rgba(120, 70, 70, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.72);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  backdrop-filter: blur(16px) saturate(1.2);
  color: #7a5c59;
  font-family: var(--sans);
  font-size: 10.5px;
  letter-spacing: 0.2em;
  text-indent: 0.2em;
  cursor: pointer;
  pointer-events: auto;
  transition: background 0.4s ease, transform 0.4s cubic-bezier(0.2, 0.7, 0.2, 1), box-shadow 0.4s ease;
}

.music:hover {
  background: rgba(255, 255, 255, 0.58);
  transform: translateY(-1px);
  box-shadow: 0 16px 36px -16px rgba(120, 70, 70, 0.5), inset 0 1px 0 #fff;
}

.music:active { transform: scale(0.97); }

.music__bars {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 14px;
}

.music__bars i {
  width: 2px;
  height: 4px;
  border-radius: 2px;
  background: #bd8d83;
  transition: height 0.35s ease;
}

.music__bars i:nth-child(2) { height: 7px; }
.music__bars i:nth-child(3) { height: 5px; }
.music__bars i:nth-child(4) { height: 9px; }

.music.is-on .music__bars i { animation: eq 1.15s ease-in-out infinite; }
.music.is-on .music__bars i:nth-child(2) { animation-delay: 0.16s; }
.music.is-on .music__bars i:nth-child(3) { animation-delay: 0.32s; }
.music.is-on .music__bars i:nth-child(4) { animation-delay: 0.48s; }

@keyframes eq {
  0%, 100% { height: 4px; }
  50%      { height: 13px; }
}

/* ---------------- wish wall ---------------- */

.wall {
  position: absolute;
  top: 50%;
  right: clamp(22px, 3.4vw, 52px);
  width: clamp(300px, 24vw, 348px);
  height: min(58vh, 560px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: 26px;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.56) 0%, rgba(255, 249, 246, 0.3) 100%);
  box-shadow: 0 44px 90px -48px rgba(105, 60, 62, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.82);
  -webkit-backdrop-filter: blur(26px) saturate(1.22);
  backdrop-filter: blur(26px) saturate(1.22);
  pointer-events: auto;
  animation: wall-in 1.5s 0.55s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.wall::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.9), transparent);
}

@keyframes wall-in {
  from { opacity: 0; transform: translate(18px, -50%); filter: blur(8px); }
  to   { opacity: 1; transform: translate(0, -50%); filter: blur(0); }
}

.wall__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 22px 22px 13px;
}

.wall__title {
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: var(--sans);
  font-size: 10.5px;
  letter-spacing: 0.26em;
  color: #8d6d69;
}

.wall__title em {
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(195, 160, 106, 0.16);
  color: #a5804f;
  font-style: normal;
  font-size: 9px;
  letter-spacing: 0.06em;
}

.wall__close {
  display: none;
  place-items: center;
  width: 28px;
  height: 28px;
  padding: 0 0 2px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.45);
  color: #9b7b77;
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
}

.wall__body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 0 20px 6px;
  scrollbar-width: thin;
  scrollbar-color: rgba(160, 120, 115, 0.24) transparent;
  -webkit-mask-image: linear-gradient(180deg, #000 0, #000 calc(100% - 18px), transparent 100%);
  mask-image: linear-gradient(180deg, #000 0, #000 calc(100% - 18px), transparent 100%);
}

.wall__body::-webkit-scrollbar { width: 3px; }
.wall__body::-webkit-scrollbar-track { background: transparent; }
.wall__body::-webkit-scrollbar-thumb {
  background: rgba(160, 120, 115, 0.22);
  border-radius: 3px;
}

.wishes {
  margin: 0;
  padding: 0;
  list-style: none;
}

.wish {
  padding: 14px 2px 15px;
  border-bottom: 1px solid var(--line);
  animation: wish-in 0.9s calc(var(--i) * 55ms) cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.wish:last-child { border-bottom: 0; }

@keyframes wish-in {
  from { opacity: 0; transform: translateY(10px); filter: blur(4px); }
  to   { opacity: 1; transform: translateY(0); filter: blur(0); }
}

.wish__top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 5px;
}

.wish__name {
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: var(--sans);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  color: #a07770;
}

.wish__name::before {
  content: "";
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--gold);
  opacity: 0.85;
}

.wish__time {
  flex: none;
  font-family: var(--sans);
  font-size: 9px;
  letter-spacing: 0.06em;
  color: #b9a09b;
  white-space: nowrap;
}

.wish__text {
  margin: 0;
  font-size: 14px;
  line-height: 1.85;
  color: #5d4647;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.wall__empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 52px 16px;
  text-align: center;
}

.wall__empty[hidden] { display: none; }

.wall__emptyMark {
  display: block;
  margin-bottom: 6px;
  color: var(--gold);
  font-size: 18px;
  opacity: 0.6;
  animation: mark-pulse 3.2s ease-in-out infinite;
}

@keyframes mark-pulse {
  0%, 100% { opacity: 0.35; transform: scale(0.94); }
  50%      { opacity: 0.75; transform: scale(1.06); }
}

.wall__empty p {
  margin: 0;
  font-size: 14px;
  letter-spacing: 0.08em;
  color: #8a6c69;
}

.wall__empty > span:last-child {
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.12em;
  color: #b39a95;
}

.wall__foot {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 22px 15px;
  font-family: var(--sans);
  font-size: 9px;
  letter-spacing: 0.18em;
  color: #b29b96;
}

.wall__foot i {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, rgba(160, 120, 115, 0.18), transparent);
}

/* ---------------- dock / composer ---------------- */

.dock {
  position: absolute;
  left: 50%;
  bottom: clamp(18px, 3.4vh, 38px);
  width: min(560px, 92vw);
  display: flex;
  flex-direction: column;
  gap: 10px;
  transform: translateX(-50%);
  pointer-events: auto;
}

.dock__peek { display: none; }

.composer {
  display: flex;
  align-items: center;
  padding: 6px 7px 6px 20px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.5);
  box-shadow: 0 24px 55px -30px rgba(120, 70, 70, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.85);
  -webkit-backdrop-filter: blur(22px) saturate(1.2);
  backdrop-filter: blur(22px) saturate(1.2);
  transition: background 0.45s ease, box-shadow 0.45s ease, transform 0.45s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.composer:focus-within {
  background: rgba(255, 255, 255, 0.74);
  box-shadow:
    0 0 0 1px rgba(195, 160, 106, 0.42),
    0 28px 60px -28px rgba(150, 90, 90, 0.5),
    inset 0 1px 0 #fff;
  transform: translateY(-1px);
}

.composer.is-shake { animation: shake 0.42s cubic-bezier(0.36, 0.07, 0.19, 0.97); }

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-6px); }
  40% { transform: translateX(5px); }
  60% { transform: translateX(-3px); }
  80% { transform: translateX(2px); }
}

.composer__name {
  width: 68px;
  flex: none;
  padding: 12px 0;
  border: 0;
  background: transparent;
  outline: none;
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: #6b4f4f;
}

.composer__name::placeholder { color: #bda7a2; }

.composer__divider {
  width: 1px;
  height: 18px;
  margin: 0 15px 0 6px;
  background: linear-gradient(180deg, transparent, rgba(150, 110, 105, 0.3), transparent);
}

.composer__text {
  flex: 1;
  min-width: 0;
  padding: 12px 0;
  border: 0;
  background: transparent;
  outline: none;
  font-family: var(--serif);
  font-size: 15px;
  letter-spacing: 0.02em;
  color: #4f3a3b;
}

.composer__text::placeholder { color: #b39a95; }

.composer__send {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: none;
  border: 0;
  border-radius: 50%;
  background: linear-gradient(145deg, #d9aaa3 0%, #bf8680 55%, #ac716c 100%);
  box-shadow: 0 10px 22px -9px rgba(150, 85, 80, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.38);
  color: #fff;
  cursor: pointer;
  transition: transform 0.35s cubic-bezier(0.2, 0.7, 0.2, 1), box-shadow 0.35s ease, filter 0.35s ease;
}

.composer__send svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.composer__send:hover {
  transform: translateY(-1px) scale(1.04);
  filter: brightness(1.04);
  box-shadow: 0 14px 26px -9px rgba(150, 85, 80, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.42);
}

.composer__send:active { transform: scale(0.96); }
.composer__send:disabled { cursor: default; opacity: 0.65; transform: none; }

.composer__send.is-busy svg { animation: send-pulse 0.9s ease-in-out infinite; }

@keyframes send-pulse {
  0%, 100% { opacity: 1; transform: translateX(0); }
  50%      { opacity: 0.45; transform: translateX(2px); }
}

.dock__note {
  margin: 0;
  text-align: center;
  font-family: var(--sans);
  font-size: 9.5px;
  letter-spacing: 0.18em;
  color: #ab918c;
  text-shadow: 0 1px 12px rgba(255, 250, 246, 0.9);
}

.hint {
  position: absolute;
  left: clamp(20px, 3vw, 38px);
  bottom: clamp(20px, 3.4vh, 36px);
  margin: 0;
  font-family: var(--sans);
  font-size: 9.5px;
  letter-spacing: 0.16em;
  color: #b09792;
  opacity: 0;
  animation: soft-in 1.4s 1.5s ease both;
}

/* ---------------- floating wishes ---------------- */

.floaters {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.floater {
  position: absolute;
  left: var(--x);
  bottom: 23vh;
  max-width: min(520px, 70vw);
  text-align: center;
  opacity: 0;
  animation: float-up var(--dur) cubic-bezier(0.22, 0.61, 0.36, 1) forwards;
  will-change: transform, opacity, filter;
}

.floater p {
  margin: 0;
  font-size: clamp(15px, 1.55vw, 19px);
  line-height: 1.7;
  letter-spacing: 0.04em;
  color: #6b4b4c;
  text-shadow:
    0 2px 26px rgba(255, 248, 244, 0.95),
    0 0 46px rgba(255, 214, 205, 0.7),
    0 0 8px rgba(255, 255, 255, 0.8);
}

.floater span {
  display: block;
  margin-top: 8px;
  font-family: var(--sans);
  font-size: 9.5px;
  letter-spacing: 0.24em;
  color: #a98a85;
  text-shadow: 0 1px 12px rgba(255, 250, 246, 0.9);
}

@keyframes float-up {
  0%   { opacity: 0; transform: translate(-50%, 26px) scale(0.97); filter: blur(7px); }
  14%  { opacity: 1; filter: blur(0); }
  68%  { opacity: 0.95; }
  100% { opacity: 0; transform: translate(calc(-50% + var(--dx)), -26vh) scale(1); filter: blur(2.5px); }
}

/* ---------------- toast ---------------- */

.toast {
  position: absolute;
  left: 50%;
  bottom: calc(var(--dock-h) + 26px);
  transform: translate(-50%, 10px);
  padding: 10px 20px;
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: 999px;
  background: rgba(255, 252, 249, 0.72);
  box-shadow: 0 18px 40px -22px rgba(120, 70, 70, 0.5);
  -webkit-backdrop-filter: blur(18px) saturate(1.15);
  backdrop-filter: blur(18px) saturate(1.15);
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: #7a5c59;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.45s ease, transform 0.45s cubic-bezier(0.2, 0.7, 0.2, 1);
}

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

/* ---------------- loader ---------------- */

.loader {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  background:
    radial-gradient(58% 58% at 50% 44%, #fdf8f3 0%, #f7e6e4 54%, #edd4d8 100%);
  transition: opacity 1.1s ease 0.15s, visibility 1.1s ease 0.15s;
}

body.is-ready .loader { opacity: 0; visibility: hidden; }

.loader__inner { text-align: center; }

.loader__mark {
  display: block;
  color: var(--gold);
  font-size: 13px;
  animation: mark-pulse 2.6s ease-in-out infinite;
}

.loader__word {
  margin: 16px 0 24px;
  padding-left: 0.4em;
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 300;
  letter-spacing: 0.4em;
  color: #8a6864;
}

.loader__line {
  display: block;
  width: 128px;
  height: 1px;
  margin: 0 auto;
  background: rgba(160, 120, 115, 0.16);
  overflow: hidden;
}

.loader__line i {
  display: block;
  width: 42%;
  height: 100%;
  background: linear-gradient(90deg, transparent, #c3a06a, transparent);
  animation: load-sweep 1.5s ease-in-out infinite;
}

@keyframes load-sweep {
  0%   { transform: translateX(-120%); }
  100% { transform: translateX(340%); }
}

/* ---------------- fallbacks ---------------- */

.noscript {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  background: #f7e6e4;
  font-family: var(--serif);
  color: #7a5c59;
  letter-spacing: 0.1em;
}

body.no-3d #scene { display: none; }

body.no-3d .backdrop__glow {
  background:
    radial-gradient(30% 30% at 50% 58%, rgba(255, 250, 244, 0.95) 0%, rgba(255, 244, 236, 0.35) 45%, rgba(255, 244, 236, 0) 72%),
    radial-gradient(26% 24% at 78% 24%, rgba(255, 232, 226, 0.55) 0%, rgba(255, 232, 226, 0) 70%);
}

/* ---------------- responsive ---------------- */

@media (max-width: 1279px) {
  .wall { width: 306px; right: 26px; }
}

@media (max-width: 1023px) {
  .hero { top: max(20px, env(safe-area-inset-top)); width: 94vw; }
  .title { margin-top: 16px; font-size: clamp(2.9rem, 12.4vw, 4.6rem); }
  .subtitle { margin-top: 14px; font-size: 12px; letter-spacing: 0.16em; text-indent: 0.16em; }
  .eyebrow { font-size: 8.5px; letter-spacing: 0.3em; gap: 11px; }
  .ornament { margin-top: 16px; }
  .ornament i { width: 32px; }

  .music { top: max(14px, env(safe-area-inset-top)); right: 14px; padding: 8px 11px; gap: 7px; }
  .music__tip { display: none; }

  .wall {
    position: fixed;
    left: 10px;
    right: 10px;
    top: auto;
    bottom: calc(var(--dock-h) + 8px);
    width: auto;
    height: min(46vh, 420px);
    border-radius: 22px;
    opacity: 0;
    transform: translateY(14px) scale(0.99);
    pointer-events: none;
    transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.2, 0.7, 0.2, 1);
    animation: none;
  }

  .wall.is-open {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
  }

  .wall__head { padding: 16px 18px 10px; }
  .wall__close { display: grid; }
  .wall__body { padding: 0 16px 4px; }
  .wall__foot { padding: 8px 18px 12px; }

  .dock {
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    transform: none;
    padding: 0 10px calc(10px + env(safe-area-inset-bottom));
    gap: 8px;
  }

  .dock__peek {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 15px;
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.4);
    box-shadow: 0 14px 34px -24px rgba(120, 70, 70, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.7);
    -webkit-backdrop-filter: blur(16px) saturate(1.15);
    backdrop-filter: blur(16px) saturate(1.15);
    text-align: left;
    cursor: pointer;
    transition: background 0.35s ease;
  }

  .dock__peekLabel {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: none;
    font-family: var(--sans);
    font-size: 9.5px;
    letter-spacing: 0.14em;
    color: #7d5f5b;
    white-space: nowrap;
  }

  .dock__peekLabel em {
    padding: 1px 6px;
    border-radius: 999px;
    background: rgba(195, 160, 106, 0.16);
    color: #a5804f;
    font-style: normal;
    font-size: 8.5px;
    letter-spacing: 0.04em;
  }

  .dock__peekText {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    font-size: 12px;
    color: #8b6d69;
    white-space: nowrap;
    text-overflow: ellipsis;
  }

  .dock__chev {
    flex: none;
    width: 7px;
    height: 7px;
    margin-right: 2px;
    border-top: 1px solid #a98d8a;
    border-left: 1px solid #a98d8a;
    transform: rotate(45deg) translateY(1px);
    transition: transform 0.4s cubic-bezier(0.2, 0.7, 0.2, 1);
  }

  .dock__peek[aria-expanded="true"] .dock__chev {
    transform: rotate(225deg) translateY(-1px);
  }

  .composer { padding-left: 16px; }
  .composer__name { width: 56px; }
  .composer__divider { margin: 0 11px 0 4px; }
  .composer__text { font-size: 14px; }
  .composer__send { width: 42px; height: 42px; }

  .dock__note { font-size: 9px; letter-spacing: 0.14em; }

  .hint { display: none; }

  .floater { bottom: 30vh; max-width: 78vw; }
  .floater p { font-size: 15px; }

  .toast { font-size: 10px; padding: 9px 16px; max-width: 86vw; white-space: normal; text-align: center; }
}

@media (max-width: 380px) {
  .title { font-size: 2.7rem; }
  .composer__name { width: 46px; }
  .dock__peekText { display: none; }
}

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

  .petals { display: none; }
  .floater { animation: none; opacity: 1; bottom: 40vh; }
  .wall { animation: none; }
}
