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

:root {
  --bg-top: #030e0a;
  --bg-mid: #08241a;
  --bg-bot: #020705;
  --glass: rgba(6, 22, 16, 0.42);
  --glass-border: rgba(150, 255, 214, 0.18);
  --text-main: #eafff6;
  --text-sub: rgba(200, 245, 226, 0.6);
  --accent: #82f5c7;
  --accent-soft: rgba(130, 245, 199, 0.16);
  --title-glow: rgba(105, 240, 186, 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; }

/* 顶部居中 B款大师长尾飘逸体 · 轻弧环星 */
.top-header {
  position: fixed;
  top: 8px;
  left: 0;
  right: 0;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  transition: opacity .35s ease;
}
/* 标题上方的一行小字：跟着同一条弧线弯，压得很近 */
.above-title-text {
  font-family: "RuiScript", "Zapfino", "Snell Roundhand", cursive;
  font-size: 22px;
  font-weight: 400;
  letter-spacing: 0.02em;
  opacity: 0.92;
  filter: drop-shadow(0 0 7px rgba(150, 250, 205, 0.75));
}
.arc-title-svg {
  width: min(86vw, 560px);
  height: auto;
  overflow: visible;
  filter: drop-shadow(0 0 14px var(--title-glow));
}
.arc-title-text {
  font-family: "RuiScript", "Zapfino", "Snell Roundhand", cursive;
  font-size: 38px;
  font-weight: 400;
  letter-spacing: 0.02em;
}

/* 上方星空里的竖排滚动留言（只有文字，上下滚） */
.photo-marquee {
  position: fixed;
  top: clamp(96px, 17vh, 196px);
  left: clamp(20px, 5.5vw, 76px);
  width: 178px;
  height: 340px;
  z-index: 9;
  overflow: hidden;
  pointer-events: none;
  opacity: .9;
  -webkit-mask-image: linear-gradient(180deg, rgba(0,0,0,.34) 0px, rgba(0,0,0,.34) 16px, #000 17px, #000 323px, rgba(0,0,0,.34) 324px, rgba(0,0,0,.34) 340px);
  mask-image: linear-gradient(180deg, rgba(0,0,0,.34) 0px, rgba(0,0,0,.34) 16px, #000 17px, #000 323px, rgba(0,0,0,.34) 324px, rgba(0,0,0,.34) 340px);
}
.photo-marquee[hidden] { display: none; }
.marquee-track { display: flex; flex-direction: column; width: 100%; will-change: transform; }
.marquee-group { display: flex; flex-direction: column; }
.mq-line {
  font-size: 11px;
  line-height: 17px;
  height: 17px;
  letter-spacing: .01em;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  color: rgba(228, 255, 244, 0.72);
  text-shadow: 0 0 8px rgba(3, 14, 10, 0.9);
}
.mq-line b { color: #9cf3cc; font-weight: 500; }
@keyframes marquee-run { from { transform: translateY(0); } to { transform: translateY(-50%); } } to { transform: translateY(-50%); } }
/* 手机竖屏不出现 */
@media (max-width: 720px) and (orientation: portrait) {
  .photo-marquee { display: none; }
}
/* 底部提示文字已移除，只留纯净星空 */

/* 右侧可收起极简拉手胶囊（不占星空画面） */
.dock-tab {
  position: fixed;
  top: 22px;
  right: 18px;
  z-index: 16;
  height: 32px;
  padding: 0 13px;
  border-radius: 999px;
  border: 1px solid var(--glass-border);
  background: rgba(6, 13, 28, 0.44);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--text-main);
  font-size: 11.5px;
  letter-spacing: 1px;
  white-space: nowrap;
  cursor: pointer;
  transition: border-color .2s, transform .15s, background .2s, opacity .25s;
}
.dock-tab:hover { border-color: var(--accent); background: rgba(16, 28, 54, 0.72); }
.dock-tab:active { transform: scale(0.95); }
.dock-tab.hidden-tab { opacity: 0; pointer-events: none; transform: translateX(12px); }

/* 底部极简悬浮微光圆钮 */
.bottom-bar {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  z-index: 12;
  display: flex;
  gap: 10px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(6, 12, 26, 0.34);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: opacity .3s ease, transform .3s ease;
}
.bottom-bar.ui-hidden { opacity: 0; pointer-events: none; transform: translate(-50%, 16px); }
.orb-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
  font-size: 13.5px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all .2s;
}
.orb-btn:hover { border-color: var(--accent); box-shadow: 0 0 14px var(--title-glow); transform: translateY(-1px); }
.orb-btn.active { background: var(--accent-soft); border-color: var(--accent); color: #fff; box-shadow: 0 0 16px var(--title-glow); }

/* 底部圆钮栏：最右侧小箭头整条收起，留一个更淡的唤回点 */
.bottom-bar .bar-collapse {
  width: 22px;
  height: 22px;
  margin-left: 1px;
  border-color: rgba(255, 255, 255, 0.08);
  background: transparent;
  color: rgba(210, 240, 226, 0.5);
  font-size: 13px;
  line-height: 1;
}
.bottom-bar .bar-collapse:hover { color: var(--accent); border-color: var(--accent); box-shadow: none; transform: none; }
.bottom-bar.bar-hidden { opacity: 0; pointer-events: none; transform: translate(-50%, 30px); }
.bar-restore {
  position: fixed;
  left: 50%;
  bottom: 8px;
  transform: translateX(-50%);
  z-index: 12;
  width: 58px;
  height: 26px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(6, 12, 26, 0.3);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: rgba(190, 235, 214, 0.45);
  font-size: 10px;
  cursor: pointer;
  transition: all .25s ease;
}.bar-restore:hover, .bar-restore:active {
  color: var(--accent);
  border-color: var(--accent);
  background: rgba(16, 28, 54, 0.7);
}
.bar-restore[hidden] { display: none; }

/* 右侧滑出式透明侧边栏抽屉（默认收起不占画面） */
.dock {
  position: fixed;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 18;
  width: 204px;
  max-height: 86vh;
  overflow-y: auto;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid var(--glass-border);
  background: rgba(7, 14, 30, 0.68);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.48);
  display: flex;
  flex-direction: column;
  gap: 11px;
  transition: opacity .28s ease, transform .3s cubic-bezier(.22, .85, .32, 1);
}
.dock.ui-hidden { opacity: 0; pointer-events: none; transform: translate(230px, -50%); }
.dock-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.dock-title { font-size: 11.5px; color: var(--accent); letter-spacing: 1.5px; }
.dock-close {
  border: 0; background: transparent; color: var(--text-sub);
  font-size: 11px; cursor: pointer; padding: 2px 4px;
}
.dock-close:hover { color: #fff; }
.dock-label { font-size: 10px; color: var(--text-sub); letter-spacing: 1.8px; margin-bottom: 6px; }
.pill-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; }
.pill, .action-btn {
  border: 1px solid rgba(255, 255, 255, 0.11);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-main);
  border-radius: 8px;
  font-size: 11.5px;
  padding: 6px 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.1); border-color: var(--accent); }
