/* ============================================================
   米会玩相册 H5 · Aurora Glass 主题
   ------------------------------------------------------------
   设计原则：
     1) 层次  背景极光光雾 → 玻璃浮层 → 彩色渐变高光
     2) 动效  入场错峰上浮 / 点击回弹 / 加载微光 / 呼吸光晕
     3) 契约  只依赖既有 class 名与 id，不改动业务选择器
   ============================================================ */

/* ============ 设计令牌 ============ */
:root {
  /* 品牌色 */
  --brand-1: #7C5CFF;
  --brand-2: #A855F7;
  --brand-3: #FF6FA5;
  --mint-1: #2CD9C2;
  --amber-1: #FFB44C;
  --sky-1: #4CC9FF;
  --danger-1: #FF4D6D;

  /* 渐变 */
  --grad-brand: linear-gradient(135deg, #7C5CFF 0%, #A855F7 55%, #FF6FA5 100%);
  --grad-aurora: linear-gradient(120deg, #FF6FA5 0%, #A855F7 30%, #6C7DFF 62%, #2CD9C2 100%);
  --grad-pink: linear-gradient(135deg, #FF6FA5 0%, #FFB44C 100%);
  --grad-mint: linear-gradient(135deg, #2CD9C2 0%, #4CC9FF 100%);
  --grad-danger: linear-gradient(135deg, #FF5C7A 0%, #FF3D6E 100%);

  /* 文字 */
  --ink-900: #171331;
  --ink-700: #3A3357;
  --ink-500: #6E6688;
  --ink-400: #9A93B4;
  --ink-300: #C9C4DC;

  /* 面 */
  --surface: #FFFFFF;
  --surface-2: #F8F6FF;
  --surface-3: #F1EDFC;
  --line: #EEEAFA;
  --bg: #F3F1FB;

  /* 圆角 */
  --r-xs: 8px;
  --r-sm: 12px;
  --r-md: 16px;
  --r-lg: 22px;
  --r-xl: 30px;
  --r-pill: 999px;

  /* 阴影 */
  --sh-xs: 0 1px 3px rgba(80, 50, 160, .06);
  --sh-sm: 0 4px 14px -4px rgba(80, 50, 160, .12);
  --sh-md: 0 10px 28px -8px rgba(80, 50, 160, .18);
  --sh-lg: 0 22px 50px -16px rgba(80, 50, 160, .28);
  --sh-brand: 0 12px 28px -10px rgba(124, 92, 255, .55);
  --sh-pink: 0 12px 28px -10px rgba(255, 111, 165, .5);

  /* 缓动 */
  --ease: cubic-bezier(.22, 1, .36, 1);
  --ease-back: cubic-bezier(.34, 1.56, .64, 1);
  --t-fast: .18s;
  --t: .3s;
  --t-slow: .5s;

  --maxw: 750px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
}

/* ============ 基础重置 ============ */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'PingFang SC', 'HarmonyOS Sans SC', 'Hiragino Sans GB',
    -apple-system, BlinkMacSystemFont, 'Microsoft YaHei', 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--ink-900);
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* 全屏浮层打开时冻结背景滚动：
   既避免穿透滚动，也让滚动条消失，浮层能真正铺满视口 */
body.no-scroll {
  overflow: hidden;
}

button,
input,
select,
textarea {
  font-family: inherit;
  font-size: inherit;
}

img {
  max-width: 100%;
}

/* ============ 背景极光光雾 ============ */
.bg-deco {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.bg-deco .blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(64px);
  opacity: .38;
  will-change: transform;
}

.bg-deco .b1 {
  width: 56vw;
  height: 56vw;
  max-width: 400px;
  max-height: 400px;
  top: -9%;
  left: -16%;
  background: #A855F7;
  animation: drift1 19s var(--ease) infinite alternate;
}

.bg-deco .b2 {
  width: 50vw;
  height: 50vw;
  max-width: 360px;
  max-height: 360px;
  top: 24%;
  right: -20%;
  background: #FF6FA5;
  animation: drift2 24s var(--ease) infinite alternate;
}

.bg-deco .b3 {
  width: 48vw;
  height: 48vw;
  max-width: 340px;
  max-height: 340px;
  bottom: -12%;
  left: 4%;
  background: #2CD9C2;
  animation: drift3 28s var(--ease) infinite alternate;
}

@keyframes drift1 {
  to { transform: translate3d(28px, 36px, 0) scale(1.14); }
}

@keyframes drift2 {
  to { transform: translate3d(-32px, 28px, 0) scale(1.1); }
}

@keyframes drift3 {
  to { transform: translate3d(24px, -30px, 0) scale(1.16); }
}

/* ============ 应用容器 ============ */
.container {
  position: relative;
  z-index: 1;
  max-width: var(--maxw);
  margin: 0 auto;
  min-height: 100vh;
  padding-bottom: calc(84px + var(--safe-b));
}

/* 全屏页（登录 / 分享访问）没有底部导航，去掉为 TabBar 预留的留白 */
.container:has(> .login-page),
.container:has(> .share-page) {
  padding-bottom: 0;
}

/* ============ 通用动效 ============ */
@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes popIn {
  from { opacity: 0; transform: translateY(22px) scale(.96); }
  to { opacity: 1; transform: none; }
}

@keyframes floatY {
  50% { transform: translateY(-8px); }
}

@keyframes shimmer {
  to { background-position: -200% 0; }
}

@keyframes cardIn {
  from { opacity: 0; transform: translateY(20px) scale(.97); }
  to { opacity: 1; transform: none; }
}

@keyframes itemIn {
  from { opacity: 0; transform: scale(.92); }
  to { opacity: 1; transform: none; }
}

@keyframes sheen {
  0% { left: -70%; }
  55%, 100% { left: 140%; }
}

@keyframes auroraSpin {
  to { transform: rotate(360deg); }
}

@keyframes kenburns {
  from { transform: scale(1); }
  to { transform: scale(1.055); }
}

/* ============ Toast ============ */
.toast {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 10000;
  max-width: 78%;
  padding: 14px 22px;
  border-radius: var(--r-md);
  background: rgba(23, 19, 49, .88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  color: #fff;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.45;
  text-align: center;
  box-shadow: 0 18px 40px -12px rgba(0, 0, 0, .45), inset 0 1px 0 rgba(255, 255, 255, .14);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(.9);
  transition: opacity var(--t) var(--ease), transform var(--t) var(--ease-back);
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.toast.success {
  background: linear-gradient(135deg, rgba(44, 217, 194, .96), rgba(76, 201, 255, .96));
  box-shadow: 0 18px 40px -12px rgba(44, 217, 194, .62), inset 0 1px 0 rgba(255, 255, 255, .3);
}

.toast.error {
  background: linear-gradient(135deg, rgba(255, 92, 122, .97), rgba(255, 61, 110, .97));
  box-shadow: 0 18px 40px -12px rgba(255, 80, 110, .62), inset 0 1px 0 rgba(255, 255, 255, .3);
}

/* ============ 登录页 ============ */
.login-page {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 40px 26px;
  overflow: hidden;
  background: linear-gradient(140deg, #6C5CE7 0%, #A855F7 44%, #FF6FA5 100%);
}

.login-page::before {
  content: '';
  position: absolute;
  inset: -32%;
  filter: blur(12px);
  background:
    radial-gradient(38% 32% at 24% 20%, rgba(44, 217, 194, .55), transparent 70%),
    radial-gradient(42% 36% at 80% 26%, rgba(255, 180, 76, .5), transparent 70%),
    radial-gradient(46% 40% at 66% 84%, rgba(255, 255, 255, .34), transparent 70%);
  animation: auroraSpin 26s linear infinite;
}

.login-box {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 400px;
  padding: 42px 28px 34px;
  border-radius: var(--r-xl);
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(22px) saturate(1.3);
  -webkit-backdrop-filter: blur(22px) saturate(1.3);
  box-shadow: 0 30px 70px -24px rgba(40, 10, 90, .55), inset 0 1px 0 rgba(255, 255, 255, .9);
  animation: popIn .6s var(--ease-back) both;
}

/* 品牌符号：SVG 原图透明底，直接放在白色登录卡上，不再套紫色方块 */
.brand-mark {
  width: 72px;
  height: 72px;
  margin: 0 auto 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  box-shadow: none;
  animation: floatY 3.8s ease-in-out infinite;
}

.brand-mark img {
  width: 72px;
  height: 72px;
  display: block;
}

.brand-mark svg {
  width: 32px;
  height: 32px;
  display: block;
}

.login-title {
  text-align: center;
  font-size: 27px;
  font-weight: 800;
  letter-spacing: -.4px;
  color: var(--ink-900);
  margin-bottom: 6px;
}

.login-title span {
  background: var(--grad-brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.login-sub {
  text-align: center;
  font-size: 12.5px;
  color: var(--ink-400);
  letter-spacing: .6px;
  margin-bottom: 30px;
}

/* ============ 表单控件 ============ */
.input {
  width: 100%;
  padding: 16px 18px;
  margin-bottom: 14px;
  border: 1.5px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface-2);
  color: var(--ink-900);
  font-size: 16px;
  transition: border-color var(--t-fast), box-shadow var(--t-fast), background var(--t-fast);
}

.input::placeholder {
  color: var(--ink-300);
}

.input:focus {
  outline: none;
  background: #fff;
  border-color: #B9A6FF;
  box-shadow: 0 0 0 4px rgba(124, 92, 255, .14);
}

.btn-primary {
  position: relative;
  overflow: hidden;
  width: 100%;
  padding: 17px;
  margin-top: 6px;
  border: none;
  border-radius: var(--r-md);
  background: var(--grad-brand);
  background-size: 180% 180%;
  color: #fff;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: .5px;
  cursor: pointer;
  box-shadow: var(--sh-brand);
  transition: transform var(--t-fast) var(--ease), box-shadow var(--t), background-position var(--t-slow);
}

.btn-primary::after {
  content: '';
  position: absolute;
  top: 0;
  left: -70%;
  width: 45%;
  height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .5), transparent);
  transform: skewX(-18deg);
  animation: sheen 3.6s ease-in-out infinite;
  pointer-events: none;
}

.btn-primary:active {
  transform: scale(.975);
  box-shadow: var(--sh-md);
}

.btn-primary:disabled {
  opacity: .6;
  pointer-events: none;
}

/* ============ 顶部 Hero（首页 / 我的） ============ */
.home-header {
  position: relative;
  padding: calc(52px + var(--safe-t)) 24px 106px;
  overflow: hidden;
  border-radius: 0 0 34px 34px;
  background: linear-gradient(135deg, #7C5CFF 0%, #A855F7 46%, #FF6FA5 100%);
}

.home-header::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(58% 46% at 12% 4%, rgba(255, 255, 255, .4), transparent 62%),
    radial-gradient(46% 40% at 92% 12%, rgba(44, 217, 194, .5), transparent 66%),
    radial-gradient(60% 46% at 76% 96%, rgba(255, 180, 76, .42), transparent 64%);
}

.home-header::after {
  content: '';
  position: absolute;
  top: -84px;
  right: -72px;
  width: 224px;
  height: 224px;
  border-radius: 50%;
  background: radial-gradient(circle at 38% 38%, rgba(255, 255, 255, .5), rgba(255, 255, 255, 0) 62%);
  animation: floatY 7.5s ease-in-out infinite;
  pointer-events: none;
}

.home-header--compact {
  padding-bottom: 92px;
}

.user-info {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 14px;
  color: #fff;
  cursor: pointer;
}

.avatar {
  flex: 0 0 auto;
  width: 62px;
  height: 62px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  background: rgba(255, 255, 255, .22);
  border: 2px solid rgba(255, 255, 255, .75);
  box-shadow: 0 8px 22px -8px rgba(0, 0, 0, .35), inset 0 1px 0 rgba(255, 255, 255, .4);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.user-meta {
  flex: 1;
  min-width: 0;
}

.user-greet {
  font-size: 12.5px;
  color: rgba(255, 255, 255, .84);
  letter-spacing: .5px;
  margin-bottom: 2px;
}

.user-name {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: .2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-arrow {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: #fff;
  background: rgba(255, 255, 255, .18);
  border: 1px solid rgba(255, 255, 255, .26);
  transition: transform var(--t-fast) var(--ease-back);
}

.user-info:active .user-arrow {
  transform: translateX(3px) scale(.94);
}

.hero-head {
  position: relative;
  z-index: 2;
  margin-top: 26px;
}

.hero-head h1 {
  font-size: 25px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -.3px;
  text-shadow: 0 2px 14px rgba(60, 20, 110, .3);
}

.hero-head p {
  margin-top: 6px;
  font-size: 12.5px;
  color: rgba(255, 255, 255, .86);
  letter-spacing: .3px;
}

.hero-head p b {
  font-size: 15px;
  font-weight: 800;
  color: #fff;
}

/* ============ 相册卡片 ============ */
.album-list {
  position: relative;
  z-index: 3;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  padding: 0 20px;
  margin-top: -70px;
}

.album-card {
  position: relative;
  width: calc(50% - 7px);
  aspect-ratio: 4 / 5;
  border-radius: var(--r-lg);
  overflow: hidden;
  cursor: pointer;
  background: var(--surface);
  box-shadow: var(--sh-md);
  transition: transform .32s var(--ease), box-shadow .32s var(--ease);
  animation: cardIn .55s var(--ease) both;
}

.album-card:nth-child(1) { animation-delay: .02s; }
.album-card:nth-child(2) { animation-delay: .06s; }
.album-card:nth-child(3) { animation-delay: .1s; }
.album-card:nth-child(4) { animation-delay: .14s; }
.album-card:nth-child(5) { animation-delay: .18s; }
.album-card:nth-child(6) { animation-delay: .22s; }
.album-card:nth-child(7) { animation-delay: .26s; }
.album-card:nth-child(8) { animation-delay: .3s; }
.album-card:nth-child(n+9) { animation-delay: .34s; }

.album-card:active {
  transform: scale(.965);
  box-shadow: var(--sh-sm);
}

.album-cover {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 52px;
  color: rgba(255, 255, 255, .88);
  background: linear-gradient(135deg, #8B7BFF 0%, #B06BF0 50%, #FF7FA8 100%);
  background-size: cover;
  background-position: center;
  transition: transform .6s var(--ease);
}

.album-cover::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top,
      rgba(12, 6, 32, .84) 0%,
      rgba(12, 6, 32, .34) 38%,
      rgba(12, 6, 32, 0) 68%);
}

.album-card:active .album-cover {
  transform: scale(1.05);
}

.album-info {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  padding: 14px 14px 15px;
}

.album-name {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 15.5px;
  font-weight: 700;
  line-height: 1.28;
  color: #fff;
  letter-spacing: .2px;
  text-shadow: 0 1px 8px rgba(0, 0, 0, .4);
}

.album-type {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 7px;
  padding: 3px 9px;
  border-radius: var(--r-pill);
  font-size: 11px;
  font-weight: 600;
  color: #fff;
  background: rgba(255, 255, 255, .2);
  border: 1px solid rgba(255, 255, 255, .32);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.album-actions {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 4;
  display: flex;
  gap: 6px;
}

.album-action-btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: #fff;
  background: rgba(20, 12, 40, .42);
  border: 1px solid rgba(255, 255, 255, .28);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: transform var(--t-fast) var(--ease-back), background var(--t-fast);
}

.album-action-btn:active {
  transform: scale(.86);
  background: rgba(20, 12, 40, .72);
}

/* 新建相册卡片 */
.add-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: auto;
  background: rgba(255, 255, 255, .74);
  border: 2px dashed #D6CFF2;
  box-shadow: none;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.add-card:active {
  background: rgba(255, 255, 255, .96);
  border-color: #B9A6FF;
  transform: scale(.965);
}

.add-icon {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 300;
  line-height: 1;
  color: #fff;
  background: var(--grad-brand);
  box-shadow: var(--sh-brand);
  animation: floatY 3.6s ease-in-out infinite;
}

.add-text {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-500);
}

/* ============ TabBar ============ */
.tab-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 100;
  display: flex;
  gap: 6px;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 8px 14px calc(8px + var(--safe-b));
  background: rgba(255, 255, 255, .84);
  backdrop-filter: blur(22px) saturate(1.5);
  -webkit-backdrop-filter: blur(22px) saturate(1.5);
  border-top: 1px solid rgba(255, 255, 255, .7);
  box-shadow: 0 -10px 30px -14px rgba(80, 50, 160, .22);
}

.tab-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 7px 0 4px;
  border-radius: var(--r-md);
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-400);
  cursor: pointer;
  transition: color var(--t) var(--ease), background var(--t) var(--ease), transform var(--t-fast) var(--ease-back);
}

.tab-item:active {
  transform: scale(.94);
}

.tab-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  transition: transform var(--t) var(--ease-back);
}

.tab-icon svg {
  display: block;
  width: 22px;
  height: 22px;
}

.tab-item.active {
  color: var(--brand-1);
  background: linear-gradient(180deg, rgba(124, 92, 255, .13), rgba(255, 111, 165, .1));
}

.tab-item.active .tab-icon {
  transform: translateY(-2px) scale(1.08);
}

.tab-item.active .tab-icon svg {
  filter: drop-shadow(0 4px 8px rgba(124, 92, 255, .45));
}

/* ============ 相册详情 Hero ============ */
.album-detail-header {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 300px;
  padding: 0 24px 32px;
  overflow: hidden;
  border-radius: 0 0 34px 34px;
  background: linear-gradient(135deg, #7C5CFF 0%, #A855F7 55%, #FF6FA5 100%);
  background-size: cover;
  background-position: center;
}

.album-detail-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom,
      rgba(10, 6, 26, .34) 0%,
      rgba(10, 6, 26, .14) 34%,
      rgba(10, 6, 26, .86) 100%);
}

.album-detail-header::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(52% 42% at 90% 8%, rgba(44, 217, 194, .28), transparent 68%),
    radial-gradient(56% 40% at 4% 0%, rgba(255, 255, 255, .24), transparent 62%);
}

