@font-face {
  font-family: "Tangerine";
  src: url("./assets/fonts/Tangerine.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

:root {
  --bg-top: #030714;
  --bg-mid: #08152e;
  --bg-bot: #02050d;
  --glass: rgba(15, 24, 39, 0.72);
  --glass-surface: linear-gradient(145deg, rgba(50, 62, 81, 0.55), rgba(17, 26, 42, 0.58) 48%, rgba(9, 17, 30, 0.68));
  --glass-border: rgba(224, 236, 255, 0.18);
  --glass-sheen: inset 0 1px 0 rgba(255, 255, 255, 0.13), inset 0 -1px 0 rgba(255, 255, 255, 0.025);
  --glass-shadow: 0 12px 36px rgba(0, 5, 16, 0.28), 0 2px 6px rgba(0, 5, 16, 0.14);
  --text-main: #f5fbff;
  --text-sub: rgba(214, 232, 255, 0.6);
  --accent: #ccecff;
  --accent-soft: rgba(165, 218, 255, 0.16);
  --title-glow: rgba(155, 215, 255, 0.45);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: radial-gradient(ellipse at 50% 44%, var(--bg-mid) 0%, var(--bg-top) 56%, var(--bg-bot) 100%);
  color: var(--text-main);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", sans-serif;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
}

#canvas-container { position: fixed; inset: 0; z-index: 1; cursor: grab; }
#canvas-container:active { cursor: grabbing; }

.music-start {
  position: fixed;
  z-index: 25;
  left: 50%;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 108px);
  transform: translateX(-50%);
  padding: 13px 24px;
  max-width: calc(100vw - 32px);
  border: 1px solid rgba(218, 189, 123, 0.42);
  border-radius: 24px;
  background: rgba(5, 15, 30, 0.88);
  color: #e4c98d;
  font: inherit;
  font-size: 14px;
  letter-spacing: 1px;
  cursor: pointer;
}
.music-start:disabled { cursor: wait; opacity: 0.72; }
.music-start[hidden] { display: none; }

.top-header {
  --heading-size: clamp(62px, 6vw, 86px);
  position: fixed;
  top: calc(env(safe-area-inset-top, 0px) - 20px);
  left: 0;
  right: 0;
  z-index: 10;
  display: flex;
  justify-content: center;
  pointer-events: none;
  transition: opacity .8s ease;
}
.christmas-title {
  --title-ink: #d9b86e;
  --title-reflection: #edcf8d;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .2em;
  width: min(90vw, 560px);
  height: calc(var(--heading-size) * 2.1);
  margin: 0;
  color: var(--title-ink);
  font-family: "Tangerine", "KaiTi", cursive;
  font-size: var(--heading-size);
  font-weight: 400;
  font-synthesis: none;
  line-height: 2.1;
  text-align: center;
  white-space: nowrap;
}
.title-word {
  display: inline-block;
  line-height: 1.25;
  opacity: 0;
  padding: 0 .12em;
  margin: 0 -.12em;
  background: linear-gradient(110deg, var(--title-ink) 0%, var(--title-ink) 43%, var(--title-reflection) 49%, #f2d79c 50%, var(--title-ink) 57%, var(--title-ink) 100%);
  background-size: 300% 100%;
  background-position: 150% 50%;
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  transform-origin: 50% 50%;
}
@media (max-width: 600px) {
  .top-header {
    --heading-size: clamp(52px, 14vw, 72px);
    top: calc(env(safe-area-inset-top, 0px) + 34px);
  }
}
@media (max-height: 500px) and (min-width: 601px) {
  .top-header { --heading-size: 58px; top: calc(env(safe-area-inset-top, 0px) - 24px); }
}
@media (prefers-reduced-motion: reduce) {
  .top-header { transition: none; }
}
.sub-title {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 4px;
  margin: 0;
  text-align: center;
  font-size: 10.5px;
  color: var(--text-sub);
  letter-spacing: 1.6px;
  opacity: 0.56;
}

/* 右侧可收起极简拉手胶囊（不占星空画面） */
.dock-tab {
  position: fixed;
  top: calc(env(safe-area-inset-top, 0px) + 20px);
  right: calc(env(safe-area-inset-right, 0px) + 18px);
  z-index: 16;
  height: 38px;
  padding: 0 16px;
  border-radius: 999px;
  color: var(--text-main);
  font: inherit;
  font-size: 12px;
  letter-spacing: 1.2px;
  white-space: nowrap;
  cursor: pointer;
  transition: border-color .2s, transform .15s, background .2s, opacity .25s;
}
.dock-tab:hover { border-color: rgba(235, 244, 255, 0.38); }
.dock-tab:active { transform: scale(0.97); }
.dock-tab.hidden-tab { opacity: 0; pointer-events: none; transform: translateX(12px); }

/* 底部极简悬浮微光圆钮 */
.bottom-bar {
  position: fixed;
  left: 50%;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 22px);
  transform: translateX(-50%);
  z-index: 12;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  transition: opacity .3s ease, transform .3s ease;
}
.bottom-bar.ui-hidden { opacity: 0; pointer-events: none; transform: translate(-50%, 16px); }
.orb-btn {
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.025));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.055);
  color: var(--text-main);
  font: inherit;
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background .2s, border-color .2s, color .2s, transform .2s;
}
.orb-btn svg { display: block; width: 18px; height: 18px; pointer-events: none; }
.orb-btn:hover { border-color: rgba(235, 244, 255, 0.3); background: rgba(255, 255, 255, 0.11); transform: translateY(-1px); }
.orb-btn:active { transform: scale(0.94); }
.orb-btn.active { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12); }