.pill.active, .action-btn.active { background: var(--accent-soft); border-color: var(--accent); color: #fff; font-weight: 500; }
.action-col { display: flex; flex-direction: column; gap: 5px; }
.file-btn { display: block; }

.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); }

/* 模态与许愿卡片 */
.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;
}
.particle-frame {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: fill; pointer-events: none; z-index: 3;
  filter: drop-shadow(0 14px 30px rgba(0, 0, 0, 0.34)) drop-shadow(0 0 10px rgba(120, 255, 205, 0.22));
}
}
.polaroid-back .particle-frame {
  filter: drop-shadow(0 0 12px rgba(60, 240, 160, 0.24));
}
.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(150, 255, 205, 0.9) 18%, transparent 55%),
    linear-gradient(90deg, transparent 0%, rgba(190, 255, 222, 0.95) 50%, transparent 100%),
    linear-gradient(0deg, transparent 0%, rgba(190, 255, 222, 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: 13%; left: 50%; width: 26px; height: 26px; opacity: .8; }
.frame-glint.g-tl { top: 20%; left: 18%; animation-delay: 0.7s; }
.frame-glint.g-r { top: 40%; left: 92.5%; animation-delay: 1.4s; }
.frame-glint.g-br { top: 92%; left: 79%; 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: cover; pointer-events: none; z-index: 1;
  filter: brightness(1.02) saturate(1.06);
}
.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: #3f6b4e; }
.mini-btn { border: 1px solid rgba(96, 138, 86, 0.38); background: rgba(255, 255, 255, 0.68); color: #3f6b4e; border-radius: 999px; padding: 3px 10px; font-size: 11px; cursor: pointer; }
.mini-btn:hover { background: #fff; border-color: #6fa562; }
.note-content textarea {
  flex: 1; width: 100%; border: 0; background: transparent;
  color: #33523c; 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(70, 110, 80, 0.5); }
.back-foot { margin-top: 4px; text-align: right; font-size: 10.5px; color: #6f8f66; }

.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); }

/* 线性小图标（钻石银河雨等），替代突兀的 emoji */
.ico { width: 12px; height: 12px; vertical-align: -2px; margin-right: 4px; flex: none; }
.orb-btn .ico { width: 17px; height: 17px; margin-right: 0; vertical-align: 0; }

/* ===== 多人共享：树名 / 公·私切换 / 照片背面留言 ===== */
.tree-label {
  position: fixed;
  top: 8px;
  left: 18px;
  margin: 0;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid var(--glass-border);
  background: rgba(8, 16, 34, 0.55);
  backdrop-filter: blur(8px);
  font-size: 11.5px;
  letter-spacing: 1.5px;
  color: var(--accent);
  opacity: 0.92;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.75);
  pointer-events: none;
  max-width: 46vw;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dock-input {
  width: 100%;
  margin: 10px 0 8px;
  padding: 8px 12px;
  border-radius: 12px;
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-main);
  font-size: 12.5px;
  font-family: inherit;
  outline: none;
  box-sizing: border-box;
}
.dock-input::placeholder { color: var(--text-sub); }
.dock-input:focus { border-color: var(--accent); }

/* 背面：留言列表 + 输入 */
.note-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  margin: 2px 0 8px;
  padding-right: 2px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  -webkit-overflow-scrolling: touch;
}
.note-item {
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(110, 150, 100, 0.3);
  border-radius: 10px;
  padding: 7px 9px;
}
.note-name {
  font-size: 11px;
  color: #5d7f57;
  margin-bottom: 2px;
}
.note-mine {
  display: inline-block;
  margin-left: 4px;
  padding: 0 5px;
  border-radius: 999px;
  background: rgba(63, 224, 138, 0.22);
  color: #2f8a5b;
  font-size: 9px;
}
.note-text {
  font-size: 13px;
  line-height: 1.6;
  color: #33523c;
  word-break: break-word;
}
.note-empty {
  font-size: 11.5px;
  color: rgba(80, 115, 80, 0.65);
  text-align: center;
  padding: 14px 0;
}

.note-form { flex: none; display: flex; flex-direction: column; gap: 6px; }
.note-nick {
  width: 100%;
  border: 1px solid rgba(110, 150, 100, 0.35);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  color: #3d5c46;
  font-size: 12px;
  padding: 5px 9px;
  font-family: inherit;
  outline: none;
  box-sizing: border-box;
}
.note-form textarea {
  flex: none !important;
  height: 62px !important;
  border: 1px solid rgba(110, 150, 100, 0.35) !important;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72) !important;
  padding: 6px 9px;
  font-size: 13px !important;
  line-height: 1.55 !important;
  box-sizing: border-box;
}
.note-send { align-self: flex-end; }