.back-btn {
  position: absolute;
  top: calc(18px + var(--safe-t));
  left: 20px;
  z-index: 10;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: #fff;
  background: rgba(255, 255, 255, .18);
  border: 1px solid rgba(255, 255, 255, .32);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  cursor: pointer;
  transition: transform var(--t-fast) var(--ease-back), background var(--t-fast);
}

.back-btn:active {
  transform: scale(.9);
  background: rgba(255, 255, 255, .34);
}

.album-actions-header {
  position: absolute;
  top: calc(18px + var(--safe-t));
  right: 20px;
  z-index: 10;
  display: flex;
  gap: 10px;
}

.header-action-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  color: #fff;
  background: rgba(255, 255, 255, .18);
  border: 1px solid rgba(255, 255, 255, .32);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  cursor: pointer;
  transition: transform var(--t-fast) var(--ease-back), background var(--t-fast);
}

.header-action-btn:active {
  transform: scale(.9);
  background: rgba(255, 255, 255, .34);
}

.album-title {
  position: relative;
  z-index: 5;
}

.album-title h2 {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -.3px;
  color: #fff;
  margin-bottom: 9px;
  text-shadow: 0 2px 16px rgba(20, 6, 44, .5);
}

.album-title span {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: var(--r-pill);
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  background: rgba(255, 255, 255, .2);
  border: 1px solid rgba(255, 255, 255, .32);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* ============ 媒体工具栏（悬浮分段控件） ============ */
.media-toolbar {
  position: relative;
  z-index: 4;
  display: flex;
  gap: 6px;
  margin: -30px 20px 18px;
  padding: 8px;
  background: rgba(255, 255, 255, .9);
  backdrop-filter: blur(18px) saturate(1.4);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  border-radius: var(--r-xl);
  border: 1px solid rgba(255, 255, 255, .85);
  box-shadow: var(--sh-md);
}

.toolbar-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 9px 6px;
  border-radius: var(--r-lg);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--t) var(--ease), transform var(--t-fast) var(--ease-back), box-shadow var(--t);
}

