/* ============================================================
   囍事台 · 交互增强层
   命令面板 / 快捷添加 / 提示条 / 照片墙 / 微动效
   ============================================================ */

/* ---------- 全局隐藏滚动条（保留可滚动） ---------- */
* {
  scrollbar-width: none;
  -ms-overflow-style: none;
}
*::-webkit-scrollbar {
  width: 0 !important;
  height: 0 !important;
  display: none !important;
  background: transparent !important;
}

/* ---------- Toast ---------- */
.toast-wrap {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
  pointer-events: none;
  width: min(420px, calc(100% - 32px));
}

.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  background: rgba(46, 26, 32, 0.92);
  color: var(--cream, #FFFDF8);
  border-radius: 999px;
  font-size: 13.5px;
  letter-spacing: 0.04em;
  box-shadow: 0 12px 40px rgba(26, 9, 16, 0.35);
  border: 1px solid rgba(232, 213, 168, 0.28);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  animation: toastIn 0.45s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: auto;
  max-width: 100%;
}

.toast.out {
  animation: toastOut 0.35s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.toast-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold, #C49A5B);
  flex-shrink: 0;
  box-shadow: 0 0 0 3px rgba(196, 154, 91, 0.25);
}

.toast.success .toast-dot { background: #6FBF88; box-shadow: 0 0 0 3px rgba(111, 191, 136, 0.25); }
.toast.warn .toast-dot { background: #E0A85C; }
.toast.error .toast-dot { background: #E07A7A; }

@keyframes toastIn {
  from { opacity: 0; transform: translateY(-16px) scale(0.94); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes toastOut {
  to { opacity: 0; transform: translateY(-10px) scale(0.96); }
}

/* ---------- Command Palette ---------- */
.cmdk-mask {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(26, 9, 16, 0.45);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 12vh 16px 16px;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.cmdk-mask.show {
  display: flex;
  opacity: 1;
}

.cmdk {
  width: min(560px, 100%);
  background: var(--cream, #FFFDF8);
  border-radius: 18px;
  box-shadow: 0 30px 80px rgba(26, 9, 16, 0.4);
  border: 1px solid rgba(232, 213, 168, 0.5);
  overflow: hidden;
  transform: translateY(-12px) scale(0.98);
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  display: flex;
  flex-direction: column;
  max-height: min(70vh, 520px);
}

.cmdk-mask.show .cmdk {
  transform: translateY(0) scale(1);
}

.cmdk-input-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line, rgba(139, 38, 53, 0.12));
}

.cmdk-input-row svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  opacity: 0.45;
}

.cmdk-input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-size: 16px;
  color: var(--ink, #2E1A20);
  font-family: inherit;
}

.cmdk-input::placeholder {
  color: var(--ink-mute, #A88A92);
}

.cmdk-kbd {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--bg-soft, #F3E7DC);
  color: var(--ink-mute, #A88A92);
  letter-spacing: 0.06em;
  border: 1px solid var(--line, rgba(139, 38, 53, 0.12));
}

.cmdk-list {
  overflow-y: auto;
  padding: 8px;
  flex: 1;
}

.cmdk-group {
  padding: 10px 12px 6px;
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--ink-mute, #A88A92);
}

.cmdk-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.15s;
}

.cmdk-item:hover,
.cmdk-item.active {
  background: rgba(139, 38, 53, 0.08);
}

.cmdk-item.active {
  background: rgba(139, 38, 53, 0.12);
}

.cmdk-icon {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--bg-soft, #F3E7DC);
  color: var(--wine, #8B2635);
  font-size: 13px;
  font-weight: 600;
  flex-shrink: 0;
}

.cmdk-body { flex: 1; min-width: 0; }

.cmdk-title {
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cmdk-sub {
  font-size: 11.5px;
  color: var(--ink-mute, #A88A92);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cmdk-tag {
  font-size: 10.5px;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(196, 154, 91, 0.14);
  color: var(--gold-deep, #9A7539);
  letter-spacing: 0.08em;
  flex-shrink: 0;
}

.cmdk-empty {
  padding: 32px 16px;
  text-align: center;
  color: var(--ink-mute, #A88A92);
  font-size: 13.5px;
}

/* ---------- FAB 快捷添加 ---------- */
.fab-wrap {
  position: fixed;
  left: 22px;
  bottom: 22px;
  z-index: 90;
  display: flex;
  flex-direction: column-reverse;
  align-items: center;
  gap: 12px;
}

.fab-main {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(140deg, var(--wine, #8B2635), var(--wine-deep, #5C1622));
  color: var(--cream, #FFFDF8);
  font-size: 26px;
  line-height: 1;
  display: grid;
  place-items: center;
  box-shadow: 0 14px 36px rgba(139, 38, 53, 0.4);
  border: 1px solid rgba(232, 213, 168, 0.35);
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s;
  cursor: pointer;
  position: relative;
  z-index: 2;
}

.fab-main:hover {
  transform: scale(1.06);
  box-shadow: 0 18px 44px rgba(139, 38, 53, 0.5);
}

.fab-main.open {
  transform: rotate(45deg) scale(1.02);
}

.fab-main .fab-plus {
  display: block;
  transition: transform 0.3s;
  font-weight: 300;
}

.fab-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px) scale(0.9);
  transition: all 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}

.fab-wrap.open .fab-actions {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.fab-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px 10px 12px;
  background: var(--cream, #FFFDF8);
  border: 1px solid rgba(232, 213, 168, 0.55);
  border-radius: 999px;
  font-size: 13px;
  color: var(--ink, #2E1A20);
  box-shadow: 0 10px 28px rgba(26, 9, 16, 0.14);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}

.fab-item:hover {
  transform: translateX(4px) scale(1.03);
  border-color: var(--gold, #C49A5B);
  box-shadow: 0 12px 32px rgba(196, 154, 91, 0.3);
}

.fab-item .fab-ico {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(139, 38, 53, 0.1);
  color: var(--wine, #8B2635);
  font-size: 13px;
  font-weight: 600;
}

/* ---------- Quick input (清单顶部) ---------- */
.quick-add-row {
  display: flex;
  gap: 10px;
  align-items: center;
  background: var(--card, #fff);
  border: 1.5px dashed rgba(196, 154, 91, 0.5);
  border-radius: 16px;
  padding: 6px 6px 6px 18px;
  margin-bottom: 16px;
  transition: all 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.quick-add-row:focus-within {
  border-style: solid;
  border-color: var(--gold, #C49A5B);
  box-shadow: 0 8px 28px rgba(196, 154, 91, 0.2);
  transform: translateY(-1px);
}

.quick-add-input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-size: 15px;
  padding: 12px 0;
  color: var(--ink, #2E1A20);
  font-family: inherit;
}

.quick-add-input::placeholder {
  color: var(--ink-mute, #A88A92);
}

.quick-add-hint {
  font-size: 11px;
  color: var(--ink-mute, #A88A92);
  padding: 0 10px;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

/* ---------- Inline editable ---------- */
.editable {
  cursor: text;
  border-radius: 6px;
  padding: 1px 4px;
  margin: -1px -4px;
  transition: background 0.2s, box-shadow 0.2s;
  outline: none;
  min-width: 2em;
  display: inline-block;
}

.editable:hover {
  background: rgba(196, 154, 91, 0.1);
  box-shadow: inset 0 -1.5px 0 rgba(196, 154, 91, 0.55);
}

.editable:focus {
  background: rgba(196, 154, 91, 0.14);
  box-shadow: inset 0 -1.5px 0 var(--gold, #C49A5B);
}

.editable-input {
  font: inherit;
  color: inherit;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--gold, #C49A5B);
  border-radius: 6px;
  padding: 1px 6px;
  outline: none;
  width: auto;
  min-width: 6em;
  max-width: 100%;
}

/* ---------- 今日行动 (dashboard) ---------- */
.action-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  background: var(--card, #fff);
  border: 1px solid var(--line, rgba(139, 38, 53, 0.12));
  border-radius: 16px;
  transition: all 0.32s cubic-bezier(0.22, 1, 0.36, 1);
  overflow: hidden;
  cursor: default;
}

.action-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, var(--gold, #C49A5B), var(--wine, #8B2635));
  opacity: 0;
  transition: opacity 0.3s;
}

.action-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 36px rgba(74, 21, 32, 0.1);
  border-color: rgba(196, 154, 91, 0.4);
}

.action-card:hover::before { opacity: 1; }

.action-card .check { margin-top: 0; }

.action-card.done {
  opacity: 0.55;
  background: var(--bg-soft, #F3E7DC);
}

.action-card.done .item-title {
  text-decoration: line-through;
  text-decoration-color: var(--gold, #C49A5B);
}

/* ---------- 数字动效 ---------- */
.count-up {
  display: inline-block;
  font-variant-numeric: tabular-nums;
}

/* ---------- 卡片 3D 倾斜 ---------- */
.tilt {
  transform-style: preserve-3d;
  will-change: transform;
}

.tilt-inner {
  transform: translateZ(12px);
}

/* ---------- 金光扫过 ---------- */
.shimmer {
  position: relative;
  overflow: hidden;
}

.shimmer::after {
  content: "";
  position: absolute;
  inset: -50%;
  background: linear-gradient(
    115deg,
    transparent 42%,
    rgba(255, 246, 228, 0.14) 48%,
    rgba(255, 246, 228, 0.32) 50%,
    rgba(255, 246, 228, 0.14) 52%,
    transparent 58%
  );
  transform: translateX(-70%) rotate(8deg);
  animation: shimmerSweep 6s ease-in-out infinite;
  pointer-events: none;
}

@keyframes shimmerSweep {
  0%, 100% { transform: translateX(-70%) rotate(8deg); opacity: 0; }
  40% { opacity: 1; }
  60% { opacity: 1; }
  90% { transform: translateX(70%) rotate(8deg); opacity: 0; }
}

/* ---------- 章节入场 stagger ---------- */
.stagger > * {
  opacity: 0;
  transform: translateY(16px);
  animation: fadeUp 0.55s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.stagger > *:nth-child(1) { animation-delay: 0.02s; }
.stagger > *:nth-child(2) { animation-delay: 0.07s; }
.stagger > *:nth-child(3) { animation-delay: 0.12s; }
.stagger > *:nth-child(4) { animation-delay: 0.17s; }
.stagger > *:nth-child(5) { animation-delay: 0.22s; }
.stagger > *:nth-child(6) { animation-delay: 0.27s; }
.stagger > *:nth-child(7) { animation-delay: 0.32s; }
.stagger > *:nth-child(8) { animation-delay: 0.37s; }

/* ---------- 导航滑块 ---------- */
.nav {
  position: sticky;
  top: 14px;
  z-index: 50;
  width: min(1180px, calc(100% - 24px));
  margin: -28px auto 0;
  background: rgba(255, 253, 248, 0.88);
  backdrop-filter: blur(18px) saturate(1.2);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
  border: 1px solid rgba(232, 213, 168, 0.55);
  border-radius: 999px;
  box-shadow: 0 12px 40px rgba(74, 21, 32, 0.1);
  padding: 8px;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-list {
  display: flex;
  gap: 4px;
  min-width: 0;
  flex: 1;
  justify-content: center;
  position: relative;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.nav-list::-webkit-scrollbar { display: none; width: 0; height: 0; }

.nav-indicator {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--wine, #8B2635), var(--wine-deep, #5C1622));
  box-shadow: 0 8px 22px rgba(139, 38, 53, 0.28);
  transition: transform 0.38s cubic-bezier(0.22, 1, 0.36, 1), width 0.38s cubic-bezier(0.22, 1, 0.36, 1);
  z-index: 0;
  pointer-events: none;
}

.nav-btn {
  position: relative;
  padding: 10px 16px;
  border-radius: 999px;
  font-size: 13px;
  letter-spacing: 0.06em;
  color: var(--ink-soft, #7A5560);
  white-space: nowrap;
  transition: color 0.28s ease, background 0.28s ease;
  z-index: 1;
  background: transparent;
}

.nav-btn:hover {
  color: var(--wine, #8B2635);
  background: rgba(139, 38, 53, 0.05);
}

.nav-btn.active {
  color: var(--cream, #FFFDF8);
  background: transparent;
  box-shadow: none;
}

.nav-btn.active:hover {
  background: transparent;
}

/* ---------- 搜索按钮 (nav) ---------- */
.nav-search-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--ink-soft, #7A5560);
  background: rgba(139, 38, 53, 0.05);
  border: 1px solid transparent;
  transition: all 0.25s;
  flex-shrink: 0;
  cursor: pointer;
  margin-left: 6px;
}

.nav-search-btn:hover {
  color: var(--wine, #8B2635);
  background: rgba(139, 38, 53, 0.1);
  border-color: rgba(196, 154, 91, 0.4);
  transform: scale(1.05);
}

.nav-search-btn svg {
  width: 16px;
  height: 16px;
}

/* ============================================================
   照片墙
   ============================================================ */
.photo-section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.photo-wall {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 190px;
  gap: 14px;
}

.photo-wall .photo-card:nth-child(1) { grid-column: span 2; grid-row: span 2; }
.photo-wall .photo-card:nth-child(4) { grid-column: span 1; grid-row: span 1; }
.photo-wall .photo-card:nth-child(5) { grid-column: span 1; grid-row: span 1; }

.photo-card {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  cursor: pointer;
  perspective: 1000px;
  background: var(--bg-soft, #F3E7DC);
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.4s;
  border: 1px solid var(--line, rgba(139, 38, 53, 0.12));
}

.photo-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 22px 48px rgba(74, 21, 32, 0.18);
  z-index: 2;
}

.photo-card.flipped .photo-card-inner {
  transform: rotateY(180deg);
}

.photo-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
  transform-style: preserve-3d;
}

.photo-front,
.photo-back {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.photo-front {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.photo-front img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 15%;
  transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.photo-card:hover .photo-front img {
  transform: scale(1.06);
}

.photo-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--ink-mute, #A88A92);
  font-size: 12.5px;
  letter-spacing: 0.12em;
  background:
    radial-gradient(ellipse at 30% 20%, rgba(196, 154, 91, 0.16), transparent 55%),
    linear-gradient(145deg, var(--bg-soft, #F3E7DC), var(--bg, #FBF5EF));
}

.photo-placeholder .ph-xi {
  font-family: var(--font-display, serif);
  font-size: 34px;
  color: var(--gold, #C49A5B);
  opacity: 0.7;
  line-height: 1;
}

.photo-back {
  transform: rotateY(180deg);
  background: linear-gradient(160deg, var(--wine-deep, #5C1622), var(--bg-mid, #4A1520));
  color: var(--cream, #FFFDF8);
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  gap: 8px;
}

.photo-back .pb-title {
  font-family: var(--font-display, serif);
  font-size: 16px;
  letter-spacing: 0.12em;
  color: var(--gold-light, #E8D5A8);
}

.photo-back .pb-cap {
  font-size: 12px;
  line-height: 1.7;
  opacity: 0.82;
}

.photo-back .pb-date {
  font-size: 11px;
  letter-spacing: 0.22em;
  opacity: 0.55;
  margin-top: 6px;
}

.photo-card .photo-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(26, 9, 16, 0.45);
  color: var(--gold-light, #E8D5A8);
  font-size: 10px;
  letter-spacing: 0.16em;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 2;
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 250;
  background: rgba(26, 9, 16, 0.88);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 28px;
  opacity: 0;
  transition: opacity 0.3s ease;
  cursor: zoom-out;
}

.lightbox.show {
  display: flex;
  opacity: 1;
}

.lightbox img {
  max-width: min(92vw, 1000px);
  max-height: 82vh;
  border-radius: 12px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
  object-fit: contain;
  cursor: default;
  animation: lightboxIn 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.lightbox-caption {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--cream, #FFFDF8);
  font-size: 13.5px;
  letter-spacing: 0.12em;
  text-align: center;
  max-width: 80vw;
}

.lightbox-close {
  position: absolute;
  top: 22px;
  right: 22px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: var(--cream, #FFFDF8);
  font-size: 18px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.2);
  cursor: pointer;
  transition: all 0.25s;
}

.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.22);
  transform: scale(1.08);
}

@keyframes lightboxIn {
  from { transform: scale(0.92); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

/* ---------- Hero 视差 ---------- */
.hero-inner {
  transition: transform 0.15s ease-out;
  will-change: transform;
}

.hero-rings {
  transition: transform 0.2s ease-out;
  will-change: transform;
}

/* ---------- 按钮按压反馈 ---------- */
.btn, .chip, .nav-btn, .fab-main, .fab-item, .icon-btn {
  -webkit-tap-highlight-color: transparent;
}

.btn:active, .chip:active, .fab-item:active {
  transform: scale(0.96);
}

.btn-primary:active, .btn-gold:active {
  transform: scale(0.95);
}

/* ---------- 空状态 ---------- */
.empty-state {
  padding: 48px 20px;
  text-align: center;
  color: var(--ink-mute, #A88A92);
}

.empty-state .empty-xi {
  font-family: var(--font-display, serif);
  font-size: 42px;
  color: var(--gold, #C49A5B);
  opacity: 0.55;
  margin-bottom: 10px;
}

/* ---------- 章节标题装饰 ---------- */
.section-title {
  position: relative;
}

.section-title .en {
  display: block;
  font-family: var(--font-body, sans-serif);
  font-size: 12px;
  letter-spacing: 0.22em;
  color: var(--gold-deep, #9A7539);
  font-weight: 500;
  margin-bottom: 6px;
  text-transform: uppercase;
}

/* ---------- 3D 场景占位（子模块会覆盖） ---------- */
.scene3d-root {
  width: 100%;
  height: 420px;
  border-radius: 20px;
  overflow: hidden;
  background: radial-gradient(ellipse at 50% 20%, rgba(196, 154, 91, 0.18), transparent 55%),
    linear-gradient(165deg, var(--bg-deep, #1A0910), var(--bg-mid, #4A1520));
  position: relative;
}

/* ---------- AI 助手入口提示 ---------- */
.assistant-hint {
  position: fixed;
  right: 22px;
  bottom: 90px;
  z-index: 89;
  padding: 10px 16px;
  background: rgba(255, 253, 248, 0.95);
  border: 1px solid rgba(232, 213, 168, 0.6);
  border-radius: 999px;
  font-size: 12.5px;
  color: var(--ink-soft, #7A5560);
  box-shadow: 0 12px 32px rgba(26, 9, 16, 0.12);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  animation: hintFloat 3s ease-in-out infinite;
}

.assistant-hint:hover {
  transform: translateY(-3px);
  border-color: var(--gold, #C49A5B);
  box-shadow: 0 16px 40px rgba(196, 154, 91, 0.25);
}

.assistant-hint.hide {
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
}

@keyframes hintFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

/* ---------- 响应式 ---------- */
@media (max-width: 960px) {
  .photo-wall {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 160px;
  }
  .photo-wall .photo-card:nth-child(1) {
    grid-column: span 2;
    grid-row: span 2;
  }
}

@media (max-width: 680px) {
  .fab-wrap {
    left: 14px;
    bottom: 14px;
  }
  .fab-main {
    width: 50px;
    height: 50px;
    font-size: 22px;
  }
  .cmdk-mask {
    padding: 8vh 10px 10px;
  }
  .photo-wall {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    grid-auto-rows: 140px;
  }
  .photo-wall .photo-card:nth-child(1) {
    grid-column: span 2;
    grid-row: span 1;
    min-height: 200px;
  }
  .scene3d-root {
    height: 320px;
  }
  .assistant-hint {
    right: 14px;
    bottom: 80px;
    font-size: 11.5px;
    padding: 8px 12px;
  }
  .nav-search-btn {
    display: none;
  }
  .quick-add-hint {
    display: none;
  }
}

/* ============================================================
   礼谱 · 全屏传统礼簿展示模式（重做）
   ============================================================ */
.ledger-fullscreen {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  flex-direction: column;
}

.ledger-bg {
  position: absolute;
  inset: 0;
  background: #F5EDE0;
  background-image:
    repeating-linear-gradient(90deg, transparent, transparent 80px, rgba(139,38,53,0.025) 80px, rgba(139,38,53,0.025) 81px),
    repeating-linear-gradient(0deg, transparent, transparent 80px, rgba(139,38,53,0.018) 80px, rgba(139,38,53,0.018) 81px);
}

.ledger-header {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 48px 32px 20px;
}

.ledger-title-big {
  font-family: 'Kaiti SC', 'STKaiti', 'KaiTi', 'DFKai-SB', 'SimSun', serif;
  font-size: 52px;
  font-weight: 700;
  color: #2A1218;
  letter-spacing: 28px;
  text-indent: 28px;
}

.ledger-subtitle {
  margin-top: 12px;
  font-family: 'Kaiti SC', 'STKaiti', 'KaiTi', serif;
  font-size: 20px;
  color: #6B3A42;
  letter-spacing: 12px;
  text-indent: 12px;
}

.ledger-close {
  position: absolute;
  right: 32px;
  top: 48px;
  padding: 8px 28px;
  border: 1px solid rgba(107, 58, 66, 0.3);
  border-radius: 999px;
  font-size: 14px;
  color: #6B3A42;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: all 0.25s;
}
.ledger-close:hover {
  background: rgba(107, 58, 66, 0.1);
  border-color: #6B3A42;
}

.ledger-pages-wrap {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  align-items: stretch;
  overflow: hidden;
  padding: 0 60px;
}

.ledger-nav {
  width: 48px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  color: #8B2635;
  opacity: 0.4;
  cursor: pointer;
  transition: opacity 0.25s;
  background: none;
  border: none;
  user-select: none;
}
.ledger-nav:hover { opacity: 0.8; }

.ledger-page-content {
  flex: 1;
  display: flex;
  flex-direction: row-reverse;
  justify-content: center;
  gap: 0;
  overflow-x: auto;
  padding: 20px 0;
  scrollbar-width: none;
}
.ledger-page-content::-webkit-scrollbar { display: none; }

.ledger-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  min-width: 72px;
  padding: 20px 14px;
  flex-shrink: 0;
}

.ledger-name {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.ledger-char {
  font-family: 'Kaiti SC', 'STKaiti', 'KaiTi', 'DFKai-SB', 'SimSun', serif;
  font-size: 28px;
  color: #1A0A0E;
  line-height: 1.5;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
  font-weight: 700;
}

.ledger-line {
  width: 2px;
  height: 40px;
  background: linear-gradient(180deg, transparent, #8B2635, transparent);
  border-radius: 2px;
  opacity: 0.3;
}

.ledger-amount {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.ledger-amount .ledger-char {
  font-size: 22px;
  color: #2A1218;
  font-weight: 400;
}

.ledger-footer {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 48px;
  padding-bottom: calc(20px + env(safe-area-inset-bottom));
  border-top: 1px solid rgba(107, 58, 66, 0.15);
}

.ledger-page-num {
  font-size: 14px;
  color: #6B3A42;
  letter-spacing: 4px;
}

.ledger-total {
  font-family: 'Kaiti SC', 'STKaiti', 'KaiTi', serif;
  font-size: 18px;
  color: #2A1218;
  letter-spacing: 4px;
}

@media (max-width: 680px) {
  .ledger-title-big { font-size: 32px; letter-spacing: 16px; text-indent: 16px; }
  .ledger-subtitle { font-size: 14px; }
  .ledger-pages-wrap { padding: 0 36px; }
  .ledger-col { min-width: 52px; padding: 12px 8px; }
  .ledger-char { font-size: 22px; }
  .ledger-amount .ledger-char { font-size: 18px; }
  .ledger-close { top: 20px; right: 16px; padding: 6px 18px; font-size: 12px; }
}


/* ==== 礼簿展示模式（大气版） ==== */
#gift-display-mode { display: none; }
#gift-display-mode.active { display: block !important; }
#gift-display-mode.active .ledger-fullscreen {
  position: fixed !important;
  top: 0 !important; left: 0 !important; right: 0 !important; bottom: 0 !important;
  width: 100vw !important; height: 100vh !important;
  z-index: 9999 !important;
  background: #F5EDDF !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden;
}

.ledger-bg {
  position: absolute; top: 0; left: 0; right: 0; bottom: 0;
  background-image:
    repeating-linear-gradient(90deg, transparent, transparent 120px, rgba(139,38,53,0.03) 120px, rgba(139,38,53,0.03) 121px),
    repeating-linear-gradient(0deg, transparent, transparent 100px, rgba(139,38,53,0.02) 100px, rgba(139,38,53,0.02) 101px);
  pointer-events: none;
}
.ledger-bg::before {
  content: "";
  position: absolute;
  top: 16px; left: 16px; right: 16px; bottom: 16px;
  border: 3px solid rgba(139,38,53,0.22);
  border-radius: 6px;
}
.ledger-bg::after {
  content: "";
  position: absolute;
  top: 24px; left: 24px; right: 24px; bottom: 24px;
  border: 1.5px solid rgba(139,38,53,0.12);
  border-radius: 3px;
}

.ledger-header {
  position: relative; z-index: 1;
  text-align: center;
  padding: 48px 40px 20px;
  border-bottom: 3px double rgba(139,38,53,0.2);
  flex-shrink: 0;
}
.ledger-title-big {
  font-family: 'Kaiti SC', 'STKaiti', 'KaiTi', 'SimSun', serif;
  font-size: 64px;
  font-weight: 700;
  color: #2A1218;
  letter-spacing: 48px;
  text-indent: 48px;
}
.ledger-subtitle {
  margin-top: 12px;
  font-family: 'Kaiti SC', 'STKaiti', 'KaiTi', serif;
  font-size: 22px;
  color: #6B3A42;
  letter-spacing: 14px;
}
.ledger-close {
  position: absolute;
  right: 40px; top: 44px;
  padding: 10px 28px;
  border: 1.5px solid rgba(107,58,66,0.35);
  border-radius: 999px;
  font-size: 14px;
  color: #6B3A42;
  background: rgba(255,255,255,0.5);
  cursor: pointer;
}
.ledger-close:hover { background: rgba(107,58,66,0.12); }

.ledger-pages-wrap {
  position: relative; z-index: 1;
  flex: 1;
  display: flex;
  align-items: stretch;
  overflow: hidden;
  padding: 0 20px;
  min-height: 0;
}

.ledger-nav {
  width: 50px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 40px;
  color: #8B2635;
  opacity: 0.3;
  cursor: pointer;
  background: none; border: none;
}
.ledger-nav:hover { opacity: 0.8; }

.ledger-page-content {
  flex: 1;
  display: flex;
  flex-direction: row-reverse;
  justify-content: flex-start;
  align-items: stretch;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 24px 0;
  scrollbar-width: none;
}
.ledger-page-content::-webkit-scrollbar { display: none; }

.ledger-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 120px;
  padding: 24px 20px;
  border-left: 1.5px solid rgba(139,38,53,0.12);
  flex-shrink: 0;
}
.ledger-col:first-child { border-left: none; }

.ledger-name {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  flex: 1;
  justify-content: center;
}
.ledger-char {
  font-family: 'Kaiti SC', 'STKaiti', 'KaiTi', 'SimSun', serif;
  font-size: 52px;
  color: #1A0A0E;
  line-height: 1.5;
  font-weight: 700;
  text-shadow: 0 2px 3px rgba(0,0,0,0.1);
}
.ledger-divider-h {
  width: 50%;
  height: 2px;
  background: rgba(139,38,53,0.25);
  margin: 12px 0;
}
.ledger-amount {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.ledger-amount .ledger-char {
  font-size: 36px;
  font-weight: 400;
  color: #2A1218;
}

.ledger-footer {
  position: relative; z-index: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 48px;
  border-top: 3px double rgba(139,38,53,0.2);
  flex-shrink: 0;
}
.ledger-page-num {
  font-size: 15px;
  color: #6B3A42;
  letter-spacing: 6px;
}
.ledger-total {
  font-family: 'Kaiti SC', 'STKaiti', 'KaiTi', serif;
  font-size: 22px;
  color: #2A1218;
  letter-spacing: 6px;
}

@media (max-width: 680px) {
  .ledger-title-big { font-size: 36px; letter-spacing: 20px; text-indent: 20px; }
  .ledger-subtitle { font-size: 15px; letter-spacing: 8px; }
  .ledger-pages-wrap { padding: 0 10px; }
  .ledger-nav { width: 30px; font-size: 28px; }
  .ledger-col { min-width: 72px; padding: 12px 10px; }
  .ledger-char { font-size: 32px; }
  .ledger-amount .ledger-char { font-size: 22px; }
  .ledger-close { top: 24px; right: 20px; padding: 8px 20px; font-size: 12px; }
}

/* 礼金表单修复 */
#modal-body .grid.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
#modal-body .field label {
  display: block;
  margin-bottom: 6px;
}
#modal-body .select,
#modal-body .input {
  width: 100% !important;
  min-width: 0 !important;
  padding: 11px 14px !important;
  border-radius: 12px !important;
  border: 1px solid var(--line-strong) !important;
  background: var(--cream) !important;
  appearance: auto !important;
}
#modal-body .select {
  cursor: pointer;
}

.auth-chip {
  display: none !important; /* 使用 JS 创建的按钮替代 */
}
.auth-chip:hover {
  border-color: rgba(196,154,91,0.7);
  background: rgba(139,38,53,0.1);
  box-shadow: 0 4px 16px rgba(196,154,91,0.2);
}
.auth-role { font-weight: 600; }
.auth-role-guest { color: var(--ink-soft); }
.auth-role-admin { color: var(--wine); }
.auth-logout-btn {
  background: none; border: none;
  color: var(--wine); cursor: pointer;
  font-size: 11px; text-decoration: underline;
}

/* ============================================================
   分段选择（礼金关系 / 阵营）—— 点选比原生下拉更稳
   ============================================================ */
.seg {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.seg-btn {
  padding: 9px 16px;
  border-radius: 999px;
  border: 1px solid var(--line, rgba(139, 38, 53, 0.18));
  background: rgba(255, 255, 255, 0.6);
  color: var(--ink-soft, #7A5560);
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}
.seg-btn:hover {
  border-color: var(--gold, #C49A5B);
  color: var(--wine, #8B2635);
}
.seg-btn:active {
  transform: scale(0.96);
}
.seg-btn.active {
  background: var(--wine, #8B2635);
  border-color: var(--wine, #8B2635);
  color: #FFF6E4;
  box-shadow: 0 6px 16px rgba(139, 38, 53, 0.22);
}

/* ============================================================
   紧急事项：左边酒红竖条 + 淡色底，和时间线里普通项明显区分
   ============================================================ */
.list-item.is-urgent {
  position: relative;
  border-left: 3px solid #C0354C !important;
  background:
    linear-gradient(90deg, rgba(192, 53, 76, 0.07) 0%, rgba(192, 53, 76, 0.02) 38%, transparent 70%) !important;
  box-shadow: 0 8px 24px rgba(139, 38, 53, 0.08);
}
.list-item.is-urgent .item-title {
  font-weight: 600;
}
.list-item.is-urgent .item-title::after {
  content: "急";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  margin-left: 8px;
  padding: 0 5px;
  border-radius: 4px;
  background: #C0354C;
  color: #FFF6E4;
  font-size: 10px;
  line-height: 1;
  letter-spacing: 0;
  vertical-align: middle;
  transform: translateY(-1px);
}

/* ============================================================
   送祝福 · 礼物墙（重做）
   ============================================================ */
.bless-layout {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 18px;
  align-items: stretch;
}
.bless-form {
  background: linear-gradient(180deg, rgba(255, 253, 248, 0.96), rgba(251, 245, 239, 0.9));
  border: 1px solid rgba(196, 154, 91, 0.32);
  border-radius: 20px;
  padding: 24px 24px 22px;
  box-shadow: 0 14px 38px rgba(74, 21, 32, 0.08);
}
.bf-title {
  font-family: var(--font-display, serif);
  font-size: 17px;
  letter-spacing: 0.2em;
  color: var(--ink, #2E1A20);
  margin-bottom: 18px;
}
.gift-picker {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.gift-opt {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 6px 10px;
  border-radius: 14px;
  border: 1px solid rgba(139, 38, 53, 0.14);
  background: rgba(255, 255, 255, 0.6);
  color: var(--ink-soft, #7A5560);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: all 0.25s ease;
  font-family: inherit;
}
.gift-opt svg {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.gift-opt:hover {
  border-color: rgba(196, 154, 91, 0.6);
  color: var(--wine, #8B2635);
  transform: translateY(-2px);
}
.gift-opt.active {
  background: linear-gradient(135deg, #8B2635, #5C1622);
  border-color: transparent;
  color: #FFF6E4;
  box-shadow: 0 10px 24px rgba(139, 38, 53, 0.26);
}
.gift-opt.active svg {
  stroke: #F6E7C6;
}

.bless-side {
  position: relative;
  border-radius: 20px;
  padding: 24px;
  background:
    radial-gradient(120% 110% at 20% 0%, rgba(139, 38, 53, 0.94) 0%, rgba(74, 21, 32, 0.97) 58%, rgba(30, 8, 14, 1) 100%);
  border: 1px solid rgba(196, 154, 91, 0.4);
  box-shadow: 0 18px 44px rgba(74, 21, 32, 0.22);
  overflow: hidden;
}
.bless-side::after {
  content: "囍";
  position: absolute;
  right: -10px;
  bottom: -30px;
  font-family: var(--font-display, serif);
  font-size: 140px;
  color: rgba(232, 213, 168, 0.06);
  pointer-events: none;
}
.bs-title {
  font-family: var(--font-display, serif);
  font-size: 15px;
  letter-spacing: 0.26em;
  color: #F6E7C6;
  margin-bottom: 18px;
}
.bs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 10px;
  position: relative;
  z-index: 1;
}
.bs-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 14px 8px 12px;
  border-radius: 14px;
  background: rgba(255, 253, 248, 0.07);
  border: 1px solid rgba(232, 213, 168, 0.22);
}
.bs-item svg {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: #E8D5A8;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.bs-num {
  font-family: var(--font-display, serif);
  font-size: 16px;
  color: #FFF6E4;
}
.bs-label {
  font-size: 10.5px;
  letter-spacing: 0.14em;
  color: rgba(246, 231, 198, 0.62);
}
.bs-empty {
  grid-column: 1 / -1;
  padding: 28px 0;
  text-align: center;
  font-size: 12px;
  letter-spacing: 0.1em;
  color: rgba(246, 231, 198, 0.5);
}
.bs-note {
  margin-top: 16px;
  font-size: 11.5px;
  line-height: 1.7;
  letter-spacing: 0.06em;
  color: rgba(246, 231, 198, 0.45);
  position: relative;
  z-index: 1;
}

.bless-wall-head {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 34px 0 20px;
}
.bwh-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(196, 154, 91, 0.45), transparent);
}
.bwh-text {
  font-family: var(--font-display, serif);
  font-size: 12px;
  letter-spacing: 0.5em;
  text-indent: 0.5em;
  color: var(--gold, #C49A5B);
}

.bless-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}
.bless-card {
  position: relative;
  padding: 18px 20px 20px;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255, 253, 248, 0.97), rgba(250, 243, 235, 0.92));
  border: 1px solid rgba(196, 154, 91, 0.28);
  box-shadow: 0 10px 28px rgba(74, 21, 32, 0.07);
  animation: blessIn 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}
.bless-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 36px rgba(74, 21, 32, 0.12);
}
@keyframes blessIn {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}
.bc-top {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}
.bc-top svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: var(--gold, #C49A5B);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}
.bc-name {
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--ink, #2E1A20);
}
.bc-date {
  margin-left: auto;
  font-size: 10.5px;
  letter-spacing: 0.12em;
  color: var(--ink-mute, #A88A92);
}
.bc-text {
  font-size: 13px;
  line-height: 1.85;
  color: var(--ink-soft, #7A5560);
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
}
.bless-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 0;
  color: var(--ink-mute, #A88A92);
}
.be-xi {
  font-family: var(--font-display, serif);
  font-size: 52px;
  color: rgba(196, 154, 91, 0.32);
  margin-bottom: 10px;
}

@media (max-width: 860px) {
  .bless-layout {
    grid-template-columns: 1fr;
  }
  .gift-picker {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* 礼物墙：飘动的礼物 */
.bs-grid {
  position: relative !important;
  display: block !important;
  height: 250px;
  margin-bottom: 6px;
}
.gift-float {
  position: absolute;
  transform: translate(-50%, -50%);
  animation: floatGift 4s ease-in-out infinite;
  will-change: transform;
}
.gift-float svg {
  width: 30px;
  height: 30px;
  fill: none;
  stroke: #E8D5A8;
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.35));
}
@keyframes floatGift {
  0%, 100% {
    transform: translate(-50%, -50%) rotate(-6deg) translateY(0);
    opacity: 0.78;
  }
  50% {
    transform: translate(-50%, -50%) rotate(6deg) translateY(-14px);
    opacity: 1;
  }
}
.bs-summary {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 2px;
  text-align: center;
  font-size: 11px;
  letter-spacing: 0.16em;
  color: rgba(246, 231, 198, 0.5);
}

/* 祝福与礼物分开：宾客填写，登录后只看墙 */
.bless-guest {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
body.role-admin .bless-guest {
  display: none;
}
body.role-admin .bless-layout {
  grid-template-columns: 1fr;
}
.bless-gift-form .gift-picker {
  grid-template-columns: repeat(3, 1fr);
}
.bless-side {
  min-height: 100%;
}