/* ===== 手机自适应布局 ===== */
@media (max-width: 720px) {
  /* 顶部标题缩小，给树顶爱心留空间 */
  .top-header { top: 6px; }
  .arc-title-svg { width: 82vw; }
  .arc-title-text { font-size: 28px; }
  .above-title-text { font-size: 18px; letter-spacing: 0.02em; }
  .sub-title { display: none; }

  /* 树名胶囊：左上角，单行省略 */
  .tree-label {
    top: 10px;
    left: 10px;
    padding: 4px 10px;
    font-size: 11px;
    letter-spacing: 1px;
    max-width: 54vw;
    border-radius: 999px;
  }

  .dock-tab { top: 8px; right: 10px; height: 30px; padding: 0 11px; font-size: 11px; }

  /* 底部快捷圆钮：更小、贴近屏幕底、避开 iPhone 底部安全区 */
  .bottom-bar {
    bottom: calc(10px + env(safe-area-inset-bottom, 0px));
    gap: 6px;
    padding: 5px 9px;
    max-width: calc(100vw - 20px);
  }
  .orb-btn { width: 31px; height: 31px; font-size: 12.5px; }
  .orb-btn .ico { width: 15px; height: 15px; }
  .bar-restore { bottom: calc(6px + env(safe-area-inset-bottom, 0px)); }

  /* 侧栏改成底部上滑面板，铺满宽度，不用挤在右侧 */
  .dock {
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    max-height: 72vh;
    padding: 14px 16px calc(16px + env(safe-area-inset-bottom, 0px));
    border-radius: 18px 18px 0 0;
    border-left: 0;
    border-right: 0;
    border-bottom: 0;
    transform: translateY(0);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    z-index: 20;
  }
  .dock.ui-hidden { transform: translateY(105%); opacity: 0; }
  .dock .pill, .dock .action-btn { padding: 9px 6px; font-size: 12.5px; }
  .dock .dock-input { padding: 10px 12px; font-size: 13px; }
  .dock-head { position: sticky; top: 0; background: rgba(7, 14, 30, 0.9); z-index: 2; padding: 2px 0 8px; }

  /* 摄像头预览窗缩小，避免盖住底部按钮 */
  .cam-box { left: 10px; bottom: calc(56px + env(safe-area-inset-bottom, 0px)); width: 104px; }
  .cam-box video { height: 72px; }
  .cam-tag { font-size: 10px; padding: 4px 6px; }

  /* 许愿卡片铺满 */
  .modal-mask { padding: 12px; }
  .wish-card { width: 100%; max-height: 86vh; overflow-y: auto; padding: 16px; }
  .wish-card h3 { font-size: 16px; }

  /* 相框：竖屏下按高度取尺寸，上下留出导航 */
  .polaroid-stage { gap: 8px; width: 100%; }
  .polaroid-card {
    height: min(58vh, 470px);
    width: min(86vw, calc(min(58vh, 470px) * 0.7084));
  }
  .polaroid-meta { font-size: 11.5px; gap: 8px; }
  .polaroid-hint { font-size: 10px; max-width: 52vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .polaroid-nav { gap: 6px; padding-bottom: env(safe-area-inset-bottom, 0px); }
  .nav-btn { padding: 8px 12px; font-size: 11.5px; }

  /* 照片背面留言：手机上字号与输入框更紧凑 */
  .note-content { padding: 12% 9% 18% 9%; }
  .back-head { font-size: 11.5px; margin-bottom: 4px; gap: 4px; }
  .mini-btn { padding: 3px 8px; font-size: 10px; }
  .note-item { padding: 6px 8px; }
  .note-text { font-size: 12px; line-height: 1.5; }
  .note-form textarea { height: 52px !important; font-size: 12px !important; }
  .note-nick { font-size: 11.5px; padding: 4px 8px; }
  .back-foot { font-size: 9.5px; }
}

/* 很窄的小屏（iPhone SE 一类）再收一档 */
@media (max-width: 375px) {
  .arc-title-text { font-size: 28px; }
  .arc-title-svg { width: 86vw; }
  .orb-btn { width: 28px; height: 28px; font-size: 11.5px; }
  .bottom-bar { gap: 5px; padding: 4px 7px; }
  .polaroid-card { height: min(54vh, 400px); width: min(88vw, calc(min(54vh, 400px) * 0.7084)); }
  .nav-btn { padding: 7px 10px; font-size: 11px; }
  .dock .pill, .dock .action-btn { font-size: 12px; padding: 8px 5px; }
}

/* ===== 手机横屏（矮屏）：标题压顶不成块、侧栏靠右贴边、圆钮贴底、相框按高度收缩 ===== */
@media (orientation: landscape) and (max-height: 560px) {
  .top-header { top: 2px; }
  .arc-title-svg { width: min(38vw, 340px); }
  .arc-title-text { font-size: 25px; letter-spacing: .02em; }
  .above-title-text { font-size: 18px; letter-spacing: 0.02em; }
  .sub-title { display: none; }

  /* 树名胶囊：左上角缩到最小，避免和标题、菜单挤在一起 */
  .tree-label {
    top: 8px;
    left: 8px;
    padding: 3px 8px;
    font-size: 9.5px;
    letter-spacing: .5px;
    max-width: 30vw;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .dock-tab { top: 8px; right: 8px; height: 27px; padding: 0 10px; font-size: 10.5px; }

  /* 底部圆钮：靠左贴底，右侧永远留给控制台抽屉 */
  .bottom-bar {
    left: 8px;
    right: auto;
    bottom: calc(5px + env(safe-area-inset-bottom, 0px));
    transform: none;
    gap: 5px;
    padding: 4px 8px;
  }
  .bottom-bar.bar-hidden { transform: translateY(34px); }
  .orb-btn { width: 27px; height: 27px; font-size: 11.5px; }
  .orb-btn .ico { width: 13px; height: 13px; }
  .bottom-bar .bar-collapse { width: 19px; height: 19px; font-size: 11px; }
  .bar-restore { bottom: calc(4px + env(safe-area-inset-bottom, 0px)); height: 20px; width: 52px; font-size: 10px; }

  /* 侧栏：右侧贴边窄抽屉，纵向滚动，不再占满全屏 */
  .dock {
    top: 6px;
    bottom: 6px;
    left: auto;
    right: 6px;
    width: min(232px, 40vw);
    max-height: calc(100vh - 12px);
    padding: 9px 11px calc(10px + env(safe-area-inset-bottom, 0px));
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    transform: none;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    z-index: 20;
  }
  .dock.ui-hidden { transform: translateX(calc(100% + 14px)); opacity: 0; }
  .dock-head { padding-bottom: 6px; }
  .dock-title { font-size: 12px; }
  .dock-close { font-size: 10.5px; padding: 3px 8px; }
  .dock .dock-label { margin: 8px 0 5px; font-size: 10.5px; }
  .dock .pill, .dock .action-btn { padding: 6px 4px; font-size: 11px; }
  .dock .dock-input { padding: 7px 9px; font-size: 12px; }
  .dock-input, .pill, .action-btn { margin-bottom: 4px; }

  /* 摄像头窗塞到左下角，不与按钮栏重叠 */
  .cam-box { left: 8px; bottom: calc(42px + env(safe-area-inset-bottom, 0px)); width: 92px; }
  .cam-box video { height: 60px; }
  .cam-tag { font-size: 9px; padding: 3px 5px; }

  /* 许愿卡：横向铺开但不出屏 */
  .modal-mask { padding: 8px; }
  .wish-card { width: min(560px, 92vw); max-height: calc(100vh - 16px); overflow-y: auto; padding: 13px 16px; }
  .wish-card h3 { font-size: 15px; margin-bottom: 6px; }
  .wish-tip { font-size: 11px; margin-bottom: 8px; }
  .wish-card textarea { height: 52px; }

  /* 相框：以高度定尺寸，横向排布，导航不换行 */
  .polaroid-stage { width: 100%; gap: 5px; }
  .polaroid-card { height: min(70vh, 300px); width: calc(min(70vh, 300px) * 0.7084); }
  .polaroid-meta { font-size: 10px; gap: 6px; }
  .polaroid-hint { display: none; }
  .polaroid-nav { gap: 4px; flex-wrap: nowrap; padding-bottom: env(safe-area-inset-bottom, 0px); }
  .nav-btn { padding: 4px 8px; font-size: 10px; white-space: nowrap; }
  .note-content { padding: 9% 8%; }
  .back-head { font-size: 10.5px; }
  .note-text { font-size: 11px; }
  .note-form textarea { height: 42px !important; font-size: 11px !important; }
  .note-nick { font-size: 10.5px; }
}

/* 更窄的横屏（iPhone SE 一类 667×375）：圆钮再收一档，给右侧抽屉留净宽 */
@media (orientation: landscape) and (max-height: 480px) and (max-width: 760px) {
  .bottom-bar { gap: 4px; padding: 3px 6px; }
  .orb-btn { width: 25px; height: 25px; font-size: 10.5px; }
  .orb-btn .ico { width: 12px; height: 12px; }
  .bottom-bar .bar-collapse { width: 18px; height: 18px; font-size: 10px; }
  .arc-title-svg { width: min(42vw, 280px); }
  .arc-title-text { font-size: 28px; }
  .above-title-text { font-size: 19px; letter-spacing: 0.02em; }
  .dock { width: min(216px, 44vw); }
  .polaroid-card { height: min(72vh, 250px); width: calc(min(72vh, 250px) * 0.7084); }
}

/* 极细 ins 风相框：去掉旧满钻的四颗十字星芒 */.frame-glint { display: none !important; }

/* —— 我添加的图片面板 —— */
.my-photos-card {
  width: min(560px, 92vw);
  max-height: 82vh;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 20px 20px 16px;
  border-radius: 20px;
  background: rgba(8, 26, 20, 0.94);
  border: 1px solid rgba(120, 255, 205, 0.28);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.55), 0 0 26px rgba(90, 255, 190, 0.14);
  color: #e4fff4;
  backdrop-filter: blur(10px);
}
.my-photos-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 15px;
  letter-spacing: .04em;
  color: #c9ffe8;
}
.my-photos-tip {
  margin: 0;
  font-size: 11.5px;
  line-height: 1.6;
  color: rgba(200, 245, 226, 0.62);
}
.my-photos-list {
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-right: 4px;
}
.my-empty {
  padding: 26px 8px;
  text-align: center;
  font-size: 12.5px;
  color: rgba(200, 245, 226, 0.6);
}
.my-item {
  display: flex;
  gap: 12px;
  padding: 10px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(120, 255, 205, 0.16);
}
.my-thumb {
  width: 62px;
  height: 84px;
  flex: none;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid rgba(120, 255, 205, 0.22);
  background: rgba(0, 0, 0, 0.4);
}
.my-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.my-name { font-size: 12.5px; color: #b8ffe0; }
.my-sub { font-size: 11px; color: rgba(200, 245, 226, 0.5); }
.my-notes { display: flex; flex-direction: column; gap: 4px; margin-top: 2px; }
.my-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 11.5px;
  line-height: 1.5;
  color: rgba(232, 255, 246, 0.82);
}
.my-note-txt { flex: 1; min-width: 0; word-break: break-all; }
.my-note-txt b { color: #9cf3cc; font-weight: 500; }
.my-note-del {
  flex: none;
  padding: 1px 8px;
  font-size: 10.5px;
  border-radius: 999px;
  cursor: pointer;
  color: rgba(255, 200, 200, 0.9);
  background: rgba(255, 120, 120, 0.12);
  border: 1px solid rgba(255, 140, 140, 0.35);
}
.my-note-del:hover { background: rgba(255, 120, 120, 0.24); }
.my-note-empty { font-size: 11px; color: rgba(200, 245, 226, 0.42); }
.my-del {
  flex: none;
  align-self: center;
  padding: 6px 12px;
  font-size: 11.5px;
  border-radius: 999px;
  cursor: pointer;
  color: rgba(255, 208, 208, 0.95);
  background: rgba(255, 90, 90, 0.14);
  border: 1px solid rgba(255, 130, 130, 0.4);
}
.my-del:hover { background: rgba(255, 90, 90, 0.26); }
.my-del:disabled, .my-note-del:disabled { opacity: .45; cursor: default; }
.my-group {
  margin: 6px 0 2px;
  font-size: 11px;
  letter-spacing: .06em;
  color: rgba(160, 240, 210, 0.55);
}
.my-lock {
  flex: none;
  align-self: center;
  text-align: center;
  font-size: 10.5px;
  line-height: 1.4;
  color: rgba(200, 245, 226, 0.35);
}