.toolbar-btn svg {
  width: 19px;
  height: 19px;
  display: block;
}

.toolbar-btn:nth-child(1) {
  color: #7C5CFF;
  background: rgba(124, 92, 255, .09);
}

.toolbar-btn:nth-child(2) {
  color: #FF5F9C;
  background: rgba(255, 111, 165, .1);
}

.toolbar-btn:nth-child(3) {
  color: #14B8A6;
  background: rgba(44, 217, 194, .12);
}

.toolbar-btn:active {
  transform: scale(.94);
}

@media (hover: hover) {
  .toolbar-btn:hover {
    box-shadow: inset 0 0 0 1.5px currentColor;
  }
}

/* ============ 媒体九宫格 ============ */
.media-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 14px 20px;
  background: transparent;
}

.media-item {
  position: relative;
  width: calc(33.333% - 4px);
  aspect-ratio: 1;
  border-radius: var(--r-sm);
  overflow: hidden;
  background: var(--surface-3);
  cursor: pointer;
  box-shadow: 0 2px 10px -6px rgba(80, 50, 160, .35);
  transition: transform .28s var(--ease), box-shadow .28s var(--ease);
  animation: itemIn .42s var(--ease) both;
}

.media-item:nth-child(3n+2) { animation-delay: .05s; }
.media-item:nth-child(3n+3) { animation-delay: .1s; }

.media-item:active {
  transform: scale(.93);
  box-shadow: 0 2px 6px -4px rgba(80, 50, 160, .3);
}

.media-item img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s var(--ease), filter var(--t);
}

.media-item:active img {
  transform: scale(1.08);
}

.media-item .play-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 38px;
  height: 38px;
  padding-left: 2px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: #fff;
  background: rgba(20, 12, 40, .44);
  border: 1px solid rgba(255, 255, 255, .5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 6px 18px -6px rgba(0, 0, 0, .6);
}

.media-item .media-check {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: #fff;
  background: rgba(124, 92, 255, .85);
  backdrop-filter: blur(6px);
}

.media-item.selected {
  box-shadow: 0 0 0 3px var(--brand-1), var(--sh-md);
}

/* 上传占位块 */
.upload-btn {
  width: calc(33.333% - 4px);
  aspect-ratio: 1;
  border-radius: var(--r-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border: 2px dashed #D8D1F5;
  background: rgba(255, 255, 255, .66);
  cursor: pointer;
  transition: transform .2s var(--ease-back), border-color .2s, background .2s;
  animation: itemIn .42s var(--ease) both;
}

.upload-btn:active {
  transform: scale(.93);
  border-color: #B9A6FF;
  background: #fff;
}

.upload-btn .icon {
  font-size: 30px;
  font-weight: 300;
  line-height: 1;
  background: var(--grad-brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.upload-btn .text {
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-400);
}

/* 骨架屏 */
.sk-tile {
  width: calc(33.333% - 4px);
  aspect-ratio: 1;
  border-radius: var(--r-sm);
  background: linear-gradient(100deg, #EFEBFB 30%, #FAF8FF 50%, #EFEBFB 70%);
  background-size: 200% 100%;
  animation: shimmer 1.5s linear infinite;
}

.sk-tile:nth-child(2n) { animation-delay: .1s; }
.sk-tile:nth-child(3n) { animation-delay: .2s; }

/* 加载更多 */
.load-more {
  grid-column: 1 / -1;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 20px;
  font-size: 12.5px;
  color: var(--ink-400);
}

.load-more .spinner {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid rgba(124, 92, 255, .18);
  border-top-color: var(--brand-1);
  animation: spin .8s linear infinite;
}

/* ============ 创建 / 编辑相册 ============ */
.create-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px calc(14px + var(--safe-t));
  background: rgba(255, 255, 255, .86);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  border-bottom: 1px solid var(--line);
}

.create-header .back {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: var(--ink-700);
  background: var(--surface-2);
  cursor: pointer;
  transition: transform var(--t-fast) var(--ease-back), background var(--t-fast);
}

.create-header .back:active {
  transform: scale(.9);
  background: var(--surface-3);
}

.create-header h2 {
  flex: 1;
  margin-right: 40px;
  text-align: center;
  font-size: 17px;
  font-weight: 700;
  color: var(--ink-900);
}

.create-content {
  padding: 24px 20px 44px;
}

.form-label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 11px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink-700);
}

