/* ============================================================
   囍事台 · 影像相册
   书架 → 翻开相册 → 左右双页 → 单张大图
   深酒红 × 金箔 × 米白纸，贴身的高级感
   ============================================================ */

/* ============================================================
   顶部 3D 舞台
   ============================================================ */
.gallery-3d-wrap {
  position: relative;
  border-radius: 22px;
  overflow: hidden;
  margin-bottom: 30px;
  background:
    radial-gradient(120% 92% at 50% 18%, rgba(139, 38, 53, 0.55) 0%, rgba(74, 21, 32, 0.88) 55%, rgba(36, 8, 15, 0.97) 100%),
    linear-gradient(180deg, #4A1520 0%, #2A0B14 100%);
  box-shadow: 0 22px 60px rgba(74, 21, 32, 0.22);
}
.gallery-3d-home {
  position: relative;
  width: 100%;
  height: 420px;
}
.gallery-3d-home .scene3d-root {
  height: 100%;
  border-radius: 0;
  box-shadow: none;
}
.gallery-3d-bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 14px 22px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  background: linear-gradient(180deg, rgba(26, 9, 16, 0), rgba(26, 9, 16, 0.62));
  color: var(--cream, #FFFDF8);
  pointer-events: none;
}
.gallery-3d-bar .g3-title {
  font-family: var(--font-display, serif);
  letter-spacing: 0.14em;
  font-size: 15px;
}
.gallery-3d-bar .g3-sub {
  font-size: 11px;
  letter-spacing: 0.12em;
  opacity: 0.72;
  margin-top: 2px;
}
.gallery-3d-bar button {
  pointer-events: auto;
}

/* ============================================================
   相册书架
   ============================================================ */
.album-shell {
  position: relative;
}

.album-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 6px;
  padding: 0 4px;
}
.album-count {
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--ink-mute, #A88A92);
}
.album-toolbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.album-upload-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}
.album-select {
  height: 34px;
  padding: 0 30px 0 12px;
  border-radius: 999px;
  border: 1px solid var(--line, rgba(139, 38, 53, 0.18));
  background: rgba(255, 255, 255, 0.7) url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%238B2635' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 12px center / 10px 7px;
  -webkit-appearance: none;
  appearance: none;
  font-size: 12px;
  color: var(--ink, #2E1A20);
  cursor: pointer;
  font-family: inherit;
}

.album-shelf {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 38px 30px;
  padding: 28px 14px 46px;
  perspective: 1700px;
}

.album-card {
  position: relative;
  cursor: pointer;
  outline: none;
  animation: albumIn 0.65s cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: calc(var(--i, 0) * 70ms);
}
@keyframes albumIn {
  from { opacity: 0; transform: translateY(26px); }
  to { opacity: 1; transform: translateY(0); }
}

.album-book {
  position: relative;
  aspect-ratio: 3 / 4;
  border-radius: 4px 12px 12px 4px;
  transform-style: preserve-3d;
  transform: rotateY(-7deg) rotateX(1.5deg);
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.6s ease;
  box-shadow:
    0 20px 44px rgba(74, 21, 32, 0.26),
    0 1px 0 rgba(255, 250, 240, 0.5) inset,
    0 -1px 0 rgba(0, 0, 0, 0.08) inset;
}
.album-card:hover .album-book,
.album-card:focus-visible .album-book {
  transform: rotateY(-13deg) rotateX(4deg) translateY(-12px);
  box-shadow: 0 34px 70px rgba(74, 21, 32, 0.38);
}

.album-cover {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  overflow: hidden;
  background: linear-gradient(150deg, #6B1C28, #2A0B14);
}
.album-cover img {
  width: calc(100% - 24px);
  height: 100%;
  margin-left: 24px;
  object-fit: cover;
  display: block;
  transform: scale(1.02);
  transition: transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}
.album-card:hover .album-cover img {
  transform: scale(1.08);
}
.album-cover-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(26, 9, 16, 0.18) 0%, rgba(26, 9, 16, 0) 32%, rgba(26, 9, 16, 0.05) 58%, rgba(26, 9, 16, 0.78) 100%);
  pointer-events: none;
}
.album-cover-empty {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(80% 60% at 50% 30%, rgba(196, 154, 91, 0.28), transparent 70%),
    linear-gradient(155deg, #5C1622, #2A0B14);
}
.album-cover-empty span {
  font-family: var(--font-display, serif);
  font-size: 64px;
  color: rgba(232, 213, 168, 0.3);
}
.album-cover-label {
  position: absolute;
  left: 24px;
  right: 0;
  bottom: 14px;
  text-align: center;
}
.acl-name {
  display: inline-block;
  font-family: var(--font-display, serif);
  font-size: 17px;
  letter-spacing: 0.3em;
  text-indent: 0.3em;
  color: #F6E7C6;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.55);
}
.album-spine {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 24px;
  border-radius: 4px 0 0 4px;
  background: linear-gradient(90deg, #3B0E18 0%, #6B1C28 42%, #4A1520 100%);
  box-shadow: 1px 0 0 rgba(232, 213, 168, 0.18), 2px 0 8px rgba(0, 0, 0, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.as-name {
  writing-mode: vertical-rl;
  font-family: var(--font-display, serif);
  font-size: 10px;
  letter-spacing: 0.24em;
  color: rgba(232, 213, 168, 0.75);
  white-space: nowrap;
  max-height: 82%;
  overflow: hidden;
}
.album-lock {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  border-radius: 50%;
  background: rgba(26, 9, 16, 0.62);
  border: 1px solid rgba(232, 213, 168, 0.4);
  backdrop-filter: blur(6px);
}
.album-card.is-private .album-cover img {
  filter: grayscale(0.55) brightness(0.72);
}

.album-meta {
  margin-top: 14px;
  text-align: center;
}
.album-name {
  font-family: var(--font-display, serif);
  font-size: 15px;
  letter-spacing: 0.18em;
  color: var(--ink, #2E1A20);
}
.album-sub {
  margin-top: 4px;
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--ink-mute, #A88A92);
  line-height: 1.5;
}

.album-del {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1px solid rgba(139, 38, 53, 0.25);
  background: rgba(255, 253, 248, 0.95);
  color: var(--wine, #8B2635);
  font-size: 12px;
  cursor: pointer;
  opacity: 0;
  transform: scale(0.8);
  transition: all 0.25s ease;
}
.album-card:hover .album-del {
  opacity: 1;
  transform: scale(1);
}

.album-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 70px 0;
  color: var(--ink-mute, #A88A92);
}
.ae-xi {
  font-family: var(--font-display, serif);
  font-size: 56px;
  color: rgba(196, 154, 91, 0.35);
  margin-bottom: 8px;
}

.gallery-progress {
  height: 3px;
  border-radius: 999px;
  background: rgba(139, 38, 53, 0.1);
  overflow: hidden;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.gallery-progress.on {
  opacity: 1;
}
.gallery-progress i {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--wine, #8B2635), var(--gold, #C49A5B));
  transition: width 0.3s ease;
}

/* ============================================================
   相册阅读器
   ============================================================ */
.album-reader {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: none;
}
.album-reader.show {
  display: block;
}
body.reader-open {
  overflow: hidden;
}

.ar-veil {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(120% 90% at 50% 0%, rgba(92, 22, 34, 0.94) 0%, rgba(30, 8, 14, 0.98) 60%, rgba(14, 4, 8, 1) 100%);
  backdrop-filter: blur(10px);
}
.ar-veil::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.012) 0 1px, transparent 1px 90px),
    repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.04) 0 1px, transparent 1px 90px);
  pointer-events: none;
}

.ar-stage {
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: 22px clamp(14px, 3.4vw, 56px) 18px;
  box-sizing: border-box;
}

.ar-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: #F6E7C6;
  flex-shrink: 0;
}
.ar-title {
  font-family: var(--font-display, serif);
  font-size: clamp(17px, 1.6vw, 22px);
  letter-spacing: 0.26em;
  text-indent: 0.26em;
}
.ar-sub {
  margin-top: 4px;
  font-size: 11px;
  letter-spacing: 0.14em;
  opacity: 0.6;
}
.ar-bar-right {
  display: flex;
  gap: 10px;
}
.ar-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(232, 213, 168, 0.32);
  background: rgba(255, 253, 248, 0.06);
  color: #F6E7C6;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  backdrop-filter: blur(6px);
}
.ar-icon:hover {
  background: rgba(232, 213, 168, 0.16);
  border-color: rgba(232, 213, 168, 0.6);
  transform: translateY(-1px);
}
.ar-icon.liked {
  color: #E2566B;
  border-color: rgba(226, 86, 107, 0.6);
}

