/* ========== 许愿树 · 银杏实景 + TiedStory 式沉浸 UI ========== */
#pageWish {
  background: #0a0c12;
  min-height: calc(100vh - 56px);
  overflow: hidden;
}
body.dark-theme #pageWish {
  background: #0a0c12;
}
.wish-page-wrap {
  max-width: none;
  margin: 0;
  padding: 0;
  height: calc(100vh - 56px);
  min-height: 480px;
}
.wish-scene {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #1a1410;
}
.wish-scene-bg {
  position: absolute;
  inset: 0;
  background: url('../bg-ginkgo-courtyard.jpg') center 36% / cover no-repeat;
}
.wish-scene-veil {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(108deg, rgba(10, 8, 6, 0.58) 0%, transparent 42%),
    linear-gradient(0deg, rgba(8, 6, 4, 0.62) 0%, transparent 32%),
    linear-gradient(180deg, rgba(8, 10, 14, 0.38) 0%, transparent 20%, transparent 58%, rgba(10, 8, 6, 0.42) 100%),
    radial-gradient(ellipse 72% 58% at 50% 34%, transparent 38%, rgba(0, 0, 0, 0.22) 100%);
  pointer-events: none;
}
.wish-scene-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 48% 42% at 50% 30%, rgba(255, 210, 100, 0.16) 0%, transparent 72%);
  pointer-events: none;
  mix-blend-mode: screen;
}

/* —— 顶部轻信息 —— */
.wish-scene-whisper {
  position: absolute;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 7;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  max-width: calc(100% - 32px);
  pointer-events: none;
}
.wish-whisper-chip {
  font-size: 10px;
  letter-spacing: 0.08em;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(12, 10, 8, 0.45);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 220, 150, 0.12);
  color: rgba(240, 232, 215, 0.82);
  white-space: nowrap;
}

/* —— 左下主控 dock —— */
.wish-hero-dock {
  position: absolute;
  left: 20px;
  bottom: 22px;
  z-index: 10;
  width: min(292px, calc(100% - 40px));
  pointer-events: none;
}
.wish-hero-glass {
  pointer-events: auto;
  padding: 18px 20px 16px;
  background: linear-gradient(152deg, rgba(16, 12, 8, 0.78) 0%, rgba(24, 18, 12, 0.62) 100%);
  backdrop-filter: blur(22px) saturate(1.15);
  -webkit-backdrop-filter: blur(22px) saturate(1.15);
  border: 1px solid rgba(255, 220, 150, 0.14);
  border-left: 3px solid rgba(212, 168, 64, 0.62);
  border-radius: 16px;
  box-shadow:
    0 18px 48px rgba(0, 0, 0, 0.38),
    inset 0 1px 0 rgba(255, 255, 255, 0.07);
}
.wish-hero-eyebrow {
  margin: 0 0 6px;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: rgba(232, 184, 74, 0.78);
}
.wish-hero-title {
  margin: 0 0 8px;
  font-size: 28px;
  font-weight: 300;
  letter-spacing: 0.18em;
  line-height: 1.15;
  color: #faf3e8 !important;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.35);
}
.wish-hero-lead {
  margin: 0 0 14px;
  font-size: 12px;
  line-height: 1.65;
  color: rgba(235, 226, 210, 0.76);
}
.wish-hero-toolbar {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}
.wish-hero-cta {
  flex: 1;
  min-height: 40px;
  padding: 0 16px;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: #2a2010;
  background: linear-gradient(135deg, #f2d878 0%, #d4a840 52%, #c09028 100%);
  box-shadow: 0 4px 18px rgba(200, 150, 40, 0.38);
  transition: transform 0.15s ease, box-shadow 0.2s ease;
}
.wish-hero-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(220, 170, 50, 0.48);
}
.wish-hero-ghost {
  flex-shrink: 0;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(240, 235, 225, 0.82);
  font-size: 12px;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.wish-hero-ghost:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 220, 140, 0.28);
  color: #ffe8b0;
}
.wish-hero-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.wish-hero-pill {
  font-size: 11px;
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.07);
  color: rgba(240, 235, 225, 0.88);
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
  font-family: inherit;
}
.wish-hero-pill:hover {
  background: rgba(255, 255, 255, 0.13);
  border-color: rgba(255, 220, 140, 0.32);
}
.wish-hero-pill--accent {
  border-color: rgba(255, 200, 100, 0.38);
  color: #ffe8b0;
  cursor: default;
}

/* —— 枝头丝带心愿牌 —— */
.wish-ribbons {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
}
.wish-ribbon {
  position: absolute;
  transform: translate(-50%, 0) rotate(var(--rot, 0deg));
}
.wish-ribbon-string {
  display: block;
  width: 2px;
  height: var(--string, 32px);
  margin: 0 auto;
  background: linear-gradient(180deg, rgba(180, 160, 120, 0.5), rgba(120, 100, 70, 0.8));
  border-radius: 1px;
}
.wish-ribbon-tag {
  display: block;
  max-width: 88px;
  padding: 6px 8px;
  font-size: 10px;
  line-height: 1.35;
  text-align: center;
  color: rgba(30, 25, 20, 0.9);
  background: var(--tag-bg, rgba(255, 230, 160, 0.92));
  border-radius: 4px;
  box-shadow: 0 0 12px var(--tag-glow, rgba(255, 200, 80, 0.45)), 0 2px 8px rgba(0, 0, 0, 0.25);
  word-break: break-all;
  backdrop-filter: blur(4px);
}