.form-label::before {
  content: '';
  width: 4px;
  height: 14px;
  border-radius: 2px;
  background: var(--grad-brand);
}

.type-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 11px;
  margin-bottom: 34px;
}

.type-item {
  width: calc(50% - 5.5px);
  padding: 18px 10px;
  text-align: center;
  cursor: pointer;
  border: 1.5px solid var(--line);
  border-radius: var(--r-md);
  background: #fff;
  box-shadow: var(--sh-xs);
  transition: transform .22s var(--ease-back), border-color .22s, box-shadow .22s, background .22s;
}

.type-item:active {
  transform: scale(.96);
}

.type-item .icon {
  font-size: 30px;
  line-height: 1;
  margin-bottom: 8px;
}

.type-item .name {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink-700);
}

.type-item.selected {
  border-color: transparent;
  background: linear-gradient(#fff, #fff) padding-box, var(--grad-brand) border-box;
  box-shadow: 0 10px 24px -10px rgba(124, 92, 255, .5);
}

.type-item.selected .name {
  font-weight: 700;
  background: var(--grad-brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ============ 我的 ============ */
.mine-stats {
  position: relative;
  z-index: 3;
  display: flex;
  gap: 6px;
  margin: -62px 20px 20px;
  padding: 6px;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(18px) saturate(1.4);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  border-radius: var(--r-xl);
  border: 1px solid rgba(255, 255, 255, .85);
  box-shadow: var(--sh-md);
}

.stat-item {
  flex: 1;
  padding: 22px 10px;
  border-radius: var(--r-lg);
  text-align: center;
}

.stat-item:nth-child(1) {
  background: linear-gradient(180deg, rgba(124, 92, 255, .11), rgba(124, 92, 255, .01));
}

.stat-item:nth-child(2) {
  background: linear-gradient(180deg, rgba(255, 111, 165, .11), rgba(255, 111, 165, .01));
}

.stat-value {
  font-size: 27px;
  font-weight: 800;
  letter-spacing: -.5px;
  background: var(--grad-brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.stat-item:nth-child(2) .stat-value {
  background: var(--grad-pink);
  -webkit-background-clip: text;
  background-clip: text;
}

.stat-label {
  margin-top: 5px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink-400);
}

.menu-list {
  margin: 0 20px 26px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  overflow: hidden;
  box-shadow: var(--sh-md);
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 15px 18px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  transition: background .2s;
}

.menu-item:last-child {
  border-bottom: none;
}

.menu-item:active {
  background: var(--surface-2);
}

.menu-item .icon {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  border-radius: var(--r-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  background: var(--surface-2);
}

.menu-item .text {
  flex: 1;
  font-size: 15.5px;
  font-weight: 600;
  color: var(--ink-900);
}

.menu-item .text.danger,
.menu-item.danger .text {
  color: var(--danger-1);
}

.menu-item .arrow {
  color: var(--ink-300);
  font-size: 20px;
}

/* ============ 底部抽屉通用 ============ */
.sheet-handle {
  width: 42px;
  height: 4.5px;
  margin: 0 auto 16px;
  border-radius: var(--r-pill);
  background: #E3DDF5;
}

/* ============ 分享设置弹窗 ============ */
.share-modal {
  position: fixed;
  width: 100vw;
  inset: 0;
  z-index: 1000;
  background: rgba(20, 12, 40, .5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--t) var(--ease);
}

.share-modal.show {
  opacity: 1;
  pointer-events: auto;
}

.share-sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1001;
  max-width: var(--maxw);
  margin: 0 auto;
  max-height: 92vh;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 10px 22px calc(24px + var(--safe-b));
  background: #fff;
  border-radius: var(--r-xl) var(--r-xl) 0 0;
  box-shadow: 0 -20px 60px -20px rgba(40, 10, 90, .45);
  transform: translateY(102%);
  transition: transform .38s var(--ease);
}

.share-modal.show .share-sheet {
  transform: translateY(0);
}

.share-title {
  margin-bottom: 22px;
  text-align: center;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: .2px;
  color: var(--ink-900);
}

.share-section {
  margin-bottom: 20px;
}

.share-section-title {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 10px;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .3px;
  color: var(--ink-500);
}

.share-section-title::before {
  content: '';
  flex: 0 0 auto;
  width: 3px;
  height: 12px;
  border-radius: 2px;
  background: var(--grad-aurora);
}

.share-radio-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.share-radio-group--grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 9px;
}

.share-radio-group--grid .share-radio:first-child {
  grid-column: span 2;
}

.share-radio {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 13px 10px;
  border: 1.5px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface-2);
  cursor: pointer;
  transition: all .22s var(--ease);
}

.share-radio-group--grid .share-radio {
  flex: none;
  padding: 11px 6px;
}

.share-radio input {
  display: none;
}

.radio-label {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--ink-700);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.share-radio-group--grid .radio-label {
  font-size: 13.5px;
}

.share-radio:has(input:checked) {
  border-color: transparent;
  background: linear-gradient(#fff, #fff) padding-box, var(--grad-brand) border-box;
  box-shadow: 0 8px 20px -10px rgba(124, 92, 255, .55);
}

.share-radio:has(input:checked) .radio-label {
  background: var(--grad-brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.share-radio:active {
  transform: scale(.97);
}

.share-select {
  width: 100%;
  padding: 14px 44px 14px 16px;
  border: 1.5px solid var(--line);
  border-radius: var(--r-md);
  background-color: var(--surface-2);
  color: var(--ink-900);
  font-size: 15px;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%237C5CFF' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
}

.share-select:focus {
  outline: none;
  background-color: #fff;
  border-color: #B9A6FF;
  box-shadow: 0 0 0 4px rgba(124, 92, 255, .14);
}

.share-option-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface-2);
}

.option-label {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--ink-700);
}

.share-switch {
  position: relative;
  flex: 0 0 auto;
  width: 50px;
  height: 29px;
  border-radius: var(--r-pill);
  background: #E3DDF5;
  cursor: pointer;
  transition: background var(--t) var(--ease), box-shadow var(--t);
}

.share-switch::after {
  content: '';
  position: absolute;
  top: 2.5px;
  left: 2.5px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 6px rgba(60, 30, 120, .25);
  transition: transform .32s var(--ease-back);
}

.share-switch.on {
  background: var(--grad-brand);
  box-shadow: 0 8px 18px -8px rgba(124, 92, 255, .7);
}

.share-switch.on::after {
  transform: translateX(21px);
}

/* 弹窗内输入控件 */
.modal-input {
  width: 100%;
  padding: 13px 16px;
  border: 1.5px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface-2);
  color: var(--ink-900);
  font-size: 15px;
  transition: border-color var(--t-fast), box-shadow var(--t-fast), background var(--t-fast);
}

.modal-input::placeholder {
  color: var(--ink-300);
}

.modal-input:focus {
  outline: none;
  background: #fff;
  border-color: #B9A6FF;
  box-shadow: 0 0 0 4px rgba(124, 92, 255, .14);
}

.modal-input--code {
  flex: 1;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 5px;
  text-align: center;
}

.modal-icon-btn {
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
  border: none;
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  background: var(--surface-3);
  color: var(--brand-1);
  cursor: pointer;
  transition: transform .3s var(--ease-back), background var(--t-fast);
}

.modal-icon-btn:active {
  transform: rotate(-180deg) scale(.94);
  background: #E7E0FA;
}

.share-btns {
  display: flex;
  gap: 11px;
  margin-top: 24px;
}

.share-btns button {
  flex: 1;
  padding: 15px;
  border: none;
  border-radius: var(--r-md);
  font-size: 15.5px;
  font-weight: 700;
  cursor: pointer;
  transition: transform var(--t-fast) var(--ease-back), opacity .2s;
}

.share-btns button:active {
  transform: scale(.96);
}

.share-btns .cancel {
  background: var(--surface-2);
  color: var(--ink-500);
}

.share-btns .create {
  background: var(--grad-brand);
  color: #fff;
  box-shadow: var(--sh-brand);
}

.share-link {
  margin-top: 18px;
  padding: 16px 18px;
  border: 1px dashed #D8D1F5;
  border-radius: var(--r-md);
  background: var(--surface-2);
  word-break: break-all;
  font-size: 13.5px;
  color: var(--ink-500);
  animation: popIn .34s var(--ease) both;
}

.share-link span {
  color: var(--brand-1);
  cursor: pointer;
}

.share-link-title {
  margin-bottom: 10px;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink-900);
}