/* 书 */
.ar-book {
  flex: 1;
  min-height: 0;
  width: 100%;
  max-width: 1180px;
  margin: 12px auto 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  position: relative;
  background:
    linear-gradient(180deg, #FFFDF7 0%, #FAF3E7 100%);
  border-radius: 8px;
  box-shadow:
    0 40px 90px rgba(0, 0, 0, 0.55),
    0 2px 0 rgba(255, 255, 255, 0.6) inset,
    0 0 0 1px rgba(196, 154, 91, 0.35);
  overflow: hidden;
  transform-style: preserve-3d;
  transition: transform 0.38s cubic-bezier(0.22, 1, 0.36, 1);
}
.ar-book::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(120% 80% at 50% 0%, rgba(196, 154, 91, 0.06), transparent 60%),
    repeating-linear-gradient(0deg, rgba(139, 38, 53, 0.012) 0 1px, transparent 1px 26px);
  z-index: 3;
}
.ar-book.turn-next {
  transform: perspective(1500px) rotateY(-1.6deg);
}
.ar-book.turn-prev {
  transform: perspective(1500px) rotateY(1.6deg);
}

.ar-spine {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 34px;
  margin-left: -17px;
  z-index: 4;
  pointer-events: none;
  background:
    linear-gradient(90deg,
      rgba(74, 21, 32, 0) 0%,
      rgba(74, 21, 32, 0.05) 26%,
      rgba(74, 21, 32, 0.16) 47%,
      rgba(74, 21, 32, 0.22) 50%,
      rgba(74, 21, 32, 0.16) 53%,
      rgba(74, 21, 32, 0.05) 74%,
      rgba(74, 21, 32, 0) 100%);
}
.ar-spine::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 6%;
  bottom: 6%;
  width: 1px;
  transform: translateX(-50%);
  background: linear-gradient(180deg, transparent, rgba(196, 154, 91, 0.45), transparent);
}

.ar-page {
  position: relative;
  min-width: 0;
  min-height: 0;
  padding: clamp(12px, 1.6vw, 26px);
  display: flex;
  flex-direction: column;
  z-index: 2;
}
.ar-page-left {
  padding-right: clamp(18px, 2vw, 32px);
}
.ar-page-right {
  padding-left: clamp(18px, 2vw, 32px);
}