/* 右侧滑出式透明侧边栏抽屉（默认收起不占画面） */
.dock {
  position: fixed;
  right: calc(env(safe-area-inset-right, 0px) + 16px);
  top: 50%;
  transform: translateY(-50%);
  z-index: 18;
  width: 272px;
  max-height: calc(100vh - 36px);
  max-height: calc(100dvh - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px) - 36px);
  overflow-y: auto;
  overscroll-behavior: contain;
  touch-action: pan-y;
  scrollbar-width: thin;
  scrollbar-color: rgba(221, 232, 248, 0.2) transparent;
  padding: 14px;
  border-radius: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: opacity .28s ease, transform .3s cubic-bezier(.22, .85, .32, 1);
}
.dock-tab, .bottom-bar, .dock {
  border: 1px solid var(--glass-border);
  background: var(--glass);
  background: var(--glass-surface);
  box-shadow: var(--glass-sheen), var(--glass-shadow);
  backdrop-filter: blur(24px) saturate(145%);
  -webkit-backdrop-filter: blur(24px) saturate(145%);
}
.dock.ui-hidden { opacity: 0; pointer-events: none; transform: translate(300px, -50%); }
.dock-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: 0 0 auto;
  padding: 2px 2px 5px;
}
.dock-title { font-size: 13px; font-weight: 500; color: var(--text-main); letter-spacing: 1.6px; }
.dock-close {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-sub);
  font: inherit;
  font-size: 10px;
  cursor: pointer;
  padding: 6px 9px;
}
.dock-close:hover { color: var(--text-main); background: rgba(255, 255, 255, 0.09); }
.dock-section {
  flex: 0 0 auto;
  min-width: 0;
  padding: 11px;
  border: 1px solid rgba(255, 255, 255, 0.055);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.025);
}
.dock-label { font-size: 10px; color: var(--text-sub); letter-spacing: 1.8px; margin-bottom: 9px; }
.pill-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.pill, .action-btn {
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.075);
  background: rgba(255, 255, 255, 0.035);
  color: var(--text-main);
  border-radius: 10px;
  font: inherit;
  font-size: 11px;
  line-height: 1.5;
  padding: 8px 5px;
  cursor: pointer;
  transition: background .18s, border-color .18s, transform .12s;
  text-align: center;
}
.pill:hover, .action-btn:hover { background: rgba(255, 255, 255, 0.09); border-color: rgba(235, 244, 255, 0.27); }
.pill:active, .action-btn:active { transform: scale(0.98); }
.pill.active, .action-btn.active { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); font-weight: 500; }
.theme-pill { display: flex; align-items: center; gap: 8px; padding: 9px 7px; text-align: left; }
.theme-swatch {
  flex: 0 0 19px;
  width: 19px;
  height: 19px;
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 50%;
  background: radial-gradient(circle at 30% 25%, var(--swatch-light), var(--swatch-color) 58%, var(--swatch-deep));
  box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.24), 0 2px 5px rgba(0, 0, 0, 0.2);
}
[data-theme="emerald"] { --swatch-light: #b4e0c4; --swatch-color: #42866a; --swatch-deep: #163e30; }
[data-theme="rose"] { --swatch-light: #f5d0df; --swatch-color: #c78da7; --swatch-deep: #80546e; }
[data-theme="champagne"] { --swatch-light: #f5e7b7; --swatch-color: #c6aa68; --swatch-deep: #79613a; }
[data-theme="silver"] { --swatch-light: #d6efff; --swatch-color: #7eb7db; --swatch-deep: #355d8b; }
.theme-name { display: block; white-space: nowrap; font-size: 11px; }
.theme-name small { display: block; margin-top: 2px; font-size: 8px; font-weight: 400; letter-spacing: 1.3px; color: var(--text-sub); }
.action-col { display: flex; flex-direction: column; gap: 6px; }
.file-btn { display: block; }
.dock-tab:focus-visible, .orb-btn:focus-visible, .dock-close:focus-visible,
.pill:focus-visible, .action-btn:focus-visible, .gesture-help summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.cam-box {
  position: fixed; left: 20px; bottom: 20px; z-index: 12; width: 156px;
  border-radius: 12px; overflow: hidden; border: 1px solid var(--glass-border);
  background: rgba(0, 0, 0, 0.62); box-shadow: 0 10px 26px rgba(0, 0, 0, 0.45);
}
.cam-box video { display: block; width: 100%; height: 104px; object-fit: cover; transform: scaleX(-1); }
.cam-tag { padding: 5px 8px; font-size: 11px; color: var(--accent); text-align: center; background: rgba(6, 12, 24, 0.85); }
.gesture-help { color: var(--text-sub); font-size: 11px; line-height: 1.65; padding: 6px 4px; }
.gesture-help summary { color: var(--accent); cursor: pointer; }
.gesture-help p { margin: 7px 0 0; }

/* 模态与许愿卡片 */
.modal-mask {
  position: fixed; inset: 0; z-index: 30; display: flex; align-items: center; justify-content: center;
  background: rgba(3, 7, 18, 0.72); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); padding: 20px;
}
.modal-mask[hidden] { display: none !important; }
.wish-card {
  width: min(92vw, 390px); padding: 20px; border-radius: 18px;
  border: 1px solid var(--glass-border); background: rgba(10, 18, 36, 0.92);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.52);
}
.wish-card h3 { margin: 0 0 6px; font-size: 17px; color: var(--accent); }
.wish-tip { margin: 0 0 12px; font-size: 12px; color: var(--text-sub); }
.wish-card textarea {
  width: 100%; border-radius: 12px; border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.05); color: var(--text-main);
  padding: 10px 12px; font-size: 14px; resize: none; outline: none; font-family: inherit;
}
.wish-card textarea:focus { border-color: var(--accent); }
.wish-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 12px; }
.ghost-btn, .primary-btn { padding: 8px 16px; border-radius: 10px; font-size: 13px; cursor: pointer; border: 1px solid rgba(255, 255, 255, 0.16); }
.ghost-btn { background: transparent; color: var(--text-sub); }
.primary-btn { background: linear-gradient(135deg, #c9ebff, #eef8ff); color: #0b182e; font-weight: 600; border-color: transparent; }
.wish-wall { margin-top: 14px; max-height: 120px; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; }
.wish-item { font-size: 12px; color: rgba(235, 245, 255, 0.85); padding: 6px 10px; border-radius: 8px; background: rgba(255, 255, 255, 0.05); }

/* 高定满钻雪花相框 + 通透星海遮罩 + 360° 旋飞显隐过渡 */
.photo-mask {
  background: rgba(3, 8, 22, 0.44);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity 0.36s ease;
}
.photo-mask.open { opacity: 1; }
.polaroid-stage {
  display: flex; flex-direction: column; align-items: center; gap: 10px; perspective: 1300px;
  transition: transform 0.68s cubic-bezier(.18, .88, .28, 1), opacity 0.32s ease;
}
.polaroid-stage.entering {
  opacity: 0;
  transform: translate(var(--fly-x, 0px), var(--fly-y, 80px)) scale(0.14) rotateY(-360deg) rotateZ(-28deg);
}
.polaroid-stage.leaving {
  opacity: 0;
  transform: translate(var(--fly-x, 0px), var(--fly-y, 80px)) scale(0.14) rotateY(360deg) rotateZ(28deg);
  transition: transform 0.62s cubic-bezier(.45, .05, .55, .95), opacity 0.45s ease;
}
.polaroid-stage.switching {
  opacity: 0;
  transform: scale(0.55) rotateY(360deg);
  transition: transform 0.38s ease, opacity 0.26s ease;
}
.polaroid-card {
  position: relative;
  height: min(74vh, 556px);
  width: min(84vw, calc(min(74vh, 556px) * 0.7084));
  aspect-ratio: 622 / 878;
  transform-style: preserve-3d;
  transition: transform 0.68s cubic-bezier(.22, .85, .32, 1);
}
.polaroid-card.flipped { transform: rotateY(180deg); }

@keyframes glintSpark {
  0%, 100% { opacity: 0.25; transform: translate(-50%, -50%) scale(0.75); }
  50% { opacity: 1; transform: translate(-50%, -50%) scale(1.22); }
}

.polaroid-face {
  position: absolute; inset: 0;
  backface-visibility: hidden; -webkit-backface-visibility: hidden;
  background: transparent;
}
/* 双重保险修复 Safari/Chrome 3D 翻面穿帮问题：翻过半圈正面彻底让位，背面接管焦点 */
.polaroid-front {
  transform: rotateY(0deg) translateZ(2px);
  opacity: 1; visibility: visible; pointer-events: auto;
  transition: opacity 0.16s ease 0.18s, visibility 0s linear 0.18s;
}
.polaroid-back {
  transform: rotateY(180deg) translateZ(2px);
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity 0.16s ease 0.18s, visibility 0s linear 0.18s;
}
.polaroid-card.flipped .polaroid-front {
  opacity: 0; visibility: hidden; pointer-events: none;
}
.polaroid-card.flipped .polaroid-back {
  opacity: 1; visibility: visible; pointer-events: auto;
}
.diamond-frame-png {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: contain; pointer-events: none; z-index: 3;
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.36)) drop-shadow(0 0 14px var(--title-glow));
}
.polaroid-back .diamond-frame-png {
  filter: drop-shadow(0 0 12px var(--title-glow));
}
.frame-window {
  position: absolute;
  top: 18.6%; bottom: 7.0%; left: 11.8%; right: 11.8%;
  z-index: 2; overflow: hidden; border-radius: 6px;
  background: #070e1f;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
}
.window-blur-bg {
  position: absolute; inset: -14px; width: calc(100% + 28px); height: calc(100% + 28px);
  object-fit: cover; filter: blur(16px) brightness(0.45) saturate(0.9);
  pointer-events: none; opacity: 0; transition: opacity 0.22s ease;
}
.frame-window.fit-contain .window-blur-bg { opacity: 1; }
.window-photo {
  position: relative; z-index: 2;
  width: 100%; height: 100%;
  object-fit: cover; object-position: center 30%;
  display: block; filter: none;
}
.frame-window.fit-contain .window-photo {
  max-width: 100%; max-height: 100%; width: auto; height: auto;
  object-fit: contain;
}