.share-link-text {
  word-break: break-all;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--brand-1);
  cursor: pointer;
}

.share-link-pwd {
  margin-top: 10px;
  font-size: 13.5px;
  color: var(--ink-500);
}

.share-link-tip {
  margin-top: 14px;
  font-size: 11.5px;
  letter-spacing: .3px;
  color: var(--ink-400);
}

/* 弹窗内小工具类 */
.modal-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.wm-label-gap {
  margin-top: 14px;
}

.wm-toggle {
  cursor: pointer;
  user-select: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.wm-toggle-icon {
  display: inline-block;
  font-size: 10px;
  color: var(--brand-1);
  transition: transform .2s var(--ease);
}

/* ============ ActionSheet ============ */
.action-sheet {
  position: fixed;
  width: 100vw;
  inset: 0;
  z-index: 5000;
  background: rgba(20, 12, 40, .5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--t) var(--ease);
}

.action-sheet.show {
  opacity: 1;
  pointer-events: auto;
}

.action-sheet > div {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 10px 16px calc(16px + var(--safe-b));
  background: rgba(255, 255, 255, .97);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: var(--r-xl) var(--r-xl) 0 0;
  box-shadow: 0 -18px 50px -18px rgba(40, 10, 90, .4);
  transform: translateY(102%);
  transition: transform .36s var(--ease);
}

.action-sheet.show > div {
  transform: translateY(0);
}

#actionItems {
  border-radius: var(--r-md);
  overflow: hidden;
}

.action-item {
  padding: 16px;
  text-align: center;
  font-size: 15.5px;
  font-weight: 600;
  color: var(--ink-900);
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  transition: background .18s;
}

.action-item:last-child {
  border-bottom: none;
}

.action-item:active {
  background: var(--surface-2);
}

.action-item.danger {
  color: var(--danger-1);
}

.action-cancel {
  margin-top: 10px;
  padding: 15px;
  text-align: center;
  font-size: 15.5px;
  font-weight: 700;
  color: var(--ink-500);
  background: var(--surface-2);
  border-radius: var(--r-md);
  cursor: pointer;
  transition: background .18s;
}

.action-cancel:active {
  background: var(--surface-3);
}

/* ============ 通用对话框（确认 / 修改密码） ============ */
.dialog-overlay {
  position: fixed;
  width: 100vw;
  inset: 0;
  z-index: 5000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(20, 12, 40, .5);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  animation: fadeIn .25s var(--ease) both;
}

.dialog-card {
  width: 100%;
  max-width: 400px;
  padding: 26px 24px 22px;
  border-radius: var(--r-xl);
  background: #fff;
  box-shadow: 0 30px 70px -24px rgba(40, 10, 90, .5);
  animation: popIn .38s var(--ease-back) both;
}

.dialog-title {
  margin-bottom: 10px;
  text-align: center;
  font-size: 17.5px;
  font-weight: 800;
  color: var(--ink-900);
}

.dialog-msg {
  margin-bottom: 22px;
  text-align: center;
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink-500);
}

.dialog-btns {
  display: flex;
  gap: 11px;
}

.dialog-btns button {
  flex: 1;
  padding: 14px;
  border: none;
  border-radius: var(--r-md);
  font-size: 15.5px;
  font-weight: 700;
  cursor: pointer;
  transition: transform var(--t-fast) var(--ease-back);
}

.dialog-btns button:active {
  transform: scale(.96);
}

.btn-ghost {
  background: var(--surface-2);
  color: var(--ink-500);
}

.btn-danger {
  background: var(--grad-danger);
  color: #fff;
  box-shadow: 0 10px 24px -10px rgba(255, 61, 110, .7);
}

.btn-brand {
  background: var(--grad-brand);
  color: #fff;
  box-shadow: var(--sh-brand);
}

.dialog-field {
  width: 100%;
  padding: 14px 16px;
  margin-bottom: 12px;
  border: 1.5px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface-2);
  color: var(--ink-900);
  font-size: 15px;
  transition: border-color var(--t-fast), box-shadow var(--t-fast), background var(--t-fast);
}

.dialog-field::placeholder {
  color: var(--ink-300);
}

.dialog-field:focus {
  outline: none;
  background: #fff;
  border-color: #B9A6FF;
  box-shadow: 0 0 0 4px rgba(124, 92, 255, .14);
}

/* ============ Loading ============ */
.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  padding: 80px 20px;
  font-size: 14px;
  color: var(--ink-400);
}

.loading::before {
  content: '';
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 3px solid rgba(124, 92, 255, .16);
  border-top-color: var(--brand-1);
  animation: spin .8s linear infinite;
}

/* ============ 空状态 ============ */
.empty-state {
  width: 100%;
  padding: 68px 32px;
  text-align: center;
  color: var(--ink-400);
}

.empty-state .icon {
  width: 104px;
  height: 104px;
  margin: 0 auto 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 46px;
  background: linear-gradient(140deg, rgba(124, 92, 255, .14), rgba(255, 111, 165, .14));
  border: 1px solid #EDE7FF;
  animation: floatY 4s ease-in-out infinite;
}

.empty-state p {
  margin-bottom: 22px;
  font-size: 15px;
  color: var(--ink-500);
}

.empty-state button {
  padding: 13px 34px;
  border: none;
  border-radius: var(--r-pill);
  background: var(--grad-brand);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--sh-brand);
  transition: transform var(--t-fast) var(--ease-back);
}

.empty-state button:active {
  transform: scale(.94);
}

/* ============ 返回顶部 ============ */
.back-top-btn {
  position: fixed;
  right: 18px;
  bottom: calc(96px + var(--safe-b));
  z-index: 999;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: var(--grad-brand);
  box-shadow: 0 12px 28px -10px rgba(124, 92, 255, .75);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: scale(.7) translateY(8px);
  transition: opacity var(--t) var(--ease), transform .35s var(--ease-back);
}

.back-top-btn.show {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1) translateY(0);
}

.back-top-btn:active {
  transform: scale(.9);
}

.back-top-btn .arrow {
  font-size: 22px;
  font-weight: 800;
  line-height: 1;
}

/* ============ 图片预览 ============ */
.preview-overlay {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 100vh;
  z-index: 3000;
  display: flex;
  flex-direction: column;
  background: #08050F;
  animation: fadeIn .25s var(--ease) both;
}

.preview-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: calc(14px + var(--safe-t)) 18px 14px;
  background: linear-gradient(rgba(0, 0, 0, .55), transparent);
}

.preview-close,
.preview-action {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 19px;
  color: #fff;
  background: rgba(255, 255, 255, .14);
  border: 1px solid rgba(255, 255, 255, .22);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  cursor: pointer;
  transition: transform var(--t-fast) var(--ease-back), background var(--t-fast);
}

.preview-close:active,
.preview-action:active {
  transform: scale(.9);
  background: rgba(255, 255, 255, .28);
}