.ar-photo {
  position: relative;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  cursor: zoom-in;
}
.ar-photo-frame {
  position: relative;
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border: 1px solid rgba(196, 154, 91, 0.45);
  padding: 8px;
  box-shadow:
    0 14px 34px rgba(74, 21, 32, 0.16),
    0 1px 0 rgba(255, 255, 255, 0.9) inset;
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.5s ease;
}
.ar-photo:hover .ar-photo-frame {
  transform: translateY(-3px);
  box-shadow: 0 22px 46px rgba(74, 21, 32, 0.22);
}
.ar-photo-frame img,
.ar-photo-frame video {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}
.ar-photo-foot {
  flex-shrink: 0;
  padding: 12px 4px 2px;
  text-align: center;
}
.ar-photo-title {
  font-family: var(--font-display, serif);
  font-size: 14px;
  letter-spacing: 0.16em;
  color: var(--ink, #2E1A20);
}
.ar-photo-caption {
  margin-top: 4px;
  font-size: 11.5px;
  line-height: 1.6;
  color: var(--ink-soft, #7A5560);
  letter-spacing: 0.04em;
}
.ar-photo-date {
  margin-top: 5px;
  font-size: 10px;
  letter-spacing: 0.18em;
  color: var(--ink-mute, #A88A92);
}

.ar-like {
  position: absolute;
  right: 14px;
  bottom: 56px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(196, 154, 91, 0.4);
  background: rgba(255, 253, 248, 0.9);
  color: #B08A6A;
  font-size: 17px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s ease;
  box-shadow: 0 6px 16px rgba(74, 21, 32, 0.12);
  z-index: 5;
}
.ar-like:hover {
  transform: scale(1.1);
  border-color: #E2566B;
  color: #E2566B;
}
.ar-like.liked {
  color: #fff;
  background: linear-gradient(135deg, #E2566B, #C0354C);
  border-color: transparent;
}

.ar-empty-page {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--ink-mute, #A88A92);
}
.aep-xi {
  font-family: var(--font-display, serif);
  font-size: 46px;
  color: rgba(196, 154, 91, 0.3);
}
.aep-text {
  margin-top: 10px;
  font-size: 11px;
  letter-spacing: 0.3em;
}

.ar-nav {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 26px;
  padding-top: 14px;
}
.ar-arrow {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid rgba(232, 213, 168, 0.35);
  background: rgba(255, 253, 248, 0.06);
  color: #F6E7C6;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  transition: all 0.25s ease;
}
.ar-arrow:hover:not(:disabled) {
  background: rgba(232, 213, 168, 0.18);
  transform: translateY(-1px);
}
.ar-arrow:disabled {
  opacity: 0.28;
  cursor: default;
}
.ar-progress {
  font-size: 12px;
  letter-spacing: 0.24em;
  color: rgba(246, 231, 198, 0.72);
  min-width: 70px;
  text-align: center;
}

/* 翻页时页面内容轻微位移 */
.ar-book.turn-next .ar-page-left,
.ar-book.turn-next .ar-page-right {
  animation: pageNext 0.38s ease;
}
.ar-book.turn-prev .ar-page-left,
.ar-book.turn-prev .ar-page-right {
  animation: pagePrev 0.38s ease;
}
@keyframes pageNext {
  0% { opacity: 1; transform: translateX(0); }
  45% { opacity: 0.25; transform: translateX(-10px); }
  100% { opacity: 1; transform: translateX(0); }
}
@keyframes pagePrev {
  0% { opacity: 1; transform: translateX(0); }
  45% { opacity: 0.25; transform: translateX(10px); }
  100% { opacity: 1; transform: translateX(0); }
}

/* ============================================================
   单张大图
   ============================================================ */
#lightbox {
  position: fixed;
  inset: 0;
  z-index: 1300;
  display: none;
  flex-direction: column;
  background: rgba(12, 4, 7, 0.97);
  backdrop-filter: blur(12px);
}
#lightbox.show {
  display: flex;
}
#lightbox .lb-top {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px clamp(16px, 4vw, 48px) 6px;
  color: #F6E7C6;
}
#lightbox .lb-title {
  font-family: var(--font-display, serif);
  font-size: 16px;
  letter-spacing: 0.22em;
}
#lightbox .lb-counter {
  font-size: 11px;
  letter-spacing: 0.2em;
  opacity: 0.6;
}
#lightbox .lb-stage {
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px clamp(52px, 7vw, 110px);
}
#lightbox .lb-stage img,
#lightbox .lb-stage video {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
}
#lightbox .lb-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 1px solid rgba(232, 213, 168, 0.3);
  background: rgba(255, 253, 248, 0.07);
  color: #F6E7C6;
  font-size: 26px;
  cursor: pointer;
  z-index: 5;
  transition: all 0.25s ease;
}
#lightbox .lb-nav:hover {
  background: rgba(232, 213, 168, 0.18);
}
#lightbox .lb-prev { left: clamp(10px, 2vw, 34px); }
#lightbox .lb-next { right: clamp(10px, 2vw, 34px); }
#lightbox .lb-bottom {
  flex-shrink: 0;
  padding: 8px clamp(16px, 4vw, 48px) 22px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
#lightbox .lb-caption {
  color: rgba(246, 231, 198, 0.72);
  font-size: 12.5px;
  letter-spacing: 0.08em;
  text-align: center;
  min-height: 18px;
}
#lightbox .lb-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}
#lightbox .lb-btn {
  padding: 9px 20px;
  border-radius: 999px;
  border: 1px solid rgba(232, 213, 168, 0.3);
  background: rgba(255, 253, 248, 0.06);
  color: #F6E7C6;
  font-size: 12px;
  letter-spacing: 0.1em;
  cursor: pointer;
  transition: all 0.25s ease;
  font-family: inherit;
}
#lightbox .lb-btn:hover {
  background: rgba(232, 213, 168, 0.16);
}
#lightbox .lb-btn.liked {
  color: #E2566B;
  border-color: rgba(226, 86, 107, 0.55);
}

/* ============================================================
   新建相册弹窗
   ============================================================ */