/* 满钻雪花相框上的呼吸真钻十字星芒高光 */
.frame-glint {
  position: absolute; z-index: 4; width: 22px; height: 22px; pointer-events: none;
  background:
    radial-gradient(circle, #ffffff 0%, rgba(220, 244, 255, 0.85) 18%, transparent 55%),
    linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.95) 50%, transparent 100%),
    linear-gradient(0deg, transparent 0%, rgba(255,255,255,0.95) 50%, transparent 100%);
  background-size: 100% 100%, 100% 1.6px, 1.6px 100%;
  background-position: center; background-repeat: no-repeat;
  animation: glintSpark 2.8s ease-in-out infinite;
}
.frame-glint.g-crown { top: 10.8%; left: 50%; width: 30px; height: 30px; }
.frame-glint.g-tl { top: 15.8%; left: 21%; animation-delay: 0.7s; }
.frame-glint.g-r { top: 38.5%; left: 93.8%; animation-delay: 1.4s; }
.frame-glint.g-br { top: 94.6%; left: 78%; animation-delay: 2.1s; }

.back-paper {
  position: absolute;
  padding: 0; cursor: text;
  background: #fffcf7;
}
.note-paper-bg {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: fill; pointer-events: none; z-index: 1;
  filter: brightness(1.06) contrast(1.04) saturate(1.14);
}
.note-content {
  position: relative; z-index: 2;
  width: 100%; height: 100%;
  display: flex; flex-direction: column;
  padding: 13% 11% 22% 11%;
}
.back-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; font-size: 13px; font-weight: 600; color: #7a573d; }
.mini-btn { border: 1px solid rgba(154, 114, 80, 0.35); background: rgba(255, 250, 242, 0.85); color: #7a573d; border-radius: 999px; padding: 3px 10px; font-size: 11px; cursor: pointer; }
.mini-btn:hover { background: #fff; border-color: #b4845a; }
.note-content textarea {
  flex: 1; width: 100%; border: 0; background: transparent;
  color: #4f3828; font-size: 14.5px; line-height: 1.75;
  resize: none; outline: none; font-family: inherit;
  user-select: text; -webkit-user-select: text;
}
.note-content textarea::placeholder { color: rgba(130, 96, 68, 0.52); }
.back-foot { margin-top: 4px; text-align: right; font-size: 10.5px; color: #9c7a5c; }

.polaroid-meta {
  display: flex; align-items: center; gap: 12px;
  font-size: 12.5px; color: var(--accent); letter-spacing: 1px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
}
.polaroid-hint { font-size: 11px; color: var(--text-sub); }
.polaroid-nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.nav-btn { padding: 7px 14px; border-radius: 999px; border: 1px solid var(--glass-border); background: rgba(8, 16, 34, 0.78); backdrop-filter: blur(10px); color: var(--text-main); font-size: 12px; cursor: pointer; }
.nav-btn:hover { border-color: var(--accent); }
.close-btn { border-color: rgba(255, 160, 160, 0.35); }

.toast {
  position: fixed; left: 50%; bottom: 72px; transform: translate(-50%, 12px); z-index: 40;
  padding: 7px 16px; border-radius: 999px; border: 1px solid var(--glass-border);
  background: rgba(8, 16, 34, 0.88); color: var(--accent); font-size: 12px;
  opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 960px) {
  .dock-tab { top: calc(env(safe-area-inset-top, 0px) + 14px); right: calc(env(safe-area-inset-right, 0px) + 12px); height: 36px; padding: 0 14px; }
  .bottom-bar { bottom: calc(env(safe-area-inset-bottom, 0px) + 16px); gap: 5px; padding: 7px 9px; }
  .orb-btn { flex-basis: 34px; width: 34px; height: 34px; font-size: 14px; }
  .dock {
    top: auto;
    bottom: calc(env(safe-area-inset-bottom, 0px) + 84px);
    right: calc(env(safe-area-inset-right, 0px) + 12px);
    left: calc(env(safe-area-inset-left, 0px) + 12px);
    width: auto;
    max-width: 380px;
    margin-left: auto;
    padding: 12px;
    border-radius: 22px;
    transform: none;
    max-height: 62vh;
    max-height: min(62dvh, calc(100dvh - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px) - 112px));
  }
  .dock.ui-hidden { transform: translateY(20px); }
  .sub-title { bottom: calc(env(safe-area-inset-bottom, 0px) + 3px); font-size: 8px; letter-spacing: .5px; }
}
@media (max-height: 500px) and (min-width: 601px) {
  .dock { top: calc(env(safe-area-inset-top, 0px) + 12px); bottom: auto; right: calc(env(safe-area-inset-right, 0px) + 12px); left: auto; width: 252px; margin-left: 0; max-height: calc(100dvh - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px) - 24px); transform: none; }
  .dock.ui-hidden { transform: translateX(280px); }
  .bottom-bar { left: max(12px, env(safe-area-inset-left, 0px)); bottom: calc(env(safe-area-inset-bottom, 0px) + 12px); transform: none; gap: 5px; padding: 7px 9px; }
  .bottom-bar.ui-hidden { transform: translateY(16px); }
  .orb-btn { flex-basis: 32px; width: 32px; height: 32px; font-size: 14px; }
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .dock-tab, .bottom-bar, .dock { background: rgba(15, 24, 39, 0.96); }
}
@media (prefers-reduced-transparency: reduce) {
  .dock-tab, .bottom-bar, .dock { background: rgba(15, 24, 39, 0.97); backdrop-filter: none; -webkit-backdrop-filter: none; }
}
@media (prefers-reduced-motion: reduce) {
  .dock-tab, .bottom-bar, .dock, .orb-btn, .pill, .action-btn { transition: none; }
}

/* Keep the opening focused on the descending star; controls return gradually. */
html[data-intro-phase="emerge"] .top-header,
html[data-intro-phase="emerge"] .sub-title,
html[data-intro-phase="fall"] .top-header,
html[data-intro-phase="landing"] .top-header,
html[data-intro-phase="fall"] .sub-title,
html[data-intro-phase="landing"] .sub-title,
html[data-intro-phase="pullback"] .sub-title { opacity: 0; }
html[data-intro-phase="emerge"] .bottom-bar,
html[data-intro-phase="fall"] .bottom-bar,
html[data-intro-phase="landing"] .bottom-bar { opacity: 0.25; }
.bottom-bar { transition: opacity 1.2s ease, transform .3s ease; }
@media (prefers-reduced-motion: reduce) {
  .bottom-bar { transition: none; }
}