.preview-action.danger {
  background: rgba(255, 77, 109, .8);
  border-color: rgba(255, 255, 255, .28);
}

/* 原图按钮：当前显示原图时高亮 */
.preview-action.is-on {
  background: rgba(44, 217, 194, .34);
  border-color: rgba(44, 217, 194, .62);
}

.preview-actions {
  display: flex;
  gap: 10px;
}

.preview-content {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.preview-img-wrap {
  width: 100%;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #08050F;
  touch-action: none;
}

.preview-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transform-origin: center;
  transition: transform .25s var(--ease), opacity .18s;
  filter: drop-shadow(0 24px 60px rgba(0, 0, 0, .6));
}

.preview-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 42px;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: #fff;
  background: rgba(255, 255, 255, .1);
  border: 1px solid rgba(255, 255, 255, .18);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  cursor: pointer;
  transition: background var(--t-fast);
}

.preview-nav:active {
  background: rgba(255, 255, 255, .26);
}

.preview-nav.prev {
  left: 8px;
  border-radius: var(--r-md);
}

.preview-nav.next {
  right: 8px;
  border-radius: var(--r-md);
}

.preview-counter {
  position: absolute;
  bottom: calc(22px + var(--safe-b));
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  padding: 7px 18px;
  border-radius: var(--r-pill);
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  background: rgba(255, 255, 255, .14);
  border: 1px solid rgba(255, 255, 255, .2);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

/* ---- 原图自动加载：状态提示条 + 清晰度徽标 ---- */
.preview-hd-status {
  position: absolute;
  bottom: calc(62px + var(--safe-b));
  left: 50%;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: var(--r-pill);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .2px;
  white-space: nowrap;
  color: #fff;
  background: rgba(255, 255, 255, .13);
  border: 1px solid rgba(255, 255, 255, .2);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 8px 24px -12px rgba(0, 0, 0, .8);
  opacity: 0;
  transform: translate(-50%, 10px);
  pointer-events: none;
  transition: opacity .24s var(--ease), transform .24s var(--ease),
              background .24s var(--ease), border-color .24s var(--ease);
}

.preview-hd-status.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.preview-hd-status.is-done {
  background: rgba(44, 217, 194, .22);
  border-color: rgba(44, 217, 194, .48);
}

.preview-hd-status.is-error {
  background: rgba(255, 77, 109, .22);
  border-color: rgba(255, 77, 109, .48);
}

.hd-spinner {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .26);
  border-top-color: #fff;
  animation: spin .75s linear infinite;
}

.preview-hd-status.is-done .hd-spinner,
.preview-hd-status.is-error .hd-spinner {
  display: none;
}

.preview-quality {
  position: absolute;
  right: 16px;
  bottom: calc(62px + var(--safe-b));
  z-index: 10;
  padding: 5px 12px;
  border-radius: var(--r-pill);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .5px;
  color: rgba(255, 255, 255, .62);
  background: rgba(255, 255, 255, .1);
  border: 1px solid rgba(255, 255, 255, .16);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: color .26s var(--ease), background .26s var(--ease), border-color .26s var(--ease);
}

.preview-quality.is-hd {
  color: #C6F6E6;
  background: rgba(44, 217, 194, .22);
  border-color: rgba(44, 217, 194, .48);
}

/* ============ 分享访问页 ============ */
.share-page {
  min-height: 100vh;
  padding-bottom: 24px;
}

.share-header {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 290px;
  padding: 0 24px 32px;
  overflow: hidden;
  border-radius: 0 0 34px 34px;
  background: linear-gradient(135deg, #7C5CFF 0%, #A855F7 55%, #FF6FA5 100%);
  background-size: cover;
  background-position: center;
}

.share-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom,
      rgba(10, 6, 26, .3) 0%,
      rgba(10, 6, 26, .14) 36%,
      rgba(10, 6, 26, .84) 100%);
}

.share-header::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(50% 40% at 90% 10%, rgba(44, 217, 194, .3), transparent 68%),
    radial-gradient(54% 40% at 8% 2%, rgba(255, 255, 255, .24), transparent 64%);
}

.share-title-content {
  position: relative;
  z-index: 5;
}

.share-title-content h1 {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -.3px;
  color: #fff;
  margin-bottom: 9px;
  text-shadow: 0 2px 16px rgba(20, 6, 44, .5);
}

.share-title-content span {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: var(--r-pill);
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  background: rgba(255, 255, 255, .2);
  border: 1px solid rgba(255, 255, 255, .32);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.share-info {
  position: relative;
  z-index: 3;
  display: flex;
  gap: 6px;
  margin: -34px 20px 18px;
  padding: 6px;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(18px) saturate(1.4);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  border: 1px solid rgba(255, 255, 255, .85);
  border-radius: var(--r-xl);
  box-shadow: var(--sh-md);
}

/* 分享页的播放入口：复用 .media-toolbar 外观，但去掉相册页那份「上浮」位移 */
.media-toolbar.share-toolbar {
  margin: 0 20px 18px;
}

.share-info-item {
  flex: 1;
  padding: 18px 8px;
  border-radius: var(--r-lg);
  text-align: center;
}

.share-info-item:nth-child(1) {
  background: linear-gradient(180deg, rgba(124, 92, 255, .11), transparent);
}

.share-info-item:nth-child(2) {
  background: linear-gradient(180deg, rgba(255, 111, 165, .11), transparent);
}

.share-info-item:nth-child(3) {
  background: linear-gradient(180deg, rgba(44, 217, 194, .13), transparent);
}

.share-info-value {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -.3px;
  background: var(--grad-brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.share-info-item:nth-child(2) .share-info-value {
  background: var(--grad-pink);
  -webkit-background-clip: text;
  background-clip: text;
}

.share-info-item:nth-child(3) .share-info-value {
  background: var(--grad-mint);
  -webkit-background-clip: text;
  background-clip: text;
}

.share-info-label {
  margin-top: 4px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink-400);
}

.share-password-wrap {
  display: block;
  padding: 34px 26px 60px;
  text-align: center;
}

.share-password-icon {
  width: 88px;
  height: 88px;
  margin: 0 auto 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 38px;
  background: linear-gradient(140deg, rgba(124, 92, 255, .16), rgba(255, 111, 165, .16));
  border: 1px solid #EDE7FF;
  animation: floatY 4s ease-in-out infinite;
}

.share-password-title {
  margin-bottom: 7px;
  font-size: 19px;
  font-weight: 800;
  color: var(--ink-900);
}

.share-password-desc {
  margin-bottom: 22px;
  font-size: 13.5px;
  color: var(--ink-400);
}

.share-password-wrap .share-password-input {
  width: 100%;
  padding: 18px;
  margin-bottom: 14px;
  border: 1.5px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface-2);
  color: var(--ink-900);
  font-size: 24px;
  letter-spacing: 10px;
  text-align: center;
  transition: border-color var(--t-fast), box-shadow var(--t-fast), background var(--t-fast);
}

.share-password-wrap .share-password-input::placeholder {
  color: var(--ink-300);
  letter-spacing: 2px;
  font-size: 16px;
}

.share-password-wrap .share-password-input:focus {
  outline: none;
  background: #fff;
  border-color: #B9A6FF;
  box-shadow: 0 0 0 4px rgba(124, 92, 255, .14);
}

.share-password-wrap .share-password-btn {
  width: 100%;
  padding: 16px;
  border: none;
  border-radius: var(--r-md);
  background: var(--grad-brand);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--sh-brand);
  transition: transform var(--t-fast) var(--ease-back);
}

.share-password-wrap .share-password-btn:active {
  transform: scale(.97);
}

.share-error {
  margin: 20px;
  padding: 22px 20px;
  border: 1px solid #FFD6E0;
  border-radius: var(--r-md);
  text-align: center;
  font-size: 14.5px;
  color: #E0315A;
  background: linear-gradient(140deg, #FFF0F4, #FFE8EF);
}

.share-pwd-error {
  margin-top: 15px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--danger-1);
}