.album-modal-mask {
  position: fixed;
  inset: 0;
  z-index: 1400;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(26, 9, 16, 0.5);
  backdrop-filter: blur(10px);
  opacity: 0;
  transition: opacity 0.24s ease;
  padding: 20px;
  box-sizing: border-box;
}
.album-modal-mask.show {
  opacity: 1;
}
.album-modal {
  width: min(420px, 100%);
  background: var(--cream, #FBF5EF);
  border-radius: 20px;
  border: 1px solid rgba(196, 154, 91, 0.35);
  box-shadow: 0 30px 80px rgba(26, 9, 16, 0.35);
  padding: 26px 26px 22px;
  transform: translateY(14px) scale(0.98);
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
.album-modal-mask.show .album-modal {
  transform: translateY(0) scale(1);
}
.am-title {
  font-family: var(--font-display, serif);
  font-size: 18px;
  letter-spacing: 0.24em;
  text-indent: 0.24em;
  color: var(--ink, #2E1A20);
  text-align: center;
  margin-bottom: 20px;
}
.am-field {
  margin-bottom: 14px;
}
.am-field label {
  display: block;
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--ink-mute, #A88A92);
  margin-bottom: 7px;
}
.am-input {
  width: 100%;
  height: 42px;
  border-radius: 12px;
  border: 1px solid rgba(139, 38, 53, 0.16);
  background: rgba(255, 255, 255, 0.7);
  padding: 0 14px;
  font-size: 13px;
  color: var(--ink, #2E1A20);
  box-sizing: border-box;
  font-family: inherit;
}
.am-input:focus {
  outline: none;
  border-color: var(--gold, #C49A5B);
}
.am-check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--ink-soft, #7A5560);
  margin: 4px 0 20px;
}
.am-actions {
  display: flex;
  gap: 10px;
}
.am-actions .btn {
  flex: 1;
}

/* ============================================================
   响应式
   ============================================================ */
@media (max-width: 900px) {
  .album-shelf {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 28px 20px;
  }
  .gallery-3d-home {
    height: 340px;
  }
  .ar-stage {
    padding: 14px 10px 10px;
  }
  .ar-book {
    grid-template-columns: 1fr;
    max-width: 560px;
  }
  .ar-page-left {
    padding-right: 14px;
  }
  .ar-page-right {
    display: none;
  }
  .ar-spine {
    display: none;
  }
  .ar-like {
    bottom: 16px;
  }
  #lightbox .lb-stage {
    padding: 8px 54px;
  }
}

@media (max-width: 560px) {
  .album-shelf {
    grid-template-columns: repeat(2, 1fr);
    gap: 22px 14px;
    padding: 18px 2px 34px;
  }
  .album-name {
    font-size: 13px;
  }
  .album-sub {
    font-size: 10px;
  }
  .album-spine {
    width: 18px;
  }
  .album-cover img {
    width: calc(100% - 18px);
    margin-left: 18px;
  }
  .album-cover-label {
    left: 18px;
  }
  .ac-name {
    font-size: 14px;
    letter-spacing: 0.18em;
  }
  .gallery-3d-home {
    height: 290px;
  }
  .album-toolbar {
    gap: 10px;
  }
  .album-select {
    max-width: 110px;
  }
  #lightbox .lb-stage {
    padding: 6px 44px;
  }
  #lightbox .lb-actions {
    gap: 6px;
  }
  #lightbox .lb-btn {
    padding: 8px 14px;
    font-size: 11px;
  }
}

/* ============================================================
   权限：宾客模式隐藏所有编辑 / 删除 / 上传入口
   （重写相册样式时这组规则必须保留，否则宾客能看到操作按钮）
   ============================================================ */
body.role-guest [data-admin],
body.role-guest .album-del,
body.role-guest .item-actions,
body.role-guest .fab-wrap,
body.role-guest #quick-add-row,
body.role-guest button[data-edit],
body.role-guest button[data-del],
body.role-guest button[data-edit-gift],
body.role-guest button[data-del-gift],
body.role-guest button[data-fill],
body.role-guest .js-admin-only {
  display: none !important;
}
body.role-guest [data-inline-edit] {
  pointer-events: none !important;
  cursor: default !important;
}
body.role-guest .album-toolbar-right .album-upload-wrap,
body.role-guest #btn-new-album {
  display: none !important;
}

/* ============================================================
   阅读器补充：横版照片宽幅版式 + 翻页入口加强
   ============================================================ */

/* 相框贴合照片本身，不再硬撑整页，横竖版都不会显得空 */
.ar-photo {
  justify-content: center;
}
.ar-photo-frame {
  flex: 0 1 auto !important;
  max-height: calc(100% - 62px);
  max-width: 100%;
  width: auto;
}

/* 横版：相框向两侧扩出去，做成宽幅照片 */
.ar-photo.is-wide .ar-photo-frame {
  width: calc(100% + 26px);
  max-width: calc(100% + 26px);
  margin: 0 -13px;
  padding: 7px;
  max-height: calc(100% - 58px);
}
.ar-photo.is-wide .ar-photo-frame img,
.ar-photo.is-wide .ar-photo-frame video {
  width: 100%;
  height: auto;
  max-height: 100%;
}
.ar-photo.is-wide .ar-photo-foot {
  padding-top: 9px;
}

/* 两侧翻页按钮 */
.ar-side {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 20;
  width: 52px;
  height: 104px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(196, 154, 91, 0.4);
  background: linear-gradient(180deg, rgba(255, 253, 248, 0.72), rgba(255, 253, 248, 0.42));
  color: var(--wine, #8B2635);
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
  opacity: 0.42;
  transition: opacity 0.25s ease, background 0.25s ease, transform 0.25s ease;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  padding: 0;
}
.ar-side:hover:not(:disabled) {
  opacity: 1;
  background: rgba(255, 253, 248, 0.94);
}
.ar-side:disabled {
  opacity: 0;
  pointer-events: none;
}
.ar-side-prev {
  left: 0;
  border-left: none;
  border-radius: 0 14px 14px 0;
}
.ar-side-next {
  right: 0;
  border-right: none;
  border-radius: 14px 0 0 14px;
}
.ar-side-ico {
  display: block;
  transform: translateY(-1px);
}

/* 首次进入的操作提示 */
.ar-tip {
  position: absolute;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%) translateY(10px);
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: 999px;
  background: rgba(26, 9, 16, 0.8);
  border: 1px solid rgba(232, 213, 168, 0.4);
  color: #F6E7C6;
  font-size: 12px;
  letter-spacing: 0.1em;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.45s ease, transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}
.ar-tip.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.ar-tip-key {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 21px;
  height: 21px;
  border-radius: 6px;
  border: 1px solid rgba(232, 213, 168, 0.45);
  font-size: 12px;
  line-height: 1;
}

/* 底部箭头改成带文字的胶囊，一眼能看出是翻页 */
.ar-arrow {
  width: auto !important;
  min-width: 104px;
  height: 44px !important;
  padding: 0 18px;
  border-radius: 999px !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-size: 12.5px !important;
  letter-spacing: 0.1em;
  color: #F6E7C6;
}
.ar-arrow-ico {
  font-size: 19px;
  line-height: 1;
  transform: translateY(-1px);
}

@media (max-width: 900px) {
  .ar-side {
    display: none;
  }
  .ar-photo.is-wide .ar-photo-frame {
    width: calc(100% + 14px);
    max-width: calc(100% + 14px);
    margin: 0 -7px;
  }
  .ar-arrow {
    min-width: 92px;
    height: 40px !important;
  }
}

/* ============================================================
   照片墙（固定版式） + 摆台 + 选图面板
   ============================================================ */