/* —— 漂浮心愿卡片 —— */
.wish-float-card {
  position: absolute;
  right: 16px;
  bottom: 100px;
  z-index: 9;
  max-width: min(280px, calc(100% - 32px));
  padding: 14px 16px 12px;
  background: rgba(12, 14, 22, 0.72);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-top: 2px solid rgba(255, 200, 90, 0.65);
  border-radius: 12px;
  color: rgba(240, 235, 225, 0.9);
  font-size: 13px;
  line-height: 1.5;
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.4);
  display: none;
  pointer-events: none;
}
.wish-float-card.is-visible { display: block; }
.wish-float-card time {
  display: block;
  margin-top: 8px;
  font-size: 11px;
  color: rgba(200, 195, 185, 0.55);
}

.wish-scene-credit {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 6;
  font-size: 9px;
  letter-spacing: 0.06em;
  color: rgba(220, 215, 205, 0.42);
  pointer-events: none;
  white-space: nowrap;
}

/* —— 撰写心愿浮层 —— */
  .wish-compose-sheet {
    position: absolute;
    left: 50%;
    bottom: 0;
    z-index: 20;
    width: min(440px, calc(100% - 24px));
    transform: translate(-50%, 110%);
    transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1), visibility 0.32s ease;
    background: linear-gradient(165deg, rgba(18, 14, 10, 0.94) 0%, rgba(24, 18, 12, 0.9) 100%);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 220, 150, 0.16);
    border-top: 2px solid rgba(212, 168, 64, 0.45);
    border-radius: 18px 18px 0 0;
    padding: 18px 20px 22px;
    box-shadow: 0 -12px 48px rgba(0, 0, 0, 0.45);
    pointer-events: none;
    visibility: hidden;
  }
.wish-compose-sheet.is-open {
  transform: translate(-50%, 0);
  pointer-events: auto;
  visibility: visible;
}
.wish-compose-sheet-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
  .wish-compose-sheet-hd h3 {
    margin: 0;
    font-size: 15px;
    font-weight: 500;
    letter-spacing: 0.06em;
    color: #faf3e8;
  }
.wish-compose-close {
  width: auto;
  min-width: 28px;
  height: 28px;
  padding: 0 10px;
  border: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(230, 225, 215, 0.8);
  font-size: 12px;
  cursor: pointer;
  line-height: 28px;
  white-space: nowrap;
}
.wish-compose-close:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #ffe8b0;
}
.wish-compose-sheet textarea {
  width: 100%;
  min-height: 80px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 220, 140, 0.2);
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.55;
  resize: none;
  background: rgba(255, 255, 255, 0.05);
  color: #f0e8d8;
  outline: none;
  box-sizing: border-box;
}
.wish-compose-sheet textarea::placeholder {
  color: rgba(220, 200, 160, 0.4);
}
.wish-compose-sheet textarea:focus {
  border-color: rgba(240, 200, 100, 0.55);
}
.wish-compose-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
}
.wish-compose-count {
  font-size: 11px;
  color: rgba(200, 190, 170, 0.5);
}
.wish-compose-sheet .wish-submit {
  padding: 9px 22px;
  border: none;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  color: #2a2010;
  background: linear-gradient(135deg, #f0d070, #c89830);
}

/* —— 全部心愿列表浮层 —— */
.wish-list-overlay {
  position: absolute;
  inset: 0;
  z-index: 25;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(4, 6, 12, 0.65);
  backdrop-filter: blur(6px);
  pointer-events: auto;
}
.wish-list-overlay.is-open { display: flex; }
.wish-list-panel {
  width: min(400px, 100%);
  max-height: min(70vh, 520px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0;
  background: rgba(14, 16, 24, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}
.wish-list-panel-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  font-size: 13px;
  color: rgba(230, 225, 215, 0.8);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin: 0;
}
.wish-list {
  margin: 0;
  padding: 8px 0;
  overflow-y: auto;
  max-height: none;
  flex: 1;
}
.wish-item {
  padding: 10px 16px;
  font-size: 13px;
  line-height: 1.5;
  color: rgba(235, 230, 220, 0.82);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  gap: 8px;
  align-items: flex-start;
}
.wish-item:last-child { border-bottom: none; }
.wish-item::before {
  content: '🎗';
  flex-shrink: 0;
  font-size: 12px;
}

.wish-tree-empty-hint {
  position: absolute;
  left: 50%;
  top: 38%;
  transform: translateX(-50%);
  z-index: 6;
  font-size: 13px;
  color: rgba(255, 245, 230, 0.75);
  padding: 10px 18px;
  background: rgba(12, 14, 22, 0.55);
  border-radius: 24px;
  border: 1px solid rgba(255, 220, 140, 0.2);
  backdrop-filter: blur(10px);
  pointer-events: none;
  white-space: nowrap;
}

@media (max-width: 767px) {
  .wish-scene-whisper {
    top: 12px;
    left: 16px;
    right: 16px;
    transform: none;
    justify-content: flex-start;
  }
  .wish-hero-dock {
    left: 16px;
    right: 16px;
    bottom: calc(var(--mob-tab-total, 56px) + 12px) !important;
    width: auto;
  }
  .wish-hero-glass {
    padding: 16px 16px 14px;
    border-radius: 14px;
  }
  .wish-hero-title {
    font-size: 22px;
    letter-spacing: 0.14em;
  }
  .wish-hero-toolbar {
    flex-direction: column;
  }
  .wish-hero-cta,
  .wish-hero-ghost {
    width: 100%;
    min-height: 44px;
  }
  .wish-float-card {
    right: 10px;
    bottom: 88px;
    max-width: calc(100% - 20px);
  }
  .wish-ribbon-tag { max-width: 72px; font-size: 9px; }
  .wish-scene-credit {
    bottom: calc(env(safe-area-inset-bottom, 0px) + 6px);
    font-size: 8px;
  }
}