/* ============ 幻灯片播放（模板化电子相册）============ */
.slide-container {
  position: fixed;
  width: 100vw;
  inset: 0;
  z-index: 4000;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  /* 以下变量随「氛围」切换，所有子控件都引用它们 */
  --slide-fg: #fff;
  --slide-glass: rgba(255, 255, 255, .14);
  --slide-line: rgba(255, 255, 255, .22);
  --slide-dim: rgba(255, 255, 255, .58);
  color: var(--slide-fg);
  animation: fadeIn .3s var(--ease) both;
}

/* ---- 氛围（背景）---- */
.mood-aurora {
  background: radial-gradient(120% 80% at 50% 0%, #211338 0%, #07040F 68%);
}

.mood-sunset {
  background: radial-gradient(120% 90% at 50% 8%, #4A2019 0%, #1C0B0C 60%, #0A0507 100%);
}

.mood-midnight {
  background-color: #04050C;
  background-image:
    radial-gradient(1.5px 1.5px at 12% 16%, rgba(255, 255, 255, .9), transparent),
    radial-gradient(1.2px 1.2px at 32% 9%, rgba(255, 255, 255, .6), transparent),
    radial-gradient(1.7px 1.7px at 58% 21%, rgba(255, 255, 255, .8), transparent),
    radial-gradient(1.1px 1.1px at 78% 12%, rgba(255, 255, 255, .55), transparent),
    radial-gradient(1.4px 1.4px at 91% 29%, rgba(255, 255, 255, .75), transparent),
    radial-gradient(1.2px 1.2px at 22% 38%, rgba(255, 255, 255, .45), transparent),
    radial-gradient(140% 90% at 50% 108%, rgba(76, 108, 220, .38), transparent 68%);
}

.mood-vintage {
  background: radial-gradient(120% 85% at 50% 0%, #3A2718 0%, #1A1008 68%);
}

.mood-minimal {
  --slide-fg: #171331;
  --slide-glass: rgba(23, 19, 49, .06);
  --slide-line: rgba(23, 19, 49, .14);
  --slide-dim: rgba(23, 19, 49, .5);
  background: linear-gradient(180deg, #FBFBFD 0%, #EDEDF4 100%);
}

/* ---- 顶部进度条 ---- */
.slide-progress {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 30;
  height: 3px;
  width: 0;
  background: var(--grad-aurora);
  box-shadow: 0 0 12px rgba(168, 85, 247, .8);
  transition: width .1s linear;
}

/* ---- 顶栏 ---- */
.slide-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: calc(18px + var(--safe-t)) 20px 18px;
  background: linear-gradient(rgba(0, 0, 0, .45), transparent);
}

.mood-minimal .slide-header {
  background: linear-gradient(rgba(255, 255, 255, .72), transparent);
}

.slide-close {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: var(--slide-fg);
  background: var(--slide-glass);
  border: 1px solid var(--slide-line);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  cursor: pointer;
  transition: transform var(--t-fast) var(--ease-back), background var(--t-fast);
}

.slide-close:active {
  transform: scale(.9);
}

.slide-counter {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  padding: 7px 16px;
  border-radius: var(--r-pill);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .6px;
  color: var(--slide-fg);
  background: var(--slide-glass);
  border: 1px solid var(--slide-line);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.slide-tools {
  display: flex;
  align-items: center;
  gap: 10px;
}

.slide-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 15px;
  border-radius: var(--r-pill);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .4px;
  color: var(--slide-fg);
  background: var(--slide-glass);
  border: 1px solid var(--slide-line);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  cursor: pointer;
  transition: transform var(--t-fast) var(--ease-back), background var(--t-fast);
}

.slide-chip:active {
  transform: scale(.94);
}

/* BGM 开关关闭态 */
.slide-chip.is-off {
  opacity: .45;
}

/* 单图相册隐藏进度条 */
.slide-progress.hide {
  display: none;
}

/* ---- 舞台：A/B 双图层叠加 ---- */
.slide-stage {
  flex: 1;
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  perspective: 1600px;
}

.slide-layer {
  grid-area: 1 / 1;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  opacity: 0;
  backface-visibility: hidden;
  will-change: transform, opacity;
}

.slide-layer.is-active {
  opacity: 1;
}

.slide-img {
  display: block;
  box-sizing: border-box;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 30px 70px rgba(0, 0, 0, .75));
}

/* ---- 版式 1：全屏净版（默认，无额外装饰）---- */

/* ---- 版式 2：拍立得相框 ---- */
.frame-polaroid .slide-img {
  max-width: 82%;
  max-height: 82%;
  padding: 14px 14px 58px;
  background: #FDFCF8;
  border-radius: 3px;
  transform: rotate(-1.4deg);
  filter: none;
  box-shadow: 0 26px 54px -14px rgba(0, 0, 0, .72);
}

/* ---- 版式 3：电影黑边 ---- */
.slide-stage.frame-cinema::before,
.slide-stage.frame-cinema::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  height: 9%;
  background: #000;
  z-index: 6;
  pointer-events: none;
}

.slide-stage.frame-cinema::before { top: 0; }
.slide-stage.frame-cinema::after { bottom: 0; }

/* ---- 版式 4：胶片齿孔 ---- */
.slide-stage.frame-film::before,
.slide-stage.frame-film::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 26px;
  z-index: 6;
  pointer-events: none;
  background-color: rgba(20, 13, 8, .94);
  background-image: repeating-linear-gradient(
    to bottom,
    rgba(255, 244, 224, .92) 0 12px,
    transparent 12px 26px
  );
}

.slide-stage.frame-film::before { left: 0; }
.slide-stage.frame-film::after { right: 0; }

.slide-stage.frame-film .slide-img {
  filter: sepia(.14) saturate(1.04) drop-shadow(0 30px 70px rgba(0, 0, 0, .75));
}

/* ---- 信息叠层 ---- */
.slide-caption {
  position: absolute;
  left: 26px;
  bottom: calc(116px + var(--safe-b));
  z-index: 8;
  max-width: 68%;
  transition: opacity .3s var(--ease), transform .3s var(--ease);
}

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

.slide-stage.frame-film .slide-caption {
  left: 46px;
}

.cap-album {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: .3px;
  color: var(--slide-fg);
  text-shadow: 0 2px 14px rgba(0, 0, 0, .55);
}

.mood-minimal .cap-album,
.mood-minimal .cap-meta {
  text-shadow: none;
}

.cap-meta {
  margin-top: 5px;
  font-size: 12.5px;
  letter-spacing: .6px;
  color: var(--slide-dim);
  text-shadow: 0 2px 10px rgba(0, 0, 0, .5);
}

/* ---- 底部控制条 ---- */
.slide-controls {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
  padding: 26px 26px calc(30px + var(--safe-b));
  background: linear-gradient(transparent, rgba(0, 0, 0, .6));
  transition: opacity .3s var(--ease), transform .3s var(--ease);
}

/* 模板抽屉打开时收起控制条，避免被盖住却还看得见 */
.slide-container.sheet-open .slide-controls {
  opacity: 0;
  transform: translateY(14px);
  pointer-events: none;
}

.mood-minimal .slide-controls {
  background: linear-gradient(transparent, rgba(255, 255, 255, .8));
}

.slide-btn {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: var(--slide-fg);
  background: var(--slide-glass);
  border: 1px solid var(--slide-line);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  cursor: pointer;
  transition: transform var(--t-fast) var(--ease-back), background var(--t-fast);
}

.slide-btn:active {
  transform: scale(.9);
}

.slide-btn.play-pause {
  width: 70px;
  height: 70px;
  font-size: 24px;
  color: #fff;
  background: var(--grad-brand);
  border-color: transparent;
  box-shadow: 0 12px 30px -10px rgba(124, 92, 255, .85);
}

/* ============ 转场动画（7 种 × 进入/退出）============ */
@keyframes fxFadeIn  { from { opacity: 0; } to { opacity: 1; } }
@keyframes fxFadeOut { from { opacity: 1; } to { opacity: 0; } }