.album-view-tabs {
  display: inline-flex;
  gap: 6px;
  padding: 5px;
  margin-bottom: 18px;
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.7);
  border: 1px solid rgba(196, 154, 91, 0.28);
}
.av-tab {
  padding: 8px 24px;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--ink-soft, #7A5560);
  font-size: 13px;
  letter-spacing: 0.14em;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.28s ease;
}
.av-tab.active {
  background: linear-gradient(135deg, #8B2635, #5C1622);
  color: #FFF6E4;
  box-shadow: 0 6px 16px rgba(139, 38, 53, 0.24);
}

/* ---- 照片墙 ---- */
.photo-wall-shell {
  padding: 4px 0 10px;
}
.wall-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.wall-title {
  font-family: var(--font-display, serif);
  font-size: 20px;
  letter-spacing: 0.24em;
  color: var(--ink, #2E1A20);
}
.wall-sub {
  margin-top: 5px;
  font-size: 11.5px;
  letter-spacing: 0.1em;
  color: var(--ink-mute, #A88A92);
}
.wall-head-right {
  display: flex;
  gap: 8px;
}

.photo-wall {
  display: grid;
  grid-template-columns: 0.92fr 1.16fr 0.92fr;
  grid-template-rows: 1.12fr 0.94fr 0.94fr;
  gap: 12px;
  aspect-ratio: 1180 / 780;
  padding: 14px;
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(255, 253, 248, 0.9), rgba(248, 241, 232, 0.9));
  border: 1px solid rgba(196, 154, 91, 0.3);
  box-shadow: 0 18px 48px rgba(74, 21, 32, 0.1);
}

.wall-slot {
  position: relative;
  padding: 0;
  border: 7px solid #FFFDF9;
  border-radius: 3px;
  background: #F2E9DE;
  overflow: hidden;
  cursor: pointer;
  box-shadow:
    0 8px 22px rgba(74, 21, 32, 0.16),
    0 1px 0 rgba(255, 255, 255, 0.9) inset;
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.4s ease;
}
.wall-slot:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 34px rgba(74, 21, 32, 0.22);
}
.wall-slot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* 竖版照片放横槽时，优先保住人物头部 */
  object-position: center 26%;
  display: block;
}
.wall-left img,
.wall-center img {
  object-position: center 18%;
}
.wall-hero img {
  /* 主图保人物上半身；上传横版照片后整张都能完整显示 */
  object-position: center 16%;
}
.wall-right .wall-slot img {
  object-position: center 22%;
}
.wall-slot.is-empty::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(45deg, rgba(139, 38, 53, 0.03) 0 10px, transparent 10px 20px);
}
.wall-slot-hint {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  font-size: 11px;
  letter-spacing: 0.18em;
  color: rgba(139, 38, 53, 0.5);
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.wall-slot.is-empty .wall-slot-hint {
  opacity: 1;
}
.wall-slot .wall-slot-tag {
  position: absolute;
  left: 8px;
  bottom: 8px;
  z-index: 3;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(26, 9, 16, 0.55);
  color: #F6E7C6;
  font-size: 10px;
  letter-spacing: 0.1em;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.wall-slot:hover .wall-slot-tag {
  opacity: 1;
}

.wall-hero { grid-column: 1 / 4; grid-row: 1; }
.wall-left { grid-column: 1; grid-row: 2 / 4; }
.wall-center { grid-column: 2; grid-row: 2 / 4; }
.wall-right {
  grid-column: 3;
  grid-row: 2 / 4;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: 1.32fr 0.9fr;
  gap: 6px;
  min-width: 0;
}
.wall-right .wall-slot {
  min-width: 0;
  border-width: 4px;
}
.wall-right .wall-right4 {
  grid-column: 1 / 4;
  grid-row: 2;
}

/* ---- 摆台 ---- */
.photo-stands-head {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 34px 0 20px;
}
.psh-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(196, 154, 91, 0.45), transparent);
}
.psh-text {
  font-family: var(--font-display, serif);
  font-size: 12px;
  letter-spacing: 0.5em;
  text-indent: 0.5em;
  color: var(--gold, #C49A5B);
}
.photo-stands {
  display: flex;
  justify-content: center;
  gap: clamp(14px, 3vw, 40px);
  padding-bottom: 12px;
}
.stand-slot {
  position: relative;
  width: clamp(110px, 15vw, 190px);
  aspect-ratio: 3 / 4;
  padding: 6px;
  border: 1px solid rgba(196, 154, 91, 0.35);
  border-radius: 4px;
  background: #FFFDF9;
  cursor: pointer;
  overflow: hidden;
  box-shadow: 0 14px 30px rgba(74, 21, 32, 0.18);
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.45s ease;
}
.stand-slot:nth-child(1) { transform: rotate(-2.2deg); }
.stand-slot:nth-child(2) { transform: rotate(0.6deg) translateY(-6px); }
.stand-slot:nth-child(3) { transform: rotate(2.4deg); }
.stand-slot:hover {
  transform: rotate(0) translateY(-10px) scale(1.03);
  box-shadow: 0 24px 46px rgba(74, 21, 32, 0.26);
  z-index: 2;
}
.stand-slot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 2px;
}
.stand-slot.is-empty {
  background: linear-gradient(180deg, #FFFDF9, #F4EAE0);
}
.stand-slot.is-empty::after {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px dashed rgba(139, 38, 53, 0.16);
  border-radius: 2px;
}

/* ---- 选图面板 ---- */
.wall-picker {
  position: fixed;
  inset: 0;
  z-index: 1400;
  display: none;
}
.wall-picker.show {
  display: block;
}
.wp-mask {
  position: absolute;
  inset: 0;
  background: rgba(26, 9, 16, 0.55);
  backdrop-filter: blur(8px);
}
.wp-panel {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) scale(0.98);
  width: min(880px, 92vw);
  max-height: 82vh;
  display: flex;
  flex-direction: column;
  background: var(--cream, #FBF5EF);
  border-radius: 20px;
  border: 1px solid rgba(196, 154, 91, 0.4);
  box-shadow: 0 34px 90px rgba(26, 9, 16, 0.4);
  padding: 22px 24px 16px;
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}
.wall-picker.show .wp-panel {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}
.wp-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-shrink: 0;
}
.wp-title {
  font-family: var(--font-display, serif);
  font-size: 17px;
  letter-spacing: 0.2em;
  color: var(--ink, #2E1A20);
}
.wp-sub {
  margin-top: 4px;
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--ink-mute, #A88A92);
}
.wp-close {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(139, 38, 53, 0.2);
  background: transparent;
  color: var(--wine, #8B2635);
  cursor: pointer;
  font-size: 14px;
}
.wp-filter {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin: 14px 0 12px;
  flex-shrink: 0;
}
.wp-chip {
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid rgba(139, 38, 53, 0.16);
  background: rgba(255, 255, 255, 0.6);
  color: var(--ink-soft, #7A5560);
  font-size: 11.5px;
  letter-spacing: 0.08em;
  cursor: pointer;
  font-family: inherit;
}
.wp-chip.active {
  background: var(--wine, #8B2635);
  border-color: var(--wine, #8B2635);
  color: #FFF6E4;
}
.wp-grid {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
  padding: 4px 2px 10px;
  overscroll-behavior: contain;
}
.wp-item {
  position: relative;
  aspect-ratio: 1;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid transparent;
  padding: 0;
  background: #F2E9DE;
  cursor: pointer;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.wp-item:hover {
  border-color: var(--gold, #C49A5B);
  transform: translateY(-2px);
}
.wp-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.wp-item.is-current {
  border-color: var(--wine, #8B2635);
}
.wp-item.is-current::after {
  content: "✓";
  position: absolute;
  right: 6px;
  top: 6px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--wine, #8B2635);
  color: #FFF;
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.wp-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 40px 0;
  color: var(--ink-mute, #A88A92);
  font-size: 12px;
}
.wp-foot {
  flex-shrink: 0;
  display: flex;
  justify-content: flex-end;
  padding-top: 12px;
  border-top: 1px solid rgba(196, 154, 91, 0.18);
}
.wp-clear {
  padding: 8px 18px;
  border-radius: 999px;
  border: 1px solid rgba(139, 38, 53, 0.2);
  background: transparent;
  color: var(--wine, #8B2635);
  font-size: 12px;
  cursor: pointer;
  font-family: inherit;
}

@media (max-width: 760px) {
  .photo-wall {
    gap: 7px;
    padding: 8px;
    aspect-ratio: auto;
    grid-template-rows: 1fr 0.85fr 0.85fr;
    min-height: 420px;
  }
  .wall-slot {
    border-width: 4px;
  }
  .photo-stands {
    gap: 12px;
  }
  .stand-slot {
    width: 30%;
  }
  .wp-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* 背景音乐开关 */
.bgm-btn {
  width: 38px;
  height: 38px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid rgba(196, 154, 91, 0.45);
  background: rgba(255, 253, 248, 0.8);
  color: var(--wine, #8B2635);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.28s ease;
}
.bgm-btn svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.bgm-btn:hover {
  border-color: var(--gold, #C49A5B);
  transform: translateY(-1px);
}
.bgm-btn:not(.is-off) {
  animation: bgmPulse 2.4s ease-in-out infinite;
}
@keyframes bgmPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(196, 154, 91, 0.28); }
  50% { box-shadow: 0 0 0 6px rgba(196, 154, 91, 0); }
}
.bgm-btn.is-off {
  color: var(--ink-mute, #A88A92);
  border-color: rgba(139, 38, 53, 0.18);
  background: rgba(255, 253, 248, 0.5);
}
.bgm-btn.is-off svg {
  opacity: 0.55;
}

/* ============ 全屏轮播（婚礼现场大屏） ============ */
.ss-setup-mask {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(26, 9, 16, 0.58);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.ss-setup {
  width: min(560px, 94vw);
  box-sizing: border-box;
  padding: 26px 26px 20px;
  border-radius: 24px;
  background: linear-gradient(165deg, #FFFDF8 0%, #F7EDE2 100%);
  border: 1px solid rgba(196, 154, 91, 0.45);
  box-shadow: 0 30px 80px rgba(18, 4, 8, 0.45);
}
.ss-setup-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}
.ss-kicker {
  font-size: 10px;
  letter-spacing: 0.4em;
  color: var(--gold-deep, #A8752E);
  margin-bottom: 6px;
}
.ss-setup h3 {
  margin: 0;
  font-family: var(--font-display, serif);
  font-size: 24px;
  letter-spacing: 0.06em;
  color: var(--ink, #2E1A20);
}
.ss-x {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(139, 38, 53, 0.2);
  border-radius: 50%;
  background: transparent;
  color: var(--wine, #8B2635);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}
.ss-x:hover { background: rgba(139, 38, 53, 0.07); }
.ss-tip {
  margin: 12px 0 16px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--ink-soft, #7A5560);
}
.ss-albums {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}
.ss-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(196, 154, 91, 0.4);
  background: rgba(255, 253, 248, 0.7);
  color: var(--ink, #2E1A20);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.ss-chip span {
  font-size: 11px;
  color: var(--ink-soft, #7A5560);
  background: rgba(139, 38, 53, 0.07);
  padding: 1px 7px;
  border-radius: 999px;
}
.ss-chip:hover { border-color: var(--gold, #C49A5B); }
.ss-chip.active {
  background: linear-gradient(135deg, #8B2635, #5C1622);
  border-color: transparent;
  color: #FFF6E4;
  box-shadow: 0 8px 20px rgba(139, 38, 53, 0.25);
}
.ss-chip.active span {
  background: rgba(255, 246, 228, 0.16);
  color: #F6E7C6;
}
.ss-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  font-size: 13px;
  color: var(--ink, #2E1A20);
}
.ss-row label { letter-spacing: 0.08em; }
.ss-row input {
  width: 84px;
  height: 40px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid rgba(196, 154, 91, 0.4);
  background: #FFFDF8;
  color: var(--ink, #2E1A20);
  font-size: 15px;
  text-align: center;
}
.ss-start { width: 100%; }
.ss-setup-foot {
  margin-top: 12px;
  font-size: 11px;
  line-height: 1.7;
  color: rgba(122, 85, 96, 0.8);
  text-align: center;
  letter-spacing: 0.02em;
}

/* 播放态 */
.ss-root {
  position: fixed;
  inset: 0;
  z-index: 99999;
  overflow: hidden;
  background: #12050A;
  cursor: none;
}
.ss-backdrop {
  position: absolute;
  inset: -8%;
}
.ss-backdrop-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(52px) brightness(0.32) saturate(0.85);
  transform: scale(1.12);
  opacity: 0.9;
}
.ss-frame {
  position: absolute;
  inset: 0;
}
.ss-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
  transition: opacity 1.3s ease;
  will-change: opacity, transform;
}
.ss-photo.on {
  opacity: 1;
}
.ss-vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(130% 110% at 50% 45%, rgba(0, 0, 0, 0) 52%, rgba(10, 2, 5, 0.52) 100%),
    linear-gradient(180deg, rgba(18, 5, 10, 0.28), rgba(18, 5, 10, 0) 18%, rgba(18, 5, 10, 0) 82%, rgba(18, 5, 10, 0.4));
}
.ss-hint {
  position: absolute;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%);
  padding: 7px 16px;
  border-radius: 999px;
  background: rgba(18, 5, 10, 0.42);
  border: 1px solid rgba(232, 213, 168, 0.18);
  color: rgba(246, 231, 198, 0.62);
  font-size: 11px;
  letter-spacing: 0.2em;
  pointer-events: none;
  animation: ssHintOut 5s ease forwards;
}
@keyframes ssHintOut {
  0%, 55% { opacity: 0.9; }
  100% { opacity: 0; }
}
@keyframes ssKen {
  from { transform: scale(1.012) translate3d(0, 0, 0); }
  to   { transform: scale(1.075) translate3d(0, -1.1%, 0); }
}
@media (max-width: 560px) {
  .ss-setup { padding: 20px 18px 16px; }
  .ss-setup h3 { font-size: 21px; }
  .ss-hint { bottom: 18px; font-size: 10px; }
}

/* ============ 照片管理：上传 / 归类 / 批量删除 ============ */
body.pm-open {
  overflow: hidden;
}
.pm-mask {
  position: fixed;
  inset: 0;
  z-index: 4000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(26, 9, 16, 0.62);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.pm-mask.show {
  opacity: 1;
  pointer-events: auto;
}
.pm-panel {
  width: min(1120px, 96vw);
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  background: linear-gradient(165deg, #FFFDF8 0%, #F8EFE4 100%);
  border: 1px solid rgba(196, 154, 91, 0.45);
  border-radius: 24px;
  box-shadow: 0 34px 90px rgba(18, 4, 8, 0.5);
  overflow: hidden;
  transform: translateY(14px) scale(0.98);
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
.pm-mask.show .pm-panel {
  transform: translateY(0) scale(1);
}
.pm-head {
  flex-shrink: 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 20px 24px 12px;
}
.pm-kicker {
  font-size: 9.5px;
  letter-spacing: 0.36em;
  color: var(--gold-deep, #A8752E);
  margin-bottom: 5px;
}
.pm-head h3 {
  margin: 0;
  font-family: var(--font-display, serif);
  font-size: 24px;
  letter-spacing: 0.05em;
  color: var(--ink, #2E1A20);
}
.pm-close {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(139, 38, 53, 0.18);
  background: transparent;
  color: var(--wine, #8B2635);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}
.pm-close:hover {
  background: rgba(139, 38, 53, 0.06);
}
.pm-upload {
  flex-shrink: 0;
  padding: 0 24px 16px;
  border-bottom: 1px solid rgba(196, 154, 91, 0.16);
}
.pm-drop {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border: 1px dashed rgba(196, 154, 91, 0.55);
  border-radius: 16px;
  background: rgba(196, 154, 91, 0.05);
  cursor: pointer;
  transition: all 0.2s ease;
}
.pm-drop:hover {
  border-color: var(--wine, #8B2635);
  background: rgba(139, 38, 53, 0.045);
}
.pm-drop-plus {
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, #8B2635, #5C1622);
  color: #F6E7C6;
  font-size: 22px;
  box-shadow: 0 8px 18px rgba(139, 38, 53, 0.22);
}
.pm-drop-text {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.pm-drop-text strong {
  font-size: 14px;
  color: var(--ink, #2E1A20);
}
.pm-drop-text small {
  font-size: 10.5px;
  color: rgba(122, 85, 96, 0.7);
}
.pm-upload-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 12px;
  font-size: 11.5px;
  color: var(--ink-soft, #7A5560);
}
.pm-upload-row select,
.pm-toolbar select {
  height: 36px;
  padding: 0 10px;
  border-radius: 9px;
  border: 1px solid rgba(196, 154, 91, 0.4);
  background: #FFFDF8;
  color: var(--ink, #2E1A20);
  font-size: 12px;
  font-family: inherit;
}
.pm-status {
  margin-left: auto;
  font-size: 11px;
  color: var(--wine, #8B2635);
}
.pm-staging {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  margin-top: 12px;
  padding-bottom: 2px;
}
.pm-staging:empty {
  display: none;
}
.pm-stage {
  flex: 0 0 280px;
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) 104px 24px;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border-radius: 12px;
  background: #FFFDF8;
  border: 1px solid rgba(196, 154, 91, 0.25);
}
.pm-stage-thumb {
  width: 46px;
  height: 46px;
  border-radius: 8px;
  overflow: hidden;
  background: #F2E9DE;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pm-stage-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.pm-stage-name {
  font-size: 11.5px;
  color: var(--ink, #2E1A20);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pm-stage select {
  width: 100%;
  height: 30px;
  border-radius: 7px;
  border: 1px solid rgba(196, 154, 91, 0.35);
  background: #FFFDF8;
  font-size: 10.5px;
  padding: 0 4px;
}
.pm-stage-remove {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: none;
  background: rgba(139, 38, 53, 0.07);
  color: var(--wine, #8B2635);
  font-size: 11px;
  cursor: pointer;
}
.pm-upload-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  margin-top: 12px;
  font-size: 11.5px;
  color: var(--ink-soft, #7A5560);
}
.pm-toolbar {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
  padding: 12px 24px;
  background: rgba(255, 253, 248, 0.7);
  border-bottom: 1px solid rgba(196, 154, 91, 0.16);
}
.pm-all {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  color: var(--ink, #2E1A20);
  cursor: pointer;
}
.pm-sel {
  font-size: 11px;
  color: var(--gold-deep, #A8752E);
}
.pm-toolbar #pm-filter {
  margin-left: auto;
}
.pm-danger {
  color: #B23A48;
  border-color: rgba(178, 58, 72, 0.24);
}
.pm-danger:hover {
  background: rgba(178, 58, 72, 0.06);
  border-color: rgba(178, 58, 72, 0.5);
}
.pm-grid {
  overflow-y: auto;
  padding: 18px 24px 24px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
  gap: 14px;
  flex: 1;
}
.pm-card {
  position: relative;
  padding: 6px;
  border-radius: 12px;
  border: 1px solid rgba(196, 154, 91, 0.22);
  background: #FFFDF8;
  cursor: pointer;
  transition: all 0.2s ease;
}
.pm-card:hover {
  border-color: rgba(196, 154, 91, 0.6);
  box-shadow: 0 8px 20px rgba(74, 21, 32, 0.08);
}
.pm-card.is-selected {
  border-color: var(--wine, #8B2635);
  background: rgba(139, 38, 53, 0.045);
  box-shadow: 0 0 0 2px rgba(139, 38, 53, 0.14);
}
.pm-card-check {
  position: absolute;
  left: 10px;
  top: 10px;
  z-index: 2;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 253, 248, 0.9);
  border: 1px solid rgba(196, 154, 91, 0.4);
  cursor: pointer;
}
.pm-card-check input {
  margin: 0;
  accent-color: #8B2635;
}
.pm-card-thumb {
  aspect-ratio: 1;
  border-radius: 8px;
  overflow: hidden;
  background: #F2E9DE;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pm-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.pm-video {
  font-size: 22px;
  color: rgba(139, 38, 53, 0.5);
}
.pm-card-title {
  margin: 6px 2px 4px;
  font-size: 11px;
  color: var(--ink, #2E1A20);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pm-card-album {
  width: 100%;
  height: 28px;
  border-radius: 7px;
  border: 1px solid rgba(196, 154, 91, 0.3);
  background: #FBF5EF;
  color: var(--ink-soft, #7A5560);
  font-size: 10px;
  padding: 0 4px;
  font-family: inherit;
}
.pm-empty {
  grid-column: 1 / -1;
  padding: 50px 10px;
  text-align: center;
  font-size: 12px;
  color: rgba(122, 85, 96, 0.7);
}

@media (max-width: 760px) {
  .pm-mask { padding: 0; }
  .pm-panel {
    width: 100vw;
    max-height: 100vh;
    height: 100vh;
    border-radius: 0;
    border: none;
  }
  .pm-head { padding: 16px 16px 10px; }
  .pm-head h3 { font-size: 20px; }
  .pm-upload { padding: 0 16px 12px; }
  .pm-toolbar { padding: 10px 16px; }
  .pm-toolbar #pm-filter { margin-left: 0; }
  .pm-grid {
    padding: 14px 16px 20px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 9px;
  }
  .pm-stage { flex-basis: 250px; }
  .pm-upload-row { gap: 7px; }
  .pm-status { margin-left: 0; width: 100%; }
}

.pm-upload-actions[hidden] {
  display: none !important;
}

/* 照片卡片上的介绍入口 */
.pm-card-copy {
  display: flex;
  align-items: center;
  gap: 4px;
  width: 100%;
  margin: 6px 0 4px;
  padding: 0 2px;
  border: none;
  background: transparent;
  text-align: left;
  cursor: pointer;
}
.pm-card-copy .pm-card-title {
  flex: 1;
  min-width: 0;
  margin: 0;
}
.pm-card-edit {
  flex: 0 0 auto;
  font-size: 10px;
  color: rgba(168, 117, 46, 0.75);
  opacity: 0.55;
  transition: opacity 0.2s ease;
}
.pm-card-copy:hover .pm-card-edit {
  opacity: 1;
}
.pm-card-copy:hover .pm-card-title {
  color: var(--wine, #8B2635);
}
.pm-card-copy.is-empty .pm-card-title {
  color: rgba(168, 117, 46, 0.85);
  font-style: italic;
}

/* 照片文案编辑 */
.pc-mask {
  position: fixed;
  inset: 0;
  z-index: 5000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(26, 9, 16, 0.64);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
}
.pc-mask.show {
  opacity: 1;
  pointer-events: auto;
}
.pc-panel {
  width: min(460px, 94vw);
  max-height: 92vh;
  overflow-y: auto;
  padding: 24px 24px 18px;
  border-radius: 22px;
  background: linear-gradient(165deg, #FFFDF8 0%, #F8EFE4 100%);
  border: 1px solid rgba(196, 154, 91, 0.45);
  box-shadow: 0 30px 80px rgba(18, 4, 8, 0.5);
  transform: translateY(12px) scale(0.98);
  transition: transform 0.26s cubic-bezier(0.22, 1, 0.36, 1);
}
.pc-mask.show .pc-panel {
  transform: translateY(0) scale(1);
}
.pc-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}
.pc-kicker {
  font-size: 9.5px;
  letter-spacing: 0.36em;
  color: var(--gold-deep, #A8752E);
  margin-bottom: 5px;
}
.pc-head h3 {
  margin: 0;
  font-family: var(--font-display, serif);
  font-size: 22px;
  letter-spacing: 0.05em;
  color: var(--ink, #2E1A20);
}
.pc-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid rgba(139, 38, 53, 0.18);
  background: transparent;
  color: var(--wine, #8B2635);
  font-size: 19px;
  line-height: 1;
  cursor: pointer;
}
.pc-preview {
  height: 132px;
  margin: 14px 0 16px;
  border-radius: 14px;
  overflow: hidden;
  background: #F2E9DE;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pc-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.pc-video {
  font-size: 12px;
  color: rgba(122, 85, 96, 0.65);
  letter-spacing: 0.12em;
}
.pc-ai-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 2px 0 16px;
}
.pc-status {
  font-size: 10.5px;
  line-height: 1.5;
  color: rgba(122, 85, 96, 0.75);
}
.pc-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}