@keyframes fxKbIn  { from { opacity: 0; transform: scale(1); } to { opacity: 1; transform: scale(1.085); } }
@keyframes fxKbOut { from { opacity: 1; } to { opacity: 0; } }

@keyframes fxSlideIn  { from { transform: translateX(100%); opacity: .35; } to { transform: translateX(0); opacity: 1; } }
@keyframes fxSlideOut { from { transform: translateX(0); opacity: 1; } to { transform: translateX(-100%); opacity: .25; } }

@keyframes fxZoomIn  { from { transform: scale(1.42); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes fxZoomOut { from { transform: scale(1); opacity: 1; } to { transform: scale(.88); opacity: 0; } }

@keyframes fxFlipIn  { from { transform: rotateY(-95deg); opacity: 0; } to { transform: rotateY(0deg); opacity: 1; } }
@keyframes fxFlipOut { from { transform: rotateY(0deg); opacity: 1; } to { transform: rotateY(95deg); opacity: 0; } }

@keyframes fxBlurIn  { from { filter: blur(26px); transform: scale(1.1); opacity: .1; } to { filter: blur(0); transform: scale(1); opacity: 1; } }
@keyframes fxBlurOut { from { filter: blur(0); opacity: 1; } to { filter: blur(18px); opacity: 0; } }

@keyframes fxWipeIn  { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes fxWipeOut { from { opacity: 1; } to { opacity: .55; } }

.fx-in-fade  { animation: fxFadeIn  var(--fx-in, 560ms) var(--ease) both; }
.fx-out-fade { animation: fxFadeOut var(--fx-out, 560ms) var(--ease) both; }

.fx-in-kb    { animation: fxKbIn    var(--fx-in, 5000ms) linear both; }
.fx-out-kb   { animation: fxKbOut   var(--fx-out, 560ms) var(--ease) both; }

.fx-in-slide  { animation: fxSlideIn  var(--fx-in, 620ms) var(--ease) both; }
.fx-out-slide { animation: fxSlideOut var(--fx-out, 620ms) var(--ease) both; }

.fx-in-zoom  { animation: fxZoomIn  var(--fx-in, 680ms) var(--ease) both; }
.fx-out-zoom { animation: fxZoomOut var(--fx-out, 620ms) var(--ease) both; }

.fx-in-flip  { animation: fxFlipIn  var(--fx-in, 760ms) var(--ease) both; }
.fx-out-flip { animation: fxFlipOut var(--fx-out, 700ms) var(--ease) both; }

.fx-in-blur  { animation: fxBlurIn  var(--fx-in, 1200ms) var(--ease) both; }
.fx-out-blur { animation: fxBlurOut var(--fx-out, 760ms) var(--ease) both; }

.fx-in-wipe  { animation: fxWipeIn  var(--fx-in, 820ms) var(--ease) both; }
.fx-out-wipe { animation: fxWipeOut var(--fx-out, 400ms) linear both; }

/* ============ 模板抽屉 ============ */
.slide-sheet {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  max-height: 68%;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 8px 0 calc(24px + var(--safe-b));
  background: rgba(18, 14, 38, .94);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-radius: 26px 26px 0 0;
  border-top: 1px solid rgba(255, 255, 255, .12);
  box-shadow: 0 -20px 50px -20px rgba(0, 0, 0, .9);
  transform: translateY(102%);
  transition: transform .42s var(--ease);
  color: #fff;
}

.slide-sheet.open {
  transform: translateY(0);
}

.sheet-grip {
  width: 42px;
  height: 4px;
  border-radius: 99px;
  background: rgba(255, 255, 255, .26);
  margin: 8px auto 16px;
}

.sheet-group {
  margin-bottom: 18px;
}

.sheet-label {
  padding: 0 20px 10px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .45);
}

/* 预设卡片 */
.preset-row {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 2px 20px 8px;
  scrollbar-width: none;
}

.preset-row::-webkit-scrollbar {
  display: none;
}

.preset-card {
  flex: 0 0 auto;
  width: 84px;
  cursor: pointer;
}

.preset-thumb {
  position: relative;
  width: 84px;
  height: 84px;
  border-radius: 16px;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, .14);
  transition: transform .25s var(--ease-back), border-color .25s, box-shadow .25s;
}

.preset-card.active .preset-thumb {
  border-color: #fff;
  box-shadow: 0 0 0 3px rgba(168, 85, 247, .45), 0 12px 26px -10px rgba(124, 92, 255, .9);
  transform: translateY(-2px);
}

.preset-name {
  margin-top: 7px;
  font-size: 12px;
  font-weight: 600;
  text-align: center;
  color: rgba(255, 255, 255, .72);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.preset-card.active .preset-name {
  color: #fff;
}

.pt-frame {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 44px;
  height: 54px;
  transform: translate(-50%, -50%);
  background-color: rgba(255, 255, 255, .92);
  border-radius: 3px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, .5);
}

.pt-frame.f-polaroid {
  padding: 3px 3px 11px;
  background-clip: content-box;
  background-color: #FDFCF8;
}

.pt-frame.f-cinema {
  width: 50px;
  height: 34px;
  background: linear-gradient(#000 0 22%, #fff 22% 78%, #000 78% 100%);
}

.pt-frame.f-film {
  width: 48px;
  height: 54px;
  background:
    repeating-linear-gradient(to bottom, rgba(20, 13, 8, .95) 0 4px, rgba(255, 255, 255, 0) 4px 9px) left / 6px 100% no-repeat,
    repeating-linear-gradient(to bottom, rgba(20, 13, 8, .95) 0 4px, rgba(255, 255, 255, 0) 4px 9px) right / 6px 100% no-repeat,
    #FDFCF8;
}

/* 自由组合 chips */
.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 20px;
}

.style-chip {
  padding: 8px 15px;
  border-radius: var(--r-pill);
  font-size: 13px;
  font-weight: 600;
  color: rgba(255, 255, 255, .72);
  background: rgba(255, 255, 255, .09);
  border: 1px solid rgba(255, 255, 255, .14);
  cursor: pointer;
  transition: all .22s var(--ease);
}

.style-chip:active {
  transform: scale(.96);
}

.style-chip.active {
  color: #fff;
  background: var(--grad-brand);
  border-color: transparent;
  box-shadow: 0 8px 20px -8px rgba(124, 92, 255, .9);
}


/* ============ 视频播放器 ============ */
.video-player-overlay {
  display: flex;
  flex-direction: column;
}

.video-player-content {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.video-player {
  width: 100%;
  height: 100%;
  max-height: 100vh;
  background: #000;
}

.video-player:focus {
  outline: none;
}

/* ============ 水印预览 ============ */
.wm-preview-box {
  position: relative;
  width: 100%;
  overflow: hidden;
  min-height: 0;
  max-height: 0;
  border-radius: var(--r-md);
  background: var(--surface-2);
  border: 1px solid transparent;
  color: var(--ink-400);
  font-size: 13.5px;
  transition: max-height .34s var(--ease), border-color var(--t);
}

.wm-preview-box.is-open {
  border-color: var(--line);
}

.wm-preview-box img {
  display: block;
  width: 100%;
}

.wm-loading {
  padding: 24px;
  text-align: center;
  font-size: 13.5px;
  color: var(--ink-400);
}

/* ============ 小屏适配 ============ */
@media (max-width: 360px) {
  .album-list { gap: 11px; padding: 0 16px; }
  .hero-head h1 { font-size: 22px; }
  .album-name { font-size: 14px; }
  .media-toolbar { margin: -26px 14px 16px; }
  .menu-list, .mine-stats { margin-left: 14px; margin-right: 14px; }
}

/* 大屏（750px 上限）居中留白增强 */
@media (min-width: 751px) {
  body { background: radial-gradient(120% 60% at 50% 0%, #EDE8FB 0%, #F3F1FB 60%); }
}

/* ============ 无障碍：尊重「减少动态效果」 ============ */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}
